|
|
@@ -19,67 +19,68 @@
|
|
|
<uv-input v-model="form.location" border="none" placeholder="" placeholderClass="text-30" font-size="30rpx"
|
|
|
:custom-style="customStyle" readonly>
|
|
|
</uv-input>
|
|
|
- <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
- mode="aspectFill" />
|
|
|
+ <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="考试类别" prop="name" borderBottom>
|
|
|
- <view class="flex-1 pl-[26px]">
|
|
|
+ <view class="flex-1 pl-[26px] text-30">
|
|
|
<ie-dict :dictName="EnumDictName.EXAM_TYPE" :dictValue="form.examType" />
|
|
|
</view>
|
|
|
- <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
- mode="aspectFill" />
|
|
|
+ <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="单招年份" prop="name">
|
|
|
<uv-input v-model="form.endYear" border="none" placeholder="" placeholderClass="text-30" font-size="30rpx"
|
|
|
:custom-style="customStyle" readonly>
|
|
|
</uv-input>
|
|
|
- <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
- mode="aspectFill" />
|
|
|
+ <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
</content-card>
|
|
|
|
|
|
- <content-card v-if="userStore.isStudent" title="文化素质">
|
|
|
+ <content-card title="文化素质">
|
|
|
<uv-form-item label="语文" prop="name" borderBottom>
|
|
|
- <uv-input v-model="scores.chinese" border="none" placeholder="请输入" placeholderClass="text-30"
|
|
|
+ <uv-input v-model="scores.chinese" border="none"
|
|
|
+ :placeholder="form.examType === EnumExamType.OHS ? '' : '请输入'" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="form.examType === EnumExamType.OHS">
|
|
|
</uv-input>
|
|
|
- <ie-image v-if="form.examType === EnumExamType.OHS" slot="right"
|
|
|
- src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ <ie-image v-if="form.examType === EnumExamType.OHS" slot="right" src="/static/image/icon-lock.png"
|
|
|
+ custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="数学" prop="name" borderBottom>
|
|
|
- <uv-input v-model="scores.mathematics" border="none" placeholder="请输入" placeholderClass="text-30"
|
|
|
+ <uv-input v-model="scores.mathematics" border="none"
|
|
|
+ :placeholder="form.examType === EnumExamType.OHS ? '' : '请输入'" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="form.examType === EnumExamType.OHS">
|
|
|
</uv-input>
|
|
|
- <ie-image v-if="form.examType === EnumExamType.OHS" slot="right"
|
|
|
- src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ <ie-image v-if="form.examType === EnumExamType.OHS" slot="right" src="/static/image/icon-lock.png"
|
|
|
+ custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="外语" prop="name" :borderBottom="form.examType === EnumExamType.OHS">
|
|
|
- <uv-input v-model="scores.foreign" border="none" placeholder="请输入" placeholderClass="text-30"
|
|
|
+ <uv-input v-model="scores.foreign" border="none"
|
|
|
+ :placeholder="form.examType === EnumExamType.OHS ? '' : '请输入'" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="form.examType === EnumExamType.OHS">
|
|
|
</uv-input>
|
|
|
- <ie-image v-if="form.examType === EnumExamType.OHS" slot="right"
|
|
|
- src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ <ie-image v-if="form.examType === EnumExamType.OHS" slot="right" src="/static/image/icon-lock.png"
|
|
|
+ custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<block v-if="[EnumExamType.OHS].includes(form.examType)">
|
|
|
<uv-form-item label="物理" prop="name" borderBottom>
|
|
|
- <uv-input v-model="scores.physics" border="none" placeholder="请输入" placeholderClass="text-30"
|
|
|
+ <uv-input v-model="scores.physics" border="none"
|
|
|
+ :placeholder="form.examType === EnumExamType.OHS ? '' : '请输入'" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="form.examType === EnumExamType.OHS">
|
|
|
</uv-input>
|
|
|
- <ie-image v-if="form.examType === EnumExamType.OHS" slot="right"
|
|
|
- src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ <ie-image v-if="form.examType === EnumExamType.OHS" slot="right" src="/static/image/icon-lock.png"
|
|
|
+ custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="政治" prop="name">
|
|
|
- <uv-input v-model="scores.political" border="none" placeholder="请输入" placeholderClass="text-30"
|
|
|
+ <uv-input v-model="scores.political" border="none"
|
|
|
+ :placeholder="form.examType === EnumExamType.OHS ? '' : '请输入'" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle" :readonly="form.examType === EnumExamType.OHS">
|
|
|
</uv-input>
|
|
|
- <ie-image v-if="form.examType === EnumExamType.OHS" slot="right"
|
|
|
- src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ <ie-image v-if="form.examType === EnumExamType.OHS" slot="right" src="/static/image/icon-lock.png"
|
|
|
+ custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
</block>
|
|
|
</content-card>
|
|
|
|
|
|
- <content-card v-if="userStore.isStudent && ([EnumExamType.OHS, EnumExamType.SVS].includes(form.examType))"
|
|
|
- title="职业技能成绩">
|
|
|
+ <content-card v-if="([EnumExamType.OHS, EnumExamType.SVS].includes(form.examType))" title="职业技能成绩">
|
|
|
<uv-form-item label="职业技能" prop="name">
|
|
|
<uv-input v-model.number="scores.skill" border="none" placeholder="请输入" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle">
|
|
|
@@ -87,22 +88,39 @@
|
|
|
</uv-form-item>
|
|
|
</content-card>
|
|
|
|
|
|
- <content-card v-if="userStore.isVip && userStore.isStudent" title="学校信息">
|
|
|
+ <template v-if="userStore.isStudent">
|
|
|
+ <content-card v-if="userStore.isVip" title="学校信息">
|
|
|
+ <uv-form-item label="学校名称" prop="form.name" borderBottom>
|
|
|
+ <uv-input v-model="form.schoolName" border="none" placeholder="" placeholderClass="text-30"
|
|
|
+ font-size="30rpx" :custom-style="customStyle" readonly>
|
|
|
+ </uv-input>
|
|
|
+ <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ </uv-form-item>
|
|
|
+ <uv-form-item label="所在班级" prop="form.name">
|
|
|
+ <ie-picker ref="pickerRef" v-model="form.classId" :list="classList" title="选择班级" placeholder="请选择所在班级"
|
|
|
+ :custom-style="customStyle" key-label="name" key-value="classId"></ie-picker>
|
|
|
+ </uv-form-item>
|
|
|
+ </content-card>
|
|
|
+ </template>
|
|
|
+ <content-card v-else title="学校信息">
|
|
|
<uv-form-item label="学校名称" prop="form.name" borderBottom>
|
|
|
<uv-input v-model="form.schoolName" border="none" placeholder="" placeholderClass="text-30"
|
|
|
font-size="30rpx" :custom-style="customStyle" readonly>
|
|
|
</uv-input>
|
|
|
- <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30"
|
|
|
- mode="aspectFill" />
|
|
|
+ <ie-image slot="right" src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="所在班级" prop="form.name">
|
|
|
- <ie-picker ref="pickerRef" v-model="form.classId" :list="classList" title="选择班级" placeholder="请选择所在班级"
|
|
|
- :custom-style="customStyle" key-label="name" key-value="classId"></ie-picker>
|
|
|
+ <ie-picker ref="pickerRef" v-model="form.schoolClassName" :list="classList" title="选择班级" disabled
|
|
|
+ placeholder="请选择所在班级" :custom-style="customStyle" key-label="name" key-value="classId">
|
|
|
+ <template #right>
|
|
|
+ <ie-image src="/static/image/icon-lock.png" custom-class="w-24 h-30" mode="aspectFill" />
|
|
|
+ </template>
|
|
|
+ </ie-picker>
|
|
|
</uv-form-item>
|
|
|
</content-card>
|
|
|
</uv-form>
|
|
|
</view>
|
|
|
- <ie-safe-toolbar v-if="userStore.isStudent" :height="84" :shadow="false">
|
|
|
+ <ie-safe-toolbar :height="84" :shadow="false">
|
|
|
<view class="px-30 py-16">
|
|
|
<ie-button @click="handleSubmit">确认保存</ie-button>
|
|
|
</view>
|
|
|
@@ -142,14 +160,23 @@ type SchoolInfo = {
|
|
|
className: string;
|
|
|
schoolId: number | null;
|
|
|
}
|
|
|
-type UserProfile = Pick<UserInfo, 'nickName' | 'phonenumber' | 'location' | 'endYear' | 'examType'> & SchoolInfo;
|
|
|
+type UserProfile = Pick<UserInfo, 'nickName' | 'phonenumber' | 'location' | 'endYear' | 'examType' | 'schoolClassName'> & SchoolInfo;
|
|
|
+
|
|
|
const form = ref<UserProfile>({
|
|
|
...userInfo.value,
|
|
|
- schoolName: cardInfo.value?.schoolName || '',
|
|
|
- classId: cardInfo.value?.classId || null,
|
|
|
- className: cardInfo.value?.className || '',
|
|
|
- schoolId: cardInfo.value?.schoolId || null
|
|
|
+ schoolName: '',
|
|
|
+ classId: null,
|
|
|
+ className: '',
|
|
|
+ schoolId: null
|
|
|
});
|
|
|
+if (userStore.isStudent) {
|
|
|
+ form.value.schoolName = cardInfo.value?.schoolName || '';
|
|
|
+ form.value.classId = cardInfo.value?.classId || null;
|
|
|
+ form.value.className = cardInfo.value?.className || '';
|
|
|
+ form.value.schoolId = cardInfo.value?.schoolId || null
|
|
|
+} else {
|
|
|
+ form.value.schoolName = userInfo.value.schoolName
|
|
|
+}
|
|
|
const scores = ref({
|
|
|
...userInfo.value.scores
|
|
|
})
|