|
|
@@ -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>
|