浏览代码

添加保存表单数据接口,添加盖章文件类型

cfort 3 年之前
父节点
当前提交
027e9af4e3

+ 4 - 2
src/business/platform/file/constants/fileTypes.js

@@ -6,7 +6,8 @@ const FILE_TYPES = {
   'videos': ['mkv', 'mp4', 'avi', 'swf', 'wmv', 'rmvb', 'mov', 'mpg'],
   'videos': ['mkv', 'mp4', 'avi', 'swf', 'wmv', 'rmvb', 'mov', 'mpg'],
   'audios': ['mp3', 'flac', 'ape', 'wma', 'wav', 'aac', 'm4a', 'au', 'ram', 'mmf', 'aif'],
   'audios': ['mp3', 'flac', 'ape', 'wma', 'wav', 'aac', 'm4a', 'au', 'ram', 'mmf', 'aif'],
   'docs': ['doc', 'docx', 'pdf', 'rtf', 'txt', 'csv', 'xls', 'xlsx', 'ppt', 'pptx', 'htm', 'html', 'wps', 'hip'],
   'docs': ['doc', 'docx', 'pdf', 'rtf', 'txt', 'csv', 'xls', 'xlsx', 'ppt', 'pptx', 'htm', 'html', 'wps', 'hip'],
-  'compress': ['rar', 'zip', '7z', 'gz', 'arj', 'z']
+  'compress': ['rar', 'zip', '7z', 'gz', 'arj', 'z'],
+  'seal': ['pdf', 'docx']
 }
 }
 /**
 /**
  * 参考http://www.w3school.com.cn/media/media_mimeref.asp
  * 参考http://www.w3school.com.cn/media/media_mimeref.asp
@@ -19,7 +20,8 @@ const ACCEPT = {
   'videos': '.mkv,.mp4,.avi,.swf,.wmv,.rmvb,.mov,.mpg',
   'videos': '.mkv,.mp4,.avi,.swf,.wmv,.rmvb,.mov,.mpg',
   'audios': '.mp3,.flac,.ape,.wma,.wav,.aac,.m4a,.au,.ram,.mmf,.aif',
   'audios': '.mp3,.flac,.ape,.wma,.wav,.aac,.m4a,.au,.ram,.mmf,.aif',
   'docs': '.doc,.docx,.pdf,.rtf,.txt,.csv,.xls,.xlsx,.ppt,.pptx,.htm,.html,.wps,.hip',
   'docs': '.doc,.docx,.pdf,.rtf,.txt,.csv,.xls,.xlsx,.ppt,.pptx,.htm,.html,.wps,.hip',
-  'compress': '.rar,.zip,.7z,.gz,.arj,.z'
+  'compress': '.rar,.zip,.7z,.gz,.arj,.z',
+  'seal': '.pdf,.docx'
 }
 }
 const IMAGE_ACCEPT = {
 const IMAGE_ACCEPT = {
   'bmp': 'image/bmp',
   'bmp': 'image/bmp',

+ 3 - 0
src/business/platform/form/constants/fieldOptions.js

@@ -168,6 +168,9 @@ export const fileTypeOptions = [{
 }, {
 }, {
   value: 'compress',
   value: 'compress',
   label: '压缩包'
   label: '压缩包'
+}, {
+  value: 'seal',
+  label: '盖章文件'
 }, {
 }, {
   value: 'custom',
   value: 'custom',
   label: '自定义'
   label: '自定义'

+ 1 - 0
src/business/platform/form/formbuilder/constants/helpTip.js

@@ -260,6 +260,7 @@ export default {
             视频类:mkv、mp4、avi、swf、wmv、rmvb、mov、mpg。</br>
             视频类:mkv、mp4、avi、swf、wmv、rmvb、mov、mpg。</br>
             音频类:mp3、flac、ape、wma、wav、aac、m4a、au、ram、mmf、aif。</br>
             音频类:mp3、flac、ape、wma、wav、aac、m4a、au、ram、mmf、aif。</br>
             压缩包:rar、zip、7z、gz、arj、z。</br>
             压缩包:rar、zip、7z、gz、arj、z。</br>
+            盖章文件:pdf、docx。</br>
             如以上格式限制不满足需求,建议选择[自定义]文件上传类型。</br>
             如以上格式限制不满足需求,建议选择[自定义]文件上传类型。</br>
             [自定义]的文件扩展名,多个请用逗号隔开,如: txt, pdf, mp3等。</br>`
             [自定义]的文件扩展名,多个请用逗号隔开,如: txt, pdf, mp3等。</br>`
   },
   },

+ 0 - 1
src/business/platform/form/formrender/dynamic-form/components/approval-opinion/index.vue

@@ -247,7 +247,6 @@
                 return this.field ? this.field.field_options.placeholder : ''
                 return this.field ? this.field.field_options.placeholder : ''
             },
             },
             limitHeight () {
             limitHeight () {
-                console.info('xxxx', this.isLimitHeight)
                 return this.isLimitHeight
                 return this.isLimitHeight
             }
             }
         },
         },

+ 3 - 1
src/business/platform/form/utils/custom/requestType.js

@@ -33,5 +33,7 @@ export const requestPath = {
     // 获取流水号
     // 获取流水号
     getId: 'platform/v3/identity/getNextIdByAlias',
     getId: 'platform/v3/identity/getNextIdByAlias',
     // 发送内部消息
     // 发送内部消息
-    sendNotice: '/platform/v3/msg/innerMessage/save'
+    sendNotice: 'platform/v3/msg/innerMessage/save',
+    // 保存表单数据
+    saveFormData: 'business/v3/bpm/task/save/task'
 }
 }

+ 64 - 64
src/plugins/ibps/index.js

@@ -24,9 +24,7 @@ import sticky from '@/directives/sticky'
 // 加载更多
 // 加载更多
 import loadMore from '@/directives/load-more'
 import loadMore from '@/directives/load-more'
 
 
-import {
-  getToken
-} from '@/utils/auth'
+import { getToken } from '@/utils/auth'
 // 通用组件
 // 通用组件
 import '@/components'
 import '@/components'
 // svg 图标
 // svg 图标
@@ -41,72 +39,74 @@ import setting from '@/setting.js'
 import env from '@/env'
 import env from '@/env'
 
 
 export default {
 export default {
-  async install(Vue, options) {
-    // 设置为 false 以阻止 vue 在启动时生成生产提示。
-    // https://cn.vuejs.org/v2/api/#productionTip
-    Vue.config.productionTip = false
-    // 当前环境
-    Vue.prototype.$nodeEnv = env.NODE_ENV
-    // 当前环境变量
-    Vue.prototype.$env = env
+    async install (Vue, options) {
+        // 设置为 false 以阻止 vue 在启动时生成生产提示。
+        // https://cn.vuejs.org/v2/api/#productionTip
+        Vue.config.productionTip = false
+        // 当前环境
+        Vue.prototype.$nodeEnv = env.NODE_ENV
+        // 当前环境变量
+        Vue.prototype.$env = env
 
 
-    // 当前的 baseUrl   简化代码中 env.VUE_APP_PUBLIC_PATH 取值
-    Vue.prototype.$baseUrl = env.VUE_APP_PUBLIC_PATH || '/'
-    // 构建时间
-    Vue.prototype.$buildTime = env.VUE_APP_BUILD_TIME
+        // 当前的 baseUrl   简化代码中 env.VUE_APP_PUBLIC_PATH 取值
+        Vue.prototype.$baseUrl = env.VUE_APP_PUBLIC_PATH || '/'
+        // 构建时间
+        Vue.prototype.$buildTime = env.VUE_APP_BUILD_TIME
 
 
-    Vue.prototype.$ibpsUrl = env.VUE_APP_BASE_API_0_0_TEST
-    /* 中汇瑞德检测中心 */
-    let downloadReport = (src, where) => {
-      return 'http://120.78.154.31/demo/reportServlet?action=6&file=' + encodeURIComponent(src) + '.rpx&columns=0&srcType=file&paramString=' + encodeURIComponent(where)
-    }
-    let timer = setInterval(() => { //定时循环添加参数
-      if (getToken()) {
-        Vue.prototype.$reportPash = 'http://120.78.154.31/demo/reportJsp/showReport.jsp?access_token = ' + getToken() + '&rpx=中汇瑞德检测中心/' //报表路径
-        Vue.prototype.$getReportFile = downloadReport //通过方法函数,拼接url,并将字符串格式化
-        // Vue.prototype.$getSealUri = 'https://www.szjyxt.com/getSealFile/' //微签 回显获取文件地址
-        Vue.prototype.$getSealUri = 'http://120.78.154.31:9999/no/getSealFile/' //微签 回显获取文件地址
+        Vue.prototype.$ibpsUrl = env.VUE_APP_BASE_API_0_0_TEST
+        const downloadReport = (src, where, type = 6) => {
+            // 目前可用type    6:生成报表的pdf文件【默认】   7:生成报表的word文件   3:生成报表的excel文件
+            return `http://120.78.154.31/demo/reportServlet?action=${type}&file=${encodeURIComponent(src)}.rpx&columns=0&srcType=file&paramString=${encodeURIComponent(where)}`
+        }
+        const reportPath = '中汇瑞德检测中心'
+        let timer = setInterval(() => { //定时循环添加参数
+            if (getToken()) {
+                //报表路径
+                Vue.prototype.$reportPash = `http://120.78.154.31/demo/reportJsp/showReport.jsp?access_token=${getToken()}&rpx=${reportPath}/`
+                Vue.prototype.$getReportFile = downloadReport //通过方法函数,拼接url,并将字符串格式化
+                // Vue.prototype.$getSealUri = 'https://www.szjyxt.com/getSealFile/' //微签 回显获取文件地址
+                Vue.prototype.$getSealUri = 'http://120.78.154.31:9999/no/getSealFile/' //微签 回显获取文件地址
 
 
-        Vue.prototype.$getFileDow = 'http://120.78.154.31/ibps/platform/v3/file/download?attachmentId=' //文件下载地址
-        Vue.prototype.$getSealUploadingFile = 'http://120.78.154.31/doSeal/' //微签 上传地址
-        Vue.prototype.$getSealPreFile = 'http://120.78.154.31/preprocess/' //微签 手动签章-预处理
-        // Vue.prototype.$getSealPageFile = 'https://www.szjyxt.com/manualSigPage/' //微签 手动签章-页面接口
-        Vue.prototype.$getSealPageFile = 'http://120.77.249.241:9999/manualSig/manualSigPage/' //微签 手动签章-页面接口( 微签服务器地址,非nginx转发)
-        Vue.prototype.$getSigFile = 'http://120.77.249.241:8080/doSeal/getSigFile/' //微签 手动签章-页面接口-签章页面完成按钮回调接口
+                Vue.prototype.$getFileDow = 'http://120.78.154.31/ibps/platform/v3/file/download?attachmentId=' //文件下载地址
+                Vue.prototype.$getSealUploadingFile = 'http://120.78.154.31/doSeal/' //微签 上传地址
+                Vue.prototype.$getSealPreFile = 'http://120.78.154.31/preprocess/' //微签 手动签章-预处理
+                // Vue.prototype.$getSealPageFile = 'https://www.szjyxt.com/manualSigPage/' //微签 手动签章-页面接口
+                Vue.prototype.$getSealPageFile = 'http://120.77.249.241:9999/manualSig/manualSigPage/' //微签 手动签章-页面接口( 微签服务器地址,非nginx转发)
+                Vue.prototype.$getSigFile = 'http://120.77.249.241:8080/doSeal/getSigFile/' //微签 手动签章-页面接口-签章页面完成按钮回调接口
 
 
-        clearInterval(timer) //添加成功后即删除定时任务
-      }
-    }, 500)
+                clearInterval(timer) //添加成功后即删除定时任务
+            }
+        }, 500)
 
 
-    // 获得用户设置的全局尺寸
-    const size = await store.dispatch('ibps/db/get', {
-      dbName: 'sys',
-      path: 'size.value',
-      defaultValue: setting.system.size,
-      user: true
-    })
+        // 获得用户设置的全局尺寸
+        const size = await store.dispatch('ibps/db/get', {
+            dbName: 'sys',
+            path: 'size.value',
+            defaultValue: setting.system.size,
+            user: true
+        })
 
 
-    // 注册Element UI
-    Vue.use(ElementUI, {
-      size,
-      i18n: (key, value) => i18n.t(key, value)
-    })
-    // 注册全局过滤器(register global utility filters. )
-    Object.keys(filters).forEach(key => {
-      Vue.filter(key, filters[key])
-    })
-    // 设置拼音指令
-    Vue.directive('pinyin', pinyin)
-    Vue.directive('sticky', sticky)
-    Vue.directive('load-more', loadMore)
+        // 注册Element UI
+        Vue.use(ElementUI, {
+            size,
+            i18n: (key, value) => i18n.t(key, value)
+        })
+        // 注册全局过滤器(register global utility filters. )
+        Object.keys(filters).forEach(key => {
+            Vue.filter(key, filters[key])
+        })
+        // 设置拼音指令
+        Vue.directive('pinyin', pinyin)
+        Vue.directive('sticky', sticky)
+        Vue.directive('load-more', loadMore)
 
 
-    // 插件
-    Vue.use(pluginError)
-    Vue.use(pluginLog)
-    Vue.use(pluginOpen)
-    // 使用帮助类
-    Vue.prototype.$utils = Utils
-    // 快速打印 log
-    Vue.prototype.$log = Utils.log
-  }
+        // 插件
+        Vue.use(pluginError)
+        Vue.use(pluginLog)
+        Vue.use(pluginOpen)
+        // 使用帮助类
+        Vue.prototype.$utils = Utils
+        // 快速打印 log
+        Vue.prototype.$log = Utils.log
+    }
 }
 }