Merge remote-tracking branch 'origin/test'

This commit is contained in:
joylink_fanyuhong 2022-01-20 18:02:40 +08:00
commit 4431fe9dd4
60 changed files with 3104 additions and 539 deletions

49
src/api/audioResources.js Normal file
View File

@ -0,0 +1,49 @@
import request from '@/utils/request';
// 创建音频资源
export function createAudioResources(data) {
return request({
url: `/api/audioResources`,
method: 'post',
data
});
}
// 查询所有音频资源
export function queryAllAudioResources() {
return request({
url: `/api/audioResources/list`,
method: 'get'
});
}
// 删除音频资源
export function deleteAudioResources(id) {
return request({
url: `/api/audioResources/${id}`,
method: 'delete'
});
}
// 更新音频资源
export function updateAudioResources(id, data) {
return request({
url: `/api/audioResources/${id}`,
method: 'put',
data
});
}
// 分页查询音频资源
export function pagedAudioResources(params) {
return request({
url: `/api/audioResources/paged`,
method: 'get',
params
});
}
// 上传音频文件
export function uploadAudio(file) {
return request({
url: `/api/upload/AUDIO?appId=00001&appSecret=joylink00001`,
method: 'post',
data: file,
upload: true
});
}

View File

@ -49,3 +49,116 @@ export function queryHasIscs(params) {
params params
}); });
} }
// iscs设备创建
export function createIscsDevcie(data) {
return request({
url: `/api/iscsDevice`,
method: 'post',
data
});
}
// 查询所有iscs设备
export function queryAllIscsDevice() {
return request({
url: `/api/iscsDevice/all`,
method: 'get'
});
}
// 根据id查询iscs设备
export function queryIscsDevcieById(id) {
return request({
url:
`/api/iscsDevice/${id}`,
method: 'get'
});
}
// 根据mapId获取Iscs设备list
export function queryIscsDeviceListByMapId(mapId) {
return request({
url: `/api/iscsDevice/list/mapId/${mapId}`,
method: 'get'
});
}
// 分页查询ISCS设备
export function pagedIscsDevice(params) {
return request({
url: `/api/iscsDevice/paged`,
method: 'get',
params
});
}
// 删除ISCS设备
export function deleteIscsDevice(id) {
return request({
url: `/api/iscsDevice/${id}`,
method: 'delete'
});
}
// 根据mapId查询设备列表
export function getIscsDeviceListByMapId(mapId) {
return request({
url: `/api/iscsDevice/list/mapId/${mapId}`,
method: 'get'
});
}
// 根据条件查询设备列表
export function queryIscsDeviceCod(params) {
return request({
url: `/api/iscsDevice/list/criteria`,
method: 'get',
params
});
}
// 批量创建ISCS设备
export function batchCreateIscsDevcie(data) {
return request({
url: `/api/iscsDevice/create/batch`,
method: 'post',
data
});
}
// 创建ISCS系统资源
export function createIscsResources(data) {
return request({
url: `/api/systemRes`,
method: 'post',
data
});
}
// 查询所有ISCS系统资源
export function queryAllIscsResources() {
return request({
url: `/api/systemRes/all`,
method: 'get'
});
}
// 根据id查询ISCS系统资源
export function queryIscsResourcesById(id) {
return request({
url: `/api/systemRes/${id}`,
method: 'get'
});
}
// 分页查询ISCS系统资源
export function pagedIscsResources(params) {
return request({
url: `/api/systemRes/paged`,
method: 'get',
params
});
}
// 删除ISCS系统资源
export function deleteIscsResources(id) {
return request({
url: `/api/systemRes/${id}`,
method: 'delete'
});
}
// 按条件查询ISCS系统资源
export function queryIscsResourcesCod(params) {
return request({
url: `/api/systemRes/list/criteria`,
method: 'get',
params
});
}

View File

@ -505,3 +505,11 @@ export function srTrainControl(group, params) {
params params
}); });
} }
/** 条件查询仿真中的ISCS资源 */
export function queryIscsResourcesByGroup(group, params) {
return request({
url: `simulation/${group}/iscs/systemResources`,
method: 'get',
params
});
}

View File

@ -100,5 +100,8 @@ export default {
voiceTraining: 'Voice Training', voiceTraining: 'Voice Training',
mapGroup: 'Map Group', mapGroup: 'Map Group',
drawingMange:'Drawing Mange', drawingMange:'Drawing Mange',
projectServer: 'Project Server' projectServer: 'Project Server',
audioResourcesManage: 'Audio Resources Manage',
iscsDeviceManage: 'ISCS Device Manage',
iscsResourcesManage: 'ISCS Resources Manage'
}; };

View File

@ -104,5 +104,8 @@ export default {
voiceTraining: '语音训练', voiceTraining: '语音训练',
mapGroup: '地图分组', mapGroup: '地图分组',
drawingMange:'图纸管理', drawingMange:'图纸管理',
projectServer: '项目域名' projectServer: '项目域名',
audioResourcesManage: '音频资源管理',
iscsDeviceManage: 'ISCS设备管理',
iscsResourcesManage: 'ISCS资源管理'
}; };

View File

@ -16,7 +16,8 @@ import { ControlManager } from '@/jlmap3d/lesson3d/manager/controlmanager.js';
import { AnimateManager } from '@/jlmap3d/lesson3d/manager/animatemanager.js'; import { AnimateManager } from '@/jlmap3d/lesson3d/manager/animatemanager.js';
import { Fire } from '@/jlmap3d/lesson3d/utils/fire.js';
import { AccidentManager } from '@/jlmap3d/lesson3dedit/manager/accidentmanager.js';
import { Loading } from 'element-ui'; import { Loading } from 'element-ui';
@ -50,22 +51,21 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
light.position.set( 0, 4000, 0 ); light.position.set( 0, 4000, 0 );
scene.add( light ); scene.add( light );
// let fire = new Fire();
// fire.init(scene);
var audionext = JL3D_LOCAL_STATIC+'/lesson3d/audio/next.wav'; var audionext = JL3D_LOCAL_STATIC+'/lesson3d/audio/next.wav';
audionext = new Audio(audionext); audionext = new Audio(audionext);
let animateManager = new AnimateManager(); let animateManager = new AnimateManager();
let controlManager = new ControlManager( dom,scene,lessonData,lessonIndex); let controlManager = new ControlManager( dom,scene,lessonData,lessonIndex);
let accidentManager = new AccidentManager(scene);
accidentManager.initAccident('player');
if(lessonData.accidentList){
accidentManager.loadAccidentList(lessonData.accidentList)
}
let loadingInstance = Loading.service({ fullscreen: true }); let loadingInstance = Loading.service({ fullscreen: true });
let assetModelManager = new AssetModelManager(scope,scene,controlManager); let assetModelManager = new AssetModelManager(scope,scene);
console.log(lessonData);
assetModelManager.lessonAssetsLoader(lessonData).then((result) => { assetModelManager.lessonAssetsLoader(lessonData).then((result) => {
scope.nowSceneType = lessonData.lessonProgress[0].progressScene; scope.nowSceneType = lessonData.lessonProgress[0].progressScene;
animateManager.initAnimation(assetModelManager); animateManager.initAnimation(assetModelManager);
@ -119,6 +119,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
// console.log(lessonData.lessonProgress[lessonIndex].roleName); // console.log(lessonData.lessonProgress[lessonIndex].roleName);
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
assetModelManager.changeSceneGroup(scope.nowSceneType); assetModelManager.changeSceneGroup(scope.nowSceneType);
accidentManager.changeSceneGroup(scope.nowSceneType);
controlManager.initRoleMode(true,nowRole); controlManager.initRoleMode(true,nowRole);
controlManager.initControlMode(lessonIndex); controlManager.initControlMode(lessonIndex);
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]);
@ -126,6 +127,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
} else{ } else{
if(lessonData.lessonProgress[lessonIndex].roleName == 'kong'){ if(lessonData.lessonProgress[lessonIndex].roleName == 'kong'){
assetModelManager.changeSceneGroup(scope.nowSceneType); assetModelManager.changeSceneGroup(scope.nowSceneType);
accidentManager.changeSceneGroup(scope.nowSceneType);
controlManager.initRoleMode(false,nowRole); controlManager.initRoleMode(false,nowRole);
} }
controlManager.initRoleMode(false,nowRole); controlManager.initRoleMode(false,nowRole);
@ -209,7 +211,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
if(controlManager.controlMode == "non"){ if(controlManager.controlMode == "non"){
controlManager.updateOrbitControl(); controlManager.updateOrbitControl();
} }
// fire.update(); accidentManager.update();
animateManager.updateAnimation(); animateManager.updateAnimation();
requestAnimationFrame(animate); requestAnimationFrame(animate);

View File

@ -8,9 +8,12 @@ export function AnimateManager() {
let mixers = []; let mixers = [];
this.actions = []; this.actions = [];
let clock = new THREE.Clock();
let mixerUpdateDelta;
this.initAnimation = function(assetModelManager){ this.initAnimation = function(assetModelManager){
for(let k in assetModelManager.staticAsset){ for(let k in assetModelManager.staticAsset){
if(assetModelManager.staticAsset[k].mesh.animations.length > 0){ if(assetModelManager.staticAsset[k].mesh.animations.length > 0){
// console.log(assetModelManager.staticAsset[k]); // console.log(assetModelManager.staticAsset[k]);
@ -57,10 +60,28 @@ export function AnimateManager() {
} }
} }
for(let j in assetModelManager.lessonTriggerList){
for(let i =0;i<assetModelManager.lessonTriggerList[j].length;i++){
if(assetModelManager.lessonTriggerList[j][i].cloneanimations){
let animations = assetModelManager.lessonTriggerList[j][i].animations;
let mixer = new THREE.AnimationMixer( assetModelManager.lessonTriggerList[j][i] );
let actionName = assetModelManager.lessonTriggerList[j][i].name;
scope.actions[actionName] = {
status:"01",
action:mixer.clipAction( assetModelManager.lessonTriggerList[j][i].animations[ 0 ])
};
// scope.actions[actionName].action.play();
mixers.push(mixer);
}
}
}
} }
let clock = new THREE.Clock();
let mixerUpdateDelta;
this.updateAnimation = function(){ this.updateAnimation = function(){
mixerUpdateDelta = clock.getDelta(); mixerUpdateDelta = clock.getDelta();
for(let i=mixers.length-1;i>=0;i--){ for(let i=mixers.length-1;i>=0;i--){

View File

@ -112,9 +112,7 @@ export function AssetModelManager(editor,scene) {
scope.lessonTriggerList["dc"] = []; scope.lessonTriggerList["dc"] = [];
this.changeSceneGroup = function(groupType){ this.changeSceneGroup = function(groupType){
// console.log(groupType);
// console.log(editor.nowSceneType);
// console.log(scope.lessonTriggerList[editor.nowSceneType]);
editor.nowSceneType = groupType; editor.nowSceneType = groupType;
scene.remove(this.otherModel); scene.remove(this.otherModel);
this.otherModel = groupList[groupType]; this.otherModel = groupList[groupType];
@ -153,10 +151,14 @@ export function AssetModelManager(editor,scene) {
initTriggerList(); initTriggerList();
let modelList = lessonData.modelList; let modelList = lessonData.modelList;
for(let i=0;i<modelList.length;i++){ for(let i=0;i<modelList.length;i++){
// console.log(modelList[i]);
let newModelTrigger = scope.loadAsset[modelList[i].modelId].mesh.clone(true); let newModelTrigger = scope.loadAsset[modelList[i].modelId].mesh.clone(true);
if(scope.loadAsset[modelList[i].modelId].mesh.animations.length>0){
newModelTrigger.animations = scope.loadAsset[modelList[i].modelId].mesh.animations;
newModelTrigger.cloneanimations = true;
}
newModelTrigger.showType = "loadModel"; newModelTrigger.showType = "loadModel";
newModelTrigger.label = modelList[i].label; newModelTrigger.label = modelList[i].label;
newModelTrigger.name = modelList[i].label;
newModelTrigger.modelId = modelList[i].modelId; newModelTrigger.modelId = modelList[i].modelId;
newModelTrigger.visible = modelList[i].visible; newModelTrigger.visible = modelList[i].visible;
newModelTrigger.position.x = modelList[i].pos.x; newModelTrigger.position.x = modelList[i].pos.x;

View File

@ -6,6 +6,7 @@ export function AccidentManager(scene) {
this.accidentList = []; this.accidentList = [];
this.accidentMode = '';
this.accidentGroup = new THREE.Group(); this.accidentGroup = new THREE.Group();
//场景中可触发事件模型 //场景中可触发事件模型
@ -32,7 +33,7 @@ export function AccidentManager(scene) {
scene.add(scope.accidentGroup); scene.add(scope.accidentGroup);
this.initAccident = function(nowSceneType){ this.initAccident = function(type){
let accidentData = [ let accidentData = [
{ {
id:'1', id:'1',
@ -40,7 +41,12 @@ export function AccidentManager(scene) {
type:"fire" type:"fire"
} }
]; ];
jl3dUpdateAccidentData(accidentData); scope.accidentMode = type;
if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentData(accidentData);
}
} }
this.saveDataList = function(){ this.saveDataList = function(){
@ -72,7 +78,11 @@ export function AccidentManager(scene) {
scope.accidentGroup.remove(scope.accidentGroup.children[0]); scope.accidentGroup.remove(scope.accidentGroup.children[0]);
} }
scope.accidentGroup.add(groupList[nowSceneType]); scope.accidentGroup.add(groupList[nowSceneType]);
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]); if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
}
updateSceneType = nowSceneType; updateSceneType = nowSceneType;
} }
@ -95,7 +105,11 @@ export function AccidentManager(scene) {
newAccident.object.createNew(groupList[nowSceneType],pos); newAccident.object.createNew(groupList[nowSceneType],pos);
} }
scope.accidentList[nowSceneType].push(newAccident); scope.accidentList[nowSceneType].push(newAccident);
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]); if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
}
} }
this.deleteAccident = function(selectAccident,nowSceneType){ this.deleteAccident = function(selectAccident,nowSceneType){
@ -104,7 +118,11 @@ export function AccidentManager(scene) {
for(let i=0;i<scope.accidentList[nowSceneType].length;i++){ for(let i=0;i<scope.accidentList[nowSceneType].length;i++){
if(scope.accidentList[nowSceneType][i].id == selectAccident.id){ if(scope.accidentList[nowSceneType][i].id == selectAccident.id){
scope.accidentList[nowSceneType].splice(i,1); scope.accidentList[nowSceneType].splice(i,1);
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]); if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
}
break; break;
} }
} }
@ -112,7 +130,6 @@ export function AccidentManager(scene) {
this.loadAccidentList = function(accidentList){ this.loadAccidentList = function(accidentList){
console.log(accidentList);
for(let i=0;i<accidentList.length;i++){ for(let i=0;i<accidentList.length;i++){
let newAccident = { let newAccident = {
id:accidentList[i].id, id:accidentList[i].id,
@ -129,7 +146,6 @@ export function AccidentManager(scene) {
newAccident.object.createNew(groupList[accidentList[i].sceneType],accidentList[i].pos); newAccident.object.createNew(groupList[accidentList[i].sceneType],accidentList[i].pos);
} }
scope.accidentList[accidentList[i].sceneType].push(newAccident); scope.accidentList[accidentList[i].sceneType].push(newAccident);
// jl3dUpdateAccidentlist(scope.accidentList[accidentList[i].sceneType]);
} }
} }

View File

@ -372,6 +372,75 @@ export function JobPaneData() {
}, },
], ],
}, },
{
name:"电力调度",
value:"dldd",
text:"负责供电系统的正常运行。",
picurl:"",
controlList:[
//联控
{
name:"联控",
data:[],
},
//动作
{
name:"动作",
data:[],
},
//口呼
{
name:"口呼",
data:[],
},
],
},
{
name:"环控调度",
value:"hkdd",
text:"负责监控地铁环控系统运行。",
picurl:"",
controlList:[
//联控
{
name:"联控",
data:[],
},
//动作
{
name:"动作",
data:[],
},
//口呼
{
name:"口呼",
data:[],
},
],
},
{
name:"信息调度",
value:"xxdd",
text:"负责故障发生时通报信息。",
picurl:"",
controlList:[
//联控
{
name:"联控",
data:[],
},
//动作
{
name:"动作",
data:[],
},
//口呼
{
name:"口呼",
data:[],
},
],
},
{ {
name:"报警中心", name:"报警中心",
value:"bjzx", value:"bjzx",

View File

@ -96,7 +96,9 @@ router.beforeEach( async (to, from, next) => {
store.dispatch('setUploadUrl', urlData.UPLOAD_API); store.dispatch('setUploadUrl', urlData.UPLOAD_API);
store.dispatch('setBaseSite', urlData.BASE_SITE); store.dispatch('setBaseSite', urlData.BASE_SITE);
} catch (e) { } catch (e) {
console.error(e); const urlData = handlerUrl();
store.dispatch('setBaseUrl', urlData.BASE_API);
console.error(e);
} }
} }
document.title = loginInfo[project || 'login'] ? loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title : ''; document.title = loginInfo[project || 'login'] ? loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title : '';

View File

@ -192,6 +192,9 @@ const UploadPdfList = () => import('@/views/uploadPdf/list');
const ThirdLogin = () => import('@/views/thirdLogin'); const ThirdLogin = () => import('@/views/thirdLogin');
const ProjectServer = () => import('@/views/system/serverManage'); const ProjectServer = () => import('@/views/system/serverManage');
const VoiceManage = () => import('@/views/fileManage/voiceManage');
const IscsDeviceManage = () => import('@/views/system/iscsDeviceManage');
const IscsResourcesManage = () => import('@/views/system/iscsResourcesManage');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
@ -1210,6 +1213,20 @@ export const asyncRouter = [
meta: { meta: {
i18n: 'router.projectServer' i18n: 'router.projectServer'
} }
},
{
path: 'iscsDeviceManage',
component: IscsDeviceManage,
meta: {
i18n: 'router.iscsDeviceManage'
}
},
{
path: 'iscsResourcesManage',
component: IscsResourcesManage,
meta: {
i18n: 'router.iscsResourcesManage'
}
} }
// { // {
// path: 'deviceManage', // path: 'deviceManage',
@ -1255,6 +1272,13 @@ export const asyncRouter = [
meta: { meta: {
i18n: 'router.uploadPdf' i18n: 'router.uploadPdf'
} }
},
{
path: 'audioResources',
component: VoiceManage,
meta: {
i18n: 'router.audioResourcesManage'
}
} }
] ]
}, },

