【修改】获取领导 修改逻辑

This commit is contained in:
zhoulingpo
2023-05-17 17:40:59 +08:00
parent 6fcd227418
commit 3e10351005
2 changed files with 28 additions and 4 deletions
+26 -2
View File
@@ -112,6 +112,7 @@ export default {
}
},
async created() {
// 第一次进入此页面 需要清楚校验
if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
@@ -188,8 +189,23 @@ export default {
}
},
methods: {
getV(newValue,jiaVlue)
{
// 获取领导
getLearder(id){
console.log("获取领导")
return new Promise((resolve,reject)=>{
this.$api.reportProcess.getLeader({
userId:id
}).then(res=>{
if(res.data.length>0){
resolve(res.data)
}else{
resolve('')
}
})
})
},
getV(newValue,jiaVlue) {
if(jiaVlue &&jiaVlue.length > 0){
jiaVlue.forEach(item=>{
this.delData.push({
@@ -214,6 +230,14 @@ export default {
this.tableData = data.records.map(item => {
item.oneApprove = item.createUserId || ''
item.oneApproveName= item.uploader || ''
if(item.createUserId){
this.getLearder(item.createUserId).then(res=>{
if(res){
item.twoApprove = res[0].userId
item.twoApproveName= res[0].userName
}
})
}
item.reportId = item['id']
delete item['id']
return item
+2 -2
View File
@@ -175,9 +175,9 @@ export default {
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
if(this.$store.getters.userInfo.levelId=='1' || this.$store.getters.userInfo.levelId=='2'
if((this.$store.getters.userInfo.levelId=='1' || this.$store.getters.userInfo.levelId=='2'
||this.$store.getters.userInfo.levelId=='3' || this.$store.getters.userInfo.levelId=='4'
||this.$store.getters.userInfo.employeeTypeId=='1' ){
)&& this.$store.getters.userInfo.employeeTypeId=='1' ){
this.isShowSave = false
this.isLevel=false
}else{