竞赛 实操 场景调整

This commit is contained in:
joylink_cuiweidong 2020-10-14 17:10:25 +08:00
parent 96dfec83eb
commit 17a18eb328
4 changed files with 20 additions and 26 deletions

View File

@ -343,11 +343,12 @@ export function competitionPracticalSceneExit(group) {
});
}
/** 退出场景 */
export function competitionPracticalSceneFinish(group) {
/** 结束场景 */
export function competitionPracticalSceneFinish(group, data) {
return request({
url: `/api/v1/competitionPractical/finish/${group}`,
method: 'PUT'
method: 'PUT',
data
});
}
@ -359,12 +360,3 @@ export function getEmptyOperationalStatistics(group) {
});
}
/** 提交运营数据 */
export function submitOperationalStatistics(group, data) {
return request({
url: `/api/v1/competitionPractical/detail/os/${group}`,
method: 'PUT',
data
});
}

View File

@ -300,17 +300,6 @@ export default {
this.filterNode();
if (activeTrainList.length <= 0) {
this.resetCoversition();
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.active = false;
data.isConnect = false;
data.loading = false;
data.disabled = false;
});
}
});
}
// if (this.$refs.tree) {
// this.$refs.tree.filter(this.queryMember);
@ -941,6 +930,18 @@ export default {
this.commonMessageList = [];
this.conversitionStateMap = {};
this.messageList = this.commonMessageList;
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.active = false;
data.isConnect = false;
data.loading = false;
data.disabled = false;
data.isInviting = false;
});
}
});
}
}
};

View File

@ -395,6 +395,7 @@ export default {
this.$store.dispatch('scriptRecord/updateOperationalItemVOs', {});
this.quitQuest();
// this.initLoadPage();
this.isScriptRun = false;
this.clearAllData();
this.$store.dispatch('scriptRecord/updateBgSet', false);
}).catch(()=>{
@ -463,7 +464,7 @@ export default {
this.runScriptMode(memberId);
},
endTraining() {
competitionPracticalSceneFinish(this.group).then(res=>{
competitionPracticalSceneFinish(this.group, {operationStatisticVO:{}}).then(res=>{
this.isScriptRun = false;
// if (this.scriptMode == ScriptMode.TEST) {
this.formatScore = res.data;

View File

@ -28,7 +28,7 @@
</el-dialog>
</template>
<script>
import { submitOperationalStatistics} from '@/api/competition';
import { competitionPracticalSceneFinish} from '@/api/competition';
export default {
name:'OperationalStatistics',
data() {
@ -76,7 +76,7 @@ export default {
if (!result) {
this.$messageBox('请填写表单');
} else {
submitOperationalStatistics(this.$route.query.group, this.resultData).then(res=>{
competitionPracticalSceneFinish(this.$route.query.group, this.resultData).then(res=>{
this.$message.success('运营统计数据提交成功');
this.$store.dispatch('scriptRecord/updateOperationalItemVOs', this.resultData.itemVOS);
this.dialogShow = false;