|
@@ -85,6 +85,7 @@
|
|
<ModifyRecognizeCheckTask
|
|
<ModifyRecognizeCheckTask
|
|
ref="modifyRecognizeCheckTaskRef"
|
|
ref="modifyRecognizeCheckTaskRef"
|
|
:row-data="curRow"
|
|
:row-data="curRow"
|
|
|
|
+ :condition-list="conditionList"
|
|
@modified="getList"
|
|
@modified="getList"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
@@ -100,13 +101,17 @@ import { message } from "ant-design-vue";
|
|
import type { TableProps } from "ant-design-vue";
|
|
import type { TableProps } from "ant-design-vue";
|
|
|
|
|
|
import useTable from "@/hooks/useTable";
|
|
import useTable from "@/hooks/useTable";
|
|
-import { RecognizeCheckListItem } from "@/ap/types/recognizeCheck";
|
|
|
|
|
|
+import {
|
|
|
|
+ RecognizeCheckListItem,
|
|
|
|
+ RecognizeConditionItem,
|
|
|
|
+} from "@/ap/types/recognizeCheck";
|
|
import {
|
|
import {
|
|
recognizeCheckListPage,
|
|
recognizeCheckListPage,
|
|
recognizeCheckTaskDelete,
|
|
recognizeCheckTaskDelete,
|
|
recognizeCheckResetTask,
|
|
recognizeCheckResetTask,
|
|
recognizeCheckBuildTask,
|
|
recognizeCheckBuildTask,
|
|
recognizeCheckTaskStatusSave,
|
|
recognizeCheckTaskStatusSave,
|
|
|
|
+ recognizeConditionsList,
|
|
} from "@/ap/recognizeCheck";
|
|
} from "@/ap/recognizeCheck";
|
|
import { showConfirm } from "@/utils/uiUtils";
|
|
import { showConfirm } from "@/utils/uiUtils";
|
|
import { useUserStore } from "@/store";
|
|
import { useUserStore } from "@/store";
|
|
@@ -121,6 +126,20 @@ const userStore = useUserStore();
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
|
+
|
|
|
|
+// condition action
|
|
|
|
+const conditionList = ref<RecognizeConditionItem[]>([]);
|
|
|
|
+const conditionMap = ref<Record<string, string>>({});
|
|
|
|
+async function getConditionList() {
|
|
|
|
+ const res = await recognizeConditionsList();
|
|
|
|
+
|
|
|
|
+ conditionList.value = res || [];
|
|
|
|
+ conditionList.value.forEach((item) => {
|
|
|
|
+ conditionMap.value[item.code] = item.name;
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// datalist
|
|
const searchModel = reactive({
|
|
const searchModel = reactive({
|
|
examId: userStore.curExam.id,
|
|
examId: userStore.curExam.id,
|
|
subjectCode: "",
|
|
subjectCode: "",
|
|
@@ -220,8 +239,9 @@ function checkDangerActionRunning(index: number) {
|
|
|
|
|
|
function getConditionContent(index: number): string {
|
|
function getConditionContent(index: number): string {
|
|
const record = dataList.value[index];
|
|
const record = dataList.value[index];
|
|
|
|
+
|
|
return record.conditions
|
|
return record.conditions
|
|
- .map((item) => `${item.name}${item.value || ""}`)
|
|
|
|
|
|
+ .map((item) => `${conditionMap.value[item.code]}${item.value || ""}`)
|
|
.join(";");
|
|
.join(";");
|
|
}
|
|
}
|
|
function getConditionProgress(index: number): string {
|
|
function getConditionProgress(index: number): string {
|
|
@@ -297,9 +317,10 @@ async function onDelete(index: number) {
|
|
message.success("操作成功");
|
|
message.success("操作成功");
|
|
}
|
|
}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
|
+onMounted(async () => {
|
|
if (route.name !== "RecognizeCheck") return;
|
|
if (route.name !== "RecognizeCheck") return;
|
|
|
|
|
|
- toPage(1);
|
|
|
|
|
|
+ await getConditionList();
|
|
|
|
+ await toPage(1);
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|