管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-03-03 b6c8e7c61f0270598ba7fdbc44f79512e010d0fe
src/views/userManage/roleManage.vue
@@ -17,22 +17,14 @@
        <div class="flex_box">
          <div style="margin-right: auto">
            <el-form-item
              :label="$t('userManage.RM.roleName')"
              prop="username"
            >
              <el-input
                v-model="roleForm.username"
                style="width: 200px"
              />
            </el-form-item>
            <el-form-item
              :label="$t('userManage.RM.ownedSystem')"
              prop="ownedSystem"
            >
              <el-select
                :popper-append-to-body="false"
                size="small"
                v-model="roleForm.depValue"
                placeholder="请选择"
                :placeholder="$t('userManage.RM.ownedSystemHolder')"
                style="width: 200px"
              >
                <el-option
@@ -55,24 +47,38 @@
            :placeholder="$t('common.pleaseInput')"
          /> -->
            </el-form-item>
            <el-form-item
                :label="$t('userManage.RM.roleName')"
                prop="username"
            >
              <el-input
                  v-model="roleForm.username"
                  :placeholder="$t('userManage.RM.roleNameHolder')"
                  size="small"
                  style="width: 200px"
              >
                <i slot="suffix" class="el-icon-search" @click="onSubmit"></i>
              </el-input>
            </el-form-item>
          </div>
          <div>
