管道基础大数据平台系统开发-【前端】-新系統界面
1
Surpriseplus
2022-11-18 462782f4b2ce653e84260ca586a58c8627c4ac9c
src/views/maintenance/userManagement.vue
@@ -35,15 +35,15 @@
        <el-form-item>
          <el-button
            size="small"
            type="primary"
            @click="queryInfo()"
            icon="el-icon-search"
            style="background: #1890ff"
            style="background: #409eff; border: 1px solid #409eff; color: white"
            >{{ $t('operatManage.ELM.search') }}
          </el-button>
        </el-form-item>
        <el-form-item>
          <el-button
            type="info"
            size="small"
            @click="resetInfo('queryForm')"
            icon="el-icon-refresh"
@@ -74,10 +74,9 @@
        </el-form-item>
        <el-form-item v-show="setbatchFlag">
          <el-button
            type="primary"
            size="small"
            @click="editPwd"
            style="background: #1890ff"
            type="warning"
            icon="el-icon-unlock"
            >{{ $t('common.changepassWord') }}
          </el-button>
@@ -203,6 +202,7 @@
            <!-- <el-button type="primary" size="small">修改</el-button> -->
            <el-button
              type="warning"
              plain
              @click="editInfo(scope.row)"
              size="mini"
              >{{ $t('common.edit') }}</el-button
@@ -226,7 +226,11 @@
    <el-dialog
      width="910px"
      top="15vh"
      :title="behavior"
      :title="
        behavior == '新增用户'
          ? `${$t('common.append')}`
          : `${$t('common.update')}`
      "
      :visible.sync="dialogFormVisible"
      :before-close="handleClose"
    >
@@ -260,7 +264,7 @@
              disabled
            ></el-input>
          </el-form-item>
          <el-form-item
          <!-- <el-form-item
            v-if="behavior == '修改信息'"
            prop="oldPwd"
            :label="$t('userManage.userInfoObj.origpassword')"
@@ -272,9 +276,10 @@
              autocomplete="off"
              show-password
            ></el-input>
          </el-form-item>
          </el-form-item> -->
          <el-form-item
            prop="pwd"
            v-if="behavior == '新增用户'"
            :label="$t('userManage.userInfoObj.pwd')"
            :label-width="formLabelWidth"
          >
@@ -287,6 +292,7 @@
          </el-form-item>
          <el-form-item
            prop="checkPass"
            v-if="behavior == '新增用户'"
            :label="$t('userManage.userInfoObj.confirmPassword')"
            :label-width="formLabelWidth"
          >
@@ -425,24 +431,24 @@
        </div>
      </el-form>
      <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer">
        <el-button size="medium" @click="cancelEdit()">{{
        <el-button size="medium" type="info" @click="cancelEdit()">{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          type="primary"
          style="background: #409eff; border: 1px solid #409eff; color: white"
          @click="sendEdit('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t('common.submit') }}</el-button
        >
      </div>
      <div v-else slot="footer" class="dialog-footer">
        <el-button size="medium" @click="cancelAdd('editForm')">{{
        <el-button size="medium" type="info" @click="cancelAdd('editForm')">{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          type="primary"
          style="background: #409eff; border: 1px solid #409eff; color: white"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t('common.submit') }}</el-button
@@ -452,12 +458,16 @@
    <el-dialog
      width="520px"
      top="30vh"
      title="批量重置密码"
      :title="$t('common.changepassWord')"
      :visible.sync="resetPwd"
      :before-close="handleClose"
    >
      <el-form :model="pwdForm" ref="pwdForm" :rules="rules">
        <el-form-item prop="adminPwd" label="管理员密码" label-width="140px">
        <el-form-item
          prop="adminPwd"
          :label="$t('common.AdminPassword')"
          label-width="140px"
        >
          <el-input
            type="password"
            v-model="pwdForm.adminPwd"
@@ -465,7 +475,11 @@
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item prop="newPwd" label="新密码" label-width="140px">
        <el-form-item
          prop="newPwd"
          :label="$t('common.NPassword')"
          label-width="140px"
        >
          <el-input
            type="password"
            v-model="pwdForm.newPwd"
@@ -473,7 +487,11 @@
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item prop="checkPwd" label="确认密码" label-width="140px">
        <el-form-item
          prop="checkPwd"
          :label="$t('common.SPassword')"
          label-width="140px"
        >
          <el-input
            type="password"
            v-model="pwdForm.checkPwd"
@@ -483,15 +501,15 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="medium" @click="cancelReset - 'pwdForm'"
          >重置</el-button
        >
        <el-button size="medium" type="info" @click="cancelReset - 'pwdForm'">{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          type="primary"
          style="background: #409eff; border: 1px solid #409eff; color: white"
          @click="sendReset('pwdForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >提交</el-button
          >{{ $t('common.submit') }}</el-button
        >
      </div>
    </el-dialog>
@@ -954,10 +972,11 @@
    editInfo(row) {
      delete row.updateTime;
      delete row.updateUser;
      row.pwd = '';
      // row.pwd = '';
      this.initialForm = JSON.stringify(row);
      this.behavior = '修改信息';
      this.editForm = JSON.parse(JSON.stringify(row));
      this.dialogFormVisible = true;
    },
    //编辑选择单位
@@ -1002,13 +1021,17 @@
    sendEdit(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          encrypt.setPublicKey(this.$store.state.key);
          this.editForm.uid = encrypt.encrypt(this.editForm.uid);
          this.editForm.salt = encrypt.encrypt(this.editForm.pwd);
          this.editForm.pwd = encrypt.encrypt(this.editForm.oldPwd);
          this.fullscreenLoading = true;
          delete this.editForm.checkPass;
          delete this.editForm.oldPwd;
          // encrypt.setPublicKey(this.$store.state.key);
          // this.editForm.uid = this.editForm.uid;
          // this.editForm.salt = null;
          // this.editForm.pwd = null;
          // this.editForm.salt = encrypt.encrypt(this.editForm.pwd);
          // // this.editForm.pwd = encrypt.encrypt(this.editForm.oldPwd);
          // this.fullscreenLoading = true;
          // delete this.editForm.checkPass;
          // delete this.editForm.oldPwd;
          // this.editForm.salt = this.editForm.pwd;
          debugger;
          updateUser(this.editForm)
            .then((res) => {
              setTimeout(() => {
@@ -1241,7 +1264,7 @@
      color: white;
    }
    /deep/.el-pager li.active {
      color: #1890ff;
      color: #409eff;
    }
    /deep/.el-pager li {
      color: white;