lex 2 years ago
parent
commit
9dc5461ce4

+ 4 - 4
src/views/process/list/handle.vue

@@ -531,6 +531,7 @@ export default {
     async handleCommit() {
       try {
         // orderComment
+        // console.log(JSON.stringify(this.fileUrl || []))
         this.$refs["dataFrom"].validate(async _ => {
           if (_) {
             const res = await orderComment({
@@ -538,12 +539,11 @@ export default {
               remarks: this.dataList.remarks,
               fileUrl: JSON.stringify(this.fileUrl || [])
             });
-            console.log(res, "res");
+            // console.log(res, "res");
             if (res.code == 200) {
               this.$message.success("评论成功");
               this.dataList.remarks = "";
               this.fileUrl = [];
-              this.$refs.upload.onClear();
               // 充值数据
               this.getProcessNodeList();
             } else {
@@ -662,6 +662,7 @@ export default {
             image: [],
             file: []
           };
+          // console.log(file)
           file.forEach(item => {
             if (item.type == "image") {
               tempFile.image.push(item.url);
@@ -671,7 +672,7 @@ export default {
           });
           item.fileUrl = tempFile;
         });
-        console.log(this.circulationHistoryList, "circulationHistoryList");
+        // console.log(this.circulationHistoryList, "circulationHistoryList");
 
         // 获取当前展示节点列表
         // this.nodeStepList = this.processStructureValue.circulationHistory
@@ -960,7 +961,6 @@ export default {
               fileUrl: JSON.stringify(this.fileUrl || []),
               tpls: this.tpls
             })
-           
       this.$refs["dataFrom"].validate(_ => {
         if (_) {
           Promise.all(promiseList).then(values => {

+ 10 - 3
src/views/process/list/model/upload.vue

@@ -69,7 +69,7 @@
 <script>
 export default {
   name: "FileUpload",
-  props: ["fileUrl"],
+  props: [ "fileUrl"],
   data() {
     return {
       tempFileUrl: this.fileUrl || [],
@@ -78,14 +78,21 @@ export default {
       uploadFileLoading: false
     };
   },
+  watch: {
+    fileUrl(val) {
+      console.log(val)
+      this.tempFileUrl = val
+    }
+  },
   methods: {
     onClear() {
       this.tempFileUrl = [];
+      this.$emit("update:fileUrl", []);
     },
     onDelete(item) {
       const index = this.tempFileUrl.indexOf(item);
       this.tempFileUrl.splice(index, 1);
-      this.$emit("fileUrl", this.tempFileUrl);
+      this.$emit("update:fileUrl", this.tempFileUrl);
     },
     beforeUpload(file) {
       const isLt2M = file.size / 1024 / 1024 < 5;
@@ -126,7 +133,7 @@ export default {
           }
         });
         console.log(this.tempFileUrl);
-        this.$emit("fileList", this.tempFileUrl);
+        this.$emit("update:fileList", this.tempFileUrl);
       } else {
         const index = fileList.findIndex(item => item.uid === file.uid);
         fileList.splice(index, 1);

File diff suppressed because it is too large
+ 0 - 0
web/index.html


File diff suppressed because it is too large
+ 0 - 0
web/static/web/css/chunk-692734a2.271e7f62.css


File diff suppressed because it is too large
+ 0 - 0
web/static/web/js/app.d24acf3d.js


File diff suppressed because it is too large
+ 0 - 0
web/static/web/js/chunk-4e9267f7.34d76cb9.js


File diff suppressed because it is too large
+ 0 - 0
web/static/web/js/chunk-692734a2.7f82e05d.js


Some files were not shown because too many files changed in this diff