This commit is contained in:
joylink_cuiweidong 2020-12-17 16:25:02 +08:00
commit dd1783405e
29 changed files with 391 additions and 207 deletions

View File

@ -10,7 +10,7 @@ const publicPath = process.env.VUE_APP_PRO == 'local' ? '' : '/cbtc';
const BASE_API = getBaseUrl(); const BASE_API = getBaseUrl();
export const JL3D_LOCAL_STATIC = publicPath+"/static"; export const JL3D_LOCAL_STATIC = publicPath+"/static";
// console.log(JL3D_LOCAL_STATIC); console.log(JL3D_LOCAL_STATIC);
let uploadurl = null; let uploadurl = null;
let asseturl = null; let asseturl = null;

View File

@ -82,3 +82,19 @@ export function getPostByProjectCode(projectCode) {
method: 'get' method: 'get'
}); });
} }
// 分页查询留言板
export function queryPostPage(params) {
return request({
url: `/api/learn/post`,
method: 'get',
params
});
}
// 创建留言版
export function createPost(data) {
return request({
url: `/api/learn/post`,
method: 'post',
data
});
}

View File

@ -86,5 +86,6 @@ export default {
authorApply: 'Grant application', authorApply: 'Grant application',
AuthorList: 'Authorization code list', AuthorList: 'Authorization code list',
questionsRuleManage: 'Question rule manage', questionsRuleManage: 'Question rule manage',
preTheoryData: 'Pre Theory Data' preTheoryData: 'Pre Theory Data',
boardManage: 'Message Board Manage'
}; };

View File

@ -91,5 +91,6 @@ export default {
authorApply: '授权申请', authorApply: '授权申请',
AuthorList: '授权列表', AuthorList: '授权列表',
questionsRuleManage: '出题规则管理', questionsRuleManage: '出题规则管理',
preTheoryData: '理论导入预处理' preTheoryData: '理论导入预处理',
boardManage: '留言板管理'
}; };

View File

@ -94,7 +94,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
this.nowmxlen = null; this.nowmxlen = null;
this.atpspeed = null; this.atpspeed = null;
this.atospeed = null; this.atospeed = null;
this.trainnum = null; // this.trainnum = null;
this.stime = null; this.stime = null;
this.drivecount = 0; this.drivecount = 0;
this.drivedata = null; this.drivedata = null;
@ -257,12 +257,12 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
updatemmi.updateatospeed = function(atospeed) { updatemmi.updateatospeed = function(atospeed) {
scope.atospeed = atospeed; scope.atospeed = atospeed;
}; };
updatemmi.updatetrainnum = function(trainnum) { // updatemmi.updatetrainnum = function(trainnum) {
scope.trainnum = trainnum; // scope.trainnum = trainnum;
}; // };
updatemmi.updatestoptime = function(stime) { // updatemmi.updatestoptime = function(stime) {
scope.stime = stime; // scope.stime = stime;
}; // };
updatemmi.updatedrivedata = function(drivedata) { updatemmi.updatedrivedata = function(drivedata) {
scope.drivecount += 1; scope.drivecount += 1;
scope.drivedata = drivedata; scope.drivedata = drivedata;

View File

@ -74,6 +74,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
if(data.body.groupNumber){ if(data.body.groupNumber){
changeNowTrain(data.body); changeNowTrain(data.body);
updateDriveValue(data.body.groupNumber);
} }
updatestatus(data.body); updatestatus(data.body);
@ -400,9 +401,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// trainmodel.position.z = point.z; // trainmodel.position.z = point.z;
} }
if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){ // if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
for(let rs = 1;rs<6;rs++){ for(let rs = 1;rs<updateTrainModel.children.length;rs++){
//console.log(rs); //console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){ if(updateTrainModel.children[rs].rotalist[0]){
@ -433,7 +434,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
} }
// console.log(trainmodel.rotalist); // console.log(trainmodel.rotalist);
} // }
}else{ }else{
// //
@ -476,8 +477,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
} }
if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){ // if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
for(let rs = 1;rs<6;rs++){ for(let rs = 1;rs<updateTrainModel.children.length;rs++){
//console.log(rs); //console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){ if(updateTrainModel.children[rs].rotalist[0]){
let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) - parseFloat(updateTrainModel.children[rs].matrixWorld.elements[14]); let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) - parseFloat(updateTrainModel.children[rs].matrixWorld.elements[14]);
@ -502,7 +503,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
} }
} }
} }
} // }
} }
} }

View File

