diff --git a/src/components/doc-width-nav.vue b/src/components/doc-width-nav.vue index 950e6513367ea1343a5cf38559c7c04e5c36a176..e878903f1b1be60fc1c24524e0f33d4eafba3c4a 100644 --- a/src/components/doc-width-nav.vue +++ b/src/components/doc-width-nav.vue @@ -26,9 +26,9 @@
- -
- - 点击上传附件 - -
-
+ +
取消 @@ -48,10 +38,8 @@ export default { return { title: "", content: "", - doc_file: [], - anotherData: { - directory: "file", - } + fileList: [], + fileArray: [] }; }, computed: { @@ -75,7 +63,7 @@ export default { if (data.data.doc_file && data.data.doc_file != "") { arr = data.data.doc_file.split(",") arr.forEach(e => { - this.doc_file.push({ + this.fileArray.push({ name: helper.downloadFileFormatNew(e), url: e }) @@ -91,8 +79,8 @@ export default { }, submitAction() { let arr = []; - if (this.doc_file && this.doc_file.length > 0 ) { - this.doc_file.forEach(e => { + if (this.fileList && this.fileList.length > 0 ) { + this.fileList.forEach(e => { arr.push(e.url) }) } @@ -116,31 +104,17 @@ export default { this.$message.error("保存失败"); }); }, - getNewListOne(res,file) { - if (res.success == 1) { - this.doc_file.push( - { - name: file.name, - url: res.data - } - ) - } + getNewList(fileList) { + this.fileList = fileList; }, - handleRemove(file) { - this.doc_file.forEach((item, i) => { - if (item.url === file.url) { - this.doc_file.splice(i, 1); - } - }); - } }, };