Merge branch 'test'
This commit is contained in:
commit
5bb0dcf0e0
BIN
src/assets/AlarmSoundUrgent.wav
Normal file
BIN
src/assets/AlarmSoundUrgent.wav
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 57 KiB |
BIN
src/assets/icon/link_bjd.png
Normal file
BIN
src/assets/icon/link_bjd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 199 KiB |
@ -152,6 +152,9 @@ export default class Button extends Group {
|
|||||||
this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColor || '#FFF'}); });
|
this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColor || '#FFF'}); });
|
||||||
this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColorActive || '#000'}); });
|
this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColorActive || '#000'}); });
|
||||||
}
|
}
|
||||||
|
setState(model) {
|
||||||
|
this.textButtonRect.setStyle('fill', model.backgroundColor);
|
||||||
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
this.model.point.x += dx;
|
this.model.point.x += dx;
|
||||||
this.model.point.y += dy;
|
this.model.point.y += dy;
|
||||||
|
@ -137,6 +137,9 @@ export default class line extends Group {
|
|||||||
this.grouper.add(this.iscsLine);
|
this.grouper.add(this.iscsLine);
|
||||||
this.add(this.grouper);
|
this.add(this.grouper);
|
||||||
}
|
}
|
||||||
|
setState(model) {
|
||||||
|
this.iscsLine.setStyle('stroke', model.strokeColor);
|
||||||
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
this.model.points.forEach(item => {
|
this.model.points.forEach(item => {
|
||||||
item.x += dx;
|
item.x += dx;
|
||||||
|
@ -270,8 +270,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080',
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -407,8 +407,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -208,8 +208,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -424,8 +424,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -464,8 +464,9 @@ class SkinCode extends defaultStyle {
|
|||||||
};
|
};
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
strokeColor: 'red', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
extendLength: 8 // 延伸长度
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
// 延续保护计时
|
// 延续保护计时
|
||||||
|
@ -448,8 +448,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
// 延续保护计时
|
// 延续保护计时
|
||||||
|
@ -472,8 +472,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -527,8 +527,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -282,8 +282,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -440,8 +440,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -564,8 +564,8 @@ class SkinCode extends defaultStyle {
|
|||||||
|
|
||||||
// 供电线路
|
// 供电线路
|
||||||
this[deviceType.Power] = {
|
this[deviceType.Power] = {
|
||||||
lineColor: '#FFFFFF', // 线条颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
strokeColor: 'red', // 线条颜色
|
defaultStrokeColor: '#F00', // 线条颜色
|
||||||
extendLength: 10 // 延伸长度
|
extendLength: 10 // 延伸长度
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ export default class Line2 extends Group {
|
|||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: model.width,
|
lineWidth: model.width,
|
||||||
stroke: style.Power.strokeColor
|
stroke: style.Power.defaultStrokeColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.line);
|
this.add(this.line);
|
||||||
@ -59,7 +59,7 @@ export default class Line2 extends Group {
|
|||||||
z: this.z + 3,
|
z: this.z + 3,
|
||||||
traingle: traingle,
|
traingle: traingle,
|
||||||
width: model.width,
|
width: model.width,
|
||||||
stroke: style.Power.strokeColor,
|
stroke: style.Power.noElectricStrokeColor,
|
||||||
point: {
|
point: {
|
||||||
x: model.points[0].x,
|
x: model.points[0].x,
|
||||||
y: model.points[0].y
|
y: model.points[0].y
|
||||||
@ -75,7 +75,7 @@ export default class Line2 extends Group {
|
|||||||
z: this.z + 3,
|
z: this.z + 3,
|
||||||
traingle: traingle,
|
traingle: traingle,
|
||||||
width: model.width,
|
width: model.width,
|
||||||
stroke: style.Power.strokeColor,
|
stroke: style.Power.noElectricStrokeColor,
|
||||||
point: {
|
point: {
|
||||||
x: model.points[model.points.length - 1].x,
|
x: model.points[model.points.length - 1].x,
|
||||||
y: model.points[model.points.length - 1].y
|
y: model.points[model.points.length - 1].y
|
||||||
@ -109,11 +109,22 @@ export default class Line2 extends Group {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setCharged() {
|
||||||
|
// noElectricStrokeColor
|
||||||
|
this.line.setStyle('stroke', this.style.Power.defaultStrokeColor);
|
||||||
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
|
this.recover();
|
||||||
this.setLineType(model.type);
|
this.setLineType(model.type);
|
||||||
|
model.on && this.setCharged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recover() {
|
||||||
|
this.line.setStyle('stroke', this.style.Power.noElectricStrokeColor);
|
||||||
|
}
|
||||||
|
|
||||||
// 设置显示模式
|
// 设置显示模式
|
||||||
setShowMode() {
|
setShowMode() {
|
||||||
const showMode = this.model.showMode;
|
const showMode = this.model.showMode;
|
||||||
|
@ -129,6 +129,7 @@ const Approval = () => import('@/views/approval/index');
|
|||||||
const CompanyManage = () => import('@/views/system/companyManage/index');
|
const CompanyManage = () => import('@/views/system/companyManage/index');
|
||||||
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
|
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
|
||||||
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
||||||
|
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
|
||||||
|
|
||||||
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||||
// import { getSessionStorage } from '@/utils/auth';
|
// import { getSessionStorage } from '@/utils/auth';
|
||||||
@ -368,6 +369,11 @@ export const publicAsyncRoute = [
|
|||||||
path: '/device/result/:userExamId',
|
path: '/device/result/:userExamId',
|
||||||
component: ExamResult,
|
component: ExamResult,
|
||||||
hidden: true
|
hidden: true
|
||||||
|
},
|
||||||
|
{// 运行图预览
|
||||||
|
path: '/planSchedule/window',
|
||||||
|
component: PlanScheduleWicket,
|
||||||
|
hidden: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
// 城市轨道项目
|
// 城市轨道项目
|
||||||
|
@ -16,6 +16,7 @@ import FaviconBjd from '@/assets/icon/favicon_bjd.png';
|
|||||||
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
|
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
|
||||||
import Link_Crsc from '@/assets/icon/link_crsc.png';
|
import Link_Crsc from '@/assets/icon/link_crsc.png';
|
||||||
import Link_Hls from '@/assets/icon/link_hls.png';
|
import Link_Hls from '@/assets/icon/link_hls.png';
|
||||||
|
import Link_Bjd from '@/assets/icon/link_bjd.png';
|
||||||
|
|
||||||
// title:页面title; loginPath:退出登录跳转路径; loginParam:登录接口参数project;loginTitle:登录页左上角title;logoWidth:登录页左上角logo宽度;
|
// title:页面title; loginPath:退出登录跳转路径; loginParam:登录接口参数project;loginTitle:登录页左上角title;logoWidth:登录页左上角logo宽度;
|
||||||
// homeTitle:导航栏title(没有采用title); browserTitle:浏览器窗口title;bottomColumn:底部栏描述;bottomIcon:底部栏Icon;linkIcon:浏览器窗口icon(没有采用ProjectIcon)
|
// homeTitle:导航栏title(没有采用title); browserTitle:浏览器窗口title;bottomColumn:底部栏描述;bottomIcon:底部栏Icon;linkIcon:浏览器窗口icon(没有采用ProjectIcon)
|
||||||
@ -37,7 +38,7 @@ export const loginInfo = {
|
|||||||
bottomIcon: FaviconBjd,
|
bottomIcon: FaviconBjd,
|
||||||
bottomColumn: '',
|
bottomColumn: '',
|
||||||
loginTitle: '空串',
|
loginTitle: '空串',
|
||||||
linkIcon: FaviconBjd,
|
linkIcon: Link_Bjd,
|
||||||
loginParam: 'BJD',
|
loginParam: 'BJD',
|
||||||
navigationLogoWidth: '160px',
|
navigationLogoWidth: '160px',
|
||||||
navigationMarginLeft: '175px',
|
navigationMarginLeft: '175px',
|
||||||
@ -395,7 +396,9 @@ export const ProjectCode = {
|
|||||||
drts: 'DRTS',
|
drts: 'DRTS',
|
||||||
designdrts: 'DRTS',
|
designdrts: 'DRTS',
|
||||||
nty: 'NTY',
|
nty: 'NTY',
|
||||||
designnty: 'NTY'
|
designnty: 'NTY',
|
||||||
|
bjd: 'BJD',
|
||||||
|
designbjd: 'BJD'
|
||||||
};
|
};
|
||||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
||||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty']; // 实训设计平台通过项目code获取地图列表的项目
|
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty']; // 实训设计平台通过项目code获取地图列表的项目
|
||||||
@ -429,7 +432,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
|||||||
hyd: '/design/login?project=hyd',
|
hyd: '/design/login?project=hyd',
|
||||||
designhyd: '/login?project=hyd',
|
designhyd: '/login?project=hyd',
|
||||||
nty: '/design/login?project=nty',
|
nty: '/design/login?project=nty',
|
||||||
designnty: '/login?project=nty'
|
designnty: '/login?project=nty',
|
||||||
|
bjd: '/design/login?project=bjd',
|
||||||
|
designbjd: '/login?project=bjd'
|
||||||
};
|
};
|
||||||
export const ProjectList = [
|
export const ProjectList = [
|
||||||
{value:'xty', label:'西铁院'},
|
{value:'xty', label:'西铁院'},
|
||||||
@ -437,5 +442,6 @@ export const ProjectList = [
|
|||||||
{value: 'xadt', label: '西安地铁'},
|
{value: 'xadt', label: '西安地铁'},
|
||||||
{value: 'heb', label: '哈尔滨'},
|
{value: 'heb', label: '哈尔滨'},
|
||||||
{value: 'drts', label: '调度大赛'},
|
{value: 'drts', label: '调度大赛'},
|
||||||
{value: 'nty', label: '南铁院'}
|
{value: 'nty', label: '南铁院'},
|
||||||
|
{value: 'bjd', label: '北交大'}
|
||||||
];
|
];
|
||||||
|
@ -11,6 +11,8 @@ const iscs = {
|
|||||||
rightClickCount: 0, // 右键点击设备
|
rightClickCount: 0, // 右键点击设备
|
||||||
selected: '', // 左键选中设备
|
selected: '', // 左键选中设备
|
||||||
selectedCount: 0, // 左键选中
|
selectedCount: 0, // 左键选中
|
||||||
|
closeMusicNum: 0, // 关闭音乐标识
|
||||||
|
faultList: [], // 故障 元素状态
|
||||||
incidentList: [], // 事件列表
|
incidentList: [], // 事件列表
|
||||||
alarmList: [] // 报警列表
|
alarmList: [] // 报警列表
|
||||||
},
|
},
|
||||||
@ -173,6 +175,12 @@ const iscs = {
|
|||||||
},
|
},
|
||||||
setAddIncidentList: (state, device) => {
|
setAddIncidentList: (state, device) => {
|
||||||
state.incidentList.unshift(device);
|
state.incidentList.unshift(device);
|
||||||
|
},
|
||||||
|
setFaultList: (state, list) => {
|
||||||
|
state.faultList = list;
|
||||||
|
},
|
||||||
|
setCloseMusic: (state, num) => {
|
||||||
|
state.closeMusicNum = num;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ export function getBaseUrl() {
|
|||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.8.144:9000'; // 旭强
|
// BASE_API = 'http://192.168.8.114:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.8.110:9000'; // 杜康
|
// BASE_API = 'http://192.168.8.110:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
|
@ -89,7 +89,27 @@ export default {
|
|||||||
name: '牵引降压混合变电所主接线图',
|
name: '牵引降压混合变电所主接线图',
|
||||||
mode: 'powerMonitoring02',
|
mode: 'powerMonitoring02',
|
||||||
id: 'combined',
|
id: 'combined',
|
||||||
type: 'interface'
|
type: 'system',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: '象峰站牵引降压混合变电所主接线图',
|
||||||
|
mode: 'powerMonitoring02',
|
||||||
|
id: 'combined01',
|
||||||
|
type: 'interface'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '罗汉山牵引降压混合变电所主接线图',
|
||||||
|
mode: 'powerMonitoring02',
|
||||||
|
id: 'combined02',
|
||||||
|
type: 'interface'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '树兜站牵引降压混合变电所主接线图',
|
||||||
|
mode: 'powerMonitoring02',
|
||||||
|
id: 'combined03',
|
||||||
|
type: 'interface'
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '停车场接触网图',
|
name: '停车场接触网图',
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
<el-button style="margin-left:10px" type="primary" size="small" @click="groupAllShow">全部显示</el-button>
|
<el-button style="margin-left:10px" type="primary" size="small" @click="groupAllShow">全部显示</el-button>
|
||||||
<el-button style="margin-left:10px" type="primary" size="small" @click="groupAllHide">全部隐藏</el-button>
|
<el-button style="margin-left:10px" type="primary" size="small" @click="groupAllHide">全部隐藏</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="footer" style="margin-top: 20px;">
|
||||||
|
<el-button type="danger" size="small" style="margin-left:10px" @click="deleteAll">全部删除</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -52,7 +55,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('iscs', [
|
...mapGetters('iscs', [
|
||||||
'iscsGroupList'
|
'iscsGroupList',
|
||||||
|
'iscs'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -94,14 +98,15 @@ export default {
|
|||||||
elemList: []
|
elemList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
doDeleteGroup() {
|
doDeleteGroup(data) {
|
||||||
const Model = {
|
const Model = {
|
||||||
code: this.formModel.code,
|
code: data && data.code ? data.code : this.formModel.code,
|
||||||
_type: 'IscsGroup'
|
_type: 'IscsGroup'
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', Model);
|
this.$emit('deleteDataModel', Model);
|
||||||
const modelList = [];
|
const modelList = [];
|
||||||
for (const key in this.formModel.elemMap) {
|
const elemMap = data ? data.elemMap : this.formModel.elemMap;
|
||||||
|
for (const key in elemMap) {
|
||||||
const device = this.$iscs.iscsDevice[key];
|
const device = this.$iscs.iscsDevice[key];
|
||||||
if (device && device.model) {
|
if (device && device.model) {
|
||||||
device.model['groupId'] = '';
|
device.model['groupId'] = '';
|
||||||
@ -126,6 +131,26 @@ export default {
|
|||||||
const device = this.$iscs.iscsDevice[group.code];
|
const device = this.$iscs.iscsDevice[group.code];
|
||||||
device.instance.hide();
|
device.instance.hide();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
deleteAll() {
|
||||||
|
this.$confirm('此操作将删除所有编组, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.iscs.iscsGroupList.forEach(item => {
|
||||||
|
this.doDeleteGroup(item);
|
||||||
|
});
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功!'
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -62,6 +62,12 @@
|
|||||||
<el-form-item v-if="form.arrowShow != 'none'" label="箭头大小:" prop="arrowSize">
|
<el-form-item v-if="form.arrowShow != 'none'" label="箭头大小:" prop="arrowSize">
|
||||||
<el-input-number v-model="form.arrowSize" controls-position="right" :min="1" size="small" />
|
<el-input-number v-model="form.arrowSize" controls-position="right" :min="1" size="small" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关联开关阀:" prop="controlCode">
|
||||||
|
<el-select v-model="form.controlCode" placeholder="请选择" size="small">
|
||||||
|
<el-option v-for="(item, index) in iscsGroupList" :key="index" :label="item.name" :value="item.code" />
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" :type="field == 'selectControlCode' ? 'danger': ''" @click="hover('selectControlCode')">添加</el-button>
|
||||||
|
</el-form-item>
|
||||||
<div class="coordinate">
|
<div class="coordinate">
|
||||||
<div class="titles" style="width: 88px">坐标点</div>
|
<div class="titles" style="width: 88px">坐标点</div>
|
||||||
<div class="point-section">
|
<div class="point-section">
|
||||||
@ -118,7 +124,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import deviceType from '@/iscs/constant/deviceType.js';
|
||||||
import {getUID} from '@/iscs/utils/Uid';
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IscsLine',
|
name: 'IscsLine',
|
||||||
data() {
|
data() {
|
||||||
@ -126,6 +134,7 @@ export default {
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
|
field: '',
|
||||||
form: {
|
form: {
|
||||||
classify:'solid',
|
classify:'solid',
|
||||||
code: '',
|
code: '',
|
||||||
@ -136,6 +145,7 @@ export default {
|
|||||||
fillBackground: '',
|
fillBackground: '',
|
||||||
arrowShow: 'none',
|
arrowShow: 'none',
|
||||||
arrowSize: 5,
|
arrowSize: 5,
|
||||||
|
controlCode: '',
|
||||||
points: [
|
points: [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
{ x: 20, y: 10 }
|
{ x: 20, y: 10 }
|
||||||
@ -156,13 +166,16 @@ export default {
|
|||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
...mapGetters('iscs', [
|
...mapGetters('iscs', [
|
||||||
'iscs'
|
'iscs',
|
||||||
|
'iscsGroupList'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$store.state.iscs.rightClickCount': function (val) {
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
if (model._type === 'IscsLine' ) {
|
if (this.field && model._type == deviceType.IscsGroup) {
|
||||||
|
this.addChildElement(model);
|
||||||
|
} else if (model._type === 'IscsLine' ) {
|
||||||
this.buttonText = '修改';
|
this.buttonText = '修改';
|
||||||
this.showDeleteButton = true;
|
this.showDeleteButton = true;
|
||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
@ -172,6 +185,7 @@ export default {
|
|||||||
this.form.lineWidth = model.lineWidth;
|
this.form.lineWidth = model.lineWidth;
|
||||||
this.form.fillColor = model.fillColor;
|
this.form.fillColor = model.fillColor;
|
||||||
this.form.fillBackground = model.fillBackground || '';
|
this.form.fillBackground = model.fillBackground || '';
|
||||||
|
this.form.controlCode = model.controlCode || '';
|
||||||
if (model.point1) {
|
if (model.point1) {
|
||||||
this.form.points = [];
|
this.form.points = [];
|
||||||
this.form.points.push(model.point1);
|
this.form.points.push(model.point1);
|
||||||
@ -208,6 +222,7 @@ export default {
|
|||||||
classify: this.form.classify,
|
classify: this.form.classify,
|
||||||
arrowShow: this.form.arrowShow,
|
arrowShow: this.form.arrowShow,
|
||||||
arrowSize: this.form.arrowSize,
|
arrowSize: this.form.arrowSize,
|
||||||
|
controlCode: this.form.controlCode,
|
||||||
modelList: this.form.modelList,
|
modelList: this.form.modelList,
|
||||||
isGradual: this.form.isGradual,
|
isGradual: this.form.isGradual,
|
||||||
gradualShow: this.form.gradualShow
|
gradualShow: this.form.gradualShow
|
||||||
@ -253,6 +268,7 @@ export default {
|
|||||||
fillBackground: '',
|
fillBackground: '',
|
||||||
arrowShow: 'none',
|
arrowShow: 'none',
|
||||||
arrowSize: 5,
|
arrowSize: 5,
|
||||||
|
controlCode: '',
|
||||||
points: [
|
points: [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
{ x: 20, y: 10 }
|
{ x: 20, y: 10 }
|
||||||
@ -263,6 +279,16 @@ export default {
|
|||||||
gradualShow: 'level'
|
gradualShow: 'level'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
hover(field) {
|
||||||
|
this.field = field == this.field ? '' : field;
|
||||||
|
this.$emit('deviceSelect', this.field);
|
||||||
|
},
|
||||||
|
addChildElement(model) {
|
||||||
|
this.form.controlCode = model.code;
|
||||||
|
const groupMode = this.$iscs.iscsDevice[model.code].model;
|
||||||
|
groupMode['lineCode'] = this.form.code;
|
||||||
|
this.$emit('createDataModel', groupMode);
|
||||||
|
},
|
||||||
addModelList() {
|
addModelList() {
|
||||||
const param = {
|
const param = {
|
||||||
offset: '',
|
offset: '',
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
style="width: 100%;height: 100%;"
|
style="width: 100%;height: 100%;"
|
||||||
@createDataModel="createDataModel"
|
@createDataModel="createDataModel"
|
||||||
@deleteDataModel="deleteDataModel"
|
@deleteDataModel="deleteDataModel"
|
||||||
|
@deviceSelect="deviceSelect"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="矩形" name="IscsRect">
|
<el-tab-pane label="矩形" name="IscsRect">
|
||||||
@ -58,7 +59,7 @@
|
|||||||
@deleteDataModel="deleteDataModel"
|
@deleteDataModel="deleteDataModel"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="三角形" name="IscsTriangle">
|
<el-tab-pane label="三角形" name="IscsTriangle">
|
||||||
<iscs-triangle
|
<iscs-triangle
|
||||||
ref="iscsTriangle"
|
ref="iscsTriangle"
|
||||||
style="width: 100%;height: 100%;"
|
style="width: 100%;height: 100%;"
|
||||||
@ -146,8 +147,8 @@ export default {
|
|||||||
IscsTick,
|
IscsTick,
|
||||||
IscsStateTable,
|
IscsStateTable,
|
||||||
IscsArrow,
|
IscsArrow,
|
||||||
IscsRadioText,
|
IscsRadioText,
|
||||||
IscsTriangle,
|
IscsTriangle,
|
||||||
IscsCircle,
|
IscsCircle,
|
||||||
IscsPower,
|
IscsPower,
|
||||||
IscsPicture
|
IscsPicture
|
||||||
@ -158,7 +159,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
enabledTab: 'PlatformScreenDoor',
|
enabledTab: 'PlatformScreenDoor',
|
||||||
data: '',
|
data: '',
|
||||||
stationCode: ''
|
stationCode: '',
|
||||||
|
filed: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -168,8 +170,10 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.iscs.rightClickCount': function (val) {
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
if (!this.filed) {
|
||||||
this.enabledTab = model._type;
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
this.enabledTab = model._type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -179,6 +183,9 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deviceSelect(filed) {
|
||||||
|
this.filed = filed;
|
||||||
|
},
|
||||||
createDataModel(model) {
|
createDataModel(model) {
|
||||||
const newModel = deviceFactory(model._type, model);
|
const newModel = deviceFactory(model._type, model);
|
||||||
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
|
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<el-col :span="12">子控制器防拆开关</el-col>
|
<el-col :span="12">子控制器防拆开关</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="height: 33%;line-height: 25px;">
|
<el-row style="height: 33%;line-height: 25px;">
|
||||||
<el-col :span="12"> </el-col>
|
<el-col :span="12"> </el-col>
|
||||||
<el-col :span="12">子控制器状态</el-col>
|
<el-col :span="12">子控制器状态</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,17 +2,28 @@
|
|||||||
<div class="iscsCanvas">
|
<div class="iscsCanvas">
|
||||||
<div :id="iscsId" v-loading="loading" :style="{ width: widthCanvas +'px', height: canvasHeight +'px' }" class="iscs-canvas" />
|
<div :id="iscsId" v-loading="loading" :style="{ width: widthCanvas +'px', height: canvasHeight +'px' }" class="iscs-canvas" />
|
||||||
<valve-dialog ref="valve" />
|
<valve-dialog ref="valve" />
|
||||||
|
<protect-reset ref="protectReset" />
|
||||||
|
<audio id="teleRing" :src="teleRing" preload loop />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import teleRing from '@/assets/AlarmSoundUrgent.wav';
|
||||||
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { parser } from '@/iscs/utils/parser';
|
import { parser } from '@/iscs/utils/parser';
|
||||||
import Iscs from '@/iscs/iscs';
|
import Iscs from '@/iscs/iscs';
|
||||||
import ValveDialog from '../dialog/valve';
|
import ValveDialog from '../dialog/valve';
|
||||||
|
import ProtectReset from '../dialog/protectReset';
|
||||||
|
|
||||||
|
import mapElement from '@/iscs/status/mapElement.js';
|
||||||
|
import {deviceFactory} from '@/iscs/utils/parser';
|
||||||
|
import { setNum } from '@/iscs/status/mapElement.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IscsStation',
|
name: 'IscsStation',
|
||||||
components: {
|
components: {
|
||||||
ValveDialog
|
ValveDialog,
|
||||||
|
ProtectReset
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
size: {
|
size: {
|
||||||
@ -27,7 +38,8 @@ export default {
|
|||||||
loading:false,
|
loading:false,
|
||||||
widthCanvas:1200,
|
widthCanvas:1200,
|
||||||
canvasHeight:500,
|
canvasHeight:500,
|
||||||
scaleRate:1
|
scaleRate:1,
|
||||||
|
teleRing: teleRing
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -35,6 +47,21 @@ export default {
|
|||||||
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
|
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.iscs.alarmList': function(list) {
|
||||||
|
if (list.length) {
|
||||||
|
if (document.querySelector('#teleRing')) {
|
||||||
|
document.querySelector('#teleRing').play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.iscs.closeMusicNum': function(val) {
|
||||||
|
if (val) {
|
||||||
|
document.querySelector('#teleRing').pause();
|
||||||
|
this.$store.commit('iscs/setCloseMusic', 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
show(iscsData, widthCanvas, canvasHeight, scaleRate) {
|
show(iscsData, widthCanvas, canvasHeight, scaleRate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -70,13 +97,80 @@ export default {
|
|||||||
if (em.deviceType == 'IscsGroup') {
|
if (em.deviceType == 'IscsGroup') {
|
||||||
this.$iscs.iscsDevice[em.deviceModel.code].instance.hide();
|
this.$iscs.iscsDevice[em.deviceModel.code].instance.hide();
|
||||||
this.$refs.valve.doShow(em.deviceModel);
|
this.$refs.valve.doShow(em.deviceModel);
|
||||||
|
} else if (em.deviceType == 'IscsButton') {
|
||||||
|
this.$refs.protectReset.doShow(em.deviceModel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 地图加载完成
|
||||||
handleViewLoaded() {
|
handleViewLoaded() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
var arr = Object.keys(this.$iscs.iscsDevice);
|
||||||
|
if (arr.length != 0) {
|
||||||
|
this.$store.state.iscs.faultList.forEach(item => {
|
||||||
|
if (item.stationName == this.$route.query.stationName) {
|
||||||
|
item.list.forEach(ele => {
|
||||||
|
const device = this.$iscs.iscsDevice[ele.code];
|
||||||
|
device.model = Object.assign(device.model, ele);
|
||||||
|
if (device.model._type == 'IscsButton') {
|
||||||
|
if (device && device.instance) {
|
||||||
|
device.instance.setState({
|
||||||
|
backgroundColor: device.model['fault'] ? '#FF0000' : '#00CC00'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.handleModel(device.model);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setIscs(data, oldData) {
|
setIscs(data, oldData) {
|
||||||
this.$iscs.setIscs(oldData, data, this.$route.query.lineCode);
|
this.$iscs.setIscs(oldData, data, this.$route.query.lineCode);
|
||||||
|
},
|
||||||
|
// 执行操作
|
||||||
|
handleModel(model) {
|
||||||
|
const arr = [];
|
||||||
|
model.statusList.forEach(item => {
|
||||||
|
if (item.key == 'valve' && item.value == model.valve) {
|
||||||
|
item.childList.forEach(ele => {
|
||||||
|
Object.values(model.elemMap).forEach(elem => {
|
||||||
|
if (elem.type == ele.type) {
|
||||||
|
arr.push({
|
||||||
|
code: elem.code,
|
||||||
|
...mapElement[ele.type].stateMap[ele.status]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const models = [{...model, valve: model.valve}];
|
||||||
|
this.$store.dispatch('iscs/updateIscsDevices', models.map(el => {
|
||||||
|
const device = deviceFactory(el._type, el);
|
||||||
|
return device.model;
|
||||||
|
}));
|
||||||
|
if (model.lineCode) {
|
||||||
|
// 关联接触网 颜色处理
|
||||||
|
arr.push({
|
||||||
|
code: model.lineCode,
|
||||||
|
strokeColor: model.valve ? '#00FF1E' : '#FF0000'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 改变元素状态
|
||||||
|
arr.forEach(el => {
|
||||||
|
const device = this.$iscs.iscsDevice[el.code];
|
||||||
|
if (device && device.instance) {
|
||||||
|
device.instance.setState(el);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const textList = setNum(Object.values(model.elemMap), model.valve);
|
||||||
|
textList.forEach(el => {
|
||||||
|
const device = this.$iscs.iscsDevice[el.code];
|
||||||
|
if (device && device.instance) {
|
||||||
|
device.instance.setState(el);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -11,9 +11,17 @@
|
|||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<div style="height: 300px">
|
<div style="height: 300px;overflow: auto; margin-bottom: 15px;">
|
||||||
<div v-for="(item, index) in alarmList" :key="index">{{ item.station }} {{ item.name }} 执行了 {{ item[item.key] ? 'XX保护动作' : '' }} {{ item[item.key] ? list[item.key][0] : list[item.key][1] }}操作</div>
|
<div v-for="(item, index) in alarmList" :key="index">
|
||||||
|
<div v-if="item.key == 'frame'">{{ item.station }} {{ item.name }}</div>
|
||||||
|
<div v-if="item.key != 'frame'">{{ item.station }} {{ item.name }} 执行了 {{ item[item.key] ? 'XX保护动作' : '' }} {{ item[item.key] ? list[item.key][0] : list[item.key][1] }}操作</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="4" :offset="10">
|
||||||
|
<el-button type="primary" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -47,6 +55,10 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('iscs/setDelIncidentList');
|
this.$store.dispatch('iscs/setDelIncidentList');
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
// 关闭音乐
|
||||||
|
this.$store.commit('iscs/setCloseMusic', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<el-table-column label="开关名称" prop="name" />
|
<el-table-column label="开关名称" prop="name" />
|
||||||
<el-table-column label="值" width="120">
|
<el-table-column label="值" width="120">
|
||||||
<template slot-scope="scope" style="padding: 0;">
|
<template slot-scope="scope" style="padding: 0;">
|
||||||
<span>{{ scope.row[scope.row.key] ? list[scope.row.key][0] : list[scope.row.key][1] }}</span>
|
<span v-if="scope.row.key == 'valve'">{{ scope.row[scope.row.key] ? list[scope.row.key][0] : list[scope.row.key][1] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -59,7 +59,8 @@ export default {
|
|||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
{ label: '104A断路器故障', value: 'group_2' },
|
{ label: '104A断路器故障', value: 'group_2' },
|
||||||
{ label: '104B断路器故障', value: 'group_52' }
|
{ label: '104B断路器故障', value: 'group_52' },
|
||||||
|
{ label: '框架电流保护故障', value: 'frame_group' }
|
||||||
],
|
],
|
||||||
list: {
|
list: {
|
||||||
valve: ['控分', '控合']
|
valve: ['控分', '控合']
|
||||||
@ -86,7 +87,11 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.setModelMalfunction(this.$iscs.iscsDevice[this.formModel.value].model);
|
if (this.formModel.value == 'frame_group') {
|
||||||
|
this.setMalfunction();
|
||||||
|
} else {
|
||||||
|
this.setModelMalfunction(this.$iscs.iscsDevice[this.formModel.value].model);
|
||||||
|
}
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
if (this.formModel.value == 'group_2') {
|
if (this.formModel.value == 'group_2') {
|
||||||
this.$message.success('104A断路器分位');
|
this.$message.success('104A断路器分位');
|
||||||
@ -100,7 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setModelMalfunction(model) {
|
setModelMalfunction(model) {
|
||||||
model.valve = true;
|
model.valve = true;
|
||||||
this.handleModel(model);
|
this.handleModel(model, true);
|
||||||
this.relevance(model);
|
this.relevance(model);
|
||||||
},
|
},
|
||||||
relevance(model) {
|
relevance(model) {
|
||||||
@ -114,7 +119,7 @@ export default {
|
|||||||
modelRelevance['valve'] = model['valve'];
|
modelRelevance['valve'] = model['valve'];
|
||||||
}
|
}
|
||||||
if (modelRelevance && modelRelevance.code) {
|
if (modelRelevance && modelRelevance.code) {
|
||||||
this.handleModel(modelRelevance);
|
this.handleModel(modelRelevance, true);
|
||||||
time = 1500;
|
time = 1500;
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -127,10 +132,10 @@ export default {
|
|||||||
model3['valve'] = model['valve'];
|
model3['valve'] = model['valve'];
|
||||||
const model4 = this.$iscs.iscsDevice['group_8'].model;
|
const model4 = this.$iscs.iscsDevice['group_8'].model;
|
||||||
model4['valve'] = model['valve'];
|
model4['valve'] = model['valve'];
|
||||||
this.handleModel(model1);
|
this.handleModel(model1, true);
|
||||||
this.handleModel(model2);
|
this.handleModel(model2, true);
|
||||||
this.handleModel(model3);
|
this.handleModel(model3, true);
|
||||||
this.handleModel(model4);
|
this.handleModel(model4, true);
|
||||||
time = 1500;
|
time = 1500;
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -144,13 +149,13 @@ export default {
|
|||||||
models['valve'] = false;
|
models['valve'] = false;
|
||||||
}
|
}
|
||||||
if (models && models.code) {
|
if (models && models.code) {
|
||||||
this.handleModel(models);
|
this.handleModel(models, true);
|
||||||
}
|
}
|
||||||
}, time);
|
}, time);
|
||||||
}, time);
|
}, time);
|
||||||
},
|
},
|
||||||
// 执行操作
|
// 执行操作
|
||||||
handleModel(model) {
|
handleModel(model, judge = false) {
|
||||||
const arr = [];
|
const arr = [];
|
||||||
model.statusList.forEach(item => {
|
model.statusList.forEach(item => {
|
||||||
if (item.key == 'valve' && item.value == model.valve) {
|
if (item.key == 'valve' && item.value == model.valve) {
|
||||||
@ -171,6 +176,12 @@ export default {
|
|||||||
const device = deviceFactory(el._type, el);
|
const device = deviceFactory(el._type, el);
|
||||||
return device.model;
|
return device.model;
|
||||||
}));
|
}));
|
||||||
|
if (model.lineCode) {
|
||||||
|
arr.push({
|
||||||
|
code: model.lineCode,
|
||||||
|
strokeColor: model.valve ? '#00FF1E' : '#FF0000'
|
||||||
|
});
|
||||||
|
}
|
||||||
// 改变元素状态
|
// 改变元素状态
|
||||||
arr.forEach(el => {
|
arr.forEach(el => {
|
||||||
const device = this.$iscs.iscsDevice[el.code];
|
const device = this.$iscs.iscsDevice[el.code];
|
||||||
@ -185,15 +196,18 @@ export default {
|
|||||||
device.instance.setState(el);
|
device.instance.setState(el);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const params = {
|
// 报警时间 开关
|
||||||
name: model.name,
|
if (judge) {
|
||||||
times: this.filterTime(),
|
const params = {
|
||||||
station: this.$route.query.stationName,
|
name: model.name,
|
||||||
key: 'valve',
|
times: this.filterTime(),
|
||||||
valve: model.valve
|
station: this.$route.query.stationName,
|
||||||
};
|
key: 'valve',
|
||||||
this.$store.dispatch('iscs/setAddAlarmList', params);
|
valve: model.valve
|
||||||
this.$store.dispatch('iscs/setAddIncidentList', params);
|
};
|
||||||
|
this.$store.dispatch('iscs/setAddAlarmList', params);
|
||||||
|
this.$store.dispatch('iscs/setAddIncidentList', params);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
filterTime() {
|
filterTime() {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
@ -218,6 +232,89 @@ export default {
|
|||||||
}
|
}
|
||||||
return fmt;
|
return fmt;
|
||||||
},
|
},
|
||||||
|
// 框架电流保护故障
|
||||||
|
setMalfunction() {
|
||||||
|
// group_11 group_12 group_24 group_53 group_35 group_43 group_47 group_48
|
||||||
|
this.$iscs.iscsDevice['group_11'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_12'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_24'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_53'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_35'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_43'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_47'].model['valve'] = true;
|
||||||
|
this.$iscs.iscsDevice['group_48'].model['valve'] = true;
|
||||||
|
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_11'].model);
|
||||||
|
const promise1 = new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_24'].model);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_35'].model);
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_43'].model);
|
||||||
|
resolve();
|
||||||
|
}, 500);
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_12'].model);
|
||||||
|
const promise2 = new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_53'].model);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_47'].model);
|
||||||
|
this.handleModel(this.$iscs.iscsDevice['group_48'].model);
|
||||||
|
resolve();
|
||||||
|
}, 500);
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
const device = this.$iscs.iscsDevice['IscsButton_6'];
|
||||||
|
device.model['fault'] = true;
|
||||||
|
if (device && device.instance) {
|
||||||
|
device.instance.setState({
|
||||||
|
backgroundColor: '#FF0000'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.$store.commit('iscs/setFaultList', [
|
||||||
|
{
|
||||||
|
stationName: '罗汉山站',
|
||||||
|
list: [
|
||||||
|
{ code: 'group_11', valve: true },
|
||||||
|
{ code: 'group_12', valve: true },
|
||||||
|
{ code: 'group_24', valve: true },
|
||||||
|
{ code: 'group_53', valve: true },
|
||||||
|
{ code: 'group_35', valve: true },
|
||||||
|
{ code: 'group_43', valve: true },
|
||||||
|
{ code: 'group_47', valve: true },
|
||||||
|
{ code: 'group_48', valve: true },
|
||||||
|
{ code: 'IscsButton_6', fault: true }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
stationName: '象峰站',
|
||||||
|
list: [
|
||||||
|
{ code: 'group_31', valve: true },
|
||||||
|
{ code: 'group_33', valve: true }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
stationName: '树兜站',
|
||||||
|
list: [
|
||||||
|
{ code: 'group_35', valve: true },
|
||||||
|
{ code: 'group_23', valve: true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
Promise.all([promise1, promise2]).then(() => {
|
||||||
|
this.$message.success('105/106/201/202/211/212/213/214开关因为框架电流保护动作跳闸,分位');
|
||||||
|
const params = {
|
||||||
|
name: '框架电流保护动作跳闸',
|
||||||
|
times: this.filterTime(),
|
||||||
|
station: this.$route.query.stationName,
|
||||||
|
key: 'frame'
|
||||||
|
};
|
||||||
|
this.$store.dispatch('iscs/setAddAlarmList', params); // 报警
|
||||||
|
this.$store.dispatch('iscs/setAddIncidentList', params); // 事件
|
||||||
|
});
|
||||||
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
|
180
src/views/iscs/iscsSystem/stationConfig/dialog/protectReset.vue
Normal file
180
src/views/iscs/iscsSystem/stationConfig/dialog/protectReset.vue
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="iscs_fuzhou-01__systerm route-detail"
|
||||||
|
title="直流1500V保护"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="500px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-table border :data="elemList" style="width: 100%;" height="300px">
|
||||||
|
<el-table-column label="描述" prop="name" />
|
||||||
|
<el-table-column label="类型" prop="types" />
|
||||||
|
<el-table-column label="状态" prop="status" />
|
||||||
|
<el-table-column label="操作" width="120">
|
||||||
|
<template slot-scope="scope" style="padding: 0;">
|
||||||
|
<el-button size="mini" type="" style="width: 100%; height: 100%" @click="handleOption(scope.$index, scope.row)">复归选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="iscs_fuzhou-01__systerm route-detail"
|
||||||
|
title="请执行或取消操作"
|
||||||
|
:visible.sync="showSublayer"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doCloseSublayer"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-form label-width="100px" size="small" label-position="left" :model="formModel">
|
||||||
|
<el-form-item label="控制点">
|
||||||
|
<div style="line-height: 15px; box-shadow: 0px 0px 2px inset #a2a2a2; padding: 5px;">{{ formModel.name }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="控制动作">
|
||||||
|
<div style="line-height: 15px; box-shadow: 0px 0px 2px inset #a2a2a2; padding: 5px;">{{ formModel.action }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="操作信息">
|
||||||
|
<div style="line-height: 15px; box-shadow: 0px 0px 2px inset #a2a2a2; padding: 5px;">{{ formModel.info }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button type="primary" @click="commit">执行</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button @click="doCloseSublayer">取消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
showSublayer: false,
|
||||||
|
elemList: [],
|
||||||
|
model: {},
|
||||||
|
rowData: {},
|
||||||
|
activeIndex: -1,
|
||||||
|
formModel: {
|
||||||
|
name: '直流1500V 保护开关控制阀',
|
||||||
|
action: '某某开关控制阀 保护动作复归',
|
||||||
|
info: '复归'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(models) {
|
||||||
|
this.model = models;
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.elemList = [
|
||||||
|
{
|
||||||
|
name: '1500V 201保护动作复归',
|
||||||
|
types: 'DO',
|
||||||
|
status: '',
|
||||||
|
fault: models['fault'] || false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1500V 202保护动作复归',
|
||||||
|
types: 'DO',
|
||||||
|
status: '',
|
||||||
|
fault: models['fault'] || false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1500V 211保护动作复归',
|
||||||
|
types: 'DO',
|
||||||
|
status: '',
|
||||||
|
fault: models['fault'] || false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1500V 212保护动作复归',
|
||||||
|
types: 'DO',
|
||||||
|
status: '',
|
||||||
|
fault: models['fault'] || false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1500V 213保护动作复归',
|
||||||
|
types: 'DO',
|
||||||
|
status: '',
|
||||||
|
fault: models['fault'] || false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1500V 214保护动作复归',
|
||||||
|
types: 'DO',
|
||||||
|
status: '',
|
||||||
|
fault: models['fault'] || false
|
||||||
|
}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
handleOption(index, row) {
|
||||||
|
this.activeIndex = index;
|
||||||
|
this.rowData = JSON.parse(JSON.stringify(row));
|
||||||
|
this.showSublayer = true;
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
this.showSublayer = false;
|
||||||
|
this.rowData.fault = false;
|
||||||
|
this.rowData.status = '完成';
|
||||||
|
this.elemList.splice(this.activeIndex, 1, this.rowData);
|
||||||
|
this.activeIndex = -1;
|
||||||
|
|
||||||
|
const arr = [];
|
||||||
|
this.elemList.forEach(item => {
|
||||||
|
if (item.fault) {
|
||||||
|
arr.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!arr.length) {
|
||||||
|
const device = this.$iscs.iscsDevice['IscsButton_6'];
|
||||||
|
device.model['fault'] = false;
|
||||||
|
if (device && device.instance) {
|
||||||
|
device.instance.setState({
|
||||||
|
backgroundColor: '#00CC00'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const arr = [];
|
||||||
|
this.$store.state.iscs.faultList.forEach(item => {
|
||||||
|
if (item.stationName == this.$route.query.stationName) {
|
||||||
|
item.list.forEach(ele => {
|
||||||
|
if (ele.code == 'IscsButton_6') {
|
||||||
|
ele.fault = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
arr.push(item);
|
||||||
|
});
|
||||||
|
this.$store.commit('iscs/setFaultList', arr);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doCloseSublayer() {
|
||||||
|
this.showSublayer = false;
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -135,6 +135,18 @@ export default {
|
|||||||
console.log('不允许点击');
|
console.log('不允许点击');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (this.model.code == 'group_24' || this.model.code == 'group_53' || this.model.code == 'group_35' || this.model.code == 'group_43' || this.model.code == 'group_47' || this.model.code == 'group_48') {
|
||||||
|
if (this.rowData[this.rowData.key]) {
|
||||||
|
this.model[this.rowData.key] = this.rowData[this.rowData.key];
|
||||||
|
this.handleModel(this.model);
|
||||||
|
} else {
|
||||||
|
if (!this.$iscs.iscsDevice['IscsButton_6'].model['fault']) {
|
||||||
|
this.model[this.rowData.key] = this.rowData[this.rowData.key];
|
||||||
|
this.handleModel(this.model);
|
||||||
|
} else {
|
||||||
|
console.log('不允许点击');
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.model[this.rowData.key] = this.rowData[this.rowData.key];
|
this.model[this.rowData.key] = this.rowData[this.rowData.key];
|
||||||
this.handleModel(this.model);
|
this.handleModel(this.model);
|
||||||
@ -224,6 +236,13 @@ export default {
|
|||||||
const device = deviceFactory(el._type, el);
|
const device = deviceFactory(el._type, el);
|
||||||
return device.model;
|
return device.model;
|
||||||
}));
|
}));
|
||||||
|
if (model.lineCode) {
|
||||||
|
// 关联接触网 颜色处理
|
||||||
|
arr.push({
|
||||||
|
code: model.lineCode,
|
||||||
|
strokeColor: model.valve ? '#00FF1E' : '#FF0000'
|
||||||
|
});
|
||||||
|
}
|
||||||
// 改变元素状态
|
// 改变元素状态
|
||||||
arr.forEach(el => {
|
arr.forEach(el => {
|
||||||
const device = this.$iscs.iscsDevice[el.code];
|
const device = this.$iscs.iscsDevice[el.code];
|
||||||
@ -247,6 +266,19 @@ export default {
|
|||||||
};
|
};
|
||||||
this.$store.dispatch('iscs/setAddAlarmList', params);
|
this.$store.dispatch('iscs/setAddAlarmList', params);
|
||||||
this.$store.dispatch('iscs/setAddIncidentList', params);
|
this.$store.dispatch('iscs/setAddIncidentList', params);
|
||||||
|
|
||||||
|
const arrList = [];
|
||||||
|
this.$store.state.iscs.faultList.forEach(item => {
|
||||||
|
if (item.stationName == this.$route.query.stationName) {
|
||||||
|
item.list.forEach(ele => {
|
||||||
|
if (ele.code == model.code) {
|
||||||
|
ele.valve = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
arrList.push(item);
|
||||||
|
});
|
||||||
|
this.$store.commit('iscs/setFaultList', arrList);
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -168,6 +168,7 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
color: #d8e9a5;
|
color: #d8e9a5;
|
||||||
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
.Substation{
|
.Substation{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -85,7 +85,16 @@ export default {
|
|||||||
const tractionList = ['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'];
|
const tractionList = ['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'];
|
||||||
if (tractionList.includes(this.stationName)) {
|
if (tractionList.includes(this.stationName)) {
|
||||||
this.title = this.stationName + ' 牵引降压混合变电所主接线图';
|
this.title = this.stationName + ' 牵引降压混合变电所主接线图';
|
||||||
params.userInterface = 'combined';
|
if (this.stationName == '象峰站') {
|
||||||
|
params.userInterface = 'combined01';
|
||||||
|
} else if (this.stationName == '罗汉山站') {
|
||||||
|
params.userInterface = 'combined02';
|
||||||
|
} else if (this.stationName == '树兜站') {
|
||||||
|
params.userInterface = 'combined03';
|
||||||
|
} else {
|
||||||
|
params.userInterface = 'combined02';
|
||||||
|
}
|
||||||
|
params.system = 'combined';
|
||||||
} else {
|
} else {
|
||||||
this.title = this.stationName + ' 降压变电所主接线图';
|
this.title = this.stationName + ' 降压变电所主接线图';
|
||||||
params.userInterface = 'stepDown';
|
params.userInterface = 'stepDown';
|
||||||
@ -113,6 +122,7 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
color: #d8e9a5;
|
color: #d8e9a5;
|
||||||
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
.Substation{
|
.Substation{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -57,6 +57,7 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
color: #d8e9a5;
|
color: #d8e9a5;
|
||||||
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
.psdSystem{
|
.psdSystem{
|
||||||
|
|
||||||
|
@ -304,6 +304,8 @@ export default {
|
|||||||
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
||||||
} else if (error.code == '10001') {
|
} else if (error.code == '10001') {
|
||||||
this.tipsMsg = '教员机尚未登录,请稍后重试!';
|
this.tipsMsg = '教员机尚未登录,请稍后重试!';
|
||||||
|
} else if (error.code == '10013' || error.code == '10014') {
|
||||||
|
this.tipsMsg = '该账号权限不足!';
|
||||||
} else {
|
} else {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
}
|
}
|
||||||
@ -452,6 +454,8 @@ export default {
|
|||||||
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
||||||
} else if (error.code == '10001') {
|
} else if (error.code == '10001') {
|
||||||
this.tipsMsg = '教员机尚未登录,请稍后重试!';
|
this.tipsMsg = '教员机尚未登录,请稍后重试!';
|
||||||
|
} else if (error.code == '10013' || error.code == '10014') {
|
||||||
|
this.tipsMsg = '该账号权限不足';
|
||||||
} else {
|
} else {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
}
|
}
|
||||||
@ -544,14 +548,6 @@ export default {
|
|||||||
};
|
};
|
||||||
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
|
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
|
||||||
} else if (this.$route.query.type === 'ILW') {
|
} else if (this.$route.query.type === 'ILW') {
|
||||||
// const ilwQuery = {
|
|
||||||
// mapid: query.mapId,
|
|
||||||
// group: query.group,
|
|
||||||
// project: getSessionStorage('project'),
|
|
||||||
// token: getToken(),
|
|
||||||
// projectDevice: this.$route.query.projectDevice,
|
|
||||||
// type: this.$route.query.type
|
|
||||||
// };
|
|
||||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||||
@ -575,6 +571,20 @@ export default {
|
|||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (this.project === 'bjd') {
|
||||||
|
getLoginInfo(getToken()).then(res => {
|
||||||
|
getSimulationInfoNew(res.data.group).then(resp => {
|
||||||
|
this.$store.dispatch('app/transitionAnimations');
|
||||||
|
this.$router.push({ path: `/jointTrainingNew`, query: {
|
||||||
|
lineCode: resp.data.map.lineCode,
|
||||||
|
group: res.data.group,
|
||||||
|
mapId: resp.data.map.id,
|
||||||
|
project:this.project
|
||||||
|
}});
|
||||||
|
this.loading = false;
|
||||||
|
launchFullscreen();
|
||||||
|
});
|
||||||
|
});
|
||||||
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
|
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
|
||||||
this.$router.push({ path: this.path });
|
this.$router.push({ path: this.path });
|
||||||
} else {
|
} else {
|
||||||
|
577
src/views/newMap/displayNew/demon/planSchedule.vue
Normal file
577
src/views/newMap/displayNew/demon/planSchedule.vue
Normal file
@ -0,0 +1,577 @@
|
|||||||
|
<template>
|
||||||
|
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
|
||||||
|
<el-button size="small" style="position: fixed; top: 5px;right: 5px;" type="primary" plain @click="quit">退出</el-button>
|
||||||
|
<div class="left">
|
||||||
|
<div :id="runPlanId" />
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<data-table
|
||||||
|
ref="serviceTable1"
|
||||||
|
:height="height/2"
|
||||||
|
:config="serviceNumberConfig"
|
||||||
|
:style="{top: top-height/2+'px'}"
|
||||||
|
@touch="scheduleTouch"
|
||||||
|
/>
|
||||||
|
<data-table
|
||||||
|
ref="tripTable1"
|
||||||
|
:height="height/2"
|
||||||
|
:config="tripNumberConfig"
|
||||||
|
:style="{top: top-height/2+'px'}"
|
||||||
|
@touch="trainNumTouch"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { timeFormat } from '@/utils/date';
|
||||||
|
import DataTable from '@/views/planSchedule/menusPlan/components/dataTable';
|
||||||
|
import echarts from 'echarts';
|
||||||
|
import {toTimeStamp, formatDuring} from '@/utils/date';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
|
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||||
|
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
export default {
|
||||||
|
name: 'PlanSchedule',
|
||||||
|
components: {
|
||||||
|
DataTable
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
top: 0,
|
||||||
|
height: 0,
|
||||||
|
inter:null,
|
||||||
|
runPlanId: 'run-plan-view',
|
||||||
|
myChart: null,
|
||||||
|
PlanConvert: {},
|
||||||
|
serviceNumberConfig: {
|
||||||
|
data: [],
|
||||||
|
highlightCurrentRow: true,
|
||||||
|
handleChange: this.serviceNumberChange,
|
||||||
|
showClose: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'serviceNumber',
|
||||||
|
label: '表号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 40
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
tripNumberConfig: {
|
||||||
|
data: [],
|
||||||
|
highlightCurrentRow: true,
|
||||||
|
handleChange: this.tripNumberChange,
|
||||||
|
showClose: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'tripNumber',
|
||||||
|
label: '车次号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 40
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
realData: {},
|
||||||
|
kmRangeCoordMap: {},
|
||||||
|
absoluteTime: 2 * 3600,
|
||||||
|
indexKmRangeMap: {},
|
||||||
|
dialogLoading: false,
|
||||||
|
dialogShow: false,
|
||||||
|
seriesMap: {},
|
||||||
|
staticSeries: [],
|
||||||
|
runSeries: [],
|
||||||
|
selectSeries: [],
|
||||||
|
runPlanData: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('runPlan', [
|
||||||
|
'stations'
|
||||||
|
]),
|
||||||
|
maxWidth() {
|
||||||
|
return this.$store.state.app.width > 1920 ? 1920 : this.$store.state.app.width;
|
||||||
|
},
|
||||||
|
maxHeight() {
|
||||||
|
return this.$store.state.app.height > 1080 ? 1080 : this.$store.state.app.height;
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
return this.$t('display.runPlan.previewRunDiagram');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
maxWidth() {
|
||||||
|
this.setPosition();
|
||||||
|
},
|
||||||
|
maxHeight() {
|
||||||
|
this.setPosition();
|
||||||
|
},
|
||||||
|
'$store.state.runPlan.planLoadedCount': async function () {
|
||||||
|
try {
|
||||||
|
await this.loadChartPage();
|
||||||
|
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||||
|
if (this.dialogShow) {
|
||||||
|
await this.loadInitData();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.simulationReset': function (val) {
|
||||||
|
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||||
|
this.loadInitData();
|
||||||
|
},
|
||||||
|
'$store.state.runPlan.planSizeCount': function () {
|
||||||
|
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||||
|
},
|
||||||
|
'$store.state.socket.trainStationList': function (val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.updateRunPlanData(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.simulationOver':function(val) {
|
||||||
|
this.quit();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadRunData();
|
||||||
|
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.lineCode);
|
||||||
|
EventBus.$on('clearRunSeries', () => {
|
||||||
|
this.runSeries = [];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.destroy();
|
||||||
|
this.clearSubscribe();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async subscribe() {
|
||||||
|
this.clearSubscribe();
|
||||||
|
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||||
|
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||||
|
|
||||||
|
await this.$store.dispatch('training/setHasSubscribed');
|
||||||
|
},
|
||||||
|
clearSubscribe() {
|
||||||
|
clearSubscribe(`${displayTopic}\/${this.$route.query.group}`);
|
||||||
|
},
|
||||||
|
loadRunData() {
|
||||||
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
|
if (this.$route.query.group) {
|
||||||
|
// 获取排序的车站列表
|
||||||
|
getByGroupStationList(this.$route.query.group).then(response => {
|
||||||
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
|
getEveryDayRunPlanNew(this.$route.query.group).then(resp => { // 获取仿真运行图
|
||||||
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
|
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||||
|
this.loadChartPage();
|
||||||
|
this.setPosition();
|
||||||
|
this.loadInitData();
|
||||||
|
this.inter && clearInterval(this.inter);
|
||||||
|
this.subscribe();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
|
if (error.code == 30001) {
|
||||||
|
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||||
|
} else {
|
||||||
|
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.inter && clearInterval(this.inter);
|
||||||
|
},
|
||||||
|
serviceNumberChange(row) {
|
||||||
|
if (row) {
|
||||||
|
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
|
||||||
|
this.renderTripNumber({ serviceNumber: row.serviceNumber, tripNumber: null });
|
||||||
|
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
|
||||||
|
if (serviceObj) {
|
||||||
|
this.analyticalTripNumber(serviceObj.trainMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tripNumberChange(row) {
|
||||||
|
if (row) {
|
||||||
|
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||||
|
this.renderTripNumber({ serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async analyticalServiceNumber(data) {
|
||||||
|
this.serviceNumberConfig.data = Object.keys(data || {})
|
||||||
|
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||||
|
.map(serviceNumber => { return { serviceNumber }; });
|
||||||
|
},
|
||||||
|
async analyticalTripNumber(data) {
|
||||||
|
this.tripNumberConfig.data = Object.keys(data || {})
|
||||||
|
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||||
|
.map(tripNumber => { return { tripNumber }; });
|
||||||
|
},
|
||||||
|
async setPosition() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const top = 54;
|
||||||
|
const width = this.maxWidth * 0.85;
|
||||||
|
let height = this.maxHeight;
|
||||||
|
|
||||||
|
height = height - top;
|
||||||
|
this.$store.dispatch('runPlan/resize', { width, height });
|
||||||
|
|
||||||
|
if (this.top != top) {
|
||||||
|
this.top = top;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.height != height) {
|
||||||
|
this.height = height - top;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
updateRunPlanData(data) {
|
||||||
|
const stations = this.$store.state.runPlan.stations;
|
||||||
|
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||||
|
data.forEach(item => {
|
||||||
|
if (item && initialPlanData[item.serviceNumber]) {
|
||||||
|
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||||
|
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||||
|
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
item.secondTime = item.second;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||||
|
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||||
|
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
||||||
|
);
|
||||||
|
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
|
||||||
|
this.myChart && this.myChart.setOption({series: series});
|
||||||
|
},
|
||||||
|
async loadChartPage() {
|
||||||
|
try {
|
||||||
|
this.seriesMap = {};
|
||||||
|
this.staticSeries = [];
|
||||||
|
const stations = this.$store.state.runPlan.stations;
|
||||||
|
const planData = this.$store.state.runPlan.planData;
|
||||||
|
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||||
|
this.pushModels(this.staticSeries, [this.PlanConvert.initializeYaxis(stations)]);
|
||||||
|
this.staticSeries = this.pushModels(this.staticSeries, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
|
||||||
|
this.staticSeries.forEach(item => {
|
||||||
|
this.seriesMap[item.name] = item;
|
||||||
|
});
|
||||||
|
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
|
} catch (error) {
|
||||||
|
this.$messageBox(`加载运行图数据失败`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async loadInitData() {
|
||||||
|
this.myChart && this.myChart.showLoading();
|
||||||
|
const option = {
|
||||||
|
title: {
|
||||||
|
text: '',
|
||||||
|
left: 'center'
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '30px',
|
||||||
|
left: '120px',
|
||||||
|
right: '40px',
|
||||||
|
bottom: '65px',
|
||||||
|
containLabel: true,
|
||||||
|
backgroundColor: 'floralwhite'
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
axisPointer: {
|
||||||
|
trigger: 'item',
|
||||||
|
type: 'cross'
|
||||||
|
},
|
||||||
|
formatter: this.axisTooltip,
|
||||||
|
borderWidth: 1
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: [],
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
lineStyle: {
|
||||||
|
width: 2,
|
||||||
|
color: '#d14a61'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: this.xAxisLableFormat,
|
||||||
|
textStyle: {
|
||||||
|
color: '#333'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
snap: true,
|
||||||
|
label: {
|
||||||
|
formatter: this.xAxisPointFormat,
|
||||||
|
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
splitLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
lineStyle: {
|
||||||
|
width: 2,
|
||||||
|
color: '#d14a61'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
interval: 'auto',
|
||||||
|
formatter: this.yAxisLableFormat
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
xAxisIndex: 'all',
|
||||||
|
label: {
|
||||||
|
formatter: this.yAxisPointFormat,
|
||||||
|
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
min: 0,
|
||||||
|
max: 0
|
||||||
|
},
|
||||||
|
series: [],
|
||||||
|
dataZoom: [
|
||||||
|
{
|
||||||
|
type: 'inside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fiterMode: 'filter',
|
||||||
|
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||||
|
handleSize: '80%',
|
||||||
|
handleStyle: {
|
||||||
|
color: '#fff',
|
||||||
|
shadowBlur: 3,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||||
|
shadowOffsetX: 2,
|
||||||
|
shadowOffsetY: 2
|
||||||
|
},
|
||||||
|
bottom: '20px'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
await this.xAxisInit(option);
|
||||||
|
await this.yAxisInit(option);
|
||||||
|
await this.loadInitChart(option);
|
||||||
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
},
|
||||||
|
pushModels(series, models) {
|
||||||
|
if (models && models.length) {
|
||||||
|
models.forEach(elem => {
|
||||||
|
if (elem) {
|
||||||
|
series.push(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return series;
|
||||||
|
},
|
||||||
|
loadInitChart(option) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
this.destroy();
|
||||||
|
let startValue = 3600 + this.PlanConvert.TranslationTime;
|
||||||
|
const offsetTime = 3600;
|
||||||
|
const initTime = toTimeStamp(formatDuring(parseInt(this.$route.query.initTime)));
|
||||||
|
startValue = initTime - this.PlanConvert.TranslationTime;
|
||||||
|
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||||
|
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
||||||
|
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||||
|
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||||
|
if (this.myChart) {
|
||||||
|
this.myChart.setOption(option);
|
||||||
|
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||||
|
this.myChart.on('click', this.mouseClick);
|
||||||
|
}
|
||||||
|
resolve(true);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
xAxisPointFormat(params) {
|
||||||
|
return timeFormat(params.value);
|
||||||
|
},
|
||||||
|
yAxisPointFormat(params) {
|
||||||
|
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
||||||
|
},
|
||||||
|
xAxisLableFormat(value, index) {
|
||||||
|
return timeFormat(value);
|
||||||
|
},
|
||||||
|
yAxisLableFormat(value, index) {
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
xAxisInit(option) {
|
||||||
|
const list = [];
|
||||||
|
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||||
|
list.push(time);
|
||||||
|
}
|
||||||
|
const startValue = 3600 * 6;
|
||||||
|
const offsetTime = 3600 * 1;
|
||||||
|
|
||||||
|
option.xAxis[0].data = list;
|
||||||
|
if (!option.dataZoom[0].startValue) {
|
||||||
|
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!option.dataZoom[0].endValue) {
|
||||||
|
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxisInit(option) {
|
||||||
|
if (Object.keys(this.PlanConvert).length) {
|
||||||
|
option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||||
|
option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisTooltip(param) {
|
||||||
|
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
|
||||||
|
return [
|
||||||
|
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||||
|
`车站名称: ${station.name}<br>`,
|
||||||
|
`车站公里标: ${station.kmRange} km <br>`,
|
||||||
|
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||||
|
].join('');
|
||||||
|
},
|
||||||
|
renderTripNumber(params) {
|
||||||
|
const tripNumber = params.tripNumber; // 车次号
|
||||||
|
const serviceNumber = params.serviceNumber; // 服务号
|
||||||
|
let data, markPoint;
|
||||||
|
if (tripNumber && this.seriesMap[serviceNumber]) {
|
||||||
|
const temp = this.seriesMap[serviceNumber].data.filter(elem => elem[3] == tripNumber);
|
||||||
|
if (temp.length) {
|
||||||
|
data = temp;
|
||||||
|
this.seriesMap[serviceNumber].markPoint.data.forEach(each=> {
|
||||||
|
if (each.name == temp[0][4]) {
|
||||||
|
markPoint = deepAssign({}, {data:[each]});
|
||||||
|
markPoint.symbol = 'roundRect';
|
||||||
|
markPoint.symbolSize = 1;
|
||||||
|
markPoint.data[0].label.color = '#f00';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (this.seriesMap[serviceNumber]) {
|
||||||
|
markPoint = deepAssign({}, this.seriesMap[serviceNumber].markPoint);
|
||||||
|
markPoint.data.forEach(each => {
|
||||||
|
each.label.color = '#f00';
|
||||||
|
});
|
||||||
|
data = this.seriesMap[serviceNumber].data;
|
||||||
|
}
|
||||||
|
this.selectSeries = [{
|
||||||
|
name: 'trainLabel',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#f00',
|
||||||
|
width: 2,
|
||||||
|
type: 'solid'
|
||||||
|
},
|
||||||
|
z: 10,
|
||||||
|
type: 'line',
|
||||||
|
markPoint:markPoint,
|
||||||
|
animation: false,
|
||||||
|
data: data
|
||||||
|
}];
|
||||||
|
const series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||||
|
this.myChart && this.myChart.setOption({series: series});
|
||||||
|
},
|
||||||
|
mouseClick(params) {
|
||||||
|
const model = {
|
||||||
|
serviceNumber: params.seriesName
|
||||||
|
};
|
||||||
|
this.$store.dispatch('runPlan/setSelected', model);
|
||||||
|
},
|
||||||
|
reSize(opt) {
|
||||||
|
if (this.myChart) {
|
||||||
|
this.myChart.resize({
|
||||||
|
width: opt.width,
|
||||||
|
height: opt.height,
|
||||||
|
silent: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
destroy() {
|
||||||
|
if (this.myChart && this.myChart.isDisposed) {
|
||||||
|
this.myChart.dispose();
|
||||||
|
this.myChart = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scheduleTouch() {
|
||||||
|
|
||||||
|
},
|
||||||
|
trainNumTouch() {
|
||||||
|
|
||||||
|
},
|
||||||
|
quit() {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped rel="stylesheet/scss" lang="scss">
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
#PlanSchedule {
|
||||||
|
z-index: 5;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
height: 100%;
|
||||||
|
width: 85%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
height: 100%;
|
||||||
|
width: 15%;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ {
|
||||||
|
.el-dialog {
|
||||||
|
height: 100%;
|
||||||
|
max-height: 1080px;
|
||||||
|
}
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0px !important;
|
||||||
|
background-color: floralwhite !important;
|
||||||
|
}
|
||||||
|
.el-dialog__headerbtn .el-dialog__close {
|
||||||
|
font-size: 18px;
|
||||||
|
border: 1px solid #909399;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -96,7 +96,6 @@ export default {
|
|||||||
this.startLoading = true;
|
this.startLoading = true;
|
||||||
if (this.$route.query.trainingId) {
|
if (this.$route.query.trainingId) {
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
this.$store.dispatch('training/setMapDefaultState');
|
|
||||||
startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => {
|
startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => {
|
||||||
this.$store.dispatch('training/setTrainingStart', true);
|
this.$store.dispatch('training/setTrainingStart', true);
|
||||||
this.$store.dispatch('training/examModeStart');
|
this.$store.dispatch('training/examModeStart');
|
||||||
|
@ -154,7 +154,6 @@ export default {
|
|||||||
start() {
|
start() {
|
||||||
// 清空按钮操作
|
// 清空按钮操作
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
this.$store.dispatch('training/setMapDefaultState');
|
|
||||||
this.startLoading = true;
|
this.startLoading = true;
|
||||||
if (this.trainingObj && this.trainingObj.id) {
|
if (this.trainingObj && this.trainingObj.id) {
|
||||||
startTrainingNew(this.trainingObj, this.group).then(response => {
|
startTrainingNew(this.trainingObj, this.group).then(response => {
|
||||||
|
@ -346,7 +346,7 @@ export default {
|
|||||||
this.$store.dispatch('training/over').then(() => {
|
this.$store.dispatch('training/over').then(() => {
|
||||||
this.backLoading = true;
|
this.backLoading = true;
|
||||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||||
if (this.$route.query.projectDevice) {
|
if (this.$route.query.projectDevice || this.$route.query.project === 'bjd') {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
|
@ -190,7 +190,22 @@ export default {
|
|||||||
this.$emit('runPlanLoadShow');
|
this.$emit('runPlanLoadShow');
|
||||||
},
|
},
|
||||||
viewRunPlan() {
|
viewRunPlan() {
|
||||||
this.$refs.runPlanView.doShow();
|
if (this.$route.query.project === 'bjd') {
|
||||||
|
const routeData = this.$router.resolve({
|
||||||
|
path:'/planSchedule/window',
|
||||||
|
query:{
|
||||||
|
mapId:this.$route.query.mapId,
|
||||||
|
group:this.$route.query.group,
|
||||||
|
lineCode: this.$route.query.lineCode,
|
||||||
|
project: this.$route.query.project,
|
||||||
|
noPreLogout: true,
|
||||||
|
initTime: this.$store.state.training.initTime
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
|
} else {
|
||||||
|
this.$refs.runPlanView.doShow();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 选择车站
|
// 选择车站
|
||||||
switchStationMode(stationCode) {
|
switchStationMode(stationCode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user