Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
9580d4b966
@ -262,9 +262,6 @@ class Jlmap {
|
||||
const sectionC = this.mapDevice[item.sectionCCode];
|
||||
if (sectionA && sectionB && sectionC) {
|
||||
item['cutOff'] = sectionA.cutOff;
|
||||
item['sectionAstatus'] = sectionA.status;
|
||||
item['sectionBstatus'] = sectionB.status;
|
||||
item['sectionCstatus'] = sectionC.status;
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,9 +278,6 @@ class Jlmap {
|
||||
const sectionC = this.mapDevice[swch.sectionCCode];
|
||||
if (sectionA && sectionB && sectionC) {
|
||||
swch['cutOff'] = sectionA.cutOff;
|
||||
swch['sectionAstatus'] = sectionA.status;
|
||||
swch['sectionBstatus'] = sectionB.status;
|
||||
swch['sectionCstatus'] = sectionC.status;
|
||||
}
|
||||
|
||||
this.$painter.update(swch);
|
||||
|
@ -434,7 +434,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
sectionCutOff(section) {
|
||||
const lineWidth = this.style.Section.line.width + (this.model.sectionAstatus != '01' ? this.style.Section.line.beyondWidth : 0);
|
||||
const lineWidth = this.style.Section.line.width;
|
||||
if (section) {
|
||||
section.animateStyle(true, [
|
||||
{ time: 0, styles: { lineWidth: lineWidth } },
|
||||
|
@ -5,6 +5,7 @@ import TurnbackBar from '@/components/TurnbackBar';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Dictionary from '@/scripts/DictionaryData';
|
||||
import Theme from '@/jmapNew/theme/factory';
|
||||
import store from './../store/index_Common';
|
||||
|
||||
// 全局组件
|
||||
Vue.component('DataForm', DataForm);
|
||||
|
@ -149,9 +149,9 @@ export function deepAssign(obj, item) {
|
||||
const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象
|
||||
for (const keys in item) {
|
||||
if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝
|
||||
if (item[keys] && typeof item[keys] === 'object') { // 如果值是对象,就递归一下
|
||||
target[keys] = item[keys].constructor === Array ? [] : {};
|
||||
target[keys] = deepClone(item[keys]);
|
||||
if (item[keys] && typeof item[keys] == 'object') { // 如果值是对象,就递归一下
|
||||
const targetObj = item[keys].constructor == Array ? [] : {};
|
||||
target[keys] = deepAssign(targetObj, item[keys]);
|
||||
} else {
|
||||
target[keys] = item[keys];
|
||||
}
|
||||
|
@ -312,7 +312,6 @@ export default {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID(this.addModel.type, this.selectLists); // 根据类型写 uid 前缀命名
|
||||
const models = [];
|
||||
const model = {
|
||||
_type: this.addModel.type,
|
||||
code: uid,
|
||||
@ -326,8 +325,7 @@ export default {
|
||||
cycleCode: this.addModel.cycleCode, // 自动折返关联code
|
||||
stationCode: this.addModel.stationCode // 所属设备集中站
|
||||
};
|
||||
models.push(model);
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$emit('updateMapModel', model);
|
||||
this.$refs.make.resetForm();
|
||||
}
|
||||
});
|
||||
@ -337,7 +335,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||
this.$emit('updateMapModel', [data]);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -226,16 +226,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Resource'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('map.confirm'),
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -204,16 +204,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -151,11 +151,6 @@ export default {
|
||||
models.push(Model);
|
||||
});
|
||||
});
|
||||
// this.seclectDeviceList.forEach(model => {
|
||||
// const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](model.code));
|
||||
// Model.stationCode = this.stationCode;
|
||||
// models.push(Model);
|
||||
// });
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('设置设备集中站成功');
|
||||
this.stationCode = '';
|
||||
|
@ -501,7 +501,6 @@ export default {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID(this.getIdPrefix(this.addModel.type), this.selectLists); // 根据类型写 uid 前缀命名
|
||||
const models = [];
|
||||
const model = {
|
||||
_type: this.addModel.type,
|
||||
type: this.addModel.type,
|
||||
@ -516,8 +515,7 @@ export default {
|
||||
stationCode: this.addModel.stationCode, // 所属设备集中站
|
||||
switchCode: this.addModel.switchCode
|
||||
};
|
||||
models.push(model);
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$emit('updateMapModel', model);
|
||||
this.$refs.make.resetForm();
|
||||
}
|
||||
});
|
||||
@ -527,7 +525,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||
this.$emit('updateMapModel', [data]);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -228,16 +228,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Counter'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('map.confirm'),
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -210,16 +210,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('map.confirm'),
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +325,7 @@ export default {
|
||||
this.$emit('showMap');
|
||||
},
|
||||
handleSelectControlPage(device) {
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', 'SwitchFault',
|
||||
'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'];
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', 'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'];
|
||||
const type = device._type;
|
||||
if (this.stationType) {
|
||||
this.enabledTab = 'Station';
|
||||
|
@ -206,16 +206,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'LcControl'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -213,9 +213,9 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
@ -234,18 +234,6 @@ export default {
|
||||
delPointAddModel(index) {
|
||||
this.addModel.points.splice(index, 1);
|
||||
},
|
||||
clear() {
|
||||
this.addModel = {
|
||||
type: '',
|
||||
width: 1,
|
||||
showConditions: '01',
|
||||
lineColor: 'rgba(255, 255, 255, 1)',
|
||||
points: [
|
||||
{ x: 0, y: 0 },
|
||||
{ x: 100, y: 100 }
|
||||
]
|
||||
};
|
||||
},
|
||||
create() {
|
||||
this.$refs['make'].validate((valid) => {
|
||||
if (valid) {
|
||||
@ -261,7 +249,7 @@ export default {
|
||||
points: JSON.parse(pointArr)
|
||||
};
|
||||
this.$emit('updateMapModel', model);
|
||||
this.clear();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
} else {
|
||||
this.$message.console.error(this.$t('tip.cannotCoincide'));
|
||||
|
||||
@ -282,16 +270,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -257,16 +257,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'OutFrame'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -271,17 +271,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -502,14 +502,9 @@ export default {
|
||||
this.clear();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.points = JSON.parse(JSON.stringify(selected.points));
|
||||
this.editModel.lengthFact = selected.lengthFact || 0; // 过滤非正常数值
|
||||
this.oldPoint = JSON.parse(JSON.stringify(selected.points));
|
||||
this.oldPoint = selected.points;
|
||||
this.oldLeftSectionCode = selected.leftSectionCode;
|
||||
this.oldRightSectionCode = selected.rightSectionCode;
|
||||
this.editModel.leftAxlePosition = selected.leftAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.rightAxlePosition = selected.rightAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.belongStation = selected.belongStation || '';
|
||||
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt(new JTriangle(selected.points[0], selected.points[selected.points.length - 1]).abspowz);
|
||||
this.$refs.splitOrMerge.addModel.splitOffset = this.$refs.splitOrMerge.addModel.splitOffsetMax / 2;
|
||||
@ -583,8 +578,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleOtherSectionChange(model) {
|
||||
// 处理该区段改变导致的相关区段的变化
|
||||
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
||||
const models = [];
|
||||
const pointModel = [];
|
||||
const slope1 = (this.oldPoint[this.oldPoint.length - 1].y - this.oldPoint[0].y) / (this.oldPoint[this.oldPoint.length - 1].x - this.oldPoint[0].x);
|
||||
@ -592,7 +586,6 @@ export default {
|
||||
if (section.parentCode === model.code) { // 逻辑区段
|
||||
const copySection = deepAssign({}, section);
|
||||
copySection.logicSectionShow = model.logicSectionShow;
|
||||
// copySection.lengthFact = (Number(model.lengthFact) / model.logicSectionCodeList.length).toFixed(3); // 容易处理成无限大
|
||||
copySection.stationCode = model.stationCode; // 给元素 子逻辑区段设置 设备集中站
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) {
|
||||
copySection.points[0] = model.points[0];
|
||||
@ -600,7 +593,7 @@ export default {
|
||||
copySection.points[copySection.points.length - 1] = model.points[model.points.length - 1];
|
||||
}
|
||||
models.push(copySection);
|
||||
} else if (model.code !== section.code && (section.type === '01' || section.type === '03' || section.type === '02')) {
|
||||
} else if (model.code !== section.code && section.type != '04') {
|
||||
const copySection = deepAssign({}, section);
|
||||
let updataFlag = false;
|
||||
if (model.leftSectionCode !== this.oldLeftSectionCode) {
|
||||
@ -622,13 +615,10 @@ export default {
|
||||
}
|
||||
}
|
||||
if (model.parentCode == copySection.code) { // 物理区段
|
||||
let lengthFact = 0;
|
||||
copySection.logicSectionCodeList.forEach(code => {
|
||||
if (model.code != code) {
|
||||
const localSectionModel = this.$store.getters['map/getDeviceByCode'](code);
|
||||
lengthFact += Number(localSectionModel.lengthFact);
|
||||
}
|
||||
});
|
||||
let lengthFact = copySection.logicSectionCodeList.filter(code => model.code != code).reduce((pre, code) => {
|
||||
const length = this.$store.getters['map/getDeviceByCode'](code).lengthFact;
|
||||
return pre + Number(length);
|
||||
}, 0);
|
||||
lengthFact += model.lengthFact;
|
||||
copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||
if (copySection.lengthFact > 5) {
|
||||
@ -696,7 +686,6 @@ export default {
|
||||
models = [...models, ...deleteObjAssociatedSection];
|
||||
this.$emit('updateMapModel', models);
|
||||
this.clear();
|
||||
this.deviceSelect();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
@ -736,15 +725,7 @@ export default {
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
// 新加属性需要单独在这里清除(避免老数据无新属性,深拷贝是未获取属性,沿用上一个设备的属性导致的数据污染)
|
||||
this.editModel.logicSectionCodeList = [];
|
||||
this.editModel.rightSectionCode = '';
|
||||
this.editModel.leftSectionCode = '';
|
||||
this.editModel.rightAxleOffset = {x:0, y:0};
|
||||
this.editModel.leftAxleOffset = {x:0, y:0};
|
||||
this.editModel.leftAxlePosition = 0;
|
||||
this.editModel.rightAxlePosition = 0;
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields(); // 表单重置 移入校验结果
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -33,12 +33,7 @@
|
||||
<el-form ref="signalType" label-width="130px" :model="typeModel" size="mini" style="margin-top: 40px">
|
||||
<el-form-item label="信号机类型:" prop="type">
|
||||
<el-select v-model="typeModel.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in signalTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
<el-option v-for="item in signalTypeList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -50,22 +45,12 @@
|
||||
<el-form ref="signalCiStation" label-width="130px" :model="ciModel" size="mini" style="margin-top: 40px;">
|
||||
<el-form-item label="信号机范围:">
|
||||
<el-select v-model="ciModel.stationList" multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in centralizedStationList"
|
||||
:key="item.code"
|
||||
:label="item.name+'下信号机'"
|
||||
:value="item.code"
|
||||
/>
|
||||
<el-option v-for="item in centralizedStationList" :key="item.code" :label="item.name+'下信号机'" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="归属连锁站:">
|
||||
<el-select v-model="ciModel.ciStation" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in ciStationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
<el-option v-for="item in ciStationList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -133,7 +118,6 @@ export default {
|
||||
SignalLampPostTypeList: [],
|
||||
SignalLampPositionTypeList: [],
|
||||
SignalPositionTypeList: [],
|
||||
// SignalUseTypeList: [],
|
||||
failTypes: [
|
||||
{ code: '00', name: this.$t('map.normal') },
|
||||
{ code: '01', name: this.$t('map.signalFilamentAlarm') }
|
||||
@ -277,7 +261,6 @@ export default {
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
|
||||
{ prop: 'interlockStationCode', label: '所属联锁站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.ciStationList},
|
||||
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
|
||||
// { prop: 'useType', label: this.$t('map.signalUseType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList },
|
||||
{ prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList },
|
||||
{ prop: 'sectionOffset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') }
|
||||
|
||||
@ -340,10 +323,6 @@ export default {
|
||||
this.$Dictionary.signalPositionType().then(list => {
|
||||
this.SignalPositionTypeList = list;
|
||||
});
|
||||
|
||||
// this.$Dictionary.signalUseType().then(list => {
|
||||
// this.SignalUseTypeList = list;
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
deviceChange(code) {
|
||||
@ -355,14 +334,6 @@ export default {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.rotate = selected.rotate || 0; // 角度
|
||||
this.editModel.type = selected.type || '';
|
||||
this.editModel.interlockStationCode = selected.interlockStationCode || '';
|
||||
if (!selected.positionPoint) {
|
||||
this.editModel.positionPoint.x = 0;
|
||||
this.editModel.positionPoint.y = 0;
|
||||
}
|
||||
this.editModel.right = Boolean(selected.right);
|
||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'selectSingalCode'.toUpperCase()) {
|
||||
if (selected.type == '01' || selected.type === '03') {
|
||||
this.$refs.createSignal.setSectionCode(selected.code);
|
||||
@ -394,17 +365,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type === 'Signal') {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -292,12 +292,10 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
// this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.runPlanName = selected.runPlanName || '';
|
||||
// 被控制的车站数据
|
||||
const beCentralizedStation = {};
|
||||
this.stationList.forEach(data=>{
|
||||
@ -478,16 +476,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -235,8 +235,7 @@ export default {
|
||||
};
|
||||
// 清空表单验证提示信息
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform &&
|
||||
this.$refs.dataform.clearValidate();
|
||||
this.$refs.dataform && this.$refs.dataform.clearValidate();
|
||||
});
|
||||
|
||||
return rules;
|
||||
@ -493,7 +492,6 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
@ -511,11 +509,10 @@ export default {
|
||||
models.push(deepAssign(item, { _dispose: true }));
|
||||
}
|
||||
});
|
||||
_that.$emit('updateMapModel', models);
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -98,6 +98,9 @@ export default {
|
||||
},
|
||||
deleteObj() {
|
||||
this.$refs.switchModel.deleteObj();
|
||||
},
|
||||
edit() {
|
||||
this.$refs.switchModel.edit();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -103,8 +103,7 @@ export default {
|
||||
};
|
||||
// 清空表单验证提示信息
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform &&
|
||||
this.$refs.dataform.clearValidate();
|
||||
this.$refs.dataform && this.$refs.dataform.clearValidate();
|
||||
});
|
||||
|
||||
return rules;
|
||||
@ -148,17 +147,16 @@ export default {
|
||||
const models = [];
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
models.push(deepAssign(selected, { _dispose: true }));
|
||||
_that.$emit('updateMapModel', models);
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelGeneration'));
|
||||
this.$message.info(this.$t('tip.cancelGeneration'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -232,16 +232,15 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Text'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +348,6 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'TrainWindow'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
@ -363,10 +362,10 @@ export default {
|
||||
}
|
||||
});
|
||||
models.push(deepAssign(selected, { _dispose: true }));
|
||||
_that.$emit('updateMapModel', models);
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -251,7 +251,6 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
@ -267,10 +266,10 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user