This commit is contained in:
zyy 2020-07-08 18:35:25 +08:00
commit 3693994526
15 changed files with 162 additions and 32 deletions

View File

@ -222,3 +222,17 @@ export function getStationListNeedAttendant(id) {
method: 'get'
});
}
/** 查询地图下站台关联的屏蔽门 */
export function getPsdListByStandCode(id, standCode) {
return request({
url: `/api/map/${id}/stand/${standCode}/psd`,
method: 'get'
});
}
/** 查询地图下车站关联的有屏蔽门的站台 */
export function getStandListByStationCode(id, stationCode) {
return request({
url: `/api/map/${id}/station/${stationCode}/standWithPsd`,
method: 'get'
});
}

BIN
src/assets/bg_cctv.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

BIN
src/assets/bg_iscs.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

BIN
src/assets/bg_lsw.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

BIN
src/assets/bg_psd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

View File

@ -151,28 +151,28 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
this.anime = null;
this.modelmanager = new ModelManager();
console.log(skinCode);
getPublish3dMapDetail(skinCode).then(netdata => {
console.log(netdata);
if(netdata.data){
setpsdstationmap(JSON.parse(netdata.data.stands));
Standtextureload(scope,JSON.parse(netdata.data.assets));
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
if(scope.stationtexture["stationlist"]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
}
if(scope.stationtexture["pingbimen"]){
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
}
})
}
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
//综合演练情况下当模型加载后显示
psdModelShow();
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
if(scope.stationtexture["stationlist"]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
}
if(scope.stationtexture["pingbimen"]){
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
}
})
animate();
});
@ -203,6 +203,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
}
this.hideswitch = function (nowswitchstatus){
if(nowswitchstatus){
scope.modelmanager.switchmodel.mesh.add(daochamodel);
@ -556,6 +558,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
this.updatewindowstatus = function(nowwindowstatus){
scope.windowstatus == nowwindowstatus;
}
function onselect(event){
if(event.button == '0'){

View File

@ -117,8 +117,6 @@ const training = {
},
over: (state) => {
state.started = false;
state.memberList = [];
state.simulationUserList = [];
state.switchcount += 1;
},
updateMapState: (state, deviceStatus) => {

View File

@ -110,7 +110,7 @@
},
mounted() {
window.updatemenulist = this.updatemenulist;
window.psdModelShow = this.psdModelShow;
let code = this.$route.query.code;
let group = this.$route.query.group;
let header = this.$route.query.token;
@ -136,6 +136,7 @@
}
if(this.$route.query.type == "VR_PSD"){
this.jl3d.updatewindowstatus('1');
this.psdCode = this.$route.query.psdCode;
}
// const mapdata = this.$store.getters['map/map'];
// console.log(mapdata);
@ -211,6 +212,15 @@
this.jl3d.hideswitch(this.switchstatus);
}
},
psdModelShow(){
if(this.psdCode){
let data={
code:this.$route.query.psdCode,
_type:"Psd"
};
this.jl3d.selectmodel(data);
}
}
}
}
</script>

View File

