|
@@ -40,6 +40,8 @@
|
|
|
<el-switch
|
|
|
@change="openBtn(scope.row,scope.$index)"
|
|
|
v-model="scope.row.topPriority"
|
|
|
+ active-text="是"
|
|
|
+ inactive-text="否"
|
|
|
active-color="#13ce66"
|
|
|
inactive-color="#ff4949">
|
|
|
</el-switch>
|
|
@@ -66,7 +68,7 @@
|
|
|
width="200"
|
|
|
trigger="hover"
|
|
|
content="随机分配">
|
|
|
- <el-radio-button class="radio-btn" label="random" slot="reference">随机</el-radio-button>
|
|
|
+ <el-radio-button :disabled="isSetTopPriority" class="radio-btn" label="random" slot="reference">随机</el-radio-button>
|
|
|
</el-popover>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
@@ -109,14 +111,19 @@ export default {
|
|
|
return maxQuantit-allSelect
|
|
|
}
|
|
|
},
|
|
|
+ isSetTopPriority() {
|
|
|
+ return this.settingContainer.filter(item => {return item.topPriority}).length > 0
|
|
|
+ },
|
|
|
formatSetting() {
|
|
|
+ console.log('reset ')
|
|
|
return this.settingContainer.map((item,index) => {
|
|
|
return {
|
|
|
sortIndex: index + 1,
|
|
|
expectedCount: item.expectedCount,
|
|
|
classId: item.classId,
|
|
|
className: this.getClassName(item.classId),
|
|
|
- actualCount: item.actualCount
|
|
|
+ actualCount: item.actualCount,
|
|
|
+ topPriority:item.topPriority
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -142,6 +149,9 @@ export default {
|
|
|
},
|
|
|
openBtn(newVal,index){
|
|
|
this.settingContainer[index].topPriority = newVal.topPriority
|
|
|
+ if(this.isSetTopPriority && this.mode == 'random'){
|
|
|
+ this.mode = 'RankBalance'
|
|
|
+ }
|
|
|
},
|
|
|
init(roundGroup,settingContainer) {
|
|
|
console.log(roundGroup,settingContainer)
|
|
@@ -151,6 +161,8 @@ export default {
|
|
|
return item.groupId == roundGroup.groupId && item.expectedCount != 0
|
|
|
}).length
|
|
|
console.log(isSetting)
|
|
|
+ console.log(settingContainer.filter(item => item.groupId == roundGroup.groupId))
|
|
|
+
|
|
|
if( isSetting > 0) {
|
|
|
// 填充后台的
|
|
|
this.settingContainer = settingContainer.filter(item => item.groupId == roundGroup.groupId)
|