diff --git a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue
index 157755c..b78cf4a 100644
--- a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue
+++ b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue
@@ -89,7 +89,7 @@
- 项目权限
+ 项目权限
@@ -145,7 +145,7 @@
- 查询
+ 查询
{
this.dataForm.projectOwnerList=data.rows
})
- this.searchUserRoll();
+ this.searchUserRollAll();
}
})
}else {
@@ -545,7 +545,7 @@
finalCustomerId:'',
finalCustomerName:'',
}
- this.searchUserRoll();
+ this.searchUserRollAll();
}
if (requestCustomer){
@@ -553,20 +553,26 @@
}
this.visible = true
},
- searchUserRoll(val){
- let arr = []
- if (val === 'none'){// 判断是否走搜索的方法
- arr =JSON.parse(JSON.stringify(this.userRoleList));
- }
+ searchUserRoll(){
let inData3={
site:this.dataForm.site,
projectId:this.dataForm.projectId,
username:this.userRoleForm.username,
userDisplay:this.userRoleForm.userDisplay,
}
+ searchUserRoll(inData3).then(({data}) => {
+ this.userRoleList=data.rows;
+ // this.userRollModal();
+ })
+ },
+ searchUserRollAll(){
+ let inData3={
+ site:this.dataForm.site,
+ projectId:this.dataForm.projectId,
+ }
searchUserRoll(inData3).then(({data}) => {
this.dataForm.userRoleList=data.rows;
- this.userRollModal(undefined,arr);
+ // this.userRollModal();
})
},
managerChooseModal(){
@@ -615,27 +621,21 @@
this.dataForm.projectOwnerList=JSON.parse(JSON.stringify(this.projectOwnerList));
this.ownerFlag=false
},
- userRollModal(val,arr){
- this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList));
+ userRollModal(){
+ // console.log(this.dataForm.userRoleList)
+ // console.log(this.userRoleList)
+ // this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList));
+
+ this.searchUserRoll()
for (let i = 0; i 0){
- // for (let i = 0; i < this.userRoleList.length; i++) {
- // let row = arr[i]
- // if (arr[i].username !== this.$store.state.user.name){
- // row = arr.find(item => item.username === arr[i].username)
- // }
- // this.$set(this.userRoleList, i, row)
- // }
- // }
- if (val === 'none'){
+
this.userRoleFlag=true
- }
+
},
saveUserList(){
for (let i = 0; i item.username != this.userRoleList[i].username)
if(this.userRoleList[i].searchCheck||this.userRoleList[i].updateCheck||this.userRoleList[i].downCheck||this.userRoleList[i].deleteCheck){
- name[i]=this.userRoleList[i].userDisplay
+ this.dataForm.userRoleList.push(this.userRoleList[i])
}
+ console.log("this.dataForm.userRoleList")
+ console.log(this.dataForm.userRoleList)
}
- this.dataForm.userRoleName=name.join(';')
- this.dataForm.userRoleList=JSON.parse(JSON.stringify(this.userRoleList));
+ for (let i = 0; i < this.dataForm.userRoleList.length; i++) {
+ if(this.dataForm.userRoleList[i].searchCheck||this.dataForm.userRoleList[i].updateCheck
+ ||this.dataForm.userRoleList[i].downCheck||this.dataForm.userRoleList[i].deleteCheck){
+ name+=this.dataForm.userRoleList[i].userDisplay+';'
+ }
+ }
+ this.dataForm.userRoleName=name
+ // this.dataForm.userRoleList=JSON.parse(JSON.stringify(this.userRoleList));
this.userRoleFlag=false
+
},
changeAll(row){
if(row.checkAll){