|
@@ -10,6 +10,7 @@
|
|
|
<template #form-item-short>
|
|
|
<base-select
|
|
|
v-model="shortQueryConfig"
|
|
|
+ clearable
|
|
|
:options="customQueryConfigList?.map((v) => ({ label: v.name, value: v.params }))"
|
|
|
></base-select>
|
|
|
</template>
|
|
@@ -83,20 +84,33 @@ const { fetch: setCustomQueryConfig, loading: saving } = useFetch('setCustomQuer
|
|
|
const { fetch: getMarkerList, result: markerList } = useFetch('getMarkerList')
|
|
|
|
|
|
watch(
|
|
|
- () => [model.subjectCode, model.mainNumber, model.markingGroupNumber],
|
|
|
+ () => [model.subjectCode, model.mainNumber],
|
|
|
() => {
|
|
|
- if (model.subjectCode && model.mainNumber && model.markingGroupNumber) {
|
|
|
+ if (model.subjectCode && model.mainNumber) {
|
|
|
getMarkerList({
|
|
|
subjectCode: model.subjectCode,
|
|
|
mainNumber: model.mainNumber,
|
|
|
markingGroupNumber: model.markingGroupNumber,
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ immediate: true,
|
|
|
}
|
|
|
)
|
|
|
|
|
|
getCustomQueryConfigList()
|
|
|
|
|
|
+watch(shortQueryConfig, () => {
|
|
|
+ if (!shortQueryConfig.value) {
|
|
|
+ elFormRef?.value?.resetFields()
|
|
|
+ } else {
|
|
|
+ Object.assign(model, omit(shortQueryConfig.value, 'timeStart', 'timeEnd'), {
|
|
|
+ time: [shortQueryConfig.value.timeStart, shortQueryConfig.value.timeEnd],
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
const Span7 = defineColumn(_, _, { span: 7 })
|
|
|
const Span6 = defineColumn(_, _, { span: 6 })
|
|
|
const OneRow = Span7(_, 'row-1')
|
|
@@ -157,13 +171,13 @@ const items = computed<EpFormItem[]>(() => [
|
|
|
}),
|
|
|
FourRow({
|
|
|
label: '分数',
|
|
|
- slotType: 'input',
|
|
|
+ slotType: 'inputNumber',
|
|
|
prop: 'scoreStart',
|
|
|
}),
|
|
|
FourRow({
|
|
|
label: '至',
|
|
|
labelWidth: useVW(35),
|
|
|
- slotType: 'input',
|
|
|
+ slotType: 'inputNumber',
|
|
|
prop: 'scoreEnd',
|
|
|
}),
|
|
|
Span7(
|
|
@@ -173,6 +187,7 @@ const items = computed<EpFormItem[]>(() => [
|
|
|
prop: 'markerId',
|
|
|
slot: {
|
|
|
options: markerList?.value?.map((marker) => ({ value: marker.id, label: marker.name || marker.loginName })),
|
|
|
+ clearable: true,
|
|
|
},
|
|
|
},
|
|
|
undefined
|
|
@@ -259,6 +274,7 @@ const onSetCustomQueryConfig = async () => {
|
|
|
},
|
|
|
})
|
|
|
toggleVisible(false)
|
|
|
+ elFormRef?.value?.resetFields()
|
|
|
getCustomQueryConfigList()
|
|
|
} catch (error) {
|
|
|
console.error(error)
|