From a6ed23b018343a68f9fd276647cc4af817398d1b Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 01 二月 2024 15:21:26 +0800
Subject: [PATCH] feat:修改部分问题

---
 src/views/your/order-manage/orderEvaluateManage.vue |  144 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 97 insertions(+), 47 deletions(-)

diff --git a/src/views/your/order-manage/orderEvaluateManage.vue b/src/views/your/order-manage/orderEvaluateManage.vue
index 2ee3b76..e2efe4d 100644
--- a/src/views/your/order-manage/orderEvaluateManage.vue
+++ b/src/views/your/order-manage/orderEvaluateManage.vue
@@ -7,34 +7,48 @@
   <div class="search">
     <Card>
       <Row class="operation">
-        <Input v-model="searchForm2.userName" suffix="ios-search" @on-change="getDataList2" placeholder="杈撳叆閰嶉�佷汉" clearable style="width: 250px"/>
-        <Input v-model="searchForm2.customerName" suffix="ios-search" @on-change="getDataList2" placeholder="杈撳叆鍟嗘埛鍚嶇О" clearable style="width: 250px;margin-left: 20px"/>
-        <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" placeholder="璇烽�夋嫨閰嶉�佹棩鏈�" style="width: 240px;margin-left: 20px">
+        <Input v-model="searchForm2.userName" suffix="ios-search" placeholder="杈撳叆閰嶉�佷汉"
+               clearable style="width: 250px"/>
+        <Input v-model="searchForm2.customerName" suffix="ios-search"
+               placeholder="杈撳叆鍟嗘埛鍚嶇О" clearable style="width: 250px;margin-left: 20px"/>
+        <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end"
+                     placeholder="璇烽�夋嫨閰嶉�佹棩鏈�" style="width: 240px;margin-left: 20px">
         </Date-picker>
-        <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable>
+        <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable
+                placeholder="璇烽�夋嫨閰嶉�佺姸鎬�">
           <Option v-for="item in cityList" :value="item.value" :key="item">{{ item.label }}</Option>
         </Select>
-        <Button @click="init2" icon="md-refresh">鏌ヨ</Button>
+        <Button @click="init2" icon="md-search" style="margin-left: 20px">鏌ヨ</Button>
       </Row>
       <Table
-        :loading="loading"
-        border
-        :columns="columns"
-        :data="data"
-        ref="table"
-      ></Table>
+          :loading="loading"
+          border
+          :columns="columns"
+          :data="data"
+          ref="table"
+      >
+        <template #img="{ row, index }">
+          <div v-for="(fit,index) in getImg(row.img)" :key="index">
+            <img
+                :src="fit"
+                alt="鏆傛棤鍥剧墖"
+                style="width: 100px;height: 100px"
+                @click="handleImageClick"/>
+          </div>
+        </template>
+      </Table>
       <Row type="flex" justify="end" class="page">
         <Page
-          :current="searchForm.pageNumber"
-          :total="total"
-          :page-size="searchForm.pageSize"
-          @on-change="changePage"
-          @on-page-size-change="changePageSize"
-          :page-size-opts="[10, 20, 50]"
-          size="small"
-          show-total
-          show-elevator
-          show-sizer
+            :current="searchForm.pageNumber"
+            :total="total"
+            :page-size="searchForm.pageSize"
+            @on-change="changePage"
+            @on-page-size-change="changePageSize"
+            :page-size-opts="[10, 20, 50]"
+            size="small"
+            show-total
+            show-elevator
+            show-sizer
         ></Page>
       </Row>
     </Card>
@@ -47,16 +61,19 @@
 import {
   findPageOrderTask2,
 } from "@/api/open";
+
+
 export default {
   name: "car-manage",
   data() {
     return {
+      previewModal: false,
       maxHeight: 510,
       openTip: true,
       openLevel: "0",
       loading: true,
       modalTitle: "",
-      modalVisible:false,
+      modalVisible: false,
       searchForm: {
         pageNumber: 1, // 褰撳墠椤垫暟
         pageSize: 10, // 椤甸潰澶у皬
@@ -68,6 +85,8 @@
         pageSize: 10, // 椤甸潰澶у皬
         sort: "sendDate", // 榛樿鎺掑簭瀛楁
         order: "desc", // 榛樿鎺掑簭鏂瑰紡
+        customerName: '',
+        sendDate: ''
       },
       submitLoading: false,
       selectList: [],
@@ -85,7 +104,7 @@
         {
           title: "鍟嗘埛鍚嶇О",
           key: "customerName",
-          ellipsis:true,
+          ellipsis: true,
         },
         {
           title: "閫佽揣鏉℃暟",
@@ -126,7 +145,7 @@
                   },
                 }),
               ]);
-            }else{
+            } else {
               return h("div", [
                 h("Badge", {
                   props: {
@@ -142,25 +161,33 @@
           title: "寮傚父绛炬敹鍘熷洜",
           key: "remarks",
           width: 150,
-          ellipsis:true,
+          ellipsis: true,
         },
         {
-          title: "绛炬敹鏂瑰紡",
-          key: "status",
-          width: 150,
-          render: (h, params) => {
-            if (params.row.status == 1) {
-              return h("div", [
-                h("Badge", {
-                  props: {
-                    status: "success",
-                    text: "鎸囩汗",
-                  },
-                }),
-              ]);
-            }
-          },
-        },
+          title: '绛炬敹鍥剧墖',
+          align: "center",
+          width: 200,
+          slot: "img",
+          // render: (h, params) => {
+          //
+          //   return h('div', {
+          //     attrs: {
+          //       style: 'width: 100px;height: 100px;'
+          //     }
+          //   }, [
+          //     h('img', {
+          //       attrs: {
+          //         src: params.row.img || null,
+          //         style: 'width: 100px;height: 100px;'
+          //       },
+          //       props: {
+          //         type: 'primary',
+          //         size: 'large'
+          //       }
+          //     })
+          //   ])
+          // }
+        }
       ],
       data: [],
       total: 0,
@@ -181,24 +208,47 @@
     };
   },
   methods: {
+    handleImageClick(e) {
+      console.log(e.target.src);
+    },
+    getImg(html) {
+      let newHtml = [];
+      if (html.indexOf('http') === -1) {
+        if (typeof html == 'string' && html.indexOf(',') !== -1) {
+          newHtml = html.split(',').slice(0, 2);
+          return newHtml;
+        }
+        newHtml.push(html);
+        return newHtml;
+      } else {
+        if (typeof html == 'string' && html.indexOf(',') !== -1) {
+          newHtml = html.split(',').slice(0, 2).map(v => '/xboot' + v.split('/xboot')[1])
+          return newHtml;
+        }
+        let result = '/xboot' + html.split('/xboot')[1]
+        newHtml.push(result);
+        return newHtml;
+      }
+    },
+
     init() {
       this.getDataList();
     },
     init2() {
       this.getDataList2();
     },
-    time1(e){
+    time1(e) {
       this.searchForm.sendDate = e;
-      this.getDataList();
+      this.searchForm2.sendDate = e;
     },
     changePage(v) {
-      this.searchForm.pageNumber = v;
-      this.getDataList();
+      this.searchForm2.pageNumber = v;
+      this.getDataList2();
       this.clearSelectAll();
     },
     changePageSize(v) {
-      this.searchForm.pageSize = v;
-      this.getDataList();
+      this.searchForm2.pageSize = v;
+      this.getDataList2();
     },
     getDataList() {
       this.loading = true;

--
Gitblit v1.9.1