Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
025b1595c3
@ -5,17 +5,6 @@
|
|||||||
<map-system-draft ref="mapCanvas" @back="back" />
|
<map-system-draft ref="mapCanvas" @back="back" />
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<!-- <menu-demon
|
|
||||||
v-if="isDemon"
|
|
||||||
ref="menuDemon"
|
|
||||||
:offset="offset"
|
|
||||||
:offset-bottom="offsetBottom"
|
|
||||||
:script-id="scriptId"
|
|
||||||
@quitQuest="quitQuest"
|
|
||||||
@hidepanel="hidepanel"
|
|
||||||
@showScheduling="showScheduling"
|
|
||||||
/> -->
|
|
||||||
|
|
||||||
<chat-box ref="chatbox" :group="group" :user-role="userRole" />
|
<chat-box ref="chatbox" :group="group" :user-role="userRole" />
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
<el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||||
@ -361,6 +350,7 @@ export default {
|
|||||||
getSimulationInfoNew(this.group).then(()=>{
|
getSimulationInfoNew(this.group).then(()=>{
|
||||||
this.isscriptRun = false;
|
this.isscriptRun = false;
|
||||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||||
|
this.userRole = 'AUDIENCE';
|
||||||
this.$refs.chatbox.clearAllData();
|
this.$refs.chatbox.clearAllData();
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="card">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<operate-property
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
:form="form"
|
||||||
</div>
|
:edit-model="editModel"
|
||||||
<div class="button_box">
|
:rules="rules"
|
||||||
<el-button-group class="map-draft-group">
|
type="Arrow"
|
||||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
@updateMapModel="updateMapModel"
|
||||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
@resetData="resetData"
|
||||||
</el-button-group>
|
/>
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<div class="view-control-content">
|
||||||
@ -29,14 +28,14 @@ import ConstConfig from '@/scripts/ConstConfig';
|
|||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getUID } from '@/jmapNew/utils/Uid';
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
import ConfigList from './config/list';
|
import OperateProperty from './components/operateProperty';
|
||||||
import ConfigData from './config/data';
|
import ConfigData from './config/data';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandDraft',
|
name: 'StationStandDraft',
|
||||||
components: {
|
components: {
|
||||||
ConfigList,
|
OperateProperty,
|
||||||
ConfigData
|
ConfigData
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -150,7 +149,7 @@ export default {
|
|||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
this.$refs.form && this.$refs.form.resetFields();
|
this.$refs.form && this.$refs.form.resetFields();
|
||||||
this.$refs.createForm && this.$refs.createForm.resetFields();
|
this.$refs.createForm && this.$refs.createForm.resetFields();
|
||||||
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Arrow'.toUpperCase()) {
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
}
|
}
|
||||||
@ -189,30 +188,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改对象
|
updateMapModel(data) {
|
||||||
edit() {
|
this.$emit('updateMapModel', data);
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const data = Object.assign({_type: 'Line'}, this.editModel);
|
|
||||||
this.$emit('updateMapModel', data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 删除对象
|
resetData() {
|
||||||
deleteObj() {
|
this.$refs.form && this.$refs.form.resetFields();
|
||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
|
|
||||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
|
||||||
this.$refs.form && this.$refs.form.resetFields();
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height:100%">
|
||||||
|
<div class="view-control-content">
|
||||||
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import ConfigList from '../config/list';
|
||||||
|
export default {
|
||||||
|
name:'OperateProperty',
|
||||||
|
components: {
|
||||||
|
ConfigList
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
form:{
|
||||||
|
type:Object,
|
||||||
|
required:true
|
||||||
|
},
|
||||||
|
editModel:{
|
||||||
|
type:Object,
|
||||||
|
required:true
|
||||||
|
},
|
||||||
|
rules:{
|
||||||
|
type:Object,
|
||||||
|
required:true
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs['dataform'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const data = Object.assign({_type: this.type}, this.editModel);
|
||||||
|
this.$emit('updateMapModel', data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected) {
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||||
|
this.$emit('resetData');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -1,15 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="card">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<el-tab-pane class="view-control" label="表示状态" name="first" :lazy="lazy">
|
<el-tab-pane class="view-control" label="表示状态" name="first" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<operate-property
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="editRules" />
|
:form="form"
|
||||||
</div>
|
:edit-model="editModel"
|
||||||
<div class="button_box">
|
:rules="editRules"
|
||||||
<el-button-group class="map-draft-group">
|
:type="editModel.type"
|
||||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
@updateMapModel="updateMapModel"
|
||||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
@resetData="resetData"
|
||||||
</el-button-group>
|
/>
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<div class="view-control-content">
|
||||||
@ -30,14 +29,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getUID } from '@/jmapNew/utils/Uid';
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
import ConfigList from './config/list';
|
import OperateProperty from './components/operateProperty';
|
||||||
import ConfigData from './config/data';
|
import ConfigData from './config/data';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ControlLamp',
|
name: 'ControlLamp',
|
||||||
components: {
|
components: {
|
||||||
ConfigList,
|
OperateProperty,
|
||||||
ConfigData
|
ConfigData
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -517,30 +516,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改对象
|
updateMapModel(data) {
|
||||||
edit() {
|
this.$emit('updateMapModel', data);
|
||||||
this.$refs['dataform'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
|
||||||
this.$emit('updateMapModel', data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 删除对象
|
resetData() {
|
||||||
deleteObj() {
|
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
|
||||||
if (selected && this.controlLampTypeList.includes(selected._type)) {
|
|
||||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
|
||||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="card">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<operate-property
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
:form="form"
|
||||||
</div>
|
:edit-model="editModel"
|
||||||
<div class="button_box">
|
:rules="rules"
|
||||||
<el-button-group class="map-draft-group">
|
type="Counter"
|
||||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
@updateMapModel="updateMapModel"
|
||||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
@resetData="resetData"
|
||||||
</el-button-group>
|
/>
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<div class="view-control-content">
|
||||||
@ -48,13 +47,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getUID } from '@/jmapNew/utils/Uid';
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
import ConfigList from './config/list';
|
import OperateProperty from './components/operateProperty';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CounterDraft',
|
name: 'CounterDraft',
|
||||||
components: {
|
components: {
|
||||||
ConfigList
|
OperateProperty
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -206,30 +205,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改对象
|
updateMapModel(data) {
|
||||||
edit() {
|
this.$emit('updateMapModel', data);
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const data = Object.assign({_type: 'Counter'}, this.editModel);
|
|
||||||
this.$emit('updateMapModel', data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 删除对象
|
resetData() {
|
||||||
deleteObj() {
|
this.$refs.form && this.$refs.form.resetFields();
|
||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Counter'.toUpperCase()) {
|
|
||||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('map.confirm'),
|
|
||||||
cancelButtonText: this.$t('map.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
|
||||||
this.$refs.form && this.$refs.form.resetFields();
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="card">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<operate-property
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
|
:form="form"
|
||||||
</div>
|
:edit-model="editModel"
|
||||||
<div class="button_box">
|
:rules="editRules"
|
||||||
<el-button-group class="map-draft-group">
|
type="DelayUnlock"
|
||||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
@updateMapModel="updateMapModel"
|
||||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
@resetData="resetData"
|
||||||
</el-button-group>
|
/>
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<div class="view-control-content">
|
||||||
@ -38,13 +37,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getUID } from '@/jmap/utils/Uid';
|
import { getUID } from '@/jmap/utils/Uid';
|
||||||
import ConfigList from './config/list';
|
import OperateProperty from './components/operateProperty';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DelayUnlockDraft',
|
name: 'DelayUnlockDraft',
|
||||||
components: {
|
components: {
|
||||||
ConfigList
|
OperateProperty
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -68,7 +67,8 @@ export default {
|
|||||||
position: {
|
position: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
}
|
},
|
||||||
|
status:'00'
|
||||||
},
|
},
|
||||||
addModel: {
|
addModel: {
|
||||||
stationCode: ''
|
stationCode: ''
|
||||||
@ -188,30 +188,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改对象
|
updateMapModel(data) {
|
||||||
edit() {
|
this.$emit('updateMapModel', data);
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const data = Object.assign({_type: 'DelayUnlock', status: '00'}, this.editModel);
|
|
||||||
this.$emit('updateMapModel', data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 删除对象
|
resetData() {
|
||||||
deleteObj() {
|
this.$refs.form && this.$refs.form.resetFields();
|
||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
|
||||||
if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) {
|
|
||||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('map.confirm'),
|
|
||||||
cancelButtonText: this.$t('map.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
|
||||||
this.$refs.form && this.$refs.form.resetFields();
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -132,10 +132,6 @@ export default {
|
|||||||
],
|
],
|
||||||
selectDevice:'',
|
selectDevice:'',
|
||||||
enabledTab: 'Section',
|
enabledTab: 'Section',
|
||||||
show: {
|
|
||||||
mapEditShow: false,
|
|
||||||
mapPaintShow: true
|
|
||||||
},
|
|
||||||
projectType: true
|
projectType: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="card">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||||
<div class="view-control-content">
|
<operate-property
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
:form="form"
|
||||||
</div>
|
:edit-model="editModel"
|
||||||
<div class="button_box">
|
:rules="rules"
|
||||||
<el-button-group class="map-draft-group">
|
type="Signal"
|
||||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
@updateMapModel="updateMapModel"
|
||||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
@resetData="resetData"
|
||||||
</el-button-group>
|
/>
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||||
<create-signal ref="createSignal" :field="field" @signalSectionCode="signalSectionCode" v-on="$listeners" />
|
<create-signal ref="createSignal" :field="field" @signalSectionCode="signalSectionCode" v-on="$listeners" />
|
||||||
@ -122,16 +121,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import ConfigList from '../config/list';
|
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import createSignal from './create';
|
import createSignal from './create';
|
||||||
|
import OperateProperty from '../components/operateProperty';
|
||||||
import getModel from '../models.js';
|
import getModel from '../models.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalDraft',
|
name: 'SignalDraft',
|
||||||
components: {
|
components: {
|
||||||
ConfigList,
|
createSignal,
|
||||||
createSignal
|
OperateProperty
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -366,6 +365,12 @@ export default {
|
|||||||
this.$emit('deviceSelect', '');
|
this.$emit('deviceSelect', '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updateMapModel(data) {
|
||||||
|
this.$emit('updateMapModel', data);
|
||||||
|
},
|
||||||
|
resetData() {
|
||||||
|
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||||
|
},
|
||||||
signalSectionCode(field) {
|
signalSectionCode(field) {
|
||||||
this.field = field;
|
this.field = field;
|
||||||
if (this.field) {
|
if (this.field) {
|
||||||
@ -374,31 +379,6 @@ export default {
|
|||||||
this.$emit('deviceSelect', '');
|
this.$emit('deviceSelect', '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 修改对象
|
|
||||||
edit() {
|
|
||||||
this.$refs['dataform'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const data = Object.assign({_type: 'Signal'}, this.editModel);
|
|
||||||
this.$emit('updateMapModel', data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 删除对象
|
|
||||||
deleteObj() {
|
|
||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
|
||||||
if (selected && selected._type === 'Signal') {
|
|
||||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
|
||||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 构建信号机偏移量
|
// 构建信号机偏移量
|
||||||
editAll() {
|
editAll() {
|
||||||
if (this.addModel.number != '') {
|
if (this.addModel.number != '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user