WXL (wul)
5 小时以前 ae8535b861f9177508d9e5493e0fe9e47978c915
src/views/system/user/index.vue
@@ -125,7 +125,7 @@
              size="mini"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['system:user:edit']"
              >修改</el-button
            >
          </el-col>
@@ -253,7 +253,7 @@
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['system:user:edit']"
                >修改</el-button
              >
              <el-button
@@ -282,7 +282,7 @@
                  <el-dropdown-item
                    command="handleAuthRole"
                    icon="el-icon-circle-check"
                    v-hasPermi="['system:user:edit']"
                    >分配角色</el-dropdown-item
                  >
                </el-dropdown-menu>
@@ -336,7 +336,7 @@
              style="width: 478px"
              v-model="form.deptCodes"
              @remove-tag="removehpsp"
              :options="deptOptions"
              :options="deptOptionsks"
              :props="props"
              filterable
              clearable
@@ -352,7 +352,7 @@
              style="width: 478px"
              @remove-tag="removehpsp"
              v-model="form.wardCodes"
              :options="deptOptions"
              :options="deptOptionsbq"
              :props="props"
              filterable
              clearable
@@ -579,7 +579,8 @@
      // 弹出层标题
      title: "",
      // 部门树选项
      deptOptions: undefined,
      deptOptionsks: undefined,
      deptOptionsbq: undefined,
      // 是否显示弹出层
      open: false,
      // 部门名称
@@ -718,8 +719,12 @@
    /** 查询部门下拉树结构 */
    getDeptTree() {
      // 科室列表
      deptTreeSelect().then((response) => {
        this.deptOptions = response.data;
      deptTreeSelect(1).then((response) => {
        this.deptOptionsks = response.data;
      });
      // 病区列表
      deptTreeSelect(2).then((response) => {
        this.deptOptionsbq = response.data;
      });
      // 院区列表
      //  deptTreeSelect().then((response) => {
@@ -842,7 +847,6 @@
        }
        console.log(this.form.wardCodes, "wardCodes");
        console.log(this.form.deptCodes, "deptCodes");
        this.postOptions = response.posts;
        this.roleOptions = response.roles;
        this.$set(this.form, "postIds", response.postIds);
@@ -904,7 +908,7 @@
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.adduserdept();
              // this.adduserdept();
            });
          } else {
            addUser(this.form).then((response) => {
@@ -913,7 +917,7 @@
              this.form.userId = response.data;
              console.log("开始加部门");
              this.adduserdept();
              // this.adduserdept();
            });
          }
        }
@@ -923,7 +927,7 @@
    adduserdept() {
      if (this.form.wardCodes[0]) {
        this.form.wardCodes.forEach((dept) => {
          const containsId8 = null;
          let containsId8 = null;
          if (this.belongWards) {
            containsId8 = this.belongWards.some(
              (item) => item.deptCode == dept
@@ -944,7 +948,7 @@
      }
      if (this.form.deptCodes[0]) {
        this.form.deptCodes.forEach((dept) => {
          const containsId8 = null;
          let containsId8 = null;
          if (this.belongDepts) {
            containsId8 = this.belongDepts.some(
              (item) => item.deptCode == dept