|
|
|
@ -72,7 +72,13 @@ |
|
|
|
<!-- <span slot="label" style="" @click="getBaseList(102,2)"><a herf="#">终端客户</a></span>--> |
|
|
|
<!-- <el-input v-model="dataForm.finalCustomerId" @blur="getCustomerName(2)"></el-input>--> |
|
|
|
|
|
|
|
<dict-data-select v-model="dataForm.finalCustomerId" clearable filterable dict-type="finalCustomer" :use-default-value="false"></dict-data-select> |
|
|
|
<dict-data-select v-model="dataForm.finalCustomerId" clearable filterable dict-type="finalCustomer" :use-default-value="true"></dict-data-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="Product set"> |
|
|
|
<dict-data-select v-model="dataForm.productSet" clearable filterable dict-type="productSet" :use-default-value="true"></dict-data-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -312,6 +318,7 @@ |
|
|
|
projectManagerList:[], |
|
|
|
projectOwnerList:[], |
|
|
|
userRoleList:[], |
|
|
|
productSet:'', |
|
|
|
}, |
|
|
|
userRoleForm:{ |
|
|
|
username:'', |
|
|
|
@ -530,16 +537,18 @@ |
|
|
|
id: 0, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
projectLevel:1, |
|
|
|
customerProjectNo:'', |
|
|
|
projectId:'', |
|
|
|
projectTypeDb:'', |
|
|
|
projectType:'', |
|
|
|
customerName:'', |
|
|
|
finalCustomerName:'', |
|
|
|
customerId:'', |
|
|
|
finalCustomerId:'', |
|
|
|
projectName:'', |
|
|
|
projectDesc:'', |
|
|
|
needDate:'', |
|
|
|
priority:'', |
|
|
|
customerProjectNo:'', |
|
|
|
projectSource:'', |
|
|
|
priorityDesc:'', |
|
|
|
projectSourceDesc:'', |
|
|
|
@ -550,12 +559,10 @@ |
|
|
|
userRoleName:'', |
|
|
|
projectManagerList:[], |
|
|
|
projectOwnerList:[], |
|
|
|
buNo:'', |
|
|
|
buDesc:'', |
|
|
|
finalCustomerId:'', |
|
|
|
finalCustomerName:'', |
|
|
|
userRoleList:[], |
|
|
|
productSet:'', |
|
|
|
} |
|
|
|
this.searchUserRollAll(); |
|
|
|
// this.searchUserRollAll(); |
|
|
|
} |
|
|
|
|
|
|
|
if (requestCustomer){ |
|
|
|
@ -572,6 +579,36 @@ |
|
|
|
} |
|
|
|
searchUserRoll(inData3).then(({data}) => { |
|
|
|
this.userRoleList=data.rows; |
|
|
|
|
|
|
|
for (let j = 0; j <this.userRoleList.length?this.userRoleList.length:-1 ; j++) { |
|
|
|
let checkData=this.dataForm.userRoleList.filter(item => item.username === this.userRoleList[j].username) |
|
|
|
if(checkData.length>0){ |
|
|
|
this.userRoleList[j].deleteCheck=checkData[0].deleteCheck |
|
|
|
this.userRoleList[j].deleteFlag=checkData[0].deleteFlag |
|
|
|
this.userRoleList[j].downCheck=checkData[0].downCheck |
|
|
|
this.userRoleList[j].downFlag=checkData[0].downFlag |
|
|
|
this.userRoleList[j].searchCheck=checkData[0].searchCheck |
|
|
|
this.userRoleList[j].searchFlag=checkData[0].searchFlag |
|
|
|
this.userRoleList[j].updateCheck=checkData[0].updateCheck |
|
|
|
this.userRoleList[j].checkAll=checkData[0].checkAll |
|
|
|
}else { |
|
|
|
this.userRoleList[j].deleteCheck=false |
|
|
|
this.userRoleList[j].deleteFlag='N' |
|
|
|
this.userRoleList[j].downCheck=false |
|
|
|
this.userRoleList[j].downFlag='N' |
|
|
|
this.userRoleList[j].searchCheck=false |
|
|
|
this.userRoleList[j].searchFlag='N' |
|
|
|
this.userRoleList[j].updateCheck=false |
|
|
|
this.userRoleList[j].checkAll=false |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
for (let i = 0; i <this.userRoleList.length ; i++) { |
|
|
|
if(this.userRoleList[i].username===this.$store.state.user.name){ |
|
|
|
this.userRoleList[i].checkAll=true; |
|
|
|
// this.changeAll(this.userRoleList[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
// this.userRollModal(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -602,6 +639,7 @@ |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.projectManagerList[i]) |
|
|
|
if(select.length>0){ |
|
|
|
projectManagerName+=select[0].operatorName+';' |
|
|
|
this.addRollForUsername(select[0].operatorId,select[0].operatorName); |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataForm.projectManagerName=projectManagerName |
|
|
|
@ -625,22 +663,61 @@ |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.projectOwnerList[i]) |
|
|
|
if(select.length>0){ |
|
|
|
projectOwnerName+=select[0].operatorName+';' |
|
|
|
this.addRollForUsername(select[0].operatorId,select[0].operatorName); |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataForm.projectOwnerName=projectOwnerName |
|
|
|
this.dataForm.projectOwnerList=JSON.parse(JSON.stringify(this.projectOwnerList)); |
|
|
|
this.ownerFlag=false |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
addRollForUsername(username,userDisplay){ |
|
|
|
console.log(username) |
|
|
|
console.log(userDisplay) |
|
|
|
console.log(this.dataForm.userRoleList.length) |
|
|
|
debugger |
|
|
|
if(this.dataForm.userRoleList.length>0) { |
|
|
|
let checkList = this.dataForm.userRoleList.filter(item => item.username === username) |
|
|
|
if (checkList.length === 0) { |
|
|
|
this.dataForm.userRoleList.push({ |
|
|
|
checkAll: true, |
|
|
|
deleteCheck: true, |
|
|
|
deleteFlag: 'Y', |
|
|
|
downCheck: true, |
|
|
|
downFlag: 'Y', |
|
|
|
searchCheck: true, |
|
|
|
searchFlag: 'Y', |
|
|
|
updateCheck: true, |
|
|
|
updateFlag: 'Y', |
|
|
|
userDisplay: userDisplay, |
|
|
|
username: username, |
|
|
|
}) |
|
|
|
this.dataForm.userRoleName += userDisplay + ';' |
|
|
|
} |
|
|
|
}else { |
|
|
|
console.log(username) |
|
|
|
console.log(userDisplay) |
|
|
|
this.dataForm.userRoleList=[{ |
|
|
|
checkAll: true, |
|
|
|
deleteCheck: true, |
|
|
|
deleteFlag: 'Y', |
|
|
|
downCheck: true, |
|
|
|
downFlag: 'Y', |
|
|
|
searchCheck: true, |
|
|
|
searchFlag: 'Y', |
|
|
|
updateCheck: true, |
|
|
|
updateFlag: 'Y', |
|
|
|
userDisplay: userDisplay, |
|
|
|
username: username, |
|
|
|
}] |
|
|
|
this.dataForm.userRoleName = userDisplay + ';' |
|
|
|
} |
|
|
|
}, |
|
|
|
userRollModal(){ |
|
|
|
// this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList)); |
|
|
|
|
|
|
|
this.searchUserRoll() |
|
|
|
for (let i = 0; i <this.userRoleList.length ; i++) { |
|
|
|
if(this.userRoleList[i].username===this.$store.state.user.name){ |
|
|
|
this.userRoleList[i].checkAll=true; |
|
|
|
this.changeAll(this.userRoleList[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.userRoleFlag=true |
|
|
|
|
|
|
|
|