From dfd77a2f5f905e27216b87d207f9fe8c4035e797 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 24 七月 2024 18:21:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js | 22 +
Source/plt-web/plt-web-ui/src/views/system/department/option.js | 10
Source/plt-web/plt-web-ui/src/router/page/index.js | 2
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java | 44 ++
Source/plt-web/plt-web-ui/src/views/system/user/index.vue | 1
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java | 14
Source/plt-web/plt-web-ui/src/views/base/UIContentViewer.vue | 4
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue | 239 +++++++++++++++
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue | 409 +++++++++++++++++---------
Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js | 14
Source/plt-web/plt-web-ui/src/api/user.js | 6
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java | 80 +++++
12 files changed, 680 insertions(+), 165 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
index 2ab88b8..8b592a7 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
+++ b/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鏂板锛宖alse淇敼
+ * @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;
+ }
+ }
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
index 4ed9866..fd64b1b 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
+++ b/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鏂板锛宖alse淇敼
+ * @return 淇濆瓨缁撴灉
+ */
+ BaseResult addAndEditLink(LinkType linkType, Boolean addFlag) throws PLException;
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
index 53145ae..d785735 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
+++ b/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鏂板锛宖alse淇敼
+ * @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
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
new file mode 100644
index 0000000..3a10e9c
--- /dev/null
+++ b/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
+ }
+ });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/user.js b/Source/plt-web/plt-web-ui/src/api/user.js
index abfa562..405e08d 100644
--- a/Source/plt-web/plt-web-ui/src/api/user.js
+++ b/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
});
}
diff --git a/Source/plt-web/plt-web-ui/src/router/page/index.js b/Source/plt-web/plt-web-ui/src/router/page/index.js
index 6172f26..8a0cac6 100644
--- a/Source/plt-web/plt-web-ui/src/router/page/index.js
+++ b/Source/plt-web/plt-web-ui/src/router/page/index.js
@@ -58,7 +58,7 @@
{
path: '/',
name: '涓婚〉',
- redirect: '/wel'
+ redirect: '/wel/index'
},
{
path: '/myiframe',
diff --git a/Source/plt-web/plt-web-ui/src/views/base/UIContentViewer.vue b/Source/plt-web/plt-web-ui/src/views/base/UIContentViewer.vue
index 93e2f7f..bbdf5e3 100644
--- a/Source/plt-web/plt-web-ui/src/views/base/UIContentViewer.vue
+++ b/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">
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
index 2da0423..871f037 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
+++ b/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>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js
new file mode 100644
index 0000000..e2d889d
--- /dev/null
+++ b/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',
+ },
+];
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
index 3335d16..67688b6 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
+++ b/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;
}
}
diff --git a/Source/plt-web/plt-web-ui/src/views/system/department/option.js b/Source/plt-web/plt-web-ui/src/views/system/department/option.js
index 42601ec..2063461 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/department/option.js
+++ b/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',
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
index 8c09e9e..619ebf1 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -227,6 +227,7 @@
}
done();
},
+
// 琛ㄦ牸璇锋眰
getTableList() {
this.tableLoading = true;
--
Gitblit v1.9.3