Procházet zdrojové kódy

通用检测流程合并后修改原先的设置检测流程表单标题的逻辑

cfort před 3 roky
rodič
revize
b9c8d206da

+ 0 - 2
src/business/platform/form/utils/custom/requestType.js

@@ -24,8 +24,6 @@ export const requestType = {
 export const requestPath = {
     // 公告短信
     notice: 'business/v3/hwsys/universal/sendNoticeMsg',
-    // 催办短信
-    remind: 'business/v3/sys/universal/sendNoticeMsg',
     // 财务短信
     financial: 'business/v3/hwsys/universal/sendFinancialMsg',
     // 创建流程

+ 8 - 7
src/views/platform/bpmn/bpmTask/list.vue

@@ -367,7 +367,7 @@
                 // 打开表单前获取flowName和processName,避免流程节点状态bug
                 let selected = this.listData.find(item => item.id === id)
                 this.flowName = selected.name
-                this.processName = this.getProjectName(selected.procDefKey)
+                this.processName = this.getProjectName(selected.procDefKey, selected.subject)
 
                 request({
                     url: BUSINESS_BASE_URL() + '/getFormData/flag',
@@ -401,14 +401,15 @@
             },
             handleLinkClick(data, columns) {
                 this.flowName = data.name
-                this.processName = this.getProjectName(data.procDefKey)
+                this.processName = this.getProjectName(data.procDefKey, data.subject)
                 this.handleApprove(data[this.pkKey])
             },
-            // 获取检测流程对应的检测项目名称
-            getProjectName(v) {
-                const { testingList } = this.$store.getters
-                let res = testingList.find(item => item.processKey === v)
-                return res ? res.name : ''
+            // 判断是否为检测项目流程,是则截取流程标题为表单名称
+            getProjectName(key, subject) {
+                // 从store中获取保存的检测流程信息数组,默认设置已知的四个流程key(三非通用一通用),流程key有变化需修改此处默认值
+                const { testingList = ['Process_0idt26n', 'Process_1rwhy1r', 'Process_05lkhio', 'Process_140upmu'] } = this.$store.getters
+                let res = testingList.includes(key)
+                return res ? subject.includes('#') ? subject.split('#')[0] : '' : ''
             }
         }
     }

+ 7 - 6
src/views/system/dashboard/components/new-home.vue

@@ -505,7 +505,7 @@
                 this.defId = data.procDefId || ''
                 this.proInstId = data.id || ''
                 this.FlowName = data.name
-                this.processName = this.getProjectName(data.procDefKey)
+                this.processName = this.getProjectName(data.procDefKey, data.subject)
                 this.dialogFormVisible = true
             },
             // 开关右侧栏抽屉
@@ -535,11 +535,12 @@
                 }
                 return result.split('/')
             },
-            // 获取检测流程对应的检测项目名称
-            getProjectName(v) {
-                const { testingList } = this.$store.getters
-                let res = testingList.find(item => item.processKey === v)
-                return res ? res.name : ''
+            // 判断是否为检测项目流程,是则截取流程标题为表单名称
+            getProjectName(key, subject) {
+                // 从store中获取保存的检测流程信息数组,默认设置已知的四个流程key(三非通用一通用),流程key有变化需修改此处默认值
+                const { testingList = ['Process_0idt26n', 'Process_1rwhy1r', 'Process_05lkhio', 'Process_140upmu'] } = this.$store.getters
+                let res = testingList.includes(key)
+                return res ? subject.includes('#') ? subject.split('#')[0] : '' : ''
             },
             /**
              * 主管提醒

+ 5 - 3
src/views/system/dashboard/page.vue

@@ -504,17 +504,19 @@
                     })
                 }
             },
-            // 获取检测流程数据,存储到store中
+            // 获取所有检测流程的peocessKey,存储到store中
             getTestingData() {
                 let testingList = this.$store.getters.testingList
                 if (testingList.length) {
                     return
                 } else {
                     // let sql = 'select xiang_mu_ming_ as name, liu_cheng_bian_ha as processKey from t_jcxmlcpzb'
-                    let sql = 'select jian_ce_xiang_mu_ as name, defkey_ as processKey from t_mjjcnlfw where length(defkey_) > 0 order by xiang_mu_bian_hao + 0 asc'
+                    let sql = 'select distinct defkey_ as processKey from t_mjjcnlfw where length(defkey_) > 0'
                     curdPost('sql', sql).then(res => {
                         const { data } = res.variables
-                        this.$store.dispatch('ibps/param/setTestingList', data)
+                        const testingData = []
+                        data.forEach(item => testingData.push(item.processKey))
+                        this.$store.dispatch('ibps/param/setTestingList', testingData)
                     }).catch(error => {
                         this.$message.error('获取检测流程数据失败!')
                         console.log(error)