From b51e256514dae8a13f6691dfd917e6ca031621fe Mon Sep 17 00:00:00 2001 From: zhangzeli <123456> Date: 星期二, 09 十一月 2021 16:10:03 +0800 Subject: [PATCH] 车辆 --- src/views/your/car-manage/carManage.vue | 81 ++++++++++++++++++++++++++++------------ 1 files changed, 56 insertions(+), 25 deletions(-) diff --git a/src/views/your/car-manage/carManage.vue b/src/views/your/car-manage/carManage.vue index 0ef24a5..6df3551 100644 --- a/src/views/your/car-manage/carManage.vue +++ b/src/views/your/car-manage/carManage.vue @@ -81,7 +81,16 @@ <FormItem label="鐗岀収" prop="carNo"> <Input v-model="carForm.carNo" /> </FormItem> - + <FormItem label="椹鹃┒浜�" prop="userId"> + <Select v-model="carForm.userId" filterable> + <Option v-for="item in userList" :value="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> + </Select> + </FormItem> </Form> <div slot="footer"> <Button type="text" @click="carRole">鍙栨秷</Button> @@ -234,6 +243,7 @@ deleteCar, getEquipment, addEquipment, + getUser, deleteEquipment, } from "@/api/open"; import util from "@/libs/util.js"; @@ -302,28 +312,6 @@ sortable: true, }, { - 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: "status", width: 100, @@ -358,9 +346,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", [ @@ -572,10 +593,12 @@ depData: [], dataType: 0, carId: '', + userList: [], editDepartments: [], buyYear:'' }; }, + methods: { change1(e){ this.buyYear = e; @@ -583,7 +606,6 @@ init() { this.getDataList(); // 鑾峰彇鎵�鏈夎彍鍗曟潈闄愭爲 - this.getPermList(); }, renderContent(h, { root, node, data }) { let icon = ""; @@ -639,6 +661,13 @@ changePageSize(v) { this.searchForm.pageSize = v; this.getDataList(); + }, + getAllUser(){ + getUser().then((res)=>{ + if (res.success){ + this.userList=res.result; + } + }); }, changeSort(e) { this.searchForm.sort = e.key; @@ -780,6 +809,7 @@ this.equipmentVisible = true; }, addCar() { + this.getAllUser(); this.modalType = 0; this.modalTitle = "娣诲姞杞﹁締"; this.$refs.carForm.resetFields(); @@ -795,9 +825,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