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();
export const JL3D_LOCAL_STATIC = publicPath+"/static";
// console.log(JL3D_LOCAL_STATIC);
console.log(JL3D_LOCAL_STATIC);
let uploadurl = null;
let asseturl = null;

View File

@ -82,3 +82,19 @@ export function getPostByProjectCode(projectCode) {
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',
AuthorList: 'Authorization code list',
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: '授权申请',
AuthorList: '授权列表',
questionsRuleManage: '出题规则管理',
preTheoryData: '理论导入预处理'
preTheoryData: '理论导入预处理',
boardManage: '留言板管理'
};

View File

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

View File

@ -74,6 +74,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
if(data.body.groupNumber){
changeNowTrain(data.body);
updateDriveValue(data.body.groupNumber);
}
updatestatus(data.body);
@ -400,9 +401,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// 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);
if(updateTrainModel.children[rs].rotalist[0]){
@ -433,7 +434,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
// console.log(trainmodel.rotalist);
}
// }
}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){
for(let rs = 1;rs<6;rs++){
// 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<updateTrainModel.children.length;rs++){
//console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){
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){
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[1].code] = stationlist[i].code;
}
@ -285,7 +285,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
} else {
scope.nowcode = data.code;
if (data.type == "room") {
console.log(scope.modelmanager.roommodel.mesh);
scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel);
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"){
console.log(event.data);
deletefault(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;
for(let i=0,leni= fault.length;i<leni;i++){
console.log(fault[i]);
let newfault = {
code:fault[i].code,
name:'',

View File

@ -15,10 +15,7 @@ import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene){
//console.log(mapdata);
//console.log(data);
//console.log(scope);
let sceneload = scene;
let backdata = scope;
let jlmap3ddata = mapdata;
@ -69,25 +66,20 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
assetloader.assetPromiseOver(sceneload)
.then(function(data){
//console.log(data);
//,netdata.stands,mixers,actions,"0"
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02");
})
.then(function(data){
//console.log(data);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
})
.then(function(data){
//console.log(data);
return signallist.loadpromise(mapdata.signalList,signaldata,sceneload,assetloader);
})
.then(function(data){
return switchlist.loadpromise(mapdata.switchList,switchdata,sceneload,assetloader,mixers,actions);
})
.then(function(data){
//console.log(data);
//console.log(assetloader);
return trainlisttest.initpromise(mapdata.trainList,sceneload,assetloader,mixers,actions,"02");
})
.then(function(data){
@ -109,16 +101,19 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
if(scope.stationtexture["stationlist"]){
for(let mm=0;mm< stationstandlist.group.children.length;mm++){
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.needsUpdate = true;
// console.log(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.needsUpdate = true;
}
if(stationstandlist.group.children[mm].getObjectByName("zhantaiming")){
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
newmaterial.map =scope.stationtexture[stationname];
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
@ -126,6 +121,8 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
}
}
}

View File

@ -315,10 +315,17 @@ export default class Section extends Group {
}
const path = window.location.href;
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 });
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 });
});
}

View File

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

View File

