qx
qx
6 天以前 a4d79237c73a1db49649a8d3108eec95a8e67c37
src/views/system/user/index.vue
@@ -1321,7 +1321,7 @@
          </el-collapse>
        </el-form>
        <div slot="footer" class="dialog-footer1">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button :disabled="submit" type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </el-dialog>
@@ -1465,6 +1465,7 @@
      single: true,
      // 非多个禁用
      multiple: true,
      submit: false,
      // 显示搜索条件
      showSearch: true,
      // 总条数
@@ -1610,6 +1611,7 @@
    // 根据名称筛选部门树
    deptName(val) {
      console.log(val);
      this.$refs.tree.filter(val);
    },
    treeId(newVal, oldVal) {
      if (newVal) {
@@ -1797,6 +1799,9 @@
      this.ids = selection.map((item) => item.userId);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
        if (selection.length >= 1) {
        this.queryParams.userName = selection[0].userName
      }
    },
    // 更多操作触发
@@ -1849,18 +1854,20 @@
      });
    },
    handleUp(row) {
       handleUp(row) {
      this.title = "用户信息维护";
      // this.form = row;
      this.open = true;
      this.form = row;
      this.form.hospId = Number(row.hospId);
      // listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
      //   (response) => {
      //     response.rows.forEach((item, index) => {
      //       this.form = item;
      //     });
      //   }
      // );
      this.submit = false
      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
        (response) => {
          response.rows.forEach((item, index) => {
            this.form = item;
          });
        }
      );
    },
    select(val) {
      this.postList.forEach((item) => {
@@ -1876,6 +1883,10 @@
      this.getlistHosp();
      this.reset();
      this.form = row;
      this.form = {
        ...row,
        deptId: row.deptId != null ? String(row.deptId) : null, // 👈 确保为字符串
      };
      if (this.form.hospId) {
        this.sendhospName();
      }
@@ -1884,6 +1895,7 @@
      //   this.forms = this.form.userInfo;
      // }
      this.open = true;
            this.submit = false
      this.title = "用户信息维护";
    },
@@ -1893,9 +1905,11 @@
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (_this.form.userId !== undefined) {
           _this.submit = true
            updateUser(_this.form).then((response) => {
              _this.$modal.msgSuccess("修改成功");
              _this.open = false;
               _this.submit = false
              _this.getList();
            });
          } else {