feat: 去除任务审批字段全选功能

pull/193/head
刘释隆 1 year ago
parent 2d53182446
commit da37a816bb

@ -40,6 +40,7 @@ const checkAll = computed(() => {
offList.value.map((v) => {
if (v.fix)
baseNum += 1
return v
})
return onList.value.length == offList.value.length - baseNum
})
@ -58,9 +59,11 @@ async function handleSumbit(e: MouseEvent) {
let userFieldFixed = ''
fixList.value.map((v) => {
userFieldFixed += `${v.id},`
return v
})
onList.value.map((v) => {
userFieldFixed += `${v.id},`
return v
})
userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1)
savefield(props.reviewType, userInfo.id, userFieldFixed)
@ -93,6 +96,7 @@ function onCheckAllChange(value) {
offList.value.map((v) => {
if (!v.checked)
onList.value.push(v)
return v
})
onShowList.value = cloneDeep(onList.value)
}
@ -248,6 +252,7 @@ async function getData(type = '') {
if (item.fix)
fixList.value.push(item)
else offList.value.push(item)
return v
})
offList.value.unshift(...fixList.value)
}
@ -265,6 +270,7 @@ async function getData(type = '') {
if (!item.fix)
onList.value.push(item)
}
return v
})
}
offShowList.value = cloneDeep(offList.value)
@ -279,6 +285,7 @@ const indeterminate = computed(() => {
offList.value.map((v) => {
if (v.fix)
baseNum += 1
return v
})
return (
onShowList.value.length > 0
@ -347,14 +354,14 @@ const moreThanSix = computed(() => {
</template>
</n-input>
<div class="draggable-ul">
<div class="draggable-li" :class="{ checkAll: indeterminate }">
<!-- <div class="draggable-li" :class="{ checkAll: indeterminate }">
<n-checkbox
v-model:checked="checkAll"
label="全选"
:indeterminate="indeterminate"
@update:checked="onCheckAllChange"
/>
</div>
</div> -->
<div class="content">
<div
v-for="item in offShowList"

Loading…
Cancel
Save