|  | @@ -6,33 +6,36 @@
 | 
	
		
			
				|  |  |      </el-card>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <el-card>
 | 
	
		
			
				|  |  | -      <div class="fx-row jc-between mb10" >
 | 
	
		
			
				|  |  | -        <el-button type="primary" @click="keepAll">一键维持原班级</el-button>
 | 
	
		
			
				|  |  | -        <el-button  type="primary" @click="send">发送名单</el-button>
 | 
	
		
			
				|  |  | -      </div>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      <mx-table :propDefines="propDefines" :rows="rows">
 | 
	
		
			
				|  |  | -        <template #temp="{row}">
 | 
	
		
			
				|  |  | -          <el-popover
 | 
	
		
			
				|  |  | -            placement="bottom"
 | 
	
		
			
				|  |  | -            trigger="click">
 | 
	
		
			
				|  |  | +      <div v-if="queryParams.roundId">
 | 
	
		
			
				|  |  | +        <div class="fx-row jc-between mb10" >
 | 
	
		
			
				|  |  | +          <el-button type="primary" @click="keepAll">一键维持原班级</el-button>
 | 
	
		
			
				|  |  | +          <el-button  type="primary" @click="send">发送名单</el-button>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +        <mx-table :propDefines="propDefines" :rows="formatRows">
 | 
	
		
			
				|  |  | +          <template #temp="{row}">
 | 
	
		
			
				|  |  | +            <el-popover
 | 
	
		
			
				|  |  | +              placement="bottom"
 | 
	
		
			
				|  |  | +              trigger="click">
 | 
	
		
			
				|  |  |                <span class="btn-green mr5" @click="changeMaster">班主任</span>
 | 
	
		
			
				|  |  |                <span  class="btn-green" @click="changeClass(row)">班级</span>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            <el-button type="primary" slot="reference" size="mini">更换</el-button>
 | 
	
		
			
				|  |  | -          </el-popover>
 | 
	
		
			
				|  |  | -        </template>
 | 
	
		
			
				|  |  | -        <template #cancel="{row}">
 | 
	
		
			
				|  |  | -          <el-button type="danger" size="mini" @click="cancel(row)">取消</el-button>
 | 
	
		
			
				|  |  | -        </template>
 | 
	
		
			
				|  |  | -      </mx-table>
 | 
	
		
			
				|  |  | +              <el-button type="primary" slot="reference" size="mini">更换</el-button>
 | 
	
		
			
				|  |  | +            </el-popover>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +          <template #cancel="{row}">
 | 
	
		
			
				|  |  | +            <el-button type="danger" size="mini" @click="cancel(row)">取消</el-button>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </mx-table>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <evaluation-empty v-else-if="!queryParams.roundId" shadow title="当前学年没有班主任选班数据"></evaluation-empty>
 | 
	
		
			
				|  |  |      </el-card>
 | 
	
		
			
				|  |  | -    <choose-master-teacher ref="chooseMasterTeacher"></choose-master-teacher>
 | 
	
		
			
				|  |  | +<!--    <choose-master-teacher ref="chooseMasterTeacher"></choose-master-teacher>-->
 | 
	
		
			
				|  |  |      <choose-class ref="chooseClass" :year="queryParams.year"></choose-class>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import ChooseMasterTeacher from './components/choose-master-teacher'
 | 
	
		
			
				|  |  | +import classTreeMixin from '@/components/Cache/modules/mx-classTree-translate-mixin'
 | 
	
		
			
				|  |  |  import ChooseClass from './components/choose-class'
 | 
	
		
			
				|  |  |  import MxCondition from '@/components/MxCondition/mx-condition'
 | 
	
		
			
				|  |  |  export default  {
 | 
	
	
		
			
				|  | @@ -41,16 +44,17 @@ export default  {
 | 
	
		
			
				|  |  |      ChooseMasterTeacher,
 | 
	
		
			
				|  |  |      ChooseClass
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | +  mixins: [classTreeMixin],
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        propDefines: {
 | 
	
		
			
				|  |  |          year:{
 | 
	
		
			
				|  |  |            label:'学年'
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | -        prevClassName:{
 | 
	
		
			
				|  |  | +        className:{
 | 
	
		
			
				|  |  |            label:'原班级'
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | -        prevMasterName:{
 | 
	
		
			
				|  |  | +        headteacherName:{
 | 
	
		
			
				|  |  |            label:'原班主任姓名'
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          temp:{
 | 
	
	
		
			
				|  | @@ -68,45 +72,32 @@ export default  {
 | 
	
		
			
				|  |  |            slot:'cancel'
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      rows:[{
 | 
	
		
			
				|  |  | -        year: 2021,
 | 
	
		
			
				|  |  | -        prevClassName: '100',
 | 
	
		
			
				|  |  | -        prevClassId: 402,
 | 
	
		
			
				|  |  | -        prevMasterName: '莫文',
 | 
	
		
			
				|  |  | -        prevMasterId: 3764,
 | 
	
		
			
				|  |  | -        newClassName: '',
 | 
	
		
			
				|  |  | -        nextClassId: '',
 | 
	
		
			
				|  |  | -        newMasterId: 0,
 | 
	
		
			
				|  |  | -        newMasterName: '',
 | 
	
		
			
				|  |  | -      },{
 | 
	
		
			
				|  |  | -        year: 2021,
 | 
	
		
			
				|  |  | -        prevClassName: '101',
 | 
	
		
			
				|  |  | -        prevClassId: 403,
 | 
	
		
			
				|  |  | -        prevMasterName: '莫名',
 | 
	
		
			
				|  |  | -        prevMasterId: 3763,
 | 
	
		
			
				|  |  | -        newClassName: '',
 | 
	
		
			
				|  |  | -        newClassId: '',
 | 
	
		
			
				|  |  | -        newMasterId: 0,
 | 
	
		
			
				|  |  | -        newMasterName: '',
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | -      requireFields: ['year'],
 | 
	
		
			
				|  |  | +      requireFields: ['year','roundId'],
 | 
	
		
			
				|  |  |        queryParams: {
 | 
	
		
			
				|  |  |          pageNum: 1,
 | 
	
		
			
				|  |  |          pageSize: 20,
 | 
	
		
			
				|  |  | -        year: ''
 | 
	
		
			
				|  |  | +        total: '',
 | 
	
		
			
				|  |  | +        year: '',
 | 
	
		
			
				|  |  | +        roundId: '',
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  methods: {
 | 
	
		
			
				|  |  | -    keepAll() {
 | 
	
		
			
				|  |  | -     this.rows = this.rows.map(item => {
 | 
	
		
			
				|  |  | -        item.newClassName = item.prevClassName
 | 
	
		
			
				|  |  | -        item.newClassId = item.prevClassId
 | 
	
		
			
				|  |  | -        item.newMasterId = item.prevMasterId
 | 
	
		
			
				|  |  | -        item.newMasterName = item.prevMasterName
 | 
	
		
			
				|  |  | +  computed:{
 | 
	
		
			
				|  |  | +    formatRows() {
 | 
	
		
			
				|  |  | +      if(!this.classTree) return []
 | 
	
		
			
				|  |  | +      if(!this.queryParams.year) return []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      return this.classTree.find(item => {
 | 
	
		
			
				|  |  | +        return item.year == this.queryParams.year
 | 
	
		
			
				|  |  | +      })?.classList.map(item => {
 | 
	
		
			
				|  |  | +        item.year = this.queryParams.year
 | 
	
		
			
				|  |  |          return item
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    keepAll() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      send() {
 | 
	
		
			
				|  |  |        const isSend = this.rows.filter(item => {
 | 
	
	
		
			
				|  | @@ -120,16 +111,12 @@ export default  {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      cancel(row){
 | 
	
		
			
				|  |  | -      row.newClassName =''
 | 
	
		
			
				|  |  | -      row.newClassId =''
 | 
	
		
			
				|  |  | -      row.newMasterId =0
 | 
	
		
			
				|  |  | -      row.newMasterName =''
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      handleQuery() {
 | 
	
		
			
				|  |  | -        console.log(1111111)
 | 
	
		
			
				|  |  | +      // 获取班主任 settings
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      changeMaster(){
 | 
	
		
			
				|  |  | -      console.log(11111111)
 | 
	
		
			
				|  |  |        this.$refs.chooseMasterTeacher.dialogVisible = true
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      changeClass(row) {
 |