|
@@ -19,7 +19,7 @@
|
|
|
<uv-form-item label="考生类别" prop="examType" borderBottom required>
|
|
<uv-form-item label="考生类别" prop="examType" borderBottom required>
|
|
|
<ie-picker ref="pickerRef" v-model="examTypeForm.examType" :list="examTypeList"
|
|
<ie-picker ref="pickerRef" v-model="examTypeForm.examType" :list="examTypeList"
|
|
|
:disabled="!examTypeForm.location || disabledEdit" :placeholder="pickerPlaceholder"
|
|
:disabled="!examTypeForm.location || disabledEdit" :placeholder="pickerPlaceholder"
|
|
|
- :custom-style="customStyle" key-label="dictLabel" key-value="dictValue">
|
|
|
|
|
|
|
+ :custom-style="customStyle" key-label="dictLabel" key-value="dictValue" @change="handleExamTypeChange">
|
|
|
<template v-if="disabledEdit" #right>
|
|
<template v-if="disabledEdit" #right>
|
|
|
<ie-image src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
<ie-image src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</template>
|
|
</template>
|
|
@@ -44,33 +44,33 @@
|
|
|
</content-card>
|
|
</content-card>
|
|
|
|
|
|
|
|
<content-card v-if="showCulture" title="文化素质">
|
|
<content-card v-if="showCulture" title="文化素质">
|
|
|
- <uv-form-item label="语文" prop="form.scores.chinese" borderBottom :required="true">
|
|
|
|
|
|
|
+ <uv-form-item label="语文" prop="form.scores.chinese" borderBottom :required="isScoreRequired">
|
|
|
<uv-input v-model.number="scoresForm.chinese" border="none" type="number" :placeholder="inputPlaceholder"
|
|
<uv-input v-model.number="scoresForm.chinese" border="none" type="number" :placeholder="inputPlaceholder"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
|
</uv-input>
|
|
</uv-input>
|
|
|
</uv-form-item>
|
|
</uv-form-item>
|
|
|
- <uv-form-item label="数学" prop="form.score.mathematics" borderBottom :required="true">
|
|
|
|
|
|
|
+ <uv-form-item label="数学" prop="form.score.mathematics" borderBottom :required="isScoreRequired">
|
|
|
<uv-input v-model.number="scoresForm.mathematics" border="none" type="number" :placeholder="inputPlaceholder"
|
|
<uv-input v-model.number="scoresForm.mathematics" border="none" type="number" :placeholder="inputPlaceholder"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
|
</uv-input>
|
|
</uv-input>
|
|
|
<ie-image v-if="disabledEdit" slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
<ie-image v-if="disabledEdit" slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
mode="aspectFill" />
|
|
mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
</uv-form-item>
|
|
|
- <uv-form-item label="外语" prop="form.scores.foreign" borderBottom :required="true">
|
|
|
|
|
|
|
+ <uv-form-item label="外语" prop="form.scores.foreign" borderBottom :required="isScoreRequired">
|
|
|
<uv-input v-model.number="scoresForm.foreign" border="none" type="number" :placeholder="inputPlaceholder"
|
|
<uv-input v-model.number="scoresForm.foreign" border="none" type="number" :placeholder="inputPlaceholder"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
|
</uv-input>
|
|
</uv-input>
|
|
|
<ie-image v-if="disabledEdit" slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
<ie-image v-if="disabledEdit" slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
mode="aspectFill" />
|
|
mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
</uv-form-item>
|
|
|
- <uv-form-item label="物理" prop="form.scores.physics" borderBottom :required="true">
|
|
|
|
|
|
|
+ <uv-form-item label="物理" prop="form.scores.physics" borderBottom :required="isScoreRequired">
|
|
|
<uv-input v-model.number="scoresForm.physics" border="none" type="number" :placeholder="inputPlaceholder"
|
|
<uv-input v-model.number="scoresForm.physics" border="none" type="number" :placeholder="inputPlaceholder"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
|
</uv-input>
|
|
</uv-input>
|
|
|
<ie-image v-if="disabledEdit" slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
<ie-image v-if="disabledEdit" slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
mode="aspectFill" />
|
|
mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
</uv-form-item>
|
|
|
- <uv-form-item label="政治" prop="form.scores.political" :required="true">
|
|
|
|
|
|
|
+ <uv-form-item label="政治" prop="form.scores.political" :required="isScoreRequired">
|
|
|
<uv-input v-model.number="scoresForm.political" border="none" type="number" :placeholder="inputPlaceholder"
|
|
<uv-input v-model.number="scoresForm.political" border="none" type="number" :placeholder="inputPlaceholder"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="disabledEdit">
|
|
|
</uv-input>
|
|
</uv-input>
|
|
@@ -144,6 +144,9 @@ scoresForm.value = form.value.scores || {}
|
|
|
const disabledEdit = computed(() => {
|
|
const disabledEdit = computed(() => {
|
|
|
return !!userInfo.value.location;
|
|
return !!userInfo.value.location;
|
|
|
})
|
|
})
|
|
|
|
|
+// 普高-文化成绩必填,保存后锁定不可修改
|
|
|
|
|
+// 中职务-文化成绩不填,保存后可修改
|
|
|
|
|
+const isScoreRequired = computed(() => examTypeForm.value.examType === EnumExamType.OHS);
|
|
|
const showCulture = computed(() => {
|
|
const showCulture = computed(() => {
|
|
|
return examTypeForm.value.examType === EnumExamType.OHS;
|
|
return examTypeForm.value.examType === EnumExamType.OHS;
|
|
|
});
|
|
});
|
|
@@ -186,29 +189,68 @@ const loginValidate = () => {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if (showCulture.value) {
|
|
if (showCulture.value) {
|
|
|
- if (!scoresForm.value.chinese || scoresForm.value.chinese < 0 || scoresForm.value.chinese > 100) {
|
|
|
|
|
|
|
+ if (isScoreRequired.value) {
|
|
|
|
|
+ if (!scoresForm.value.chinese) {
|
|
|
|
|
+ uni.$ie.showToast('请输入语文成绩');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoresForm.value?.chinese && (scoresForm.value.chinese < 0 || scoresForm.value.chinese > 100)) {
|
|
|
uni.$ie.showToast('请输入正确的语文成绩');
|
|
uni.$ie.showToast('请输入正确的语文成绩');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (!scoresForm.value.mathematics || scoresForm.value.mathematics < 0 || scoresForm.value.mathematics > 100) {
|
|
|
|
|
|
|
+ //
|
|
|
|
|
+ if (isScoreRequired.value) {
|
|
|
|
|
+ if (!scoresForm.value.mathematics) {
|
|
|
|
|
+ uni.$ie.showToast('请输入数学成绩');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoresForm.value?.mathematics && (scoresForm.value.mathematics < 0 || scoresForm.value.mathematics > 100)) {
|
|
|
uni.$ie.showToast('请输入正确的数学成绩');
|
|
uni.$ie.showToast('请输入正确的数学成绩');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (!scoresForm.value.foreign || scoresForm.value.foreign < 0 || scoresForm.value.foreign > 100) {
|
|
|
|
|
|
|
+ //
|
|
|
|
|
+ if (isScoreRequired.value) {
|
|
|
|
|
+ if (!scoresForm.value.foreign) {
|
|
|
|
|
+ uni.$ie.showToast('请输入外语成绩');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoresForm.value?.foreign && (scoresForm.value.foreign < 0 || scoresForm.value.foreign > 100)) {
|
|
|
uni.$ie.showToast('请输入正确的外语成绩');
|
|
uni.$ie.showToast('请输入正确的外语成绩');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (!scoresForm.value.physics || scoresForm.value.physics < 0 || scoresForm.value.physics > 100) {
|
|
|
|
|
|
|
+ //
|
|
|
|
|
+ if (isScoreRequired.value) {
|
|
|
|
|
+ if (!scoresForm.value.physics) {
|
|
|
|
|
+ uni.$ie.showToast('请输入物理成绩');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoresForm.value?.physics && (scoresForm.value.physics < 0 || scoresForm.value.physics > 100)) {
|
|
|
uni.$ie.showToast('请输入正确的物理成绩');
|
|
uni.$ie.showToast('请输入正确的物理成绩');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (!scoresForm.value.political || scoresForm.value.political < 0 || scoresForm.value.political > 100) {
|
|
|
|
|
|
|
+ //
|
|
|
|
|
+ if (isScoreRequired.value) {
|
|
|
|
|
+ if (!scoresForm.value.political) {
|
|
|
|
|
+ uni.$ie.showToast('请输入政治成绩');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoresForm.value?.political && (scoresForm.value.political < 0 || scoresForm.value.political > 100)) {
|
|
|
uni.$ie.showToast('请输入正确的政治成绩');
|
|
uni.$ie.showToast('请输入正确的政治成绩');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const handleExamTypeChange = () => {
|
|
|
|
|
+ scoresForm.value = {};
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const handleSubmit = async () => {
|
|
const handleSubmit = async () => {
|
|
|
console.log('handleSubmit', examTypeForm.value)
|
|
console.log('handleSubmit', examTypeForm.value)
|
|
|
if (!loginValidate()) {
|
|
if (!loginValidate()) {
|