View File

@ -341,6 +341,8 @@ const socket = {
simulationAlarmInfo: [], // 仿真报警信息 simulationAlarmInfo: [], // 仿真报警信息
deviceStateMessages: null, // 新版订阅设备状态消息 deviceStateMessages: null, // 新版订阅设备状态消息
iscsStateMessages: null, // iscs设备状态消息 iscsStateMessages: null, // iscs设备状态消息
iscsStatePaMessages: null, // iscsPA设备状态消息
iscsStatePisMessages: null, // iscsPIS设备状态消息
simulationSpeed: 1, // 仿真倍速 simulationSpeed: 1, // 仿真倍速
simulationPause: false, simulationPause: false,
simulationPslStatus: [], // PSL面板按钮状态信息 simulationPslStatus: [], // PSL面板按钮状态信息
@ -425,6 +427,12 @@ const socket = {
}, },
setIscsStateMessages: (state, speed) => { setIscsStateMessages: (state, speed) => {
state.iscsStateMessages = speed; state.iscsStateMessages = speed;
},
setIscsStatePaMessages: (state, speed) => {
state.iscsStatePaMessages = speed;
},
setIscsStatePisMessages: (state, speed) => {
state.iscsStatePisMessages = speed;
} }
}, },
@ -513,6 +521,12 @@ const socket = {
}, },
handleIscsState:({ commit }, state) => { handleIscsState:({ commit }, state) => {
commit('setIscsStateMessages', state); commit('setIscsStateMessages', state);
},
handleIscsPaState:({ commit }, state) => {
commit('setIscsStatePaMessages', state);
},
handleIscsPisState:({ commit }, state) => {
commit('setIscsStatePisMessages', state);
} }
} }
}; };

View File

@ -1,4 +1,3 @@
import store from '@/store/index';
// export function getBaseUrl() { // export function getBaseUrl() {
// let BASE_API; // let BASE_API;
// if (process.env.NODE_ENV === 'development') { // if (process.env.NODE_ENV === 'development') {

View File

@ -29,6 +29,9 @@ service.interceptors.request.use(config => {
if (store.state.user.baseUrl) { if (store.state.user.baseUrl) {
config.baseURL = store.state.user.baseUrl; config.baseURL = store.state.user.baseUrl;
} }
if (config.upload) {
config.baseURL = urlData.UPLOAD_API;
}
if (config.time) { if (config.time) {
config.timeout = config.time; // 让每个请求携带自定义token 请根据实际情况自行修改 config.timeout = config.time; // 让每个请求携带自定义token 请根据实际情况自行修改

View File

@ -25,6 +25,12 @@ export function getTopic(type, group, stationCode) {
case 'ISCSPSD': case 'ISCSPSD':
topic = `/queue/simulation/${group}/iscs/psd/${stationCode}`; topic = `/queue/simulation/${group}/iscs/psd/${stationCode}`;
break; break;
case 'ISCSPA':
topic = `/queue/simulation/${group}/iscs/pa`;
break;
case 'ISCSPIS':
topic = `/queue/simulation/${group}/iscs/pis`;
break;
} }
return topic; return topic;
} }
@ -50,8 +56,12 @@ function callback(Response) {
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body)); store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
} else if (Response.headers.destination.includes('state')) { } else if (Response.headers.destination.includes('state')) {
store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body)); store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body));
} else if (Response.headers.destination.includes('iscs')) { } else if (Response.headers.destination.includes('iscs/psd')) {
store.dispatch('socket/handleIscsState', JSON.parse(Response.body)); store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
} else if (Response.headers.destination.includes('iscs/pa')) {
store.dispatch('socket/handleIscsPaState', JSON.parse(Response.body));
} else if (Response.headers.destination.includes('iscs/pis')) {
store.dispatch('socket/handleIscsPisState', JSON.parse(Response.body));
} else { } else {
const data = JSON.parse(Response.body); const data = JSON.parse(Response.body);
store.dispatch('socket/setStomp', data); store.dispatch('socket/setStomp', data);

View File

@ -0,0 +1,217 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="580px" :before-close="handleClose" center :close-on-click-modal="false">
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="60px">
<el-form-item label="名称" prop="name">
<el-input v-model="formModel.name" />
</el-form-item>
<el-form-item label="描述" prop="desc">
<el-input v-model="formModel.desc" />
</el-form-item>
<el-form-item label="url" prop="url">
<el-row>
<el-col :span="18">
<el-input v-model="formModel.url" :disabled="true" style="width: 340px;" />
</el-col>
<el-col :span="6">
<el-upload
ref="replaceUploader"
v-model="newChapter.title"
:file-list="replaceList"
class="avatar-uploader"
action="https://joylink.club/jlfile/api/upload/AUDIO?appId=00001&appSecret=joylink00001"
:limit="1"
:show-file-list="true"
:on-remove="handleRemove"
:on-success="handleReplaceAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-col>
</el-row>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { createAudioResources, updateAudioResources} from '@/api/audioResources';
export default {
name: 'DeviceAdd',
data() {
return {
replaceList: [],
newChapter: { title: '' },
dialogVisible: false,
formModel: {
id: '',
name: '',
desc: '',
url: ''
},
loading: false
};
},
computed: {
rules() {
const crules = {
name: [
{ required: true, message: '请输入音频资源名称', trigger: 'blur' }
],
desc: [
{ required: true, message: '请输入音频资源描述', trigger: 'blur' }
],
url: [
{ required: true, message: '请录入音频资源', trigger: 'blur' }
]
};
return crules;
},
title() {
return this.formModel.id ? '修改音频资源' : '创建音频资源';
}
},
mounted() {
},
methods: {
handleReplaceAvatarSuccess(response, file, fileList) {
if (response.code == '200') {
this.formModel.url = response.data;
} else {
this.$message.error('音频上传失败!');
}
},
handleRemove() {
this.formModel.url = '';
},
/**
*上传文件限制--只能上传mp3格式的文件
*/
beforeAvatarUpload(file) {
var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
const extension = testmsg === 'mp3' || testmsg === 'wav';
if (!extension) {
this.$message({
message:'上传文件只能是mp3格式',
type:'error'
});
}
return extension;
},
show(data) {
this.dialogVisible = true;
if (data) {
this.formModel.id = data.id;
this.formModel.name = data.name;
this.formModel.desc = data.desc;
this.formModel.url = data.url;
} else {
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
});
}
},
doSave() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.loading = true;
const data = {
id: this.formModel.id,
name: this.formModel.name,
desc: this.formModel.desc,
url: this.formModel.url
};
if (data.id) {
updateAudioResources(data.id, data).then(resp => {
this.$message.success('修改音频资源数据成功!');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
} else {
createAudioResources(data).then(resp => {
this.$message.success('创建音频资源数据成功!');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
}
}
});
},
handleClose() {
this.formModel = {
id: '',
name: '',
desc: '',
url: ''
};
this.$refs.ruleForm.resetFields();
this.dialogVisible = false;
this.loading = false;
}
}
};
</script>
<style lang="scss" scoped>
.chat-box-footer-create{
font-size: 16px;
text-align: center;
color: #fff;
position: relative;
left: 5px;
top: 6px;
line-height: 30px;
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 50%;
background: green;
border: none;
display: flex;
justify-content: center;
align-items: center;
}
.chat-box-footer-send{
background: #F2F2F2;
right: 55px;
cursor: pointer;
.icon-yuyin{
color: #333;
font-size: 24px;
margin: 0;
}
&.active{
.icon-yuyin{
color: green;
}
}
.close_icon{
position: absolute;
top: 8px;
left: 45px;
font-size: 16px;
color: #333;
font-weight: 600;
padding: 3px;
}
}
#record_progress_bar{
width: 40px;
height: 40px;
position: absolute;
left: 0;
top: 0;
border-radius: 50%;
}
</style>

View File

