Bladeren bron

个人信息
Merge branch 'master' of http://121.4.203.192:9000/mingxue/front

# Conflicts:
# .env.development

jinxia.mo 3 jaren geleden
bovenliggende
commit
156b577c2e

+ 2 - 1
.env.development

@@ -3,7 +3,8 @@ ENV = 'development'
 
 # 名学金榜学习系统/生产环境
 #VUE_APP_BASE_API = 'https://front.mingxuejinbang.com/prod-api'
-
+#VUE_APP_BASE_API = 'http://192.168.0.106:1024/prod-api'
 VUE_APP_BASE_API = '/prod-api'
+
 VUE_APP_MOBILE = "https://h5.mingxuejinbang.com"
 

+ 6 - 1
src/assets/styles/common.scss

@@ -664,7 +664,12 @@
 .f-primary {
   color: #47C6A2
 }
-
+.f-danger {
+  color: #F56C6C
+}
+.f-warning {
+  color: #E6A23C
+}
 .f-333 {
   color: #333333
 }

+ 1 - 1
src/common/mx-config.js

@@ -154,7 +154,7 @@ export default {
       code: 'ForceAdjust',
       decisionMaking: true,
       stepsVisible: true,
-      title: '强制调剂',
+      title: '补录调剂',
       description: '',
       icon: ''
     },

+ 13 - 6
src/views/elective/generation/components/elective-generation-commands.vue

@@ -11,7 +11,8 @@
       <el-button v-else-if="showSend" type="primary" @click="pushGeneration">发送</el-button>
       <el-button v-if="showRankBalance" type="primary" @click="jumpRankBalance">排名均衡</el-button>
       <el-button v-if="showClassDispatch" type="primary" @click="terminateAndJumpDispatch">选科分班</el-button>
-      <el-button v-else type="primary" @click="jumpDispatch">选科分班</el-button>
+      <!--<el-button v-else type="primary" @click="jumpDispatch">选科分班</el-button>-->
+      <!--<el-button type="primary" @click="jumpReport" class="ml10">选科数据</el-button>-->
     </div>
     <el-dialog v-if="pushSettingFormVisible" :visible.sync="pushSettingFormVisible"
                :title="nextStepName+'设置'" width="350">
@@ -73,6 +74,7 @@ export default {
       return this.status.doneDMAlgorithm && !this.status.allMatched
     },
     showRankBalance() {
+      return false
       const options = this.generation.options
       return this.status.allMatched && this.generation.current < options.rankBalance.value
     },
@@ -123,20 +125,25 @@ export default {
         this.notifyRootRefresh()
       })
     },
-    jumpRankBalance() {
+    async jumpRankBalance() {
       jumpGenerationRankBalance().finally(() => {
         this.notifyRootRefresh()
       })
     },
-    terminateAndJumpDispatch() {
+    async terminateAndJumpDispatch() {
+      await this.$confirm('确认进入选科分班?该操作将锁定所有选科录取状态,且不可逆')
       terminateGeneration().then(res => {
-        // this.refreshData()
         this.jumpDispatch()
-      }).catch(_ => this.notifyRootRefresh())
+      }).finally(() => this.notifyRootRefresh())
     },
     jumpDispatch() {
-      const path = '/evaluating/master-manage/permission/elective/dispatch/index'
+      const path = '/evaluating/master-manage/selectCourse/elective/dispatch/index'
       this.transferTo(path)
+    },
+    jumpReport() {
+      // 跳转选科数据
+      // TODO: 页面还没有定义好
+      this.msgInfo('更多选科数据,敬请期待')
     }
   }
 }

+ 1 - 7
src/views/elective/generation/components/elective-generation-master.vue

@@ -13,9 +13,7 @@
           </slot>
         </div>
         <div>
-          <slot name="header-suffix">
-            <el-button type="primary" @click="jumpReport" class="ml10">选科数据</el-button>
-          </slot>
+          <slot name="header-suffix"></slot>
         </div>
       </div>
       <slot :name="activeKey" v-bind="chartBinding">