@ -167,7 +167,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
function setpsdstationmap(stationlist){ function setpsdstationmap(stationlist){
for(let i=0,leni=stationlist.length;i<leni;i++){ for(let i=0,leni=stationlist.length;i<leni;i++){
console.log(stationlist[i]);
psdtexturemap[stationlist[i].stands[0].code] = stationlist[i].code; psdtexturemap[stationlist[i].stands[0].code] = stationlist[i].code;
psdtexturemap[stationlist[i].stands[1].code] = stationlist[i].code; psdtexturemap[stationlist[i].stands[1].code] = stationlist[i].code;
} }
@ -285,7 +285,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
} else { } else {
scope.nowcode = data.code; scope.nowcode = data.code;
if (data.type == "room") { if (data.type == "room") {
console.log(scope.modelmanager.roommodel.mesh);
scope.showmodel = scope.modelmanager.roommodel.mesh; scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
scope.camera.position.set(5, 7, -9); scope.camera.position.set(5, 7, -9);

View File

@ -114,7 +114,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
if(event.data.type == "Device_Fault_Over_3D"){ if(event.data.type == "Device_Fault_Over_3D"){
console.log(event.data);
deletefault(event.data.body.code); deletefault(event.data.body.code);
warningmsg("已修复故障设备:"+event.data.body.code); warningmsg("已修复故障设备:"+event.data.body.code);
@ -127,7 +126,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
let fault = event.data.body.faultInfoList; let fault = event.data.body.faultInfoList;
for(let i=0,leni= fault.length;i<leni;i++){ for(let i=0,leni= fault.length;i<leni;i++){
console.log(fault[i]);
let newfault = { let newfault = {
code:fault[i].code, code:fault[i].code,
name:'', name:'',

View File

@ -15,10 +15,7 @@ import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js'; // import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene){ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene){
//console.log(mapdata);
//console.log(data);
//console.log(scope);
let sceneload = scene; let sceneload = scene;
let backdata = scope; let backdata = scope;
let jlmap3ddata = mapdata; let jlmap3ddata = mapdata;
@ -69,25 +66,20 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
assetloader.assetPromiseOver(sceneload) assetloader.assetPromiseOver(sceneload)
.then(function(data){ .then(function(data){
//console.log(data);
//,netdata.stands,mixers,actions,"0" //,netdata.stands,mixers,actions,"0"
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02"); return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02");
}) })
.then(function(data){ .then(function(data){
//console.log(data);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader); return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
}) })
.then(function(data){ .then(function(data){
//console.log(data);
return signallist.loadpromise(mapdata.signalList,signaldata,sceneload,assetloader); return signallist.loadpromise(mapdata.signalList,signaldata,sceneload,assetloader);
}) })
.then(function(data){ .then(function(data){
return switchlist.loadpromise(mapdata.switchList,switchdata,sceneload,assetloader,mixers,actions); return switchlist.loadpromise(mapdata.switchList,switchdata,sceneload,assetloader,mixers,actions);
}) })
.then(function(data){ .then(function(data){
//console.log(data);
//console.log(assetloader);
return trainlisttest.initpromise(mapdata.trainList,sceneload,assetloader,mixers,actions,"02"); return trainlisttest.initpromise(mapdata.trainList,sceneload,assetloader,mixers,actions,"02");
}) })
.then(function(data){ .then(function(data){
@ -108,22 +100,27 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
if(scope.stationtexture["stationlist"]){ if(scope.stationtexture["stationlist"]){
for(let mm=0;mm< stationstandlist.group.children.length;mm++){ for(let mm=0;mm< stationstandlist.group.children.length;mm++){
let stationname = stationstandlist.group.children[mm].name; let stationname = stationstandlist.group.children[mm].name;
if(stationstandlist.group.children[mm].getObjectByName("zhantailiebiao")){
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"]; stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true; stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
// console.log(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")); }
if(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")){ if(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")){
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"]; stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map.needsUpdate = true; stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map.needsUpdate = true;
} }
if(stationstandlist.group.children[mm].getObjectByName("zhantaiming")){
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone(); let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
newmaterial.map =scope.stationtexture[stationname]; newmaterial.map =scope.stationtexture[stationname];
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial; stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true; stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
} }

View File

@ -315,10 +315,17 @@ export default class Section extends Group {
} }
const path = window.location.href; const path = window.location.href;
if (path.includes('/map/draw')) { if (path.includes('/map/draw')) {
this.on('mouseout', () => { this.on('mouseout', () => { // 移出
!this.selectedType && !this.selected && this.line && this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width }); !this.selectedType && !this.selected && this.line && this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width });
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
if (sectionC.code == this.model.code) {
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
}
}
}); });
this.on('mouseover', () => { this.on('mouseover', () => { // 移入
!this.selectedType && this.line && this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 }); !this.selectedType && this.line && this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 });
}); });
} }

View File

@ -135,6 +135,7 @@ const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/ind
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport'); const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule'); const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
const MessageBoard = () => import('@/views/messageBoard/index'); const MessageBoard = () => import('@/views/messageBoard/index');
const BoardManage = () => import('@/views/messageBoard/manage');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
@ -778,6 +779,13 @@ export const asyncRouter = [
i18n: 'router.companyManage' i18n: 'router.companyManage'
} }
}, },
{
path: 'boardManage',
component: BoardManage,
meta: {
i18n: 'router.boardManage'
}
},
{ // 出题规则管理 { // 出题规则管理
path: 'questionsRuleManage', path: 'questionsRuleManage',
hidden: true, hidden: true,

View File

@ -426,6 +426,8 @@ export const ProjectIcon = {
}; };
export const ProjectCode = { export const ProjectCode = {
login: 'DEFAULT',
designlogin: 'DEFAULT',
xty: 'XTY', xty: 'XTY',
designxty: 'XTY', designxty: 'XTY',
gzb: 'GZB', gzb: 'GZB',
@ -448,7 +450,7 @@ export const ProjectCode = {
designsdy: 'SDY' designsdy: 'SDY'
}; };
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号 export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 实训设计平台通过项目code获取地图列表的项目 export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目 export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示 export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示 export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示

View File

@ -1,6 +1,41 @@
<template> <template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center> <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <!--<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />-->
<el-form ref="form" :model="formModel" label-width="120px" :rules="rules">
<el-form-item label="发布数据地图" prop="dataMapId">
<el-select v-model="formModel.dataMapId" placeholder="请选择" @change="changeMapId">
<el-option
v-for="item in mapList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发布地图车站" prop="dataStationCode">
<el-select v-model="formModel.dataStationCode" placeholder="请选择">
<el-option
v-for="item in dataStationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="公共数据" prop="common">
<el-switch v-model="formModel.common" />
</el-form-item>
<el-form-item v-if="!formModel.common" label="关联车站" prop="stationCode">
<el-select v-model="formModel.stationCode" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button> <el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -23,6 +58,7 @@ export default {
formModel: { formModel: {
dataMapId: '', dataMapId: '',
dataStationCode: '', dataStationCode: '',
common: false,
stationCode: '' stationCode: ''
}, },
mapList: [], mapList: [],
@ -45,6 +81,12 @@ export default {
}, },
rules() { rules() {
const crules = { const crules = {
dataMapId: [
{ required: true, message: '请选择', trigger: 'change' }
],
dataStationCode: [
{ required: true, message: '请选择', trigger: 'change' }
],
stationCode: [ stationCode: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
] ]
@ -105,11 +147,11 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
doCreate() { doCreate() {
this.$refs.dataform.validateForm(() => { this.$refs.form.validate(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode], ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode],
stationCode: this.formModel.stationCode stationCode: this.formModel.common ? null : this.formModel.stationCode
}; };
copyIbpData(param).then(resp => { copyIbpData(param).then(resp => {
this.$message.success('创建成功'); this.$message.success('创建成功');
@ -121,7 +163,7 @@ export default {
}); });
}, },
doClose() { doClose() {
this.$refs.dataform.resetForm(); this.$refs.form.resetFields();
this.dialogVisible = false; this.dialogVisible = false;
}, },
async changeMapId(val) { async changeMapId(val) {

View File

@ -1,6 +1,20 @@
<template> <template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center> <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <el-form ref="form" :model="formModel" label-width="80px" :rules="rules">
<el-form-item label="公共数据" prop="common">
<el-switch v-model="formModel.common" />
</el-form-item>
<el-form-item v-if="!formModel.common" label="关联车站" prop="stationCode">
<el-select v-model="formModel.stationCode" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-if="!isPut" type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button> <el-button v-if="!isPut" type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button v-if="isPut" type="primary" @click="putInfo">更新</el-button> <el-button v-if="isPut" type="primary" @click="putInfo">更新</el-button>
@ -30,20 +44,12 @@ export default {
stationList: [], stationList: [],
ibpId: '', ibpId: '',
formModel: { formModel: {
stationCode: '' stationCode: '',
common: false
} }
}; };
}, },
computed: { computed: {
form() {
const form = {
labelWidth: '150px',
items: [
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList }
]
};
return form;
},
rules() { rules() {
const crules = { const crules = {
stationCode: [ stationCode: [
@ -82,6 +88,7 @@ export default {
doShow(data) { doShow(data) {
if (data) { if (data) {
this.formModel.stationCode = data.stationCode; this.formModel.stationCode = data.stationCode;
this.formModel.common = !data.stationCode;
this.ibpId = data.id; this.ibpId = data.id;
this.isPut = true; this.isPut = true;
} else { } else {
@ -90,10 +97,10 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
doCreate() { doCreate() {
this.$refs.dataform.validateForm(() => { this.$refs.form.validate(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
stationCode: this.formModel.stationCode stationCode: this.formModel.common ? null : this.formModel.stationCode
}; };
createIbp(param).then(resp => { createIbp(param).then(resp => {
this.$message.success('创建成功'); this.$message.success('创建成功');
@ -105,10 +112,10 @@ export default {
}); });
}, },
putInfo() { putInfo() {
this.$refs.dataform.validateForm(() => { this.$refs.form.validate(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
stationCode: this.formModel.stationCode stationCode: this.formModel.common ? null : this.formModel.stationCode
}; };
putIbpBasicInfo(this.ibpId, param).then(resp => { putIbpBasicInfo(this.ibpId, param).then(resp => {
this.$message.success('更新成功'); this.$message.success('更新成功');
@ -121,7 +128,7 @@ export default {
}); });
}, },
doClose() { doClose() {
this.$refs.dataform.resetForm(); this.$refs.form.resetFields();
this.dialogVisible = false; this.dialogVisible = false;
} }
} }

View File

@ -5,7 +5,7 @@
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button> <el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
<el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button> <el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button>
</div> </div>
<QueryListPage ref="queryListPage" :cardPadding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :card-padding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" /> <create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" />
<create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" /> <create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" /> <copy-ibp ref="copyIbp" @reloadTable="reloadTable" />
@ -123,6 +123,9 @@ export default {
} }
}, },
covertData(row) { covertData(row) {
if (!row.stationCode) {
return '公共数据';
}
const staitonlist = this.stationList.filter(element => { const staitonlist = this.stationList.filter(element => {
return row.stationCode == element.code; return row.stationCode == element.code;
}); });

View File

@ -4,7 +4,7 @@
<div class="clearfix"> <div class="clearfix">
<div style="float: left;padding-top: 17px;"> <div style="float: left;padding-top: 17px;">
<span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span> <span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span>
<span>{{ stationCode }}</span> <span>{{ stationName }}</span>
</div> </div>
<!-- <el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode"> <!-- <el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode">
<el-option <el-option
@ -98,10 +98,10 @@ export default {
}; };
}, },
computed:{ computed:{
stationCode() { stationName() {
if (this.stationOptions.length) { if (this.stationOptions.length) {
const obj = this.stationOptions.find(ele => ele.value == this.$route.query.stationCode); const obj = this.stationOptions.find(ele => ele.value == this.$route.query.stationCode);
return obj.label; return obj ? obj.label : '通用数据';
} }
return this.$route.query.stationCode; return this.$route.query.stationCode;
} }

View File

@ -27,7 +27,7 @@ export default {
return { return {
widthLeft: Number(localStore.get('LeftWidth')) || 450, widthLeft: Number(localStore.get('LeftWidth')) || 450,
size: { size: {
width: this.$store.state.app.width - 521 - Number(localStore.get('LeftWidth')) || 450, width: this.$store.state.app.width - 521 - (Number(localStore.get('LeftWidth')) || 450),
height: this.$store.state.app.height - 60 height: this.$store.state.app.height - 60
} }
}; };
@ -40,11 +40,12 @@ export default {
}, },
watch: { watch: {
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - this.widthLeft, height: this.$store.state.app.height - 60 }); this.size = { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 };
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 });
} }
}, },
created() { created() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - this.widthLeft, height: this.$store.state.app.height - 60 }); this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 });
}, },
mounted() { mounted() {
this.$refs.ibpPlate.show(); this.$refs.ibpPlate.show();

View File

@ -22,6 +22,7 @@ import { getToken } from '@/utils/auth';
import { getIbpInfoByStation } from '@/api/ibp'; import { getIbpInfoByStation } from '@/api/ibp';
import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation'; import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
import BuzzerAudio from '@/assets/buzzer.mp3'; import BuzzerAudio from '@/assets/buzzer.mp3';
import { getStationList } from '@/api/runplan';
export default { export default {
name: 'Ibp', name: 'Ibp',
@ -145,10 +146,22 @@ export default {
return; return;
} }
try { try {
// const ibpDatas = ibpData[deviceCode]; const resp = await getStationList(this.$route.query.mapId);
const res = await getIbpInfoByStation(this.$route.query.mapId, deviceCode); const res = await getIbpInfoByStation(this.$route.query.mapId, deviceCode);
const stationIndex = resp.data.findIndex((item) => item.code == deviceCode);
if (res.data.data) { if (res.data.data) {
const ibpDatas = JSON.parse(res.data.data).drawData; let jsonData = res.data.data.replace(/R<>/g, resp.data[stationIndex].name);
if (resp.data[stationIndex - 1]) {
jsonData = jsonData.replace(/R<pre>/g, resp.data[stationIndex - 1].name);
} else {
jsonData = jsonData.replace(/R<pre>/g, '');
}
if (resp.data[stationIndex + 1]) {
jsonData = jsonData.replace(/R<next>/g, resp.data[stationIndex + 1].name);
} else {
jsonData = jsonData.replace(/R<next>/g, '');
}
const ibpDatas = JSON.parse(jsonData).drawData;
this.stationCode = deviceCode; this.stationCode = deviceCode;
getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => { getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => {
if (resp.data) { if (resp.data) {
@ -182,6 +195,7 @@ export default {
}); });
} }
} catch (error) { } catch (error) {
console.log(error, '===');
this.loading = false; this.loading = false;
this.$alert('当前ibp盘数据不存在', '信息', { this.$alert('当前ibp盘数据不存在', '信息', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -292,7 +306,6 @@ export default {
}, },
controlAudio(val) { controlAudio(val) {
const audio = document.getElementById('buzzer'); const audio = document.getElementById('buzzer');
// console.log(val, audio);
if (audio !== null) { if (audio !== null) {
if (val) { if (val) {
audio.play(); audio.play();

View File

@ -2,10 +2,10 @@
<div id="drivediv" class="jalmap3ddiv" > <div id="drivediv" class="jalmap3ddiv" >
<div class="trainstatus"> <!-- <div class="trainstatus">
{{$t('jlmap3d.trainGroupNumber')}}{{ trainnum }}</br> {{$t('jlmap3d.trainGroupNumber')}}{{ trainnum }}</br>
{{ stoptimes }} {{ stoptimes }}
</div> </div> -->
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
@ -88,8 +88,8 @@ export default {
mmishow: false, mmishow: false,
showbuttonmsg: this.$t('jlmap3d.trainInstrumentationDisplay'), showbuttonmsg: this.$t('jlmap3d.trainInstrumentationDisplay'),
backmsg:this.$t('global.back'), backmsg:this.$t('global.back'),
trainnum: '', // trainnum: '',
stoptimes: '', // stoptimes: '',
dcontrolshow: false, dcontrolshow: false,
msgshow:false, msgshow:false,
controlmsg:"不能选择其它列车", controlmsg:"不能选择其它列车",
@ -133,20 +133,20 @@ export default {
} }
} }
}, },
'jlmap3d.trainnum': { // 'jlmap3d.trainnum': {
handler: function (newVal, oldVal) { // handler: function (newVal, oldVal) {
if (newVal != oldVal) { // if (newVal != oldVal) {
this.trainnum = newVal; // this.trainnum = newVal;
} // }
} // }
}, // },
'jlmap3d.stime': { // 'jlmap3d.stime': {
handler: function (newVal, oldVal) { // handler: function (newVal, oldVal) {
if (newVal != oldVal) { // if (newVal != oldVal) {
this.stoptimes = newVal; // this.stoptimes = newVal;
} // }
} // }
}, // },
'jlmap3d.drivecount': { 'jlmap3d.drivecount': {
handler: function (newVal, oldVal) { handler: function (newVal, oldVal) {
if (newVal != oldVal) { if (newVal != oldVal) {
@ -315,11 +315,11 @@ export default {
}, },
updatestatus(newdata){ updatestatus(newdata){
if(newdata.groupNumber){ // if(newdata.groupNumber){
this.trainnum = newdata.groupNumber; // this.trainnum = newdata.groupNumber;
//
updateDriveValue(this.trainnum); // updateDriveValue(this.trainnum);
} // }
updatedoorlight(newdata); updatedoorlight(newdata);
if(this.$refs.mmiui){ if(this.$refs.mmiui){
this.$refs.mmiui.updatetrainstatus(newdata); this.$refs.mmiui.updatetrainstatus(newdata);

View File

@ -512,7 +512,6 @@ export default {
if(end){ if(end){
this.endstation = end; this.endstation = end;
} }
}, },
}, },
beforeDestroy() { beforeDestroy() {

View File

@ -70,7 +70,7 @@ export default {
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' } { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
], ],
classIdList: [ classIdList: [
{ required: true, message: '请选择课程归属班级', trigger: 'change' } { required: !(this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05')), message: '请选择课程归属班级', trigger: 'change' }
] ]
}; };
}, },
@ -89,7 +89,8 @@ export default {
name: model.name, name: model.name,
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
prdType: model.prdType, prdType: model.prdType,
cityCode: model.cityCode cityCode: model.cityCode,
classIdList: []
}; };
this.dialogShow = true; this.dialogShow = true;
const project = getSessionStorage('project'); const project = getSessionStorage('project');

View File

@ -0,0 +1,87 @@
<template>
<el-dialog
title="创建留言板"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="留言板名称:" prop="title">
<el-input v-model="form.title" style="width: 200px;" />
</el-form-item>
<el-form-item label="归属项目:" prop="project">
<el-select v-model="form.project" placeholder="请选择">
<el-option
v-for="item in projectOptionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import { createPost } from '@/api/learn';
export default {
name: 'Create',
props:{
projectOptionList:{
type: Array,
default() {
return [];
}
}
},
data() {
return {
dialogVisible: false,
form:{
title: '',
project: ''
},
rules: {
title: [
{ required: true, message: '请填写留言板名称', trigger: 'blur' }
],
project: [
{ required: true, message: '请选择归属项目', trigger: 'change' }
]
}
};
},
methods: {
handleClose() {
this.$refs.form.resetFields();
this.dialogVisible = false;
},
doShow() {
this.dialogVisible = true;
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
createPost(this.form).then(resp => {
this.$emit('reloadTable');
this.handleClose();
}).catch(() => {
this.$message.error('创建留言板失败!');
this.handleClose();
});
}
});
}
}
};
</script>
<style scoped>
</style>

View File

@ -1,14 +1,22 @@
<template> <template>
<div> <div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-draft ref="createDraft" :project-option-list="projectOptionList" @reloadTable="reloadTable" />
</div> </div>
</template> </template>
<script> <script>
import { queryPostPage } from '@/api/learn';
import { ProjectList} from '@/scripts/ProjectConfig';
import CreateDraft from './create';
export default { export default {
name: 'Manage', name: 'Manage',
components:{
CreateDraft
},
data() { data() {
return { return {
projectOptionList: [],
pagerConfig: { pagerConfig: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
@ -17,9 +25,9 @@ export default {
labelWidth: '140px', labelWidth: '140px',
reset: false, reset: false,
queryObject: { queryObject: {
mapId: { project: {
type: 'select', type: 'select',
label: this.$t('orderAuthor.mapName'), label: '所属项目',
config: { config: {
data: [] data: []
} }
@ -27,130 +35,76 @@ export default {
} }
}, },
queryList: { queryList: {
query: this.queryFunction, query: queryPostPage,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: this.$t('orderAuthor.organizationOrEnterprise'), title: '项目',
prop: 'organizationName' prop: 'project',
},
{
title: this.$t('orderAuthor.permissionName'),
prop: 'permissionName'
},
{
title: this.$t('orderAuthor.founder'),
prop: 'userNickname'
},
{
title: this.$t('orderAuthor.publicOrPrivate'),
prop: 'canDistribute',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); }, columnValue: (row) => { return this.getProjectName(row.project); },
tagType: (row) => { tagType: (row) => {
switch (row.canDistribute) { return 'success';
case true: return 'success';
case false: return 'danger';
}
} }
}, },
{ {
title: this.$t('orderAuthor.permanenceOrNot'), title: '留言板名称',
prop: 'forever', prop: 'title'
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
tagType: (row) => {
switch (row.forever) {
case true: return 'success';
case false: return 'danger';
}
}
},
{
title: this.$t('global.amount'),
prop: 'amount'
},
{
title: this.$t('global.remains'),
prop: 'remains'
},
{
title: this.$t('orderAuthor.startTime'),
prop: 'startTime',
type: 'formatter',
formatter: this.formatterDate
},
{
title: this.$t('orderAuthor.endTime'),
prop: 'endTime',
type: 'formatter',
formatter: this.formatterDate
},
{
title: this.$t('global.status'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
default: return 'danger';
}
}
}, },
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),
width: this.$i18n.locale == 'en' ? '400' : '300', width: '350',
buttons: [ buttons: [
{ {
name: this.$t('orderAuthor.obtainQrCode'), name: '进入',
handleClick: this.handleRtCodeShow, handleClick: this.handleEnter
type: '',
showControl: (row) => { return row.status == '1'; }
},
{
name: this.$t('orderAuthor.setupFailure'),
handleClick: this.handleDelete,
type: '',
showControl: (row) => { return row.status == '1'; }
},
{
name: this.$t('orderAuthor.authorityDetails'),
handleClick: this.handlePermissionDetail,
type: '',
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
},
{
name: this.$t('orderAuthor.distributionAttribution'),
handleClick: this.handleBelongs,
type: '',
showControl: (row) => { return row.amount !== row.remains; }
},
{
name: this.$t('orderAuthor.recovery'),
handleClick: this.handleRestore,
type: 'danger',
showControl: (row) => { return row.status == '1' && row.canRestore; }
} }
] ]
} }
], ],
actions: [ actions: [
{ text: this.$t('orderAuthor.createPackage'), handler: this.handleCreatePackage }, { text: '创建留言板', handler: this.handleCreateMessageBoard }
{ text: '创建项目权限包', handler: this.handleCreateProjectPackage },
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
] ]
} }
}; };
}, },
mounted() { mounted() {
this.loadInitData(); this.projectOptionList = [{value: 'DEFAULT', label: '玖琏云平台'}];
ProjectList.forEach(item => {
this.projectOptionList.push({value: item.value.toUpperCase(), label: item.label});
});
this.queryForm.queryObject.project.config.data = this.projectOptionList;
}, },
methods:{ methods:{
getProjectName(projectCode) {
let name;
this.projectOptionList.forEach(item => {
if (item.value.toUpperCase() == projectCode) {
name = item.label;
}
});
return name;
},
handleCreateMessageBoard() {
this.$refs.createDraft.doShow();
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
handleEnter(index, row) {
const routeData = this.$router.resolve({
path:'/messageBoard',
query:{
project: row.project.toLowerCase(),
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
} }
}; };
</script> </script>

View File

@ -23,7 +23,7 @@
<el-button v-if="schedulePreviewShow" type="primary" size="small" @click="schedulingView">派班计划预览</el-button> <el-button v-if="schedulePreviewShow" type="primary" size="small" @click="schedulingView">派班计划预览</el-button>
<el-button v-if="isContest" size="small" :disabled="practiceDisabled" @click="fieldPractice">实操练习</el-button> <el-button v-if="isContest" size="small" :disabled="practiceDisabled" @click="fieldPractice">实操练习</el-button>
<el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button> <el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button>
<el-button v-if="isContest || project === 'gzb'" size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
<el-button v-if="isContest" size="small" @click="contectUs">联系方式</el-button> <el-button v-if="isContest" size="small" @click="contectUs">联系方式</el-button>
</el-button-group> </el-button-group>
</div> </div>
@ -49,6 +49,8 @@ import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView'; import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs'; import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name:'DemonMenu', name:'DemonMenu',
components:{ components:{
@ -117,6 +119,7 @@ export default {
deviceif:false, deviceif:false,
deviceShow: true, deviceShow: true,
drivingShow: false, drivingShow: false,
messageBoard: false,
jl3dtrafficplan:this.$t('display.demon.trafficplantext'), jl3dtrafficplan:this.$t('display.demon.trafficplantext'),
jl3dtraffictrain:this.$t('display.demon.traffictraintext'), jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
jl3dpassflow:this.$t('display.demon.passengerflow'), jl3dpassflow:this.$t('display.demon.passengerflow'),
@ -148,6 +151,13 @@ export default {
EventBus.$on('quitScene', () => { EventBus.$on('quitScene', () => {
this.practiceDisabled = false; this.practiceDisabled = false;
}); });
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
}, },
methods:{ methods:{
menuClick() { menuClick() {

View File

@ -9,7 +9,7 @@
</el-radio-group> </el-radio-group>
<span class="display-time">{{ formatUsedTime }}</span> <span class="display-time">{{ formatUsedTime }}</span>
<span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ formatScore }}</span> <span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ formatScore }}</span>
<el-button v-if="project == 'gzb'" size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
</el-row> </el-row>
</div> </div>
<div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}"> <div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}">
@ -37,6 +37,8 @@ import { timeFormat } from '@/utils/date';
import { getTrainingStepsDetailNew, loadTrainingInSimulation } from '@/api/jmap/training'; import { getTrainingStepsDetailNew, loadTrainingInSimulation } from '@/api/jmap/training';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name: 'MenuLesson', name: 'MenuLesson',
@ -73,6 +75,7 @@ export default {
isDisable: false, isDisable: false,
backDisable: false, backDisable: false,
startLoading: false, startLoading: false,
messageBoard: false,
prdTypeMap: { prdTypeMap: {
'01': '01', // => '01': '01', // =>
'02': '02', // => '02': '02', // =>
@ -132,6 +135,15 @@ export default {
this.resetTraining(); this.resetTraining();
} }
}, },
mounted() {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
},
methods: { methods: {
tipInfo(opt) { tipInfo(opt) {
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) { if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {

View File

@ -17,7 +17,7 @@
<el-button size="small" @click="dispatcherWorkStation">ATS行调工作站</el-button> <el-button size="small" @click="dispatcherWorkStation">ATS行调工作站</el-button>
<!-- <el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button> --> <!-- <el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button> -->
<el-button size="small" @click="distribute">权限分发</el-button> <el-button size="small" @click="distribute">权限分发</el-button>
<el-button size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
<el-button size="small" @click="contectUs">联系方式</el-button> <el-button size="small" @click="contectUs">联系方式</el-button>
</el-button-group> </el-button-group>
<div class="trainExample"> <div class="trainExample">
@ -104,6 +104,8 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name:'PracticeDisplay', name:'PracticeDisplay',
components: { components: {
@ -126,7 +128,8 @@ export default {
currentFlowDataName:'', currentFlowDataName:'',
currentFlowDataId:'', currentFlowDataId:'',
isDisabled:false, isDisabled:false,
loading:false loading:false,
messageBoard: false
}; };
}, },
computed:{ computed:{
@ -231,6 +234,13 @@ export default {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.setWindowSize(); this.setWindowSize();
this.initLoadData(); this.initLoadData();
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
}, },
methods:{ methods:{
async initLoadData() { // async initLoadData() { //

View File

@ -23,7 +23,7 @@
<el-button v-if="deviceManageShow" size="small" @click="handleEquipment">设备管理</el-button> <el-button v-if="deviceManageShow" size="small" @click="handleEquipment">设备管理</el-button>
<el-button v-if="teachSystemShow" size="small" @click="handleTeach">教学系统</el-button> <el-button v-if="teachSystemShow" size="small" @click="handleTeach">教学系统</el-button>
<el-button v-if="examSystemShow" size="small" @click="handleExam">考试系统</el-button> <el-button v-if="examSystemShow" size="small" @click="handleExam">考试系统</el-button>
<el-button v-if="project == 'gzb'" size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
</el-button-group> </el-button-group>
</div> </div>
<div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}"> <div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
@ -55,6 +55,8 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig'; import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig';
import { getPublishLessonListByMapId } from '@/api/jmap/lesson'; import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name: 'MenuDemonJoint', name: 'MenuDemonJoint',
@ -109,7 +111,8 @@ export default {
isShow3dmodel :false, isShow3dmodel :false,
jl3dname: this.$t('display.demon.threeDimensionalView'), jl3dname: this.$t('display.demon.threeDimensionalView'),
hoverBtn: false, hoverBtn: false,
btnWidth: 0 btnWidth: 0,
messageBoard: false
}; };
}, },
computed: { computed: {
@ -201,6 +204,13 @@ export default {
}, },
async mounted() { async mounted() {
this.change3dname(); this.change3dname();
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
this.$nextTick(() => { this.$nextTick(() => {
this.menuClick(); this.menuClick();
}); });

View File

@ -264,11 +264,14 @@ export default {
message: this.$t('publish.setSuccess') message: this.$t('publish.setSuccess')
}); });
}).catch(res => { }).catch(res => {
if (res.code == '500009') { // if (res.code == '500009') {
this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') }); // this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') });
} else { // } else if (res.code == '10005') {
this.$message({ type: 'error', message: this.$t('error.deleteException') }); // this.$message({ type: 'warning', message: '使'});
} // } else {
// this.$message({ type: 'error', message: this.$t('error.deleteException') });
// }
this.$message({ type: 'error', message: '删除失败:' + res.message });
}); });
}).catch(() => { }); }).catch(() => { });
}, },

View File

@ -461,8 +461,8 @@ export default {
}); });
that.$message.success('学生信息导入成功!'); that.$message.success('学生信息导入成功!');
}).catch(() => { }).catch((error) => {
that.$message.error('学生信息导入失败'); that.$message.error('学生信息导入失败:' + error.message);
that.loadingStudentInfo = false; that.loadingStudentInfo = false;
}); });
} catch (error) { } catch (error) {