ludc
2024-07-24 dfd77a2f5f905e27216b87d207f9fe8c4035e797
Merge remote-tracking branch 'origin/master'
已修改10个文件
已添加2个文件
845 ■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/user.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/router/page/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/base/UIContentViewer.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue 409 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/department/option.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/user/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
@@ -1,5 +1,7 @@
package com.vci.web.controller;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.pagemodel.OsBtmTypeAttributeVO;
import com.vci.pagemodel.OsLinkTypeAttributeVO;
import com.vci.pagemodel.OsLinkTypeVO;
@@ -14,11 +16,9 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -119,4 +119,40 @@
            return BaseResult.success();
        }
    }
    /**
     * é“¾æŽ¥ç±»åž‹çš„列表
     *
     * @return é“¾æŽ¥ç±»åž‹çš„æ˜¾ç¤ºå¯¹è±¡
     */
    @GetMapping("/gridLink")
    public BaseResult<List<LinkType>> gridLink(){
        try {
            return linkTypeService.gridLink();
        } catch (PLException e) {
            BaseResult objectBaseResult = new BaseResult<>();
            objectBaseResult.setCode(Integer.parseInt(e.code));
            objectBaseResult.setMsg(Arrays.toString(e.messages));
            return objectBaseResult;
        }
    }
    /**
     * é“¾æŽ¥ç±»åž‹ä¿å­˜
     * linkType é“¾æŽ¥ç±»åž‹çš„保存对象
     * addFlag æ˜¯å¦ä¸ºæ–°å¢ž true新增,false修改
     * @return ä¿å­˜ç»“æžœ
     */
    @GetMapping("/addAndEditLink")
    public BaseResult addAndEditLink(@RequestBody LinkType linkType, Boolean addFlag){
        try {
            return linkTypeService.addAndEditLink(linkType, addFlag);
        } catch (PLException e) {
            BaseResult objectBaseResult = new BaseResult<>();
            objectBaseResult.setCode(Integer.parseInt(e.code));
            objectBaseResult.setMsg(Arrays.toString(e.messages));
            return objectBaseResult;
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
@@ -3,6 +3,7 @@
import com.vci.corba.common.PLException;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.pagemodel.OsBtmTypeAttributeVO;
import com.vci.pagemodel.OsLinkTypeAttributeVO;
@@ -108,4 +109,17 @@
     * @return æœ‰é”™è¯¯çš„属性
     */
    List<OsBtmTypeAttributeVO> checkAttributeTypeDifferent(String linkTypeOid);
    /**
     * é“¾æŽ¥ç±»åž‹çš„列表
     *
     * @return é“¾æŽ¥ç±»åž‹çš„æ˜¾ç¤ºå¯¹è±¡
     */
    BaseResult<List<LinkType>> gridLink() throws PLException;
    /**
     * é“¾æŽ¥ç±»åž‹ä¿å­˜
     * linkType é“¾æŽ¥ç±»åž‹çš„保存对象
     * addFlag æ˜¯å¦ä¸ºæ–°å¢ž true新增,false修改
     * @return ä¿å­˜ç»“æžœ
     */
    BaseResult addAndEditLink(LinkType linkType, Boolean addFlag) throws PLException;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -9,6 +9,7 @@
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.util.BeanUtil;
import com.vci.starter.web.util.VciBaseUtil;
@@ -322,6 +323,85 @@
    }
    /**
     * é“¾æŽ¥ç±»åž‹çš„列表
     *
     * @return é“¾æŽ¥ç±»åž‹çš„æ˜¾ç¤ºå¯¹è±¡
     */
    @Override
    public BaseResult<List<LinkType>> gridLink() throws PLException {
        LinkType[] linkTypes = platformClientUtil.getLinkTypeService().getLinkTypes();
        return BaseResult.dataList(Arrays.asList(linkTypes));
    }
    /**
     * é“¾æŽ¥ç±»åž‹ä¿å­˜
     * linkType é“¾æŽ¥ç±»åž‹çš„保存对象
     * addFlag æ˜¯å¦ä¸ºæ–°å¢ž true新增,false修改
     * @return ä¿å­˜ç»“æžœ
     */
    @Override
    public BaseResult addAndEditLink(LinkType linkType, Boolean addFlag) throws PLException {
        VciBaseUtil.alertNotNull(linkType.name,"请输入链接类型名称",linkType.btmItemsFrom,"From端业务类型不能为空!",
                linkType.btmItemsTo,"To端类型均不能为空!");
        int maxLength = platformClientUtil.getLinkTypeService().getLTNameMaxLength();
        if(linkType.name.length() > maxLength){
            throw new PLException("500",new String[] {"链接类型名长度不能超过" + maxLength});
        }
        if(!linkType.name.matches("^[A-Za-z]+$")){
            throw new PLException("500",new String[] {"链接类型名称只能为英文字母"});
        }
        LinkType historyLink = platformClientUtil.getLinkTypeService().getLinkType(linkType.name);
        if(historyLink != null && !historyLink.name.equals("") && addFlag){
            throw new PLException("500",new String[] {"该链接类型名称已经存在"});
        }
        linkType.modifier = WebUtil.getCurrentUserId();
        if(addFlag){
            linkType.creator = WebUtil.getCurrentUserId();
            platformClientUtil.getLinkTypeService().addLinkType(linkType);
            return BaseResult.success(null,"保存成功!");
        }
        ArrayList<String> removeAbList = getRemovedApList(historyLink, linkType);
        if(removeAbList.size() > 0 && platformClientUtil.getLinkTypeService().hasData(linkType.name)){
            linkType.attributes = historyLink.attributes;
            platformClientUtil.getLinkTypeService().modifyLinkType(linkType);
            throw new PLException("500",new String[] {"类型已有实例, ä¸è¿›è¡Œç§»é™¤æ“ä½œ"});
        }
        platformClientUtil.getLinkTypeService().modifyLinkType(linkType);
        return BaseResult.success(null,"保存成功!");
    }
    /**
     * èŽ·å–ä¿®æ”¹é“¾æŽ¥ç±»åž‹æ—¶ å‡å°‘的属性
     * @param oldLt
     * @param newLt
     * @return
     */
    private ArrayList<String> getRemovedApList(LinkType oldLt,
                                               LinkType newLt) {
        String[] oldAbInfo = oldLt.attributes;
        ArrayList<String> oldNameList = new ArrayList<String>();
        for(int i = 0; i < oldAbInfo.length; i++){
            oldNameList.add(oldAbInfo[i]);
        }
        String[] newAbInfo = newLt.attributes;
        ArrayList<String> newNameList = new ArrayList<String>();
        for(int i = 0; i < newAbInfo.length; i++){
            newNameList.add(newAbInfo[i]);
        }
        ArrayList<String> removedApList = new ArrayList<String>();
        for(Iterator<String> iterator = oldNameList.iterator(); iterator.hasNext();){
            String oldName = iterator.next();
            if(!newNameList.contains(oldName)){
                removedApList.add(oldName);
            }
        }
        return removedApList;
    }
    /**
     * æ¸…除缓存
     */
    @Override
Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
import request from '@/router/axios';
// åˆ—表查询
export function gridAttribute(page,limit,params) {
  return request({
    url: "/api/attributeController/gridAttribute",
    method: "get",
    params:{
      page,
      limit,
      ...params
    }
  });
}
Source/plt-web/plt-web-ui/src/api/user.js
@@ -27,13 +27,13 @@
// ä¿®æ”¹å¯†ç 
export function changePassword(params) {
  let formData = new FormData;
  for (let key in params){
    formData.append(key,params[key])
  for (let key in params) {
    formData.append(key, params[key])
  }
  return request({
    url: "/api/userQueryController/changePassword",
    method: "post",
    data:formData
    data: formData
  });
}
Source/plt-web/plt-web-ui/src/router/page/index.js
@@ -58,7 +58,7 @@
  {
    path: '/',
    name: '主页',
    redirect: '/wel'
    redirect: '/wel/index'
  },
  {
    path: '/myiframe',
Source/plt-web/plt-web-ui/src/views/base/UIContentViewer.vue
@@ -40,8 +40,8 @@
                         :areasData="uiDefineVO.centerAreas"
                         :dataStore="checkedData.centerArea.data"
                         :inDialog="inDialog"
                         :sourceData="checkedData.westArea.data[checkedData.westArea.data.length-1]"
                         :sourceBtmType="checkedData.westArea.DefineVOBtmType"
                         :sourceData="uiDefineVO.westAreas && uiDefineVO.westAreas.length>0?checkedData.westArea.data[checkedData.westArea.data.length-1]:sourceData"
                         :sourceBtmType="uiDefineVO.westAreas && uiDefineVO.westAreas.length>0?checkedData.westArea.DefineVOBtmType:btmType"
                         areas-name="centerArea"
                         cradStyle=""
                         @setDataStore="setDataStore">
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -1,13 +1,244 @@
<template>
<p>属性池</p>
  <el-container>
    <el-main>
      <basic-container>
        <avue-crud
          ref="userCrud"
          :data="tableData"
          :option="option"
          :page.sync="page"
          :table-loading="tableLoading"
          @on-load="getTableList"
          @refresh-change="handleRefresh"
          @search-change="handleSearch"
          @search-reset="handleReset"
          @selection-change="selectChange"
          @row-click="rowClickHandler"
          @size-change="sizeChange"
          @current-change="currentChange"
        >
          <template slot="menuLeft" slot-scope="scope">
            <el-button icon="el-icon-plus" 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>
          </template>
          <template slot="menu" slot-scope="scope">
            <el-button 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>
          </template>
        </avue-crud>
      </basic-container>
    </el-main>
    <el-aside width="30%">
      <basic-container>
       <div style="height: 85vh; overflow-y: auto">
         <el-descriptions :column="1" border  size="medium" title="属性项">
           <el-descriptions-item>
             <template slot="label">
               åç§°
             </template>
             åç§°
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               æ ‡ç­¾
             </template>
             æ ‡ç­¾
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               æè¿°
             </template>
             æè¿°
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               æ“ä½œç±»åž‹
             </template>
             æ“ä½œç±»åž‹
           </el-descriptions-item>
         </el-descriptions>
         <el-descriptions :column="1" border class="margin-top" size="medium" title="VTString">
           <el-descriptions-item>
             <template slot="label">
               å…è®¸ä¸ºç©º
             </template>
             <el-tag type="success">是</el-tag>
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               ç²¾åº¦
             </template>
             ç²¾åº¦
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               é•¿åº¦
             </template>
             é•¿åº¦
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               é»˜è®¤å€¼
             </template>
             é»˜è®¤å€¼
           </el-descriptions-item>
         </el-descriptions>
         <el-descriptions :column="1" border class="margin-top" size="medium" title="值域">
           <el-descriptions-item>
             <template slot="label">
               å½“前类型
             </template>
             ä¸šåŠ¡ç±»åž‹
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               å½“前类型值
             </template>
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               å½“前版本次
             </template>
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               ä½¿ç”¨æžšä¸¾
             </template>
             <el-tag type="success">是</el-tag>
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               æžšä¸¾ç±»åž‹
             </template>
             æžšä¸¾ç±»åž‹
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               æžšä¸¾å€¼
             </template>
           </el-descriptions-item>
         </el-descriptions>
       </div>
      </basic-container>
    </el-aside>
  </el-container>
</template>
<script>
import {gridAttribute} from "@/api/modeling/attributePool/api";
import basicOption from '@/util/basic-option';
import {column} from "./option"
export default {
name: "index"
  name: "index",
  data() {
    return {
      tableData: [],
      option: {
        ...basicOption,
        searchMenuSpan: 8,
        calcHeight: -60,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        column
      },
      tableLoading: false,
      page: {
        currentPage: 1,
        pageSize: 10,
        total: 0,
        pageSizes: [10, 30, 50, 100],
      },
      searchParams: {},
      selectList: []
    }
  },
  methods: {
    //表格查询请求
    getTableList() {
      this.tableLoading = true;
      gridAttribute(this.page.currentPage, this.page.pageSize, this.searchParams).then(res => {
        const data = res.data.data;
        this.tableData = data;
        this.page.total = res.data.total;
        this.tableLoading = false;
      }).catch(err => {
        this.$message.error(err)
      });
    },
    // è¡¨æ ¼å¤´éƒ¨åˆ·æ–°
    handleRefresh() {
      this.getTableList();
    },
    // æœç´¢
    handleSearch() {
    },
    // é‡ç½®æœç´¢æ¡ä»¶
    handleReset() {
    },
    // é€‰æ‹©æ¡†
    selectChange(row) {
      this.selectList = row;
    },
    // ç‚¹å‡»è¡Œ
    rowClickHandler(row) {
      this.$refs.userCrud.toggleRowSelection(row);
    },
    // æ¡æ•°
    sizeChange(val) {
      this.page.pageSize = val;
    },
    // é¡µç 
    currentChange(val) {
      this.page.currentPage = val;
    },
    rowSaveHandlerClick() {
    },
    allDelHandler() {
    },
    chekView() {
    },
    editBtnClick() {
    },
    rowDeleteHandler() {
    }
  }
}
</script>
<style scoped>
<style lang="scss" scoped>
.margin-top{
  margin-top: 25px;
}
</style>
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
export const column = [
  {
    label: '属性名',
    prop: 'id',
    search:true,
    sortable:true,
  },
  {
    label: '类型',
    prop: 'attributeDataTypeText',
    sortable:true,
  },
  {
    label: '默认值',
    prop: 'defaultValue',
    sortable:true,
  },
  {
    label: '描述',
    prop: 'description',
  },
];
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
@@ -1,138 +1,222 @@
<template>
  <basic-container>
    <avue-crud
      ref="userCrud"
      :data="tableData"
      :option="option"
      :table-loading="tableLoading"
      @on-load="getTableList"
      @refresh-change="handleRefresh"
      @search-change="handleSearch"
      @search-reset="handleReset"
      @selection-change="selectChange"
      @row-click="rowClickHandler"
    >
  <el-container>
    <el-main>
      <basic-container>
        <avue-crud
          ref="userCrud"
          :data="tableData"
          :option="option"
          :table-loading="tableLoading"
          @on-load="getTableList"
          @refresh-change="handleRefresh"
          @search-change="handleSearch"
          @search-reset="handleReset"
          @selection-change="selectChange"
          @row-click="rowClickHandler"
        >
      <template slot="menuLeft" slot-scope="scope">
        <el-button icon="el-icon-plus" 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>
        <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">导出</el-button>
        <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">导入</el-button>
      </template>
          <template slot="menuLeft" slot-scope="scope">
            <el-button icon="el-icon-plus" 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>
            <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">导出</el-button>
            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">导入</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>
        <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除
        </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>
            <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除
            </el-button>
          </template>
    </avue-crud>
    <!-- åˆ›å»ºç¼–辑自定义对话框    -->
    <el-dialog
      v-dialogDrag
      v-loading="dialogLoading"
      :title="dialogType === 'add' ? ' åˆ›å»º' : '编辑'"
      :visible.sync="dialogVisible"
      append-to-body="true"
      class="avue-dialog"
      width="70%"
      @close="dialogClose"
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="名称:" prop="id">
              <el-input v-model="form.id"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="标签:">
              <el-input v-model="form.name"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="类型:">
              <el-select v-model="form.enumValueDataType" placeholder="请选择类型">
                <el-option label="String" value="String"></el-option>
                <el-option label="Integer" value="Integer"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="长度:">
              <el-input-number v-model="form.length" :max="999" :min="1" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <avue-crud
              ref="dialogCrud"
              :data="dialogData"
              :option="dialogOption"
              @row-save="rowSaveDialogHandler"
              @row-update="rowUpdateDialogHandler"
              @row-del="rowDeleteDialogHandler"
            >
            </avue-crud>
          </el-col>
        </el-row>
      </el-form>
        </avue-crud>
        <!-- åˆ›å»ºç¼–辑自定义对话框    -->
        <el-dialog
          v-dialogDrag
          v-loading="dialogLoading"
          :title="dialogType === 'add' ? ' åˆ›å»º' : '编辑'"
          :visible.sync="dialogVisible"
          append-to-body="true"
          class="avue-dialog"
          width="70%"
          @close="dialogClose"
        >
          <el-form ref="form" :model="form" :rules="rules" label-width="80px">
            <el-row>
              <el-col :span="12">
                <el-form-item label="名称:" prop="id">
                  <el-input v-model="form.id"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="标签:">
                  <el-input v-model="form.name"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="类型:">
                  <el-select v-model="form.enumValueDataType" placeholder="请选择类型">
                    <el-option label="String" value="String"></el-option>
                    <el-option label="Integer" value="Integer"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="长度:">
                  <el-input-number v-model="form.length" :max="999" :min="1" label="描述文字"></el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <avue-crud
                  ref="dialogCrud"
                  :data="dialogData"
                  :option="dialogOption"
                  @row-save="rowSaveDialogHandler"
                  @row-update="rowUpdateDialogHandler"
                  @row-del="rowDeleteDialogHandler"
                >
                </avue-crud>
              </el-col>
            </el-row>
          </el-form>
      <span slot="footer" class="dialog-footer">
          <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="rowSaveHandler">ç¡® å®š</el-button>
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
      </span>
    </el-dialog>
        </el-dialog>
    <!-- æŸ¥çœ‹ä½¿ç”¨èŒƒå›´    -->
    <el-dialog
      v-dialogDrag
      v-loading="checkViewLoading"
      title="查看使用范围"
      :visible.sync="checkViewVisible"
      append-to-body="true"
      class="avue-dialog"
      width="70%"
    >
    <avue-crud
      ref="checkViewCrud"
      :data="checkViewData"
      :option="checkViewOption"
      @search-change="checkHandleSearch"
      @search-reset="checkHandleReset"
    >
        <!-- æŸ¥çœ‹ä½¿ç”¨èŒƒå›´    -->
        <el-dialog
          v-dialogDrag
          v-loading="checkViewLoading"
          :visible.sync="checkViewVisible"
          append-to-body="true"
          class="avue-dialog"
          title="查看使用范围"
          width="70%"
        >
          <avue-crud
            ref="checkViewCrud"
            :data="checkViewData"
            :option="checkViewOption"
            @search-change="checkHandleSearch"
            @search-reset="checkHandleReset"
          >
    </avue-crud>
    </el-dialog>
          </avue-crud>
        </el-dialog>
    <!--导入    -->
    <upload-file ref="upload" :tipList="tipList" :fileType="upFileType" :fileUrl="fileUrl" title="导入" @updata="getTableList"></upload-file>
  </basic-container>
        <!--导入    -->
        <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导入"
                     @updata="getTableList"></upload-file>
      </basic-container>
    </el-main>
    <el-aside width="30%">
      <basic-container>
        <el-descriptions :column="1" border size="medium" style="margin-bottom: 20px" title="枚举信息">
          <el-descriptions-item>
            <template slot="label">
              åç§°
            </template>
            {{ this.lastItem.id }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              æ ‡ç­¾
            </template>
            {{ this.lastItem.name }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              ç±»åž‹
            </template>
            {{ this.lastItem.enumValueDataType || 'String' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              é•¿åº¦
            </template>
            <el-tag> {{ this.lastItem.length || 50 }}</el-tag>
          </el-descriptions-item>
        </el-descriptions>
        <p style="font-weight: bold">枚举项</p>
        <avue-crud
          :data="asideData"
          :option="asideOption"
        >
        </avue-crud>
      </basic-container>
    </el-aside>
  </el-container>
</template>
<script>
import basicOption from '@/util/basic-option'
import {getEnumTypeList, addEnumType, updateEnumType, deleteEnumTypes,getUsedEnumList,download,downloadEnumTemplate} from "@/api/modeling/enumType/api";
import {
  getEnumTypeList,
  addEnumType,
  updateEnumType,
  deleteEnumTypes,
  getUsedEnumList,
  download,
  downloadEnumTemplate
} from "@/api/modeling/enumType/api";
import func from "@/util/func";
import {deleteUser} from "@/api/system/user/api";
export default {
  name: "index",
  data() {
    return {
      tipList:["导入模板中标明红色字体的为必输项","*注意*:第二行开始的数据为示例数据,导入前请将其删除,当导入的枚举下具备多个枚举项时,应按照示例enum2的写法",
        "枚举项名称(当前枚举下有枚举项时必填)","枚举值(当前枚举下有枚举项时必填)"],
      asideOption: {
        ...basicOption,
        addBtn: false,
        editBtn: false,
        menu: false,
        refreshBtn: false,
        selection: false,
        index: false,
        column: [
          {
            label: '枚举项名称',
            prop: 'name',
            sortable: true,
          },
          {
            label: '枚举值',
            prop: 'value',
            sortable: true,
          },
          {
            label: '描述',
            prop: 'description',
          },
        ]
      },
      tipList: [
        "导入模板中标明红色字体的为必输项",
        "*注意*:第二行开始的数据为示例数据,导入前请将其删除,当导入的枚举下具备多个枚举项时,应按照示例enum2的写法",
        "枚举项名称(当前枚举下有枚举项时必填)",
        "枚举值(当前枚举下有枚举项时必填)",
        "导入一个枚举下的多个枚举项时,请将枚举名、标签、返回类型、等信息填写一致,再填写不同的枚举项"
      ],
      upFileType: ['xls', 'xlsx'],
      fileUrl: 'api/webEnumController/importEnumTypes',
      checkViewOption:{
      checkViewOption: {
        ...basicOption,
        addBtn:false,
        menu:false,
        addBtn: false,
        menu: false,
        searchMenuSpan: 8,
        refreshBtn: false,
        selection:false,
        column:[
        selection: false,
        column: [
          {
            label: '名称',
            prop: 'enumName',
@@ -142,7 +226,7 @@
            label: '来源',
            prop: 'source',
            sortable: true,
            search:true
            search: true
          },
          {
            label: '说明',
@@ -150,10 +234,10 @@
          }
        ]
      },
      checkViewData:[],
      checkViewDataSearch:[],
      checkViewVisible:false,
      checkViewLoading:false,
      checkViewData: [],
      checkViewDataSearch: [],
      checkViewVisible: false,
      checkViewLoading: false,
      editRow: {},
      dialogType: '',
      dialogData: [],
@@ -220,7 +304,7 @@
            label: '枚举名称',
            prop: 'id',
            sortable: true,
            search:true
            search: true
          },
          {
            label: '标签',
@@ -236,7 +320,15 @@
      },
      tableLoading: false,
      selectList: [],
      searchParams:{}
      searchParams: {}
    }
  },
  computed: {
    lastItem() {
      return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1] : {};
    },
    asideData() {
      return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1].items : [];
    }
  },
  methods: {
@@ -258,9 +350,9 @@
    },
    // æœç´¢
    handleSearch(params,done) {
    handleSearch(params, done) {
      this.searchParams = {
        enumName:params.id
        enumName: params.id
      };
      this.getTableList()
      done();
@@ -274,6 +366,7 @@
    // é€‰æ‹©æ¡†
    selectChange(row) {
      console.log(row)
      this.selectList = row;
    },
@@ -314,7 +407,6 @@
      this.dialogData = row.items;
      this.dialogVisible = true;
      this.editRow = row;
      console.log(row);
    },
    // åˆ é™¤æŒ‰é’®ç‚¹å‡»
@@ -325,29 +417,53 @@
        ts: row.ts
      }
      let data = [params];
      deleteEnumTypes(data).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
        }
      })
      this.$confirm('您确定要删除当前的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteEnumTypes(data).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.obj);
            this.getTableList();
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // å¤šé€‰åˆ é™¤
    allDelHandler() {
      let data = this.selectList.map(item => {
        return{
        return {
          oid: item.oid,
          name: item.id,
          ts: item.ts
        }
      })
      deleteEnumTypes(data).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
        }
      })
      this.$confirm('您确定要删除所选择的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteEnumTypes(data).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.obj);
            this.getTableList();
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // å¯¹è¯æ¡†æžšä¸¾ä¿å­˜
@@ -473,18 +589,18 @@
    },
    // æŸ¥çœ‹ä½¿ç”¨èŒƒå›´
    chekView(){
      if(this.selectList.length <= 0 ){
    chekView() {
      if (this.selectList.length <= 0) {
        this.$message.warning('请至少选择一条数据');
        return;
      }
      if(this.selectList.length >1 ){
      if (this.selectList.length > 1) {
        this.$message.warning('只能选择一条数据进行查看');
        return;
      }
      getUsedEnumList({enumName:this.selectList[0].id}).then(res => {
        if(res.data.code === 200){
      getUsedEnumList({enumName: this.selectList[0].id}).then(res => {
        if (res.data.code === 200) {
          this.checkViewVisible = true;
          this.checkViewData = res.data.data;
          this.checkViewDataSearch = res.data.data;
@@ -494,12 +610,13 @@
    // æŸ¥çœ‹ä½¿ç”¨èŒƒå›´æŸ¥è¯¢
    checkHandleSearch(params, done) {
      const { source } = params;
      const {source} = params;
      if(!params.source) {
      if (!params.source) {
        this.checkViewData = this.checkViewDataSearch;
        return done();
      };
      }
      ;
      this.checkViewData = this.checkViewData.filter(item => {
        return item.source && item.source.includes(source);
@@ -510,19 +627,19 @@
    },
    // æŸ¥çœ‹ä½¿ç”¨èŒƒå›´é‡ç½®
    checkHandleReset(){
    checkHandleReset() {
      this.checkViewData = this.checkViewDataSearch;
    },
    // å¯¼å‡º
    downloadHandler(){
      if(this.selectList.length <= 0 ){
    downloadHandler() {
      if (this.selectList.length <= 0) {
        this.$message.warning('请至少选择一条数据进行导出');
        return;
      }
      let enumNames = this.selectList.map(item => item.id).join(',');
      download({enumNames:enumNames}).then(res => {
      download({enumNames: enumNames}).then(res => {
        func.downloadFileByBlobHandler(res);
        this.$message.success('导出成功');
      }).catch(err => {
@@ -531,7 +648,7 @@
    },
    // ä¸‹è½½å¯¼å…¥æ¨¡æ¿
    downloadTemplateHandler(){
    downloadTemplateHandler() {
      downloadEnumTemplate().then(res => {
        func.downloadFileByBlobHandler(res);
        this.$message.success('下载成功');
@@ -540,7 +657,7 @@
      })
    },
    uploadUser(){
    uploadUser() {
      this.$refs.upload.visible = true;
    }
  }
Source/plt-web/plt-web-ui/src/views/system/department/option.js
@@ -23,11 +23,11 @@
    label:'专业',
    prop: 'specialties'
  },
  {
    label:'部门唯一标识ID',
    prop: 'uniqueId',
    display:false,
  },
  // {
  //   label:'部门唯一标识ID',
  //   prop: 'uniqueId',
  //   display:false,
  // },
  {
    label: '描述',
    prop: 'description',
Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -227,6 +227,7 @@
      }
      done();
    },
    // è¡¨æ ¼è¯·æ±‚
    getTableList() {
      this.tableLoading = true;