From 57223eca102ab58ae181c71bf02f84e2f647b233 Mon Sep 17 00:00:00 2001
From: zhangzeli <123456>
Date: 星期五, 07 一月 2022 14:45:40 +0800
Subject: [PATCH] bug

---
 src/views/your/car-manage/carManage.vue |  115 ++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 88 insertions(+), 27 deletions(-)

diff --git a/src/views/your/car-manage/carManage.vue b/src/views/your/car-manage/carManage.vue
index 0ef24a5..5c60506 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 ? "鍏抽棴鎻愮ず" : "寮�鍚彁绀�"
@@ -81,7 +80,19 @@
         <FormItem label="鐗岀収" prop="carNo">
           <Input v-model="carForm.carNo" />
         </FormItem>
-
+        <FormItem label="鍔犳补鍗″彿" prop="addOilCode">
+          <Input v-model="carForm.addOilCode" />
+        </FormItem>
+        <FormItem label="鍙告満" prop="userId">
+          <Select v-model="carForm.userId" filterable>
+            <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 driverList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
+          </Select>
+        </FormItem>
       </Form>
       <div slot="footer">
         <Button type="text" @click="carRole">鍙栨秷</Button>
@@ -234,6 +245,8 @@
   deleteCar,
   getEquipment,
   addEquipment,
+  getUser,
+  getDriver,
   deleteEquipment,
 } from "@/api/open";
 import util from "@/libs/util.js";
@@ -271,6 +284,9 @@
       carForm: {
         status : 0
       },
+      type: {
+        type : 0
+      },
       equipmentForm: {
         status : 0
       },
@@ -298,29 +314,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,
         },
         {
@@ -358,9 +352,56 @@
           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,
+        },
+        {
+          title: "鍔犳补鍗″彿",
+          key: "addOilCode",
+          minWidth: 120,
+          sortable: true,
+          render: (h, params) => {
+            return h("div",params.row.addOilCode=="undefined" ? '':params.row.addOilCode);
+          }
+        },
+        {
+          title: "璐疆骞翠唤",
+          key: "buyYear",
+          minWidth: 120,
+          sortable: true,
+        },
+        {
+          title: "鐧昏鏃ユ湡",
+          key: "createTime",
+          minWidth: 180,
+          sortable: true,
+        },
+        {
           title: "鎿嶄綔",
           key: "action",
           align: "center",
+          fixed: "right",
           width: 280,
           render: (h, params) => {
             return h("div", [
@@ -572,10 +613,13 @@
       depData: [],
       dataType: 0,
       carId: '',
+      driverList: [],
+      userList: [],
       editDepartments: [],
       buyYear:''
     };
   },
+
   methods: {
     change1(e){
       this.buyYear = e;
@@ -583,7 +627,6 @@
     init() {
       this.getDataList();
       // 鑾峰彇鎵�鏈夎彍鍗曟潈闄愭爲
-      this.getPermList();
     },
     renderContent(h, { root, node, data }) {
       let icon = "";
@@ -639,6 +682,22 @@
     changePageSize(v) {
       this.searchForm.pageSize = v;
       this.getDataList();
+    },
+    getAllUser(){
+      getDriver({type:0}).then((res)=>{
+        if (res.success){
+          this.userList=res.result;
+        }
+      });
+      //this.type.type=1;
+      getDriver({type:1}).then((res)=>{
+        if (res.success){
+          this.driverList=res.result;
+        }
+      });
+      this.type.type=0;
+      console.log(this.userList);
+      console.log(this.driverList);
     },
     changeSort(e) {
       this.searchForm.sort = e.key;
@@ -780,6 +839,7 @@
       this.equipmentVisible = true;
     },
     addCar() {
+      this.getAllUser();
       this.modalType = 0;
       this.modalTitle = "娣诲姞杞﹁締";
       this.$refs.carForm.resetFields();
@@ -795,9 +855,10 @@
       this.addEquipmentVisible = true;
     },
     edit(v) {
+      this.getAllUser();
       this.buyYear = v.buyYear;
       this.modalType = 1;
-      this.modalTitle = "缂栬緫瑙掕壊";
+      this.modalTitle = "缂栬緫";
       this.$refs.carForm.resetFields();
       // 杞崲null涓�""
       for (let attr in v) {

--
Gitblit v1.9.1