su
su1124
2023-09-14 4b94f114e561e0d53633259a04b3f4f71e293f1f
src/views/system/user/index.vue
@@ -78,7 +78,7 @@
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="userList" border @selection-change="handleSelectionChange"
        <el-table  :data="userList" border @selection-change="handleSelectionChange" v-loading="loading"
          highlight-current-row>
          <el-table-column type="selection" width="50" align="center" fixed="left" />
          <el-table-column label="序号" align="center" key="newID" prop="newID" width="50px" fixed="left" />
@@ -657,9 +657,9 @@
      :visible.sync="dialogVisible1"
      width="30%"
      :before-close="handleClose">
      <el-form>
      <el-form :rules="rules1">
        <span>请输入“{{row.userName}}”的新密码</span>
        <el-form-item>
        <el-form-item prop="password">
          <el-input v-model="password" :type="type" auto-complete="off" placeholder="密码" ref="barcodeMsg">
            <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
            <i slot="suffix" class="icon-style" :class="elIcon" autocomplete="auto" @click="flag = !flag" /></el-input>
@@ -858,6 +858,17 @@
          },
        ],
      },
      rules1: {
        password: [
          { required: true, message: "用户密码不能为空", trigger: "blur" },
          {
            min: 5,
            max: 20,
            message: "用户密码长度必须介于 5 和 20 之间",
            trigger: "blur",
          },
        ],
      },
    };
  },
  watch: {
@@ -877,12 +888,10 @@
  created() {
    this.getList();
    this.getDeptTree();
    this.getlistHosp();
    this.getPostList();
    this.getRoleList();
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
    // this.getRoleList();
    // this.getConfigKey("sys.user.initPassword").then((response) => {
    //   this.initPassword = response.msg;
    // });
  },
  methods: {
    handleChange(val) { },
@@ -898,12 +907,6 @@
              1;
          });
          this.userList = response.rows;
          // for(let key in this.userList){
          //   for(let i = 0; i < this.userList[key].length; i++){
          //     this.userList[key][i]["form"] = key;
          //     this.userInfoList.push(this.userList[key][i])
          //   }
          // }
          this.total = response.total;
          this.loading = false;
        }
@@ -925,11 +928,9 @@
    },
    /** 查询院区信息列表 */
    getlistHosp() {
      this.loading = true;
      listHosp(this.queryParams).then((response) => {
        this.hospList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
@@ -1043,6 +1044,8 @@
      this.reset();
      this.open = true;
      this.title = "用户信息维护";
      this.getPostList();
      this.getlistHosp();
      // getUser().then((response) => {
      //   this.postOptions = response.posts;
      //   this.roleOptions = response.roles;
@@ -1073,6 +1076,8 @@
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.getPostList();
      this.getlistHosp();
      this.reset();
      this.form = row;
      // this.form.userInfo.id = null;