@ -0,0 +1,131 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<add-voice ref="addVoice" @reloadTable="reloadTable" />
</div>
</template>
<script>
import { pagedAudioResources, deleteAudioResources } from '@/api/audioResources';
import AddVoice from './add';
export default {
name: 'DeviceManage',
components: {
AddVoice
},
data() {
return {
examResultList: [],
url: '',
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
reset: true,
queryObject: {
name: {
type: 'text',
label: '名称:'
},
desc: {
type: 'text',
label: '描述'
}
}
},
queryList: {
query: pagedAudioResources,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '名称',
prop: 'name'
},
{
title: '描述',
prop: 'desc'
},
{
title: 'url',
prop: 'url'
},
{
title: '创建时间',
prop: 'createTime',
type: 'tag',
columnValue: (row) => { return this.handleTime(row.createTime); },
tagType: (row) => { return 'success'; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '300',
buttons: [
{
name: '编辑',
handleClick: this.editConfig
},
{
name: this.$t('global.delete'),
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: this.$t('global.add'), handler: this.createAudioResources}
]
},
currentModel: {}
};
},
computed: {
},
mounted() {
},
methods: {
createProjectDevice() {
this.$refs.add.show();
},
handleTime(time) {
const timeList = time.split('T');
let newTime = '';
if (timeList.length > 1) {
newTime = timeList[0] + ' ' + timeList[1];
} else {
newTime = time;
}
return newTime;
},
//
handleDelete(index, row) {
this.$confirm('此操作将删除该音频资源数据!', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
deleteAudioResources(row.id).then(response => {
this.$message.success(this.$t('system.deleteSuccess'));
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox(this.$t('error.deleteFailed'));
});
});
},
createAudioResources() {
this.$refs.addVoice.show();
},
editConfig(index, row) {
this.$refs.addVoice.show(row);
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>

View File

@ -14,14 +14,14 @@
<div v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table"> <div v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
<div style="position: relative; left: 80px;"> <div style="position: relative; left: 80px;">
<div v-for="(it, j) in stationList" :key="j" class="table-grid"> <div v-for="(it, j) in stationList" :key="j" class="table-grid">
<el-button v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)"> <el-button v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it.code)">
<div style="cursor: default;">{{ it }}</div> <div style="cursor: default;">{{ it.name }}</div>
</el-button> </el-button>
<div v-if="item.type==='checkBox'"> <div v-if="checkHasDevice(item, it, i + '-' + j)">
<div class="pa-table-content" @click="clickArea(i,j)"> <div class="pa-table-content" @click="clickArea(i,j)">
<div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" /> <div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" />
</div> </div>
<div style="display: inline-block;margin-left: 5px;height: 18px;line-height: 18px;transform: translateY(-25%);color: #192780;">0</div> <div :id="'state-' +i + '-' + j" class="pa-tabel-state-box">{{ deviceMap[i+ '-' +j].state }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -39,13 +39,13 @@
<el-row> <el-row>
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;padding-top: 30px">预备<br>广播</div></el-col> <el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;padding-top: 30px">预备<br>广播</div></el-col>
<el-col :span="12"> <el-col :span="12">
<el-button class="broadcast-mode-button" @click="selectedVideoMode('common')"> <el-button class="broadcast-mode-button" @click="selectedVideoMode('RECORDING')">
<div class="pa-check-box" :style="{background: videoMode==='common'?'#2EFF74':'#CDCDCD'}" /> <div class="pa-check-box" :style="{background: videoMode==='RECORDING'?'#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 5px;display: inline-block;">普通预录</div> <div style="position: relative; left: 5px;display: inline-block;">普通预录</div>
</el-button> </el-button>
<br> <br>
<el-button class="broadcast-mode-button" @click="selectedVideoMode('emergency')"> <el-button class="broadcast-mode-button" @click="selectedVideoMode('EMERGENCY_RECORDING')">
<div class="pa-check-box" :style="{background: videoMode==='emergency'?'#2EFF74':'#CDCDCD'}" /> <div class="pa-check-box" :style="{background: videoMode==='EMERGENCY_RECORDING'?'#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div> <div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div>
</el-button> </el-button>
</el-col> </el-col>
@ -55,7 +55,7 @@
<el-button class="broadcast-mode-button" @click="showBroadcastContent">广播内容</el-button> <el-button class="broadcast-mode-button" @click="showBroadcastContent">广播内容</el-button>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button class="broadcast-mode-button">广播停止</el-button> <el-button class="broadcast-mode-button" @click="stopBroadcast">广播停止</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -64,8 +64,8 @@
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">背景音乐</div></el-col> <el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">背景音乐</div></el-col>
</el-row> </el-row>
<el-row style="padding-bottom: 10px"> <el-row style="padding-bottom: 10px">
<el-col :span="12"><el-button class="broadcast-mode-button">播放音乐</el-button></el-col> <el-col :span="12"><el-button class="broadcast-mode-button" @click="playBgm">播放音乐</el-button></el-col>
<el-col :span="12"><el-button class="broadcast-mode-button">停止音乐</el-button></el-col> <el-col :span="12"><el-button class="broadcast-mode-button" @click="stopBgm">停止音乐</el-button></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -76,15 +76,21 @@
<state-table /> <state-table />
</div> </div>
</div> </div>
<voice-broadcast ref="voiceBroadcast" /> <voice-broadcast ref="voiceBroadcast" :resources-list="resourcesList" @releaseBroadcast="releaseBroadcast" />
<audio id="voice" controls style="width: 0;height: 0;" />
</div> </div>
</template> </template>
<script> <script>
import { getByGroupStationList } from '@/api/jmap/map'; import { getByGroupStationList } from '@/api/jmap/map';
import { queryIscsDeviceCod } from '@/api/iscs';
import { queryIscsResourcesByGroup } from '@/api/simulation';
import MusicIcon from '@/assets/iscs_icon/music_icon.png'; import MusicIcon from '@/assets/iscs_icon/music_icon.png';
import StateTable from './stateTable'; import StateTable from './stateTable';
import VoiceBroadcast from './voiceBroadcast'; import VoiceBroadcast from './voiceBroadcast';
import { getToken } from '@/utils/auth';
import { sendCommandNew } from '@/api/jmap/training';
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
export default { export default {
name: 'CenterHome', name: 'CenterHome',
components: { components: {
@ -94,19 +100,26 @@ export default {
data() { data() {
return { return {
mes: '1111', mes: '1111',
voiceUrl: '',
verticalHeader: [ verticalHeader: [
{name: '车站', title: '全线', key: 'station', type: 'header', active: false}, {name: '车站', title: '全线', key: 'station', type: 'header', active: false},
{name: '站厅', title: '全站厅', key: 'stationHall', type: 'checkBox', active: false}, {name: '站厅', title: '全站厅', key: 'stationHall', type: 'checkBox', active: false, position: 'LCD'},
{name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false}, {name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false, position: 'UP_STAND'},
{name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false}, {name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false, position: 'DOWN_STAND'},
{name: '办公区', title: '全办公区', key: 'officeArea', type: 'checkBox', active: false}, {name: '办公区', title: '全办公区', key: 'officeArea', type: 'checkBox', active: false, position: 'ADMINISTRATIVE_AREA'},
{name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false}, {name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false, position: 'GATE'},
{name: '换乘通道', title: '全换乘通道', key: 'channel', type: '', active: false} {name: '换乘通道', title: '全换乘通道', key: 'channel', type: '', active: false, position: 'TRANSFER_CHANNEL'}
], ],
verticalIndexList: ['LCD', 'UP_STAND', 'DOWN_STAND', 'ADMINISTRATIVE_AREA', 'GATE', 'TRANSFER_CHANNEL'],
musicIcon: MusicIcon, musicIcon: MusicIcon,
selectedAreaList: [], selectedAreaList: [],
stationList: [], stationList: [],
videoMode: 'common' iscsDeviceList: [],
resourcesList: [],
videoMode: 'RECORDING',
iscsDeviceMap: {},
bgmResources: '',
deviceMap: {}
}; };
}, },
computed: { computed: {
@ -114,6 +127,68 @@ export default {
return this.stationList.length * 135 + 80; return this.stationList.length * 135 + 80;
} }
}, },
watch: {
'$store.state.socket.iscsStatePaMessages': function (list) {
if (list && list.length) {
list.forEach(item => {
const index = this.iscsDeviceMap[item.code];
if (index) {
this.$set(this.deviceMap[index], 'state', item.state);
const div = document.getElementById('state-' + index);
if (div) {
switch (item.state) {
case '0':
div.style.background = '#CCCCCC';
break;
case '1':
div.style.background = '#FF0000';
break;
case '2':
div.style.background = '#880000';
break;
case '3':
div.style.background = '#0000FF';
break;
case '4':
div.style.background = '#554488';
break;
case '5':
div.style.background = '#44CC55';
break;
case '6':
div.style.background = '#FF00FF';
break;
case '7':
div.style.background = '#887711';
break;
case '8':
div.style.background = '#006600';
break;
case '9':
div.style.background = '#778877';
break;
case '10':
div.style.background = '#555454';
break;
case '11':
div.style.background = '#556688';
break;
case '12':
div.style.background = '#887711';
break;
case '13':
div.style.background = '#115577';
break;
case '♬':
div.style.background = '';
break;
}
}
}
});
}
}
},
async created () { async created () {
// 线 // 线
const res = await getByGroupStationList(this.$route.query.group); const res = await getByGroupStationList(this.$route.query.group);
@ -121,12 +196,125 @@ export default {
this.stationList = []; this.stationList = [];
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot) { if (!station.depot) {
this.stationList.push(station.name); this.stationList.push(station);
} }
}); });
} }
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PA' });
if (resp.code == 200) {
this.iscsDeviceList = resp.data;
this.subscribe();
}
const params = { system: 'PA', type: 'BGM' };
queryIscsResourcesByGroup( this.$route.query.group, params).then(resp => {
this.bgmResources = resp.data && resp.data[0] ? resp.data[0].resources : [];
}).catch( () => {
this.$message.error('获取广播资源列表失败!');
} );
this.getResourcesList();
},
beforeDestroy() {
this.clearSubscribe();
}, },
methods: { methods: {
getResourcesList() {
const params = {system: 'PA', type: this.videoMode };
queryIscsResourcesByGroup(this.$route.query.group, params).then(resp => {
this.resourcesList = resp.data && resp.data[0] ? resp.data[0].resources : [];
}).catch( () => {
this.$message.error('获取广播资源列表失败!');
} );
},
playBgm() {
const iscsDeviceCodes = [];
this.selectedAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
if (this.bgmResources && this.bgmResources[0]) {
const params = {
resourceId: this.bgmResources[0].id,
iscsDeviceCodes: iscsDeviceCodes,
type: 'BGM'
};
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(resp => {
const bgmUrl = this.$store.state.user.resourcesUrl + this.bgmResources[0].url;
const audio = document.getElementById('voice');
audio.src = bgmUrl;
audio.play();
}).catch(() => {
this.$message.error('背景音乐播放失败!');
});
} else {
this.$message.error('暂无背景音乐数据!');
}
},
stopBgm() {
const iscsDeviceCodes = [];
this.selectedAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
const audio = document.getElementById('voice');
audio.pause();
}).catch(() => {
this.$message.error('背景音乐终止播放失败!');
});
},
stopBroadcast() {
const iscsDeviceCodes = [];
this.selectedAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
const audio = document.getElementById('voice');
audio.pause();
}).catch(() => {
this.$message.error('广播终止播放失败!');
});
},
releaseBroadcast(voice) {
const iscsDeviceCodes = [];
this.selectedAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
const params = {
resourceId: voice.id,
iscsDeviceCodes: iscsDeviceCodes,
type: this.videoMode
};
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(resp => {
this.voiceUrl = this.$store.state.user.resourcesUrl + voice.url;
const audio = document.getElementById('voice');
audio.src = this.voiceUrl;
audio.play();
}).catch(() => {
this.$message.error('发布广播失败!');
});
},
clickArea(i, j) { clickArea(i, j) {
if (this.selectedAreaList.includes(i + '-' + j)) { if (this.selectedAreaList.includes(i + '-' + j)) {
const index = this.selectedAreaList.indexOf(i + '-' + j); const index = this.selectedAreaList.indexOf(i + '-' + j);
@ -135,6 +323,12 @@ export default {
this.selectedAreaList.push(i + '-' + j); this.selectedAreaList.push(i + '-' + j);
} }
}, },
checkHasDevice(item, station, index) {
const device = this.iscsDeviceList.find(elem => elem.station == station.code && elem.position == item.position);
this.deviceMap[index] = device;
if (device) { this.iscsDeviceMap[device.code] = index; }
return !!device;
},
selectedBatch(data) { selectedBatch(data) {
data.active = !data.active; data.active = !data.active;
if (data.key == 'station') { if (data.key == 'station') {
@ -177,10 +371,10 @@ export default {
} }
return selectedStationFlag; return selectedStationFlag;
}, },
selectedStation(station) { selectedStation(stationCode) {
let stationIndex; let stationIndex;
this.stationList.forEach((item, index) => { this.stationList.forEach((item, index) => {
if (item === station) { if (item.code === stationCode) {
stationIndex = index; stationIndex = index;
} }
}); });
@ -196,9 +390,19 @@ export default {
}, },
selectedVideoMode(mode) { selectedVideoMode(mode) {
this.videoMode = mode; this.videoMode = mode;
this.getResourcesList();
}, },
showBroadcastContent() { showBroadcastContent() {
this.$refs.voiceBroadcast.doShow(); this.$refs.voiceBroadcast.doShow();
},
subscribe() {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(getTopic('ISCSPA', this.$route.query.group ), header);
this.$store.dispatch('app/animationsClose');
},
clearSubscribe() {
clearSubscribe(getTopic('ISCSPA', this.$route.query.group));
} }
} }
}; };
@ -407,4 +611,17 @@ export default {
width: 2px; width: 2px;
height: 6px; height: 6px;
} }
.iscs-pa-table {
height: 32px;
}
.pa-tabel-state-box{
display: inline-block;
margin-left: 5px;
width: 20px;
text-align: center;
height: 18px;
line-height: 18px;
transform: translateY(-25%);
color: #000;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div style="height: 100%; overflow-y: auto;"> <div style="height: 100%; overflow-y: auto;">
<center-home v-if="currentSystem === 'center'" /> <center-home v-if="currentSystem === 'center' || stationId === 'controlCenter'" />
<station-home v-else-if="currentSystem === 'local'" /> <station-home v-else-if="currentSystem === 'local' || stationId" />
</div> </div>
</template> </template>
@ -16,16 +16,19 @@ export default {
}, },
data() { data() {
return { return {
currentSystem: '' currentSystem: '',
stationId: ''
}; };
}, },
watch:{ watch:{
$route() { $route() {
this.currentSystem = this.$route.query.currentSystem; this.currentSystem = this.$route.query.currentSystem;
this.stationId = this.$route.query.stationId;
} }
}, },
mounted() { mounted() {
this.currentSystem = this.$route.query.currentSystem; this.currentSystem = this.$route.query.currentSystem;
this.stationId = this.$route.query.stationId;
} }
}; };
</script> </script>

View File

@ -16,18 +16,18 @@
<el-col :span="3"><div style="background: #880000;color: #000; text-align: center">2</div></el-col> <el-col :span="3"><div style="background: #880000;color: #000; text-align: center">2</div></el-col>
<el-col :span="9"><div>联动消防广播</div></el-col> <el-col :span="9"><div>联动消防广播</div></el-col>
<el-col :span="3"><div style="background: #778877;color: #000; text-align: center">9</div></el-col> <el-col :span="3"><div style="background: #778877;color: #000; text-align: center">9</div></el-col>
<el-col :span="9"><div>中心普通</div></el-col> <el-col :span="9"><div>中心普通</div></el-col>
</el-row> </el-row>
<el-row style="margin-bottom: 10px" :gutter="10"> <el-row style="margin-bottom: 10px" :gutter="10">
<el-col :span="3"><div style="background: #0000FF;color: #000; text-align: center">3</div></el-col> <el-col :span="3"><div style="background: #0000FF;color: #000; text-align: center">3</div></el-col>
<el-col :span="9"><div>环调话筒广播</div></el-col> <el-col :span="9"><div>环调话筒广播</div></el-col>
<el-col :span="3"><div style="background: #555454;color: #000; text-align: center">11</div></el-col> <el-col :span="3"><div style="background: #555454;color: #000; text-align: center">10</div></el-col>
<el-col :span="9"><div>车站普通</div></el-col> <el-col :span="9"><div>车站普通</div></el-col>
</el-row> </el-row>
<el-row style="margin-bottom: 10px" :gutter="10"> <el-row style="margin-bottom: 10px" :gutter="10">
<el-col :span="3"><div style="background: #554488;color: #000; text-align: center">4</div></el-col> <el-col :span="3"><div style="background: #554488;color: #000; text-align: center">4</div></el-col>
<el-col :span="9"><div>中心紧急</div></el-col> <el-col :span="9"><div>中心紧急</div></el-col>
<el-col :span="3"><div style="background: #556688;color: #000; text-align: center">12</div></el-col> <el-col :span="3"><div style="background: #556688;color: #000; text-align: center">11</div></el-col>
<el-col :span="9"><div>ATS预录</div></el-col> <el-col :span="9"><div>ATS预录</div></el-col>
</el-row> </el-row>
<el-row style="margin-bottom: 10px" :gutter="10"> <el-row style="margin-bottom: 10px" :gutter="10">
@ -38,12 +38,12 @@
</el-row> </el-row>
<el-row style="margin-bottom: 10px" :gutter="10"> <el-row style="margin-bottom: 10px" :gutter="10">
<el-col :span="3"><div style="background: #FF00FF;color: #000; text-align: center">6</div></el-col> <el-col :span="3"><div style="background: #FF00FF;color: #000; text-align: center">6</div></el-col>
<el-col :span="9"><div>车站紧急</div></el-col> <el-col :span="9"><div>车站紧急</div></el-col>
<el-col :span="3"><div style="background: #115577;color: #000; text-align: center">13</div></el-col> <el-col :span="3"><div style="background: #115577;color: #000; text-align: center">13</div></el-col>
<el-col :span="9"><div>设备通讯失败</div></el-col> <el-col :span="9"><div>设备通讯失败</div></el-col>
</el-row> </el-row>
<el-row style="margin-bottom: 10px" :gutter="10"> <el-row style="margin-bottom: 10px" :gutter="10">
<el-col :span="3"><div><img style="width: 15px;" :src="musicIcon"></div></el-col> <el-col :span="3"><div style="color: #000;font-size: 16px"></div></el-col>
<el-col :span="9"><div>背景音乐</div></el-col> <el-col :span="9"><div>背景音乐</div></el-col>
<el-col :span="3"><div style="background: #FFFFFF;width: 22px;height: 13px;"><div class="pa-check-box-small" /></div></el-col> <el-col :span="3"><div style="background: #FFFFFF;width: 22px;height: 13px;"><div class="pa-check-box-small" /></div></el-col>
<el-col :span="9"><div>被选择</div></el-col> <el-col :span="9"><div>被选择</div></el-col>

View File

