Эх сурвалжийг харах

fix 修改复审截图不显示问题

ylong 4 долоо хоног өмнө
parent
commit
8a34f027a1

+ 33 - 43
src/views/recycleOrder/components/review-screenshot.vue

@@ -2,30 +2,17 @@
 <template>
     <ele-modal :width="700" v-model="visible" title="复审截图">
         <div v-if="imageList.length" class="flex flex-row gap-6 flex-wrap">
-            <div
-                class="demo-image__preview"
-                v-for="(item, index) in imageList"
-                :key="index"
-            >
+            <div class="demo-image__preview" v-for="(item, index) in imageList" :key="index">
                 <div class="demo-image__info" style="margin-bottom: 6px">
-                    说明:{{ item.remark || '--' }}
+                    说明:{{ item.reviewRemark || '--' }}
                 </div>
-                <div class="no-pic" v-if="!item.imgInfo.length">
+                <div class="no-pic" v-if="!item.reviewImg.length">
                     暂无图片
                 </div>
 
-                <el-image
-                    v-else
-                    v-for="(url, idx) in item.imgInfo"
-                    :key="idx"
-                    style="width: 100px; height: 100px; margin-right: 10px"
-                    :src="url"
-                    :preview-src-list="item.imgInfo"
-                    :initial-index="idx"
-                    fit="cover"
-                />
-
-
+                <el-image v-else v-for="(url, idx) in item.reviewImg" :key="idx"
+                    style="width: 100px; height: 100px; margin-right: 10px" :src="url" :preview-src-list="item.reviewImg"
+                    :initial-index="idx" fit="cover" />
             </div>
         </div>
         <el-empty v-else description="暂无复审截图" />
@@ -37,36 +24,39 @@
 </template>
 
 <script setup>
-    import { ref, getCurrentInstance, nextTick } from 'vue';
-    const { proxy } = getCurrentInstance();
+import { ref, getCurrentInstance, nextTick } from 'vue';
+const { proxy } = getCurrentInstance();
 
-    /** 弹窗是否打开 */
-    const visible = defineModel({ type: Boolean });
+/** 弹窗是否打开 */
+const visible = defineModel({ type: Boolean });
 
-    /** 关闭弹窗 */
-    const handleCancel = () => {
-        visible.value = false;
-    };
+/** 关闭弹窗 */
+const handleCancel = () => {
+    visible.value = false;
+};
 
-    //获取审核截图
-    const imageList = ref([]);
-    function getAuditScreenshot(id) {
-        proxy.$http
-            .get(`/order/recycleOrderReview/getImgInfo?id=${id}`)
-            .then((res) => {
+//获取审核截图
+const imageList = ref([]);
+function getAuditScreenshot(id) {
+    proxy.$http
+        .get(`/order/recycleOrderReview/getImgInfo?id=${id}`)
+        .then((res) => {
+            if (res.data.code === 200) {
                 imageList.value = res.data.data || [];
-            });
-    }
+                console.log(imageList.value, '获取审核截图');
+            }
+        });
+}
 
-    /** 弹窗打开事件 */
-    const handleOpen = (row) => {
-        visible.value = true;
-        row.id && getAuditScreenshot(row.id);
-    };
+/** 弹窗打开事件 */
+const handleOpen = (row) => {
+    visible.value = true;
+    row.id && getAuditScreenshot(row.id);
+};
 
-    defineExpose({
-        handleOpen
-    });
+defineExpose({
+    handleOpen
+});
 </script>
 <style>
 .no-pic {