<!--            <el-form-item>-->
<!--              <el-button-->
<!--                size="small"-->
<!--                type="primary"-->
<!--                @click="onSubmit('ruleForm')"-->
<!--              ><i class="el-icon-search"></i> &nbsp;{{-->
<!--                  $t("userManage.RM.query")-->
<!--                }}</el-button>-->
<!--            </el-form-item>-->
            <el-form-item>
              <el-button
                type="info"
                size="small"
                @click="resetForm('ruleForm')"
              ><i class="el-icon-delete"></i>&nbsp;{{
                  $t("userManage.RM.reset")
                }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button
                size="small"
                type="primary"
                @click="onSubmit('ruleForm')"
              ><i class="el-icon-search"></i> &nbsp;{{
                  $t("userManage.RM.query")
                  type="success"
                  size="small"
                  @click="setInsertFormdialog"
                  v-if="menuStatus.insert"
              ><i class="el-icon-circle-plus-outline"></i> &nbsp;{{
                  $t("userManage.RM.add")
                }}</el-button>
            </el-form-item>
            <el-form-item>
@@ -87,12 +93,11 @@
            </el-form-item>
            <el-form-item>
              <el-button
                type="success"
                size="small"
                @click="setInsertFormdialog"
                v-if="menuStatus.insert"
              ><i class="el-icon-circle-plus-outline"></i> &nbsp;{{
                  $t("userManage.RM.add")
                  type="info"
                  size="small"
                  @click="resetForm('ruleForm')"
              ><i class="el-icon-delete"></i>&nbsp;{{
                  $t("userManage.RM.reset")
                }}</el-button>
            </el-form-item>
          </div>
@@ -145,6 +150,7 @@
        </el-form-item> -->
      </el-form>
    </div>
    <div class="dividing-line"></div>
    <div
      class="table_box subpage_Div"
      :style="styleVar"
@@ -152,7 +158,8 @@
      <el-table
        :data="tableData"
        style="width: 100%"
        height="calc(100% - 57px)"
        border
        height="calc(100% - 45px)"
        @selection-change="handleSelectionChange"
      >
        <el-table-column
@@ -231,21 +238,25 @@
          width="200"
        >
          <template slot-scope="scope">
             <el-button
            type="primary"
              @click="showDetail(scope.$index, scope.row)"
              size="small"
              plain
            >{{ $t("common.see") }}</el-button>
            <el-button
              v-if="menuStatus.update"
              type="warning"
              @click="handleEdit(scope.$index, scope.row)"
              size="small"
              plain
            >{{ $t("common.update") }}</el-button>
            <el-button
              @click="showDetail(scope.$index, scope.row)"
              size="small"
            >{{ $t("common.see") }}</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div
        style="margin-top: 25px"
        style="margin-top: 10px"
        class="pagination_box"
      >
        <el-pagination
@@ -263,18 +274,18 @@
    <el-dialog
      :title="$t('userManage.RM.insertRole')"
      top="15vh"
      width="50vh"
      :before-close="handleClose"
      style="overflow: hidden"
      :visible.sync="InsertFormdialog"
    >
      <el-form :model="insertform">
        <div style="height: 500px; overflow: auto">
      <el-form :model="insertform" label-position="top">
        <el-form-item
          :label="$t('userManage.RM.roleName')"
          :label-width="formLabelWidth"
        >
          <el-input
            style="width: 95%"
             style="width:85%"
            v-model="insertform.name"
            autocomplete="off"
          ></el-input>
@@ -289,7 +300,7 @@
            :popper-append-to-body="false"
            v-model="insertform.depValue"
            placeholder="请选择"
            style="width: 95%"
             style="width:85%"
          >
            <el-option
              :value="insertform.depid"
@@ -322,7 +333,7 @@
          :label-width="formLabelWidth"
        >
          <el-input
            style="width: 95%"
            style="width:85%"
            v-model="insertform.descr"
            autocomplete="off"
          ></el-input>
@@ -345,12 +356,13 @@
          :label-width="formLabelWidth"
        >
          <el-input
            style="width: 95%"
             style="width:85%"
            v-model="insertform.bak"
            autocomplete="off"
          ></el-input>
        </el-form-item>
      </el-form>
        </div>
      <div
        slot="footer"
        class="dialog-footer"
@@ -372,12 +384,11 @@
    </el-dialog>
    <el-dialog
      :title="$t('userManage.RM.updateRole')"
      top="15vh"
      width="50vh"
      style="overflow: hidden"
      :visible.sync="UpdateFormdialog"
      :before-close="handleCloseEdit"
    >
      <el-form :model="updateform">
        <div style="height: 500px; overflow: auto">
      <el-form :model="updateform" label-position="top">
        <el-form-item
          :label="$t('userManage.RM.roleName')"
          :label-width="formLabelWidth"
@@ -385,6 +396,7 @@
          <el-input
            v-model="updateform.name"
            autocomplete="off"
             style="width:85%"
          ></el-input>
        </el-form-item>
@@ -397,7 +409,7 @@
            :popper-append-to-body="false"
            v-model="updateform.depValue"
            placeholder="请选择"
            style="width: 95%"
             style="width:85%"
          >
            <el-option
              :value="updateform.depid"
@@ -446,6 +458,7 @@
          <el-input
            v-model="updateform.descr"
            autocomplete="off"
             style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -455,9 +468,11 @@
          <el-input
            v-model="updateform.bak"
            autocomplete="off"
             style="width:85%"
          ></el-input>
        </el-form-item>
      </el-form>
        </div>
      <div
        slot="footer"
        class="dialog-footer"
@@ -497,10 +512,10 @@
        >取消</el-button>
      </div>
    </div>
<div class="infoBox_box" v-show="showinfoBox">
    <div
      class="infoBox box_div subpage_Div"
      v-show="showinfoBox"
    >
      <div
        slot="header"
@@ -566,6 +581,7 @@
        <el-divider></el-divider>
      </div>
    </div>
</div>
  </div>
</template>
@@ -650,7 +666,8 @@
      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 + 97}px)`;
        this.styleVar["height"] = `calc(100% - ${rect.height + 30}px)`;
      });
    },
    handleRouleDepList(data, node, nodeData) {
@@ -777,8 +794,12 @@
      });
    },
    insertFromClose() {
      this.InsertFormdialog = false;
      this.insertform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false;
          this.insertform = {};
        })
        .catch((_) => { });
    },
    async insertFromData() {
      if (this.insertform.depValue == null) {
@@ -805,8 +826,13 @@
      }
    },
    updateFromClose() {
      this.UpdateFormdialog = false;
      this.updateform = {};
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.UpdateFormdialog = false;
          this.updateform = {};
          this.getRoleTabelData();
        })
        .catch((_) => { });
    },
    async updateFromData() {
      if (this.updateform.depValue == null) {
@@ -908,6 +934,21 @@
          break;
      }
    },
    handleClose() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.InsertFormdialog = false
        })
        .catch((_) => { });
    },
    handleCloseEdit() {
      this.$confirm("关闭后无法保存,是否关闭?")
        .then((_) => {
          this.UpdateFormdialog = false
          this.getRoleTabelData();
        })
        .catch((_) => { });
    },
  },
  beforeDestroy() {
    this.timer && clearTimeout(this.timer);
@@ -935,7 +976,7 @@
.logLog_box {
  height: 98%;
  width: 98%;
  padding: 1%;
  padding: 0.5%;
  .el-input {
    width: 300px;
@@ -961,12 +1002,12 @@
  .inquire {
    height: auto;
    padding: 8px;
    margin-top: 20px;
    //padding: 8px;
    //margin-top: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    //margin-bottom: 20px;
    // width: calc(100% - 22px);
    .el-form-item {