wangting
2025-01-02 e358d69fc18870584dd2d9f531910b7838ea27d9
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
@@ -16,19 +16,32 @@
        >
          <template slot="menuLeft" slot-scope="scope">
            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">创建</el-button>
            <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">删除</el-button>
            <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">查看使用范围</el-button>
            <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">下载导入模板
            <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary"
                       @click="rowSaveHandlerClick">创建
            </el-button>
            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">导入</el-button>
            <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">导出</el-button>
            <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger"
                       @click="allDelHandler">删除
            </el-button>
            <el-button v-if="permissionList.viewTheScopeBtn" icon="el-icon-view" plain size="small" type="primary"
                       @click="chekView">查看使用范围
            </el-button>
            <el-button v-if="permissionList.downloadImportTemplateBtn" icon="el-icon-download" plain size="small"
                       type="primary" @click="downloadTemplateHandler">下载导入模板
            </el-button>
            <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary"
                       @click="uploadUser">导入
            </el-button>
            <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary"
                       @click="downloadHandler">导出
            </el-button>
          </template>
          <template slot="menu" slot-scope="scope">
            <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">编辑
            <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text"
                       @click="editBtnClick(scope.row)">编辑
            </el-button>
            <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除
            <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text"
                       @click="rowDeleteHandler(scope.row)">删除
            </el-button>
          </template>
@@ -44,7 +57,7 @@
          width="1000px"
          @close="dialogClose"
        >
          <el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
          <el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small">
            <el-row>
              <el-col :span="12">
                <el-form-item label="枚举名称:" prop="id">
@@ -66,7 +79,8 @@
              </el-col>
              <el-col :span="12">
                <el-form-item label="长度:">
                  <el-input-number v-model="form.length" :max="999" :min="1" label="描述文字" style="width: 376px;"></el-input-number>
                  <el-input-number v-model="form.length" :max="999" :min="1" label="描述文字"
                                   style="width: 376px;"></el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="24">
@@ -105,7 +119,6 @@
            @search-change="checkHandleSearch"
            @search-reset="checkHandleReset"
          >
          </avue-crud>
        </el-dialog>
@@ -117,7 +130,8 @@
    <el-aside width="35%">
      <basic-container>
        <el-descriptions :column="1" border size="medium" style="margin-bottom: 20px" title="枚举信息" :labelStyle="{width:'150px'}">
        <el-descriptions :column="1" :labelStyle="{width:'150px'}" border size="medium" style="margin-bottom: 20px"
                         title="枚举信息">
          <el-descriptions-item>
            <template slot="label">
              名称
@@ -168,6 +182,7 @@
  downloadEnumTemplate
} from "@/api/modeling/enumType/api";
import func from "@/util/func";
import {mapGetters} from "vuex";
import {deleteUser} from "@/api/system/user/api";
export default {
@@ -182,7 +197,7 @@
        refreshBtn: false,
        selection: false,
        index: false,
        header:false,
        header: false,
        calcHeight: -40,
        column: [
          {
@@ -247,13 +262,13 @@
        calcHeight: 50,
        refreshBtn: false,
        selection: false,
        dialogWidth:500,
        dialogWidth: 500,
        column: [
          {
            label: '枚举项名',
            prop: 'name',
            sortable: true,
            span:24,
            span: 24,
            rules: [
              {
                required: true,
@@ -266,7 +281,7 @@
            label: '枚举值',
            prop: 'value',
            sortable: true,
            span:24,
            span: 24,
            rules: [
              {
                required: true,
@@ -278,7 +293,7 @@
          {
            label: '描述',
            prop: 'description',
            span:24
            span: 24
          },
        ]
      },
@@ -304,7 +319,7 @@
        addBtn: false,
        editBtn: false,
        delBtn: false,
        menuWidth:160,
        menuWidth: 160,
        column: [
          {
            label: '枚举名称',
@@ -321,7 +336,7 @@
            label: '返回类型',
            prop: 'enumValueDataTypeText',
            sortable: true,
            width:130
            width: 130
          }
        ]
      },
@@ -331,7 +346,22 @@
      lastIndex: null
    }
  },
  created() {
    console.log(this.$route);
  },
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
        importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
        downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].downloadImportTemplate, false),
        viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].viewTheScope, false),
      };
    },
    lastItem() {
      return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1] : {};
    },
@@ -348,7 +378,6 @@
        this.tableData = data;
        this.tableLoading = false;
      }).catch(err => {
        this.$message.error(err)
      });
    },
@@ -387,7 +416,7 @@
          this.lastIndex = newIndex;
        },
        () => {
          this.selectList = [];
          this.selectList = [row];
        }
      );
    },
@@ -664,7 +693,6 @@
        func.downloadFileByBlobHandler(res);
        this.$message.success('导出成功');
      }).catch(err => {
        this.$message.error(err);
      })
    },
@@ -674,7 +702,6 @@
        func.downloadFileByBlobHandler(res);
        this.$message.success('下载成功');
      }).catch(err => {
        this.$message.error(err);
      })
    },