|
|
@@ -32,6 +32,7 @@
|
|
|
@column-link-click="handleLinkClick"
|
|
|
@pagination-change="handlePaginationChange"
|
|
|
>
|
|
|
+ <template slot="creator" slot-scope="scope">{{ scope.row.createBy | getUserName(userList) }}</template>
|
|
|
<template slot="selectCont" slot-scope="scope">
|
|
|
<el-popover
|
|
|
:ref="'popover2-' + scope.row.id"
|
|
|
@@ -44,7 +45,7 @@
|
|
|
<div slot="reference" class="div_operation el-icon-s-order">查阅记录</div>
|
|
|
<div v-loading="fileLoading" class="div_content">
|
|
|
<!-- 获取所有输出报告-->
|
|
|
- <template v-if="record.report.length && record.report[0]">
|
|
|
+ <!-- <template v-if="record.report.length && record.report[0]">
|
|
|
<div v-for="(item, index) in record.report" :key="index" class="content_item">
|
|
|
<span style="cursor: pointer;" @click="openReport(item, record.bizKey)">
|
|
|
<i class="el-icon-tickets" style="font-size: 18px;" />
|
|
|
@@ -52,12 +53,12 @@
|
|
|
</span>
|
|
|
<br>
|
|
|
</div>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<div v-if="record.file.length && snapshotId" class="content_item">
|
|
|
<!-- <div class="sub_operation">快照</div> -->
|
|
|
<ibps-attachment
|
|
|
v-model="snapshotId"
|
|
|
- :download="hasRole"
|
|
|
+ download
|
|
|
readonly
|
|
|
multiple
|
|
|
upload-type="attachment"
|
|
|
@@ -69,7 +70,7 @@
|
|
|
<div class="sub_operation ibps-icon-folder-open-o">附件</div>
|
|
|
<ibps-attachment
|
|
|
v-model="fileId"
|
|
|
- :download="hasRole"
|
|
|
+ download
|
|
|
readonly
|
|
|
multiple
|
|
|
upload-type="attachment"
|
|
|
@@ -77,7 +78,7 @@
|
|
|
style="width: 100%; height: 100%; max-height: 180px; overflow-y: auto;"
|
|
|
/>
|
|
|
</div>
|
|
|
- <!-- <div v-if="(!record.report.length || !record.report[0]) && (!record.file.length || !fileId)">无报表及附件数据</div> -->
|
|
|
+ <div v-if="!record.file.length || (!fileId && !snapshotId)">无快照及附件数据</div>
|
|
|
<!-- 二级菜单,内审管审特有 -->
|
|
|
<template v-if="specialType.hasOwnProperty(typeId)">
|
|
|
<el-popover
|
|
|
@@ -127,7 +128,7 @@
|
|
|
<div class="content_item">
|
|
|
<span style="cursor: pointer;" @click="openReport(specialBtn[typeId].path, item.id_)">
|
|
|
<i class="el-icon-tickets" style="font-size: 14px;" />
|
|
|
- {{ specialBtn[typeId].name }}
|
|
|
+ {{ specialBtn[typeId].path | getReportName }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -187,6 +188,10 @@ export default {
|
|
|
getReportName (value) {
|
|
|
// 通过/与.截取,eg: 43罗湖/L13-LHXBJY-QP-6.4-04 标准菌株管理程序/LHXBJY-QP-6.4-04-FQ-03 标准菌株鉴定验收记录表.rpx
|
|
|
return value.slice(-value.split('').reverse().join('').indexOf('/'), -value.split('').reverse().join('').indexOf('.') - 1)
|
|
|
+ },
|
|
|
+ getUserName (v, list) {
|
|
|
+ const user = list.find(i => i.userId === v)
|
|
|
+ return user ? user.userName : ''
|
|
|
}
|
|
|
},
|
|
|
mixins: [FixHeight],
|
|
|
@@ -340,7 +345,7 @@ export default {
|
|
|
},
|
|
|
// 获取报表数据及附件数据
|
|
|
getReportAndFile ({ procDefKey, bizKey, subject }) {
|
|
|
- // 每次获取前先清除原先数据
|
|
|
+ // 每次获取前先清除原先数据
|
|
|
this.record = {
|
|
|
report: [],
|
|
|
file: [],
|
|
|
@@ -366,31 +371,22 @@ export default {
|
|
|
special: [],
|
|
|
bizKey
|
|
|
}
|
|
|
- let typeIndex = 1
|
|
|
+ let typeIndex = ''
|
|
|
// 特殊类型处理
|
|
|
if (this.specialType.hasOwnProperty(this.typeId)) {
|
|
|
- // 获取内审管审全局状态,根据此状态过滤报表显示
|
|
|
- const 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
|
|
|
- }
|
|
|
- })
|
|
|
+ this.specialType[this.typeId].forEach((item, index) => {
|
|
|
+ // 判断当前流程在哪一步,以此决定报表展示
|
|
|
+ if (subject.includes(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)
|