|
@@ -4,8 +4,8 @@
|
|
|
<mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
|
|
|
@invalid="handleInvalidQuery"></mx-condition>
|
|
|
</el-card>
|
|
|
- <el-card v-if="queryParams.roundId && rows.length" class="box-card" >
|
|
|
- <div slot="header" class="clearfix text-center f20 pb10 pt10" >
|
|
|
+ <el-card v-if="queryParams.roundId && rows.length" class="box-card">
|
|
|
+ <div slot="header" class="clearfix text-center f20 pb10 pt10">
|
|
|
{{ title }}
|
|
|
</div>
|
|
|
<div>
|
|
@@ -36,7 +36,7 @@
|
|
|
width="60"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <report :generation="generation" :dispatchInfo="rows[0]" :optional-majors="optionalMajors"></report>
|
|
|
+ <enroll-report :generation="generation" :dispatchInfo="rows[0]" :optional-majors="optionalMajors"></enroll-report>
|
|
|
<elective-sign ref="sign" :flowId="rows[0] ? rows[0].flowId : ''"></elective-sign>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="handleGenerate">确 定</el-button>
|
|
@@ -50,115 +50,113 @@
|
|
|
import { classesResult, getRound } from '@/api/webApi/elective/dispatch'
|
|
|
import MxCondition from '@/components/MxCondition/mx-condition'
|
|
|
import RoundSelect from '@/views/system/user/profile/round-select'
|
|
|
-import Report from './report'
|
|
|
+import EnrollReport from './enrollReport'
|
|
|
import ElectiveSign from './electiveSign'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
- export default {
|
|
|
- components:{MxCondition,Report,ElectiveSign},
|
|
|
- mixins:[RoundSelect],
|
|
|
- data(){
|
|
|
- return{
|
|
|
- dialogVisible:false,
|
|
|
- rows: [],
|
|
|
- requireFields: ['year', 'roundId'],
|
|
|
- queryParams: {
|
|
|
- year: '',
|
|
|
- roundId: ''
|
|
|
- },
|
|
|
- activeStep:'forceAdjust',
|
|
|
- round: {},
|
|
|
- propsDefines: {
|
|
|
- year: {
|
|
|
- label:'学年'
|
|
|
- },
|
|
|
- groupName: {
|
|
|
- label:'选择组合'
|
|
|
- },
|
|
|
- name: {
|
|
|
- label:'姓名'
|
|
|
- },
|
|
|
- originalClassName: {
|
|
|
- label:'原班级'
|
|
|
- },
|
|
|
- className: {
|
|
|
- label:'新班级'
|
|
|
- },
|
|
|
- tips: {
|
|
|
- label:'新班报道备注',
|
|
|
- slot: 'tips'
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- computed:{
|
|
|
- apply(){
|
|
|
- return this.appliedModel.selectedList.map(item => item.groupName)
|
|
|
- },
|
|
|
- ...mapGetters(['school','nickName']),
|
|
|
- title(){
|
|
|
- const store = this.$store.getters
|
|
|
- if(!store) return ''
|
|
|
- console.log(store)
|
|
|
- return `${this.school.schoolName}${this.round.name}分班信息 ${store.nickName}同学`
|
|
|
- },
|
|
|
- isSign() {
|
|
|
- if(!this.rows.length) return false
|
|
|
- return this.rows[0].statusText == '分班完成'
|
|
|
- },
|
|
|
- tips() {
|
|
|
- if(!this.isSign) return ''
|
|
|
- return `通知:${this.nickName}同学您的新班级信息于${this.rows[0].activeDate}点生效`
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- handleQuery() {
|
|
|
- this.getRound()
|
|
|
- this.getInfo()
|
|
|
- },
|
|
|
- toSign() {
|
|
|
- if(!this.rows[0].flowId) {
|
|
|
- this.$message.error(this.rows[0].statusText)
|
|
|
- return
|
|
|
- }
|
|
|
- this.dialogVisible = true
|
|
|
- },
|
|
|
- // 获取批次的组合
|
|
|
- getRound() {
|
|
|
- getRound({
|
|
|
- year:this.queryParams.year,
|
|
|
- round:this.queryParams.roundId,
|
|
|
- }).then(res => {
|
|
|
- this.round = res.data
|
|
|
- })
|
|
|
- },
|
|
|
- getInfo() {
|
|
|
- classesResult({
|
|
|
- roundId: this.queryParams.roundId
|
|
|
- }).then(res =>{
|
|
|
- this.rows= res.rows.map(item => {
|
|
|
- item.year = this.queryParams.year
|
|
|
- return item
|
|
|
- })
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
- },
|
|
|
- showDispatchInfo() {
|
|
|
- if(this.rows[0].statusText != '分班完成'){
|
|
|
- this.$message.warning(this.rows[0].statusText )
|
|
|
- return
|
|
|
- }
|
|
|
- },
|
|
|
- handleGenerate() {
|
|
|
- this.$refs.sign.handleGenerate(res=> {
|
|
|
- this.dialogVisible = false
|
|
|
- this.getInfo()
|
|
|
- })
|
|
|
- },
|
|
|
- handleInvalidQuery() {
|
|
|
- this.rows = []
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: { MxCondition, EnrollReport, ElectiveSign },
|
|
|
+ mixins: [RoundSelect],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogVisible: false,
|
|
|
+ rows: [],
|
|
|
+ requireFields: ['year', 'roundId'],
|
|
|
+ queryParams: {
|
|
|
+ year: '',
|
|
|
+ roundId: ''
|
|
|
+ },
|
|
|
+ activeStep: 'forceAdjust',
|
|
|
+ round: {},
|
|
|
+ propsDefines: {
|
|
|
+ year: {
|
|
|
+ label: '学年'
|
|
|
+ },
|
|
|
+ groupName: {
|
|
|
+ label: '选择组合'
|
|
|
+ },
|
|
|
+ name: {
|
|
|
+ label: '姓名'
|
|
|
+ },
|
|
|
+ originalClassName: {
|
|
|
+ label: '原班级'
|
|
|
+ },
|
|
|
+ className: {
|
|
|
+ label: '新班级'
|
|
|
+ },
|
|
|
+ tips: {
|
|
|
+ label: '新班报道备注',
|
|
|
+ slot: 'tips'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['school', 'nickName']),
|
|
|
+ apply() {
|
|
|
+ return this.appliedModel.selectedList.map(item => item.groupName)
|
|
|
+ },
|
|
|
+ title() {
|
|
|
+ return `${this.school.schoolName}${this.round.name}分班信息 ${this.nickName}同学`
|
|
|
+ },
|
|
|
+ isSign() {
|
|
|
+ if (!this.rows.length) return false
|
|
|
+ return this.rows[0].statusText == '分班完成'
|
|
|
+ },
|
|
|
+ tips() {
|
|
|
+ if (!this.isSign) return ''
|
|
|
+ return `通知:${this.nickName}同学您的新班级信息于${this.rows[0].activeDate}点生效`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleQuery() {
|
|
|
+ this.getRound()
|
|
|
+ this.getInfo()
|
|
|
+ },
|
|
|
+ toSign() {
|
|
|
+ if (!this.rows[0].flowId) {
|
|
|
+ this.$message.error(this.rows[0].statusText)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ // 获取批次的组合
|
|
|
+ getRound() {
|
|
|
+ getRound({
|
|
|
+ year: this.queryParams.year,
|
|
|
+ round: this.queryParams.roundId
|
|
|
+ }).then(res => {
|
|
|
+ this.round = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getInfo() {
|
|
|
+ classesResult({
|
|
|
+ roundId: this.queryParams.roundId
|
|
|
+ }).then(res => {
|
|
|
+ this.rows = res.rows.map(item => {
|
|
|
+ item.year = this.queryParams.year
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showDispatchInfo() {
|
|
|
+ if (this.rows[0].statusText != '分班完成') {
|
|
|
+ this.$message.warning(this.rows[0].statusText)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleGenerate() {
|
|
|
+ this.$refs.sign.handleGenerate(res => {
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.getInfo()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleInvalidQuery() {
|
|
|
+ this.rows = []
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
<style>
|
|
|
|