@ -211,6 +211,9 @@ import {driverListConfig,sceneListConfig,deviceListConfig,maintainerListConfig,c
export default {
name: 'EditAction',
props: {
assetListAll: Object
},
components: {
},
@ -238,6 +241,7 @@ export default {
},
mounted() {
window.updateSelectAsset = this.updateSelectAsset;
// assetListAll. = ;
},
methods: {

View File

@ -18,6 +18,8 @@
<el-button type="save" @click="save">保存</el-button>
<el-button type="savetest" @click="savetest">保存</el-button>
<el-button type="back" @click="back">返回</el-button>
</el-row>
@ -70,6 +72,10 @@ export default {
async save(){
this.$emit('save');
},
async savetest(){
this.$emit('savetest');
},
async back() {
this.$emit('back');

View File

@ -5,7 +5,7 @@
<div id="testdraw" class="testdraw">
</div>
<Edit-Action ref="action" @saction="saction" @actionevent="actionevent">
<Edit-Action ref="action" :assetListAll="assetListAll" @saction="saction" @actionevent="actionevent">
</Edit-Action>
<Edit-Property ref="property" :selectmodel='selectmodel'>
@ -15,7 +15,7 @@
</Edit-Assets>
<Edit-Menu ref="menu" @transpos="transpos" @transrota="transrota" @transscal="transscal" @vexscal= "vexscal" @testrail="testrail" @autoss="autoss" @expo="expo" @save="save"
@back="back">
@savetest="savetest" @back="back">
</Edit-Menu>
<canvas id="canvastexture" width="128px" height="64px"></canvas>
@ -75,7 +75,7 @@
mapdata: null,
jlmap3dedit: null,
assetlist: null,
assetListAll: null,
selectmodel: null
}
@ -190,6 +190,9 @@
});
},
savetest(){
console.log();
},
back() {
//console.log("back");

View File

@ -4,10 +4,10 @@
class="login-container"
:style="{'background-image': 'url('+bgImg+')'}"
element-loading-spinner="el-icon-loading"
element-loading-text="检测主工作站登录中"
:element-loading-text="loadingText"
element-loading-background="rgba(0, 0, 0, 0)"
>
<el-button v-if="syncLogin && loadingCode" type="text" style="font-size: 24px;font-weight: bold;" @click="loginRefresh">主工作站未登录,点击重新检测</el-button>
<el-button v-if="syncLogin && loadingCode" type="text" style="font-size: 24px;font-weight: bold;" @click="loginRefresh">关联设备未登录,点击重新检测</el-button>
<div v-if="loginTitle && !syncLogin" :class="$route.query.project=='hyd'?'text-box':'left-logo-box'">
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
@ -114,6 +114,10 @@ import { getLoginWmurl, checkLoginStatus, getLoginInfo } from '@/api/login';
import { LoginParams } from '@/utils/login';
import bgImg from '@/assets/bg1.jpg';
import bgIbpImg from '@/assets/bg_ibp.png';
import bgIscsImg from '@/assets/bg_iscs.jpg';
import bgCctvImg from '@/assets/bg_cctv.jpg';
import bgLswImg from '@/assets/bg_lsw.jpg';
import bgPsdImg from '@/assets/bg_psd.png';
import { UrlConfig } from '@/scripts/ConstDic';
import { loginInfo, ProjectIcon, GenerateRouteProjectList, VersionBaseNoShow, MainBodyNoShow} from '@/scripts/ProjectConfig';
import { removeToken, getToken } from '@/utils/auth';
@ -213,7 +217,15 @@ export default {
bgImg() {
const bgImgAll = this.$route.query.project == 'hyd' ? '' : bgImg;
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
return synchronousLogin.includes(this.$route.query.type) ? bgIbpImg : bgImgAll;
const imgMap = {
ISCS_LW: bgIscsImg,
ISCS_CW: bgIscsImg,
IBP: bgIbpImg,
CCTV: bgCctvImg,
VR_PSD: bgPsdImg,
LSW: bgLswImg
};
return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll;
},
syncLogin() {
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
@ -222,10 +234,26 @@ export default {
} else {
return false;
}
},
loadingText() {
const textMap = {
ISCS_LW: '检测主现地工作站登录中',
ISCS_CW: '检测主行调工作站登录中',
IBP: '检测主现地工作站登陆中',
CCTV: '检测教研机登录中',
VR_PSD: '检测教研机登录中',
LSW: '检测教研机登录中'
};
if (this.$route.query.type) {
return textMap[this.$route.query.type];
} else {
return '';
}
}
},
created() {
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
removeSessionStorage('projectDevice');
this.computedAttribute();
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken), 'project':loginInfo[this.project].loginParam};
@ -437,6 +465,11 @@ export default {
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type
}});
} else if (this.$route.query.type === 'VR_PSD') {
if (res.data.deviceVO && res.data.deviceVO.config) {
query.psdCode = JSON.parse(res.data.deviceVO.config).psdCode;
}
this.$router.push({ path: `/jointTrainingNew`, query: query });
} else {
this.$router.push({ path: `/jointTrainingNew`, query: query });
}

