소스 검색

Merge branch 'master' of http://119.23.210.103:3000/WuYi/zdqy_firm_former into 17025标准版

cyy 1 개월 전
부모
커밋
4082b2dc8b
2개의 변경된 파일과 50개의 추가작업 그리고 12개의 파일을 삭제
  1. 4 2
      src/views/platform/bpmn/bpmInstHis/corresponding/index.js
  2. 46 10
      src/views/platform/bpmn/bpmInstHis/list.vue

+ 4 - 2
src/views/platform/bpmn/bpmInstHis/corresponding/index.js

@@ -47,12 +47,14 @@ specialType[guanshen] = []
 specialBtn[neishen] = {
   label: '不符合项报告与纠正措施记录',
   desc: '整改',
-  path: '内部审核/不符合项报告与纠正措施记录表.rpx'
+  path: '内部审核/不符合项报告与纠正措施记录表.rpx',
+  reportKey: 'internalAudit'
 }
 specialBtn[guanshen] = {
   label: '改进项与跟踪验证',
   desc: '改进',
-  path: '管理评审/改进项跟踪验证表.rpx'
+  path: '管理评审/改进项跟踪验证表.rpx',
+  reportKey: 'managementReview'
 }
 
 // specialParams[neishen] = 'id_, zheng_gai_qian_ji as beforeImprove, zheng_gai_hou_jia as afterImprove, bian_zhi_ri_qi_ as flag'

+ 46 - 10
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -151,10 +151,12 @@
                       <div class="content_item">
                         <span
                           style="cursor: pointer"
-                          @click="openReport(specialBtn[typeId].path, item.id_)"
+                          @click="
+                            openReport(getSpecialBtnPath(typeId), item.id_)
+                          "
                         >
                           <i class="el-icon-tickets" style="font-size: 14px" />
-                          {{ specialBtn[typeId].path | getReportName }}
+                          {{ getSpecialBtnPath(typeId) | getReportName }}
                         </span>
                       </div>
                     </div>
@@ -309,6 +311,10 @@ export default {
       hasPermission: true,
       specialType,
       specialBtn,
+      reportPath: {
+        internalAudit: '',
+        managementReview: ''
+      },
       listConfig: {
         toolbars: [{ key: 'search' }],
         searchForm: {
@@ -433,6 +439,9 @@ export default {
       reocrdsBoxShowStartDate: showCompileTime = false,
       reocrdsBoxShowEndDate: showEndTime = true
     } = await getSetting('system')
+    const { internalAudit = '', managementReview = '' } =
+      (await getSetting('report')) || {}
+    this.reportPath = { internalAudit, managementReview }
     this.sorts = showCompileTime
       ? { COMPILE_TIME: 'DESC' }
       : { END_TIME_: 'DESC' }
@@ -487,6 +496,12 @@ export default {
       })
   },
   methods: {
+    // 按当前 typeId 取润乾路径:配置为空字符串或未配置时使用 specialBtn 默认值
+    getSpecialBtnPath(typeId) {
+      const btn = this.specialBtn[typeId]
+      if (!btn) return ''
+      return this.reportPath[btn.reportKey] || btn.path
+    },
     replaceFormName(row, column, cellValue, index) {
       const t = cellValue === '管理评审计划'
       if (t) {
@@ -756,8 +771,18 @@ export default {
       let others = parameters.filter((i) => !i.key.includes('create_by_'))
 
       // 提取部门条件(key为'Q^subject_^SL')并合并为 OR 组
-      const deptConditions = others.filter((i) => i.key === 'Q^subject_^SL')
-      const nonDeptConditions = others.filter((i) => i.key !== 'Q^subject_^SL')
+      const deptConditions = others.filter(
+        (i) =>
+          i.key === 'Q^dep^SL' ||
+          i.key === 'Q^formName^SL' ||
+          i.key === 'Q^transDesc^SL'
+      )
+      const nonDeptConditions = others.filter(
+        (i) =>
+          i.key !== 'Q^dep^SL' &&
+          i.key !== 'Q^formName^SL' &&
+          i.key !== 'Q^transDesc^SL'
+      )
 
       let deptGroup = null
       if (deptConditions.length > 1) {
@@ -770,7 +795,9 @@ export default {
         deptGroup = deptConditions[0]
       }
 
-      // 重新构建 others:非部门条件 + 部门组(如果有)
+      console.log('好好好', deptConditions, nonDeptConditions)
+
+      // 重新构建 others:非部门条件 + 部门组(如果有)什么情况才会有
       const finalOthers = [...nonDeptConditions]
       if (deptGroup) {
         // 如果deptGroup是对象且具有relation,则作为子组;否则作为单个条件
@@ -829,6 +856,7 @@ export default {
       const result = []
       const special = ['dept', 'tableName', 'desc', 'createBy']
       Object.keys(data).forEach((key) => {
+        console.log('222222222', key, data[key])
         if (special.includes(key)) {
           if (key === 'createBy') {
             // 转换用户ID
@@ -843,25 +871,32 @@ export default {
               result.push({ key: 'Q^create_by_^SL', value: i })
             })
           } else if (key === 'dept') {
+            //formName transDesc dep
             if (this.deptSelect) {
-              result.push({ key: 'Q^subject_^SL', value: data[key] })
+              result.push({ key: 'Q^dep^SL', value: data[key] })
             } else {
               // 转换部门ID
               const t = this.deptList.filter((i) =>
                 i.positionName.includes(data[key])
               )
               if (!t.length) {
-                result.push({ key: 'Q^subject_^SL', value: data[key] })
+                result.push({ key: 'Q^dep^SL', value: data[key] })
               }
               const res = t.map((i) => i.positionId)
               res.forEach((i) => {
-                result.push({ key: 'Q^subject_^SL', value: i })
+                result.push({ key: 'Q^dep^SL', value: i })
               })
             }
-          } else {
-            result.push({ key: 'Q^subject_^SL', value: data[key] })
+          } else if (key === 'tableName') {
+            result.push({ key: 'Q^formName^SL', value: data[key] })
+          } else if (key === 'desc') {
+            result.push({ key: 'Q^transDesc^SL', value: data[key] })
           }
+          // else {
+          //   result.push({ key: 'Q^subject_^SL', value: data[key] })
+          // }
         } else {
+          console.log('不会走', key)
           result.push({ key, value: data[key] })
         }
       })
@@ -874,6 +909,7 @@ export default {
     },
     // 处理排序
     handleSortChange(sort) {
+      console.log(sort, '2222222222')
       if (sort && sort.sortBy && sort.sortBy == 'COMPILE_TIME_') {
         sort.sortBy = 'COMPILE_TIME'
       }