From 7ebd84a4ad1f6561f450d5e92d987d22924d59ec Mon Sep 17 00:00:00 2001
From: zhangzeli <123456>
Date: 星期二, 04 一月 2022 13:35:12 +0800
Subject: [PATCH] 回复

---
 src/views/your/car-manage/carManage.vue |   80 +++++++++++++++++++++++++--------------
 1 files changed, 51 insertions(+), 29 deletions(-)

diff --git a/src/views/your/car-manage/carManage.vue b/src/views/your/car-manage/carManage.vue
index 0af821c..d6ddb11 100644
--- a/src/views/your/car-manage/carManage.vue
+++ b/src/views/your/car-manage/carManage.vue
@@ -8,7 +8,6 @@
     <Card>
       <Row class="operation">
         <Button @click="addCar" type="primary" icon="md-add">娣诲姞杞﹁締</Button>
-        <Button @click="delAll" icon="md-trash">鎵归噺鍒犻櫎</Button>
         <Button @click="init" icon="md-refresh">鍒锋柊</Button>
         <Button type="dashed" @click="openTip = !openTip">{{
           openTip ? "鍏抽棴鎻愮ず" : "寮�鍚彁绀�"
@@ -83,12 +82,12 @@
         </FormItem>
         <FormItem label="椹鹃┒浜�" prop="userId">
           <Select v-model="carForm.userId" filterable>
-            <Option v-for="item in userList" :value="item.id">{{ item.nickname }}</Option>
+            <Option v-for="item in userList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
           </Select>
         </FormItem>
         <FormItem label="璺熻溅浜�" prop="followUserId">
           <Select v-model="carForm.followUserId" filterable>
-            <Option v-for="item in userList" :value="item.id">{{ item.nickname }}</Option>
+            <Option v-for="item in driverList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
           </Select>
         </FormItem>
       </Form>
@@ -244,6 +243,7 @@
   getEquipment,
   addEquipment,
   getUser,
+  getDriver,
   deleteEquipment,
 } from "@/api/open";
 import util from "@/libs/util.js";
@@ -281,6 +281,9 @@
       carForm: {
         status : 0
       },
+      type: {
+        type : 0
+      },
       equipmentForm: {
         status : 0
       },
@@ -308,29 +311,7 @@
         {
           title: "杞︾墝鍙�",
           key: "carNo",
-          width: 100,
-          sortable: true,
-        },
-        {
-          title: "鍝佺墝",
-          key: "brand",
-          width: 100,
-        },
-        {
-          title: "鍨嬪彿",
-          key: "model",
-          width: 100,
-        },
-        {
-          title: "鎺掗噺",
-          key: "displacement",
-          width: 100,
-          sortable: true,
-        },
-        {
-          title: "璐疆骞翠唤",
-          key: "buyYear",
-          minWidth: 120,
+          width: 110,
           sortable: true,
         },
         {
@@ -368,9 +349,42 @@
           sortable: true,
         },
         {
+          title: "椹鹃┒浜�",
+          key: "nickName",
+          width: 100,
+        },
+        {
+          title: "璺熻溅浜�",
+          key: "followNickName",
+          width: 100,
+        },
+        {
+          title: "鍝佺墝",
+          key: "brand",
+          width: 100,
+        },
+        {
+          title: "鍨嬪彿",
+          key: "model",
+          width: 100,
+        },
+        {
+          title: "鎺掗噺",
+          key: "displacement",
+          width: 100,
+          sortable: true,
+        },
+        {
+          title: "璐疆骞翠唤",
+          key: "buyYear",
+          minWidth: 120,
+          sortable: true,
+        },
+        {
           title: "鎿嶄綔",
           key: "action",
           align: "center",
+          fixed: "right",
           width: 280,
           render: (h, params) => {
             return h("div", [
@@ -582,6 +596,7 @@
       depData: [],
       dataType: 0,
       carId: '',
+      driverList: [],
       userList: [],
       editDepartments: [],
       buyYear:''
@@ -652,9 +667,15 @@
       this.getDataList();
     },
     getAllUser(){
-      getUser().then((res)=>{
+      getDriver(this.type).then((res)=>{
         if (res.success){
           this.userList=res.result;
+        }
+      });
+      this.type.type=1;
+      getDriver(this.type).then((res)=>{
+        if (res.success){
+          this.driverList=res.result;
         }
       });
     },
@@ -725,7 +746,7 @@
               if (res.success) {
                 this.$Message.success("鎿嶄綔鎴愬姛");
                 this.getDataList();
-                this.roleModalVisible = false;
+                this.roleModalVisible = true;
               }
             });
           } else {
@@ -735,7 +756,7 @@
               if (res.success) {
                 this.$Message.success("鎿嶄綔鎴愬姛");
                 this.getDataList();
-                this.roleModalVisible = false;
+                this.roleModalVisible = true;
               }
             });
           }
@@ -814,6 +835,7 @@
       this.addEquipmentVisible = true;
     },
     edit(v) {
+      this.getAllUser();
       this.buyYear = v.buyYear;
       this.modalType = 1;
       this.modalTitle = "缂栬緫";

--
Gitblit v1.9.1