View File

@ -135,6 +135,16 @@ export default {
callback: action => {
}
});
},
'$store.state.socket.simulationRoleList':function(val) {
(val || []).forEach(item => {
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
this.back();
}
});
},
'$store.state.socket.simulationOver':function(val) {
this.back();
}
},
beforeDestroy() {

View File

@ -11,7 +11,7 @@
<div class="userBubble" @click="playAudio(baseUrl+chatContent.src)">
<div class="userMessage">
<!-- chatContent.all&& -->
<span>{{ covertName(chatContent,true) }}</span>
<!--<span>{{ covertName(chatContent,true) }}</span>-->
<span class="el-icon-video-play playicon" />
<span class="messageText">{{ chatContent.content }}</span>
</div>
@ -23,8 +23,6 @@
</div>
</template>
<script>
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
export default {
props:{

View File

@ -32,7 +32,7 @@
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联车站:" prop="stationCode">
<el-select v-model="stationCode" placeholder="请选择" size="small">
<el-select v-model="stationCode" placeholder="请选择" size="small" @change="stationCodeChange">
<el-option
v-for="item in stationList"
:key="item.code"
@ -41,6 +41,26 @@
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联站台:" prop="standCode">
<el-select v-model="standCode" placeholder="请选择" size="small" @change="standCodeChange">
<el-option
v-for="item in standList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联屏蔽门:" prop="psdCode">
<el-select v-model="formData.psdCode" placeholder="请选择" size="small">
<el-option
v-for="item in psdList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -51,7 +71,7 @@
<script>
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig } from '@/api/project';
import { getAllMapOnline, getStationListNeedAttendant } from '@/api/jmap/map';
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
export default {
name: 'EditConfig',
@ -83,12 +103,18 @@ export default {
],
deviceCode: [
{ required: true, message: '请选择教员机', trigger: 'change'}
],
psdCode: [
{ required: true, message: '请选择关联屏蔽门', trigger: 'change'}
]
},
mapId: '',
mapList: [],
stationCode: '',
stationList: []
stationList: [],
standList: [],
standCode: '',
psdList: []
};
},
computed: {
@ -126,6 +152,7 @@ export default {
});
},
mapIdChange(mapId) {
this.stationList = [];
if (mapId) {
getStationListNeedAttendant(mapId).then(resp => {
if (resp.data && resp.data.length) {
@ -134,8 +161,30 @@ export default {
}).catch(() => {
this.$message.error('获取车站列表失败');
});
} else {
this.stationList = [];
}
},
stationCodeChange(stationCode) {
this.standList = [];
if (stationCode) {
getStandListByStationCode(this.mapId, stationCode).then(resp => {
if (resp.data && resp.data.length) {
this.standList = resp.data;
}
}).catch(() => {
this.$message.error('获取站台列表失败');
});
}
},
standCodeChange(standCode) {
this.psdList = [];
if (standCode) {
getPsdListByStandCode(this.mapId, standCode).then(resp => {
if (resp.data && resp.data.length) {
this.psdList = resp.data;
}
}).catch(() => {
this.$message.error('获取屏蔽门列表失败');
});
}
},
doSave() {
@ -170,7 +219,8 @@ export default {
} else if (this.data.type == 'VR_PSD') {
this.$refs.form.validate(() => {
const param = {
deviceCode: this.formData.deviceCode
deviceCode: this.formData.deviceCode,
psdCode: this.formData.psdCode
};
setVrPsdConfig(this.data.id, param).then(response => {
self.$message.success('设置虚拟屏蔽门工作站配置成功');