| | |
| | | <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 ? "关闭提示" : "开启提示" |
| | |
| | | <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> |
| | |
| | | deleteCar, |
| | | getEquipment, |
| | | addEquipment, |
| | | getUser, |
| | | deleteEquipment, |
| | | } from "@/api/open"; |
| | | import util from "@/libs/util.js"; |
| | |
| | | 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, |
| | |
| | | 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", [ |
| | |
| | | depData: [], |
| | | dataType: 0, |
| | | carId: '', |
| | | userList: [], |
| | | editDepartments: [], |
| | | buyYear:'' |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | change1(e){ |
| | | this.buyYear = e; |
| | |
| | | init() { |
| | | this.getDataList(); |
| | | // 获取所有菜单权限树 |
| | | this.getPermList(); |
| | | }, |
| | | renderContent(h, { root, node, data }) { |
| | | let icon = ""; |
| | |
| | | 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; |
| | |
| | | this.equipmentVisible = true; |
| | | }, |
| | | addCar() { |
| | | this.getAllUser(); |
| | | this.modalType = 0; |
| | | this.modalTitle = "添加车辆"; |
| | | this.$refs.carForm.resetFields(); |
| | |
| | | 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) { |