diff --git a/src/views/games/details/achievement.vue b/src/views/games/details/achievement.vue index e2590e3..fb20105 100644 --- a/src/views/games/details/achievement.vue +++ b/src/views/games/details/achievement.vue @@ -189,13 +189,13 @@ type="success" @click="addAC" v-if="permEdit" - >新增成就 + >新增 保存全部 + >保存 新增配置 + >新增 保存全部 + >保存 新增推荐 + >新增 保存全部 + >保存 发布推荐 + >发布 新增 {{ switchText }} + 批量发布 批量删除 {{ batch.txt }} -
{ this.$message.success('保存成功!') - this.switchData() + this.isDev = true + this.getRewards() this.closeModal() }) .catch(err => { @@ -698,6 +701,46 @@ export default { this.$message.info('已取消删除!') }) }, + batchPublish() { + this.$confirm( + `是否发布所选${this.multipleSelection.length}条奖励?`, + '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + } + ) + .then(() => { + const submitArr = [] + this.multipleSelection.map(row => { + const devData = JSON.parse(JSON.stringify(row)) + const proData = JSON.parse(JSON.stringify(row)) + devData.isDev = true + devData.published = true + + proData.isDev = false + proData.published = true + + submitArr.push(this.saveReward(devData)) + submitArr.push(this.saveReward(proData)) + }) + Promise.all(submitArr) + .then(() => { + this.$message.success('发布成功!') + this.getRewards() + }) + .catch(err => { + console.log(err) + }) + }) + .catch(() => { + this.$notify.info({ + title: '消息', + message: '已取消发布' + }) + }) + }, formKeys(row, column, cellValue, index) { return cellValue.join(',') }, diff --git a/src/views/games/details/settings/SettingPanel.vue b/src/views/games/details/settings/SettingPanel.vue index ff2adc9..12aa240 100644 --- a/src/views/games/details/settings/SettingPanel.vue +++ b/src/views/games/details/settings/SettingPanel.vue @@ -79,17 +79,17 @@ 保存 发布 - 重置 diff --git a/src/views/games/details/share/edit.vue b/src/views/games/details/share/edit.vue index 56eb14b..e7624e5 100644 --- a/src/views/games/details/share/edit.vue +++ b/src/views/games/details/share/edit.vue @@ -1,12 +1,13 @@