Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
0c527d8b63
BIN
src/assets/icon/favicon_cgy.png
Normal file
BIN
src/assets/icon/favicon_cgy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 228 KiB |
@ -259,13 +259,6 @@ export default class Section extends Group {
|
||||
sectionCutOff() {
|
||||
const lineWidth = this.style.Section.line.width + (this.model.status != '01' ? this.style.Section.line.beyondWidth : 0);
|
||||
if (this.line) {
|
||||
if (this.model.relSwitchCode) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
|
||||
if (switchModel && switchModel.reversePosition && !switchModel.blockade && switchModel.sectionCCode == this.model.code) {
|
||||
// debugger;
|
||||
this.line.setZleve(this.z + 8);
|
||||
}
|
||||
}
|
||||
this.line.animateStyle(true, [
|
||||
{ time: 0, styles: { lineWidth: lineWidth } },
|
||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||
|
@ -572,26 +572,14 @@ export default class Switch extends Group {
|
||||
section.show();
|
||||
}
|
||||
if (sectionModel.cutOff) {
|
||||
// section.hide();
|
||||
// section.animateStyle(true, [
|
||||
// { time: 0, styles: { stroke: sectionModel.instance.line.section.style.stroke } },
|
||||
// { time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||
// { time: 2000, styles: { stroke: sectionModel.instance.line.section.style.stroke } }
|
||||
// ]);
|
||||
// const color = sectionModel.instance.line.section.style.stroke;
|
||||
// section && section.animateStyle(item => {
|
||||
// // item.animateStyle(true, [
|
||||
// // { time: 0, styles: { stroke: color } },
|
||||
// // { time: 500, styles: { stroke: this.style.backgroundColor } },
|
||||
// // { time: 1000, styles: { stroke: color } }
|
||||
// // ]);
|
||||
// item.animateStyle(true)
|
||||
// // this.style.backgroundColor
|
||||
// .when(0, { stroke: color })
|
||||
// .when(1000, { stroke:'#FF0000'})
|
||||
// .when(2000, { stroke:color })
|
||||
// .start();
|
||||
// });
|
||||
const lineWidth = sectionModel.instance.line.section.style.lineWidth;
|
||||
section && section.animateStyle(item => {
|
||||
let an = item.animateStyle(true);
|
||||
an = an.when(0, {lineWidth: lineWidth});
|
||||
an = an.when(1000, {stroke: this.style.backgroundColor});
|
||||
an = an.when(2000, {lineWidth: lineWidth});
|
||||
an.start();
|
||||
});
|
||||
}
|
||||
}
|
||||
setAshShow() {
|
||||
|
@ -119,7 +119,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||
]
|
||||
},
|
||||
|
||||
/** 暂不生成实训 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -136,6 +136,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
/** 暂不生成实训 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -186,14 +187,13 @@ export default {
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总取消({3} 进路)',
|
||||
trainingRemark: '总取消功能',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{ // 不生成实训
|
||||
@ -245,7 +245,7 @@ export default {
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({3} 进路)',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
// pointdata.directionCode = train.directionCode;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
@ -110,7 +109,6 @@ export default {
|
||||
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
}
|
||||
@ -121,7 +119,6 @@ export default {
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||
|
@ -165,67 +165,72 @@ export default {
|
||||
/** 按服务遍历数据*/
|
||||
data.serviceNumberDataList.forEach((service) => {
|
||||
/** 按车次遍历数据*/
|
||||
var isBackup = true;
|
||||
// var isBackup = true;
|
||||
var opt = { name: '', markPointData: [], data: [] };
|
||||
if (service.tripNumberDataList && service.tripNumberDataList.length) {
|
||||
service.tripNumberDataList.forEach((train, j) => {
|
||||
var pointdata = {};
|
||||
var idx = 0;
|
||||
var num = 0;
|
||||
var lastPoint = null;
|
||||
var nextPoint = null;
|
||||
|
||||
/** 如果车次号为空,不显示名称*/
|
||||
if (train.tripNumber) {
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
|
||||
|
||||
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
|
||||
// pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.name = '' + service.serviceNumber;
|
||||
opt.markPointData.push(createMartPoint(pointdata));
|
||||
/** 创建服务号名称*/
|
||||
opt.name = `${service.serviceNumber}`;
|
||||
}
|
||||
|
||||
/** 计算非折返点车次点坐标集合*/
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// ${train.directionCode}
|
||||
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
}
|
||||
});
|
||||
|
||||
/** 计算折返点车次坐标点集合*/
|
||||
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
|
||||
lastPoint = train.stationTimeList[idx];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||
}
|
||||
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
opt = { name: '', markPointData: [], data: [] };
|
||||
}
|
||||
}
|
||||
|
||||
isBackup = train.backup;
|
||||
});
|
||||
|
||||
// 不是备用车,按服务添加线
|
||||
if (!isBackup) {
|
||||
if (!service.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
}
|
||||
@ -280,7 +285,8 @@ export default {
|
||||
}
|
||||
serie.markPoint.data.push(createMartPoint({
|
||||
directionCode: directionCode,
|
||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
||||
// coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
|
||||
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
|
||||
color: lineStyle.color || '#000'
|
||||
}));
|
||||
@ -288,12 +294,16 @@ export default {
|
||||
}
|
||||
|
||||
/** 计算折返点*/
|
||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
|
||||
// var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
|
||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
|
||||
if (serie.data.length > 0) {
|
||||
var lastPoint = serie.data[serie.data.length - 1];
|
||||
if (lastPoint[2] !== nextPoint[2]) {
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
var num = this.computedReentryNumber(elem.tripNumber);
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
|
||||
// serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
// serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,10 @@ class TransformHandle {
|
||||
const stand = store.getters['map/getDeviceByCode'](view.model.standCode);
|
||||
const station = store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
this.handleStationViewTransform(view, station);
|
||||
} else if (view.model && view.model._type === 'Train' && view.model.sectionModel) {
|
||||
const belongStation = view.model.sectionModel.belongStation;
|
||||
const station = store.getters['map/getDeviceByCode'](belongStation);
|
||||
this.handleStationViewTransform(view, station);
|
||||
} else if (view.model && (view.model.belongStation || view.model.belongStationCode)) {
|
||||
const belongStation = view.model.belongStation || view.model.belongStationCode;
|
||||
const station = store.getters['map/getDeviceByCode'](belongStation);
|
||||
|
@ -14,6 +14,7 @@ import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
|
||||
import FaviconNty from '@/assets/icon/favicon_nty.png';
|
||||
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
|
||||
import FaviconSdy from '@/assets/icon/favicon_jdy.png';
|
||||
import FaviconCgy from '@/assets/icon/favicon_cgy.png';
|
||||
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
|
||||
import Link_Crsc from '@/assets/icon/link_crsc.png';
|
||||
import Link_Hls from '@/assets/icon/link_hls.png';
|
||||
@ -190,6 +191,24 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '014'
|
||||
},
|
||||
cgy: {
|
||||
title: '成都工业职业技术学院轨道交通虚拟仿真实训平台',
|
||||
loginPath: '/login?project=cgy',
|
||||
loginParam: 'CGY',
|
||||
titleDistance: '-150px',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '011'
|
||||
},
|
||||
designcgy: {
|
||||
title: '成都工业职业技术学院轨道交通虚拟仿真设计平台',
|
||||
loginPath: '/design/login?project=cgy',
|
||||
loginParam: 'CGY',
|
||||
titleDistance: '-150px',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
systemTYpe: '011'
|
||||
},
|
||||
heb: {
|
||||
title: '城市轨道交通综合行车模拟仿真系统V1.0',
|
||||
loginTitle: '城市轨道交通综合行车模拟仿真系统V1.0',
|
||||
@ -422,7 +441,9 @@ export const ProjectIcon = {
|
||||
bjd: FaviconBjd,
|
||||
designbjd: FaviconBjd,
|
||||
sdy: FaviconSdy,
|
||||
designsdy: FaviconSdy
|
||||
designsdy: FaviconSdy,
|
||||
cgy: FaviconCgy,
|
||||
designcgy: FaviconCgy
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
@ -447,15 +468,17 @@ export const ProjectCode = {
|
||||
bjd: 'BJD',
|
||||
designbjd: 'BJD',
|
||||
sdy: 'SDY',
|
||||
designsdy: 'SDY'
|
||||
designsdy: 'SDY',
|
||||
cgy: 'CGY',
|
||||
designcgy: 'CGY'
|
||||
};
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
||||
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 登录页样式
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb'];
|
||||
export const NoSimulationQrCodeList = ['heb', 'bjd'];
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
@ -490,7 +513,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
ntyl: '/design/login?project=ntyl',
|
||||
designntyl: '/login?project=ntyl',
|
||||
ntyc: '/design/login?project=ntyc',
|
||||
designntyc: '/login?project=ntyc'
|
||||
designntyc: '/login?project=ntyc',
|
||||
cgy: '/design/login?project=cgy',
|
||||
designcgy: '/login?project=cgy'
|
||||
};
|
||||
export const ProjectList = [
|
||||
{value:'xty', label:'西铁院'},
|
||||
@ -503,7 +528,8 @@ export const ProjectList = [
|
||||
{value: 'ntyl', label: '南铁院(本地版)'},
|
||||
{value: 'bjd', label: '北交大'},
|
||||
{value: 'urtss', label: '陪标项目'},
|
||||
{value: 'sdy', label: '苏电院'}
|
||||
{value: 'sdy', label: '苏电院'},
|
||||
{value: 'cgy', label: '成都工业'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
localdesign: 'designheb',
|
||||
|
@ -71,7 +71,8 @@ export default {
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
@ -91,7 +92,8 @@ export default {
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
|
@ -59,7 +59,8 @@ export default {
|
||||
rules: {
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
// {required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
{required: true, validator: this.validateServiceNo, trigger: 'change'}
|
||||
],
|
||||
beginTime: [
|
||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||
@ -138,14 +139,17 @@ export default {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const newValue = parseInt(value);
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue.toString() != value) {
|
||||
this.formModel.serviceNumber = newValue;
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
return callback(new Error('该服务号已存在'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
@ -155,6 +159,18 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
validateServiceNo(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
validateRunningRouting(rule, value, callback) {
|
||||
if (value.trim().length == 0) {
|
||||
return callback(new Error('请选择环路'));
|
||||
@ -204,7 +220,7 @@ export default {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.doClose();
|
||||
// this.doClose();
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
});
|
||||
|
@ -77,7 +77,8 @@ export default {
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
// new Error('该服务号已存在');
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
@ -97,7 +98,8 @@ export default {
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user