|
@@ -5,7 +5,7 @@
|
|
|
<slot name="header-prefix"></slot>
|
|
|
<p v-if="generation.active > 1" v-html="currentSupplyInfo"></p>
|
|
|
</div>
|
|
|
- <div v-if="!readonly">
|
|
|
+ <div>
|
|
|
<el-button v-if="aiButtonShow" type="primary" @click="toAiAnalysis">AI分析</el-button>
|
|
|
<!-- <el-button>选科历史记录</el-button>-->
|
|
|
</div>
|
|
@@ -260,13 +260,16 @@ export default {
|
|
|
return info
|
|
|
},
|
|
|
flagShow() {
|
|
|
- return (this.generation.current == 3 && this.generation.active == 3) ||
|
|
|
- (this.generation.current == 5 && this.generation.active == 5) ||
|
|
|
- (this.generation.current == 5 && this.generation.active == 7)
|
|
|
+ const stepMatched = this.generation.active == this.generation.current
|
|
|
+ const selectStep = !this.generation.activeOpt.decisionMaking
|
|
|
+ return stepMatched && selectStep && !this.readonly
|
|
|
},
|
|
|
aiButtonShow() {
|
|
|
- const aiButtonShow = !this.generation.activeOpt?.decisionMaking && this.generation.activeOpt?.key != 'primary'
|
|
|
- return aiButtonShow
|
|
|
+ if (!this.generation.activeOpt) return false
|
|
|
+ const options = this.generation.options
|
|
|
+ return !this.generation.activeOpt.decisionMaking &&
|
|
|
+ this.generation.activeOpt != options.primary &&
|
|
|
+ !this.readonly
|
|
|
},
|
|
|
resolveTablePrefix() {
|
|
|
return {
|
|
@@ -379,8 +382,10 @@ export default {
|
|
|
},
|
|
|
isGroupOverSetting(row) {
|
|
|
if (this.generation.activeOpt.decisionMaking) {
|
|
|
+ console.log('isGroupOverSetting decisionMaking', row.groupApprovedCount >= row.personCount, row)
|
|
|
return row.groupApprovedCount >= row.personCount
|
|
|
} else {
|
|
|
+ console.log('isGroupOverSetting', row.actualCount >= row.groupIndicator, row)
|
|
|
return row.actualCount >= row.groupIndicator
|
|
|
}
|
|
|
},
|