|
@@ -43,7 +43,7 @@
|
|
v-for="(item, index) in params.paperTypeBarcodeContent"
|
|
v-for="(item, index) in params.paperTypeBarcodeContent"
|
|
:key="index"
|
|
:key="index"
|
|
>
|
|
>
|
|
- <span class="s-name">{{ getSubjectName(item.value) }}:</span>
|
|
|
|
|
|
+ <span class="s-name">{{ getSubjectName(item.code) }}:</span>
|
|
<div class="flex-1">
|
|
<div class="flex-1">
|
|
<div
|
|
<div
|
|
class="tag"
|
|
class="tag"
|
|
@@ -139,7 +139,10 @@ onMounted(() => {
|
|
getSubjectList({ examId: userStore.curExam?.id }).then((res: any) => {
|
|
getSubjectList({ examId: userStore.curExam?.id }).then((res: any) => {
|
|
subjectOptions.value = (res || [])
|
|
subjectOptions.value = (res || [])
|
|
.filter((item: any) => item.code == "1" || item.code == "2")
|
|
.filter((item: any) => item.code == "1" || item.code == "2")
|
|
- .map((item: any) => ({ label: item.name, value: item.code }));
|
|
|
|
|
|
+ .map((item: any) => ({
|
|
|
|
+ label: item.code + "-" + item.name,
|
|
|
|
+ value: item.code,
|
|
|
|
+ }));
|
|
if (subjectOptions.value.length) {
|
|
if (subjectOptions.value.length) {
|
|
subjectCode.value = subjectOptions.value[0].value;
|
|
subjectCode.value = subjectOptions.value[0].value;
|
|
}
|
|
}
|
|
@@ -150,7 +153,7 @@ const getSubjectName = (code: string) => {
|
|
if (!subjectOptions.value.length) {
|
|
if (!subjectOptions.value.length) {
|
|
return "";
|
|
return "";
|
|
} else {
|
|
} else {
|
|
- return subjectOptions.value.find((item: any) => item.code == code)?.label;
|
|
|
|
|
|
+ return subjectOptions.value.find((item: any) => item.value == code)?.label;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const params = reactive<any>({
|
|
const params = reactive<any>({
|