Browse Source

sync with voluntary - #1 major lib #2 voluntary major code

abpcoder 1 month ago
parent
commit
25ebcd7889

+ 29 - 0
src/assets/styles/common.scss

@@ -886,3 +886,32 @@
   background-size: cover;
   background-position: center center;
 }
+
+
+/* global disabled style */
+.el-input.is-disabled .el-input__inner {
+  color: #666666 !important;
+}
+
+.el-radio__input.is-disabled + span.el-radio__label {
+  color: #666666 !important;
+}
+
+.el-checkbox__input.is-disabled + span.el-checkbox__label {
+  color: #666666 !important;
+}
+
+.el-radio__input.is-disabled.is-checked .el-radio__inner {
+  //border-color: #666666;
+}
+
+.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
+  //border-color: #666666;
+}
+
+.el-radio__input.is-disabled.is-checked .el-radio__inner::after {
+  background-color: #999999 !important;
+}
+.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
+  border-color: #999999 !important;
+}

+ 28 - 2
src/common/MxConfig.js

@@ -202,8 +202,8 @@ export default {
     }
   },
   studentReleaseQueryCodes: [
-    { id: 'acceptCount', name: '已录取', isEnroll: true },
-    { id: 'unfinishedCount', name: '未录取', isEnroll: false }
+    {id: 'acceptCount', name: '已录取', isEnroll: true},
+    {id: 'unfinishedCount', name: '未录取', isEnroll: false}
   ],
   majorDetailOptions: {
     ben: [
@@ -232,6 +232,32 @@ export default {
         prop: 'famousScholar',
         title: '社会名人'
       }],
+    gao_ben: [
+      {
+        prop: 'introduction',
+        title: '专业介绍'
+      }, {
+        prop: 'eduObjective',
+        title: '培养目标'
+      }, {
+        prop: 'eduRequirement',
+        title: '培养要求'
+      }, {
+        prop: 'subjectRequirement',
+        title: '学科要求'
+      }, {
+        prop: 'loreAndAbility',
+        title: '知识能力'
+      }, {
+        prop: 'studyDirection',
+        title: '考研方向'
+      }, {
+        prop: 'mainCourse',
+        title: '主要课程'
+      }, {
+        prop: 'famousScholar',
+        title: '社会名人'
+      }],
     zhuan: [
       {
         prop: 'eduObjective',

+ 8 - 3
src/components/Cache/modules/mx-major-tree-translate-mixin.js

@@ -6,24 +6,29 @@ export default {
     return {
       masterMajorList: [],
       specialtyMajorList: [],
+      gaozhiMajorList: [],
       masterTreeReady: false,
-      specialtyTreeReady: false
+      specialtyTreeReady: false,
+      gaozhiTreeReady: false
     }
   },
   beforeMount() {
     this.loadMasterMajorTree()
     this.loadSpecialtyMajorTree()
+    this.loadGaozhiMajorTree()
   },
   methods: {
     async loadMasterMajorTree() {
       this.masterMajorList = await this.getMasterMajorTree()
       this.masterTreeReady = true
-      console.log('master-major-ready')
     },
     async loadSpecialtyMajorTree() {
       this.specialtyMajorList = await this.getSpecialtyMajorTree()
       this.specialtyTreeReady = true
-      console.log('specialty-major-ready')
     },
+    async loadGaozhiMajorTree() {
+      this.gaozhiMajorList = await this.getGaozhiMajorTree()
+      this.gaozhiTreeReady = true
+    }
   }
 }

+ 9 - 0
src/components/Cache/mx-cache-mixin.js

@@ -132,6 +132,15 @@ export default {
         res => res.data,
         useCache)
     },
+    // 职教本科专业树
+    getGaozhiMajorTree(useCache = true) {
+      return this._getDataByCache('gaozhi_major_tree',
+        _ => allMajor({
+          type: '高职本科'
+        }),
+        res => res.data,
+        useCache)
+    },
     // 职业树
     getAllVocationTree(useCache = true,type) {
       return this._getDataByCache('vocation_tree',

+ 16 - 14
src/views/career/LibraryMajor/MajorDetail.vue

@@ -5,6 +5,7 @@
         <el-tabs type="border-card" :value="type" stretch @tab-click="tabClick">
           <el-tab-pane label="本科" name="本科" />
           <el-tab-pane label="专科" name="专科" />
+          <el-tab-pane label="高职本科" name="高职本科" />
           <el-tree
             ref="tree"
             :data="majorList"
@@ -37,14 +38,9 @@
             </div>
           </div>
           <div class="tabs-wrap mt30">
-            <span class="tabs-item" :class="{'bg-primary':tabActive == 0}" @click="tabActive = 0">专业概况</span>
-            <span class="tabs-item" :class="{'bg-primary':tabActive == 1}" @click="tabActive = 1">就业前景</span>
-            <span
-              v-if="true||majorDetail.eduLevel == 'ben'"
-              class="tabs-item"
-              :class="{'bg-primary':tabActive == 2}"
-              @click="tabActive = 2"
-            >开设院校</span>
+            <span class="tabs-item" :class="{'bg-primary':tabActive==0}" @click="tabActive=0">专业概况</span>
+            <span v-if="type!='高职本科'" class="tabs-item" :class="{'bg-primary':tabActive==1}" @click="tabActive=1">就业前景</span>
+            <span v-if="type!='高职本科'" class="tabs-item" :class="{'bg-primary':tabActive==2}" @click="tabActive=2">开设院校</span>
           </div>
           <div class="line" />
           <div
@@ -78,6 +74,7 @@ import { addConcernMajor, removeConcernedMajor } from '@/api/webApi/career-other
 import MajorIntroduceInfo from '@/views/career/plan/components/major-introduce-info'
 import MajorIntroduceJob from '@/views/career/plan/components/major-introduce-job'
 import IndexCard from '@/views/login/components/modules/shared/IndexCard'
+import MxTransferMixin from '@/components/mx-transfer-mixin'
 
 export default {
   name: 'MajorDetail',
@@ -87,7 +84,7 @@ export default {
     MajorIntroduceInfo,
     OpenCollege
   },
-  mixins: [MxMajorTreeTranslateMixin],
+  mixins: [MxMajorTreeTranslateMixin, MxTransferMixin],
   data() {
     return {
       desc: '',
@@ -98,10 +95,10 @@ export default {
         children: 'children',
         label: 'name'
       },
-      type: '本科',
       majorDetail: {
         name: '',
-        code: ''
+        code: '',
+        eduLevel: ''
       }, // 概况
       prospects: {
         vocationalDistribution: [],
@@ -113,9 +110,15 @@ export default {
     }
   },
   computed: {
+    type() {
+      const { eduLevel } = this.majorDetail
+      const types = { 'ben': '本科', 'zhuan': '专科', 'gao_ben': '高职本科' }
+      return types[eduLevel] || types.ben
+    },
     majorList() {
       if (this.type == '本科') return this.masterMajorList
       if (this.type == '专科') return this.specialtyMajorList
+      if (this.type == '高职本科') return this.gaozhiMajorList
       return []
     }
   },
@@ -129,9 +132,8 @@ export default {
     }
   },
   created() {
-    this.code = this.$route.query.code
-    this.type = this.$route.query.type || '本科'
-    if (this.$route.query.code) {
+    this.code = this.$route.query.code || this.prevData.code
+    if (this.code) {
       this.getOverView()
     }
   },

+ 30 - 29
src/views/career/LibraryMajor/MajorIndex.vue

@@ -1,41 +1,41 @@
 <template>
-  <div ref="vocation" class="bg-page fx-column fx-cen-cen majorlib app-container">
-    <career-title-card name="专业库" english="MAJOR LIBRARY"/>
-    <index-card>
-      <div slot="title" class="fx-1">
-        <span class="tabs-item" :class="{'bg-primary':type == '本科'}" @click="type = '本科'">本科</span>
-        <span class="tabs-item" :class="{'bg-primary':type == '专科'}" @click="type = '专科'">专科</span>
-        <div class="line"/>
-        <div class="tags-wrap">
-          <a v-for="item in levelOne" :key="item.code" class="tag" @click="returnTop(item.code)">{{ item.name }}</a>
+    <div ref="vocation" class="bg-page fx-column fx-cen-cen majorlib">
+      <career-title-card name="专业库" english="MAJOR LIBRARY" />
+      <index-card>
+        <div slot="title" class="fx-1">
+          <span class="tabs-item" :class="{'bg-primary':type == '本科'}" @click="type = '本科'">本科</span>
+          <span class="tabs-item" :class="{'bg-primary':type == '专科'}" @click="type = '专科'">专科</span>
+          <span class="tabs-item" :class="{'bg-primary':type == '高职本科'}" @click="type = '高职本科'">高职本科</span>
+          <div class="line" />
+          <div class="tags-wrap">
+            <a v-for="item in levelOne" :key="item.code" class="tag" @click="returnTop(item.code)">{{ item.name }}</a>
+          </div>
         </div>
-      </div>
-      <div class="list-wrap">
-        <!--  一级 -->
-        <div v-for="item in majorList" :id="`#${item.code}`" :key="item.code" class="levelOne">
-          <!--   一级专业title-->
-          <p class="voca-title mt10 mb10"><span class="primaryColor bold">{{
+        <div class="list-wrap">
+          <!--  一级 -->
+          <div v-for="item in majorList" :id="`#${item.code}`" :key="item.code" class="levelOne">
+            <!--   一级专业title-->
+            <p class="voca-title mt10 mb10"><span class="primaryColor bold">{{
               `${item.name} (${item.code}) `
-            }} </span><span class="f14 f-666">{{ `${item.childCount}个专业类,${item.grandchildCount}个专业` }}</span>
-          </p>
-          <div v-for="subLevel in item.children" :key="subLevel.code" class="last-level">
-            <!--  二级专业 -->
-            <p class="sub-title">{{ `${subLevel.name} (${subLevel.code}) ` }}</p>
-            <!--  三级专业 -->
-            <div v-if="subLevel.children.length > 0" class="last-children-wrap">
+            }} </span><span class="f14 f-666">{{ `${item.childCount}个专业类,${item.grandchildCount}个专业` }}</span></p>
+            <div v-for="subLevel in item.children" :key="subLevel.code" class="last-level">
+              <!--  二级专业 -->
+              <p class="sub-title">{{ `${subLevel.name} (${subLevel.code}) ` }}</p>
+              <!--  三级专业 -->
+              <div v-if="subLevel.children.length > 0" class="last-children-wrap">
                 <span
                   v-for="vocation in subLevel.children"
                   :key="vocation.code"
                   class="last-children"
                   @click="goDetail(vocation.code)"
                 >{{ vocation.name }}</span>
+              </div>
             </div>
           </div>
         </div>
-      </div>
-      <scroll-top/>
-    </index-card>
-  </div>
+        <scroll-top />
+      </index-card>
+    </div>
 </template>
 
 <script>
@@ -46,7 +46,7 @@ import ScrollTop from '@/components/ScrollTop/index'
 
 export default {
   name: 'MajorIndex',
-  components: {ScrollTop, IndexCard, CareerTitleCard},
+  components: { ScrollTop, IndexCard, CareerTitleCard },
   mixins: [MxMajorTreeTranslateMixin],
   data() {
     return {
@@ -65,15 +65,16 @@ export default {
     majorList() {
       if (this.type == '本科') return this.masterMajorList
       if (this.type == '专科') return this.specialtyMajorList
+      if (this.type == '高职本科') return this.gaozhiMajorList
       return []
     }
   },
   methods: {
     goDetail(code) {
-      this.$router.push({path: '/career/plan/MajorDetail', query: {type: this.type, code: code}})
+      this.$router.push({ path: '/career/plan/MajorDetail', query: { type: this.type, code: code }})
     },
     returnTop(id) {
-      this.$scrollTo(document.getElementById(`#${id}`), {offset: 0})
+      this.$scrollTo(document.getElementById(`#${id}`), { offset: 0 })
     }
   }
 }

+ 10 - 2
src/views/career/plan/components/major-introduce-info.vue

@@ -4,7 +4,7 @@
       <div class="info-item">
         <el-image :src="require('@/assets/images/career/school_icon.png')" fit="contain" />
         <div>
-          <div class="f18">{{ majorDetail.eduLevel == 'ben' ? '本科' : '专科' }}</div>
+          <div class="f18">{{ eduLevelName }}</div>
           <div class="f14 f-999">学历层次</div>
         </div>
       </div>
@@ -22,7 +22,7 @@
           <div class="f14 f-999">授予学位</div>
         </div>
       </div>
-      <div class="info-item">
+      <div v-if="majorDetail.maleRatio||majorDetail.femaleRatio" class="info-item">
         <el-image :src="require('@/assets/images/career/year_icon.png')" fit="contain" />
         <div>
           <div class="f18">{{ `${majorDetail.maleRatio}:${majorDetail.femaleRatio}` }}</div>
@@ -59,6 +59,14 @@ export default {
         ...opt,
         content: this.majorDetail[opt.prop]
       }))
+    },
+    eduLevelName() {
+      const levelNames = {
+        'ben': '本科',
+        'zhuan': '专科',
+        'gao_ben': '高职本科'
+      }
+      return levelNames[this.majorDetail?.eduLevel] || ''
     }
   }
 }

+ 4 - 4
src/views/career/zhiyuan/NewSimulatedVolunteer.vue

@@ -111,10 +111,10 @@ export default {
       saving: false,
       //
       tips: [
-        '当系统在非正式志愿模拟填报阶段,您可输入不同分数进行多次志愿智能模拟,找准自己的目标院校和专业。当系统在正式填报阶段,您可以修改和保存一次成绩,但填报次数不受限制。',
-        '期中、期末考试是对阶段性学习成果的考验,也是检验自己的目标院校或专业是否设定合理,请阶段性进行志愿模拟填报以便及时调整目标院校和专业。',
-        '各地的高考政策不同,模拟志愿填报会根据当前注册用户所属地自动匹配。',
-        '模拟填报共有四个步骤。'
+        '2025年招生计划已更新。',
+        '各院校录取数据,参考各省市出版的填报指南以及各本专科院校的官网历年录取数据。',
+        '您可以按系统的重点填报提示选择适合自己的批次模拟,也可直接选择自己关注的批次模拟。',
+        '在正式填报时,以教育考试院公布的最新招生计划为准。'
       ]
     }
   },

+ 1 - 0
src/views/career/zhiyuan/RecordEdit.vue

@@ -172,6 +172,7 @@ export default {
           id: m.id,
           marjorBelongs: m.code,
           marjorName: m.name,
+          marjorCode: m.marjorCode,
           enrollRatio: m.enrollRatio,
           enrollRatioText: m.enrollRatioText,
           enrollFluctuate: m.enrollFluctuate,

+ 20 - 2
src/views/career/zhiyuan/components/PreferenceCells/MajorCell.vue

@@ -2,7 +2,11 @@
   <div>
     <div class="mb3 fx-row fx-cen-cen">
       <span class="bold f-666">
-        <span :class="{'highlight-major': isSearchingMajorFired(row)}">{{ row.marjorName }}</span>
+        <span
+          class="pointer"
+          :class="{'highlight-major': isSearchingMajorFired(row)}"
+          @click="goMajorDetail"
+        >{{ row.marjorName }}</span>
         ({{ row.marjorBelongs }})
         <span v-if="row.level" class="f-red">({{ row.level }})</span>
       </span>
@@ -24,10 +28,24 @@
 <script>
 import PreferenceCellData from '@/views/career/zhiyuan/components/PreferenceCells/PreferenceCellData'
 import SearchMajorInjectionMixin from '@/views/career/zhiyuan/components/SearchMajorInjectionMixin'
+import MxTransferMixin from '@/components/mx-transfer-mixin'
 
 export default {
   name: 'MajorCell',
-  mixins: [PreferenceCellData, SearchMajorInjectionMixin]
+  mixins: [PreferenceCellData, SearchMajorInjectionMixin, MxTransferMixin],
+  methods: {
+    goMajorDetail() {
+      const marjorCode = this.row.marjorCode
+      if (!marjorCode) return
+      // majorTreeChildren 2、3级树,匹配的专业有时是2级的
+      const keys = Object.keys(this.majorTreeChildren)
+      const math = keys.find(k => marjorCode.startsWith(k))
+      if (!math) return
+      const code = this.majorTreeChildren[math].includes(marjorCode) ? marjorCode : this.majorTreeChildren[math][0]
+      const path = '/career/plan/MajorDetail'
+      this.transferTo(path, { code }, null, '_blank')
+    }
+  }
 }
 </script>
 

+ 9 - 9
src/views/career/zhiyuan/components/RecommendFilterMajor.vue

@@ -21,7 +21,7 @@
           <el-button size="mini" type="primary" plain style="padding: 4px 12px" @click="changeAll(!isAllSelected)">{{ isAllSelected? '清除':'全部' }}</el-button>
         </div>
         <el-checkbox-group v-model="localCheckedList" :max="10">
-          <el-checkbox v-for="item in childrenMajors" :key="item.name" :label="item.name" class="mb10">{{ item.name }}
+          <el-checkbox v-for="item in childrenMajors" :key="item.code" :label="item.code" class="mb10">{{ item.name }}
           </el-checkbox>
         </el-checkbox-group>
       </div>
@@ -72,15 +72,15 @@ export default {
       return this.majorList.reduce((prev, next) => prev.concat(next.children), [])
     },
     checkedMajorChildren() {
-      return this.allMajorChildren.filter(major => this.localCheckedList.includes(major.name))
+      return this.allMajorChildren.filter(major => this.localCheckedList.includes(major.code))
     },
     childrenMajors() {
       if (!this.currentMajorCode) return []
       return this.majorList.find(item => item.code == this.currentMajorCode).children || []
     },
     isAllSelected() {
-      return this.childrenMajors.every(major => this.localCheckedList.includes(major.name)) ||
-        (this.localCheckedList.length >= this.checkedMax && this.childrenMajors.some(m => this.localCheckedList.includes(m.name)))
+      return this.childrenMajors.every(major => this.localCheckedList.includes(major.code)) ||
+        (this.localCheckedList.length >= this.checkedMax && this.childrenMajors.some(m => this.localCheckedList.includes(m.code)))
     }
   },
   watch: {
@@ -120,19 +120,19 @@ export default {
             limitFlag = true
             return
           }
-          if (!this.localCheckedList.includes(item.name)) this.localCheckedList.push(item.name)
+          if (!this.localCheckedList.includes(item.code)) this.localCheckedList.push(item.code)
         })
         if (limitFlag) this.$message.warning(`最多选择${this.checkedMax}个专业`)
       } else {
         // 移除
-        this.childrenMajors.forEach(item => this.localCheckedList.remove(item.name))
+        this.childrenMajors.forEach(item => this.localCheckedList.remove(item.code))
       }
     },
     checkAndResetCurrentMajor() {
       if (!this.localCheckedList.length && this.currentMajorCode) this.currentMajorCode = ''
     },
     handleRemoveSubMajor(item) {
-      this.localCheckedList.remove(item.name)
+      this.localCheckedList.remove(item.code)
     },
     handleMajorConfirm() {
       this.checkAndResetCurrentMajor()
@@ -147,8 +147,8 @@ export default {
     _emitChangeWithMajorAndParents() {
       // 选中的专业以及父级
       const parents = this.majorList
-        .filter(major => major.children.some(c => this.localCheckedList.includes(c.name)))
-        .map(m => m.name)
+        .filter(major => major.children.some(c => this.localCheckedList.includes(c.code)))
+        .map(m => m.code)
       // note: emit the cloned array of localCheckedList
       this.$emit('change', [...this.localCheckedList], parents)
     }

+ 6 - 6
src/views/career/zhiyuan/components/SearchMajorProviderMixin.js

@@ -16,7 +16,7 @@ export default {
       const result = {}
       this.majorTree.forEach(category => {
         category.children.forEach(group => {
-          result[group.name] = group.children.map(item => item.name)
+          result[group.code] = group.children.map(item => item.code)
         })
       })
       return result
@@ -59,12 +59,12 @@ export default {
       this.$delete(this.formedMajors, major.id)
     },
     isSearchingMajorFired(major) {
-      return this.checkedList.includes(major.marjorName) ||
-        this.checkedList.some(item => this.majorTreeChildren[item]?.includes(major.marjorName))
+      return this.checkedList.includes(major.marjorCode) ||
+        this.checkedList.some(item => this.majorTreeChildren[item]?.includes(major.marjorCode))
     },
     isFormedMajorFired(major) {
-      return this.formedMajors[major.id]?.includes(major.marjorName) ||
-        this.formedMajors[major.id]?.some(item => this.majorTreeChildren[item]?.includes(major.marjorName))
+      return this.formedMajors[major.id]?.includes(major.marjorCode) ||
+        this.formedMajors[major.id]?.some(item => this.majorTreeChildren[item]?.includes(major.marjorCode))
     },
     ensureMajorFullTree(batch) {
       const params = {
@@ -81,7 +81,7 @@ export default {
         group.marjors.forEach(major => {
           // Do not use ===, id is not concerned with type of string or number
           if (highlighted.some(id => id == major.id)) {
-            results[major.id] = [major.name]
+            results[major.id] = [major.marjorCode]
           }
         })
       })

+ 1 - 1
src/views/career/zhiyuan/components/SimulateScore.vue

@@ -31,7 +31,7 @@
       </el-form-item>
       <el-form v-if="!hiddenRanking" ref="inner" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="填写位次" prop="seatInput">
-          <el-input v-model="form.seatInput" placeholder="输入成绩单位次(可选)" />
+          <el-input v-model="form.seatInput" placeholder="输入位次(可选)" />
           <el-link type="success" target="_blank" href="/zhiyuan/scoreSegment" class="ml10" :underline="false">查看位次</el-link>
           <div class="f12 f-666 mt5" style="line-height: 16px">
             <i class="el-icon-info" />

+ 1 - 0
src/views/career/zhiyuan/components/recommend.vue

@@ -306,6 +306,7 @@ export default {
             id: major.id,
             code: major.marjorBelongs,
             name: major.marjorName,
+            marjorCode: major.marjorCode,
             pickType: item.pickType,
             submitMajorId: major.history?.id,
             enrollRatio: major.enrollRatio,