仿真skinCode调整

This commit is contained in:
joylink_cuiweidong 2019-11-12 13:39:52 +08:00
parent 90a45dc5bd
commit 5ce2e1a5b7
6 changed files with 28 additions and 20 deletions

View File

@ -135,9 +135,9 @@ export default {
this.$refs.applyReject.doShow(row);
},
scriptPreview(index, row) {
// const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
scriptDraftRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0};
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode};
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
launchFullscreen();
}).catch(error => {

View File

@ -25,7 +25,7 @@
</template>
<script>
// import { getPublishMapInfo } from '@/api/jmap/map';
import { getPublishMapInfo } from '@/api/jmap/map';
import { getGoodsTryUse } from '@/api/management/goods';
import { PermissionType } from '@/scripts/ConstDic';
import { launchFullscreen } from '@/utils/screen';
@ -61,7 +61,8 @@ export default {
pmsList: []
},
jointShow: false,
jointGroup: ''
jointGroup: '',
lineCode:''
};
},
computed: {
@ -84,6 +85,10 @@ export default {
mapId() {
return this.$route.query.mapId;
}
// lineCode() {
// // return this.$route.query.lineCode;
// }
},
watch: {
'$route': function (val) {
@ -97,6 +102,7 @@ export default {
async loadInitData() {
this.loading = true;
try {
const res = await getPublishMapInfo(this.mapId);
const resp = await getSubSystemDetail(this.$route.params.subSystem);
this.tryUser = 0;
this.loading = false;
@ -105,7 +111,7 @@ export default {
id: resp.data.mapPrd.id,
name: resp.data.mapPrd.name,
mapId: this.mapId,
lineCode: resp.data.mapPrd.lineCode,
lineCode: res.data.lineCode,
remarks: resp.data.mapPrd.remarks,
prdType: resp.data.mapPrd.prdType,
prdId: resp.data.mapPrd.id,
@ -226,6 +232,7 @@ export default {
const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId };
this.buttonLoading = true;
simulationNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen();

View File

@ -90,7 +90,7 @@ export default {
switch (obj.type) {
case 'scriptDesign': {
setSessionStorage('designType', 'scriptDesign');
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` });
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}` });
break;
}
case 'lessonDesign': {
@ -141,7 +141,8 @@ export default {
name: this.$t('designPlatform.scriptDesign'),
type: 'scriptDesign',
mapId: elem.id,
cityCode: elem.cityCode
cityCode: elem.cityCode,
lineCode: elem.lineCode
// code:elem.children.find(n => { return n.name.includes("")})
});
elem.children.push(

View File

@ -70,8 +70,8 @@ export default {
title() {
return this.$t('display.faultChoose.selectFault');
},
skinCode() {
return this.$route.query.skinCode;
lineCode() {
return this.$route.query.lineCode;
}
},
mounted() {
@ -109,7 +109,7 @@ export default {
doShow() {
this.dialogShow = true;
this.queryList.data = [];
getFailureGenerateRules({ skin: this.skinCode, group: this.group }).then(response => {
getFailureGenerateRules({ skin: this.lineCode, group: this.group }).then(response => {
const data = response.data;
data.forEach(elem => {
this.queryList.data.push({

View File

@ -126,7 +126,7 @@ export default {
},
drawUp(index, row) {
scriptRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang };
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen();
}).catch(error => {
@ -253,7 +253,7 @@ export default {
},
previewScript(index, row) {
scriptDraftRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0};
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
launchFullscreen();
}).catch(error => {

View File

@ -205,16 +205,21 @@ export default {
};
if (old) {
if (old.userRole) {
if (!user.userRole) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}被提出房间`});
if (this.userId == user.id) {
this.jumpOutRoom();
}
} else if (old.userRole) {
if (!user.inRoom) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}退出房间`});
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}离线`});
if (this.userId == user.id) {
this.jumpOutRoom();
}
}
if (!old.inRoom && user.inRoom) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}进入房间`});
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}在线`});
}
if (user.inSimulation) {
@ -223,11 +228,6 @@ export default {
this.jumpInSimulation();
}
}
} else {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}被提出房间`});
if (this.userId == user.id) {
this.jumpOutRoom();
}
}
} else {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}进入房间`});