【修改】获取领导 修改逻辑
This commit is contained in:
@@ -112,6 +112,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|
||||||
// 第一次进入此页面 需要清楚校验
|
// 第一次进入此页面 需要清楚校验
|
||||||
if (this.$route.query.isBegin) {
|
if (this.$route.query.isBegin) {
|
||||||
// if (this.$route.query.ids.split(',').length > 0) {
|
// if (this.$route.query.ids.split(',').length > 0) {
|
||||||
@@ -188,8 +189,23 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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){
|
if(jiaVlue &&jiaVlue.length > 0){
|
||||||
jiaVlue.forEach(item=>{
|
jiaVlue.forEach(item=>{
|
||||||
this.delData.push({
|
this.delData.push({
|
||||||
@@ -214,6 +230,14 @@ export default {
|
|||||||
this.tableData = data.records.map(item => {
|
this.tableData = data.records.map(item => {
|
||||||
item.oneApprove = item.createUserId || ''
|
item.oneApprove = item.createUserId || ''
|
||||||
item.oneApproveName= item.uploader || ''
|
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']
|
item.reportId = item['id']
|
||||||
delete item['id']
|
delete item['id']
|
||||||
return item
|
return item
|
||||||
|
|||||||
@@ -175,9 +175,9 @@ export default {
|
|||||||
this.isShowSave = true
|
this.isShowSave = true
|
||||||
this.$store.commit('setHandleProcess','')
|
this.$store.commit('setHandleProcess','')
|
||||||
this.handleReset()
|
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.levelId=='3' || this.$store.getters.userInfo.levelId=='4'
|
||||||
||this.$store.getters.userInfo.employeeTypeId=='1' ){
|
)&& this.$store.getters.userInfo.employeeTypeId=='1' ){
|
||||||
this.isShowSave = false
|
this.isShowSave = false
|
||||||
this.isLevel=false
|
this.isLevel=false
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user