@ -426,6 +426,8 @@ export const ProjectIcon = {
};
export const ProjectCode = {
login: 'DEFAULT',
designlogin: 'DEFAULT',
xty: 'XTY',
designxty: 'XTY',
gzb: 'GZB',
@ -448,7 +450,7 @@ export const ProjectCode = {
designsdy: 'SDY'
};
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 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']; // 登录页右下角主体不展示

View File

@ -1,6 +1,41 @@
<template>
<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">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -23,6 +58,7 @@ export default {
formModel: {
dataMapId: '',
dataStationCode: '',
common: false,
stationCode: ''
},
mapList: [],
@ -45,6 +81,12 @@ export default {
},
rules() {
const crules = {
dataMapId: [
{ required: true, message: '请选择', trigger: 'change' }
],
dataStationCode: [
{ required: true, message: '请选择', trigger: 'change' }
],
stationCode: [
{ required: true, message: '请选择', trigger: 'change' }
]
@ -105,11 +147,11 @@ export default {
this.dialogVisible = true;
},
doCreate() {
this.$refs.dataform.validateForm(() => {
this.$refs.form.validate(() => {
const param = {
mapId: this.$route.params.mapId,
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 => {
this.$message.success('创建成功');
@ -121,7 +163,7 @@ export default {
});
},
doClose() {
this.$refs.dataform.resetForm();
this.$refs.form.resetFields();
this.dialogVisible = false;
},
async changeMapId(val) {

View File

@ -1,6 +1,20 @@
<template>
<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">
<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>
@ -30,20 +44,12 @@ export default {
stationList: [],
ibpId: '',
formModel: {
stationCode: ''
stationCode: '',
common: false
}
};
},
computed: {
form() {
const form = {
labelWidth: '150px',
items: [
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList }
]
};
return form;
},
rules() {
const crules = {
stationCode: [
@ -82,6 +88,7 @@ export default {
doShow(data) {
if (data) {
this.formModel.stationCode = data.stationCode;
this.formModel.common = !data.stationCode;
this.ibpId = data.id;
this.isPut = true;
} else {
@ -90,10 +97,10 @@ export default {
this.dialogVisible = true;
},
doCreate() {
this.$refs.dataform.validateForm(() => {
this.$refs.form.validate(() => {
const param = {
mapId: this.$route.params.mapId,
stationCode: this.formModel.stationCode
stationCode: this.formModel.common ? null : this.formModel.stationCode
};
createIbp(param).then(resp => {
this.$message.success('创建成功');
@ -105,10 +112,10 @@ export default {
});
},
putInfo() {
this.$refs.dataform.validateForm(() => {
this.$refs.form.validate(() => {
const param = {
mapId: this.$route.params.mapId,
stationCode: this.formModel.stationCode
stationCode: this.formModel.common ? null : this.formModel.stationCode
};
putIbpBasicInfo(this.ibpId, param).then(resp => {
this.$message.success('更新成功');
@ -121,7 +128,7 @@ export default {
});
},
doClose() {
this.$refs.dataform.resetForm();
this.$refs.form.resetFields();
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" @click="createByPublish">发布数据创建</el-button>
</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="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" />
@ -123,6 +123,9 @@ export default {
}
},
covertData(row) {
if (!row.stationCode) {
return '公共数据';
}
const staitonlist = this.stationList.filter(element => {
return row.stationCode == element.code;
});

View File

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

View File

@ -27,7 +27,7 @@ export default {
return {
widthLeft: Number(localStore.get('LeftWidth')) || 450,
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
}
};
@ -40,11 +40,12 @@ export default {
},
watch: {
'$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() {
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() {
this.$refs.ibpPlate.show();

View File

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

View File

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

View File

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

View File

@ -70,7 +70,7 @@ export default {
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
],
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,
mapId: this.$route.params.mapId,
prdType: model.prdType,
cityCode: model.cityCode
cityCode: model.cityCode,
classIdList: []
};
this.dialogShow = true;
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>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-draft ref="createDraft" :project-option-list="projectOptionList" @reloadTable="reloadTable" />
</div>
</template>
<script>
import { queryPostPage } from '@/api/learn';
import { ProjectList} from '@/scripts/ProjectConfig';
import CreateDraft from './create';
export default {
name: 'Manage',
components:{
CreateDraft
},
data() {
return {
projectOptionList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -17,9 +25,9 @@ export default {
labelWidth: '140px',
reset: false,
queryObject: {
mapId: {
project: {
type: 'select',
label: this.$t('orderAuthor.mapName'),
label: '所属项目',
config: {
data: []
}
@ -27,130 +35,76 @@ export default {
}
},
queryList: {
query: this.queryFunction,
query: queryPostPage,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('orderAuthor.organizationOrEnterprise'),
prop: 'organizationName'
},
{
title: this.$t('orderAuthor.permissionName'),
prop: 'permissionName'
},
{
title: this.$t('orderAuthor.founder'),
prop: 'userNickname'
},
{
title: this.$t('orderAuthor.publicOrPrivate'),
prop: 'canDistribute',
title: '项目',
prop: 'project',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
columnValue: (row) => { return this.getProjectName(row.project); },
tagType: (row) => {
switch (row.canDistribute) {
case true: return 'success';
case false: return 'danger';
}
return 'success';
}
},
{
title: this.$t('orderAuthor.permanenceOrNot'),
prop: 'forever',
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';
}
}
title: '留言板名称',
prop: 'title'
},
{
type: 'button',
title: this.$t('global.operate'),
width: this.$i18n.locale == 'en' ? '400' : '300',
width: '350',
buttons: [
{
name: this.$t('orderAuthor.obtainQrCode'),
handleClick: this.handleRtCodeShow,
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; }
name: '进入',
handleClick: this.handleEnter
}
]
}
],
actions: [
{ text: this.$t('orderAuthor.createPackage'), handler: this.handleCreatePackage },
{ text: '创建项目权限包', handler: this.handleCreateProjectPackage },
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
{ text: '创建留言板', handler: this.handleCreateMessageBoard }
]
}
};
},
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:{
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>

View File

@ -23,7 +23,7 @@
<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" @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-group>
</div>
@ -49,6 +49,8 @@ import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import { EventBus } from '@/scripts/event-bus';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name:'DemonMenu',
components:{
@ -117,6 +119,7 @@ export default {
deviceif:false,
deviceShow: true,
drivingShow: false,
messageBoard: false,
jl3dtrafficplan:this.$t('display.demon.trafficplantext'),
jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
jl3dpassflow:this.$t('display.demon.passengerflow'),
@ -148,6 +151,13 @@ export default {
EventBus.$on('quitScene', () => {
this.practiceDisabled = false;
});
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
},
methods:{
menuClick() {

View File

@ -9,7 +9,7 @@
</el-radio-group>
<span class="display-time">{{ formatUsedTime }}</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>
</div>
<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 { EventBus } from '@/scripts/event-bus';
import { getSessionStorage } from '@/utils/auth';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name: 'MenuLesson',
@ -73,6 +75,7 @@ export default {
isDisable: false,
backDisable: false,
startLoading: false,
messageBoard: false,
prdTypeMap: {
'01': '01', // =>
'02': '02', // =>
@ -132,6 +135,15 @@ export default {
this.resetTraining();
}
},
mounted() {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
},
methods: {
tipInfo(opt) {
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 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="messageBoardShow">留言板</el-button>
<el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
<el-button size="small" @click="contectUs">联系方式</el-button>
</el-button-group>
<div class="trainExample">
@ -104,6 +104,8 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { getToken } from '@/utils/auth';
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name:'PracticeDisplay',
components: {
@ -126,7 +128,8 @@ export default {
currentFlowDataName:'',
currentFlowDataId:'',
isDisabled:false,
loading:false
loading:false,
messageBoard: false
};
},
computed:{
@ -231,6 +234,13 @@ export default {
this.group = this.$route.query.group;
this.setWindowSize();
this.initLoadData();
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
},
methods:{
async initLoadData() { //

View File

@ -23,7 +23,7 @@
<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="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>
</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'}">
@ -55,6 +55,8 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
import { getSessionStorage } from '@/utils/auth';
import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig';
import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name: 'MenuDemonJoint',
@ -109,7 +111,8 @@ export default {
isShow3dmodel :false,
jl3dname: this.$t('display.demon.threeDimensionalView'),
hoverBtn: false,
btnWidth: 0
btnWidth: 0,
messageBoard: false
};
},
computed: {
@ -201,6 +204,13 @@ export default {
},
async mounted() {
this.change3dname();
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
this.$nextTick(() => {
this.menuClick();
});

View File

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

View File

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