Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
322ca86dec
@ -554,6 +554,7 @@ class Signal extends Group {
|
||||
if (this.style.Signal.lamp.guidName === 'double' || this.style.Signal.lamp.guidName === 'doubleAndBase') {
|
||||
this.lamps[1].hide();
|
||||
}
|
||||
this.insideTriangle && this.insideTriangle.setStyle({fill: this.style.Signal.insideTriangle.startSignalColor, stroke: this.style.Signal.insideTriangle.strokeColor});
|
||||
this.insideTriangle && this.insideTriangle.hide();
|
||||
this.sigPost && this.sigPost.removeTerminalOptional();
|
||||
this.ciConfirm && this.ciConfirm.stopAnimation(false);
|
||||
|
@ -49,12 +49,12 @@ export default {
|
||||
{
|
||||
name: 'global.designPlatformEntrance',
|
||||
handle: this.goToDesign,
|
||||
hidden: getSessionStorage('project').startsWith('design')
|
||||
hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
|
||||
},
|
||||
{
|
||||
name: 'global.trainingPlatformEntrance',
|
||||
handle: this.goToTraining,
|
||||
hidden: !getSessionStorage('project').startsWith('design')
|
||||
hidden: !getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
|
||||
},
|
||||
{
|
||||
name: 'global.caseShow',
|
||||
|
@ -195,7 +195,10 @@ export default {
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
const data = this.$store.state.map.map[item];
|
||||
if (data && data.constructor === Array) {
|
||||
list = [...list, ...data];
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowMode(list, showMode);
|
||||
|
@ -403,7 +403,10 @@ export default {
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
const data = this.$store.state.map.map[item];
|
||||
if (data && data.constructor === Array) {
|
||||
list = [...list, ...data];
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$jlmap.updatePrdType(val, nameList);
|
||||
|
@ -173,7 +173,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { addRoutingData, updateRoutingData, gernateRoutingSection } from '@/api/jmap/mapdraft';
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
// import { ViewMode } from '@/scripts/ConstDic';
|
||||
import { formatName } from '@/utils/runPlan';
|
||||
import Sortable from 'sortablejs';
|
||||
|
||||
@ -192,16 +192,10 @@ export default {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// routeData: {
|
||||
// type: Object,
|
||||
// default() {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ViewMode: ViewMode,
|
||||
// ViewMode: ViewMode,
|
||||
field: '',
|
||||
allowSelect:false,
|
||||
isStartSelected:false,
|
||||
@ -299,12 +293,6 @@ export default {
|
||||
this.addModel.mapId = val.id;
|
||||
}
|
||||
},
|
||||
// routeData(val, old) {
|
||||
// debugger;
|
||||
// if (val) {
|
||||
// this.addModel = val;
|
||||
// }
|
||||
// },
|
||||
'addModel.parkSectionCodeList':function(val, old) {
|
||||
this.changeSectionSelected(val, true);
|
||||
},
|
||||
|
@ -233,7 +233,8 @@ export default {
|
||||
if (this.drawWay) {
|
||||
getScriptPlayMemberNew(this.group).then(resp => {
|
||||
this.orginMemberList = resp.data;
|
||||
this.memberList = resp.data;
|
||||
const lastData = JSON.stringify(resp.data);
|
||||
this.memberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||
this.resetDisabled();
|
||||
this.initCommandActionData();
|
||||
}).catch(error => {
|
||||
@ -241,22 +242,9 @@ export default {
|
||||
});
|
||||
} else {
|
||||
getScriptPlayMember(this.group).then(resp => {
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||
this.orginMemberList = resp.data;
|
||||
let lastData = JSON.stringify(resp.data);
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||
} else {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||
}
|
||||
});
|
||||
lastData = JSON.parse(lastData);
|
||||
lastData.forEach(each=>{
|
||||
each.name = each.role + (each.name == undefined ? '' : each.name);
|
||||
});
|
||||
this.memberList = lastData;
|
||||
const lastData = JSON.stringify(resp.data);
|
||||
this.memberList = this.covert(lastData, ConstConfig.ConstSelect.roleType);
|
||||
this.resetDisabled();
|
||||
this.initCommandActionData();
|
||||
}).catch(error => {
|
||||
@ -265,6 +253,24 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
covert(data, roleTypeList) {
|
||||
let lastData = data;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||
} else {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||
}
|
||||
});
|
||||
lastData = JSON.parse(lastData);
|
||||
lastData.forEach(each=>{
|
||||
const name = each.name == undefined ? '' : '-' + each.name;
|
||||
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
|
||||
each.name = each.role + deviceName + name;
|
||||
});
|
||||
return lastData;
|
||||
},
|
||||
hover(field) {
|
||||
if (this.field == '') {
|
||||
if (this.isFirstTips) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button v-if="actionInfo.visible" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
||||
<el-button v-if="actionInfo.visible && !drawWay" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||
</div>
|
||||
</el-card>
|
||||
@ -29,6 +29,7 @@
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
import {deleteScriptAction, getAvailableDeviceCommand, getScriptRecord, getScriptAllAction, getScriptPlayMemberNew } from '@/api/simulation';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CommandHandler from '@/scripts/cmdPlugin/CommandHandler';
|
||||
@ -49,7 +50,7 @@ export default {
|
||||
return {
|
||||
actionInfoList: [],
|
||||
deviceCommandList: [],
|
||||
reverse: true,
|
||||
reverse: false,
|
||||
loading: true,
|
||||
// behaviorName:"",
|
||||
memberName: ''
|
||||
@ -85,11 +86,30 @@ export default {
|
||||
this.loadOtherData(this.$route.query);
|
||||
}
|
||||
},
|
||||
covert(data, roleTypeList) {
|
||||
let lastData = data;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||
} else {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||
}
|
||||
});
|
||||
lastData = JSON.parse(lastData);
|
||||
lastData.forEach(each=>{
|
||||
const name = each.name == undefined ? '' : '-' + each.name;
|
||||
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
|
||||
each.name = each.role + deviceName + name;
|
||||
});
|
||||
return lastData;
|
||||
},
|
||||
loadOtherData(obj) {
|
||||
const group = obj.group;
|
||||
if (this.drawWay) {
|
||||
getScriptPlayMemberNew(this.group).then(response => {
|
||||
const memberVOList = response.data;
|
||||
const lastData = JSON.stringify(response.data);
|
||||
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||
getScriptAllAction(group).then(resp=>{
|
||||
this.actionInfoList = [];
|
||||
const actionList = resp.data;
|
||||
@ -128,14 +148,16 @@ export default {
|
||||
getScriptRecord(group).then(response=>{
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
|
||||
this.actionInfoList = [];
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||
// const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||
// let memberVOList = JSON.stringify(response.data.memberVOList);
|
||||
// roleTypeList.forEach(function(element) {
|
||||
// const rolename = element.value;
|
||||
// memberVOList = memberVOList.replace(new RegExp(rolename, 'g'), element.label);
|
||||
// });
|
||||
// memberVOList = JSON.parse(memberVOList);
|
||||
const lastData = JSON.stringify(response.data);
|
||||
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||
|
||||
let memberVOList = JSON.stringify(response.data.memberVOList);
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
memberVOList = memberVOList.replace(new RegExp(rolename, 'g'), element.label);
|
||||
});
|
||||
memberVOList = JSON.parse(memberVOList);
|
||||
const actionList = response.data.actionVOList;
|
||||
|
||||
actionList.forEach(element => {
|
||||
|
@ -333,14 +333,14 @@ export default {
|
||||
this.showLocal = true;
|
||||
localExamSocreRadio = elem.examSocreRadio * 100 * 60 / 100 / item.scores.length;
|
||||
localLessonPassRate = elem.lessonPassRate * 100 * 30 / 100 / item.scores.length;
|
||||
totolScore += localExamSocreRadio;
|
||||
totolScore += localLessonPassRate;
|
||||
totolScore += localExamSocreRadio * 100;
|
||||
totolScore += localLessonPassRate * 100;
|
||||
} else if (elem.prdType === '02') {
|
||||
this.showCenter = true;
|
||||
centerExamSocreRadio = elem.examSocreRadio * 100 * 60 / 100 / item.scores.length;
|
||||
centerLessonPassRate = elem.lessonPassRate * 100 * 30 / 100 / item.scores.length;
|
||||
totolScore += centerExamSocreRadio;
|
||||
totolScore += centerLessonPassRate;
|
||||
totolScore += centerExamSocreRadio * 100;
|
||||
totolScore += centerLessonPassRate * 100;
|
||||
}
|
||||
});
|
||||
totolScore += item.attendance * 100 * 10 / 100;
|
||||
@ -354,7 +354,7 @@ export default {
|
||||
localLessonPassRate: localLessonPassRate,
|
||||
centerExamSocreRadio: centerExamSocreRadio,
|
||||
centerLessonPassRate: centerLessonPassRate,
|
||||
totolScore: totolScore
|
||||
totolScore: totolScore / 100
|
||||
});
|
||||
});
|
||||
}).catch(() =>{
|
||||
|
Loading…
Reference in New Issue
Block a user