@@ -88,7 +88,7 @@ | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="detail.isApply || !detail.id" | |||
:disabled="judge(detail)" | |||
>申请成为配合部门</el-link | |||
> | |||
</el-popconfirm></span | |||
@@ -233,16 +233,17 @@ export default { | |||
this.searchParams = data; | |||
this.getDataList(); | |||
}, | |||
judge(row) { | |||
judge(detail) { | |||
let arr = [].concat( | |||
row.cooperateDept | |||
? row.cooperateDept.split(",").map((item) => parseInt(item)) | |||
detail.cooperateDept | |||
? detail.cooperateDept.split(",").map((item) => parseInt(item)) | |||
: [], | |||
row.leaderDept | |||
? row.leaderDept.split(",").map((item) => parseInt(item)) | |||
detail.leaderDept | |||
? detail.leaderDept.split(",").map((item) => parseInt(item)) | |||
: [] | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
arr.push(parseInt(detail.leaderDept)) | |||
let bool = arr.includes(this.user.user.deptId) || detail.isApply || !detail.id; | |||
return bool; | |||
}, | |||
getDataList() { |
@@ -102,7 +102,7 @@ | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="row.isApply || !row.id" | |||
:disabled="judge(row)" | |||
>申请成为配合部门</el-link | |||
> | |||
</template> | |||
@@ -234,7 +234,8 @@ export default { | |||
? row.leaderDept.split(",").map((item) => parseInt(item)) | |||
: [] | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
arr.push(parseInt(row.leaderDept)) | |||
let bool = arr.includes(this.user.user.deptId) || row.isApply || !row.id; | |||
return bool; | |||
}, | |||
updateParams(data) { |
@@ -90,7 +90,7 @@ | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="row.isApply || !row.id" | |||
:disabled="judge(row)" | |||
>申请成为配合部门</el-link | |||
> | |||
</template> | |||
@@ -220,7 +220,8 @@ export default { | |||
? row.leaderDept.split(",").map((item) => parseInt(item)) | |||
: [] | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
arr.push(parseInt(row.leaderDept)) | |||
let bool = arr.includes(this.user.user.deptId) || row.isApply || !row.id; | |||
return bool; | |||
}, | |||
updateParams(data) { |
@@ -102,7 +102,7 @@ | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="row.isApply || !row.id" | |||
:disabled="judge(row)" | |||
>申请成为配合部门</el-link | |||
> | |||
</template> | |||
@@ -233,7 +233,8 @@ export default { | |||
? row.leaderDept.split(",").map((item) => parseInt(item)) | |||
: [] | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
arr.push(parseInt(row.leaderDept)) | |||
let bool = arr.includes(this.user.user.deptId) || row.isApply || !row.id | |||
return bool; | |||
}, | |||
updateParams(data) { |