1
lkk
8 天以前 41710058c166ba40e6cc8b7e3d1f2f18925ef937
src/views/system/user/index.vue
@@ -13,7 +13,7 @@
            style="margin-bottom: 15px"
          />
        </div>
        <div class="head-container">
        <!-- <div class="head-container">
          <el-tree
            :data="deptOptions"
            :props="defaultProps"
@@ -26,6 +26,21 @@
            highlight-current
            @node-click="handleNodeClick"
          />
        </div> -->
        <div class="scrollable-container">
          <div class="content">
            <el-tree
              :data="deptOptions"
              :props="defaultProps"
              :expand-on-click-node="false"
              :filter-node-method="filterNode"
              ref="tree"
              node-key="id"
              :default-expanded-keys="treeId"
              highlight-current
              @node-click="handleNodeClick"
            />
          </div>
        </div>
      </el-col>
@@ -359,7 +374,7 @@
                  icon="el-icon-d-arrow-right"
                  title="更多"
                ></el-button>
                <el-dropdown-menu slot="dropdown" :append-to-body="false">
                <el-dropdown-menu slot="dropdown" :append-to-body="true">
                  <el-dropdown-item
                    command="handleResetPwd"
                    icon="el-icon-key"
@@ -372,7 +387,6 @@
                    v-hasPermi="['system:user:edit']"
                    >分配角色</el-dropdown-item
                  >
                </el-dropdown-menu>
              </el-dropdown>
            </template>
@@ -523,7 +537,7 @@
          <el-form-item label="所在医院" prop="hospId">
            <el-select
            v-if="hospList.length > 0"
              v-if="hospList.length > 0"
              v-model="form.hospId"
              placeholder="请选择所在医院"
              clearable
@@ -544,7 +558,7 @@
            <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属科室"
              style="width: 200px" /> -->
            <el-select
            v-if="DepartmentList.length > 0"
              v-if="DepartmentList.length > 0"
              v-model="form.deptId"
              placeholder="请选择归属科室"
              clearable
@@ -1443,6 +1457,7 @@
      hospList: [],
      activeNames: ["1"],
      treeId: [],
      selectedDeptId: null,
      // 遮罩层
      loading: true,
      // 选中数组
@@ -1627,7 +1642,7 @@
    //   this.initPassword = response.msg;
    // });
  },
  methods: {
    handleChange(val) {},
    /** 查询用户列表 */
@@ -1696,6 +1711,7 @@
    // 节点单击事件
    handleNodeClick(data) {
      this.queryParams.deptId = data.id;
      this.selectedDeptId = data.id;
      this.handleQuery();
    },
    handlePackage() {
@@ -1730,10 +1746,11 @@
    cancel() {
      this.open = false;
      this.reset();
      this.$tab.refreshPage();
      // this.$tab.refreshPage();
    },
    handleClose() {
      this.$tab.refreshPage();
      this.cancel();
      // this.$tab.refreshPage();
    },
    // 表单重置
    reset() {
@@ -1785,7 +1802,7 @@
    // 更多操作触发
    handleCommand(command, row) {
      console.log('Command triggered:', command);
      console.log("Command triggered:", command);
      switch (command) {
        case "handleResetPwd":
@@ -1811,6 +1828,9 @@
          this.sendhospName();
        }
      });
      if (this.selectedDeptId) {
        this.form.deptId = this.selectedDeptId;
      }
      // getUser().then((response) => {
      //   this.postOptions = response.posts;
      //   this.roleOptions = response.roles;
@@ -1826,7 +1846,7 @@
      getDeptListByDictHospId(data).then((res) => {
        console.log(res, 123456);
        this.DepartmentList = res.data;
        this.form.deptId = String(this.form.deptId);
        // this.form.deptId = String(this.form.deptId);
      });
    },
@@ -2011,6 +2031,17 @@
  line-height: 36px;
  width: 200px;
}
.scrollable-container {
  width: 200px; /* 设置容器的宽度 */
  height: 629px; /* 设置容器的高度 */
  overflow: auto; /* 允许内容溢出时显示滚动条 */
  border: 1px solid #ccc; /* 可选:添加边框以更好地显示容器 */
  position: relative; /* 可选:使容器内的绝对定位元素能够正确显示 */
}
.content {
  width: 600px; /* 设置内容的宽度,以触发水平滚动条 */
  height: 1000px; /* 设置内容的高度,以触发垂直滚动条 */
}
.pag {
  width: 100%;