diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue index 86d1a1840..a96f24657 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue @@ -218,7 +218,12 @@ >
-
{{ item.name }}
+
+ {{ item.name }} + + + +
{{ item.name }} + style="color: #409eff;cursor:pointer" + class="fileClass"> + {{ item.name }} + + +
@@ -2919,6 +2923,39 @@ this.$preview(attId) } }, + handleFilePreview2(file, type) { + let attId = "" + if (file && file.id) { + attId = file.id + } else { + attId = file.response.data.id + } + if (file.name == this.form.standName) { + let fileName = "" + let fileNam2 = "" + if (this.form.standName && this.form.standName !== '') { + fileName = this.form.standName + '-企业标准.docx' + fileNam2 = this.form.standName + } else { + fileName = '企业标准.docx' + fileNam2 = '企业标准' + } + let form = JSON.parse(JSON.stringify(this.form)) + form.standCode = '' + form.issueDate = '' + this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) + return + } + if (type === 'down') { + if (attId) { + window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId) + } else { + this.$message.warning('文件不存在,下载失败') + } + } else { + this.$preview(attId) + } + }, handleFilePreviewOne(file, type) { let id = "" let fileName = "" diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue index f7993f0d7..8c6a67db9 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue @@ -209,8 +209,12 @@
{{ item.name }} + @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer;margin-left: 12px;" + class="fileClass"> + {{ item.name }} + + +
@@ -2889,6 +2893,39 @@ this.$preview(attId) } }, + handleFilePreview2(file, type) { + let attId = "" + if (file && file.id) { + attId = file.id + } else { + attId = file.response.data.id + } + if (file.name == this.form.standName) { + let fileName = "" + let fileNam2 = "" + if (this.form.standName && this.form.standName !== '') { + fileName = this.form.standName + '-企业标准.docx' + fileNam2 = this.form.standName + } else { + fileName = '企业标准.docx' + fileNam2 = '企业标准' + } + let form = JSON.parse(JSON.stringify(this.form)) + form.standCode = '' + form.issueDate = '' + this.$onlineEditPreview(file.id, fileNam2, this.$store.getters.userInfo.userId, this.$store.getters.userInfo.userName, form) + return + } + if (type === 'down') { + if (attId) { + window.open('/api/att/attFile/downloadFileForSarNew?fileId=' + attId) + } else { + this.$message.warning('文件不存在,下载失败') + } + } else { + this.$preview(attId) + } + }, // 导入标准数据成功后执行 importFileSuccess(response, file, fileList) { // 上传成功后判断是否是两条数据是的话替换掉旧数据