修改imagecontrol 为 resource
This commit is contained in:
parent
882bb44fb2
commit
6d959b816b
@ -44,9 +44,9 @@ deviceRender[deviceType.StationControl] = {
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
/** ImageControl渲染配置*/
|
||||
deviceRender[deviceType.ImageControl] = {
|
||||
_type: deviceType.ImageControl,
|
||||
/** Resource渲染配置*/
|
||||
deviceRender[deviceType.Resource] = {
|
||||
_type: deviceType.Resource,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@ const deviceType = {
|
||||
ZcControl: 'ZcControl',
|
||||
LcControl: 'LcControl',
|
||||
LimitControl: 'LimitControl',
|
||||
ImageControl: 'ImageControl',
|
||||
Resource: 'Resource',
|
||||
Station: 'Station',
|
||||
StationStand: 'StationStand',
|
||||
Esp: 'Esp',
|
||||
|
@ -4,7 +4,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
|
||||
export default class ImageControl extends Group {
|
||||
export default class Resource extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
@ -2,7 +2,7 @@ import deviceType from '../constant/deviceType';
|
||||
import Section from './Section/index.js';
|
||||
import Signal from './Signal/index.js';
|
||||
import Station from './Station/index.js';
|
||||
import ImageControl from './ImageControl/index.js';
|
||||
import Resource from './Resource/index.js';
|
||||
import LcControl from './LcControl/index.js';
|
||||
import LimitControl from './LimitControl/index.js';
|
||||
import Switch from './Switch/index.js';
|
||||
@ -22,7 +22,7 @@ const mapShape = {};
|
||||
mapShape[deviceType.Section] = Section;
|
||||
mapShape[deviceType.Signal] = Signal;
|
||||
mapShape[deviceType.Station] = Station;
|
||||
mapShape[deviceType.ImageControl] = ImageControl;
|
||||
mapShape[deviceType.Resource] = Resource;
|
||||
mapShape[deviceType.LcControl] = LcControl;
|
||||
mapShape[deviceType.LimitControl] = LimitControl;
|
||||
mapShape[deviceType.Switch] = Switch;
|
||||
|
@ -100,7 +100,7 @@ export function parser(data, skinCode) {
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.resourceList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.ImageControl, elem, propConvert);
|
||||
mapDevice[elem.code] = createDevice(deviceType.Resource, elem, propConvert);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.trainList || [], elem => {
|
||||
@ -198,7 +198,7 @@ export function updateMapData(state, model) {
|
||||
case deviceType.StationDelayUnlock:updateForList(model, state, 'stationDelayUnlockList'); break;
|
||||
case deviceType.LcControl: updateForList(model, state, 'lcControlList'); break;
|
||||
case deviceType.LimitControl: updateForList(model, state, 'tempSpeedLimitList'); break;
|
||||
case deviceType.ImageControl: updateForList(model, state, 'imageControl'); break;
|
||||
case deviceType.Resource: updateForList(model, state, 'resourceList'); break;
|
||||
case deviceType.Train: updateForList(model, state, 'trainList'); break;
|
||||
case deviceType.TrainWindow: updateForList(model, state, 'trainWindowList'); break;
|
||||
case deviceType.Line: updateForList(model, state, 'lineList'); break;
|
||||
|
@ -36,7 +36,7 @@ import ConfigData from './config/data';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'ImageControlDraft',
|
||||
name: 'ResourceDraft',
|
||||
components: {
|
||||
ConfigList,
|
||||
ConfigData
|
||||
@ -185,7 +185,7 @@ export default {
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'ImageControl'.toUpperCase()) {
|
||||
if (selected && selected._type.toUpperCase() === 'Resource'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
@ -193,9 +193,9 @@ export default {
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID('ImageControl', this.resourceList);
|
||||
const uid = getUID('Resource', this.resourceList);
|
||||
const model = {
|
||||
_type: 'ImageControl',
|
||||
_type: 'Resource',
|
||||
code: uid,
|
||||
name: uid,
|
||||
width: this.addModel.width,
|
||||
@ -216,7 +216,7 @@ export default {
|
||||
edit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'ImageControl'}, this.editModel);
|
||||
const data = Object.assign({_type: 'Resource'}, this.editModel);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
@ -224,7 +224,7 @@ export default {
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'ImageControl'.toUpperCase()) {
|
||||
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'),
|
||||
|
@ -149,9 +149,9 @@
|
||||
/>
|
||||
</el-tab-pane> -->
|
||||
|
||||
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="ImageControl">
|
||||
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="Resource">
|
||||
<Image-control-draft
|
||||
ref="ImageControl"
|
||||
ref="Resource"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
|
@ -319,7 +319,7 @@ export default {
|
||||
signalModel.sectionCode = section.code;
|
||||
}
|
||||
if (!section.code) {
|
||||
this.questionList.push(`${item.name} 信号机位置可能不正确,请手动调试归属区段及偏移量.`);
|
||||
this.questionList.push(`${item.name}(${item.code}) 信号机位置可能不正确,请手动调试归属区段及偏移量.`);
|
||||
}
|
||||
signalModel.sectionOffset = this.addModel.number;
|
||||
if (signalModel.right) {
|
||||
|
Loading…
Reference in New Issue
Block a user