裁判系统代码调整

This commit is contained in:
joylink_cuiweidong 2020-06-05 13:05:33 +08:00
parent e3b2726d8b
commit 7f72ed4048
3 changed files with 35 additions and 6 deletions

View File

@ -58,7 +58,7 @@
<div class="img_box"><img :src="SAFS" alt=""></div>
<div style="width: 100%;text-align:center;margin-top:120px;"><i class="el-icon-success" style="color: green; font-size: 100px;" /></div>
<div style="width: 100%;margin-top: 25px;">
<div class="apply_box_title">报名成功!:<br> 您的赛事信息如下:
<div class="apply_box_title">报名成功!<br> 您的赛事信息如下:
<br>竞赛名称{{ compition.name }}
<br>竞赛时间{{ compition.startDate }}
<br>姓名{{ formModel.name }}
@ -85,7 +85,7 @@
</div>
</div>
</div>
</template></div></template>
</template>
</div>
</template>

View File

@ -16,7 +16,9 @@ import { mapGetters } from 'vuex';
import { checkLoginLine } from '@/api/login';
import { EventBus } from '@/scripts/event-bus';
import MenuReplay from './menuReplay';
import { getToken } from '@/utils/auth';
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
export default {
name:'RefereeDisplay',
components: {
@ -52,10 +54,14 @@ export default {
},
height() {
return this.$store.state.app.height;
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
this.subscribe();
this.mapBoxP = document.getElementById(this.canvasId).children[0];
this.mapBoxP.style.cursor = '';
},
@ -67,10 +73,12 @@ export default {
}
},
async mounted() {
window.onbeforeunload = this.clearSubscribe;
await this.setWindowSize();
await this.initLoadData();
},
async beforeDestroy() {
this.clearSubscribe();
await this.clearAllTimer();
await this.quit();
await this.$store.dispatch('training/reset');
@ -81,6 +89,16 @@ export default {
async back() {
// await this.$refs.menuScript.back();
},
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.group}`);
},
async subscribe() {
this.clearSubscribe();
const header = { group: this.group || '', 'X-Token': getToken() };
creatSubscribe(`${displayTopic}\/${this.group}`, header);
await this.$store.dispatch('training/setHasSubscribed');
},
//
async initLoadData() {
this.$store.dispatch('training/reset');

View File

@ -82,7 +82,7 @@ export default {
prop: 'theoryScore',
width:100,
type: 'tag',
columnValue: (row) => { return row.artificialTheoryScore ? `${row.theoryScore}(${row.artificialTheoryScore})` : row.theoryScore || '0'; },
columnValue: (row) => { return row.artificialTheoryScore ? `${row.theoryScore}(${row.artificialTheoryScore})` : this.covert(row.theoryScore); },
tagType: (row) => { return 'success'; }
},
{
@ -90,7 +90,7 @@ export default {
prop: 'practiceScore',
width:100,
type: 'tag',
columnValue: (row) => { return row.artificialPracticeScore ? `${row.practiceScore}(${row.artificialPracticeScore})` : row.practiceScore || '0'; },
columnValue: (row) => { return row.artificialPracticeScore ? `${row.practiceScore}(${row.artificialPracticeScore})` : this.covert(row.practiceScore); },
tagType: (row) => { return 'success'; }
},
{
@ -119,13 +119,13 @@ export default {
name: '理论结果',
handleClick: this.handleTheoryResult,
type: '',
showControl: (row) => { return row.status == '5' || row.status == '4'; }
showControl: (row) => { return row.status == '5' || row.status == '4' || row.theoryScore != undefined; }
},
{
name: '实操回放',
handleClick: this.playBack,
type: '',
showControl: (row) => { return row.status == '4'; }
showControl: (row) => { return row.status == '4' || row.status == '6' || row.practiceScore != undefined; }
},
{
name: '修改',
@ -183,6 +183,17 @@ export default {
this.$refs.theoryResult.doShow({row:row, raceId:this.$route.query.raceId});
// this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}&result=true` });
},
covert(data) {
if (data != undefined) {
if (data > 0) {
return data;
} else {
return '0';
}
} else {
return '';
}
},
handleAdd() {
const loading = this.$loading({
lock: true,