diff --git a/jwtech-admin-page/src/views/project/special/options/ContractPage.vue b/jwtech-admin-page/src/views/project/special/options/ContractPage.vue index 08ca163b..68e37b1d 100644 --- a/jwtech-admin-page/src/views/project/special/options/ContractPage.vue +++ b/jwtech-admin-page/src/views/project/special/options/ContractPage.vue @@ -152,7 +152,13 @@ /> - + - + @@ -332,11 +338,7 @@ export default { documentTypeFormat(row, column) { return this.selectDictLabel(this.documentTypeOptions, row.documentType); }, - // 取消按钮 - cancel() { - this.open = false; - this.reset(); - }, + // 表单重置 reset() { this.form = { @@ -353,6 +355,8 @@ export default { remark: null, }; this.resetForm("form"); + // 重置存储文件的数组 + this.acceptDocumentFileList.splice(0, this.acceptDocumentFileList.length); }, // 查询表单重置 resetQueryForm() { @@ -393,17 +397,14 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.reset(); this.open = true; this.title = "添加专题项目文档管理"; }, /** 修改按钮操作 */ handleUpdate(row) { - this.reset(); const id = row.id || this.ids; getDocument(id).then((response) => { this.form = response.data; - console.log("response.data", response.data); if (response.data.acceptDocumentAttachment) { this.acceptDocumentFileList = JSON.parse( response.data.acceptDocumentAttachment @@ -441,10 +442,16 @@ export default { }); } } - // 重置存储文件的数组 - this.acceptDocumentFileList.length = 0; }); }, + // 取消按钮 + cancel() { + this.open = false; + }, + // 关闭弹窗 + close() { + this.reset(); + }, /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; diff --git a/jwtech-admin-page/src/views/project/special/options/resultsPage.vue b/jwtech-admin-page/src/views/project/special/options/resultsPage.vue index bf6c4ceb..1ae3b2d2 100644 --- a/jwtech-admin-page/src/views/project/special/options/resultsPage.vue +++ b/jwtech-admin-page/src/views/project/special/options/resultsPage.vue @@ -438,7 +438,9 @@ export default { remark: null, }; this.resetForm("form"); + this.resultsFileList.splice(0, this.resultsFileList.length); }, + // 查询表单重置 resetQueryForm() { this.queryParams = { @@ -479,13 +481,12 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.reset(); + // console.log(" this.resultsFileList", this.resultsFileList); this.open = true; this.title = "添加专题成果"; }, /** 修改按钮操作 */ handleUpdate(row) { - // this.reset(); const id = row.id || this.ids; getGain(id).then((response) => { this.form = response.data; @@ -527,38 +528,17 @@ export default { }); } } - // 重置存储文件的数组 - this.resultsFileList.length = 0; }); - this.reset(); }, // 取消按钮 cancel() { this.open = false; - this.reset(); }, // 关闭弹窗回调 colseDialog() { this.reset(); }, - // 表单重置 - reset() { - this.form = { - id: null, - evaluator: null, - evaluationTime: null, - evaluationContent: null, - fileAttachmentRelation: null, - proNo: null, - createUid: null, - createTime: null, - updateUid: null, - updateTime: null, - owerDept: null, - remark: null, - }; - this.tableForm = this.form; - }, + /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; diff --git a/jwtech-admin-page/src/views/project/special/options/taskPage.vue b/jwtech-admin-page/src/views/project/special/options/taskPage.vue index 96849472..82451064 100644 --- a/jwtech-admin-page/src/views/project/special/options/taskPage.vue +++ b/jwtech-admin-page/src/views/project/special/options/taskPage.vue @@ -200,6 +200,7 @@ { this.form = response.data; - console.log(response.data); // 附件信息 if (response.data.projectAttachment) { this.projectFileList = JSON.parse(response.data.projectAttachment); @@ -562,10 +562,6 @@ export default { this.title = "修改专题项目报批任务书信息"; }); }, - // 打开表单 - openForm() { - this.open = true; - }, /** 提交按钮 */ submitForm() { this.$refs["form"].validate((valid) => { @@ -592,11 +588,16 @@ export default { }); } } - // 重置存储文件的数组 - this.projectFileList.length = 0; - this.opinionFileList.length = 0; }); }, + // 取消按钮 + cancel() { + this.open = false; + }, + // 关闭弹窗 + close() { + this.reset(); + }, /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; @@ -623,8 +624,9 @@ export default { console.log("fileList", fileList); this.projectFileList.push({ name: fileList.name, + fileName: fileList.response.fileName, url: fileList.response.url, - fileList: fileList, + uid: fileList.uid, }); }, handleProjectRemove(file, fileList) { @@ -636,7 +638,8 @@ export default { this.projectFileList.splice(index, 1); }, handleProjectPreview(file) { - console.log(file); + console.log(file.fileName); + getFileStream({ fileName: file.fileName }); }, handleProjectExceed(files, fileList) { this.$message.warning( @@ -653,6 +656,7 @@ export default { console.log("fileList", fileList); this.opinionFileList.push({ name: fileList.name, + fileName: fileList.response.fileName, url: fileList.response.url, uid: fileList.uid, // fileList: fileList,