管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-05-11 0f03522d5a541c26875c1279ba5b18ef59e933fe
src/views/maintenance/userManagement.vue
@@ -1,20 +1,15 @@
<template>
  <div class="userInfo_box">
    <My-bread :list="[
    <My-bread
      :list="[
        `${$t('operatManage.operatManage')}`,
        `${$t('userManage.userManage')}`,
      ]"></My-bread>
      ]"
    ></My-bread>
    <el-divider />
    <div
      class="inquire subpage_Div"
      ref="container"
    >
      <el-form
        ref="queryForm"
        :model="queryForm"
        :inline="true"
      >
    <div class="inquire subpage_Div" ref="container">
      <el-form ref="queryForm" :model="queryForm" :inline="true">
        <div class="flex_box">
          <div style="margin-right: auto">
            <el-form-item
@@ -27,6 +22,7 @@
                size="small"
                placeholder="请选择"
                style="width: 200px"
                ref="treeSelect"
              >
                <el-option
                  :value="queryForm.depid"
@@ -115,10 +111,7 @@
      </el-form>
    </div>
    <div class="dividing-line"></div>
    <div
      class="table_box"
      :style="styleVar"
    >
    <div class="table_box" :style="styleVar">
      <el-table
        ref="filterTable"
        :data="tableData"
@@ -128,10 +121,7 @@
        height="calc(100% - 45px)"
        @selection-change="handleSelectionChange"
      >
        <el-table-column
          type="selection"
          width="55"
        />
        <el-table-column type="selection" width="55" />
        <el-table-column
          align="center"
          type="index"
@@ -212,23 +202,11 @@
          :label="$t('userManage.userInfoObj.status')"
        >
          <template slot-scope="scope">
            <el-tag
              v-if="scope.row.status == 0"
              type="success"
            >正常</el-tag>
            <el-tag
              v-if="scope.row.status == 1"
              type="info"
            >禁用</el-tag>
            <el-tag
              v-if="scope.row.status == 2"
              type="warning"
            >删除</el-tag>
            <el-tag v-if="scope.row.status == 0" type="success">正常</el-tag>
            <el-tag v-if="scope.row.status == 1" type="info">禁用</el-tag>
            <el-tag v-if="scope.row.status == 2" type="warning">删除</el-tag>
            <el-tag v-if="scope.row.status == 3">申请</el-tag>
            <el-tag
              v-if="scope.row.status == 4"
              type="danger"
            >拒批</el-tag>
            <el-tag v-if="scope.row.status == 4" type="danger">拒批</el-tag>
          </template>
        </el-table-column>
        <!-- <el-table-column
@@ -248,14 +226,12 @@
              plain
              @click="editInfo(scope.row)"
              size="small"
            >{{ $t("common.update") }}</el-button>
              >{{ $t("common.update") }}</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <div
        style="margin-top: 10px;"
        class="pagination_box"
      >
      <div style="margin-top: 10px" class="pagination_box">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
@@ -286,7 +262,6 @@
        ref="editForm"
        :rules="rules"
        style="display: flex"
      >
        <div>
          <el-form-item
@@ -298,12 +273,12 @@
            <el-input
              v-model="editForm.uid"
              autocomplete="off"
               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.uid')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.uid')
                "
            ></el-input>
            <div
              class="isNewUser"
              v-if="isNewUser"
            >
              <div class="isNewUser" v-if="isNewUser">
              <img src="../../assets/img/success.png" />
              {{ $t("userManage.userInfoObj.uid") }}
            </div>
@@ -317,7 +292,6 @@
              v-model="editForm.uid"
              autocomplete="off"
              disabled
            ></el-input>
          </el-form-item>
          <!-- <el-form-item
@@ -367,7 +341,10 @@
            <el-input
              v-model="editForm.uname"
              autocomplete="off"
               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.username')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.username')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -379,7 +356,10 @@
              :popper-append-to-body="false"
              v-model="editForm.sex"
              clearable
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('userManage.userInfoObj.sex')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetree') +
                  $t('userManage.userInfoObj.sex')
                "
            >
              <el-option
                v-for="item in sexOpt"
@@ -398,7 +378,10 @@
            <el-input
              v-model="editForm.natives"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.nativePlace')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.nativePlace')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -409,9 +392,11 @@
            <el-select
              :popper-append-to-body="false"
              v-model="editForm.depid"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('userManage.userInfoObj.depName')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetree') +
                  $t('userManage.userInfoObj.depName')
                "
              @focus="setOptionWidth"
            >
              <el-option
                :value="editForm.depid"
@@ -454,7 +439,10 @@
            <el-input
              v-model="editForm.idcard"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.identityCard')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.identityCard')
                "
            ></el-input>
          </el-form-item>
        </div>
