<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      樹形多選

       


      <script setup lang="ts"> import { useVModel } from '@vueuse/core'; const props = defineProps({ modelValue: { type: Object, default: () => { }, }, }); /* AI視覺應用 */ const emit = defineEmits(['update:modelValue']); const form = useVModel(props, 'modelValue', emit); const lastDataHandleai = ref(null); // 上次選擇的dataHandle值 if (form.value) { form.value.aiApplyChecked = form.value.isAi === 1; if (form.value.dataSources) { form.value.dataSourcearr = [form.value.dataSources]; setLastDataHandle1('dataSourcearr'); } if (form.value.outType) { form.value.resultOut = [form.value.outType]; setLastDataHandle1('resultOut'); } _getAlgorithmSceneTree(); } const isOpen3 = ref<boolean>(true); const dataSourceList = ref([ { label: '照片', value: 1 }, { label: '視頻', value: 2 }, ]); const resultOutList = ref([ { label: '同步', value: 1 }, { label: '異步', value: 2 }, ]); // 節點數列表 const checkContentList: any = ref([ ]); function openClose() { isOpen3.value = !isOpen3.value; } // 獲取節點樹 function _getAlgorithmSceneTree() { getAlgorithmSceneTree().then((res) => { if (res.success) { const d = res.data ? res.data : []; let d2 = []; if (d && d.length) { d2 = d.map((item) => { if (item.sceneList && item.sceneList.length) { item.sceneList.forEach((element) => { element.label = element.name; element.value = element.id; }); } return { checkedAll: false, // 全選 indeterminate: false, // 半勾選 checkedList: [], // 選中的 children: item.sceneList, ...item, }; }); checkContentList.value = d2; } } // 編輯回顯檢測內容 if (form.value.detection) { checkEdit(form.value.detection); } }); } function getisAi1(v: any) { form.value.isAi = v ? 1 : 0; // 沒有勾選 檢查內容都置空 if (!v) { form.value.dataSources = ''; form.value.outType = ''; form.value.detection = ''; } } // 編輯回顯檢測內容 function checkEdit(val: any) { const detectionarr = val.split(','); if (checkContentList.value && checkContentList.value.length) { checkContentList.value.forEach((item: any) => { if (item.children && item.children.length) { item.indeterminate = false; item.checkedAll = false; item.checkedList = []; item.children.forEach((itemchild: any) => { detectionarr.forEach((deteitem: any) => { if (+deteitem === itemchild.id) { item.checkedList.push(+deteitem); } }); }); } // 全選半選回顯 if (item.checkedList.length) { item.indeterminate = true; item.checkedAll = false; if (item.children.length === item.checkedList.length) { item.checkedAll = true; item.indeterminate = false; } } }); } } // 監聽變化 watch(() => form.value, (val) => { // console.log('1', val) if (val) { form.value.aiApplyChecked = val.isAi === 1; if (val.dataSources) { form.value.dataSourcearr = [val.dataSources]; setLastDataHandle1('dataSourcearr'); } if (val.outType) { form.value.resultOut = [val.outType]; setLastDataHandle1('resultOut'); } // 編輯回顯檢測內容 if (val.detection) { checkEdit(val.detection); } else { // 切換清空 checkContentList.value.forEach((item: any) => { if (item.children && item.children.length) { item.indeterminate = false; item.checkedAll = false; item.checkedList = []; } // 全選半選回顯 if (item.checkedList.length) { item.indeterminate = true; item.checkedAll = false; if (item.children.length === item.checkedList.length) { item.checkedAll = true; item.indeterminate = false; } } }); } } }, { immediate: true, }); // 檢測內容勾選所有 function checkedAll(e: any, index: any) { checkContentList.value[index].checkedList = e.target.checked ? checkContentList.value[index].children.map(v => v.value) : []; checkContentList.value[index].indeterminate = false; handleAiApply(); } // 檢測內容勾選單個 function checkedOne(val: any, index: any) { const checkedCount = val.length; checkContentList.value[index].checkedAll = checkedCount === checkContentList.value[index].children.length; checkContentList.value[index].indeterminate = checkedCount > 0 && checkedCount < checkContentList.value[index].children.length; handleAiApply(); } function setLastDataHandle1(field: any) { lastDataHandleai.value = form.value[field].length > 0 ? form.value[field][0] : null; } // 處理AI應用 function handleAiApply() { form.value.detection = checkContentList.value.flatMap((o: any) => o.checkedList).join(','); } // 數據來源 function handleAiApply1(checkedValue: any) { form.value.dataSourcearr = checkedValue.filter((item: any) => lastDataHandleai.value !== item); setLastDataHandle1('dataSourcearr'); if (form.value.dataSourcearr && form.value.dataSourcearr.length) { form.value.dataSources = form.value.dataSourcearr[0]; } else { form.value.dataSources = ''; } } // 結果輸出 function handleAiApply2(checkedValue: any) { form.value.resultOut = checkedValue.filter((item: any) => lastDataHandleai.value !== item); setLastDataHandle1('resultOut'); if (form.value.resultOut && form.value.resultOut.length) { form.value.outType = form.value.resultOut[0]; } else { form.value.outType = ''; } } </script> <template> <!-- AI視覺識別應用 全局和單點都需要 --> <!-- 全局 --> <div class="mt-3" :class="isOpen3 ? 'border_box_6' : 'border_box_6_title'" style="z-index: 1;"> <div class="h-12 px-4 flex items-center justify-between"> <div class="flex items-center"> <PubSvgIcon name="ai-icon" size="2.4rem" /> <span class="text-white text-lg font-medium ml-2">AI視覺識別應用信息</span> </div> <div class="flex items-center"> <a-switch v-model:checked="form.aiApplyChecked" @change="getisAi1" /> <PubSvgIcon class="toggle-icon cursor-pointer ml-2" :class="isOpen3 ? '' : 'close'" name="doubleleft" :size="16" @click="openClose()" /> </div> </div> <div v-show="isOpen3" class="p-4"> <a-form v-if="form.aiApplyChecked" :colon="false" label-align="left" :label-col="{ style: { width: '7rem' } }"> <a-form-item label="數據來源"> <a-checkbox-group v-model:value="form.dataSourcearr" :options="dataSourceList" @change="handleAiApply1" /> </a-form-item> <a-form-item> <template #label> <div class="flex items-center"> <span class="mr-1">結果輸出</span> <PubSvgIcon name="notice-icon" size="1.2rem" /> </div> </template> <a-checkbox-group v-model:value="form.resultOut" :options="resultOutList" @change="handleAiApply2" /> </a-form-item> <a-form-item label="檢測內容"> <div v-for="(item, index) in checkContentList" :key="index" class="w-full"> <div class="flex items-center" style="min-height: 32px;"> <!-- 父級 --> <a-checkbox v-model:checked="item.checkedAll" :indeterminate="item.indeterminate" @change="checkedAll($event, index)" > {{ item.name }} </a-checkbox> </div> <div class="pl-4 py-1 -ml-4 mb-3 bg-white/10 flex items-center" style="min-height: 32px;" v-if="item.children?.length"> <a-checkbox-group v-model:value="item.checkedList" :options="item.children" @change="checkedOne($event, index)" /> </div> </div> </a-form-item> </a-form> </div> </div> </template> <style lang="less" scoped> // 展開收起 :deep(.toggle-icon) { transition: all 0.3s ease; transform: rotate(90deg); &.close { transform: rotate(-90deg); } } </style>

       

      posted @ 2024-09-12 17:21  abcByme  閱讀(20)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 一区二区三区激情免费视频| 欧美老熟妇乱子伦牲交视频| 成人aⅴ综合视频国产| 亚洲人成网站18禁止无码| 少妇极品熟妇人妻无码| 无码h片在线观看网站| 成熟熟女国产精品一区二区| 国产极品粉嫩福利姬萌白酱| 护士张开腿被奷日出白浆| 国产无遮挡无码视频在线观看 | 亚洲av无码成人精品区一区| 精品人妻久久久久久888| 亚洲国产综合性亚洲综合性| 国产精品视频亚洲二区| 澄江县| 亚洲国产成人无码电影| 国产999久久高清免费观看| 西城区| 色欲av久久一区二区三区久| 国产成人精品亚洲午夜麻豆| 制服 丝袜 亚洲 中文 综合| 营山县| 亚洲精品成人久久av| 亚洲中文字幕在线无码一区二区| 下面一进一出好爽视频| 精品视频在线观看免费观看| 欧美人成精品网站播放| 久久综合色之久久综合色| 欧美丰满妇大ass| 久久精品国产99国产精品澳门| 精品日本免费一区二区三区| 精品熟女日韩中文十区| 色综合久久天天综线观看| 久久久亚洲欧洲日产国码αv| 天堂mv在线mv免费mv香蕉| 蜜桃臀av在线一区二区| 久久天天躁狠狠躁夜夜躁| 欧美野外伦姧在线观看| 丁香色婷婷国产精品视频| 扒开粉嫩的小缝隙喷白浆视频| 国产精品久久精品|