Administrator
2021-11-09 8556a31b17bc2bdb12699284001b7d1de11049fb
src/views/dispatch/dispatchChildoperable.vue
@@ -39,7 +39,6 @@
    return {
      deptCategory: "",
      deptId: "",
      loading1: true, //派遣记录
      selectionList1: [],
      page1: {
@@ -130,9 +129,8 @@
            type: "tree",
            width: 70,
            labelWidth: 120,
            searchSpan: 3,
            search: true,
            hide: true,
            defaultExpandAll:true,
            // props: {
            //   label: "realName",
            //   value: "id",
@@ -158,8 +156,10 @@
          {
            label: "保安员",
            prop: "securityName",
            type: "tree",
            // type: "tree",
            width: 70,
            searchSpan: 4,
            search: true,
            labelWidth: 120,
            addDisplay: false,
            editDisplay: false,
@@ -169,13 +169,13 @@
            //   value: "id",
            // },
            // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
            rules: [
              {
                required: true,
                message: "请选择保安",
                trigger: "blur",
              },
            ],
            // rules: [
            //   {
            //     required: true,
            //     message: "请选择保安",
            //     trigger: "blur",
            //   },
            // ],
          },
          {
@@ -458,12 +458,18 @@
      this.onLoad1(this.page1, this.query1);
    },
    beforeOpen(done, type) {
    beforeOpen(done, type,row) {
      this.initFlag = true;
      if(type=="edit"){
        // alert(1);
        console.log(row,123);
        const userColumn = this.findObject(this.option1.column, "userIds");
        userColumn.multiple = false;
        userColumn.dicUrl = "/api/blade-user/security-dispatcher-tree?deptId="+this.userInfo.dept_id+"&id="+this.form.userIds+"&realName="+this.form.securityName;
      }
      if(type=="add"){
        const userColumn = this.findObject(this.option1.column, "userIds");
        userColumn.multiple = true;
        userColumn.dicUrl = "/api/blade-user/security-dispatcher-tree?deptId="+this.userInfo.dept_id;
      }
      done();
    },