diff --git a/hb_client/src/views/mtm/materialdo.vue b/hb_client/src/views/mtm/materialdo.vue index 6a63650..a0ec526 100644 --- a/hb_client/src/views/mtm/materialdo.vue +++ b/hb_client/src/views/mtm/materialdo.vue @@ -113,6 +113,20 @@ + + + 上传模板 + + @@ -519,9 +533,8 @@ import {upFile} from "@/api/file"; import {genTree} from "@/utils"; import Pagination from "@/components/Pagination"; // secondary package based on el-pagination - import Treeselect from '@riophae/vue-treeselect' - import '@riophae/vue-treeselect/dist/vue-treeselect.css' - + import Treeselect from '@riophae/vue-treeselect'; + import '@riophae/vue-treeselect/dist/vue-treeselect.css'; const defaultstep = { name: "", number: "", @@ -709,6 +722,19 @@ }); }, methods: { + /* handlePreview(file) { + if ("url" in file) { + window.open(file.url); + } else { + window.open(file.response.data.path); + } + },*/ + handleUpSuccess(res) { + this.recordform.export_template = res.data.path; + }, + handleRemove() { + this.recordform.export_template = ''; + }, formFunc(value) { this.dialogVisibleForm = value; }, @@ -927,6 +953,14 @@ this.recordform = Object.assign({}, scope.row); // copy obj this.dialogType = "edit"; this.dialogVisible = true; + if (this.recordform.export_template) { + this.fileList = [ + { + name: this.recordform.export_template, + url: this.recordform.export_template, + }, + ]; + } this.$nextTick(() => { this.$refs["Forms"].clearValidate(); }); @@ -979,6 +1013,7 @@ obj.name=this.recordform.name; obj.type=this.recordform.type; obj.enabled=this.recordform.enabled; + obj.export_template=this.recordform.export_template?this.recordform.export_template:''; if (isEdit) { obj.form=this.recordform.form?this.recordform.form:null; updaterecordform(this.recordform.id, obj).then( diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 3f4f087..b844f4e 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -713,47 +713,11 @@ - - {{formName}} - - - - 操作人: - {{create_by_}} - - - 操作时间: - {{update_time}} - - - - {{item.field_name}}: - {{item.field_value}} - - - - - {{item.field_name}}: - - - - - - - 导出 + 导出 +