diff --git a/src/views/final/content/ListContent.vue b/src/views/final/content/ListContent.vue index d48e93b..c9e3656 100644 --- a/src/views/final/content/ListContent.vue +++ b/src/views/final/content/ListContent.vue @@ -46,6 +46,7 @@ const scrollContainer = ref(null) const tableData = ref([]) const finalStore = useFinal() const valuetwo=ref(false) +const loadcheck=ref(false) let num = 1 const pagination = reactive({ page: 1, @@ -61,11 +62,16 @@ const showActions = computed(() => { console.log(haeaderstore) function handleCheck(row: any, showcheck: any) { - if (showcheck == false) { + let num=0 + if (showcheck == false) { console.log(tableData.value) tableData.value.forEach((item) => { if (item.length > 0) { item.forEach((itemx, index) => { + console.log(itemx) + if(itemx.states==2){ + num=num+1 + } if (row.id == itemx.id) itemx.showcheck = true @@ -79,6 +85,9 @@ function handleCheck(row: any, showcheck: any) { tableData.value.forEach((item) => { if (item.length > 0) { item.forEach((itemx, index) => { + if(itemx.states==2){ + num=num+1 + } if (row.id == itemx.id) itemx.showcheck = false @@ -88,6 +97,19 @@ function handleCheck(row: any, showcheck: any) { }) selectionIds.value.pop(row) } + +if(selectionIds.value.length==num){ +valuetwo.value=true +loadcheck.value=false +}else if(selectionIds.value.length { @@ -337,12 +359,15 @@ function tishiok(){ reload() selectionIds.value = [] modal.getData() + } else { message.error(res.message) selectionIds.value = [] + } }) + loadcheck.value=false valuetwo.value=false } // 单个审批通过 @@ -495,10 +520,15 @@ function notpass() { const modal = unref(headerref)! as any initData(1, 20, {}, props.taskvalue) valuetwo.value=false + loadcheck.value=false selectionIds.value = [] modal.getData() // haeaderstore.setDataConfig(true) } +function chekcall(){ + + valuetwo.value=true +} watch( () => finalStore.asideValue, (newVal, oldVal) => { @@ -511,7 +541,7 @@ watch( () => valuetwo.value, (newVal, oldVal) => { let newlist=[] - + let newsels=[] if(valuetwo.value){ tableData.value.map((item)=>{ let ooo=[] @@ -519,7 +549,7 @@ watch( console.log(item[i]) item[i].showcheck=true if(item[i].states == 2){ - selectionIds.value.push(item[i]) + newsels.push(item[i]) } ooo.push(item[i]) @@ -529,9 +559,10 @@ watch( item=ooo newlist.push(item) }) - + selectionIds.value=newsels tableData.value=newlist - }else{ + loadcheck.value=false + }else if(!valuetwo.value&&loadcheck.value==false){ tableData.value.map((item)=>{ let ooo=[] for (let i=0; i提报人排序 -
+
全选
+
+
全选 +