linwe
2023-12-18 af37ee88ef6d9647fa2b368271dcf53f656ea4fa
src/views/system/user.vue
@@ -505,23 +505,23 @@
                    trigger: "click"
                  }]
                },
                // {
                //   label: "所属部门",
                //   prop: "deptId",
                //   type: "tree",
                //   multiple: true,
                //   dicData: [],
                //   props: {
                //     label: "title"
                //   },
                //   checkStrictly: true,
                //   slot: true,
                //   rules: [{
                //     required: true,
                //     message: "请选择所属部门",
                //     trigger: "click"
                //   }]
                // },
                {
                  label: "所属部门",
                  prop: "deptId",
                  type: "tree",
                  // multiple: true,
                  dicData: [],
                  props: {
                    label: "title"
                  },
                  checkStrictly: true,
                  slot: true,
                  rules: [{
                    required: true,
                    message: "请选择所属部门",
                    trigger: "click"
                  }]
                },
                // {
                //   label: "所属岗位",
                //   prop: "postId",
@@ -713,6 +713,9 @@
        this.initData(website.tenantId);
      }
    },
    created(){
      this.initData(website.tenantId);
    },
    methods: {
      nodeClick(data) {
        this.treeDeptId = data.id;
@@ -728,10 +731,10 @@
          const column = this.findObject(this.option.group, "deptId");
          column.dicData = res.data.data;
        });
        getPostList(tenantId).then(res => {
          const column = this.findObject(this.option.group, "postId");
          column.dicData = res.data.data;
        });
        // getPostList(tenantId).then(res => {
        //   const column = this.findObject(this.option.group, "postId");
        //   column.dicData = res.data.data;
        // });
      },
      submitRole() {
        const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
@@ -747,8 +750,7 @@
      rowSave(row, done, loading) {
        row['tenantId'] = "000000"
        row['userType'] = 1
        row['deptId'] = '1123598813738675201'
        // row.deptId = func.join(row.deptId);
        row.deptId = func.join(row.deptId);
        row.roleId = func.join(row.roleId);
        // row.postId = func.join(row.postId);
        add(row).then(() => {
@@ -766,9 +768,8 @@
      },
      rowUpdate(row, index, done, loading) {
        row['tenantId'] = "000000"
        row['deptId'] = '1123598813738675201'
        row['userType'] = 1
        // row.deptId = func.join(row.deptId);
        row.deptId = func.join(row.deptId);
        row.roleId = func.join(row.roleId);
        // row.postId = func.join(row.postId);
        update(row).then(() => {