From 03e602bbaee807c42a22df05f1f00c558ffe9fa0 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期一, 13 一月 2025 17:27:19 +0800
Subject: [PATCH] 首页跳转日志bug
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue | 42 ++++++++++++++++++++++++++++++++++--------
1 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
index 13c1cf5..ab0a66b 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
@@ -4,7 +4,7 @@
<basic-container>
<div style="display: flex;justify-content: space-between;flex-wrap: wrap">
<div class="tag-group">
- <span class="tag-group__title">鍒嗙粍</span>
+ <span class="tag-group__title" v-if="types.length>0">鍒嗙粍</span>
<el-tag
v-for="item in types"
:key="item.key"
@@ -17,13 +17,19 @@
</div>
<div style="height: calc(100vh - 190px)">
<div>
- <el-button icon="el-icon-plus" type="primary" size="mini" @click="addHandler">娣诲姞</el-button>
- <el-button icon="el-icon-upload" type="primary" size="mini" @click="uploadHandler">涓婁紶</el-button>
+ <el-button v-if="permissionList.addBtn" class="button-custom-icon" type="primary" size="small" @click="addHandler">
+ <icon-show :name="permissionList.addBtn.source"></icon-show>
+ 娣诲姞
+ </el-button>
+ <el-button v-if="permissionList.uploadBtn" class="button-custom-icon" type="primary" size="small" @click="uploadHandler">
+ <icon-show :name="permissionList.uploadBtn.source"></icon-show>
+ 涓婁紶
+ </el-button>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="item in iconList" :label="item.lable" :name="item.lable" style="height: calc(100vh - 270px);overflow: auto ">
- <div class="iconList">
+ <div class="iconList" :key="key">
<div class="iconItem" v-for="svg in item.list"
:data-value="svg.name" v-right-click="{action:checkSvg,data:svg}">
<div class="svgContent" v-html="svg.content"></div>
@@ -51,11 +57,11 @@
<pre style="font-size: 12px;color: #909399;margin-top: 0;padding:5px;background-color: #F5F7FA">涓婁紶鏂囦欢涓簀son鏂囦欢锛岀ず渚嬪涓�
[{
"name": "鍥炬爣搴撳悕:鍥炬爣鍚嶇О",
- "svg": "html浠g爜"
+ "svg": "svg鐨刪tml浠g爜"
},
{
"name": "鍥炬爣搴撳悕:鍥炬爣鍚嶇О",
- "svg": "html浠g爜"
+ "svg": "svg鐨刪tml浠g爜"
}]
鏂囦欢鍐呭椤讳弗鏍兼寜鐓хず渚嬫牸寮忥紝name涓哄浘鏍囧簱鍚�+鍥炬爣鍚嶇О锛屼互鈥�:鈥濆垎闅旓紝svg涓哄浘鏍噃tml浠g爜</pre>
</el-dialog>
@@ -87,6 +93,7 @@
import {getStore} from "@/util/store";
import store from "@/store";
import {getToken} from "@/util/auth";
+import {mapGetters} from "vuex";
export default {
name: "index",
@@ -103,6 +110,7 @@
},
data() {
return {
+ key:1,
types: [],
checkedTypes:[],
searchText:'',
@@ -215,6 +223,13 @@
"Authorizationtoken":getToken(),
};
},
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+ uploadBtn: this.vaildData(this.permission[this.$route.query.id].UPLOAD, false),
+ };
+ },
},
watch:{
'form.groups'(val){
@@ -250,6 +265,7 @@
if (this.iconList.length > 0) {
this.activeName = this.iconList[0].lable;
}
+ this.key++;
} else {
this.$message.error(res.data.msg);
}
@@ -473,7 +489,14 @@
}
</script>
-<style scoped>
+<style scoped lang="scss">
+::v-deep{
+ svg{
+ font-size: inherit;
+ height: 100%;
+ width:100%;
+ }
+}
.tag-group{font-size: 14px;}
.el-tag{
margin: 0 0 10px 10px;
@@ -490,7 +513,10 @@
text-align: center;
}
.iconList .iconItem .svgContent{
- font-size: 26px;
+ font-size: 24px;
+ width: 24px;
+ height: 24px;
+ margin: 0 auto;
}
.iconList .iconItem .svgContent:hover{
transform: scale(1.5);
--
Gitblit v1.9.3