|
@@ -41,19 +41,22 @@
|
|
<!-- 师资填写 -->
|
|
<!-- 师资填写 -->
|
|
<div class="mt20 mb5">
|
|
<div class="mt20 mb5">
|
|
<el-button-group>
|
|
<el-button-group>
|
|
- <el-button :type="enableFacultyForm?'primary':''" size="small" @click="openFacultyForm">AI师资匹配</el-button>
|
|
|
|
- <el-button v-if="enableFacultyForm||enableFacultyResult" size="small" :plain="!groupModel.completed"
|
|
|
|
|
|
+ <el-button v-if="groupsValid" :type="enableFacultyForm?'primary':''" size="small"
|
|
|
|
+ @click="openFacultyForm">AI师资匹配
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button v-if="groupsValid&&(enableFacultyForm||enableFacultyResult)" size="small"
|
|
|
|
+ :plain="!groupModel.completed"
|
|
:type="groupModel.completed?enableFacultyResult?'primary':'':'warning'"
|
|
:type="groupModel.completed?enableFacultyResult?'primary':'':'warning'"
|
|
@click="calculateFacultyResult">
|
|
@click="calculateFacultyResult">
|
|
{{ groupModel.completed ? '' : '生成' }}师资匹配结果
|
|
{{ groupModel.completed ? '' : '生成' }}师资匹配结果
|
|
</el-button>
|
|
</el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
</div>
|
|
</div>
|
|
- <faculty-forms ref="formFaculty" v-if="enableFacultyForm" :rows="groupModel.faculties"
|
|
|
|
|
|
+ <faculty-forms ref="formFaculty" v-if="groupsValid&&enableFacultyForm" :rows="groupModel.faculties"
|
|
@change="resetCalculateStatus"></faculty-forms>
|
|
@change="resetCalculateStatus"></faculty-forms>
|
|
|
|
|
|
<!-- 师资结果 -->
|
|
<!-- 师资结果 -->
|
|
- <faculty-result v-if="enableFacultyResult" :rows="groupModel.faculties"></faculty-result>
|
|
|
|
|
|
+ <faculty-result v-if="groupsValid&&enableFacultyResult" :rows="groupModel.faculties"></faculty-result>
|
|
|
|
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<div class="fx-row mt20">
|
|
<div class="fx-row mt20">
|
|
@@ -96,9 +99,10 @@ import FacultyForms from '@/views/permission/components/steps/fauclty/faculty-fo
|
|
import RoundModelConvert from '../round-model-convert'
|
|
import RoundModelConvert from '../round-model-convert'
|
|
import { calculateFaculties, generateFaculties } from '@/api/webApi/selection'
|
|
import { calculateFaculties, generateFaculties } from '@/api/webApi/selection'
|
|
import FacultyResult from '@/views/permission/components/steps/fauclty/faculty-result'
|
|
import FacultyResult from '@/views/permission/components/steps/fauclty/faculty-result'
|
|
-import GroupQueryDialog from'../group-query-dialog'
|
|
|
|
|
|
+import GroupQueryDialog from '../group-query-dialog'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
- components: { FacultyResult, FacultyForms, RoundScoreQuery,ChooseSubjectDialog,GroupQueryDialog },
|
|
|
|
|
|
+ components: { FacultyResult, FacultyForms, RoundScoreQuery, ChooseSubjectDialog, GroupQueryDialog },
|
|
mixins: [selectTranslateMixin, RoundModelConvert],
|
|
mixins: [selectTranslateMixin, RoundModelConvert],
|
|
name: 'round-setting-group',
|
|
name: 'round-setting-group',
|
|
props: {
|
|
props: {
|
|
@@ -157,6 +161,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ groupsValid() {
|
|
|
|
+ return !!this.groupModel.groupIds.length
|
|
|
|
+ },
|
|
roundGroups() {
|
|
roundGroups() {
|
|
// 按选项显示顺序排序
|
|
// 按选项显示顺序排序
|
|
if (!this.groupModel?.groupIds?.length) return []
|
|
if (!this.groupModel?.groupIds?.length) return []
|
|
@@ -254,9 +261,15 @@ export default {
|
|
resetCalculateStatus() {
|
|
resetCalculateStatus() {
|
|
this.groupModel.completed = false
|
|
this.groupModel.completed = false
|
|
const clearFields = ['levelClassCount', 'qualifiedClassCount', 'requiredClassesCount', 'actualClassesCount', 'missingClassesCount', 'missingTeacherCount']
|
|
const clearFields = ['levelClassCount', 'qualifiedClassCount', 'requiredClassesCount', 'actualClassesCount', 'missingClassesCount', 'missingTeacherCount']
|
|
- this.groupModel.faculties?.forEach(faculty => {
|
|
|
|
- clearFields.forEach(field => faculty[field] = 0)
|
|
|
|
- })
|
|
|
|
|
|
+ if (!this.groupsValid) {
|
|
|
|
+ this.enableFacultyForm = false
|
|
|
|
+ this.enableFacultyResult = false
|
|
|
|
+ this.groupModel.faculties = []
|
|
|
|
+ } else {
|
|
|
|
+ this.groupModel.faculties?.forEach(faculty => {
|
|
|
|
+ clearFields.forEach(field => faculty[field] = 0)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
if (this.enableFacultyForm || this.enableFacultyResult) {
|
|
if (this.enableFacultyForm || this.enableFacultyResult) {
|
|
this.enableFacultyForm = true
|
|
this.enableFacultyForm = true
|
|
this.enableFacultyResult = !this.enableFacultyForm
|
|
this.enableFacultyResult = !this.enableFacultyForm
|
|
@@ -280,18 +293,16 @@ export default {
|
|
this.scoreQueryGroupId = row.groupId
|
|
this.scoreQueryGroupId = row.groupId
|
|
this.scoreQueryVisible = true
|
|
this.scoreQueryVisible = true
|
|
}
|
|
}
|
|
- console.log(row,key)
|
|
|
|
- if(key == 'dataQuery') {
|
|
|
|
|
|
+ if (key == 'dataQuery') {
|
|
const year = this.settingModel.year
|
|
const year = this.settingModel.year
|
|
this.$refs.groupQueryDialog.open(year)
|
|
this.$refs.groupQueryDialog.open(year)
|
|
}
|
|
}
|
|
- if(key == 'majorQuery') {
|
|
|
|
|
|
+ if (key == 'majorQuery') {
|
|
// 打开选科弹窗
|
|
// 打开选科弹窗
|
|
const course0 = this.translateCourse0(row.groupId)
|
|
const course0 = this.translateCourse0(row.groupId)
|
|
const course1 = this.translateCourse1(row.groupId)
|
|
const course1 = this.translateCourse1(row.groupId)
|
|
- console.log(year)
|
|
|
|
const year = this.settingModel.year
|
|
const year = this.settingModel.year
|
|
- this.$refs.chooseDialog.open(course0, course1,year)
|
|
|
|
|
|
+ this.$refs.chooseDialog.open(course0, course1, year)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|