From eaf19105916a1b225a0d071cee785e7b75381c5a Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Thu, 2 Apr 2026 17:33:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/antvx6/index.vue | 8 + .../src/components/antvx6/readonlyx6.vue | 696 ++++++++++++++++++ .../frontend/src/components/antvx6/viewx6.vue | 1 - .../frontend/src/store/modules/user.ts | 5 +- .../src/views/business/project/index.vue | 26 +- .../src/views/component/scenario/index.vue | 29 +- 6 files changed, 747 insertions(+), 18 deletions(-) create mode 100644 business-css/frontend/src/components/antvx6/readonlyx6.vue diff --git a/business-css/frontend/src/components/antvx6/index.vue b/business-css/frontend/src/components/antvx6/index.vue index f089d02..30233ab 100644 --- a/business-css/frontend/src/components/antvx6/index.vue +++ b/business-css/frontend/src/components/antvx6/index.vue @@ -1755,6 +1755,14 @@ const boundaryClick = () => { } + + + + \ No newline at end of file diff --git a/business-css/frontend/src/components/antvx6/viewx6.vue b/business-css/frontend/src/components/antvx6/viewx6.vue index d1d8c50..c30ae1e 100644 --- a/business-css/frontend/src/components/antvx6/viewx6.vue +++ b/business-css/frontend/src/components/antvx6/viewx6.vue @@ -137,7 +137,6 @@ function addAttrText(item:any,index:any){ } }, }) -debugger graph.addNode({ shape: 'image-node', x: item.position.x + 135 , diff --git a/business-css/frontend/src/store/modules/user.ts b/business-css/frontend/src/store/modules/user.ts index 249e270..4bb1db6 100644 --- a/business-css/frontend/src/store/modules/user.ts +++ b/business-css/frontend/src/store/modules/user.ts @@ -18,7 +18,7 @@ export const useUserStore = defineStore('user', () => { const roles = ref>([]); // 用户角色编码集合 → 判断路由权限 const perms = ref>([]); // 用户权限编码集合 → 判断按钮权限 const badgeval = ref('') - + const username = ref('') // actions // 登录 @@ -50,6 +50,7 @@ export const useUserStore = defineStore('user', () => { } nickname.value = data.userInfo.nickname; userId.value = data.userInfo.id; + username.value = data.userInfo.username; avatar.value = data.userInfo.avatar; roles.value = data.roles; perms.value = data.permissions; @@ -81,6 +82,7 @@ export const useUserStore = defineStore('user', () => { removeToken(); Token.value = ''; nickname.value = ''; + username.value = ''; userId.value = ''; avatar.value = ''; roles.value = []; @@ -89,6 +91,7 @@ export const useUserStore = defineStore('user', () => { return { Token, nickname, + username, userId, avatar, roles, diff --git a/business-css/frontend/src/views/business/project/index.vue b/business-css/frontend/src/views/business/project/index.vue index 6ef0879..67c918a 100644 --- a/business-css/frontend/src/views/business/project/index.vue +++ b/business-css/frontend/src/views/business/project/index.vue @@ -11,6 +11,14 @@ import { searchProjectsLsit,addProjects,updateProjects,deleteProjects,deleteBatc import Page from '@/components/Pagination/page.vue' import ScenarioModel from '@/views/component/scenario/index.vue' import Antvx6 from '@/components/antvx6/index.vue' +import Readonlyx6 from '@/components/antvx6/readonlyx6.vue' + +import { useUserStore } from '@/store/modules/user'; +const userStore = useUserStore(); + +const username = ref(userStore.username) + + const apiUrl = import.meta.env.VITE_APP_BASE_API; // 基础路径 const isShowAntvx6 = ref(false); // 是否展示分析设计弹窗 const isScenario = ref(false) //是否展示历史模拟场景 @@ -217,7 +225,8 @@ function closeAntvx6() { 导出 删除 + :disabled="multipleSelection.length <= 0" @click="delClick" style="margin-left: 10px" + v-if="username == 'admin'">删除 - - + @@ -274,7 +283,8 @@ function closeAntvx6() { 取 消 - 确 定 + 确 定 @@ -285,8 +295,10 @@ function closeAntvx6() { -
- + +
+ +
diff --git a/business-css/frontend/src/views/component/scenario/index.vue b/business-css/frontend/src/views/component/scenario/index.vue index 2ec2c90..19c1a06 100644 --- a/business-css/frontend/src/views/component/scenario/index.vue +++ b/business-css/frontend/src/views/component/scenario/index.vue @@ -20,6 +20,11 @@ import TableModels from '@/components/antvx6/tableModel.vue'; import EchartsModels from '@/components/antvx6/echartsModel.vue'; import Viewx6 from '@/components/antvx6/viewx6.vue'; +import { useUserStore } from '@/store/modules/user'; +const userStore = useUserStore(); +const username = ref(userStore.username) + + const webUrl = import.meta.env.VITE_APP_BASE_HTTP; // 基础路径 const algorithmTypeData: any = ref([]); // 算法类型数据 const stepsActive = ref(0); // 步骤导航栏当前激活的步骤索引 @@ -431,9 +436,10 @@ function initDeviceData(){ 搜索
- + 新增 删除
@@ -463,26 +469,31 @@ function initDeviceData(){ - - + - - - - + -