diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js index e4ac178bc..6ba67a595 100644 --- a/src/api/designPlatform.js +++ b/src/api/designPlatform.js @@ -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' }); } diff --git a/src/api/jlmap3d/assets3d.js b/src/api/jlmap3d/assets3d.js index d794ca436..1308c2e49 100644 --- a/src/api/jlmap3d/assets3d.js +++ b/src/api/jlmap3d/assets3d.js @@ -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"); diff --git a/src/api/jlmap3d/load3ddata.js b/src/api/jlmap3d/load3ddata.js index bb7cac424..7f702d359 100644 --- a/src/api/jlmap3d/load3ddata.js +++ b/src/api/jlmap3d/load3ddata.js @@ -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 }); diff --git a/src/assets/icon/favicon_bxkc.png b/src/assets/icon/favicon_bxkc.png new file mode 100644 index 000000000..43623393c Binary files /dev/null and b/src/assets/icon/favicon_bxkc.png differ diff --git a/src/assets/icon/link_bxkc.png b/src/assets/icon/link_bxkc.png new file mode 100644 index 000000000..acda702df Binary files /dev/null and b/src/assets/icon/link_bxkc.png differ diff --git a/src/jlmap3d/edit/Jlmap3dnewdata.js b/src/jlmap3d/edit/Jlmap3dnewdata.js index b0082b848..9f0650f76 100644 --- a/src/jlmap3d/edit/Jlmap3dnewdata.js +++ b/src/jlmap3d/edit/Jlmap3dnewdata.js @@ -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); }) diff --git a/src/jlmap3d/edit/connect/newgetmodels.js b/src/jlmap3d/edit/connect/newgetmodels.js index 882699430..678744ba3 100644 --- a/src/jlmap3d/edit/connect/newgetmodels.js +++ b/src/jlmap3d/edit/connect/newgetmodels.js @@ -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轨道 diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js index 3416cef0a..bad4ec644 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js @@ -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; } diff --git a/src/jlmap3d/main/loaders/model/Assetmodel.js b/src/jlmap3d/main/loaders/model/Assetmodel.js index b88dcc794..38af1531c 100644 --- a/src/jlmap3d/main/loaders/model/Assetmodel.js +++ b/src/jlmap3d/main/loaders/model/Assetmodel.js @@ -1,7 +1,8 @@ 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(){ diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index 41e1a9dcc..3a64bcb15 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -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:登录页左上角title;logoWidth:登录页左上角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 = [ diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 5a0aa6330..97f4a0167 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -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,9 +247,8 @@ 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}) => { simulationUserList.forEach(item => { let memberIndex = -1; @@ -679,6 +685,9 @@ const training = { setSimulationUserList: ({ commit }, simulationUserList) => { commit('setSimulationUserList', simulationUserList); }, + updateMemberTrust:({ commit }, data) => { + commit('updateMemberTrust', data); + }, /** 更新综合演练仿真成员和用户列表 */ updateMemberAndUser: ({ commit }, data) => { commit('updateMemberAndUser', data); diff --git a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue index 2bf1611f3..ec9486a85 100644 --- a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue +++ b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue @@ -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; diff --git a/src/views/jlmap3d/edit/jlmap3dedit.vue b/src/views/jlmap3d/edit/jlmap3dedit.vue index 712350f90..e4115b283 100644 --- a/src/views/jlmap3d/edit/jlmap3dedit.vue +++ b/src/views/jlmap3d/edit/jlmap3dedit.vue @@ -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() { diff --git a/src/views/newMap/displayNew/menuScript.vue b/src/views/newMap/displayNew/menuScript.vue index 0a2aa67ec..f87389fb3 100644 --- a/src/views/newMap/displayNew/menuScript.vue +++ b/src/views/newMap/displayNew/menuScript.vue @@ -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(); }); diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue index 7ebceaff8..8c640f133 100644 --- a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue +++ b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue @@ -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; diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue b/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue index b7676574c..5f99838d8 100644 --- a/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue +++ b/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue @@ -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 + ')': '') }} + :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 + ')': '') }} diff --git a/src/views/scriptManage/display/tipScriptRecordNew.vue b/src/views/scriptManage/display/tipScriptRecordNew.vue index a5e01ab17..32349bdb1 100644 --- a/src/views/scriptManage/display/tipScriptRecordNew.vue +++ b/src/views/scriptManage/display/tipScriptRecordNew.vue @@ -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; });