|
@@ -56,7 +56,7 @@
|
|
<el-checkbox-group v-model="checkboxUserList">
|
|
<el-checkbox-group v-model="checkboxUserList">
|
|
<template v-for="item in signUserList" :key="item.certificateUserId">
|
|
<template v-for="item in signUserList" :key="item.certificateUserId">
|
|
<div class="user-item checkbox-li">
|
|
<div class="user-item checkbox-li">
|
|
- <el-checkbox :label="`${item.certificateUserName}-${item.certificateUserId}`">
|
|
|
|
|
|
+ <el-checkbox :label="`${item.certificateUserName}-${item.certificateUserId}`" :disabled="item.isDisa">
|
|
<div class="item-user-name">{{ item.certificateUserName }}</div>
|
|
<div class="item-user-name">{{ item.certificateUserName }}</div>
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</div>
|
|
</div>
|
|
@@ -131,7 +131,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
|
+import { nextTick, onMounted, ref, watch } from 'vue'
|
|
import tasksFlowApi from '~api/tasks/flow'
|
|
import tasksFlowApi from '~api/tasks/flow'
|
|
import { arrIndex, arrToKey, deepClone, getArrValue } from 'js-fast-way'
|
|
import { arrIndex, arrToKey, deepClone, getArrValue } from 'js-fast-way'
|
|
import Draggable from 'vuedraggable'
|
|
import Draggable from 'vuedraggable'
|
|
@@ -226,6 +226,8 @@ watch(() => [
|
|
console.log(fixedBranchList.value, 'fixedBranchList.value')
|
|
console.log(fixedBranchList.value, 'fixedBranchList.value')
|
|
if ( fixedBranchList.value.length > 0) {
|
|
if ( fixedBranchList.value.length > 0) {
|
|
curItem.value = fixedBranchList.value[0]
|
|
curItem.value = fixedBranchList.value[0]
|
|
|
|
+
|
|
|
|
+ chekckTask( curItem.value)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
//监听
|
|
//监听
|
|
@@ -260,26 +262,26 @@ watch(() => [
|
|
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-watch(() => [
|
|
|
|
-fixedBranchList.value,
|
|
|
|
-], ([list]) => {
|
|
|
|
- fixedBranchList.value = list
|
|
|
|
- const userIdList = arrToKey(fixedBranchList.value, 'userIds', ',')
|
|
|
|
- const { isWarn, element } = hasDuplicates(userIdList.split(','))
|
|
|
|
- if (isWarn) {
|
|
|
|
- checkboxUserList.value.forEach((ele, index)=>{
|
|
|
|
- if (ele.split('-')[1] === element) {
|
|
|
|
- window.$message.warning('不能选择重复的任务人员' + ele.split('-')[0])
|
|
|
|
- checkboxUserList.value.splice(index, 1)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+// watch(() => [
|
|
|
|
+// fixedBranchList.value,
|
|
|
|
+// ], ([list]) => {
|
|
|
|
+// fixedBranchList.value = list
|
|
|
|
+// const userIdList = arrToKey(fixedBranchList.value, 'userIds', ',')
|
|
|
|
+// const { isWarn, element } = hasDuplicates(userIdList.split(','))
|
|
|
|
+// if (isWarn) {
|
|
|
|
+// checkboxUserList.value.forEach((ele, index)=>{
|
|
|
|
+// if (ele.split('-')[1] === element) {
|
|
|
|
+// window.$message.warning('不能选择重复的任务人员' + ele.split('-')[0])
|
|
|
|
+// checkboxUserList.value.splice(index, 1)
|
|
|
|
+// }
|
|
|
|
+// })
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
-}, {
|
|
|
|
- deep:true,
|
|
|
|
-},
|
|
|
|
-)
|
|
|
|
|
|
+// }, {
|
|
|
|
+// deep:true,
|
|
|
|
+// },
|
|
|
|
+// )
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -510,9 +512,21 @@ const delTask = async (item, index)=>{
|
|
checkboxUserList.value = []
|
|
checkboxUserList.value = []
|
|
}
|
|
}
|
|
const curItem = ref(null)
|
|
const curItem = ref(null)
|
|
-const chekckTask = (item)=>{
|
|
|
|
|
|
+const selectUserIds = ref([])
|
|
|
|
+const chekckTask = async (item)=>{
|
|
|
|
+ await queryAllRoleList()
|
|
curItem.value = item
|
|
curItem.value = item
|
|
setUserDataList(item.users)
|
|
setUserDataList(item.users)
|
|
|
|
+ //设置已选择过的用户置灰
|
|
|
|
+ selectUserIds.value = arrToKey(fixedBranchList.value, 'userIds', ',').split(',')
|
|
|
|
+ signUserList.value.forEach((ele)=>{
|
|
|
|
+ selectUserIds.value.forEach((ele1)=>{
|
|
|
|
+ if (ele.certificateUserId === ele1) {
|
|
|
|
+ ele.isDisa = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|