From da4e304e70f0650a165ee681c2e50f6ade18e536 Mon Sep 17 00:00:00 2001
From: mors <3067699729@qq.com>
Date: Wed, 12 Apr 2023 10:01:21 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/modulex/ModulexList.vue | 85 ++++++++++++++-----
.../controller/FunctionxController.java | 1 +
2 files changed, 64 insertions(+), 22 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
index c28604d..561330d 100644
--- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
+++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
@@ -50,46 +50,58 @@
class="j-table-force-nowrap"
@change="handleTableChange">
+
-
功能
+
实体
-
- 复制
+
+
+ 撤回
+
+ BUG反馈
+
+ 审核
+
+
+
+
+
+
+
发布
- 开始
+ 开始
+
提交
+
-
- 撤回
-
- BUG反馈
-
- 审核
+
+
+ 复制
- 编辑
+ 编辑
- 详情
+ 详情
+
handleDelete(record.id)">
删除
-
@@ -110,6 +122,7 @@ import ModulexModal from './modules/ModulexModal'
import {getAction} from "@api/manage";
import BugxModal from "@views/modulex/modules/BugxModal";
+import store from "@/store";
export default {
name: 'ModulexList',
@@ -242,26 +255,40 @@ export default {
align: "center",
dataIndex: 'verisonStatus_dictText'
},
+
+ // {
+ // title:'版本号',
+ // align:"center",
+ // dataIndex: 'verison'
+ // },
+ // {
+ // title: '创建时间',
+ // align: "center",
+ // dataIndex: 'createTime'
+ // },
{
title: '管理',
dataIndex: 'htmlSlot',
align: "center",
fixed: "right",
- // width: 147,
+ width:98,
scopedSlots: {customRender: 'htmlSlot'}
},
- // {
- // title:'版本号',
- // align:"center",
- // dataIndex: 'verison'
- // },
+ {
+ title: '功能',
+ dataIndex: 'actionManage',
+ align: "center",
+ fixed: "right",
+ width:147,
+ scopedSlots: {customRender: 'actionManage'}
+ },
{
title: '操作',
- dataIndex: 'action',
+ dataIndex: 'action1',
align: "center",
fixed: "right",
- // width: 147,
- scopedSlots: {customRender: 'action'}
+ width:147,
+ scopedSlots: {customRender: 'action1'}
}
],
url: {
@@ -274,9 +301,14 @@ export default {
},
dictOptions: {},
superFieldList: [],
+ userRole1: '', //管理员是1 其他是2
}
},
created() {
+ let usercode = store.getters.userInfo.id
+ //根据id获得当前登录用户角色
+ this.loginRole(usercode)
+ //console.log('userole1',this.userRole1)
this.getSuperFieldList();
},
computed: {
@@ -285,6 +317,15 @@ export default {
},
},
methods: {
+ loginRole(id){
+ getAction('functionx/functionx/loginrole',{id:id}).then((res)=>{
+ if (res.success) {
+ //重新计算分页问题
+ this.userRole1 = res.result;
+ //console.log('this.userRole1',this.userRole1)
+ }
+ })
+ },
shenhe(record) {
getAction('/modulex/modulex/shenhe', {id: record.id}).then((res) => {
if (res.success) {
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
index bad0dfe..a00e64e 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
@@ -206,6 +206,7 @@ public class FunctionxController extends JeecgController loginrole(@RequestParam(name="id",required=true) String id) {
List list=functionxService.findRole(id);
+ //如果角色是项目管理员或管理员 就返回1 其他的返回 2
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
return Result.OK("1");
else