Kaynağa Gözat

合同选择商品,图片未显示问题

lxf 1 yıl önce
ebeveyn
işleme
c5721e263e

+ 0 - 1
src/components/process/Contract.vue

@@ -484,7 +484,6 @@ import { ElMessage } from "element-plus";
 import Editor from "@/components/Editor/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
-import Pubsub from "pubsub-js";
 
 const route = useRoute();
 // 接收父组件的传值

+ 13 - 0
src/components/product/SelectGoods.vue

@@ -155,6 +155,19 @@ const getList = async (req = {}) => {
     setTimeout(() => {
       loading.value = false;
     }, 200);
+    const productIdList = message.rows.map((x) => x.id);
+    if (productIdList.length > 0) {
+      proxy.post("/fileInfo/getList", { businessIdList: productIdList }).then((fileObj) => {
+        for (let i = 0; i < sourceList.value.data.length; i++) {
+          const e = sourceList.value.data[i];
+          for (const key in fileObj) {
+            if (e.id === key) {
+              e.fileList = fileObj[key];
+            }
+          }
+        }
+      });
+    }
   });
 };
 getList();