This commit is contained in:
zyy 2020-07-14 15:35:19 +08:00
commit c2d158da5b
17 changed files with 134 additions and 96 deletions

View File

@ -143,7 +143,7 @@ export function loadDraftScript(scriptId, memberId, group) {
export function loadDraftScriptNew(memberId, group) {
return request({
// url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
url: `/api/scriptSimulation/${group}/chooseMember/${memberId}/StartScript`,
url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`,
method: 'put'
});
}

View File

@ -16,7 +16,7 @@ if(BASE_API == "https://test.joylink.club/jlcloud"){
asseturl = "https://test.joylink.club/oss/joylink"
}
const BASE_UPLOAD_API = uploadurl;
const BASE_ASSET_API = asseturl;
export const BASE_ASSET_API = asseturl;
export function getUploadModelUrl() {
return (BASE_UPLOAD_API+"/api/upload/MODEL?appId=00001&appSecret=joylink00001");

View File

@ -75,9 +75,9 @@ export function getPublish3dMapDetail(id) {
}
/** 更新地图3d数据*/
export function tuoguan3ddrive(group,on,data) {
export function tuoguan3ddrive(group,data) {
return request({
url: `/api/scriptSimulation/${group}/trust?on=${on}`,
url: `/api/scriptSimulation/${group}/trust`,
method: 'put',
data: data
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -126,6 +126,7 @@ export function Jlmap3ddata(mapid,scope){
assetloader.setmodellistnew(netdata.assets,5);
assetloader.assetpromise(scene)
.then(function(data){
console.log(assetloader);
// return jlmap3ddata.stationstandlist.initpromise(jlmap3ddata,mapdata.stationList,mapdata.stationStandList,scene,assetloader);
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata.stationStandList,scene,assetloader);
})

View File

@ -102,13 +102,13 @@ export function getmodels(data) {
deviceType:"suidaobg",
type:"nbsuidao",
picUrl:"",
assetUrl:"../../static/model/suidao/suidao.FBX"
assetUrl:"../../static/model/suidao/xiansuidao.FBX"
}
assets.push(backgroundmodel);
models.assets = assets;
models.stationtexture = "fz1";
models.istexture = false;
models.stationtexture = "xian3";
models.istexture = true;
console.log(models);
postmap.assets = JSON.stringify(models);
//link轨道

View File

@ -104,7 +104,13 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
return;
}
if(data.type == "Train_Hmi_3D"){
console.log(data);
updatestatus(data.body);
if(data.body.trust == '1'){
updateDriverTrust(data.body.code,true);
}else{
updateDriverTrust(data.body.code,false);
}
// trainhmi(data.body);
return;
}

View File

@ -2,6 +2,7 @@ export function AssetModel(data){
let scope = this;
this.id = data.id;
this.name = data.name;
@ -10,10 +11,14 @@ export function AssetModel(data){
this.type = data.type;
this.type = null;
this.assetUrl = data.assetUrl;
this.mesh = null;
this.mesh = null;
this.animate = null;
this.create = function(){

View File

@ -8,6 +8,8 @@ import FaviconJyd from '@/assets/icon/favicon_jyd.png';
import Bottom_Jyd from '@/assets/icon/bottom_jyd.png';
import Link_Jyd from '@/assets/icon/link_jyd.png';
import FaviconTky from '@/assets/icon/favicon_tky.png';
import FaviconBxkc from '@/assets/icon/favicon_bxkc.png';
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
// import { LoginParams } from '@/utils/login';
// title:页面title; loginPath:退出登录跳转路径; loginParam:登录接口参数project;loginTitle:登录页左上角titlelogoWidth登录页左上角logo宽度
@ -154,6 +156,30 @@ export const loginInfo = {
loginParam: 'DEFAULT',
navigationLogoWidth: '75px',
navigationMarginLeft: '90px'
},
bxkc: {
title: '城市轨道交通实训平台',
loginPath: '/login?project=bxkc',
loginTitle: '空串',
logoWidth: '400px',
bottomIcon: FaviconBxkc,
bottomColumn: '',
linkIcon: Link_Bxkc,
loginParam: 'DEFAULT',
navigationLogoWidth: '160px',
navigationMarginLeft: '175px'
},
designbxkc: {
title: '城市轨道交通设计平台',
loginPath: '/design/login?project=bxkc',
loginTitle: '空串',
logoWidth: '400px',
bottomIcon: FaviconBxkc,
bottomColumn: '',
linkIcon: Link_Bxkc,
loginParam: 'DEFAULT',
navigationLogoWidth: '160px',
navigationMarginLeft: '175px'
}
};
@ -173,7 +199,9 @@ export const ProjectIcon = {
jyd: FaviconJyd,
designjyd: FaviconJyd,
tky: FaviconTky,
designtky: FaviconTky
designtky: FaviconTky,
bxkc: FaviconBxkc,
designbxkc: FaviconBxkc
};
export const ProjectCode = {
@ -188,15 +216,17 @@ export const ProjectCode = {
jyd: 'JYD',
designjyd: 'JYD',
tky: 'TKY',
designtky: 'TKY'
designtky: 'TKY',
bxkc: 'BXKC',
designbxkc: 'BXKC'
};
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky']; // 底部栏仅展示公司信息不展示备案号
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky']; // 登录页右下角主体不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc']; // 登录页右下角主体不展示
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd']; // 登录页样式
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc']; // 登录页样式
export const goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login',
design: '/login',
@ -211,9 +241,11 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
jyd: '/design/login?project=jyd',
designjyd: '/login?project=jyd',
tky: '/design/login?project=tky',
designtky: '/login?project=tky'
designtky: '/login?project=tky',
bxkc: '/design/login?project=bxkc',
designbxkc: '/login?project=bxkc'
};
export const PermissionParam = { // 路径权限处理所需参数配置(跳转白名单&路径正则匹配&clientId
export const PermissionParam = { // 路径权限处理所需参数配置(跳转白名单,路由处理类型
heb: {
whitePage: '/login?project=heb',
systemType: '019'
@ -232,75 +264,59 @@ export const PermissionParam = { // 路径权限处理所需参数配置(跳
},
designxty: {
whitePage: '/design/login?project=xty',
// reg: /^\/designxty/,
systemType: '013'
// clientId: LoginParams.Design.clientId
},
designgzb: {
whitePage: '/design/login?project=gzb',
// reg: /^\/designgzb/,
systemType: '014'
// clientId: LoginParams.Design.clientId
},
designxadt: {
whitePage: '/design/login?project=xadt',
// reg: /^\/designxadt/,
systemType: '012'
// clientId: LoginParams.Design.clientId
},
designjyd: {
whitePage: '/design/login?project=jyd',
// reg: /^\/designjyd/,
systemType: '017'
// clientId: LoginParams.Design.clientId
},
designtky: {
whitePage: '/design/login?project=tky',
// reg: /^\/designtky/,
systemType: '018'
// clientId: LoginParams.Design.clientId
},
designbxkc: {
whitePage: '/design/login?project=bxkc',
systemType: '011'
},
xty: {
whitePage: '/login?project=xty',
// reg: /^\/xty/,
systemType: '013'
// clientId: null
},
gzb: {
whitePage: '/login?project=gzb',
// reg: /^\/gzb/,
systemType: '014'
// clientId: null
},
xadt: {
whitePage: '/login?project=xadt',
// reg: /^\/xadt/,
systemType: '012'
// clientId: null
},
jyd: {
whitePage: '/login?project=jyd',
// reg: /^\/jyd/,
systemType: '017'
// clientId: null
},
tky: {
whitePage: '/login?project=tky',
// reg: /^\/tky/,
systemType: '018'
// clientId: null
},
bxkc: {
whitePage: '/login?project=bxkc',
systemType: '011'
},
jsxt: {
whitePage: '/jsxt/login',
// reg: /^\/jsxt/,
systemType: '015'
// clientId: null
},
refereeJsxt: {
whitePage: '/refereeJsxt/login',
// reg: /^\/refereeJsxt/,
systemType: '015'
// clientId: LoginParams.Design.clientId
}
};
export const ProjectList = [

View File

@ -228,10 +228,17 @@ const training = {
setSimulationUserList: (state, simulationUserList) => {
state.simulationUserList = simulationUserList;
},
updateMemberTrust:(state, {deviceCode,trust}) => {
for(let k in state.memberData){
if(state.memberData[k].deviceCode == deviceCode){
state.memberData[k].trust = trust;
break;
}
}
},
updateMemberListInScript:(state, {oldMemberId, newMemberId, userId, name}) => {
if (oldMemberId) {
// 重置旧数据
state.memberData[oldMemberId].trust = false;
delete state.memberData[oldMemberId].userId;
delete state.memberData[oldMemberId].name;
state.memberData[oldMemberId].disabled = false;
@ -240,7 +247,6 @@ const training = {
state.memberData[newMemberId].userId = userId;
state.memberData[newMemberId].name = name;
state.memberData[newMemberId].disabled = true;
state.memberData[newMemberId].trust = true;
},
updateMemberAndUser: (state, {simulationUserList, userId}) => {
@ -679,6 +685,9 @@ const training = {
setSimulationUserList: ({ commit }, simulationUserList) => {
commit('setSimulationUserList', simulationUserList);
},
updateMemberTrust:({ commit }, data) => {
commit('updateMemberTrust', data);
},
/** 更新综合演练仿真成员和用户列表 */
updateMemberAndUser: ({ commit }, data) => {
commit('updateMemberAndUser', data);

View File

@ -92,14 +92,14 @@ import axios from 'axios';
}
},
watch: {
'$store.state.training.memberData':{
handler(val){
if(this.tuoguanbutton == true){
console.log(val);
}
},
deep:true //true
}
// '$store.state.training.memberData':{
// handler(val){
// if(this.tuoguanbutton == true){
// console.log(val);
// }
// },
// deep:true //true
// }
},
onLoad(e) {
@ -118,12 +118,15 @@ import axios from 'axios';
async mounted() {
if(this.$route.query.group){
getSimulationInfoNew(this.$route.query.group).then(netdata => {
console.log(netdata);
if(netdata.data.type == "SCRIPT_MAKING"){
this.tuoguanbutton = true;
}
this.updatetrainlist();
});
}
window.updateDriverTrust = this.updateDriverTrust;
// this.teststomp = new StompClient();
@ -167,7 +170,8 @@ import axios from 'axios';
}else{
posttrust = true;
}
tuoguan3ddrive(this.$route.query.group,posttrust,{}).then(netdata => {
tuoguan3ddrive(this.$route.query.group,{}).then(netdata => {
// this.$store.dispatch('training/updateMemberListInScript', {oldMemberId:this.oldMemberId, newMemberId:role, userId:this.userId});
this.tuoguanstatus = posttrust;
if(this.tuoguanstatus){
@ -179,6 +183,20 @@ import axios from 'axios';
});
},
updateDriverTrust(code,trustStatus){
if(this.tuoguanstatus != trustStatus){
this.tuoguanstatus = trustStatus;
if(this.tuoguanstatus){
this.tuoguanbuttonmsg = "取消托管";
}else{
this.tuoguanbuttonmsg = "托管";
}
this.$store.dispatch('training/updateMemberTrust', {deviceCode:code,trust:trustStatus});
}
},
updatetrainlist(){
getSimulationTrainlistNew(this.group).then(netdata => {
this.options = [];
@ -241,8 +259,9 @@ import axios from 'axios';
console.log(netdata);
for(let k in netdata){
if(netdata[k].userId == this.userId){
console.log(this.$store.state.scriptRecord.userRole);
this.userrole = this.$store.state.scriptRecord.userRole;
console.log("=================");
// console.log(this.$store.state.scriptRecord.type);
this.userrole = netdata[k].type;
console.log(netdata[k].trust);
if(netdata[k].trust){
this.tuoguanstatus = netdata[k].trust;

View File

@ -202,14 +202,14 @@
console.log(this.jlmap3dedit.assetManager);
let param = testgetmodels(this.jlmap3dedit);
// update3dMapData(param).then(data => {
// //console.log(data);
// if (data.code == "200") {
// alert("");
// }
// }).catch(error => {
// console.log(error);
// });
update3dMapData(param).then(data => {
//console.log(data);
if (data.code == "200") {
alert("保存成功");
}
}).catch(error => {
console.log(error);
});
},
back() {

View File

@ -25,9 +25,8 @@ import ChatBox from './chatView/chatBox';
import TipScriptRecordNew from '@/views/scriptManage/display/tipScriptRecordNew';
import SetTime from './demon/setTime';
import { Notification } from 'element-ui';
import { ranAsPlan, exitRunPlan } from '@/api/simulation';
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
// import { timeFormat } from '@/utils/date';
import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex';
export default {
@ -52,19 +51,8 @@ export default {
data() {
return {
isDisable: false,
tryTime: 0, //
timeNow: 0, //
time: null, //
countTime: 0, //
remainingTime: 0,
isScriptCommand:false,
goodsId: this.$route.query.goodsId,
isScriptCommand:false
// isSaveStage: true,
training: {
id: '',
name: '',
remarks: ''
}
};
},
computed: {
@ -90,10 +78,6 @@ export default {
}
},
beforeDestroy() {
if (this.time) {
this.setTryTime();
clearTimeout(this.time);
}
},
mounted() {
// this.$store.state.training.prdType
@ -178,16 +162,9 @@ export default {
this.$messageBox(this.$t('display.demon.endSimulationFail'));
});
},
setTryTime() {
if (this.try) {
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
}
},
back() {
this.$store.dispatch('training/over').then(() => {
EventBus.$emit('runPlanStop');
this.$store.dispatch('map/resetActiveTrainList');
EventBus.$emit('chatSubscribeStop');
history.go(-1);
Notification.closeAll();
});

View File

@ -146,7 +146,7 @@ export default {
memberIdList: [],
quitLoading: false,
conversitionMemberList: [],
isConversitionCreator: true,
isConversitionCreator: false,
messageList: []
};
},
@ -203,13 +203,16 @@ export default {
this.$refs.tree.filter(this.queryMember);
}
},
'$store.state.training.simulationUserList': function(val) {
this.simulationUsers = {};
if (val && val.length) {
val.forEach(user => {
this.simulationUsers[user.userId] = user;
});
}
'$store.state.training.simulationUserList': {
handler(val, o) {
this.simulationUsers = {};
if (val && val.length) {
val.forEach(user => {
this.simulationUsers[user.userId] = user;
});
}
},
deep: true
},
'$store.state.socket.overConversition': function (val) {
this.conversitionId = '';
@ -529,6 +532,7 @@ export default {
});
} else {
const user = this.simulationUsers[this.$store.state.user.id];
this.isConversitionCreator = conversation.creatorId == user.memberId;
!conversation.over && conversation.memberList.forEach(member =>{
if (member.memberId == user.memberId) {
this.conversitionMemberList = conversation.memberList;

View File

@ -7,8 +7,8 @@
:key="member.memberId"
class="each-chat-member"
:style="computedStyle(member)"
:title="memberData[member.memberId].label + (memberData[member.memberId].userId? '(' + simulationUsers[memberData[member.memberId].userId].nickName + ')': '')"
>{{ memberData[member.memberId].label + (memberData[member.memberId].userId? '(' + simulationUsers[memberData[member.memberId].userId].nickName + ')': '') }}</div>
:title="memberData[member.memberId].label + (memberData[member.memberId].userId? '(' + (simulationUsers[memberData[member.memberId].userId] || {}).nickName + ')': '')"
>{{ memberData[member.memberId].label + (memberData[member.memberId].userId? '(' + (simulationUsers[memberData[member.memberId].userId] || {}).nickName + ')': '') }}</div>
<!-- :class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'" -->
</div>
</div>

View File

@ -162,6 +162,7 @@ export default {
switchMode(role) {
changeScriptRole(this.group, role).then(res=>{
let prdType = '';
const memberInfo = this.memberList.find(member=>{
return member.id == role;
});