@@ -93,10 +91,6 @@ export default {
     }
   },
   methods: {
-    jumpReport() {
-      // 跳转选科数据
-      // TODO: 页面还没有定义好
-    },
     handleJumpDetail() {
       // 跳列表,模拟点击第一列
       this.$refs.gTable.simulateGoDetails()

+ 7 - 3
src/views/system/user/profile/components/ai-analysis-dialog.vue

@@ -29,8 +29,8 @@
         </el-row>
       </template>
       <template #group="{row}">
-        <el-badge value="荐" :hidden="!row.isRecommend" type="success">
-          <el-button type="mini" :class="{'f-primary': row.allowSelect,'f-red':!row.allowSelect}">{{row.groupName}}</el-button>
+        <el-badge value="荐" :hidden="!row.isRecommend" type="success">
+          <el-tag size="medium" :type="row.allowSelect ? 'warning' : 'danger'" >{{row.groupName}}</el-tag>
         </el-badge>
       </template>
       <template #colleges="{row}">
@@ -89,7 +89,7 @@ export default {
       return {
         groupName: {
           label: '选科组合',
-          width:'100px',
+          width:'120px',
           slot: 'group'
         },
         scoreSumGroup: {
@@ -159,4 +159,8 @@ export default {
 }
 </script>
 <style scoped>
+/deep/ .el-badge__content.is-fixed {
+  top: 8px;
+  right: 8px;
+}
 </style>

+ 80 - 9
src/views/system/user/profile/components/report-table.vue

@@ -1,8 +1,9 @@
 <template>
   <div>
     <div class="mb10 fx-row fx-end-base jc-between">
-      <div>
+      <div class="fx-row fx-end-cen">
         <slot name="header-prefix"></slot>
+        <p v-if="!currentSupplyInfo.hidden" v-html="currentSupplyInfo.info"></p>
       </div>
       <div v-if="!readonly">
         <el-button v-if="aiButtonShow" type="primary" @click="toAiAnalysis">AI分析</el-button>
@@ -14,6 +15,9 @@
       <template #underOver="{value}">
         <over-under-badge :value="value"></over-under-badge>
       </template>
+      <template #group="{row}">
+          <el-tag size="medium" :type="row.allowSelect ? 'warning' : 'danger'" >{{row.groupName}}</el-tag>
+      </template>
       <template #temp="{row}">
         <span class="btn-blue mr5" @click="toSelectSub(row)">选择</span>
         <span class="btn-green" @click="toReport">查看记录</span>
@@ -66,15 +70,15 @@
       </template>
     </mx-table>
     <!-- 初录 多志愿拖拽 -->
-    <div >
-      <p>您的选科志愿: <span v-for="(item,index) in activeModels.selectedList">
-      {{ item.groupName(index) }}志愿
+    <div v-if="this.generation.active == 1">
+      <p >您的选科志愿: <span v-for="(item,index) in activeModels.selectedList">
+      {{ item.groupName }}
 <!--        {{ index + 1 < selectedList.length ? '、' : '' }}-->
       </span>
       </p>
-      <div v-if="this.generation.current == 1">
-        <test-drage ref="drage"  :selectedList="activeModels.selectedList"></test-drage>
-        <el-button @click="commit" type="primary">提交</el-button>
+      <div >
+        <test-drage ref="drage" :btnDisabled="this.generation.current != 1"  :selectedList="activeModels.selectedList"></test-drage>
+        <el-button @click="commit" type="primary" v-if="this.generation.current == 1">提交</el-button>
       </div>
     </div>
     <!--  补录报名和二次补录报名和调剂报名 -->
@@ -137,6 +141,7 @@ import FinalAdjustDMResolverMixins
 import ForceAdjustResolverMixins
   from '@/views/system/user/profile/components/round-select-resolvers/forceAdjust-resolver-mixins'
 import OverUnderBadge from '@/views/elective/publish/components/steps/fauclty/over-under-badge'
+import { submitElectiveModels } from '@/api/webApi/elective/selected-subject'
 
 export default {
   props: {
@@ -153,6 +158,7 @@ export default {
     ChooseSubjectDialog,
     AiDialog
   },
+  inject: ['loadStudentSelected','getStudentElectiveModels'],
   mixins: [
     MxSelectTranslate,
     PrimaryResolverMixins,
@@ -174,6 +180,45 @@ export default {
     }
   },
   computed: {
+    // 不符
+    currentSupplyInfo() {
+      if(!this.generation.models.length) return {}
+      // console.log(this.generation)
+      if(this.generation.active < 2) return {}
+      let info = ''
+      const activeModels = this.generation.models.find(item => item.generation == this.generation.active)
+      // 是否被录取?
+      const approved =  activeModels.models.filter(item => {return item.approved})
+      if(approved.length) {
+        // 查找
+        // 已被录取
+        info = `同学,你好,你之前所选择的${approved.groupName}已被录取`
+      }else {
+        // 已报名未被录取的group 取当前models的前一个
+        const prevModels =  this.generation.models.find(item => item.generation == activeModels.generation - 1)
+        // 拒绝的组合
+        const refuseGroup = prevModels.models.filter(item => {return item.selected})
+        // 获取报名的阶段
+        let tips = ''
+        console.log( Object.values(this.generation.options))
+        const prevGen = Object.values(this.generation.options).find(item =>  item.value  == prevModels.generation)
+        if(prevGen.decisionMaking){
+           tips = Object.values(this.generation.options).find(item =>  item.value  == prevModels.generation - 1).title
+        }else {
+           tips = prevGen.title
+        }
+        console.log(prevGen)
+
+        console.log(refuseGroup)
+        info = `<p>同学,你好,你在${tips}所选择的 <span class="f-red">${refuseGroup.map(g => g.groupName).join(',').toString()} </span> 不符合报名条件现有以下标黄组合可以重新报名</p>`
+      }
+      console.log(approved)
+      const isHidden = this.generation.active > 1
+      return {
+        hidden: !isHidden,
+        info:info
+      }
+    },
     flagShow() {
       return (this.generation.current == 3 && this.generation.active == 3) ||
         (this.generation.current == 5 && this.generation.active == 5) ||
@@ -190,7 +235,9 @@ export default {
           label: '编号',
         },
         groupName: {
-          label: '选科组合'
+          label: '选科组合',
+          slot:'group',
+          width:'85px'
         },
         scoreSumGroup: {
           label: '组合成绩'
@@ -315,7 +362,31 @@ export default {
           return
         }
       }
-      this.$refs.esignDialog.open(this.activeModels.selectedList)
+      this.$confirm(`是否要提交报名`,  {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        submitElectiveModels({
+          models:this.activeModels.selectedList,
+          // esign:this.base64Img
+        }).then(res => {
+          if(res.code == 200) {
+            this.$message.success('报名成功')
+            this.loadStudentSelected()
+            this.getStudentElectiveModels()
+          }
+          console.log(res)
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
+      })
+
+      //
+      // this.$refs.esignDialog.open(this.activeModels.selectedList)
     },
     toSelect(row) {
       const preferenceCount = this.generation.status.preferenceCount

+ 15 - 6
src/views/system/user/profile/components/test-drage.vue

@@ -9,19 +9,25 @@
       :key="item.groupId"
     >
       <span>{{`第${index + 1}志愿:`}}</span>
-      <span @dragenter="dragenter($event, index)"
+      <span v-if="!btnDisabled" @dragenter="dragenter($event, index)"
             @dragover="dragover($event, index)"
             @dragstart="dragstart(index)"
-            class="list-item"
-            draggable>{{ item.groupName }}</span>
-      <el-tag style="cursor: pointer" @click="del(index)" type="danger">删除</el-tag>
+            class="list-item move"
+            draggable
+            >{{ item.groupName }}</span>
+      <span class="list-item" v-else>{{ item.groupName }}</span>
+      <el-button style="cursor: pointer" @click="del(index)" size="mini" v-if="!btnDisabled"  type="danger">删除</el-button>
     </li>
   </transition-group>
 </template>
 <script>
 export default {
   props: {
-    selectedList: Array
+    selectedList: Array,
+    btnDisabled: {
+      type: Boolean,
+      default: false
+    },
   },
   data() {
     return {
@@ -78,8 +84,11 @@ export default {
     font-size: 14px;
     margin-bottom: 6px;
   }
-  .list-item {
+  .move{
     cursor: move;
+  }
+  .list-item {
+
     display:inline-block ;
     margin: 0 10px;
     width: 160px;