|
@@ -0,0 +1,171 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <ie-page bg-color="#F6F8FA">
|
|
|
|
|
+ <ie-navbar title="职业技能分测算" transparent bg-color="#FFFFFF" title-color="black" keep-title-color/>
|
|
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
+ <uv-gap height="44"/>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ <ie-image is-oss src="/volunteer/skill/index/bg.png" custom-class="w-full h-600"/>
|
|
|
|
|
+ <view class="-mt-420 z-1">
|
|
|
|
|
+ <view class="px-36 flex justify-between items-center">
|
|
|
|
|
+ <view class="text-3xl text-primary keep-all">
|
|
|
|
|
+ <view class="mb-10 font-bold">测职业技能分</view>
|
|
|
|
|
+ <view class="text-base">输入分数,测算所需职业技能分</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <ie-image is-oss src="/volunteer/skill/index/banner.png" custom-class="w-208 h-208"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="mt-60 mx-30 bg-white rounded-xl p-35">
|
|
|
|
|
+ <view class="flex justify-between items-center">
|
|
|
|
|
+ <view class="text-lg text-fore-title">报考院校专业</view>
|
|
|
|
|
+ <view class="text-base text-fore-placeholder flex items-center">
|
|
|
|
|
+ <text>更多</text>
|
|
|
|
|
+ <uv-icon name="arrow-right" color="info"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <ie-empty v-if="!data.rules?.length" :image="emptyImg" text="请选择你的报考院校专业~"/>
|
|
|
|
|
+ <voluntary-form v-else ref="form" disable-simulate/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <ie-safe-toolbar :height="84" :shadow="false">
|
|
|
|
|
+ <view class="px-30 py-16">
|
|
|
|
|
+ <ie-button @click="handleSubmit">开始计算</ie-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </ie-safe-toolbar>
|
|
|
|
|
+ </ie-page>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import VoluntaryForm from "@/pagesOther/pages/voluntary/index/components/voluntary-form.vue";
|
|
|
|
|
+import {SelectedCollegeMajorWithRules, VoluntaryDto, VoluntaryModel, VoluntaryResult} from "@/types/voluntary";
|
|
|
|
|
+import {useTransferPage} from "@/hooks/useTransferPage";
|
|
|
|
|
+import {routes} from "@/common/routes";
|
|
|
|
|
+import {VOLUNTARY_FORM, VOLUNTARY_MODEL} from "@/types/injectionSymbols";
|
|
|
|
|
+import config from "@/config";
|
|
|
|
|
+
|
|
|
|
|
+const emptyImg = computed(() => config.ossUrl + '/volunteer/voluntary/index/empty_data.png')
|
|
|
|
|
+
|
|
|
|
|
+const form = ref<InstanceType<typeof VoluntaryForm> | null>(null)
|
|
|
|
|
+const data = ref<SelectedCollegeMajorWithRules>({} as SelectedCollegeMajorWithRules)
|
|
|
|
|
+const model = ref<VoluntaryModel>({})
|
|
|
|
|
+const {transferTo} = useTransferPage<any, VoluntaryDto>()
|
|
|
|
|
+
|
|
|
|
|
+const handleSubmit = async () => {
|
|
|
|
|
+ await form.value?.validate()
|
|
|
|
|
+ // make request
|
|
|
|
|
+ await nextTick()
|
|
|
|
|
+ const result: VoluntaryResult = {
|
|
|
|
|
+ "universityCode": "12302",
|
|
|
|
|
+ "majorCode": "690390",
|
|
|
|
|
+ "majorEnrollCode": "68508",
|
|
|
|
|
+ "majorGroup": "专业B组",
|
|
|
|
|
+ "majorName": "集成电路技术",
|
|
|
|
|
+ "majorDirection": "",
|
|
|
|
|
+ "enumPickType": "Danger",
|
|
|
|
|
+ "enrollRate": 53,
|
|
|
|
|
+ "enrollRateText": "风险极高",
|
|
|
|
|
+ "tips": null,
|
|
|
|
|
+ "histories": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "year": 2025,
|
|
|
|
|
+ "score": "489.0",
|
|
|
|
|
+ "plan": 15,
|
|
|
|
|
+ "enroll": 15,
|
|
|
|
|
+ "diff": -12,
|
|
|
|
|
+ "ruleContent": '语数外180(语100*0.6+数100*0.6+外100*0.6)+职业技能420(技能展示300*1.4)',
|
|
|
|
|
+ "application": 3.1,
|
|
|
|
|
+ "admission": 1
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "year": 2024,
|
|
|
|
|
+ "score": "",
|
|
|
|
|
+ "plan": null,
|
|
|
|
|
+ "enroll": 20
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "year": 2023,
|
|
|
|
|
+ "score": "504.0",
|
|
|
|
|
+ "plan": null,
|
|
|
|
|
+ "enroll": 32
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "skill": {
|
|
|
|
|
+ year: 2025,
|
|
|
|
|
+ cultureScore: 230,
|
|
|
|
|
+ cultureRule: "语数外",
|
|
|
|
|
+ enrollScore: 489,
|
|
|
|
|
+ skillScore: 259, // 反向测技能分
|
|
|
|
|
+ diff: -23 // 负数表示低于skillScore,正数高于
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ const bigData: VoluntaryDto = {data: data.value, model: model.value, result}
|
|
|
|
|
+ transferTo(routes.skillResult, {bigData})
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(async () => {
|
|
|
|
|
+ // api get rules
|
|
|
|
|
+ await nextTick()
|
|
|
|
|
+ data.value = {
|
|
|
|
|
+ // code: "20949",
|
|
|
|
|
+ majorAncestors: "交通运输大类>铁道运输类",
|
|
|
|
|
+ majorId: "68526",
|
|
|
|
|
+ majorName: "铁道交通运营管理",
|
|
|
|
|
+ majorGroup: '专业组一',
|
|
|
|
|
+ // notice: "",
|
|
|
|
|
+ universityId: "20949",
|
|
|
|
|
+ universityLogo: "https://mingxuejingbang.oss-cn-beijing.aliyuncs.com/ie/universityLog/23b6da550a584ea6b60886c6ae97b610.jpg",
|
|
|
|
|
+ universityName: "湖南铁道职业技术学院",
|
|
|
|
|
+ rules: [{
|
|
|
|
|
+ category: '文化素质',
|
|
|
|
|
+ content: '语(100分)+数(100分)+外(100分)',
|
|
|
|
|
+ details: [{
|
|
|
|
|
+ enumRuleCategory: 'Enroll',
|
|
|
|
|
+ enumInputType: 'Score',
|
|
|
|
|
+ label: '语文',
|
|
|
|
|
+ options: ["100"],
|
|
|
|
|
+ fieldName: '语文',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ defaultValue: 80
|
|
|
|
|
+ }, {
|
|
|
|
|
+ enumRuleCategory: 'Enroll',
|
|
|
|
|
+ enumInputType: 'Score',
|
|
|
|
|
+ label: '数学',
|
|
|
|
|
+ options: ["100"],
|
|
|
|
|
+ fieldName: '数学',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ defaultValue: 84
|
|
|
|
|
+ }, {
|
|
|
|
|
+ enumRuleCategory: 'Enroll',
|
|
|
|
|
+ enumInputType: 'Score',
|
|
|
|
|
+ label: '外语',
|
|
|
|
|
+ options: ["100"],
|
|
|
|
|
+ fieldName: '外语',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ defaultValue: 88
|
|
|
|
|
+ }]
|
|
|
|
|
+ }, {
|
|
|
|
|
+ category: '职业技能',
|
|
|
|
|
+ content: '机试(200分)+ 技能展示(100分)',
|
|
|
|
|
+ details: []
|
|
|
|
|
+ }]
|
|
|
|
|
+ }
|
|
|
|
|
+ // init model
|
|
|
|
|
+ data.value.rules.forEach((r) => {
|
|
|
|
|
+ r.details.forEach((d) => {
|
|
|
|
|
+ if (d.options?.length) {
|
|
|
|
|
+ model.value[d.fieldName] = d.defaultValue ? d.defaultValue : ''
|
|
|
|
|
+ model.value[d.fieldName + 'Total'] = d.options ? d.options[0] : null
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+provide(VOLUNTARY_FORM, data)
|
|
|
|
|
+provide(VOLUNTARY_MODEL, model)
|
|
|
|
|
+
|
|
|
|
|
+// 为了让子组件触发页面滚动
|
|
|
|
|
+onPageScroll(() => {
|
|
|
|
|
+})
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+
|
|
|
|
|
+</style>
|