Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2023-01-11 17:49:25 +08:00
commit a03b16e60a
12 changed files with 23 additions and 298 deletions

View File

@ -2,8 +2,6 @@
<div class="bigScreen">
<div v-show="maskOpen" class="bigScreenMask" />
<jlmap-visual ref="jlmapVisual" />
<wh-train-list v-if="prdType=== '10'" ref="whTrainList" />
<voice-command v-if="prdType === '10'" ref="whTrainList" />
<div v-show="disPlay" class="bigScreenBack">
<el-button-group>
<el-button type="primary" @click="back">返回</el-button>
@ -19,15 +17,11 @@ import { mapGetters } from 'vuex';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
import { getToken } from '@/utils/auth';
import { TrainingMode } from '@/scripts/ConstDic';
import WhTrainList from './whTrainList';
import VoiceCommand from './voiceCommand';
export default {
name: 'BigScreen',
components: {
JlmapVisual,
WhTrainList,
VoiceCommand
JlmapVisual
},
props: {
widthLeft: {

View File

@ -1,188 +0,0 @@
<template>
<div class="qrcode-main">
<div class="login-code-box" @click="loginRefresh">
<qrcode-vue
v-loading="loadingCode"
:value="loginUrl"
:class-name="qrcodeClassName"
:size="150"
:element-loading-text="this.$t('login.clickRefresh')"
element-loading-spinner="el-icon-refresh"
element-loading-background="rgba(255, 255, 255, 0.9)"
/>
</div>
<div class="login-tip">
<span class="sub-title">{{ $t('login.scanCodeLogin') }}</span>
</div>
<div class="tip-info">
<fieldset>
<legend>
{{ $t('login.recommendedConfiguration') }}
</legend>
<span>{{ $t('login.browser') }}
<a href="https://www.google.cn/chrome/" target="_blank" style="text-decoration: underline;">{{
$t('login.googleChrome')
}}</a>
</span>
<br>
<span>{{ $t('login.screenResolution') + '1920*1080' }}</span>
</fieldset>
</div>
</div>
</template>
<script>
// , gtLoginInfo, getOrgList, selectOrgnization
import QrcodeVue from 'qrcode.vue';
import { getLoginWmurl, checkLoginStatus} from '@/api/login';
import { LoginParams } from '@/utils/login';
export default {
name:'WeChatLogin',
components: { QrcodeVue },
props: {
project: {
type: String,
default: () => {
return '';
}
},
syncLogin:{
type: Boolean,
default: () => {
return false;
}
}
},
data() {
return {
loadingCode: false,
loginUrl: '',
sessionId: '',
checkLogin: null,
qrcodeClassName: 'login-qrcode',
loginClient:'LianKeTang'
};
},
watch: {
'project': function(val) {
this.loginRefresh();
}
},
methods:{
loginRefresh() {
// this.loadingCode = true;
const params = LoginParams[this.loginClient];
params.project = this.project;
if (this.$route.query.projectDevice) {
params.deviceCode = this.$route.query.projectDevice;
}
const self = this;
getLoginWmurl(params)
.then(response => {
self.sessionId = response.data.sessionId;
self.loginUrl = response.data.url;
self.loadingCode = false;
self.checkLoginStatus();
})
.catch(() => {
if (self.syncLogin) {
setTimeout(() => {
self.loginRefresh();
}, 3000);
} else {
self.loadingCode = false;
self.$messageBox(this.$t('login.getLoginQrCode'));
}
});
},
checkLoginStatus() {
//
if (this && this._isDestroyed) {
return;
}
//
this.clearTimer(this.checkLogin);
//
const self = this;
self.checkLogin = setTimeout(() => {
checkLoginStatus(self.sessionId)
.then(response => {
//
debugger;
self.$store
.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token, type: 'class' })
.then(() => {
//
self.clearTimer(self.checkLogin);
// this.handleLoginSucessRoute();
self.checkOrgnizationInfo();
});
})
.catch(error => {
if ((error.data && error.data.status === 'EXPIRE') || error.code != 200) {
if (self.syncLogin) {
self.loginRefresh();
} else {
self.loadingCode = true;
self.loginUrl = '';
}
} else {
self.checkLoginStatus();
}
});
}, 3000);
},
clearTimer(timer) {
if (timer) {
clearTimeout(timer);
timer = null;
}
}
}
};
</script>
<style lang="scss" scoped>
$qrbg: #fff;
.qrcode-main {
width:300px;
background-color: $qrbg;
text-align: center;
border-right: 1px solid #ececec;
.tip-info {
text-align: left;
display: inline-block;
color: green;
margin: 0 auto;
}
.login-code-box {
width: 150px;
margin: 0 auto;
cursor: pointer;
}
.system-type {
margin: 5px 0;
display: block;
}
.sub-title {
font-size: 16px;
text-align: center;
color: #353535;
line-height: 30px;
}
}
.el-loading-spinner i {
font-size: 100px;
}
.el-loading-spinner .el-loading-text {
font-size: 24px;
}
.login-code-box {
.el-loading-spinner i {
font-size: 14px;
}
.el-loading-spinner .el-loading-text {
font-size: 14px;
}
}
</style>

View File

@ -201,7 +201,7 @@ export default {
electricDispatcherList.push(this.memberData[item.id]);
break;
case 'DEPOT_DISPATCHER':
this.memberData[item.id].labelName = '车辆段信号楼' + (item.name || '');
this.memberData[item.id].labelName = '信号楼-' + device.name + (item.name || '');
depotDispatcherList.push(this.memberData[item.id]);
break;
case 'STATION_SUPERVISOR':

View File

@ -1,86 +0,0 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="$t('display.setTime.systemTime')" prop="time">
<el-time-picker
v-model="formModel.time"
:picker-options="pickerOptions"
:placeholder="$t('display.setTime.anyTime')"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="status" @click="handleSure">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { modifySystemTime } from '@/api/simulation';
import { prefixIntrger } from '@/utils/date';
//
export default {
data() {
return {
show: false,
formModel: {
time: new Date()
},
maxNumber: 1,
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
status: false
};
},
computed: {
title() {
return '修改系统时间';
},
group() {
return this.$route.query.group;
},
rules() {
return {
time: [
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' }
]
};
}
},
methods: {
doShow() {
// this.formModel.time = new Date(this.$store.state.training.initTime || null);
this.show = true;
},
doClose() {
this.status = false;
this.show = false;
},
formatTime(time) {
const hh = prefixIntrger(time.getHours(), 2);
const mm = prefixIntrger(time.getMinutes(), 2);
const ss = prefixIntrger(time.getSeconds(), 2);
return `${hh}:${mm}:${ss}`;
},
handleSure() {
this.$refs.form.validate((valid) => {
if (valid) {
this.status = true;
const model = {
time: this.formatTime(this.formModel.time)
};
modifySystemTime(model, this.group).then(resp => {
this.status = false;
this.$message.success('修改系统时间成功!');
}).catch(() => {
this.status = false;
this.$messageBox('修改系统时间失败,请稍后再试');
});
this.doClose();
}
});
}
}
};
</script>

View File

@ -192,8 +192,8 @@ export default {
destroySimulationByAdmin(this.group).then(() => {
this.logout();
});
} else if (this.$route.query.labels) {
window.close();
} else if (this.$route.query.third) {
this.$router.push({ path: `/trainingPlatform/simulation/${this.$route.query.mapId}`, query: { lineCode: this.$route.query.lineCode } });
} else if (this.projectDevice) {
this.logout();
} else {

View File

@ -1,16 +1,23 @@
<template>
<div>
<div style="width: 100%;overflow: hidden;position: relative;">
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
<voice-command v-if="project === 'yjddzh'" ref="voiceCommand" />
<wh-train-list v-if="project === 'yjddzh'" ref="whTrainList" />
</div>
</template>
<script>
import StationDiagram from '../stationDiagram/index';
import VoiceCommand from '../yjddzh/voiceCommand';
import WhTrainList from '../yjddzh/whTrainList';
import { getSessionStorage } from '@/utils/auth';
import {mapGetters} from 'vuex';
export default {
name: 'BigScreen',
components: {
StationDiagram
StationDiagram,
VoiceCommand,
WhTrainList
},
data() {
return {
@ -28,6 +35,9 @@ export default {
},
mapDevice() {
return this.$store.state.map.mapDevice;
},
project() {
return getSessionStorage('project');
}
},
watch: {

View File

@ -24,7 +24,8 @@ export default {
mapId: this.$route.query.mapId,
simType: this.$route.query.simType,
project: this.$route.query.project,
labels: this.$route.query.labels
labels: this.$route.query.labels,
third: true
};
this.$router.push({ path: `/display/demon`, query: query });
launchFullscreen();

View File

@ -50,7 +50,7 @@ export default {
queryList:{
query: this.queryFunction,
selectCheckShow: false,
paginationHiden: true,
// paginationHiden: true,
indexShow: true,
columns: [
{
@ -168,8 +168,8 @@ export default {
return this.$route.path.includes('/teachingDataManage/');
},
queryFunction(param) {
delete param.pageSize;
delete param.pageNum;
// delete param.pageSize;
// delete param.pageNum;
if (this.hasTeachingDataManage()) {
return getAllPublishTrainingList(param);
} else {

View File

@ -9,7 +9,7 @@
import { getPermissionPage } from '@/api/permissionManage';
import Create from './create';
import { getAllAbility } from '@/api/functionManage';
import { queryMapListByUser } from '@/api/jmap/map';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { ProjectList } from '@/scripts/ProjectConfig';
export default {
@ -181,7 +181,7 @@ export default {
this.queryForm.queryObject.permissionType.config.data = this.$ConstSelect.permissionTypeList;
this.queryForm.queryObject.projectCode.config.data = ProjectList;
//
queryMapListByUser().then(res => {
getPublishMapListOnline().then(res => {
res.data.forEach(elem => {
const obj = { value: elem.id, label: elem.name };
this.queryForm.queryObject.mapId.config.data.push(obj);

View File

@ -13,9 +13,6 @@
<el-form-item label="显示背景图片:" prop="showBackPic" class="inlineBlock">
<el-switch v-model="formModel.showBackPic" />
</el-form-item>
<el-form-item label="微信登录:" prop="wechatLogin" class="inlineBlock">
<el-switch v-model="formModel.wechatLogin" />
</el-form-item>
<el-form-item label="联系方式:" prop="loginContectInformation" class="inlineBlock">
<el-switch v-model="formModel.loginContectInformation" />
</el-form-item>
@ -88,7 +85,6 @@ export default {
baseDevelopment:false, //
aboutSystem:'', //
showBackPic:true, //
wechatLogin:true, //
loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:0, // logo
@ -144,7 +140,6 @@ export default {
this.formModel.baseDevelopment = viewSetting.baseDevelopment || false;
this.formModel.aboutSystem = viewSetting.aboutSystem || '';
this.formModel.showBackPic = viewSetting.showBackPic || false;
this.formModel.wechatLogin = viewSetting.wechatLogin || false;
this.formModel.loginContectInformation = viewSetting.loginContectInformation || false;
this.formModel.loginProLogo = viewSetting.loginProLogo || '';
@ -174,7 +169,6 @@ export default {
baseDevelopment:false, //
aboutSystem:'', //
showBackPic:true, //
wechatLogin:true, //
loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:'', // logo