刘洋 8 ay önce
ebeveyn
işleme
4bca26bf22
1 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  1. 9 3
      src/render/views/RecognizeCheck/index.vue

+ 9 - 3
src/render/views/RecognizeCheck/index.vue

@@ -129,16 +129,21 @@ const router = useRouter();
 const route = useRoute();
 
 // condition action
+const conditionListAll = ref<RecognizeConditionItem[]>([]);
 const conditionList = ref<RecognizeConditionItem[]>([]);
 const conditionMap = ref<Record<string, string>>({});
-async function getConditionList() {
+async function getConditionListAll() {
   const res = await recognizeConditionsListAll();
 
-  conditionList.value = res || [];
-  conditionList.value.forEach((item) => {
+  conditionListAll.value = res || [];
+  conditionListAll.value.forEach((item) => {
     conditionMap.value[item.code] = item.name;
   });
 }
+async function getConditionList() {
+  const res = await recognizeConditionsList();
+  conditionList.value = res || [];
+}
 
 // datalist
 const searchModel = reactive({
@@ -326,6 +331,7 @@ async function onDelete(index: number) {
 onMounted(async () => {
   if (route.name !== "RecognizeCheck") return;
 
+  await getConditionListAll();
   await getConditionList();
   await toPage(1);
 });