管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-03-03 b6c8e7c61f0270598ba7fdbc44f79512e010d0fe
src/views/maintenance/tokentool.vue
@@ -17,17 +17,19 @@
            >
              <el-input
                style="width: 200px"
                size="small"
                v-model="ruleForm.name"
                :placeholder="$t('common.pleaseInput')"
                :placeholder="$t('operatManage.tokentoolObj.tokenHolder')"
              />
            </el-form-item>
            <el-form-item :label="$t('operatManage.tokentoolObj.tokenStatus')">
              <el-select
                style="width: 200px"
                size="small"
                :popper-append-to-body="false"
                v-model="ruleForm.value"
                :placeholder="$t('common.choose')"
                :placeholder="$t('operatManage.tokentoolObj.tokenStatusHolder')"
              >
                <el-option
                  value="0"
@@ -43,6 +45,13 @@
          <div>
            <!-- 查询 清空 -->
            <el-form-item>
              <el-button
                  icon="el-icon-search"
                  size="small"
                  type="primary"
                  @click="onSubmit"
              >{{ $t("common.iquery") }}</el-button
              >
              <el-button
                v-if="menuStatus.insert"
                @click="InsertFormdialog = true"
@@ -60,13 +69,6 @@
                >{{ $t("common.delete") }}</el-button
              >
              <el-button
                icon="el-icon-search"
                size="small"
                type="primary"
                @click="onSubmit"
                >{{ $t("common.iquery") }}</el-button
              >
              <el-button
                icon="el-icon-delete"
                type="info"
                size="small"
@@ -78,39 +80,40 @@
        </div>
      </el-form>
    </div>
    <div class="dividing-line"></div>
    <div class="table_box" :style="styleVar">
      <el-table
        ref="filterTable"
        :data="tableData"
        style="width: 100%"
        height="calc(100% - 57px)"
        border
        height="calc(100% - 45px)"
      >
        <el-table-column type="selection" width="55" />
        <el-table-column
          width="70"
          type="index"
          :label="$t('operatManage.tokentoolObj.index')"
        />
        <el-table-column
          prop="token"
          :label="$t('operatManage.tokentoolObj.token')"
        />
        <el-table-column
          prop="duration"
          width="120"
          :label="$t('operatManage.tokentoolObj.duration')"
        />
        <el-table-column
          prop="expire"
          :label="$t('operatManage.tokentoolObj.expire')"
          :formatter="formatTime"
        />
        <el-table-column
          prop="type"
          :label="$t('operatManage.tokentoolObj.type')"
        >
          <template slot-scope="scope">
@@ -120,28 +123,28 @@
        </el-table-column>
        <el-table-column
          prop="ip"
          :label="$t('operatManage.tokentoolObj.ip')"
        />
        <el-table-column
          prop="createUser"
          :label="$t('operatManage.tokentoolObj.createUser')"
        />
        <el-table-column
          prop="createTime"
          :label="$t('operatManage.tokentoolObj.createTime')"
          :formatter="formatTime"
        />
        <el-table-column
          prop="updateUser"
          :label="$t('operatManage.tokentoolObj.updateUser')"
        />
        <el-table-column
          prop="updateTime"
          :label="$t('operatManage.tokentoolObj.updateTime')"
          :formatter="formatTime"
        />
@@ -149,7 +152,7 @@
          fixed="right"
          :label="$t('operatManage.tokentoolObj.operation')"
          width="220"
        >
          <template slot-scope="scope">
            <el-button type="danger" size="small" plain>{{
@@ -169,7 +172,7 @@
          </template>
        </el-table-column>
      </el-table>
      <div style="margin-top: 25px">
      <div style="margin-top: 10px">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
@@ -186,8 +189,8 @@
    <!-- 新增弹窗 -->
    <el-dialog
      :title="$t('operatManage.tokentoolObj.addToken')"
     top="2vh"
      :visible.sync="InsertFormdialog"
      :before-close="handleClose"
    >
        <div style="height: 500px; overflow: auto">
      <el-form ref="formData1" :model="insertform" label-position="top">
@@ -255,8 +258,8 @@
    <!-- 修改弹窗 -->
    <el-dialog
      :title="$t('operatManage.tokentoolObj.editToken')"
      top="2vh"
      :visible.sync="EditFormdialog"
      :before-close="handleCloseEdit"
    >
     <div style="height: 500px; overflow: auto">
      <el-form ref="formData1" :model="insertform" label-position="top">
@@ -399,7 +402,7 @@
      this.$nextTick(() => {
        const rect = this.$refs.container.getBoundingClientRect();
        this.tableHeight = `${rect.height + 97}px`;
        this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`;
        this.styleVar["height"] = `calc(100% - ${rect.height + 30}px)`;
      });
    },
    showPermsMenu(res) {
@@ -462,8 +465,13 @@
      // }
    },
    editFromDataClose() {
      this.EditFormdialog = false;
      this.upform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.EditFormdialog = false;
          this.upform = {};
          this.getRoleTabelData();
        })
        .catch((_) => { });
    },
    async editFromData() {
      this.upform.type = parseInt(this.upform.edit);
@@ -499,8 +507,12 @@
      this.multipleSelection = val;
    },
    insertFromDataClose() {
      this.InsertFormdialog = false;
      this.insertform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false;
          this.insertform = {};
        })
        .catch((_) => { });
    },
    async insertFromData() {
      if (
@@ -642,29 +654,44 @@
      }
      return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss");
    },
    handleClose() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false
        })
        .catch((_) => { });
    },
    handleCloseEdit() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.EditFormdialog = false
          this.getRoleTabelData();
        })
        .catch((_) => { });
    },
  },
};
</script>
<style lang="less" scoped>
//@import url(); 引入公共css类
.tokentool_box {
  height: 98%;
  width: 98%;
  padding: 1%;
  padding: 0.5% 1%;
  .el-input {
    width: 300px;
  }
  .inquire {
    padding: 8px;
    margin-top: 20px;
    padding: 0 8px;
    //margin-top: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    //margin-bottom: 20px;
    .el-form-item {
      margin: 5px;
    }