|
|
@@ -117,7 +117,17 @@
|
|
|
width="150"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- ></el-table-column>
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
+ scope.row.requireTime
|
|
|
+ ? String(scope.row.requireTime).split(' ')[0].split('T')[0]
|
|
|
+ : '-'
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="taskStatus"
|
|
|
label="任务状态"
|
|
|
@@ -238,13 +248,11 @@
|
|
|
<el-table-column
|
|
|
prop="supervisor"
|
|
|
label="督办人"
|
|
|
- width="100"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
prop="reportTime"
|
|
|
label="报告时间"
|
|
|
- width="150"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -261,13 +269,15 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span
|
|
|
+ <el-button
|
|
|
v-if="scope.row.relatedFiles"
|
|
|
- style="color: #409eff; cursor: pointer"
|
|
|
+ type="text"
|
|
|
@click="handleDownload(scope.row.relatedFiles)"
|
|
|
>
|
|
|
- {{ scope.row.relatedFiles }}
|
|
|
- </span>
|
|
|
+ <i class="iconfont-5039297 icon-wenjian"></i>
|
|
|
+ <span>查看</span>
|
|
|
+ </el-button>
|
|
|
+ <span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template slot="empty">
|
|
|
@@ -640,18 +650,45 @@
|
|
|
loading && loading.close && loading.close()
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
handleDownload(paths) {
|
|
|
- if (!paths) return
|
|
|
- const base =
|
|
|
- window.context && window.context.form ? window.context.form : ''
|
|
|
- const list = String(paths)
|
|
|
+ // 参考 collectiveMain.vue 的 handleViewAttachment:走 kkFileView 预览
|
|
|
+ if (!paths) {
|
|
|
+ this.$message &&
|
|
|
+ this.$message.warning &&
|
|
|
+ this.$message.warning('该记录没有附件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 兼容多个附件(逗号分隔):默认取第一个进行预览
|
|
|
+ const attachmentUrl = String(paths)
|
|
|
.split(',')
|
|
|
.map((s) => s.trim())
|
|
|
- .filter(Boolean)
|
|
|
- list.forEach((p) => {
|
|
|
- const url = p.startsWith('http') ? p : base + p
|
|
|
- window.open(url)
|
|
|
- })
|
|
|
+ .filter(Boolean)[0]
|
|
|
+
|
|
|
+ if (!attachmentUrl) {
|
|
|
+ this.$message &&
|
|
|
+ this.$message.warning &&
|
|
|
+ this.$message.warning('该记录没有附件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ let _fileUrl = ''
|
|
|
+ if (attachmentUrl.startsWith('http')) {
|
|
|
+ _fileUrl = attachmentUrl
|
|
|
+ } else {
|
|
|
+ _fileUrl = (window.context && window.context.form) + attachmentUrl
|
|
|
+ }
|
|
|
+
|
|
|
+ const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
|
|
|
+ window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
|
|
|
+ } catch (e) {
|
|
|
+ console.error('文件预览失败: ', e)
|
|
|
+ this.$message &&
|
|
|
+ this.$message.error &&
|
|
|
+ this.$message.error('文件预览失败')
|
|
|
+ }
|
|
|
},
|
|
|
handleEndSupervision(row) {
|
|
|
console.log('结束督办:', row)
|