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" />
|
||||
</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" />
|
||||
<div class="display-draft">
|
||||
<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(()=>{
|
||||
this.isscriptRun = false;
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
this.userRole = 'AUDIENCE';
|
||||
this.$refs.chatbox.clearAllData();
|
||||
}).catch(()=>{
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
|
@ -1,15 +1,14 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="form" :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>
|
||||
<operate-property
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Arrow"
|
||||
@updateMapModel="updateMapModel"
|
||||
@resetData="resetData"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
@ -29,14 +28,14 @@ import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import ConfigData from './config/data';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'StationStandDraft',
|
||||
components: {
|
||||
ConfigList,
|
||||
OperateProperty,
|
||||
ConfigData
|
||||
},
|
||||
props: {
|
||||
@ -150,7 +149,7 @@ export default {
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form && this.$refs.form.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.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
@ -189,30 +188,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Line'}, this.editModel);
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
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});
|
||||
resetData() {
|
||||
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>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" label="表示状态" name="first" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="editRules" />
|
||||
</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>
|
||||
<operate-property
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="editRules"
|
||||
:type="editModel.type"
|
||||
@updateMapModel="updateMapModel"
|
||||
@resetData="resetData"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
@ -30,14 +29,14 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import ConfigData from './config/data';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'ControlLamp',
|
||||
components: {
|
||||
ConfigList,
|
||||
OperateProperty,
|
||||
ConfigData
|
||||
},
|
||||
props: {
|
||||
@ -517,30 +516,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
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});
|
||||
resetData() {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,15 +1,14 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="form" :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>
|
||||
<operate-property
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Counter"
|
||||
@updateMapModel="updateMapModel"
|
||||
@resetData="resetData"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
@ -48,13 +47,13 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'CounterDraft',
|
||||
components: {
|
||||
ConfigList
|
||||
OperateProperty
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -206,30 +205,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Counter'}, this.editModel);
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
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});
|
||||
resetData() {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,15 +1,14 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
|
||||
</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>
|
||||
<operate-property
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="editRules"
|
||||
type="DelayUnlock"
|
||||
@updateMapModel="updateMapModel"
|
||||
@resetData="resetData"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
@ -38,13 +37,13 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmap/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'DelayUnlockDraft',
|
||||
components: {
|
||||
ConfigList
|
||||
OperateProperty
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -68,7 +67,8 @@ export default {
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
status:'00'
|
||||
},
|
||||
addModel: {
|
||||
stationCode: ''
|
||||
@ -188,30 +188,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'DelayUnlock', status: '00'}, this.editModel);
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
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});
|
||||
resetData() {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
}).catch(() => {
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -132,10 +132,6 @@ export default {
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section',
|
||||
show: {
|
||||
mapEditShow: false,
|
||||
mapPaintShow: true
|
||||
},
|
||||
projectType: true
|
||||
};
|
||||
},
|
||||
|
@ -1,15 +1,14 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<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>
|
||||
<operate-property
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Signal"
|
||||
@updateMapModel="updateMapModel"
|
||||
@resetData="resetData"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<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" />
|
||||
@ -122,16 +121,16 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConfigList from '../config/list';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import createSignal from './create';
|
||||
import OperateProperty from '../components/operateProperty';
|
||||
import getModel from '../models.js';
|
||||
|
||||
export default {
|
||||
name: 'SignalDraft',
|
||||
components: {
|
||||
ConfigList,
|
||||
createSignal
|
||||
createSignal,
|
||||
OperateProperty
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -366,6 +365,12 @@ export default {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
},
|
||||
resetData() {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
},
|
||||
signalSectionCode(field) {
|
||||
this.field = field;
|
||||
if (this.field) {
|
||||
@ -374,31 +379,6 @@ export default {
|
||||
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() {
|
||||
if (this.addModel.number != '') {
|
||||
|
Loading…
Reference in New Issue
Block a user