From 72524446c3f1b9512906ff9fd249d23202420114 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 03 九月 2024 00:06:54 +0800
Subject: [PATCH] 修改了权限和家谱图姓名
---
ruoyi-ui/src/api/bignote/index.js | 9 ++++
ruoyi-ui/src/store/modules/user.js | 5 ++
ruoyi-ui/src/views/bignote/index.vue | 60 ++++++++++++++++++------------
ruoyi-ui/src/views/index.vue | 12 +++---
ruoyi-ui/src/views/system/user/index.vue | 20 ++++++++-
ruoyi-ui/src/api/system/user.js | 8 ++--
ruoyi-ui/src/store/getters.js | 3 +
7 files changed, 79 insertions(+), 38 deletions(-)
diff --git a/ruoyi-ui/src/api/bignote/index.js b/ruoyi-ui/src/api/bignote/index.js
index e66861a..34852f9 100644
--- a/ruoyi-ui/src/api/bignote/index.js
+++ b/ruoyi-ui/src/api/bignote/index.js
@@ -131,3 +131,12 @@
params: query
})
}
+
+
+export function showShareUser(userId, menuId) {
+ return request({
+ url: '/family/zfEventShare/shareUser/'+userId+"/"+menuId,
+ method: 'get',
+
+ })
+}
diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index dffe5c2..8c527f0 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -211,18 +211,18 @@
}
// export function get
//淇敼鐖朵翰姣嶄翰
-export function updateFM(uid, tpfid, clanId)
+export function updateFM(uid, tpfid)
{
return request({
- url:'/self/user/uidAndUJd/'+uid+'/'+tpfid+"/"+clanId,
+ url:'/self/user/uidUJd/'+uid+'/'+tpfid,
method: 'get'
})
}
//淇敼鏃堕�夋嫨閰嶅伓
-export function updatePO(tpfid,sex)
+export function updatePO(tpfid,sex, clanId)
{
return request({
- url:'/self/user/uidAndUJd/' + tpfid + '/' + sex,
+ url:'/self/user/uidAndUJd/' + tpfid + '/' + sex+"/"+clanId,
method: 'get'
})
}
diff --git a/ruoyi-ui/src/store/getters.js b/ruoyi-ui/src/store/getters.js
index 2063daf..defe8d8 100644
--- a/ruoyi-ui/src/store/getters.js
+++ b/ruoyi-ui/src/store/getters.js
@@ -1,7 +1,8 @@
const getters = {
sidebar: state => state.app.sidebar,
size: state => state.app.size,
- clanId: state => state.user.clanId,
+ clanId: state => state.user.clanId,
+ userId: state => state.user.userId,
device: state => state.app.device,
dict: state => state.dict.dict,
visitedViews: state => state.tagsView.visitedViews,
diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index 045498d..9adfbb6 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -7,6 +7,7 @@
name: '',
avatar: '',
clanId: '',
+ userId: '',
roles: [],
permissions: []
},
@@ -29,6 +30,9 @@
},
SET_CLANID: (state, clanId) => {
state.clanId = clanId
+ },
+ SET_USERID: (state, userId) => {
+ state.userId = userId
},
},
@@ -74,6 +78,7 @@
}
// console.log(res)
// alert(res.user.clanId)
+ commit('SET_USERID', res.user.userId)
commit('SET_CLANID', res.user.clanId)
commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar)
diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue
index 6ad7398..c6bb794 100644
--- a/ruoyi-ui/src/views/bignote/index.vue
+++ b/ruoyi-ui/src/views/bignote/index.vue
@@ -516,7 +516,8 @@
<script>
-import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
+import { listRole, getRole, delRole, addRole,
+updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
@@ -524,7 +525,7 @@
import {getAllInfo} from "@/api/system/user"
//鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜�
import {listFamilyevent,enload, delFamilyevent , addFamilyevent , uploadPic,
- share,shareToWho,getWhoShare,downShareData,deleteShareData,showShareData
+ share,shareToWho,getWhoShare,downShareData,deleteShareData,showShareData,showShareUser
} from "@/api/bignote/index";
import {listUserAll} from "@/api/root/index";
import {getInfo} from "@/api/login";
@@ -820,28 +821,39 @@
},
getList1() {
this.loading1 = true;
- this.queryParams1.happenStartTime = this.dateRange1.length > 0 && this.dateRange1[0]
- this.queryParams1.happenEndTime = this.dateRange1.length > 0 && this.dateRange1[1]
- // alert(this.$store.state.user.clanId)
- this.listRoot = []
- let clanId = this.$store.state.user.clanId
- getAllInfo(clanId).then(response => {
- this.listRoot = response.data;
- const kon = {}
- console.log(response.data,'userListuserListuserList99999999999999')
- this.listRoot.forEach(element => {
- kon[element['nickName']] = element['userId']
- })
- for(let i in kon){
- this.userOptions.push({label: i,value: kon[i]})
- }
- for(let i in this.userOptions){
- this.userList.push(this.userOptions[i].value)
- }
- console.log(this.userList,'userListuserListuserList99999999999999')
- this.loading1 = false;
- }
- );
+ let userId = this.$store.state.user.userId
+ alert(userId)
+
+ showShareUser(userId, 2013).then(response=>{
+ console.log("===========ddddddddddddd")
+ console.log(response.data)
+ console.log("--------------------")
+ response.data.forEach(element =>{
+ this.userOptions.push({label: element.oldName,value: element.userId})
+ })
+ })
+ // this.queryParams1.happenStartTime = this.dateRange1.length > 0 && this.dateRange1[0]
+ // this.queryParams1.happenEndTime = this.dateRange1.length > 0 && this.dateRange1[1]
+ // // alert(this.$store.state.user.clanId)
+ // this.listRoot = []
+ // let clanId = this.$store.state.user.clanId
+ // getAllInfo(clanId).then(response => {
+ // this.listRoot = response.data;
+ // const kon = {}
+ // console.log(response.data,'userListuserListuserList99999999999999')
+ // this.listRoot.forEach(element => {
+ // kon[element['nickName']] = element['userId']
+ // })
+ // for(let i in kon){
+ // this.userOptions.push({label: i,value: kon[i]})
+ // }
+ // for(let i in this.userOptions){
+ // this.userList.push(this.userOptions[i].value)
+ // }
+ // console.log(this.userList,'userListuserListuserList99999999999999')
+ // this.loading1 = false;
+ // }
+ // );
},
// 纭鍒嗕韩
subShare(row) {
diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue
index 97d95f2..a38b201 100644
--- a/ruoyi-ui/src/views/index.vue
+++ b/ruoyi-ui/src/views/index.vue
@@ -98,24 +98,24 @@
if (mpdata == null)
return null;
var data = {
- "label": mpdata['spouse'] != null ? eval(mpdata['spouse']).nickName : '',
- "prop": mpdata['nickName'],
+ "label": mpdata['spouse'] != null ? eval(mpdata['spouse']).oldName : '',
+ "prop": mpdata['oldName'],
"url": mpdata['url']!=null?'https://www.bendudu.com:8080/'+mpdata['url']:tp,
"purl": mpdata['spouse'] != null ? (mpdata['spouse'].url!=null? 'https://www.bendudu.com:8080/'+mpdata['spouse'].url:tp):tp,
"id": mpdata['userId'],
- "link": mpdata['nickName'],
+ "link": mpdata['oldName'],
"children": []
};
if (mpdata['childList'] != null) {
for (var i = 0; i < mpdata['childList'].length; i++) {
var dt = {
- "label": mpdata['childList'][i]['spouse'] != null ? eval(mpdata['childList'][i]['spouse']).nickName : "",
- "prop": mpdata['childList'][i]['nickName'],
+ "label": mpdata['childList'][i]['spouse'] != null ? eval(mpdata['childList'][i]['spouse']).oldName : "",
+ "prop": mpdata['childList'][i]['oldName'],
"url": mpdata['childList'][i]['url']!=null?'https://www.bendudu.com:8080/'+mpdata['childList'][i]['url']:tp,
"id": mpdata['childList'][i]['userId'],
"purl": (mpdata['childList'][i]['spouse'] != null ) ?( mpdata['childList'][i]['spouse'].url!= null?'https://www.bendudu.com:8080/'+mpdata['childList'][i]['spouse'].url:tp):tp,
- "link": mpdata['childList'][i]['nickName'],
+ "link": mpdata['childList'][i]['oldName'],
"children": []
};
if (mpdata['childList'][i]['childList'] != null) {
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 06aded8..993c35a 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -373,6 +373,7 @@
data() {
return {
// 淇敼閰嶅伓鏃剁殑鐢ㄦ埛id鍜宻ex
+ originRole: undefined,
sex:'',
pOID:'',
a:undefined,
@@ -600,8 +601,8 @@
}
//alert(this.cuid)
+ let clanId = this.$store.state.user.clanId
- //alert(fid)
updateFM(this.cuid, fid).then(response => {
//alert(response.data)
if(!response.data)
@@ -646,8 +647,9 @@
_this.$set(_this.form,'fid','');
return;
}
-
- //alert(fid)
+ let clanId = this.$store.state.user.clanId
+ alert(fid)
+ alert(this.cuid)
updateFM(this.cuid, fid).then(response => {
//alert(response.data)
if(!response.data)
@@ -906,9 +908,16 @@
console.log("==============_________________000000000")
_this.$set(_this.form,'spouseId',response.data.spouseId);
if(response.data.roleId==3)
+ {
+ _this.originRole = 102
+
_this.$set(_this.form,'role',102);
+ }
else
+ {
+ _this.originRole = 2
_this.$set(_this.form,'role',response.data.roleId);
+ }
// alert(_this.form.fid)
_this.zinfid = response.data.userId
// alert(78)
@@ -960,6 +969,11 @@
fm.sex = this.form.sex
// alert(fm.sex)
fm.status = this.form.status
+ if(this.originRole==102 && fm.roleId==2)
+ {
+ this.$modal.msgSuccess("瀹跺涵鐢ㄦ埛涓嶈兘淇敼涓烘櫘閫氱敤鎴�");
+ return
+ }
fm.fid = this.form.fid
fm.mid = this.form.mid
// alert(this.form.isMyFamily)
--
Gitblit v1.9.1