项目详情,首页调整
This commit is contained in:
@@ -115,6 +115,7 @@ import ProgressBar from '@comp/ProgressBar'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconWorkingGruop from '@/assets/imgs/icon/icon_working_group.png'
|
||||
import { copyWorkingGroup, checkoutWorkingGroupPrincipal } from '../../api/incomePaymentsApi'
|
||||
import { getAction } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'WorkingGroupProjectManagement',
|
||||
@@ -172,28 +173,52 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听dataSource校验登录人信息
|
||||
dataSource: {
|
||||
handler(val) {
|
||||
let arr = val
|
||||
arr.forEach((item, index) => {
|
||||
// (负责人B不可操作)
|
||||
checkoutWorkingGroupPrincipal({ id: item.id }).then(res => {
|
||||
// 不可操作则置否
|
||||
if (res.success) {
|
||||
item.canOperate = true
|
||||
} else {
|
||||
item.canOperate = false
|
||||
}
|
||||
this.$set(this.dataSource, index, item)
|
||||
})
|
||||
})
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
var params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// 判断登录用户是否为负责人B
|
||||
this.dataSource.forEach((item, index) => {
|
||||
// (负责人B不可操作)
|
||||
checkoutWorkingGroupPrincipal({ id: item.id }).then(res => {
|
||||
// 不可操作则置否
|
||||
if (res.success) {
|
||||
item.canOperate = true
|
||||
} else {
|
||||
item.canOperate = false
|
||||
}
|
||||
this.$set(this.dataSource, index, item)
|
||||
})
|
||||
})
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 文件维护
|
||||
* @param record
|
||||
|
||||
Reference in New Issue
Block a user