zhangzeli
2021-11-08 97e678e54cf2bf66aae0ffd8119da6b01be2aaec
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";
@@ -572,10 +582,12 @@
      depData: [],
      dataType: 0,
      carId: '',
      userList: [],
      editDepartments: [],
      buyYear:''
    };
  },
  methods: {
    change1(e){
      this.buyYear = e;
@@ -583,7 +595,6 @@
    init() {
      this.getDataList();
      // 获取所有菜单权限树
      this.getPermList();
    },
    renderContent(h, { root, node, data }) {
      let icon = "";
@@ -639,6 +650,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 +798,7 @@
      this.equipmentVisible = true;
    },
    addCar() {
      this.getAllUser();
      this.modalType = 0;
      this.modalTitle = "添加车辆";
      this.$refs.carForm.resetFields();
@@ -797,7 +816,7 @@
    edit(v) {
      this.buyYear = v.buyYear;
      this.modalType = 1;
      this.modalTitle = "编辑角色";
      this.modalTitle = "编辑";
      this.$refs.carForm.resetFields();
      // 转换null为""
      for (let attr in v) {