@@ -467,7 +455,10 @@
            <el-input
              v-model="editForm.job"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.job')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.job')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -478,7 +469,10 @@
            <el-input
              v-model="editForm.edu"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.edu')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.edu')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -489,7 +483,10 @@
            <el-input
              v-model="editForm.addr"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.addr')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.addr')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -500,7 +497,10 @@
            <el-input
              v-model="editForm.email"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.email')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.email')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -511,7 +511,10 @@
            <el-input
              v-model="editForm.contact"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.contact')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.contact')
                "
            ></el-input>
          </el-form-item>
          <el-form-item
@@ -523,7 +526,10 @@
              :popper-append-to-body="false"
              v-model="editForm.status"
              clearable
             :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('userManage.userInfoObj.status')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetree') +
                  $t('userManage.userInfoObj.status')
                "
            >
              <el-option
                v-for="item in statusOpt"
@@ -542,22 +548,17 @@
            <el-input
              v-model="editForm.bak"
              autocomplete="off"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.userInfoObj.remarks')"
                :placeholder="
                  $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
                  $t('userManage.userInfoObj.remarks')
                "
            ></el-input>
          </el-form-item>
        </div>
      </el-form>
       </div>
      <div
        v-if="behavior == '修改信息'"
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          size="small"
          type="info"
          @click="cancelEdit()"
        >{{
      <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer">
        <el-button size="small" type="info" @click="cancelEdit()">{{
          $t("common.reset")
        }}</el-button>
        <el-button
@@ -565,18 +566,11 @@
          type="primary"
          @click="sendEdit('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
        >{{ $t("common.submit") }}</el-button>
      </div>
      <div
        v-else
        slot="footer"
        class="dialog-footer"
          >{{ $t("common.submit") }}</el-button
      >
        <el-button
          size="small"
          type="info"
          @click="cancelAdd('editForm')"
        >{{
      </div>
      <div v-else slot="footer" class="dialog-footer">
        <el-button size="small" type="info" @click="cancelAdd('editForm')">{{
          $t("common.reset")
        }}</el-button>
        <el-button
@@ -584,7 +578,8 @@
          type="primary"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
        >{{ $t("common.submit") }}</el-button>
          >{{ $t("common.submit") }}</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
@@ -593,7 +588,6 @@
      :before-close="handleClose"
      :close-on-click-modal="false"
    >
      <el-form
        :model="pwdForm"
        ref="pwdForm"
@@ -611,7 +605,10 @@
            autocomplete="off"
            show-password
            style="width:85%"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('common.AdminPassword')"
            :placeholder="
              $t('shuJuGuanLi.shuJuJianSuo.valuetwo') +
              $t('common.AdminPassword')
            "
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -625,7 +622,9 @@
            autocomplete="off"
            show-password
            style="width:85%"
             :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('common.NPassword')"
            :placeholder="
              $t('shuJuGuanLi.shuJuJianSuo.valuetwo') + $t('common.NPassword')
            "
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -639,20 +638,15 @@
            autocomplete="off"
            show-password
            style="width:85%"
             :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('common.SPassword')"
            :placeholder="
              $t('shuJuGuanLi.shuJuJianSuo.valuetwo') + $t('common.SPassword')
            "
          ></el-input>
        </el-form-item>
      </el-form>
      <div
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          size="small"
          type="info"
          @click="cancelReset - 'pwdForm'"
        >{{
      <div slot="footer" class="dialog-footer">
        <el-button size="small" type="info" @click="cancelReset - 'pwdForm'">{{
          $t("common.reset")
        }}</el-button>
        <el-button
@@ -660,7 +654,8 @@
          type="primary"
          @click="sendReset('pwdForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
        >{{ $t("common.submit") }}</el-button>
          >{{ $t("common.submit") }}</el-button
        >
      </div>
    </el-dialog>
  </div>
@@ -920,9 +915,14 @@
      tableHeight: 0,
      timer: 0,
      styleVar: {
        "height": "calc(100% - 109px)",
        height: "calc(100% - 109px)",
      },
    };
  },
  watch: {
    "queryForm.depName"() {
      this.$refs.treeSelect.visible = false;
    },
  },
  beforeDestroy() {
    this.timer && clearTimeout(this.timer);
@@ -1116,8 +1116,6 @@
    },
    //重置密码
    editPwd() {
      var std = [];
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id);
@@ -1163,8 +1161,7 @@
                  this.resetPwd = false;
                  this.getUserInfo();
                }
                else {
                } else {
                  this.$message({
                    message: res.msg,
                    type: "error",
@@ -1334,7 +1331,7 @@
    this.getUserInfo();
    this.getpublickey();
    window.addEventListener("resize", this.onResize);
    this.calHeight()
    this.calHeight();
  },
  created() {
    var val = this.$store.state.currentPerms;