From aef876fd5e4f26eead249243b1523ec4cf355340 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期一, 10 六月 2024 12:10:09 +0800
Subject: [PATCH] 用户修改,删除,增加进行了修改
---
ruoyi-ui/src/views/bignote/familyeventInfo.vue | 2
ruoyi-ui/src/views/system/user/index.vue | 56 +++++++++++++++------------
ruoyi-ui/src/api/system/user.js | 4 +-
3 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index 027b6f1..3ab2ef9 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -30,8 +30,8 @@
// 淇敼鐢ㄦ埛
export function updateUser(data) {
return request({
- url: '/system/user',
- method: 'put',
+ url: '/system/user/updateUserInfo',
+ method: 'post',
data: data
})
}
diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
index dd11604..794b00e 100644
--- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue
+++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -518,7 +518,7 @@
},
handleDownload(url) {
var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
-
+ alert(formData['path'])
let lens = formData.path.split(".")
let suffix = lens[lens.length-1]
download(formData).then(async (response) => {
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index ce425f0..86c97b2 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -409,6 +409,7 @@
faid: 0,
maid: 0,
form: {},
+ zinfid: undefined,
defaultProps: {
children: "children",
label: "label"
@@ -514,7 +515,6 @@
if(this.fid!="-1")
{
//鏌ヨ涓嶆槸鏈鐨勬椂鍊欙紝鍙互閫夋嫨鐨勯厤鍋朵俊鎭�
- alert(this.fid)
getInfoByFid(this.fid).then(response=>{
console.log("--------------------")
@@ -529,21 +529,18 @@
},
handleFamily()
{
- alert(this.form.isMyFamily)
+
if(this.form.isMyFamily=="0")
this.isshowMri = true
},
getAllIn(){
- // alert(123)
getAllInfo().then(response => {
// this.allInfo = response.data;
// console.log(response.data)
- // alert(982)
})
},
getRole(){
this.form.roleIds = []
- //alert(123)
this.form.roleIds.push(this.rt)
},
getFamlilyInfo(){
@@ -671,7 +668,6 @@
handleUpdate(row) {
this.reset();
const userId = row.userId || this.ids;
- // alert(userId)
// this.fid = response.data.familyId
//alert(this.fid)
@@ -687,10 +683,12 @@
getIndividual(userId).then(response => {
// alert(123)
+ console.log('++++++++-----0000((((((9999))))))')
console.log(response.data)
if(response.data!=undefined)
{
_this.fid = response.data.familyId;
+ _this.zinfid = response.data.userId
}
}
);
@@ -723,14 +721,9 @@
/** 鎻愪氦鎸夐挳 */
submitForm: function() {
this.$refs["form"].validate(valid => {
- //alert(valid)
- // alert(this.fid)
- //alert(this.rt)
- // alert(this.form.roleIds)
let ps = true
- // alert(this.rt)
- // alert(this.fid)
+
if(this.fid=="鏃�")
this.fid = -1
let _this = this
@@ -744,36 +737,49 @@
this.$modal.msgSuccess("瀹跺涵鎴愬憳锛屽繀椤昏鎷ユ湁瀹跺涵鍙凤紒");
return
}
- // alert(ps)
+
if(ps)
{
let fm = {}
- fm.userId = _this.form.userId
-
+ fm.userId = _this.zinfid;
+ fm.nickName = this.form.nickName
+ fm.roleId =this.rt
+ fm.sex = this.form.sex
+ fm.status = this.form.status
+ fm.familyId = this.fid
+
+ fm.isMyFamily = this.form.isMyFamily
+ fm.spouseId = this.form.spouseId
+ fm.sysId = this.form.userId
+
if(_this.fid==="鏃�")
fm.familyId= -1
else
fm.familyId = _this.fid
this.form.familyId = fm.familyId
-
+ console.log(fm)
if (valid) {
if (this.form.userId != undefined) {
- updateUser(this.form).then(response => {
+ updateUser(fm).then(response => {
-
- updateUserInfo(fm).then(response=>{
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
+ this.open = false;
this.getList();
_this.rt = undefined
_this.fid = "鏃�"
this.isshowMar = false
this.isshowMri = false
- })
- });
+ // updateUserInfo(fm).then(response=>{
+ // this.$modal.msgSuccess("淇敼鎴愬姛");
+ // this.open = false;
+ // this.getList();
+ // _this.rt = undefined
+ // _this.fid = "鏃�"
+ // this.isshowMar = false
+ // this.isshowMri = false
+ // })
+ });
} else {
- // alert(this.form.ismarry)
- // alert(987)
+
addUser(this.form).then(response => {
this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
--
Gitblit v1.9.1