From 2f56209d3cdfda779aeed6cd30b1c0cc0cda3e70 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期日, 16 六月 2024 13:47:16 +0800
Subject: [PATCH] 修改了权限代码
---
ruoyi-ui/src/views/self/show.vue | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index f831f86..3fcf0ce 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -115,7 +115,7 @@
</el-form>
<div>
- <el-row :gutter="10" class="mb8">
+ <el-row :gutter="10" class="mb8" v-if="userId != 2">
<el-col :span="1.5">
<el-button
type="primary"
@@ -220,7 +220,7 @@
</el-table-column>
<!-- </el-table-column>-->
- <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width">
+ <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width" v-if="userId != 2">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<div class="button-container">
<el-button
@@ -485,7 +485,7 @@
</template>
</el-table-column>
<!-- 鎿嶄綔-->
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
@click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -540,7 +540,7 @@
<template v-else><el-input v-model="scope.row.otherPolitical"></el-input></template>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
@click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -605,7 +605,7 @@
></el-date-picker></template>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
@click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -658,7 +658,7 @@
<template v-else><el-input v-model="scope.row.cause"></el-input></template>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
@click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -910,7 +910,7 @@
//瀵煎叆鎺ュ彛鍑芥暟
import {listNote,enload,getNote, addNote,updateNote, delNote,uploadPic} from "@/api/memo/index";
-
+import {getInfo} from "@/api/login";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
//import { delFamilyevent, uploadPic } from '../../api/bignote'
import { blobValidate } from '../../utils/ruoyi'
@@ -923,6 +923,7 @@
data() {
return {
+ userId: undefined,
uploadFileList: [],
uploadFileList1: [],
// 閬僵灞�
@@ -1295,9 +1296,16 @@
created() {
this.getList();
this.getAutobiographyInfor()
-
+ this.getInfo()
},
methods: {
+ getInfo(){
+ console.log('-----------------')
+ getInfo().then(response=>{
+ console.log(response.user.roles[0].roleId,'roleID')
+ this.userId = response.user.roles[0].roleId
+ })
+ },
handleRemoveFile(file) {
for(let i = 0; i < this.fileListOther.length; i++)
{
@@ -1908,6 +1916,7 @@
}
});
// 娓呯┖formDat瀵硅薄鐨勬暟鎹�
+ this.newOption=undefined
Object.keys(this.formDat).forEach(key => {
this.formDat[key] = '';
});
--
Gitblit v1.9.1