From 7577e0d40354021d70b78d58b712ff8c2e8ad485 Mon Sep 17 00:00:00 2001
From: ludc <ludc@vci-tech.com>
Date: 星期五, 03 一月 2025 10:47:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/util/func.js | 20 +++++-
Source/plt-web/plt-web-ui/src/views/system/department/index.vue | 2
Source/plt-web/plt-web-ui/src/router/avue-router.js | 6 +-
Source/plt-web/plt-web-ui/src/styles/ui.scss | 36 +++++++++++-
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue | 2
Source/plt-web/plt-web-ui/src/store/modules/user.js | 4
Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue | 2
Source/plt-web/plt-web-ui/src/config/website.js | 2
Source/plt-web/plt-web-ui/src/page/index/top/index.vue | 38 ++++--------
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/iconShow.vue | 2
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-button.vue | 22 ++++--
Source/plt-web/plt-web-ui/src/page/index/sidebar/sidebarItem.vue | 8 ++
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue | 1
13 files changed, 92 insertions(+), 53 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/iconShow.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/iconShow.vue
index 3dca8ec..ef8b97f 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/iconShow.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/iconShow.vue
@@ -1,5 +1,5 @@
<template>
- <div v-show="name" :title="title" class="iconShow" :style="'width:'+fontSize+';height:'+fontSize+';font-size: '+fontSize+';'+style" v-html="svgHtml"></div>
+ <div v-show="name" :title="title" class="iconShow" :name="name" :style="'width:'+fontSize+';height:'+fontSize+';font-size: '+fontSize+';'+style" v-html="svgHtml"></div>
</template>
<script>
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-button.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-button.vue
index 4007355..e7b8b47 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-button.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-button.vue
@@ -5,10 +5,11 @@
<!--top灞曠ず琛ㄦ牸涓婃柟鍖哄煙 menu灞曠ず琛ㄦ牸鎿嶄綔鏍忓尯鍩� 鏃犲氨鏄粯璁� -->
<el-tooltip v-if="LocationType === 'top'" v-for="item in basicButtonList.top" :content="item.description || item.name" placement="top">
<el-button :key="item.oid"
- :icon="item.paramVOS && item.paramVOS.icon ? item.paramVOS.icon :''"
:type="item.paramVOS && item.paramVOS.btnType ? item.paramVOS.btnType : 'primary'" plain
size="small"
- @click="buttonClick(item)">{{ item.name }}</el-button>
+ @click="buttonClick(item)">
+ <icon-show :name="item.iconPath"></icon-show>{{ item.name }}
+ </el-button>
</el-tooltip>
<el-button type="text" @click="handleDefaultAddChildren(scope.row)" v-if="(LocationType === 'menu' && type === 'TreeTable')">鏂板瀛愮骇</el-button>
@@ -16,10 +17,13 @@
<el-tooltip v-if="LocationType === 'menu'" v-for="item in basicButtonList.menu" :content="item.description || item.name" placement="top">
<el-button :key="item.oid"
- :icon="item.paramVOS.icon ? item.paramVOS.icon : (item.id === 'edit' ? 'el-icon-edit' : (item.id === 'delete' ||item.id === 'del' ? 'el-icon-delete' : ''))"
:type="item.paramVOS.btnType || 'text'" plain
size="small"
- @click="buttonClick(item,scope.row)">{{ item.name }}</el-button>
+ @click="buttonClick(item,scope.row)">
+ <icon-show v-if="item.iconPath" :name="item.iconPath"></icon-show>
+ <i v-else :class="item.id === 'edit' ? 'el-icon-edit' : (item.id === 'delete' ||item.id === 'del' ? 'el-icon-delete' : '')"></i>
+ {{ item.name }}
+ </el-button>
</el-tooltip>
<!-- 琛ㄦ牸鍐呮寜閽搷浣滃璇濇琛ㄥ崟 -->
@@ -29,21 +33,23 @@
<div v-else-if="type === 'form'">
<el-tooltip v-for="item in basicButtonList" :content="item.description || item.name" placement="top">
<el-button :key="item.oid"
- :icon="item.paramVOS && item.paramVOS.icon ? item.paramVOS.icon :''"
:type="item.paramVOS && item.paramVOS.btnType ? item.paramVOS.btnType : 'primary'" plain
plain
size="small"
- @click="buttonClick(item)">{{ item.name }}</el-button>
+ @click="buttonClick(item)">
+ <icon-show :name="item.iconPath"></icon-show>{{ item.name }}
+ </el-button>
</el-tooltip>
</div>
<div v-else-if="type === 'tree'" class="tree-buttons">
<el-tooltip v-for="item in basicButtonList" :content="item.description || item.name" placement="top">
<el-button :key="item.oid"
- :icon="item.paramVOS && item.paramVOS.icon ? item.paramVOS.icon :''"
:type="item.paramVOS && item.paramVOS.btnType ? item.paramVOS.btnType : 'primary'" plain
plain
size="small"
- @click="buttonClick(item)">{{ item.name }}</el-button>
+ @click="buttonClick(item)">
+ <icon-show :name="item.iconPath"></icon-show>{{ item.name }}
+ </el-button>
</el-tooltip>
<el-button type="primary"
plain
diff --git a/Source/plt-web/plt-web-ui/src/config/website.js b/Source/plt-web/plt-web-ui/src/config/website.js
index 2d76c5b..3d4ce67 100644
--- a/Source/plt-web/plt-web-ui/src/config/website.js
+++ b/Source/plt-web/plt-web-ui/src/config/website.js
@@ -36,7 +36,7 @@
iconDefault: 'codicon:gear',
props: {
label: 'name',
- path: 'path',
+ path: 'path',//璺敱path
icon: 'source',
children: 'children'
}
diff --git a/Source/plt-web/plt-web-ui/src/page/index/sidebar/sidebarItem.vue b/Source/plt-web/plt-web-ui/src/page/index/sidebar/sidebarItem.vue
index aa85462..ade24e2 100644
--- a/Source/plt-web/plt-web-ui/src/page/index/sidebar/sidebarItem.vue
+++ b/Source/plt-web/plt-web-ui/src/page/index/sidebar/sidebarItem.vue
@@ -167,7 +167,13 @@
display: inline-block;
margin-top: -2px;
margin-right: 10px;
- color: #eeeeea;
+ color: rgba(255, 255, 255, 0.7);
+}
+.el-submenu__title:hover .iconShowSpan{
+ color: #ffffff;
+}
+.el-submenu__title:hover .iconShowSpan svg{
+ fill: #ffffff;
}
</style>
diff --git a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
index 8df1854..f11d053 100644
--- a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
+++ b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
@@ -4,7 +4,7 @@
<div v-if="showCollapse"
:class="[{ 'avue-breadcrumb--active': isCollapse }]"
class="avue-breadcrumb">
- <i class="icon-navicon" @click="setCollapse"></i>
+ <i class="icon-navicon" @click="setCollapse"></i>
</div>
</div>
<div class="top-bar__title">
@@ -75,31 +75,21 @@
@click="handleScreen"></i>
</div>
</el-tooltip>
- <img :src="userInfo.avatar"
- class="top-bar__img">
- <div>
- <el-dropdown style="height: 40px">
- <span class="el-dropdown-link">
+ <el-tooltip content="涓汉淇℃伅">
+ <div>
+ <img :src="userInfo.avatar"
+ class="top-bar__img"
+ @click="gotoInfo">
+ </div>
+ </el-tooltip>
+
+ <el-tooltip content="閫�鍑虹櫥褰�">
+ <div>
+ <span style="font-size: 16px" @click="logout">
{{ userInfo.userName }}
- <i class="el-icon-arrow-down el-icon--right"></i>
</span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item>
- <router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
- </el-dropdown-item>
- <el-dropdown-item @click.native="gotoInfo">
- {{ $t('navbar.userinfo') }}
- <!-- 淇敼瀵嗙爜-->
- </el-dropdown-item>
- <el-dropdown-item v-if="this.website.switchMode" @click.native="switchDept"
- >{{ $t('navbar.switchDept') }}
- </el-dropdown-item>
- <el-dropdown-item divided
- @click.native="logout">{{ $t('navbar.logOut') }}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
+ </div>
+ </el-tooltip>
<el-dialog :visible.sync="userBox"
append-to-body
diff --git a/Source/plt-web/plt-web-ui/src/router/avue-router.js b/Source/plt-web/plt-web-ui/src/router/avue-router.js
index 8236f72..e3f8fbe 100644
--- a/Source/plt-web/plt-web-ui/src/router/avue-router.js
+++ b/Source/plt-web/plt-web-ui/src/router/avue-router.js
@@ -98,10 +98,10 @@
// 璁剧疆 props榛樿鍊� 浣滅敤灏辨槸灏嗗瓧娈佃缃垚閰嶇疆鐨�
const propsDefault = {
label: propsConfig.label || 'name',
- path: 'code',
- code: 'code',
+ path: propsConfig.path,
+ code: 'id',//鍙栧敮涓�鏍囪瘑
pathValue: 'pathValue',
- icon: propsConfig.icon || 'icon',
+ icon: propsConfig.icon || 'source',
children: propsConfig.children || 'children',
meta: propsConfig.meta || 'meta',
}
diff --git a/Source/plt-web/plt-web-ui/src/store/modules/user.js b/Source/plt-web/plt-web-ui/src/store/modules/user.js
index 8e1fbc3..3a33a35 100644
--- a/Source/plt-web/plt-web-ui/src/store/modules/user.js
+++ b/Source/plt-web/plt-web-ui/src/store/modules/user.js
@@ -16,7 +16,7 @@
const propsDefault = {
label: propsConfig.label || 'name',
path: propsConfig.path || 'path',
- icon: propsConfig.icon || 'icon',
+ icon: propsConfig.icon || 'source',
children: propsConfig.children || 'children',
}
const icon = ele[propsDefault.icon];
@@ -36,7 +36,7 @@
function updateCode(items) {
items.forEach(item => {
item.pathValue = item.path;
- item.path = '/' + item.code;
+ item.path = '/' + item.id;
item.query = {}; // 鍒濆鍖� item.query
if (item.pathValue.indexOf('?') != -1) {
item.query = queryStringToObject(item.pathValue)
diff --git a/Source/plt-web/plt-web-ui/src/styles/ui.scss b/Source/plt-web/plt-web-ui/src/styles/ui.scss
index 5bed0d1..ff4eb74 100644
--- a/Source/plt-web/plt-web-ui/src/styles/ui.scss
+++ b/Source/plt-web/plt-web-ui/src/styles/ui.scss
@@ -493,7 +493,12 @@
.UI-dynamic > .avue-crud{
height: 100%;
}
-
+/*
+svg鍥炬爣
+ */
+.iconShow svg{
+ fill: currentColor;
+}
/*
琛ㄥ崟
*/
@@ -508,7 +513,9 @@
}
-/***鎸夐挳妗�****/
+/***
+鎸夐挳
+****/
.tree-buttons .el-button{
margin: 0 5px 5px 0;
}
@@ -530,7 +537,29 @@
text-align: center;
padding-left: 4.5px;
}
-
+/*鏄剧ずsvg鍥炬爣鐨勬寜閽�*/
+.el-button--small.button-custom-icon{
+ padding: 7px 14px;
+}
+.el-button--small.button-custom-icon > span{
+ height: 16px;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+/*鍥炬爣**/
+.el-button--small.button-custom-icon > span .iconShow{
+ font-size: 16px !important;
+ width: 16px !important;
+ height: 16px !important;
+ margin-right: 6px;
+}
/*
鏍�
*/
@@ -538,6 +567,7 @@
.el-tree .el-tree-node__loading-icon{
display: none !important;
}
+/*鍥炬爣**/
.el-tree-node__label .iconShow{
display: inline-block;
width: 14px !important;
diff --git a/Source/plt-web/plt-web-ui/src/util/func.js b/Source/plt-web/plt-web-ui/src/util/func.js
index e3c463d..aa606d5 100644
--- a/Source/plt-web/plt-web-ui/src/util/func.js
+++ b/Source/plt-web/plt-web-ui/src/util/func.js
@@ -329,7 +329,7 @@
if (iconList && iconList.length > 0) {
let libName = name.split(':')[0];
let currentLic = iconList.find(item => item.lable == libName);
- if (currentLic.list) {
+ if (currentLic && currentLic.list) {
currentLic.list.find(item => {
if (item.name == name) {
svgHtml = item.content;
@@ -339,11 +339,21 @@
}
}else {
getIcons().then(res => {
- this.iconList=res.data.data;
- store.dispatch("setIcons", this.iconList);
- if(this.iconList.length>0) {
- this.activeName=this.iconList[0].lable;
+ store.dispatch("setIcons", res.data.data);
+ let iconList = res.data.data;
+ if (iconList && iconList.length > 0) {
+ let libName = name.split(':')[0];
+ let currentLic = iconList.find(item => item.lable == libName);
+ if (currentLic.list) {
+ currentLic.list.find(item => {
+ if (item.name == name) {
+ svgHtml = item.content;
+ }
+ return item.name == name;
+ })
+ }
}
+ return svgHtml;
})
}
}
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
index 51f9d19..46b249d 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -3,7 +3,6 @@
<el-aside>
<basic-container>
<div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
-
<!-- 宸︿晶鏍� -->
<div style="height: calc(100vh - 190px);">
<avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick">
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
index 13d9809..035317e 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
@@ -38,7 +38,7 @@
</el-button>
<!--<el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button>
<el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button>-->
- <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary"
+ <el-button v-if="!permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary"
@click="upLoadClickHandler">瀵煎叆
</el-button>
<el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary"
diff --git a/Source/plt-web/plt-web-ui/src/views/system/department/index.vue b/Source/plt-web/plt-web-ui/src/views/system/department/index.vue
index f87b389..b65c440 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/department/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/department/index.vue
@@ -356,8 +356,6 @@
this.rightTransferData = byRoleRes.data.data.map(item => item.oid);
this.$refs.transfer.visible = true;
}
- }).catch(err => {
- console.error(err);
});
},
diff --git a/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue b/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue
index b27d105..500a7d7 100644
--- a/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue
+++ b/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue
@@ -210,7 +210,7 @@
}).catch(error => {
this.loading = false;
});
- }
+ },
},
};
</script>
--
Gitblit v1.9.3