cfort 2 жил өмнө
parent
commit
1632878e59

+ 19 - 3
src/views/platform/bpmn/bpmInstHis/corresponding/index.js

@@ -27,11 +27,20 @@ export const listTypeData = {
 const neishen = '859879582994530304'
 const guanshen = '859879751135789056'
 
+// 特殊类型值
 let specialType = {}
+// 不符合项整改项归档信息
 let specialBtn = {}
+// 不符合项整改项查询参数
 let specialParams = {}
+// 不符合项整改项查询数据表
 let specialTable = {}
+// 不符合项整改项查询外键
 let specialField = {}
+// 整体状态查询数据表
+let stateTable = {}
+// 整体状态查询外键
+let stateField = {}
 
 specialType[neishen] = [
     '首次会议签到',
@@ -42,7 +51,8 @@ specialType[neishen] = [
     '不符合项整改'
 ]
 specialType[guanshen] = [
-    
+    // '管审计划',
+    '签到纪要'
 ]
 
 specialBtn[neishen] = {
@@ -61,14 +71,20 @@ specialParams[guanshen] = 'id_, gai_jin_qian_jian as beforeImprove, fu_jian_ as
 
 specialTable[neishen] = 't_bfhxbgyjzcsjlbx'
 specialTable[guanshen] = 't_glpsjhb'
-
 specialField[neishen] = 'ji_hua_zong_wai_j'
 specialField[guanshen] = 'zong_wai_jian_'
 
+stateTable[neishen] = 't_nbss'
+stateTable[guanshen] = 't_gglpsjhx'
+stateField[neishen] = 'ji_hua_zong_wai_j'
+stateField[guanshen] = 'id_'
+
 export {
     specialType,
     specialBtn,
     specialParams,
     specialTable,
-    specialField
+    specialField,
+    stateTable,
+    stateField
 }

+ 22 - 13
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -166,7 +166,7 @@
     import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
     import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
     import IbpsAttachment from '@/business/platform/file/attachment/selector'
-    import { specialType, specialBtn, specialParams, specialTable, specialField } from './corresponding/index'
+    import { specialType, specialBtn, specialParams, specialTable, stateTable, stateField, specialField } from './corresponding/index'
     
     export default {
         components: {
@@ -347,22 +347,31 @@
                     special: [],
                     bizKey
                 }
-                let typeIndex = ''
+                let typeIndex = 1
                 // 特殊类型处理
                 if (this.specialType.hasOwnProperty(this.typeId)) {
-                    this.specialType[this.typeId].forEach((item, index) => {
-                        // 判断当前流程在哪一步,以此决定报表展示
-                        if (subject.includes(item)) {
-                            // 数组下标+2为当前报表文件排序
-                            typeIndex = index + 2
+                    // 获取内审管审全局状态,根据此状态过滤报表显示
+                    let sql = `select zhuang_tai_jie_di as state from ${stateTable[this.typeId]} where ${stateField[this.typeId]} = '${bizKey}'`
+                    curdPost('sql', sql).then((res) => {
+                        const { data = [] } = res.variables || {}
+                        if (data.length) {
+                            console.log(data[0].state)
+                            this.specialType[this.typeId].forEach((item, index) => {
+                                // 判断当前流程在哪一步,以此决定报表展示
+                                if (data[0].state === item) {
+                                    // 数组下标+2为当前报表文件排序
+                                    typeIndex = index + 2
+                                }
+                            })
                         }
+                        console.log(typeIndex)
+                        this.record.report = this.record.report.slice(0, typeIndex)
+                    }).catch(error => {
+                        console.log('获取管审内审全局状态数据失败!')
+                        this.record.report = this.record.report.slice(0, typeIndex)
                     })
                     this.getSpecicalFile(bizKey)
                 }
-                console.log(typeIndex)
-                if (typeIndex !== '') {
-                    this.record.report = this.record.report.slice(0, typeIndex)
-                }
                 // console.log(this.record)
                 if (this.record.file.length && this.record.table.length) {
                     this.getAllFile(this.record)
@@ -424,7 +433,7 @@
             // 获取内审管审文件
             getSpecicalFile(id) {
                 let sql = `select ${specialParams[this.typeId]} from ${specialTable[this.typeId]} where ${specialField[this.typeId]} = '${id}'`
-                console.log(sql)
+                // console.log(sql)
                 curdPost('sql', sql).then(res => {
                     const { data = [] } = res.variables || {}
                     if (data.length) {
@@ -667,4 +676,4 @@
             }
         }
     }
-</style>
+</style>