Merge branch 'al'

# Conflicts:
#	src/views/task/content/Content.vue
pull/1/head
刘释隆 1 year ago
commit f7d91196e8

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.2 KiB

@ -118,7 +118,7 @@ const options = computed(() => {
</div>
<div class="trigger">
<span>{{ currentCompanyName }}</span>
<span @click="changeFlag = !changeFlag" style="cursor: pointer">icon</span>
<span @click="changeFlag = !changeFlag" style="cursor: pointer"><SvgIcon name="switchCompany" size="24" /></span>
</div>
<div class="item">
<span>AI设置开关</span>

@ -137,13 +137,16 @@ function onCheckAllChange(value) {
}
selectIds.value = value ? ids : [];
}
function onCheckChange(checked: any, item: any) {
const index = selectIds.value.indexOf(item.id);
item.checked = checked;
let currentIndex = offList.value.findIndex(v=>v.id == item.id)
offList.value[currentIndex].checked = item.checked;
if (index === -1 && checked) selectIds.value.push(item.id);
else selectIds.value.splice(index, 1);
}

@ -18,8 +18,6 @@ const props = defineProps({
default: () => [],
},
})
console.log(props.showFieldList)
console.log(props.listItem)
const svgName = computed(() => {
return props.selected ? 'task-select' : 'task'
})

@ -288,10 +288,7 @@ watch(
async (newValue, oldValue) => {
const packageid = taskStore.getPackageid
const taskId = taskStore.getActiveId
console.log(packageid)
console.log(taskId)
setBatch(false)
if (isEmpty(taskId))
return
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)

@ -94,7 +94,15 @@ function generateDefaultList() {
}
const show = ref(false);
const checkAll = ref(false);
const checkAll = computed(()=>{
let baseNum = 0;
offList.value.map((v) => {
if (v.fix) {
baseNum += 1;
}
});
return onList.value.length == offList.value.length-baseNum
});
function showModal() {
show.value = true;
@ -140,7 +148,6 @@ function onCheckAllChange(value) {
for (const item of offShowList.value) {
if (!item.fix) {
item.checked = value;
ids.push(item.id);
}
}
selectIds.value = value ? ids : [];
@ -150,7 +157,7 @@ function onCheckAllChange(value) {
onList.value.push(v);
}
});
onShowList.value = cloneDeep(onList.value)
onShowList.value = cloneDeep(onList.value);
} else {
onList.value = [];
onShowList.value = [];
@ -159,12 +166,14 @@ function onCheckAllChange(value) {
function onCheckChange(checked: any, item: any) {
const index = selectIds.value.indexOf(item.id);
item.checked = checked;
let currentIndex = offList.value.findIndex(v=>v.id == item.id)
offList.value[currentIndex].checked = item.checked;
if (index === -1 && checked) selectIds.value.push(item.id);
else selectIds.value.splice(index, 1);
let currentIndex = offList.value.findIndex((v) => v.id == item.id);
offList.value[currentIndex].checked = checked;
if (index === -1 && checked) {
selectIds.value.push(item.id);
} else {
selectIds.value.splice(index, 1);
}
}
const showIds = computed(() => {
@ -207,6 +216,7 @@ watch(
index--;
}
}
console.log(onShowList.value, list, "onShowList");
}
}
);
@ -245,7 +255,7 @@ function removeHandler(id: string) {
index = offList.value.findIndex((v) => v.id == id);
offList.value[index].checked = false;
offShowList.value = cloneDeep(offList.value)
offShowList.value = cloneDeep(offList.value);
}
const getData = async (type = "") => {
const userStore = useUser();
@ -314,7 +324,7 @@ const indeterminate = computed(() => {
baseNum += 1;
}
});
return onList.value.length > 0 && offList.value.length - baseNum > onList.value.length;
return onShowList.value.length > 0 && offShowList.value.length - baseNum > onShowList.value.length;
});
const queryData = (value, type) => {
if (value) {
@ -326,11 +336,11 @@ const queryData = (value, type) => {
}
} else {
// getData(type);
if(type == "off") {
if (type == "off") {
offShowList.value = cloneDeep(offList.value);
}else{
} else {
onShowList.value = cloneDeep(onList.value);
fixShowList.value = cloneDeep(fixList.value)
fixShowList.value = cloneDeep(fixList.value);
}
}
};

Loading…
Cancel
Save