|
@@ -2,7 +2,7 @@
|
|
<div>
|
|
<div>
|
|
<div class="mb10 fx-row fx-end-base">
|
|
<div class="mb10 fx-row fx-end-base">
|
|
<div>
|
|
<div>
|
|
- <el-button v-if="aiShow" type="primary" @click="toAiAnalysis">AI分析</el-button>
|
|
|
|
|
|
+ <el-button v-if="aiButtonShow" type="primary" @click="toAiAnalysis">AI分析</el-button>
|
|
<el-button>选科历史记录</el-button>
|
|
<el-button>选科历史记录</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -95,7 +95,7 @@
|
|
<esign-dialog ref="esignDialog"></esign-dialog>
|
|
<esign-dialog ref="esignDialog"></esign-dialog>
|
|
<choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
|
|
<choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
|
|
<select-subject-report-dialog ref="reportDialog"></select-subject-report-dialog>
|
|
<select-subject-report-dialog ref="reportDialog"></select-subject-report-dialog>
|
|
- <Ai-dialog ref="aiDialog" :prevPreferences="prevPreferences"></Ai-dialog>
|
|
|
|
|
|
+ <Ai-dialog ref="aiDialog" :generation="generation" :prevPreferences="prevPreferences"></Ai-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -167,10 +167,9 @@ export default {
|
|
(this.generation.current == 5 && this.generation.active == 5)||
|
|
(this.generation.current == 5 && this.generation.active == 5)||
|
|
(this.generation.current == 5 && this.generation.active == 7)
|
|
(this.generation.current == 5 && this.generation.active == 7)
|
|
},
|
|
},
|
|
- aiShow() {
|
|
|
|
- const active = this.generation.active
|
|
|
|
- if (active == 3 || active == 5 ) return true
|
|
|
|
- return false
|
|
|
|
|
|
+ aiButtonShow() {
|
|
|
|
+ const aiButtonShow = !this.generation.activeOpt?.decisionMaking && this.generation.activeOpt?.key != 'primary'
|
|
|
|
+ return aiButtonShow
|
|
},
|
|
},
|
|
resolveTablePrefix() {
|
|
resolveTablePrefix() {
|
|
return {
|
|
return {
|
|
@@ -239,7 +238,6 @@ export default {
|
|
Object.assign(dynamicColumns, genColumns)
|
|
Object.assign(dynamicColumns, genColumns)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log('resolveDynamicTable', dynamicColumns)
|
|
|
|
return dynamicColumns
|
|
return dynamicColumns
|
|
},
|
|
},
|
|
// 初始化 rows 填充固定数据
|
|
// 初始化 rows 填充固定数据
|
|
@@ -254,7 +252,6 @@ export default {
|
|
row.subjects = this.optionalMajors.filter(college => {
|
|
row.subjects = this.optionalMajors.filter(college => {
|
|
if (college.matchedGroupIds.indexOf(row.groupId) != -1) return college.majorCategoryName
|
|
if (college.matchedGroupIds.indexOf(row.groupId) != -1) return college.majorCategoryName
|
|
}).map(item => item.majorCategoryName)
|
|
}).map(item => item.majorCategoryName)
|
|
- console.log(row.subjects)
|
|
|
|
row.colleges = this.optionalMajors.filter(college => {
|
|
row.colleges = this.optionalMajors.filter(college => {
|
|
if (college.matchedGroupIds.indexOf(row.groupId) != -1) return college.majorCategoryName
|
|
if (college.matchedGroupIds.indexOf(row.groupId) != -1) return college.majorCategoryName
|
|
}).map(item => {
|
|
}).map(item => {
|
|
@@ -293,11 +290,9 @@ export default {
|
|
this.$refs.reportDialog.open()
|
|
this.$refs.reportDialog.open()
|
|
},
|
|
},
|
|
toAiAnalysis() {
|
|
toAiAnalysis() {
|
|
- //
|
|
|
|
- const currentGeneration = 1
|
|
|
|
// AI 分析 跳转
|
|
// AI 分析 跳转
|
|
console.log(this.formatRows)
|
|
console.log(this.formatRows)
|
|
- this.$refs.aiDialog.open(this.formatRows, currentGeneration)
|
|
|
|
|
|
+ this.$refs.aiDialog.open(this.formatRows)
|
|
},
|
|
},
|
|
commit() {
|
|
commit() {
|
|
console.log(this.selectedList)
|
|
console.log(this.selectedList)
|
|
@@ -318,12 +313,10 @@ export default {
|
|
const count = this.formatRows.reduce((prev, cur) => {
|
|
const count = this.formatRows.reduce((prev, cur) => {
|
|
return prev += cur.selected ? 1 : 0
|
|
return prev += cur.selected ? 1 : 0
|
|
},0)
|
|
},0)
|
|
- console.log(count)
|
|
|
|
if (count >= preferenceCount) {
|
|
if (count >= preferenceCount) {
|
|
this.$message.warning(`最多选择${preferenceCount}个志愿`)
|
|
this.$message.warning(`最多选择${preferenceCount}个志愿`)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- console.log(row)
|
|
|
|
row.selected = true
|
|
row.selected = true
|
|
this.selectedList.push(row)
|
|
this.selectedList.push(row)
|
|
this.$refs.drage.init(this.selectedList)
|
|
this.$refs.drage.init(this.selectedList)
|
|
@@ -338,7 +331,6 @@ export default {
|
|
const start = this.selectedList.indexOf(this.selectedList.find((selected) => {
|
|
const start = this.selectedList.indexOf(this.selectedList.find((selected) => {
|
|
return selected.groupId == row.groupId
|
|
return selected.groupId == row.groupId
|
|
}))
|
|
}))
|
|
- console.log(start)
|
|
|
|
this.selectedList.splice(start, 1)
|
|
this.selectedList.splice(start, 1)
|
|
|
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|