@ -13,55 +13,55 @@
<el-row style="border-bottom: 3px solid #fff;height: 60px;"> <el-row style="border-bottom: 3px solid #fff;height: 60px;">
<el-col :span="5"> <el-col :span="5">
<div class="broadcast-mode-button" style="width: 70px;left: 5%;" @click="selecteAllArea"> <div class="broadcast-mode-button" style="width: 70px;left: 5%;" @click="selecteAllArea">
<div class="pa-check-box" :style="{background: enableAreaList.length === 7 ? '#2EFF74':'#CDCDCD'}" /> <div class="pa-check-box" :style="{background: enableAreaList.length === 6 ? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 1px;display: inline-block;">全车站</div> <div style="position: relative; left: 1px;display: inline-block;">全车站</div>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="broadcast-mode-button" @click="selectedArea('站厅')"> <div v-if="checkHasDevice('LCD')" class="broadcast-mode-button" @click="selectedArea('LCD')">
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('站厅')? '#2EFF74':'#CDCDCD'}" /> <div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('LCD')? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 25px;display: inline-block">0</div> <div id="LCD" class="pa-state-box">{{ deviceMap['LCD'].state }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="broadcast-mode-button" @click="selectedArea('上行站台')"> <div v-if="checkHasDevice('UP_STAND')" class="broadcast-mode-button" @click="selectedArea('UP_STAND')">
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('上行站台')? '#2EFF74':'#CDCDCD'}"/> <div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 25px;display: inline-block">0</div> <div id="UP_STAND" class="pa-state-box">{{ deviceMap['UP_STAND'].state }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="broadcast-mode-button" @click="selectedArea('下行站台')"> <div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-mode-button" @click="selectedArea('DOWN_STAND')">
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('下行站台')? '#2EFF74':'#CDCDCD'}"/> <div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 25px;display: inline-block">0</div> <div id="DOWN_STAND" class="pa-state-box">{{ deviceMap['DOWN_STAND'].state }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="broadcast-mode-button" @click="selectedArea('办公区')"> <div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-mode-button" @click="selectedArea('ADMINISTRATIVE_AREA')">
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('办公区')? '#2EFF74':'#CDCDCD'}"/> <div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 25px;display: inline-block">0</div> <div id="ADMINISTRATIVE_AREA" class="pa-state-box">{{ deviceMap['ADMINISTRATIVE_AREA'].state }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="broadcast-mode-button" @click="selectedArea('出入口')"> <div v-if="checkHasDevice('GATE')" class="broadcast-mode-button" @click="selectedArea('GATE')">
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('出入口')? '#2EFF74':'#CDCDCD'}"/> <div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('GATE')? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 25px;display: inline-block">0</div> <div id="GATE" class="pa-state-box">{{ deviceMap['GATE'].state }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="broadcast-mode-button" @click="selectedArea('换乘通道')"> <div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-mode-button" @click="selectedArea('TRANSFER_CHANNEL')">
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('换乘通道')? '#2EFF74':'#CDCDCD'}"/> <div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 25px;display: inline-block">0</div> <div id="TRANSFER_CHANNEL" class="pa-state-box">{{ deviceMap['TRANSFER_CHANNEL'].state }}</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="5"><div class="broadcast-atc-button">ATC广播</div></el-col> <el-col :span="5"><div class="broadcast-atc-button">ATC广播</div></el-col>
<el-col :span="3"><div class="broadcast-use-button" :style="{color: enableAreaList.includes('站厅')? '#2EFF74':'#CDCDCD'}">{{this.enableAreaList.includes('站厅')? '启用':'未启用'}}</div></el-col> <el-col :span="3"><div v-if="checkHasDevice('LCD')" class="broadcast-use-button" :style="{color: enableAreaList.includes('LCD')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('LCD')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div class="broadcast-use-button" :style="{color: enableAreaList.includes('上行站台')? '#2EFF74':'#CDCDCD'}">{{this.enableAreaList.includes('上行站台')? '启用':'未启用'}}</div></el-col> <el-col :span="3"><div v-if="checkHasDevice('UP_STAND')" class="broadcast-use-button" :style="{color: enableAreaList.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('UP_STAND')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div class="broadcast-use-button" :style="{color: enableAreaList.includes('下行站台')? '#2EFF74':'#CDCDCD'}">{{this.enableAreaList.includes('下行站台')? '启用':'未启用'}}</div></el-col> <el-col :span="3"><div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-use-button" :style="{color: enableAreaList.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('DOWN_STAND')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div class="broadcast-use-button" :style="{color: enableAreaList.includes('办公区')? '#2EFF74':'#CDCDCD'}">{{this.enableAreaList.includes('办公区')? '启用':'未启用'}}</div></el-col> <el-col :span="3"><div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-use-button" :style="{color: enableAreaList.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('ADMINISTRATIVE_AREA')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div class="broadcast-use-button" :style="{color: enableAreaList.includes('出入口')? '#2EFF74':'#CDCDCD'}">{{this.enableAreaList.includes('出入口')? '启用':'未启用'}}</div></el-col> <el-col :span="3"><div v-if="checkHasDevice('GATE')" class="broadcast-use-button" :style="{color: enableAreaList.includes('GATE')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('GATE')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div class="broadcast-use-button" :style="{color: enableAreaList.includes('换乘通道')? '#2EFF74':'#CDCDCD'}">{{this.enableAreaList.includes('换乘通道')? '启用':'未启用'}}</div></el-col> <el-col :span="3"><div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-use-button" :style="{color: enableAreaList.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('TRANSFER_CHANNEL')? '启用':'未启用' }}</div></el-col>
</el-row> </el-row>
</div> </div>
<div class="pre-taped-broadcast"> <div class="pre-taped-broadcast">
@ -70,23 +70,31 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="2"> <el-col :span="2">
<div class="broadcast-mode-button" style="left: 5%;width: 80px;top: 20px;" @click="selectedVideoMode('common')"> <div class="broadcast-mode-button" style="left: 5%;width: 80px;top: 20px;" @click="selectedVideoMode('RECORDING')">
<div class="pa-check-box" :style="{background: videoMode === 'common'? '#2EFF74': '#CDCDCD'}"/> <div class="pa-check-box" :style="{background: videoMode === 'RECORDING'? '#2EFF74': '#CDCDCD'}" />
<div style="position: relative; left: 1px;display: inline-block;">普通预录</div> <div style="position: relative; left: 1px;display: inline-block;">普通预录</div>
</div> </div>
<div class="broadcast-mode-button" style="left: 5%;width: 80px;margin-top: 15px" @click="selectedVideoMode('emergency')"> <div class="broadcast-mode-button" style="left: 5%;width: 80px;margin-top: 15px" @click="selectedVideoMode('EMERGENCY_RECORDING')">
<div class="pa-check-box" :style="{background: videoMode === 'emergency'? '#2EFF74': '#CDCDCD'}"/> <div class="pa-check-box" :style="{background: videoMode === 'EMERGENCY_RECORDING'? '#2EFF74': '#CDCDCD'}" />
<div style="position: relative; left: 1px;display: inline-block;">紧急预录</div> <div style="position: relative; left: 1px;display: inline-block;">紧急预录</div>
</div> </div>
<div class="broadcast-mode-button" style="left: 5%;width: 80px;margin-top: 30px"> <div class="broadcast-mode-button" style="left: 5%;width: 80px;margin-top: 30px">
<div style="position: relative; left: 1px;display: inline-block;">播放</div> <div style="position: relative; left: 1px;display: inline-block;" @click="releaseBroadcast">播放</div>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div> <div>
<div class="information-description">信息描述</div> <div class="information-description">信息描述</div>
<div style="overflow-y: auto;height: 150px;background: #fff;"> <div style="overflow-y: auto;height: 150px;background: #fff;">
<div :key="index" v-for="(item,index) in message" class="information-description-box">{{ item }}</div> <div
v-for="(item,index) in resourcesList"
:key="index"
:style="{background: messageIndex === index? '#4169cc':'#fff'}"
class="information-description-box"
@click="chooseMessage(index)"
>
{{ item.name }}
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -94,76 +102,76 @@
<div> <div>
<div class="information-description">广播内容</div> <div class="information-description">广播内容</div>
<div style="overflow-y: auto;height: 150px;background: #fff;"> <div style="overflow-y: auto;height: 150px;background: #fff;">
<div :key="index" v-for="(item,index) in broadcast" class="broadcast-content">{{ item }}</div> <div class="broadcast-content">{{ resourcesList[messageIndex] ? resourcesList[messageIndex].desc: '' }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="time-control-pa-home"> <!--<div class="time-control-pa-home">-->
<el-row :gutter="50"> <!--<el-row :gutter="50">-->
<el-col :span="2"> <!--<el-col :span="2">-->
<div class="time-control-button">时间控制</div> <!--<div class="time-control-button">时间控制</div>-->
</el-col> <!--</el-col>-->
<el-col :span="20"> <!--<el-col :span="20">-->
<el-row :gutter="20" style="margin-top: 5px; font-size: 13px"> <!--<el-row :gutter="20" style="margin-top: 5px; font-size: 13px">-->
<el-col :span="2"> <!--<el-col :span="2">-->
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">排定描述</div> <!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">排定描述</div>-->
</el-col> <!--</el-col>-->
<el-col :span="22"> <!--<el-col :span="22">-->
<el-input v-model="addModel.scheduledDescribe" size="mini" style="width: 100%" /></el-col> <!--<el-input v-model="addModel.scheduledDescribe" size="mini" style="width: 100%" /></el-col>-->
</el-row> <!--</el-row>-->
<el-row style="margin-top: 5px; font-size: 13px"> <!--<el-row style="margin-top: 5px; font-size: 13px">-->
<el-col :span="2"> <!--<el-col :span="2">-->
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">开始时间</div> <!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">开始时间</div>-->
</el-col> <!--</el-col>-->
<el-col :span="5"> <!--<el-col :span="5">-->
<el-date-picker <!--<el-date-picker-->
v-model="addModel.startTime" <!--v-model="addModel.startTime"-->
type="datetime" <!--type="datetime"-->
placeholder="选择日期时间" <!--placeholder="选择日期时间"-->
size="mini" <!--size="mini"-->
/> <!--/>-->
</el-col> <!--</el-col>-->
<el-col :span="2"> <!--<el-col :span="2">-->
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">结束时间</div> <!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">结束时间</div>-->
</el-col> <!--</el-col>-->
<el-col :span="5"> <!--<el-col :span="5">-->
<el-date-picker <!--<el-date-picker-->
v-model="addModel.endTime" <!--v-model="addModel.endTime"-->
type="datetime" <!--type="datetime"-->
placeholder="选择日期时间" <!--placeholder="选择日期时间"-->
size="mini" <!--size="mini"-->
/> <!--/>-->
</el-col> <!--</el-col>-->
<el-col :span="2"> <!--<el-col :span="2">-->
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">延时时间</div> <!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">延时时间</div>-->
</el-col> <!--</el-col>-->
<el-col :span="5"> <!--<el-col :span="5">-->
<el-time-picker <!--<el-time-picker-->
v-model="addModel.delayTime" <!--v-model="addModel.delayTime"-->
placeholder="选择时间" <!--placeholder="选择时间"-->
size="mini" <!--size="mini"-->
/> <!--/>-->
</el-col> <!--</el-col>-->
<el-col :span="1"> <!--<el-col :span="1">-->
<div class="time-control-button-small">今日</div> <!--<div class="time-control-button-small">今日</div>-->
</el-col> <!--</el-col>-->
<el-col :span="1"> <!--<el-col :span="1">-->
<div class="time-control-button-small">一次</div> <!--<div class="time-control-button-small">一次</div>-->
</el-col> <!--</el-col>-->
<el-col :span="1"> <!--<el-col :span="1">-->
<div class="time-control-button-small" style="width: 43px;">无截</div> <!--<div class="time-control-button-small" style="width: 43px;">无截</div>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
</el-col> <!--</el-col>-->
<el-col :span="2"> <!--<el-col :span="2">-->
<div class="time-control-button-small" style="height: 50px;width: 50px; position: relative;top: 10px;right: 30px;line-height: 14px;padding-top: 10px;padding-left: 10px">设定<br>确认</div> <!--<div class="time-control-button-small" style="height: 50px;width: 50px; position: relative;top: 10px;right: 30px;line-height: 14px;padding-top: 10px;padding-left: 10px">设定<br>确认</div>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
</div> <!--</div>-->
<div class="pa-grey-box" /> <div class="pa-grey-box" />
<div style="position: absolute; left: 73%; top: 70%;width: 13%;height: 30%;font-size: 12px;color: #fff;"><state-table /></div> <div style="position: absolute; left: 73%; top: 67%;width: 13%;height: 30%;font-size: 12px;color: #fff;"><state-table /></div>
<div class="broadcast-mode"> <div class="broadcast-mode">
<el-row> <el-row>
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col> <el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col>
@ -173,7 +181,7 @@
<div class="broadcast-mode" style="top: 25%;"> <div class="broadcast-mode" style="top: 25%;">
<el-row> <el-row>
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">广播中断</div></el-col> <el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">广播中断</div></el-col>
<el-col :span="12"><div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;">广播停止</div></el-col> <el-col :span="12"><div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;" @click="stopBroadcast">广播停止</div></el-col>
</el-row> </el-row>
</div> </div>
<div class="broadcast-mode" style="top: 31%;"> <div class="broadcast-mode" style="top: 31%;">
@ -195,16 +203,22 @@
<el-row> <el-row>
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;line-height: 80px">背景音乐</div></el-col> <el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;line-height: 80px">背景音乐</div></el-col>
<el-col :span="12"> <el-col :span="12">
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;">播放音乐</div> <div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;" @click="playBgm">播放音乐</div>
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%; margin-top: 5px">停止音乐</div> <div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%; margin-top: 5px" @click="stopBgm">停止音乐</div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<audio id="voice" controls style="width: 0;height: 0;" />
</div> </div>
</template> </template>
<script> <script>
import StateTable from './stateTable'; import StateTable from './stateTable';
import { queryIscsDeviceCod } from '@/api/iscs';
import { queryIscsResourcesByGroup } from '@/api/simulation';
import { sendCommandNew } from '@/api/jmap/training';
import { getToken } from '@/utils/auth';
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
export default { export default {
name: 'StationHome', name: 'StationHome',
components: { components: {
@ -212,8 +226,6 @@ export default {
}, },
data() { data() {
return { return {
message: ['mes1', 'mes2', 'mes3', 'mes4', 'mes5', 'mes6', 'mes7', 'mes8', 'mes9', '站台有乘客越出X色安全线站台乘客请返回安前线内'],
broadcast: ['各位乘客为了您和他人的安全,请勿手扶屏蔽门、排队候车,多谢合作!'],
addModel: { addModel: {
scheduledDescribe: '', scheduledDescribe: '',
startTime: '', startTime: '',
@ -221,15 +233,277 @@ export default {
delayTime: '' delayTime: ''
}, },
enableAreaList: [], enableAreaList: [],
videoMode: 'common' bgmResources: '',
videoMode: 'RECORDING',
messageIndex: 0,
resourcesList: [],
iscsDeviceMap: {},
iscsDeviceList: [],
iscsDeviceState: {},
deviceMap: {}
}; };
}, },
watch: {
'$route.query.stationId': function () {
const params2 = { mapId: this.$route.query.mapId, system: 'PA', station: this.$route.query.stationId };
queryIscsDeviceCod(params2).then(resp => {
this.iscsDeviceList = resp.data;
this.iscsDeviceList.forEach(device => {
this.$set(device, 'state', this.iscsDeviceState[device.code] ? this.iscsDeviceState[device.code].state : '0');
this.iscsDeviceMap[device.code] = device;
const div = document.getElementById(device.position);
if (div) {
switch (device.state) {
case '0':
div.style.background = '#CCCCCC';
break;
case '1':
div.style.background = '#FF0000';
break;
case '2':
div.style.background = '#880000';
break;
case '3':
div.style.background = '#0000FF';
break;
case '4':
div.style.background = '#554488';
break;
case '5':
div.style.background = '#44CC55';
break;
case '6':
div.style.background = '#FF00FF';
break;
case '7':
div.style.background = '#887711';
break;
case '8':
div.style.background = '#006600';
break;
case '9':
div.style.background = '#778877';
break;
case '10':
div.style.background = '#555454';
break;
case '11':
div.style.background = '#556688';
break;
case '12':
div.style.background = '#887711';
break;
case '13':
div.style.background = '#115577';
break;
case '♬':
div.style.background = '';
break;
}
}
});
});
},
'$store.state.socket.iscsStatePaMessages': function (list) {
if (list && list.length) {
list.forEach(item => {
if (this.iscsDeviceState[item.code]) {
this.iscsDeviceState[item.code] = { ...this.iscsDeviceState[item.code], ...item };
} else {
this.iscsDeviceState[item.code] = item;
}
const device = this.iscsDeviceMap[item.code];
if (device) {
this.$set(this.deviceMap[device.position], 'state', item.state);
const div = document.getElementById(device.position);
if (div) {
switch (item.state) {
case '0':
div.style.background = '#CCCCCC';
break;
case '1':
div.style.background = '#FF0000';
break;
case '2':
div.style.background = '#880000';
break;
case '3':
div.style.background = '#0000FF';
break;
case '4':
div.style.background = '#554488';
break;
case '5':
div.style.background = '#44CC55';
break;
case '6':
div.style.background = '#FF00FF';
break;
case '7':
div.style.background = '#887711';
break;
case '8':
div.style.background = '#006600';
break;
case '9':
div.style.background = '#778877';
break;
case '10':
div.style.background = '#555454';
break;
case '11':
div.style.background = '#556688';
break;
case '12':
div.style.background = '#887711';
break;
case '13':
div.style.background = '#115577';
break;
case '♬':
div.style.background = '';
break;
}
}
}
});
}
}
},
created() {
const params = { system: 'PA', type: 'BGM' };
queryIscsResourcesByGroup( this.$route.query.group, params).then(resp => {
this.bgmResources = resp.data && resp.data[0] ? resp.data[0].resources : [];
}).catch( () => {
this.$message.error('获取广播资源列表失败!');
} );
const params2 = { mapId: this.$route.query.mapId, system: 'PA', station: this.$route.query.stationId };
queryIscsDeviceCod(params2).then(resp => {
this.iscsDeviceList = resp.data;
this.iscsDeviceList.forEach(device => {
this.$set(device, 'state', '0');
this.iscsDeviceMap[device.code] = device;
});
this.subscribe();
});
this.getResourcesList();
},
beforeDestroy() {
this.clearSubscribe();
},
methods: { methods: {
chooseMessage(index) {
this.messageIndex = index;
},
checkHasDevice(position) {
const device = this.iscsDeviceList.find(item => item.position === position);
this.deviceMap[position] = device;
return !!device;
},
getResourcesList() {
const params = { system: 'PA', type: this.videoMode };
queryIscsResourcesByGroup( this.$route.query.group, params).then(resp => {
this.resourcesList = resp.data && resp.data[0] ? resp.data[0].resources : [];
console.log(resp.data, this.resourcesList);
}).catch( () => {
this.$message.error('获取广播资源列表失败!');
} );
},
selecteAllArea() { selecteAllArea() {
if (this.enableAreaList.length === 7) { if (this.enableAreaList.length === 6) {
this.enableAreaList = []; this.enableAreaList = [];
} else { } else {
this.enableAreaList = ['车站', '站厅', '上行站台', '下行站台', '办公区', '出入口', '换乘通道']; this.enableAreaList = ['LCD', 'UP_STAND', 'DOWN_STAND', 'ADMINISTRATIVE_AREA', 'GATE', 'TRANSFER_CHANNEL'];
}
},
playBgm() {
const iscsDeviceCodes = [];
this.enableAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择需要发布广播的设备');
return;
}
if (this.bgmResources && this.bgmResources[0]) {
const params = {
resourceId: this.bgmResources[0].id,
iscsDeviceCodes: iscsDeviceCodes,
type: 'BGM'
};
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(resp => {
const bgmUrl = this.$store.state.user.resourcesUrl + this.bgmResources[0].url;
const audio = document.getElementById('voice');
audio.src = bgmUrl;
audio.play();
}).catch(() => {
this.$message.error('背景音乐播放失败!');
});
}
},
stopBgm() {
const iscsDeviceCodes = [];
this.enableAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
const audio = document.getElementById('voice');
audio.pause();
}).catch(() => {
this.$message.error('背景音乐终止播放失败!');
});
},
stopBroadcast() {
const iscsDeviceCodes = [];
this.enableAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
const audio = document.getElementById('voice');
audio.pause();
}).catch(() => {
this.$message.error('广播终止播放失败!');
});
},
releaseBroadcast() {
const iscsDeviceCodes = [];
this.enableAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
if (this.resourcesList[this.messageIndex]) {
const params = {
resourceId: this.resourcesList[this.messageIndex].id,
iscsDeviceCodes: iscsDeviceCodes,
type: this.videoMode
};
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(resp => {
this.voiceUrl = this.$store.state.user.resourcesUrl + this.resourcesList[this.messageIndex].url;
const audio = document.getElementById('voice');
audio.src = this.voiceUrl;
audio.play();
}).catch(() => {
this.$message.error('发布广播失败!');
});
} }
}, },
selectedArea(area) { selectedArea(area) {
@ -242,6 +516,16 @@ export default {
}, },
selectedVideoMode(mode) { selectedVideoMode(mode) {
this.videoMode = mode; this.videoMode = mode;
this.getResourcesList();
},
subscribe() {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(getTopic('ISCSPA', this.$route.query.group ), header);
this.$store.dispatch('app/animationsClose');
},
clearSubscribe() {
clearSubscribe(getTopic('ISCSPA', this.$route.query.group));
} }
} }
}; };
@ -268,13 +552,13 @@ export default {
top: 13px; top: 13px;
width: 50px; width: 50px;
left: 30%; left: 30%;
cursor: pointer;
font-size: 13px; font-size: 13px;
line-height: 28px; line-height: 28px;
border-top: 2px solid #fff; border-top: 2px solid #fff;
border-left: 2px solid #fff; border-left: 2px solid #fff;
border-right: 2px solid #454541; border-right: 2px solid #454541;
border-bottom: 2px solid #454541; border-bottom: 2px solid #454541;
cursor: default;
&.active, &.active,
&:hover{ &:hover{
background: #EBB570; background: #EBB570;
@ -286,6 +570,7 @@ export default {
} }
.pa-check-box{ .pa-check-box{
position: relative; position: relative;
left: 2px;
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 12px; height: 12px;
@ -353,6 +638,7 @@ export default {
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
text-overflow:ellipsis; text-overflow:ellipsis;
cursor: pointer;
} }
.broadcast-content{ .broadcast-content{
border-bottom: 1px solid #ECECEC; border-bottom: 1px solid #ECECEC;
@ -366,7 +652,7 @@ export default {
} }
.time-control-pa-home{ .time-control-pa-home{
position: absolute; position: absolute;
top: 63%; top: 65%;
left: 12%; left: 12%;
width: 60%; width: 60%;
} }
@ -417,7 +703,7 @@ export default {
.pa-grey-box{ .pa-grey-box{
position: absolute; position: absolute;
left: 12%; left: 12%;
top: 71%; top: 70%;
width: 60%; width: 60%;
height: 18%; height: 18%;
background: #DDDDDD; background: #DDDDDD;
@ -437,6 +723,13 @@ export default {
width: 13%; width: 13%;
font-size: 12px; font-size: 12px;
} }
.pa-state-box{
position: relative;
left: 30px;
display: inline-block;
color: #000;
width: 20px;
}
</style> </style>
<style> <style>
.time-control-pa-home .el-date-editor.el-input, .el-date-editor.el-input__inner{ .time-control-pa-home .el-date-editor.el-input, .el-date-editor.el-input__inner{

View File

@ -1,47 +1,63 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:visible.sync="visible" :visible.sync="visible"
width="600px" width="600px"
:before-close="doClose" :before-close="doClose"
class="iscs-voice-broadcast-dialog" class="iscs-voice-broadcast-dialog"
> >
<div> <div>
<div class="dialog-header">语音广播</div> <div class="dialog-header">语音广播</div>
<div class="secondary-title">信息描述</div> <div class="secondary-title">信息描述</div>
<div class="information-description-box"> <div class="information-description-box">
<div v-for="(item,index) in message" :key="index"> <div v-for="(item,index) in resourcesList" :key="index">
<div class="information-box">{{item}}</div> <div class="information-box" :style="{background: messageIndex === index? '#4169cc': '#DCDCDC' }" @click="chooseMessage(index)">{{ item.name }}</div>
</div>
</div>
<div class="secondary-title" style="margin-top: 10px">信息内容显示</div>
<div class="information-context-box">站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类</div>
<div class="release-button" @click="releaseBroadcast">发布</div>
</div> </div>
</el-dialog> </div>
<div class="secondary-title" style="margin-top: 10px">信息内容显示</div>
<div class="information-context-box">{{ resourcesList.length? resourcesList[messageIndex].desc: '' }}</div>
<div class="release-button" @click="releaseBroadcast">发布</div>
</div>
</el-dialog>
</template> </template>
<script> <script>
export default { export default {
name: 'VoiceBroadcast', name: 'VoiceBroadcast',
props: {
resourcesList: {
type: Array,
default: function () {
return [];
}
}
},
data() { data() {
return { return {
visible: false, visible: false,
message: ['mes1', 'mes2', 'mes3', 'mes4', 'mes5', 'mes6', 'mes7', 'mes8', 'mes9', '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线站台乘客请返回安前线内'] messageIndex: 0
}; };
}, },
methods:{ methods:{
doClose() { doClose() {
this.visible = false; this.visible = false;
}, },
chooseMessage(index) {
this.messageIndex = index;
},
doShow() { doShow() {
this.messageIndex = 0;
this.visible = true; this.visible = true;
}, },
releaseBroadcast() { releaseBroadcast() {
this.visible = false; this.visible = false;
this.messageIndex = 0;
if (this.resourcesList[this.messageIndex]) {
this.$emit('releaseBroadcast', this.resourcesList[this.messageIndex]);
}
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
@ -62,6 +78,7 @@ export default {
white-space: nowrap; white-space: nowrap;
background: #DCDCDC; background: #DCDCDC;
margin-top: 2px; margin-top: 2px;
cursor: pointer;
} }
.secondary-title{ .secondary-title{
text-align: center; text-align: center;

View File

@ -9,19 +9,25 @@
<div> <div>
<div class="dialog-header">信息广播</div> <div class="dialog-header">信息广播</div>
<div class="iscs-pis-dialog-info"> <div class="iscs-pis-dialog-info">
<el-radio-group v-model="addModel.infoType"> <el-radio-group v-model="addModel.infoType" @change="getResourcesList">
<el-radio label="realTime">实时信息</el-radio> <el-radio label="REAL_TIME">实时信息</el-radio>
<el-radio label="common">普通信息</el-radio> <el-radio label="RECORDING">普通信息</el-radio>
<el-radio label="emergency" class="iscs-pis-dialog-emergencyInfo">紧急信息</el-radio> <el-radio label="EMERGENCY_RECORDING" class="iscs-pis-dialog-emergencyInfo">紧急信息</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-show="addModel.infoType !== 'realTime'" class="secondary-title">{{ this.message[this.addModel.infoType].title }}</div> <div v-show="addModel.infoType !== 'REAL_TIME'" class="secondary-title">{{ this.message[this.addModel.infoType].title }}</div>
<div v-show="addModel.infoType !== 'realTime'" class="information-description-box"> <div v-show="addModel.infoType !== 'REAL_TIME'" class="information-description-box">
<div v-for="(item,index) in message[addModel.infoType].infoList" :key="index"> <div v-for="(item,index) in resourcesList" :key="index">
<div class="information-box">{{ item.title }}</div> <div
class="information-box"
:style="{ background: index == resourceIndex? '#4169cc': '#DCDCDC' }"
@click="chooseResources(item, index)"
>
{{ item.name }}
</div>
</div> </div>
</div> </div>
<div v-show="addModel.infoType === 'realTime'"> <div v-show="addModel.infoType === 'REAL_TIME'">
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<div> <div>
@ -45,20 +51,26 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div style="margin-top: 10px"> <div v-show="addModel.infoType === 'REAL_TIME'" style="margin-top: 10px">
<div style="display: inline;">名称</div> <div style="display: inline;">名称</div>
<input v-model="addModel.infoTitle" class="pis-dialog-input" style="width: 550px;"> <input v-model="addModel.infoTitle" class="pis-dialog-input" style="width: 550px;">
<input v-show="addModel.infoType !== 'emergency'" v-model="addModel.infoTime" class="pis-dialog-input" style="width: 140px;"> <!--<input v-model="addModel.infoTime" class="pis-dialog-input" style="width: 140px;">-->
<div v-show="addModel.infoType !== 'emergency'" style="display: inline;"></div> <!--<div style="display: inline;"></div>-->
</div> </div>
<div v-show="addModel.infoType !== 'realTime'" class="secondary-title" style="margin-top: 10px">{{ this.message[this.addModel.infoType].title + '内容显示' }}</div> <div v-show="addModel.infoType !== 'REAL_TIME'" style="margin-top: 10px">
<div v-show="addModel.infoType !== 'realTime'" class="information-context-box">站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类</div> <div style="display: inline;">名称</div>
<div v-show="addModel.infoType === 'realTime'" class="information-description-box" style="margin-top: 15px;"> <input v-model="resource.name" class="pis-dialog-input" style="width: 550px;">
<!--<input v-model="addModel.infoTime" class="pis-dialog-input" style="width: 140px;">-->
<!--<div style="display: inline;"></div>-->
</div>
<div v-show="addModel.infoType !== 'REAL_TIME'" class="secondary-title" style="margin-top: 10px">{{ addModel.infoType === 'RECORDING'? '普通信息内容显示': '紧急信息内容显示' }}</div>
<div v-show="addModel.infoType !== 'REAL_TIME'" class="information-context-box">{{ resource.desc }}</div>
<div v-show="addModel.infoType === 'REAL_TIME'" class="information-description-box" style="margin-top: 15px;">
<el-row> <el-row>
<el-col :span="6" style="border-right:2px solid #898888; min-height: 100px"> <el-col :span="6" style="border-right:2px solid #898888; min-height: 100px">
<div v-for="(item,index) in message[addModel.infoType].infoList" :key="index"> <!--<div v-for="(item,index) in resourcesList" :key="index">-->
<div class="information-box" @click="selectedRealTimeInfo(item)">{{ item.title }}</div> <!--<div class="information-box" @click="selectedRealTimeInfo(item)">{{ item.name }}</div>-->
</div> <!--</div>-->
</el-col> </el-col>
<el-col> <el-col>
<div>{{ showRealTimeInfo }}</div> <div>{{ showRealTimeInfo }}</div>
@ -66,119 +78,122 @@
</el-row> </el-row>
</div> </div>
<div class="button-group"> <div class="button-group">
<el-select v-show="addModel.infoType === 'realTime'" v-model="value" placeholder="信息选择" size="mini"> <!--<el-select v-show="addModel.infoType === 'REAL_TIME'" v-model="value" :disabled="true" placeholder="信息选择" size="mini">-->
<el-option <!--<el-option-->
v-for="item in infoList" <!--v-for="item in infoList"-->
:key="item.value" <!--:key="item.value"-->
:label="item.label" <!--:label="item.label"-->
:value="item.value" <!--:value="item.value"-->
/> <!--/>-->
</el-select> <!--</el-select>-->
<div v-show="addModel.infoType === 'realTime'" class="pis-button">储存</div> <!--<div v-show="addModel.infoType === 'REAL_TIME'" class="pis-button">储存</div>-->
<div class="button-group-content" :style="{left: addModel.infoType ==='realTime'?'300px':'550px'}"> <div class="button-group-content" :style="{left: addModel.infoType ==='REAL_TIME'?'300px':'550px'}">
<div class="pis-button">设定中</div> <div class="pis-button">设定中</div>
<div class="pis-button" @click="releaseBroadcast">发布</div> <div class="pis-button" @click="releaseBroadcast">发布</div>
<div class="pis-button">取消</div> <div class="pis-button">取消</div>
</div> </div>
</div> </div>
<div class="pis-dialog-form-box"> <!--<div class="pis-dialog-form-box">-->
<el-form ref="form" :model="form" label-width="95px"> <!--<el-form ref="form" :model="form" label-width="95px">-->
<el-row> <!--<el-row>-->
<el-col :span="3"> <!--<el-col :span="3">-->
<div class="pis-button" style="position: relative; top: 10px;left: 5px; padding: 7px 10px ;">导入描述</div> <!--<div class="pis-button" style="position: relative; top: 10px;left: 5px; padding: 7px 10px ;">导入描述</div>-->
</el-col> <!--</el-col>-->
<el-col :span="21"> <!--<el-col :span="21">-->
<el-form-item prop="description" label-width="0"> <!--<el-form-item prop="description" label-width="0">-->
<input v-model="form.description" style="width:600px;"> <!--<input v-model="form.description" style="width:600px;">-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
<el-row> <!--<el-row>-->
<el-col :span="21"> <!--<el-col :span="21">-->
<el-row> <!--<el-row>-->
<el-col :span="12"> <!--<el-col :span="12">-->
<el-form-item prop="startDate" label="开始日期"> <!--<el-form-item prop="startDate" label="开始日期">-->
<el-date-picker <!--<el-date-picker-->
v-model="form.startDate" <!--v-model="form.startDate"-->
type="date" <!--type="date"-->
size="mini" <!--size="mini"-->
placeholder="选择日期" <!--placeholder="选择日期"-->
/> <!--/>-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
<el-col :span="12"> <!--<el-col :span="12">-->
<el-form-item prop="endTime" label="结束时间"> <!--<el-form-item prop="endTime" label="结束时间">-->
<el-time-picker <!--<el-time-picker-->
v-model="form.endTime" <!--v-model="form.endTime"-->
arrow-control <!--arrow-control-->
size="mini" <!--size="mini"-->
placeholder="选择时间" <!--placeholder="选择时间"-->
/> <!--/>-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
<el-row> <!--<el-row>-->
<el-col :span="12"> <!--<el-col :span="12">-->
<el-form-item prop="startTime" label="开始时间"> <!--<el-form-item prop="startTime" label="开始时间">-->
<el-time-picker <!--<el-time-picker-->
v-model="form.startTime" <!--v-model="form.startTime"-->
arrow-control <!--arrow-control-->
size="mini" <!--size="mini"-->
placeholder="选择时间" <!--placeholder="选择时间"-->
/> <!--/>-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
<el-col :span="12"> <!--<el-col :span="12">-->
<el-form-item prop="endDate" label="结束日期"> <!--<el-form-item prop="endDate" label="结束日期">-->
<el-date-picker <!--<el-date-picker-->
v-model="form.endDate" <!--v-model="form.endDate"-->
type="date" <!--type="date"-->
size="mini" <!--size="mini"-->
placeholder="选择日期" <!--placeholder="选择日期"-->
/> <!--/>-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
<el-row> <!--<el-row>-->
<el-col :span="12"> <!--<el-col :span="12">-->
<el-form-item prop="durationTime" label="延续时间"> <!--<el-form-item prop="durationTime" label="延续时间">-->
<el-time-picker <!--<el-time-picker-->
v-model="form.durationTime" <!--v-model="form.durationTime"-->
arrow-control <!--arrow-control-->
size="mini" <!--size="mini"-->
placeholder="选择时间" <!--placeholder="选择时间"-->
/> <!--/>-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
<el-col :span="12"> <!--<el-col :span="12">-->
<div style="text-align: center;padding-top: 10px;"> <!--<div style="text-align: center;padding-top: 10px;">-->
<div class="pis-button">今日</div> <!--<div class="pis-button">今日</div>-->
<div class="pis-button">一次</div> <!--<div class="pis-button">一次</div>-->
<div class="pis-button">无截止</div> <!--<div class="pis-button">无截止</div>-->
</div> <!--</div>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
</el-col> <!--</el-col>-->
<el-col :span="3"> <!--<el-col :span="3">-->
<div class="each_operate_button">排定<br>确认</div> <!--<div class="each_operate_button">排定<br>确认</div>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
</el-form> <!--</el-form>-->
</div> <!--</div>-->
</div> <!--</div>-->
</el-dialog> </div></el-dialog>
</template> </template>
<script> <script>
import { queryIscsResourcesByGroup } from '@/api/simulation';
export default { export default {
name: 'VoiceBroadcast', name: 'VoiceBroadcast',
data() { data() {
return { return {
visible: false, visible: false,
value: '', value: '',
resourcesList: [],
resourceIndex: 0,
resource: {},
addModel: { addModel: {
infoType: 'common', infoType: 'RECORDING',
infoTitle: '', infoTitle: '',
infoTime: '', infoTime: '',
infoContent: '', infoContent: '',
@ -195,105 +210,17 @@ export default {
infoList: [], infoList: [],
showRealTimeInfo: '', showRealTimeInfo: '',
message: { message: {
realTime: { REAL_TIME: {
title: '实时信息', title: '实时信息',
infoList:[ infoList:[]
{
title: 'mes1实时信息',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes2',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes3',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes4',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes5',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes6',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes7',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
}
]
}, },
common: { RECORDING: {
title: '普通信息', title: '普通信息',
infoList:[ infoList:[]
{
title: 'mes1普通信息',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes2',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes3',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes4',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes5',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
}
]
}, },
emergency: { EMERGENCY_RECORDING: {
title: '紧急信息', title: '紧急信息',
infoList:[ infoList:[]
{
title: '紧急信息',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes2',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes3',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes4',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
},
{
title: 'mes5',
content: '站台有乘客越出X色安全线站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类',
time: 1
}
]
} }
} }
}; };
@ -307,12 +234,43 @@ export default {
}, },
doShow() { doShow() {
this.visible = true; this.visible = true;
this.getResourcesList();
}, },
releaseBroadcast() { releaseBroadcast() {
this.visible = false; this.visible = false;
if (this.addModel.infoType === 'REAL_TIME') {
if (!this.addModel.infoTitle) {
this.$message.error('请输入实时信息标题!');
} else if (!this.addModel.infoContent) {
this.$message.error('请输入实时信息内容!');
} else {
this.$emit('releaseBroadcast', {name: this.addModel.infoTitle, content: this.addModel.infoContent }, this.addModel.infoType);
this.addModel.infoContent = '';
this.addModel.infoTitle = '';
}
} else if (this.resource) {
this.$emit('releaseBroadcast', this.resource, this.addModel.infoType);
}
}, },
selectedRealTimeInfo(item) { selectedRealTimeInfo(item) {
this.showRealTimeInfo = item.content; this.showRealTimeInfo = item.content;
},
chooseResources(item, index) {
this.resource = item;
this.resourceIndex = index;
},
getResourcesList() {
if (this.addModel.infoType === 'REAL_TIME') {
return;
}
const params = { system: 'PIS', type: this.addModel.infoType };
queryIscsResourcesByGroup( this.$route.query.group, params).then(resp => {
this.resourceIndex = 0;
this.resourcesList = resp.data && resp.data[0] ? resp.data[0].resources : [];
this.resource = this.resourcesList[0] ? this.resourcesList[0] : {};
}).catch( () => {
this.$message.error('获取广播资源列表失败!');
} );
} }
} }
}; };
@ -344,6 +302,7 @@ export default {
white-space: nowrap; white-space: nowrap;
background: #DCDCDC; background: #DCDCDC;
margin-top: 2px; margin-top: 2px;
cursor: pointer;
} }
.secondary-title{ .secondary-title{
text-align: center; text-align: center;

View File

@ -6,16 +6,6 @@
<div class="main_screen_content"> <div class="main_screen_content">
<div class="screen_left"> <div class="screen_left">
<div class="screen_left_tab">特定区域</div> <div class="screen_left_tab">特定区域</div>
<!-- <div class="sceen_left_content">
<div class="screen_operate_name" @click="selectedAllLine">全线</div>
<div class="screen_operate_name" @click="selectedAreaBatch(0)">全站厅(LCD)</div>
<div class="screen_operate_name" @click="selectedAreaBatch(1)">全上行站台</div>
<div class="screen_operate_name" @click="selectedAreaBatch(2)">全下行站台</div>
<div class="screen_operate_name" @click="selectedAreaBatch(3)">全出入口</div>
<div class="screen_operate_name" @click="selectedAreaBatch(4)">全物业</div>
<div class="screen_operate_name" @click="selectedAreaBatch(5)">全天桥</div>
<div class="screen_operate_name" @click="selectedAreaBatch(6)">出入口(LED)</div>
</div> -->
<el-row><el-button v-for="(item, index) in verticalHeader" :key="index" class="screen_operate_name" :class="{'active': item.active}" @click="selectedBatch(item)">{{ item.title }}</el-button></el-row> <el-row><el-button v-for="(item, index) in verticalHeader" :key="index" class="screen_operate_name" :class="{'active': item.active}" @click="selectedBatch(item)">{{ item.title }}</el-button></el-row>
</div> </div>
<div class="screen_main_content"> <div class="screen_main_content">
@ -25,15 +15,16 @@
</div> </div>
<div class="screen_right_group"> <div class="screen_right_group">
<div class="screen_right_group_in"> <div class="screen_right_group_in">
<div v-for="station in stationList" :key="station.stationName" class="each_station_info"> <div v-for="station in stationList" :key="station.code" class="each_station_info">
<div class="each_data_info" @click="selectedStation(station)"> <div class="each_data_info" @click="selectedStation(station)">
<div class="screen_station_name">{{ station.stationName }}</div> <div class="screen_station_name">{{ station.stationName }}</div>
</div> </div>
<div v-if="station.children&&station.children.length>0"> <div v-if="station.children&&station.children.length>0">
<div v-for="(child,index) in station.children" :key="station.stationName+index" class="each_data_info" style="text-align: center;" @click="selectArea(station.stationName,index)"> <div v-for="(child,index) in station.children" :key="station.code+index" class="each_data_info" style="display: flex;align-items: center;justify-content: center;" @click="selectArea(station.code,index)">
<div v-if="child.status==='default'" class="button_default_content"> <div v-if="child.status==='default'" class="button_default_content">
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" /> <div class="button_default" :style="{background:selectedAreaList.includes(station.code + '-' + index)?'#2EFF74':'#CDCDCD'}" />
</div> </div>
<div :id="station.code + '-' + index" style="width: 14px;height: 14px;margin-left: 5px;" />
</div> </div>
</div> </div>
</div> </div>
@ -48,7 +39,7 @@
</div> </div>
<div class="each_operate"> <div class="each_operate">
<div class="each_operate_text">信息清除</div> <div class="each_operate_text">信息清除</div>
<div class="each_operate_button">清除<br>普通信息</div> <div class="each_operate_button" @click="stopBroadcast">清除<br>普通信息</div>
</div> </div>
</div> </div>
</div> </div>
@ -73,12 +64,17 @@
</div> </div>
</div> </div>
</div> </div>
<info-broadcast ref="infoBroadcast" /> <audio id="voice" controls style="width: 0;height: 0;" />
<info-broadcast ref="infoBroadcast" @releaseBroadcast="releaseBroadcast" />
</div> </div>
</template> </template>
<script> <script>
import { getByGroupStationList } from '@/api/jmap/map'; import { getByGroupStationList } from '@/api/jmap/map';
import { queryIscsDeviceCod } from '@/api/iscs';
import InfoBroadcast from './infoBroadcast'; import InfoBroadcast from './infoBroadcast';
import { sendCommandNew } from '@/api/jmap/training';
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
import { getToken } from '@/utils/auth';
export default { export default {
name:'MainScreen', name:'MainScreen',
components: { components: {
@ -98,40 +94,122 @@ export default {
{name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false} {name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false}
], ],
stationList:[], stationList:[],
selectedAreaList: [] selectedAreaList: [],
iscsDeviceMap: {},
deviceMap: {}
}; };
}, },
watch: {
'$store.state.socket.iscsStatePisMessages': function (list) {
if (list && list.length) {
list.forEach(item => {
const index = this.iscsDeviceMap[item.code];
if (index) {
this.$set(this.deviceMap[index], 'state', item.state);
const div = document.getElementById(index);
div.style.background = item.state === 'normal' ? '#2EFF74' : '#D4D4D4';
}
});
}
}
},
async created () { async created () {
// 线 // 线
try { try {
const positionMap = {
LCD: 0,
UP_STAND: 1,
DOWN_STAND: 2,
GATE: 3,
PROPERTY: 4,
OVERPASS1: 5,
OVERPASS2: 6,
LED:7
};
const res = await getByGroupStationList(this.$route.query.group); const res = await getByGroupStationList(this.$route.query.group);
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' });
if (res.code == 200) { if (res.code == 200) {
this.stationList = []; this.stationList = [];
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot) { if (!station.depot) {
const children = [{status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}];
if (resp.code == 200) {
resp.data && resp.data.forEach(item => {
if (station.code == item.station) {
const index = positionMap[item.position];
children[index].status = 'default';
this.iscsDeviceMap[item.code] = station.code + '-' + index;
this.deviceMap[station.code + '-' + index] = item;
}
});
}
const param = { const param = {
stationName: station.name, stationName: station.name,
children:[ code: station.code,
{status:'none'}, {status:'default'}, children:children
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
}; };
this.stationList.push(param); this.stationList.push(param);
} }
}); });
} }
this.subscribe();
} catch (e) { } catch (e) {
this.$message.error('获取车站列表失败!'); this.$message.error('获取车站列表失败!');
} }
},
beforeDestroy() {
this.clearSubscribe();
}, },
methods:{ methods:{
showInfoBrroadcast() { showInfoBrroadcast() {
this.$refs.infoBroadcast.doShow(); this.$refs.infoBroadcast.doShow();
}, },
stopBroadcast() {
const iscsDeviceCodes = [];
this.selectedAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', {iscsDeviceCodes: iscsDeviceCodes}).then(resp => {
const audio = document.getElementById('voice');
audio.pause();
}).catch(() => {
this.$message.error('广播终止播放失败!');
});
},
releaseBroadcast(voice, type) {
const iscsDeviceCodes = [];
this.selectedAreaList.forEach(item => {
if (this.deviceMap[item]) {
iscsDeviceCodes.push(this.deviceMap[item].code);
}
});
if (!iscsDeviceCodes.length) {
this.$message.error('请选择广播设备');
return;
}
const params = {
resourceId: voice.id,
iscsDeviceCodes: iscsDeviceCodes,
name: voice.name,
content: voice.content,
type
};
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params).then(resp => {
const voiceUrl = this.$store.state.user.resourcesUrl + (voice.url || resp.data);
const audio = document.getElementById('voice');
audio.src = voiceUrl;
audio.play();
}).catch(() => {
this.$message.error('发布广播失败!');
});
},
selectArea(stationName, index) { selectArea(stationName, index) {
const elem = stationName + '-' + index; const elem = stationName + '-' + index;
if (this.selectedAreaList.includes(elem)) { if (this.selectedAreaList.includes(elem)) {
@ -144,7 +222,7 @@ export default {
selectedStation(station) { selectedStation(station) {
const flag = this.checkStationSelected(station); const flag = this.checkStationSelected(station);
station.children.forEach((item, index) => { station.children.forEach((item, index) => {
const elem = station.stationName + '-' + index; const elem = station.code + '-' + index;
if (item.status === 'default' && flag) { if (item.status === 'default' && flag) {
const areaIndex = this.selectedAreaList.indexOf(elem); const areaIndex = this.selectedAreaList.indexOf(elem);
this.selectedAreaList.splice(areaIndex, 1); this.selectedAreaList.splice(areaIndex, 1);
@ -157,7 +235,7 @@ export default {
let stationSelectedFlag = true; let stationSelectedFlag = true;
station.children.some((item, index) => { station.children.some((item, index) => {
if (item.status === 'default') { if (item.status === 'default') {
stationSelectedFlag = this.selectedAreaList.includes(station.stationName + '-' + index); stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index);
return !stationSelectedFlag; return !stationSelectedFlag;
} }
}); });
@ -177,7 +255,7 @@ export default {
const flag = data.active; const flag = data.active;
this.stationList.forEach(station => { this.stationList.forEach(station => {
station.children.forEach((item, index) => { station.children.forEach((item, index) => {
const elem = station.stationName + '-' + index; const elem = station.code + '-' + index;
if (item.status == 'default' && (index + 1) == areaIndex && !flag) { if (item.status == 'default' && (index + 1) == areaIndex && !flag) {
const selectedAreaIndex = this.selectedAreaList.indexOf(elem); const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
this.selectedAreaList.splice(selectedAreaIndex, 1); this.selectedAreaList.splice(selectedAreaIndex, 1);
@ -194,10 +272,19 @@ export default {
this.stationList.forEach(station => { this.stationList.forEach(station => {
station.children.forEach((item, index) => { station.children.forEach((item, index) => {
if (item.status === 'default' && flag) { if (item.status === 'default' && flag) {
this.selectedAreaList.push(station.stationName + '-' + index); this.selectedAreaList.push(station.code + '-' + index);
} }
}); });
}); });
},
subscribe() {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(getTopic('ISCSPIS', this.$route.query.group ), header);
this.$store.dispatch('app/animationsClose');
},
clearSubscribe() {
clearSubscribe(getTopic('ISCSPIS', this.$route.query.group));
} }
} }
}; };
@ -316,7 +403,6 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
border-bottom: 2px solid #898888; border-bottom: 2px solid #898888;
} }
.button_default_content{ .button_default_content{
margin:0 auto;
height: 18px; height: 18px;
width: 18px; width: 18px;
background: #D4D4D4; background: #D4D4D4;

View File

@ -7,6 +7,13 @@
<fas v-else-if="fasList.includes(mode)" /> <fas v-else-if="fasList.includes(mode)" />
<signal-system v-else-if="mode === 'signal'" /> <signal-system v-else-if="mode === 'signal'" />
<ticket-or-entrance v-else-if="mode === 'autoTicket'||mode === 'afcTwo02'||mode === 'afcOne02'" /> <ticket-or-entrance v-else-if="mode === 'autoTicket'||mode === 'afcTwo02'||mode === 'afcOne02'" />
<broadcast-home v-else-if="mode === 'paMain'" />
<radio-listening-pa v-else-if="mode === 'paMonitor'" />
<time-preview-pa v-else-if="mode === 'paPreview'" />
<pids-emergency v-else-if="mode === 'pidsEmergency'" />
<pids-lcd v-else-if="mode === 'pidsLcd'" />
<pids-main v-else-if="mode === 'pidsMain'" />
<pids-preview v-else-if="mode === 'pidsPreview'" />
</div> </div>
</template> </template>
<script> <script>
@ -17,6 +24,13 @@ import Schedule from './schedule';
import Fas from './fas/index.vue'; import Fas from './fas/index.vue';
import SignalSystem from './signalSystem/index.vue'; import SignalSystem from './signalSystem/index.vue';
import TicketOrEntrance from './ticketOrEntrance/index'; import TicketOrEntrance from './ticketOrEntrance/index';
import BroadcastHome from '../config/broadcast/homeScreen';
import RadioListeningPa from '../config/pa/radioListeningPA';
import TimePreviewPa from '../config/pa/timePreviewPA';
import PidsEmergency from '../config/pis/emergencyRelease';
import PidsMain from '../config/pis/mainScreen';
import PidsPreview from '../config/pis/timePreview';
import PidsLcd from '../config/pis/lcdControl';
import { getSimulationInfoNew } from '@/api/simulation'; import { getSimulationInfoNew } from '@/api/simulation';
import { getByGroupStationList } from '@/api/jmap/map'; import { getByGroupStationList } from '@/api/jmap/map';
import { loadRunPlanData } from '@/utils/loaddata'; import { loadRunPlanData } from '@/utils/loaddata';
@ -28,7 +42,14 @@ export default {
Normal, Normal,
SignalSystem, SignalSystem,
Fas, Fas,
TicketOrEntrance TicketOrEntrance,
BroadcastHome,
RadioListeningPa,
TimePreviewPa,
PidsEmergency,
PidsMain,
PidsPreview,
PidsLcd
}, },
data() { data() {
return { return {

View File

@ -282,28 +282,58 @@ export default {
type: 'interface', type: 'interface',
disabled: true disabled: true
} }
]},
communication:{name:'通信', type:'totalSystem', id: 'communication', active:false, icon:iscs_icon7,
children:[
{
name: '乘客信息-主画面',
mode: 'pidsMain',
id: 'pidsMain',
type: 'interface'
},
// {
// name: '-LCD',
// mode: 'pidsLcd',
// id: 'pidsLcd',
// type: 'interface'
// },
// {
// name: '-',
// mode: 'pidsPreview',
// id: 'pidsPreview',
// type: 'interface'
// },
// {
// name: '-',
// mode: 'pidsEmergency',
// id: 'pidsEmergency',
// type: 'interface'
// },
{
name: '广播系统-主画面',
mode: 'paMain',
id: 'paMain',
type: 'interface'
}
// {
// name: '广-广',
// mode: 'paMonitor',
// id: 'paMonitor',
// type: 'interface'
// },
// {
// name: '广-',
// mode: 'paPreview',
// id: 'paPreview',
// type: 'interface'
// }
// {
// name: '',
// mode: 'cctv',
// id: 'cctv',
// type: 'interface'
// }
]} ]}
// communication:{name:'', type:'totalSystem', id: 'communication', active:false, icon:iscs_icon7,
// children:[
// {
// name: '',
// mode: 'pids',
// id: 'pids',
// type: 'interface'
// },
// {
// name: '广',
// mode: 'broadcastingSystem',
// id: 'broadcastingSystem',
// type: 'interface'
// },
// {
// name: '',
// mode: 'cctv',
// id: 'cctv',
// type: 'interface'
// }
// ]}
}, },
public:{name:'公共设施', type:'totalSystem', id: 'public', active:false, icon:iscs_icon8 }, public:{name:'公共设施', type:'totalSystem', id: 'public', active:false, icon:iscs_icon8 },
manage:{name:'管理', type:'totalSystem', id: 'manage', active:false, icon:iscs_icon9 } manage:{name:'管理', type:'totalSystem', id: 'manage', active:false, icon:iscs_icon9 }

View File

@ -318,7 +318,7 @@
}, },
initPublish(lessonId){ initPublish(lessonId){
getPublishLesson3dData(lessonId).then(data => { getPublishLesson3dData(lessonId).then(data => {
console.log(data); // console.log(data);
this.netData.name = data.data.name; this.netData.name = data.data.name;
this.netData.type = data.data.type; this.netData.type = data.data.type;
@ -337,11 +337,13 @@
userJob:"", userJob:"",
}; };
loadData = JSON.parse(data.data.data); loadData = JSON.parse(data.data.data);
if(this.$route.query.examMode == 1){
if(this.$route.query.examMode == "true"){
this.examMode = true; this.examMode = true;
}else{ }else{
this.examMode = loadData.setup.examMode; this.examMode = false;
} }
if(loadData.setup.checkedRole.length == 0){ if(loadData.setup.checkedRole.length == 0){
this.showSelectJob = false; this.showSelectJob = false;
} }
@ -447,7 +449,7 @@
this.netData.data = JSON.stringify(saveData); this.netData.data = JSON.stringify(saveData);
// console.log(); // console.log();
updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => { updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => {
console.log(data); // console.log(data);
}).catch(() => { }).catch(() => {
}); });
}, },

View File

@ -1,22 +1,40 @@
<template> <template>
<div class="jl3dmap3dMaintainer">
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
<div style="position:absolute;width:90%;left:5%;top:10%;text-align:center;font-size:60px;">
<el-row>
城市轨道交通标准化培训软件
</el-row>
<el-row v-show="activeName != 'introduce' "style="font-size:30px;">
课程模式选择:
<el-switch v-model="examMode" active-text="考试模式" inactive-text="教学模式">
</el-switch>
</el-row>
</div>
<div class="jl3dmap3dMaintainer"> <div style="width:80%;height:70%;position:absolute;left:10%;top:25%;font-size:30px">
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}"> <el-tabs v-model="activeName" type="border-card">
<div style="position:absolute;width:50%;left:25%;top:10%;text-align:center;font-size:80px;">
<el-row> <el-tab-pane label="岗位介绍" name="introduce">
城市轨道交通标准化培训软件 <div class="lesson3dSelectButton" v-for="(item1,introduceIndex) in introduce" :style="{'background-image': 'url('+localStatic+ item1.pic +')'}" @click="goDetail(item1.id)"></div>
</el-row> </el-tab-pane>
<el-row style="font-size:40px;">
课程模式选择: <el-tab-pane label="列车运行" name="treainoperation">
<el-switch <div class="lesson3dSelectButton" v-for="(item3,treainoperationIndex) in treainoperation" :style="{'background-image': 'url('+localStatic+ item3.pic +')'}" @click="goDetail(item3.id)"></div>
v-model="examMode" </el-tab-pane>
active-text="考试模式"
inactive-text="教学模式"> <el-tab-pane label="屏蔽门课程" name="dooroperation">
</el-switch> <div class="lesson3dSelectButton" v-for="(item4,dooroperationIndex) in dooroperation" :style="{'background-image': 'url('+localStatic+ item4.pic +')'}" @click="goDetail(item4.id)"></div>
</el-row> </el-tab-pane>
</div>
<div style="width:40%;height:70%;position:absolute;left:30%;top:25%;font-size:30px"> <el-tab-pane label="运营情况处理" name="stationoperation">
<el-table <div class="lesson3dSelectButton" v-for="(item2,stationoperationIndex) in stationoperation" :style="{'background-image': 'url('+localStatic+ item2.pic +')'}" @click="goDetail(item2.id)"></div>
</el-tab-pane>
</el-tabs>
<!-- <el-table
:data="lessonData" :data="lessonData"
style="width: 100%;" style="width: 100%;"
highlight-current-row highlight-current-row
@ -35,106 +53,256 @@
@click="goDetail(scope.row)">进入课程</el-button> @click="goDetail(scope.row)">进入课程</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table> -->
</div> </div>
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
<el-button style="width:200px"type="primary" @click="quit">退出</el-button> <el-button style="width:200px" type="primary" @click="quit">退出</el-button>
</el-button-group> </el-button-group>
</div> </div>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>
import {
import { getSelectLesson3dList } from '@/api/jmap/lesson3d'; getSelectLesson3dList
import { ProjectIcon } from '@/scripts/ProjectConfig'; } from '@/api/jmap/lesson3d';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; import {
ProjectIcon
} from '@/scripts/ProjectConfig';
import {
JL3D_LOCAL_STATIC
} from '@/api/jlmap3d/assets3d.js';
import bgPsdImg from '@/assets/bg_psd.png'; import bgPsdImg from '@/assets/bg_psd.png';
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg'; // import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
var train; var train;
export default { export default {
name: 'XzExam', name: 'XzExam',
components: { components: {
}, },
data() { data() {
return { return {
localStatic:JL3D_LOCAL_STATIC, localStatic: JL3D_LOCAL_STATIC,
examMode:false, activeName: 'introduce',
lessonType:'publish', examMode: false,
lessonData:[], lessonType: 'publish',
search: '', lessonData: [],
search: '',
introduce: [{
id: "17",
name: "售票员职责介绍",
pic: '/other/17.png',
},
{
id: "18",
name: "客运值班员职责介绍",
pic: '/other/18.png',
},
{
id: "19",
name: "行车值班员职责介绍",
pic: '/other/19.png',
},
{
id: "20",
name: "值班站长职责介绍",
pic: '/other/20.png',
},
{
id: "21",
name: "站长职责介绍",
pic: '/other/21.png',
},
{
id: "22",
name: "行车调度职责介",
pic: '/other/22.png',
},
{
id: "23",
name: "电力调度职责介绍",
pic: '/other/23.png',
},
{
id: "24",
name: "信息调度职责介绍",
pic: '/other/24.png',
},
{
id: "25",
name: "环控调度职责介绍",
pic: '/other/25.png',
}
],
treainoperation: [
{
id: "2",
name: "列车折返",
type: "1",
pic: '/other/2.png',
},
{
id: "4",
name: "列车出库",
type: "1",
pic: '/other/4.png',
},
{
id: "5",
name: "列车出段",
type: "1",
pic: '/other/5.png',
},
{
id: "6",
name: "列车回段",
type: "1",
pic: '/other/6.png',
},
{
id: "7",
name: "列车回库",
type: "1",
pic: '/other/7.png',
},
{
id: "26",
name: "列车运行",
type: "1",
pic: '/other/26.png',
},
{
id: "14",
name: "地铁列车救援",
type: "1",
pic: '/other/14.png',
}
],
dooroperation:[
{
id: "10",
name: "整侧屏蔽门无法开启",
pic: '/other/10.png',
},
{
id: "11",
name: "整侧屏蔽门无法关闭",
pic: '/other/11.png',
},
{
id: "12",
name: "单侧屏蔽门无法开启",
pic: '/other/12.png',
},
{
id: "13",
name: "单个屏蔽门无法关闭",
pic: '/other/13.png',
},
{
id: "9",
name: "屏蔽门",
type: "2",
pic: '/other/9.png',
},
],
stationoperation: [
{
id: "8",
name: "降级运营-电话闭塞测试",
pic: '/other/8.png',
},
{
id: "15",
name: "车站大客流test",
pic: '/other/15.png',
}
],
};
}; },
beforeDestroy() {
}, },
beforeDestroy() { created() {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
created() { mounted() {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; getSelectLesson3dList().then(response => {
}, // console.log(response);
mounted() { // this.lessonData = response.data;
getSelectLesson3dList().then(response => { }).catch(() => {});
console.log(response); },
this.lessonData = response.data; methods: {
}).catch(() => { goDetail(id) {
}); this.$router.push({
// console.log(""); path: '/design/jlmap3d/lesson3dplayer',
}, query: {
methods: { lessonId: id,
goDetail( row) { lineCode: this.$route.query.lineCode,
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: row.id,lineCode: this.$route.query.lineCode,examMode:this.examMode,lessonType:this.lessonType} }); examMode: this.examMode,
}, lessonType: this.lessonType
quit() { }
history.go(-1); });
}, },
} quit() {
history.go(-1);
},
}
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.jl3dmap3dMaintainer {
.jl3dmap3dMaintainer { position: absolute;
position:absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 35; z-index: 35;
text-align: center; text-align: center;
// color:#FFF; // color:#FFF;
} }
.jl3dmap3dMaintainerSelect{ .jl3dmap3dMaintainerSelect {
position:absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 350; z-index: 350;
top:0; top: 0;
left:0; left: 0;
// background-repeat:no-repeat; // background-repeat:no-repeat;
z-index: 350; z-index: 350;
background-size:100%; background-size: 100%;
} }
.display-draft {
.display-draft {
/* z-index: 1000; */ /* z-index: 1000; */
position: absolute; position: absolute;
width:100%; width: 100%;
text-align: center; text-align: center;
bottom: 50px; bottom: 50px;
} }
.lesson3dSelectButton{
position:relative;
width: 300px;
height: 220px;
margin: 20px;
float: left;
font-size: 50px;
line-height:150px;
background-size: 100%;
background-repeat: no-repeat;
color:#FFF;
cursor:pointer;
}
</style> </style>

View File

@ -15,7 +15,7 @@
<el-button-group> <el-button-group>
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice && $route.query.lineCode!='08'" size="small" @click="goIbp">IBP盘</el-button> <el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice && $route.query.lineCode!='08'" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice && hasBigScreen" size="small" @click="goBigScreen">大屏</el-button> <el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice && hasBigScreen" size="small" @click="goBigScreen">大屏</el-button>
<el-button v-if="userRole==='DISPATCHER' && !$route.query.projectDevice && iscsShow" size="small" @click="goIscs">ISCS</el-button> <el-button v-if="(userRole==='DISPATCHER' || userRole=== 'STATION_SUPERVISOR') && !$route.query.projectDevice && iscsShow" size="small" @click="goIscs">ISCS</el-button>
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button> <el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
<template v-if="isAdmin"> <template v-if="isAdmin">
<el-button v-if="!running && !dataError && $route.query.type !== 'ILW'" size="small" type="warning" @click="loadRunPlan"> <el-button v-if="!running && !dataError && $route.query.type !== 'ILW'" size="small" type="warning" @click="loadRunPlan">

View File

@ -0,0 +1,216 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="100px">
<el-form-item label="code" prop="code">
<el-input v-model="formModel.code" style="width: 200px;" />
</el-form-item>
<el-form-item label="地图" prop="mapId">
<el-select v-model="formModel.mapId" placeholder="请选择" @change="mapIdChange">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="车站" prop="station">
<el-select v-model="formModel.station" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="系统" prop="system">
<el-select v-model="formModel.system" placeholder="请选择">
<el-option
v-for="item in systemList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备位置" prop="position">
<el-select v-model="formModel.position" placeholder="请选择">
<el-option
v-for="item in positionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备类型" prop="type">
<el-select v-model="formModel.type" placeholder="请选择">
<el-option
v-for="item in typeList"
: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-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { createIscsDevcie, updateIscsDevice } from '@/api/iscs';
import { getStationList } from '@/api/runplan';
export default {
name: 'DeviceAdd',
props: {
mapList: {
type: Array,
default: function () {
return [];
}
},
positionList: {
type: Array,
default: function () {
return [];
}
},
typeList: {
type: Array,
default: function () {
return [];
}
},
systemList: {
type: Array,
default: function () {
return [];
}
}
},
data() {
return {
dialogVisible: false,
formModel: {
id: '',
code: '',
system: '',
mapId: '',
station: '',
position: '',
type: ''
},
stationList: [],
loading: false
};
},
computed: {
rules() {
const crules = {
code: [
{ required: true, message: '请输入设备code', trigger: 'blur' }
],
mapId: [
{ required: true, message: '请选择地图', trigger: 'change' }
],
system: [
{ required: true, message: '请选择系统', trigger: 'change' }
],
station: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
position: [
{ required: true, message: '请选择设备位置', trigger: 'change' }
],
type: [
{ required: true, message: '请选择设备类型', trigger: 'change' }
]
};
return crules;
},
title() {
return this.formModel.id ? '修改ISCS设备' : '创建ISCS设备';
}
},
mounted() {
},
methods: {
show(data) {
if (data) {
this.formModel.id = data.id;
this.formModel.mapId = data.mapId;
this.formModel.system = data.system;
this.formModel.code = data.code;
this.formModel.station = data.station;
this.formModel.position = data.position;
this.formModel.type = data.type;
}
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
});
},
mapIdChange(value) {
getStationList(value).then(resp => {
this.stationList = resp.data;
}).catch(() => {
this.$message.error('获取车站列表失败!');
});
},
doSave() {
this.$refs.ruleForm.validate(() => {
this.loading = true;
const data = {
id: this.formModel.id,
mapId: this.formModel.mapId,
system: this.formModel.system,
code: this.formModel.code,
station: this.formModel.station,
position: this.formModel.position,
type: this.formModel.type
};
if (data.id) {
updateIscsDevice(data.id, data).then(resp => {
this.$message.success('修改ISCS设备数据成功');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
} else {
createIscsDevcie(data).then(resp => {
this.$message.success('创建ISCS设备数据成功');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
}
});
},
handleClose() {
this.formModel = {
id: '',
mapId: '',
system: '',
code: '',
station: '',
position: '',
type: ''
};
this.dialogVisible = false;
this.loading = false;
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,178 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="100px">
<el-form-item label="地图" prop="mapId">
<el-select v-model="formModel.mapId" placeholder="请选择" @change="mapIdChange">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="系统" prop="system">
<el-select v-model="formModel.system" placeholder="请选择">
<el-option
v-for="item in systemList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备位置" prop="position">
<el-select v-model="formModel.position" multiple placeholder="请选择">
<el-option
v-for="item in positionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备类型" prop="type">
<el-select v-model="formModel.type" placeholder="请选择">
<el-option
v-for="item in typeList"
: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-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { batchCreateIscsDevcie } from '@/api/iscs';
import { getStationList } from '@/api/runplan';
export default {
name: 'DeviceAdd',
props: {
mapList: {
type: Array,
default: function () {
return [];
}
},
positionList: {
type: Array,
default: function () {
return [];
}
},
typeList: {
type: Array,
default: function () {
return [];
}
},
systemList: {
type: Array,
default: function () {
return [];
}
}
},
data() {
return {
dialogVisible: false,
formModel: {
system: '',
mapId: '',
position: [],
type: ''
},
stationList: [],
loading: false
};
},
computed: {
rules() {
const crules = {
mapId: [
{ required: true, message: '请选择地图', trigger: 'change' }
],
system: [
{ required: true, message: '请选择系统', trigger: 'change' }
],
position: [
{ required: true, message: '请选择设备位置', trigger: 'change' }
],
type: [
{ required: true, message: '请选择设备类型', trigger: 'change' }
]
};
return crules;
},
title() {
return '批量创建ISCS设备';
}
},
mounted() {
},
methods: {
show() {
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
});
},
mapIdChange(value) {
getStationList(value).then(resp => {
this.stationList = resp.data;
}).catch(() => {
this.$message.error('获取车站列表失败!');
});
},
doSave() {
this.$refs.ruleForm.validate(() => {
this.loading = true;
const data = [];
this.stationList.forEach(station => {
if (!station.depot) {
this.formModel.position.forEach(item => {
data.push({
mapId: this.formModel.mapId,
system: this.formModel.system,
station: station.code,
code: station.code + '-' + this.formModel.system + '-' + item,
position: item,
type: this.formModel.type
});
});
}
});
batchCreateIscsDevcie(data).then(resp => {
this.$message.success('批量创建ISCS设备数据成功');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
});
},
handleClose() {
this.formModel = {
mapId: '',
system: '',
position: '',
type: ''
};
this.dialogVisible = false;
this.loading = false;
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,254 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<add-device
ref="addDevice"
:map-list="mapList"
:position-list="positionList"
:type-list="typeList"
:system-list="systemList"
@reloadTable="reloadTable"
/>
<batch-add
ref="batchAdd"
:map-list="mapList"
:position-list="positionList"
:type-list="typeList"
:system-list="systemList"
@reloadTable="reloadTable"
/>
</div>
</template>
<script>
import { pagedIscsDevice, deleteIscsDevice } from '@/api/iscs';
import { getPublishMapListOnline } from '@/api/jmap/map';
import AddDevice from './add';
import BatchAdd from './batchAdd';
const positionMap = {
LCD: '站厅',
UP_STAND: '上行站台',
DOWN_STAND: '下行站台',
GATE: '出入口',
OVERPASS1: '天桥1',
OVERPASS2: '天桥2',
PROPERTY: '物业',
LED: 'LED',
ADMINISTRATIVE_AREA: '办公区',
TRANSFER_CHANNEL: '换乘通道'
};
const typeMap = {
AUDIO: '广播',
LED: 'LED',
LCD: 'LCD'
};
const positionList = [
{ label: '站厅', value: 'LCD' },
{ label: '上行站台', value: 'UP_STAND' },
{ label: '下行站台', value: 'DOWN_STAND' },
{ label: '出入口', value: 'GATE' },
{ label: '天桥1', value: 'OVERPASS1' },
{ label: '天桥2', value: 'OVERPASS2' },
{ label: '物业', value: 'PROPERTY' },
{ label: 'LED', value: 'LED' },
{ label: '办公区', value: 'ADMINISTRATIVE_AREA' },
{ label: '换乘通道', value: 'TRANSFER_CHANNEL' }
];
const typeList = [
{ label: '广播', value: 'AUDIO' },
{ label: 'LED', value: 'LED' },
{ label: 'LCD', value: 'LCD' }
];
const systemMap = {
PA: '广播系统',
PIS: '乘客信息'
};
const systemList = [
{ value: 'PA', label: '广播信息' },
{ value: 'PIS', label: '乘客信息' }
];
export default {
name: 'DeviceManage',
components: {
AddDevice,
BatchAdd
},
data() {
return {
examResultList: [],
mapList: [],
positionList: positionList,
typeList: typeList,
systemList: systemList,
url: '',
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
reset: true,
queryObject: {
mapId: {
type: 'select',
label: '地图',
config: {
data: []
}
},
code: {
type: 'text',
label: 'code'
},
system: {
type: 'select',
label: '系统',
config: {
data: systemList
}
},
position: {
type: 'select',
label: '设备位置',
config: {
data: positionList
}
},
type: {
type: 'select',
label: '设备类型',
config: {
data: typeList
}
}
}
},
queryList: {
query: pagedIscsDevice,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: 'code',
prop: 'code'
},
{
title: '地图',
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.getMapName(row.mapId); },
tagType: (row) => { return 'success'; }
},
{
title: '车站编号',
prop: 'station'
},
{
title: '系统',
prop: 'system',
type: 'tag',
columnValue: (row) => { return systemMap[row.system]; },
tagType: (row) => { return 'success'; }
},
{
title: '设备位置',
prop: 'position',
type: 'tag',
columnValue: (row) => { return positionMap[row.position]; },
tagType: (row) => { return 'success'; }
},
{
title: '设备类型',
prop: 'type',
type: 'tag',
columnValue: (row) => { return typeMap[row.type]; },
tagType: (row) => { return 'success'; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '300',
buttons: [
// {
// name: '',
// handleClick: this.editConfig
// },
{
name: this.$t('global.delete'),
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: this.$t('global.add'), handler: this.createIscsDevice},
{ text: '批量创建', handler: this.batchCrateIscsDevice }
]
},
currentModel: {}
};
},
computed: {
},
mounted() {
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
const list = [];
this.mapList.forEach(elem => {
list.push({ label: elem.name, value: elem.id });
});
this.queryForm.queryObject.mapId.config.data = list;
}).catch(() => {
this.$message.error('获取地图列表失败!');
});
},
methods: {
createIscsDevice() {
this.$refs.addDevice.show();
},
batchCrateIscsDevice() {
this.$refs.batchAdd.show();
},
getMapName(mapId) {
const mapInfo = this.mapList.find(elem => elem.id == mapId);
return mapInfo ? mapInfo.name : '';
},
handleTime(time) {
const timeList = time.split('T');
let newTime = '';
if (timeList.length > 1) {
newTime = timeList[0] + ' ' + timeList[1];
} else {
newTime = time;
}
return newTime;
},
//
handleDelete(index, row) {
this.$confirm('此操作将删除该ISCS设备数据', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
deleteIscsDevice(row.id).then(response => {
this.$message.success(this.$t('system.deleteSuccess'));
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox(this.$t('error.deleteFailed'));
});
});
},
createAudioResources() {
this.$refs.addDevice.show();
},
// editConfig(index, row) {
// this.$refs.addDevice.show(row);
// },
reloadTable() {
this.queryList.reload();
}
}
};
</script>

View File

@ -0,0 +1,231 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="100px">
<el-form-item label="地图" prop="mapId">
<el-select v-model="formModel.mapId" placeholder="请选择">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="系统" prop="system">
<el-select v-model="formModel.system" placeholder="请选择">
<el-option
v-for="item in systemList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="formModel.type" placeholder="请选择">
<el-option
v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="音频资源" prop="resourceIds">
<el-select v-model="formModel.resourceIds" multiple placeholder="请选择">
<el-option
v-for="item in audioResourcesList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { createIscsResources, updateIscsResources } from '@/api/iscs';
import { queryAllAudioResources } from '@/api/audioResources';
export default {
name: 'DeviceAdd',
props: {
mapList: {
type: Array,
default: function () {
return [];
}
},
systemList: {
type: Array,
default: function () {
return [];
}
},
typeList: {
type: Array,
default: function () {
return [];
}
}
},
data() {
return {
dialogVisible: false,
formModel: {
id: '',
mapId: '',
type: '',
system: '',
resourceIds: []
},
audioResourcesList: [],
loading: false
};
},
computed: {
rules() {
const crules = {
mapId: [
{ required: true, message: '请选择地图', trigger: 'change' }
],
system: [
{ required: true, message: '请选择系统', trigger: 'change' }
],
type: [
{ required: true, message: '请选择类型', trigger: 'change' }
],
resourceIds: [
{ required: true, message: '请选择资源', trigger: 'change' }
]
};
return crules;
},
title() {
return this.formModel.id ? '修改ISCS资源' : '创建ISCS资源';
}
},
mounted() {
queryAllAudioResources().then(resp => {
this.audioResourcesList = resp.data;
}).catch(() => {
this.$message.error('获取音频资源列表失败!');
});
},
methods: {
show(data) {
if (data) {
this.formModel.id = data.id;
this.formModel.mapId = data.mapId;
this.formModel.system = data.system;
this.formModel.type = data.type;
this.formModel.resourceIds = data.resourceIds;
}
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
});
},
doSave() {
this.$refs.ruleForm.validate(() => {
this.loading = true;
const data = {
id: this.formModel.id,
mapId: this.formModel.mapId,
system: this.formModel.system,
type: this.formModel.type,
resourceIds: this.formModel.resourceIds
};
if (data.id) {
updateIscsResources(data.id, data).then(resp => {
this.$message.success('修改项目域名数据成功!');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
} else {
createIscsResources(data).then(resp => {
this.$message.success('创建项目域名数据成功!');
this.handleClose();
this.$emit('reloadTable');
}).catch(error => {
this.$message.error(error.message);
this.loading = false;
});
}
});
},
handleClose() {
this.formModel = {
id: '',
mapId: '',
system: '',
type: '',
resourceIds: []
};
this.dialogVisible = false;
this.loading = false;
}
}
};
</script>
<style lang="scss" scoped>
.chat-box-footer-create{
font-size: 16px;
text-align: center;
color: #fff;
position: relative;
left: 5px;
top: 6px;
line-height: 30px;
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 50%;
background: green;
border: none;
display: flex;
justify-content: center;
align-items: center;
}
.chat-box-footer-send{
background: #F2F2F2;
right: 55px;
cursor: pointer;
.icon-yuyin{
color: #333;
font-size: 24px;
margin: 0;
}
&.active{
.icon-yuyin{
color: green;
}
}
.close_icon{
position: absolute;
top: 8px;
left: 45px;
font-size: 16px;
color: #333;
font-weight: 600;
padding: 3px;
}
}
#record_progress_bar{
width: 40px;
height: 40px;
position: absolute;
left: 0;
top: 0;
border-radius: 50%;
}
</style>

View File

@ -0,0 +1,203 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<add-resources
ref="addResources"
:map-list="mapList"
:system-list="systemList"
:type-list="typeList"
@reloadTable="reloadTable"
/>
</div>
</template>
<script>
import { pagedIscsResources, deleteIscsResources } from '@/api/iscs';
import AddResources from './add';
import { getPublishMapListOnline } from '@/api/jmap/map';
const systemMap = {
PA: '广播系统',
PIS: '乘客信息'
};
const systemList = [
{ value: 'PA', label: '广播信息' },
{ value: 'PIS', label: '乘客信息' }
];
const typeMap = {
RECORDING: '预录',
EMERGENCY_RECORDING: '紧急预录',
BGM: '背景音乐'
};
const typeList = [
{ value: 'RECORDING', label: '预录' },
{ value: 'EMERGENCY_RECORDING', label: '紧急预录' },
{ value: 'BGM', label: '背景音乐' }
];
export default {
name: 'DeviceManage',
components: {
AddResources
},
data() {
return {
examResultList: [],
systemList: systemList,
typeList: typeList,
url: '',
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
reset: true,
queryObject: {
mapId: {
type: 'select',
label: '地图',
config: {
data: []
}
},
system: {
type: 'select',
label: '系统',
config: {
data: systemList
}
},
type: {
type: 'select',
label: '类型',
config: {
data: typeList
}
}
}
},
queryList: {
query: pagedIscsResources,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '地图',
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.getMapName(row.mapId); },
tagType: (row) => { return 'success'; }
},
{
title: '系统',
prop: 'system',
type: 'tag',
columnValue: (row) => { return systemMap[row.system]; },
tagType: (row) => { return 'success'; }
},
{
title: '类型',
prop: 'type',
type: 'tag',
columnValue: (row) => { return typeMap[row.type]; },
tagType: (row) => { return 'success'; }
},
{
title: '资源',
prop: 'resources',
type: 'tagMore',
columnValue: (row) => { return this.getResources(row.resources); },
tagType: (row) => { return 'success'; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '300',
buttons: [
// {
// name: '',
// handleClick: this.editConfig
// },
{
name: this.$t('global.delete'),
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: this.$t('global.add'), handler: this.createAudioResources}
]
},
currentModel: {}
};
},
computed: {
},
mounted() {
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
const list = [];
this.mapList.forEach(elem => {
list.push({ label: elem.name, value: elem.id });
});
this.queryForm.queryObject.mapId.config.data = list;
}).catch(() => {
this.$message.error('获取地图列表失败!');
});
},
methods: {
createProjectDevice() {
this.$refs.addResources.show();
},
getMapName(mapId) {
const mapInfo = this.mapList.find(elem => elem.id == mapId);
return mapInfo ? mapInfo.name : '';
},
handleTime(time) {
const timeList = time.split('T');
let newTime = '';
if (timeList.length > 1) {
newTime = timeList[0] + ' ' + timeList[1];
} else {
newTime = time;
}
return newTime;
},
getResources(resources) {
const array = [];
resources.forEach(elem => {
array.push(elem.name);
});
return array;
},
//
handleDelete(index, row) {
this.$confirm('此操作将删除该ISCS资源数据', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
deleteIscsResources(row.id).then(response => {
this.$message.success(this.$t('system.deleteSuccess'));
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox(this.$t('error.deleteFailed'));
});
});
},
createAudioResources() {
this.$refs.addResources.show();
},
editConfig(index, row) {
this.$refs.addResources.show(row);
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>

View File

@ -47,10 +47,10 @@ export default {
title: '接口域名', title: '接口域名',
prop: 'domainName' prop: 'domainName'
}, },
{ {
title: '资源域名', title: '资源域名',
prop: 'resourcesDomainName' prop: 'resourcesDomainName'
}, },
{ {
title: '项目名称', title: '项目名称',
prop: 'projectCode', prop: 'projectCode',

View File

@ -51,6 +51,7 @@ export default {
}, },
methods: { methods: {
getUrl(el) { getUrl(el) {
console.log(el.filePath);
return `https://joylink.club/oss/joylink${el.filePath}`; return `https://joylink.club/oss/joylink${el.filePath}`;
}, },
covertTime(time) { covertTime(time) {

BIN
static/other/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
static/other/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
static/other/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
static/other/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

BIN
static/other/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

BIN
static/other/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
static/other/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

BIN
static/other/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

BIN
static/other/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

BIN
static/other/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
static/other/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
static/other/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
static/other/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
static/other/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 129 KiB

View File

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

BIN
static/other/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
static/other/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

BIN
static/other/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
static/other/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB