管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-15 343e6c2730ffb99db591732ff5ef1494e233c6bc
src/views/userManage/roleManage.vue
@@ -21,7 +21,7 @@
          :label="$t('userManage.RM.ownedSystem')"
          prop="ownedSystem"
        >
        <el-select
          <el-select
            :popper-append-to-body="false"
            v-model="roleForm.depValue"
            placeholder="请选择"
@@ -55,7 +55,7 @@
            @click="showDepTree(1)"
          >{{ $t('common.choose') }}</el-button>
        </el-form-item> -->
        <el-form-item>
        <!-- <el-form-item style="float:right">
          <el-button
            type="success"
            size="small"
@@ -65,7 +65,7 @@
              $t('userManage.RM.add')
            }}</el-button>
        </el-form-item>
        <el-form-item>
        <el-form-item style="float:right">
          <el-button
            size="small"
            type="primary"
@@ -74,7 +74,7 @@
              $t('userManage.RM.query')
            }}</el-button>
        </el-form-item>
        <el-form-item>
        <el-form-item style="float:right">
          <el-button
            type="info"
            size="small"
@@ -83,7 +83,7 @@
              $t('userManage.RM.reset')
            }}</el-button>
        </el-form-item>
        <el-form-item>
        <el-form-item style="float:right">
          <el-button
            type="danger"
            size="small"
@@ -91,6 +91,44 @@
            v-if="menuStatus.delete"
          ><i class="el-icon-delete"></i>&nbsp;{{
              $t('common.delete')
            }}</el-button>
        </el-form-item> -->
        <el-form-item style="float:right">
          <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 style="float:right">
          <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 style="float:right">
          <el-button
            type="danger"
            size="small"
            @click="handleDelete()"
            v-if="menuStatus.delete"
          ><i class="el-icon-delete"></i>&nbsp;{{
              $t('common.delete')
            }}</el-button>
        </el-form-item>
        <el-form-item style="float:right">
          <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')
            }}</el-button>
        </el-form-item>
      </el-form>
@@ -179,12 +217,13 @@
        >
          <template slot-scope="scope">
            <el-button
              plain
              v-if="menuStatus.update"
              type="warning"
              @click="handleEdit(scope.$index, scope.row)"
              size="small"
            >{{ $t('common.update') }}</el-button>
            <el-button
            <el-button plain
              @click="showDetail(scope.$index, scope.row)"
              size="small"
            >{{ $t('common.see') }}</el-button>
@@ -199,7 +238,7 @@
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="listData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="listData.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="count"
@@ -221,6 +260,7 @@
          :label-width="formLabelWidth"
        >
          <el-input
            style="width:95%"
            v-model="insertform.name"
            autocomplete="off"
          ></el-input>
@@ -235,7 +275,7 @@
            :popper-append-to-body="false"
            v-model="insertform.depValue"
            placeholder="请选择"
            style="width:93%"
            style="width:95%"
          >
            <el-option
              :value="insertform.depid"
@@ -268,6 +308,7 @@
          :label-width="formLabelWidth"
        >
          <el-input
            style="width:95%"
            v-model="insertform.descr"
            autocomplete="off"
          ></el-input>
@@ -290,6 +331,7 @@
          :label-width="formLabelWidth"
        >
          <el-input
            style="width:95%"
            v-model="insertform.bak"
            autocomplete="off"
          ></el-input>
@@ -313,7 +355,7 @@
    <el-dialog
      :title="$t('userManage.RM.updateRole')"
      top="15vh"
      width="80vh"
      width="50vh"
      style="overflow: hidden"
      :visible.sync="UpdateFormdialog"
    >
@@ -333,7 +375,28 @@
          :label-width="formLabelWidth"
          :prop="updateform.depValue"
        >
          <el-input
          <el-select
            :popper-append-to-body="false"
            v-model="updateform.depValue"
            placeholder="请选择"
            style="width:95%"
          >
            <el-option
              :value="updateform.depid"
              :label="updateform.depValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="depList"
                node-key="id"
                :props="props"
                @node-click="handleUpdataDepList"
              />
            </el-option>
          </el-select>
          <!-- <el-input
            v-model="updateform.depValue"
            :disabled="true"
            :placeholder="$t('common.pleaseInput')"
@@ -343,7 +406,7 @@
            type="primary"
            style="margin-left:10px"
            @click="showDepTree(3)"
          >{{ $t('common.choose') }}</el-button>
          >{{ $t('common.choose') }}</el-button> -->
        </el-form-item>
        <el-form-item
          :label="$t('userManage.RM.isAdmin')"
@@ -521,8 +584,8 @@
      InsertFormdialog: false,
      UpdateFormdialog: false,
      roleForm: {
        depid:'',
        depValue:'',
        depid: '',
        depValue: '',
      },
      cataName: '',
      depValue: '',
@@ -553,14 +616,18 @@
    };
  },
  methods: {
    handleRouleDepList(data, node, nodeData){
    this.roleForm.depid = data.id
    handleRouleDepList(data, node, nodeData) {
      this.roleForm.depid = data.id
      this.roleForm.depValue = data.name;
    },
    handleDepList(data, node, nodeData) {
      this.insertform.depid = data.id
      this.insertform.depValue = data.name;
    },
    handleUpdataDepList(data, node, nodeData) {
      this.updateform.depid = data.id
      this.updateform.depValue = data.name;
    },
    setInsertFormdialog() {
      this.InsertFormdialog = true;
@@ -730,26 +797,37 @@
        });
      }
    },
    async handleDelete() {
    handleDelete() {
      var std = [];
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id);
      }
      const data = await deleteRoles({ ids: std.toString() });
      this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        const data = await deleteRoles({ ids: std.toString() });
      if (data.code == 200) {
        this.InsertFormdialog = false;
        if (data.code == 200) {
          this.InsertFormdialog = false;
          this.$message({
            message: '删除成功!',
            type: 'success',
          });
          this.getRoleTabelData();
        } else {
          this.$message({
            message: '删除失败!',
            type: 'warning',
          });
        }
      }).catch(() => {
        this.$message({
          message: '删除成功!',
          type: 'success',
          type: 'info',
          message: '已取消删除'
        });
        this.getRoleTabelData();
      } else {
        this.$message({
          message: '删除失败!',
          type: 'warning',
        });
      }
      });
    },
    handleSizeChange(val) {
      this.listData.pageSize = val;
@@ -831,7 +909,7 @@
  }
  .inquire {
    height: auto;
    padding: 10px;
    margin-top: 10px;
    margin-top: 10px;