# Conflicts:
#	src/views/display/tipScriptRecord.vue
This commit is contained in:
joylink_cuiweidong 2019-08-20 13:22:51 +08:00
commit 7f907cc6ba
40 changed files with 1106 additions and 1119 deletions

View File

@ -1,79 +1,79 @@
export default {
confirm: '确 定',
cancel: '取 消',
creatingSuccessful: '创建成功!',
creatingFailed: '创建失败',
confirmDeletion: '是否确认删除?',
confirmBatchGeneration: '是否确认批量生成?',
hint: '提示',
cancelledDelete: '已取消删除',
cancelGeneration: '已取消批量生成',
confirm: 'confirm',
cancel: 'cancel',
creatingSuccessful: 'Created successfully!',
creatingFailed: 'Create a failure',
confirmDeletion: 'Confirm deletion?',
confirmBatchGeneration: 'Is batch generation confirmed?',
hint: 'hint',
cancelledDelete: 'Cancelled delete',
cancelGeneration: 'Batch generation has been cancelled',
updateSuccessfully: '更新成功',
saveSuccessfully: '保存成功',
saveFailed: '保存失败',
updateFailed: '更新失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
operationAbnormal: '操作异常',
createSuccess: '创建成功',
updateSuccessfully: 'The update is successful',
saveSuccessfully: 'Save success',
saveFailed: 'Save failed',
updateFailed: 'Update failed',
successfullyDelete: 'Delete the success',
failDelete: 'Delete failed',
operationAbnormal: 'Abnormal operation',
createSuccess: 'Creating a successful',
cannotCoincide: '起始坐标和结束坐标不能重合',
cannotMerged: '存在非物理区段,不能合并',
linkCannotMerged: '不在同一Link上的物理区段不能合并',
cannotCoincide: 'The starting and ending coordinates cannot coincide',
cannotMerged: 'Non-physical extents exist and cannot be merged',
linkCannotMerged: 'Physical extents that are not on the same Link cannot be merged',
selectedSectionEmpty: '选择的区段为空',
selectedStationEmpty: '选择的车站为空',
selectedSectionEmpty: 'The selected section is empty',
selectedStationEmpty: 'The selected station is empty',
selectMap: '请先选择地图',
selectTrainType: '请选择查看的列车模型',
selectMap: 'Please select the map first',
selectTrainType: 'Please select the train model to view',
stationFont: '车站字体',
kilometerFont: '公里标字体',
meter: '',
angle: '',
stationFont: 'The font',
kilometerFont: 'Kilometer mark font',
meter: 'meter',
angle: 'angle',
operationSuccessfully: '操作成功',
operationFailed: '操作失败',
setupSuccessfully: '设置成功',
setupFailed: '设置失败',
recoveryPrivilegesSuccessful: '回收权限成功',
recoveryPrivilegesFailed: '回收权限失败',
unpackingSuccessful: '解包成功',
unpackingFailed: '解包失败',
pleaseEnterNameQuery: '请输入名称查询',
routeSameID: '相同ID的数据已存在',
operationSuccessfully: 'Operation is successful',
operationFailed: 'The operation failure',
setupSuccessfully: 'Set up the success',
setupFailed: 'Setup failed',
recoveryPrivilegesSuccessful: 'Successful recovery authority',
recoveryPrivilegesFailed: 'Recovery authority failed',
unpackingSuccessful: 'Unpack the success',
unpackingFailed: 'Unpack the failure',
pleaseEnterNameQuery: 'Please enter name query',
routeSameID: 'Data with the same ID already exists',
skinDeleteSuccessfully: '删除皮肤成功',
skinDeleteFailed: '删除皮肤失败',
publishedOperationalGraphSuccessfully: '发布运行图成功',
publishedOperationalGraphFailed: '发布运行图失败',
deleteOperationGraphFailed: '删除运行图失败',
importOperationGraphSuccessfully: '导入运行图成功!',
importOperationGraphFailed: '导入运行图失败!',
parsingOperationGraphFailed: '解析运行图失败!',
productCreationSuccessfully: '创建产品成功',
productCreationFailed: '创建产品失败',
updateProductSuccessfully: '更新产品成功',
updateProductFailed: '更新产品失败',
deleteProductSuccessfully: '删除产品成功',
deleteProductFailed: '删除产品失败',
cannotDeleteProduct: '产品已被使用无法删除',
pathCreationSuccessful: '创建交路成功!',
createRoutingFailed: '创建交路失败',
pathUpdataSuccessful: '更新交路成功!',
pathUpdataFailed: '更新交路失败',
skinDeleteSuccessfully: 'Skin removed successfully',
skinDeleteFailed: 'Failed to remove skin',
publishedOperationalGraphSuccessfully: 'Published operational diagram successfully',
publishedOperationalGraphFailed: 'Failed to publish operation diagram',
deleteOperationGraphFailed: 'Failed to delete operation diagram',
importOperationGraphSuccessfully: 'The operation diagram was successfully imported!',
importOperationGraphFailed: 'Failed to import operation diagram!',
parsingOperationGraphFailed: 'Failed to parse the operational diagram!',
productCreationSuccessfully: 'Product creation success',
productCreationFailed: 'Failed to create product',
updateProductSuccessfully: 'Product update is successful.',
updateProductFailed: 'Product update failed',
deleteProductSuccessfully: 'Product deleted successfully',
deleteProductFailed: 'Product deletion failed',
cannotDeleteProduct: 'The product has been used and cannot be deleted',
pathCreationSuccessful: 'Create road successfully!',
createRoutingFailed: 'Failed to create junction',
pathUpdataSuccessful: 'Road update successful!',
pathUpdataFailed: 'Update traffic failed',
failedLoadMap: '加载地图数据失败',
sectionPointsDeficiency: '区段坐标缺失',
failedLoadMap: 'Failed to load map data',
sectionPointsDeficiency: 'Segment coordinates missing',
dataValidationFailed: '数据校验不通过',
dataValidationSuccess: '数据校验通过!',
dataValidationFailed: 'Data validation failed',
dataValidationSuccess: 'Data verified!',
requestFailed: '请求失败',
requestFailed: 'The request failed',
dataQuestion: '有问题数据',
dataList: '数据列表',
dataQuestion: 'Data in question',
dataList: 'Data list',
updateProductTip: 'Will this operation modify the commodity status?',
deleteProductTip: 'This operation will delete the item. Do you want to continue?',

View File

@ -142,6 +142,7 @@ export default {
meter: '米',
code: '编码:',
codeC: '编码',
imageName: '图片名称:',
imageWidth: '图片宽度:',
imageHeight: '图片高度:',
@ -329,6 +330,7 @@ export default {
trainCode: '列车编号:',
groupNumber: '车组号:',
trainNumber: '车组号',
modelCode: '车类型:',
trainmodelCreate: '新建车类型',

View File

@ -3,8 +3,8 @@ import * as throttleUtil from '@/utils/throttle';
export default {
data() {
return {
_clientWidth: '',
_clientHeight: ''
_clientWidth: 0,
_clientHeight: 0
};
},
beforeMount() {

View File

@ -40,6 +40,7 @@ import Lessoncategory from '@/views/lesson/lessoncategory/index';
import Scriptmanage from '@/views/scriptManage/index';
import ScriptmanageHome from '@/views/scriptManage/home';
import ScriptDisplay from '@/views/scriptManage/display/index';
import ScriptDetail from '@/views/scriptManage/detail/index';
import Teach from '@/views/teach/index';
@ -133,6 +134,7 @@ export const userPlan = '015'; // 计划系统
export const UrlConfig = {
display: '/display',
scriptDisplay: '/scriptDisplay',
examRuleDraft: '/examRule/draft',
examRuleManage: '/examRule/manage',
map: {
@ -211,7 +213,8 @@ export const UrlConfig = {
},
script: {
prefix: '/script',
detail: '/script/detail'
detail: '/script/detail',
display: '/script/display'
}
};
@ -310,6 +313,13 @@ export const asyncRouter = [
},
hidden: true
},
{
path: '/scriptDisplay/:mode',
component: ScriptDisplay,
meta: {
},
hidden: true
},
{
path: '/trainroom',
component: TrainRoom,

View File

@ -3,9 +3,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.4:9000' // 琰培
} else {
BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -267,7 +267,7 @@ export default {
group: this.group,
conversationId: this.conversationId
};
const res = await postDataBd(param).catch(error => {
await postDataBd(param).catch(error => {
this.sending = false;
const message = JSON.parse(error.message);
if (message.err_no == 3301) {

View File

@ -107,6 +107,14 @@ export default {
Jl3dDrive
},
mixins: [WindowResizeHandler],
props: {
size: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
mode: '',
@ -235,8 +243,8 @@ export default {
},
methods: {
resizeHandler() {
const width = this._clientWidth;
const height = this._clientHeight;
const width = this.size ? this.size.width : this._clientWidth;
const height = this.size ? this.size.height : this._clientHeight;
this.$store.dispatch('config/resize', { width, height });
@ -332,9 +340,9 @@ export default {
},
//
async initLoadData() {
const width = document.documentElement.clientWidth;
const height = document.documentElement.clientHeight + 200;
this.$store.dispatch('config/resize', { width, height });
// const width = document.documentElement.clientWidth;
// const height = document.documentElement.clientHeight + 200;
// this.$store.dispatch('config/resize', { width, height });
this.$store.dispatch('training/reset');
try {

View File

@ -13,7 +13,7 @@
</el-button-group>
</div>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<tip-script-record ref="tipTaskRecord" :group="group" />
<!-- <tip-script-record ref="tipTaskRecord" :group="group" /> -->
</div>
</template>
@ -45,7 +45,8 @@ export default {
required: true
},
offset: {
type: Number
type: Number,
required: true
}
},
data() {
@ -101,7 +102,7 @@ export default {
selectBeginTime() {
this.$refs.setTime.doShow();
},
resetBeginTime(){
resetBeginTime() {
this.isDisable = false;
},
start(model) {

View File

@ -1,4 +1,5 @@
<template>
<<<<<<< HEAD
<div class="reminder-drag">
<div class="reminder-box" ref="drapBox" :style="{height:'100%'}">
<div class="actionPane">
@ -13,15 +14,45 @@
<el-button type="success" @click="saveScenesData" :loading="isSavingScript" >{{$t('scriptRecord.saveData')}}</el-button>
<!-- 暂停 -->
</el-button-group>
=======
<div class="reminder-drag">
<div ref="drapBox" class="reminder-box">
<div class="tip-title">
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
<p v-if="isShrink" style="color: #fff;">
<span>{{ title }}</span>
</p>
</div>
<div ref="dragBody" class="tip-body-box">
<div class="tip-body">
<div>
<get-action ref="getAction" :group="group" />
</div>
<!-- <el-button-group class="button-group1"> -->
<!-- </el-button-group> -->
<el-button-group class="button-group">
<el-button v-if="isPause" type="primary" :disabled="executeDisabled" @click="pauseScript">暂停</el-button>
<el-button v-else type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复并执行</el-button>
<el-button type="primary" @click="saveMaplocation">{{ $t('scriptRecord.saveMaplocation') }}</el-button>
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
<el-button type="primary" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
<el-button type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
<!-- 暂停 -->
</el-button-group>
>>>>>>> e376b141cf53d9c5950d603ff5d56ba5bf5a610e
</div>
</div>
</div>
</div>
</template>
<script>
import Vue from 'vue';
import GetAction from './scriptRecord/getAction';
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
import {saveScriptScenes, saveScriptData, dumpScriptData,updateMapLocation,scriptPause,executeScript} from '@/api/simulation';
import Vue from 'vue';
import GetAction from './scriptRecord/getAction';
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
<<<<<<< HEAD
export default {
name: 'TipScriptRecord',
props: {
@ -169,6 +200,149 @@
}
}
}
=======
export default {
name: 'TipScriptRecord',
components: {
GetAction
},
props: {
group: {
type: String,
required: true
}
},
// this.$t('scriptRecord.scriptTitle')
data() {
return {
title: '剧本编制',
isShrink: false,
mapLocation: {},
autoSaveScript: null,
isSavingScript: false,
isPause: false,
executeDisabled: false
// isSaveStage: true,
};
},
created() {
},
mounted() {
this.initAutoSaveScript();
this.shrink();
},
beforeDestroy() {
this.clearAutoSave();
},
methods: {
jump(obj) {
},
shrink() {
const height = this.$refs.dragBody.offsetHeight + 40;
const top = this.$refs.drapBox.style.top;
if (this.isShrink) {
this.$refs.drapBox.style.height = '40px';
this.$refs.drapBox.style.top = '';
this.isShrink = false;
} else {
this.$refs.drapBox.style.height = height + 'px';
this.$refs.drapBox.style.top = top;
this.isShrink = true;
}
},
setIsParse(isPause) {
this.isPause=isPause;
},
setDisabled(data) {
this.executeDisabled=!data;
},
initAutoSaveScript() {
const timeout = 1000 * 20;
this.clearAutoSave(this.autoSaveScript);
this.autoSaveScript = setInterval(this.saveScenesData, timeout);
},
clearAutoSave() {
if (this.autoSaveScript) {
clearInterval(this.autoSaveScript);
this.autoSaveScript = null;
}
},
pauseScript() {
scriptPause(this.group).then(resp => {
// this.isSaveStage = false;
this.$store.dispatch('scriptRecord/updateSimulationPause', true);
// this.$message.success('');
}).catch(() => {
this.$messageBox('暂停失败!');
});
},
executePlayScript() {
executeScript(this.group).then(resp => {
// this.isSaveStage = false;
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
// this.$message.success('');
}).catch(() => {
this.$messageBox('恢复失败!');
});
},
saveScenesStage() {
saveScriptScenes(this.group).then(resp => {
// this.isSaveStage = false;
this.$message.success('保存背景成功');
}).catch(() => {
this.$messageBox('保存背景失败!');
});
},
saveScenesData() {
this.isSavingScript=true;
saveScriptData(this.group).then(resp => {
this.$message.success('保存数据成功');
this.isSavingScript=false;
this.initAutoSaveScript();
}).catch(error => {
this.$messageBox(`保存数据失败!: ${error.message}`);
this.isSavingScript=false;
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
this.clearAutoSave();
} else {
this.initAutoSaveScript();
}
});
},
dumpScenesData() {
this.clearAutoSave();
const group=this.group;
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dumpScriptData(group).then(resp => {
// this.isSaveStage = true;
this.$parent.resetBeginTime();
this.$refs['getAction'].loadInitData();
this.initAutoSaveScript();
this.$message.success('清除数据成功');
}).catch(() => {
this.$messageBox('清除数据失败!');
});
}).catch(() => {
this.initAutoSaveScript();
});
},
saveMaplocation() {
const data=Vue.prototype.$jlmap.$options;
const group=this.$route.query.group;
const dataZoom={scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
updateMapLocation(group, dataZoom).then(response=>{
this.$message.success('更新定位成功');
}).catch(error => {
this.$messageBox(`更新定位失败: ${error.message}`);
});
}
}
};
>>>>>>> e376b141cf53d9c5950d603ff5d56ba5bf5a610e
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,5 +1,5 @@
<template>
<div class="jlmap-canvas" :style="{ width: width+'px', height: height+28+'px' }">
<div class="jlmap-canvas" :style="{ width: width+'px', height: height+'px' }">
<div :id="canvasId" style="background: #000;" />
<progress-bar ref="progressBar" />
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
@ -60,7 +60,7 @@ export default {
return canvasId;
},
show() {
if (this.mode === TrainingMode.EDIT || this.mode === TrainingMode.MAP_EDIT) {
if (this.mode == TrainingMode.EDIT || this.mode == TrainingMode.MAP_EDIT) {
return true;
}
return false;

View File

@ -7,8 +7,8 @@
<i class="el-icon-close" />
</div>
</div>
<el-row type="flex" justify="center">
<el-form label-width="100px" class="demo-ruleForm">
<el-row type="flex" justify="center" class="content_box">
<el-form label-width="80px" class="demo-ruleForm">
<el-form-item :label="$t('map.viewShows')">
<el-checkbox-group v-model="viewSelect" :min="1" @change="handleSelectView">
<el-checkbox :label="ViewMode.LOGIC">{{ $t('map.logicalView') }}</el-checkbox>
@ -28,6 +28,12 @@
{{ view.name }}</el-checkbox>
</el-checkbox-group>
</el-row>
<el-row v-if=" viewSelect.length == 2" class="physical-view" type="flex" justify="center" style="width: 100%;">
<el-checkbox-group v-model="hybridLevelsSelect" @change="handleSelectHybridView">
<el-checkbox v-for="view in HybridViewTypeList" :key="view.code" :label="view.code">
{{ view.name }}</el-checkbox>
</el-checkbox-group>
</el-row>
</el-form-item>
</el-form>
</el-row>
@ -53,8 +59,15 @@ export default {
{ code: 'Signal', name: this.$t('map.signal') },
{ code: 'Switch', name: this.$t('map.switch') }
],
HybridViewTypeList: [],
defaultLogicalSelect: [],
defaultPhysicalSelect: [],
defaultHybridSelect: [],
logicalLevelsSelect: [],
physicalLevelsSelect: []
physicalLevelsSelect: [],
hybridLevelsSelect: [] //
};
},
watch: {
@ -75,22 +88,40 @@ export default {
initPage() {
this.$Dictionary.logicalViewType().then(list => {
this.LogicalViewTypeList = list;
list.forEach(v => {
this.HybridViewTypeList.push(v);
this.hybridLevelsSelect.push(v.code);
this.defaultHybridSelect.push(v.code);
});
this.LogicalViewTypeList.forEach(elem => {
this.logicalLevelsSelect.push(elem.code);
this.defaultLogicalSelect.push(elem.code);
});
});
this.$Dictionary.physicalViewType().then(list => {
this.PhysicalViewTypeList = list;
list.forEach(v => {
this.HybridViewTypeList.push(v);
this.hybridLevelsSelect.push(v.code);
this.defaultHybridSelect.push(v.code);
});
this.PhysicalViewTypeList.forEach(elem => {
this.physicalLevelsSelect.push(elem.code);
this.defaultPhysicalSelect.push(elem.code);
});
});
},
handleSelectView(value) {
if (value.length == 2) {
this.$emit('handleSelectView', '03');
this.hybridLevelsSelect = this.copyList(this.defaultHybridSelect);
} else {
this.$emit('handleSelectView', value);
if (this.viewSelect[0] == this.ViewMode.LOGIC) {
this.logicalLevelsSelect = this.copyList(this.defaultLogicalSelect);
} else {
this.physicalLevelsSelect = this.copyList(this.defaultPhysicalSelect);
}
}
},
handleSelectLogicalView(handle) {
@ -98,6 +129,12 @@ export default {
},
handleSelectPhysicalView(handle) {
this.$emit('handleSelectPhysicalView', handle);
},
handleSelectHybridView(handle) {
this.$emit('handleSelectHybridView', handle);
},
copyList(list) {
return JSON.parse(JSON.stringify(list));
}
}
};
@ -126,11 +163,11 @@ export default {
right: 24px;
top: 43px;
z-index: 10;
padding: 15px;
.title{
margin-bottom: 8px;
overflow: hidden;
border-bottom: 1px solid #ccc;
padding: 9px;
.fl-title{
float: left;
}
@ -140,17 +177,23 @@ export default {
}
}
.content_box{
padding: 15px;
padding-top: 4px;
}
/deep/{
.el-dialog__body{
padding: 0 8px 8px 21px;
}
.el-checkbox{
margin-right: 14px;
margin-right: 10px;
width: 75px;
}
.el-form-item{
margin-bottom: 2px;
margin-bottom: -4px;
}
}
}

View File

@ -28,7 +28,7 @@
@click="showMap"
>{{ $t('map.viewLayer') }}</el-button>
</div>
<el-tabs v-model="enabledTab" type="card" @tab-click="changePane">
<el-tabs v-model="enabledTab" type="card" class="map_card" @tab-click="changePane">
<el-tab-pane label="进路" name="route">
<route-operate
ref="routeOperate"
@ -228,6 +228,12 @@ export default {
margin-right: 30px;
}
}
/deep/ {
.map_card .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
}
/deep/ .map-draft-group {
float: right;

View File

@ -97,7 +97,7 @@ export default {
prop: 'stationCode'
},
{
title: this.$t('map.routeType'),
title: this.$t('map.accessType'),
prop: 'natureType'
},
@ -129,7 +129,7 @@ export default {
},
{
type: 'button',
title: this.$t('map.routeSideTurnoutData'),
title: this.$t('map.accessSideTurnoutData'),
buttons: [
{
name: this.$t('map.preview'),
@ -165,7 +165,7 @@ export default {
{
type: 'button',
title: this.$t('map.routePhysical'),
title: this.$t('map.accessPhysical'),
buttons: [
{
name: this.$t('map.preview'),

View File

@ -27,7 +27,7 @@
<span>s</span>
</el-form-item>
<el-form-item :label="$t('map.routeTypeColon')" prop="natureType">
<el-form-item :label="$t('map.accessType')" prop="natureType">
<el-select v-model="addModel.natureType" :filterable="true">
<el-option
v-for="item in RouteNatureTypeList"
@ -457,10 +457,10 @@ export default {
{ required: true, message: this.$t('rules.proximitySection'), trigger: 'change' }
],
natureType: [
{ required: true, message: this.$t('rules.routePropertyType'), trigger: 'change' }
{ required: true, message: this.$t('rules.accessPropertyType'), trigger: 'change' }
],
autoType: [
{ required: true, message: this.$t('rules.autoRouteType'), trigger: 'change' }
{ required: true, message: this.$t('rules.autoAccessType'), trigger: 'change' }
],
routeSectionList: [
{ required: true, message: '请选择进路物理区段数据', trigger: 'change' }

View File

@ -4,15 +4,14 @@
<div class="map-view">
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
</div>
<div v-loading="loading" class="map-draft">
<div v-if="viewDraft==='draft'">
<div class="map-draft">
<div v-show="viewDraft==='draft'">
<map-operate
ref="mapOperate"
:card-height="cardHeight"
:map-info="mapInfo"
:selected="selected"
:map-saveing="mapSaveing"
@hook:mounted="loading = false"
@handleSelectLogicalView="handleSelectLogicalView"
@handleSelectPhysicalView="handleSelectPhysicalView"
@saveMapEvent="saveMapEvent"
@ -24,14 +23,13 @@
@showMap="showMap"
/>
</div>
<div v-if="viewDraft != 'draft'">
<div v-show="viewDraft != 'draft'">
<data-relation
ref="dataRelation"
:card-height="cardHeight"
:map-info="mapInfo"
:selected="selected"
@selectView="selectViewDraft"
@hook:mounted="loading = false"
@showMap="showMap"
/>
</div>
@ -40,6 +38,7 @@
@handleSelectView="handleSelectView"
@handleSelectLogicalView="handleSelectLogicalView"
@handleSelectPhysicalView="handleSelectPhysicalView"
@handleSelectHybridView="handleSelectHybridView"
/>
</div>
</div>
@ -57,7 +56,6 @@ import { EventBus } from '@/scripts/event-bus';
import ConfigMap from './configMap';
import DataRelation from './dataRelation/index';
import { setTimeout } from 'timers';
export default {
name: 'MapView',
@ -80,8 +78,7 @@ export default {
autoSaveTask: null,
selected: null,
mapInfo: { name: this.$t('map.pleaseSelectMap') },
timeDemon: null,
loading: false
timeDemon: null
};
},
watch: {
@ -89,7 +86,7 @@ export default {
this.initAutoSaveTask();
},
$route() {
this.$$nextTick(() => {
this.$nextTick(() => {
this.loadInitPage();
});
}
@ -125,10 +122,7 @@ export default {
this.$refs.configMap.doShow();
},
selectViewDraft(data) {
this.loading = true;
setTimeout(() => {
this.viewDraft = data;
}, 300);
},
loadInitPage() {
this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT });
@ -180,6 +174,11 @@ export default {
this.$refs.jlmapVisual.setLevelVisible(handle);
}
},
handleSelectHybridView(handle) {
if (this.$refs && this.$refs.jlmapVisual) {
this.$refs.jlmapVisual.setLevelVisible(handle);
}
},
clickEvent(em) {
var device = this.getDeviceByEm(em);
this.onSelect(device);

View File

@ -1,22 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="dataForm" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -109,6 +113,10 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -271,7 +279,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,7 +1,7 @@
<template>
<el-form ref="form" :label-width="form.labelWidth" size="mini" :rules="rules" :model="formModel">
<el-form ref="form" :label-width="form.labelWidth" size="mini" :rules="rules" :model="formModel" class="form_data">
<template v-for="(items, index) in form.items">
<div v-if="items.item.length" :key="index" class="card">
<div v-if="items.item.length" :key="index" class="card" :class="{'card_code' : !items.name}">
<div class="card_title">{{ items.name }}</div>
<template v-for="item in items.item">
<template v-if="checkFieldType(item, 'select')">
@ -305,14 +305,16 @@ export default {
width: 110px;
}
.el-form{
.form_data{
padding: 10px;
padding-bottom: 0;
padding-top: 6px;
padding-bottom: 10px;
}
.card{
border: 1px solid #ccc;
padding: 10px;
padding-top: 18px;
box-sizing: border-box;
position: relative;
margin-bottom: 15px;
@ -329,6 +331,10 @@ export default {
padding: 0px 5px;
}
}
.card_code{
border: 0px solid #ccc;
padding: 0px;
}
/deep/ {
.input-with-select .el-input-group__prepend {
background-color: #fff;

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -35,9 +37,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -135,6 +139,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -269,4 +277,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -117,6 +121,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -250,4 +258,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -329,7 +329,7 @@ export default {
},
resizeCardHeight() {
var padding = 0;
this.cardHeights = this.cardHeight - padding - 90;
this.cardHeights = this.cardHeight - padding - 74;
},
handleSelectControlPage(device) {
const type = device._type;
@ -394,7 +394,7 @@ export default {
/deep/ .map-draft-group {
float: right;
margin: 10px 5px;
margin: 6px 5px;
}
/deep/ .view-control {
@ -405,6 +405,19 @@ export default {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -37,9 +39,11 @@
</div>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -127,6 +131,10 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -240,7 +248,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,22 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -93,6 +97,10 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -231,7 +239,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,13 +1,13 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
@ -69,7 +69,7 @@
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
@ -150,6 +150,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -276,7 +280,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.view-control {
overflow-y: auto;
}

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -36,11 +38,13 @@
</template>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button v-if="isNew" type="primary" @click="isNewCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isFd" type="primary" @click="isFdCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isSd" type="primary" @click="isSdCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isNew" type="primary" size="small" @click="isNewCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isFd" type="primary" size="small" @click="isFdCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isSd" type="primary" size="small" @click="isSdCreate">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -157,6 +161,10 @@ export default {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -568,6 +576,12 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.create')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.splitMerge')" name="three">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
@ -43,6 +47,7 @@
</el-select>
<el-button
:type="field === 'splitSection' ? 'danger' : 'primary'"
size="small"
@click="hover('splitSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
@ -67,6 +72,7 @@
</el-select>
<el-button
:type="field === 'leftSection' ? 'danger' : 'primary'"
size="small"
@click="hover('leftSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
@ -81,6 +87,7 @@
</el-select>
<el-button
:type="field === 'rightSection' ? 'danger' : 'primary'"
size="small"
@click="hover('rightSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
@ -113,9 +120,11 @@
</el-table-column>
</el-table>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.switchSection')" name="five">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
@ -145,9 +154,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="editSectionTrain">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" size="small" @click="editSectionTrain">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -284,13 +295,17 @@ export default {
const form = {
labelWidth: '160px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'code&&name', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
{ prop: 'namePoint', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
@ -1360,7 +1375,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.el-transfer {
text-align: left;
}

View File

@ -1,13 +1,15 @@
<template>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -54,9 +56,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -197,12 +201,16 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
@ -269,7 +277,7 @@ export default {
{ required: true, message: this.$t('rules.signalGuidePositionX'), trigger: 'blur' }
],
'guidePosition.y': [
{ required: true, message: this.$t('rules,signalGuidePositionY'), trigger: 'blur' }
{ required: true, message: this.$t('rules.signalGuidePositionY'), trigger: 'blur' }
]
};
//
@ -508,4 +516,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -101,12 +105,16 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.stationName'), type: 'input' },
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
@ -317,4 +325,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -92,12 +96,16 @@ export default {
const form = {
labelWidth: '160px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
@ -272,4 +280,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -48,9 +50,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -122,12 +126,16 @@ export default {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', disabled: true },
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList },
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'nameShow', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
@ -176,10 +184,10 @@ export default {
{ required: true, message: this.$t('rules.stationstandHeight'), trigger: 'change' }
],
'position.x': [
{ required: true, message: this.$t('rule.stationstandPositionX'), trigger: 'change' }
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
],
'position.y': [
{ required: true, message: this.$t('rule.stationstandPositionY'), trigger: 'change' }
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
]
};
//
@ -334,4 +342,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -97,12 +101,16 @@ export default {
const form = {
labelWidth: '170px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.switchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.switchName'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'nameShow', label: this.$t('map.switchShowName'), type: 'checkbox' },
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: this.$t('map.switchPositionX'), type: 'number', placeholder: 'px' },
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: this.$t('map.switchPositionY'), type: 'number', placeholder: 'px' },
@ -412,7 +420,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.el-transfer {
text-align: left;
}

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -29,9 +31,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -116,6 +120,10 @@ export default {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -234,7 +242,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
/deep/ {
.el-select .el-input {
width: 130px;

View File

@ -1,299 +0,0 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="form" :model="editModel" label-width="110px" size="mini" :rules="rules">
<el-form-item :label="$t('map.trainCode')" prop="code">
<el-select v-model="editModel.code" filterable @change="deviceChange">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('map.groupNumber')" prop="groupNumber">
<el-input v-model="editModel.groupNumber" />
</el-form-item>
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
<el-select v-model="editModel.modelCode" filterable>
<el-option
v-for="item in trainModelList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button-group>
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
<el-button type="primary" size="small" @click="uptTrainMode(editModel.modelCode)">{{ $t('map.updata') }}
</el-button>
<el-button type="primary" size="small" @click="delTrainMode(editModel.modelCode)">{{ $t('map.deleteObj') }}
</el-button>
</el-button-group>
</el-form-item>
<el-form-item :label="$t('map.pointX')" prop="position.x">
<el-input-number v-model="editModel.position.x" />
</el-form-item>
<el-form-item :label="$t('map.pointY')" prop="position.y">
<el-input-number v-model="editModel.position.y" />
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="100px" :rules="createRules" :model="addModel" size="mini">
<el-form-item :label="$t('map.groupNumber')" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
<el-select v-model="addModel.modelCode" filterable>
<el-option
v-for="item in trainModelList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button-group>
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">{{ $t('map.updata') }}
</el-button>
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">{{ $t('map.deleteObj') }}
</el-button>
</el-button-group>
</el-form-item>
<el-form-item :label="$t('map.pointX')" prop="position.x">
<el-input-number v-model="addModel.position.x" />
</el-form-item>
<el-form-item :label="$t('map.pointY')" prop="position.y">
<el-input-number v-model="addModel.position.y" />
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
<train-model ref="trainMode" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { getUID } from '@/jmap/utils/Uid';
import TrainModel from './trainmodel';
export default {
name: 'TrainDraft',
components: {
TrainModel
},
props: {
selected: {
type: Object,
default: function () {
return null;
}
},
cardHeight: {
type: [String, Number],
required: true
}
},
data() {
return {
activeName: 'first',
mapData: null,
editModel: {
code: '',
groupNumber: '',
modelCode: '',
position: {
x: 0,
y: 0
}
},
addModel: {
modelCode: '',
groupNumber: '',
position: {
x: 0,
y: 0
}
},
rules: {
code: [
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
],
groupNumber: [
{ required: true, message: this.$t('rules.pleaseEnterGroupNumber'), trigger: 'blur' }
],
modelCode: [
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
],
'position.x': [
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
],
'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'sectionList',
'trainList',
'trainModelList',
'skinCode'
]),
createRules: function () {
return {
modelCode: [
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
],
groupNumber: [
{ required: true, message: this.$t('rules.pleaseEnterTrainNumber'), trigger: 'blur' }
],
'position.x': [
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
],
'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
]
};
}
},
watch: {
selected: function (val, oldVal) {
this.deviceSelect(val);
},
$route() {
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
this.$refs.form.resetFields();
this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Train'.toUpperCase()) {
this.editModel.code = selected.code;
this.editModel.modelCode = selected.modelCode;
this.editModel.groupNumber = selected.groupNumber;
this.editModel.position = {
x: selected.position.x,
y: selected.position.y
};
this.activeName = 'first';
} else {
this.activeName = 'second';
}
},
create() {
this.$refs.make.validate((valid) => {
if (valid) {
const uid = getUID('Train');
const model = {
_type: 'Train',
code: uid,
safeDistance: '100',
maxSafeDistance: '100',
modelCode: this.addModel.modelCode,
groupNumber: this.addModel.groupNumber,
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
}
};
this.$emit('addOrUpdateMapModel', model);
}
});
},
//
edit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('addOrUpdateMapModel', this.buildEditModel());
}
});
},
buildEditModel() {
const model = {
_type: 'Train',
code: this.editModel.code,
safeDistance: this.editModel.safeDistance,
maxSafeDistance: this.editModel.maxSafeDistance,
modelCode: this.editModel.modelCode,
groupNumber: this.editModel.groupNumber,
position: {
x: this.editModel.position.x,
y: this.editModel.position.y
}
};
return model;
},
//
deleteObj() {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'Train'.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('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
_that.$message.info(this.$t('tip.cancelledDelete'));
});
}
},
newTrainMode() {
if (Object.keys(this.$store.state.map.map || {}).length) {
this.$refs.trainMode.doShow({}, 'ADD');
} else {
this.$messageBox(this.$t('tip.selectMap'));
}
},
uptTrainMode(code) {
if (code) {
this.trainModelList.forEach(elem => {
if (elem.code === code) {
this.$refs.trainMode.doShow(elem, 'UPT');
return;
}
});
} else {
this.$messageBox(this.$t('tip.selectTrainType'));
}
},
delTrainMode(code) {
if (code) {
const model = { code };
this.$refs.trainMode.operateTrainModel({ model, type: 'DEL' });
this.addModel.modelCode = this.editModel.modelCode = '';
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,63 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<!-- <el-tab-pane class="view-control" label="属性" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="form" :model="editModel" label-width="110px" size="mini" :rules="rules">
<el-form-item label="列车编号:" prop="code">
<el-select v-model="editModel.code" filterable @change="deviceChange">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="车组号:" prop="groupNumber">
<el-input v-model="editModel.groupNumber" />
</el-form-item>
<el-form-item label="车类型:" prop="modelCode">
<el-select v-model="editModel.modelCode" filterable>
<el-option
v-for="item in trainModelList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button-group>
<el-button type="primary" size="small" @click="newTrainMode">添加</el-button>
<el-button type="primary" size="small" @click="uptTrainMode(editModel.modelCode)">更新
</el-button>
<el-button type="primary" size="small" @click="delTrainMode(editModel.modelCode)">删除
</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">修改</el-button>
<el-button type="primary" @click="deleteObj">删除</el-button>
</el-button-group>
</el-tab-pane> -->
<el-tab-pane class="view-control" label="操作" name="second">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-table :data="trainList.filter(data => !search || data.groupNumber.toLowerCase().includes(search.toLowerCase()))" style="width: 100%">
<el-table-column label="车组号" prop="groupNumber" />
<el-table-column label="编码" prop="code" />
<el-table-column :label="$t('map.trainNumber')" prop="groupNumber" />
<el-table-column :label="$t('map.codeC')" prop="code" />
<el-table-column align="right">
<template slot="header" slot-scope="scope">
<el-input v-model="search" size="mini" placeholder="输入关键字搜索" />
<template slot="header">
<el-input v-model="search" size="mini" :placeholder="$t('map.pleaseSelect')" />
</template>
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">{{ $t('map.deleteObj') }}</el-button>
</template>
</el-table-column>
</el-table></el-scrollbar>
</el-table>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="handleCreate">创建</el-button>
<el-button type="primary" size="small" @click="handleCreate">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
<train-model ref="trainMode" />
@ -214,4 +177,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,186 +0,0 @@
<template>
<el-dialog :title="isNew? $t('map.trainmodelCreate'): $t('map.trainmodelUpdate')" :visible.sync="dialogShow" width="30%" :before-close="doClose">
<el-card shadow="never">
<el-form
ref="form"
:model="formModel"
:rules="rules"
label-width="120px"
size="mini"
style="margin: 20px 20px;"
>
<el-input v-model="formModel.code" :disabled="!isNew" type="hidden" />
<el-form-item :label="$t('map.trainTypeName')" prop="name">
<el-input v-model="formModel.name" :disabled="!isNew" />
</el-form-item>
<el-form-item :label="$t('map.trainLength')" prop="length">
<el-input-number v-model="formModel.length" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.trainSafeDistance')" prop="safeDistance">
<el-input-number v-model="formModel.safeDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance">
<el-input-number v-model="formModel.maxSafeDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity">
<el-input-number v-model="formModel.averageVelocity" :min="0" />km/h
</el-form-item>
<el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration">
<el-input-number v-model="formModel.averageDeceleration" :min="0" />km/h
</el-form-item>
<el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity">
<el-input-number v-model="formModel.defaultVelocity" :min="0" />km/h
</el-form-item>
<el-form-item :label="$t('map.maxVelocity')" prop="maxVelocity">
<el-input-number v-model="formModel.maxVelocity" :min="0" />km/h
</el-form-item>
</el-form>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSure">{{ isNew? $t('map.create'): $t('map.updata') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getUID } from '@/jmap/utils/Uid';
export default {
name: 'TrainModeOperate',
data() {
return {
dialogShow: false,
loading: false,
rules: null,
mapList: [],
formModel: {
code: '',
name: '',
length: 0,
safeDistance: '',
maxSafeDistance: '',
averageVelocity: 0,
averageDeceleration: 0,
defaultVelocity: 0,
maxVelocity: 0
},
type: ''
};
},
computed: {
addRules: function () {
return {
code: [
{ required: true, message: this.$t('rules.trainCode'), trigger: 'change' }
],
name: [
{ required: true, message: this.$t('rules.pleaseEnterTrainTypeName'), trigger: 'change' }
],
length: [
{ required: true, message: this.$t('rules.trainLength'), trigger: 'change' }
],
safeDistance: [
{ required: true, message: this.$t('rules.safeDistance'), trigger: 'change' }
],
maxSafeDistance: [
{ required: true, message: this.$t('rules.maxSafeDistance'), trigger: 'change' }
],
averageVelocity: [
{ required: true, message: this.$t('rules.averageVelocity'), trigger: 'change' }
],
averageDeceleration: [
{ required: true, message: this.$t('rules.averageDeceleration'), trigger: 'change' }
],
defaultVelocity: [
{ required: true, message: this.$t('rules.defaultVelocity'), trigger: 'change' }
],
maxVelocity: [
{ required: true, message: this.$t('rules.maxVelocity'), trigger: 'change' }
]
};
},
viewRules() {
return {};
},
isNew() {
return this.type == 'ADD';
},
isUpt() {
return this.type == 'UPT';
},
isDel() {
return this.type == 'DEL';
}
},
methods: {
doShow(model, type) {
this.type = type;
this.dialogShow = true;
this.$nextTick(() => {
if (this.$refs && this.$refs.form) {
this.$refs.form.resetFields();
}
if (type !== 'ADD') {
if (model) {
this.formModel.code = model.code;
this.formModel.name = model.name;
this.formModel.length = model.length;
this.formModel.safeDistance = model.safeDistance;
this.formModel.maxSafeDistance = model.maxSafeDistance;
this.formModel.averageVelocity = model.averageVelocity;
this.formModel.averageDeceleration = model.averageDeceleration;
this.formModel.defaultVelocity = model.defaultVelocity;
this.formModel.maxVelocity = model.maxVelocity;
}
this.rules = this.viewRules;
} else {
this.rules = this.addRules;
}
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
});
},
doClose() {
this.dialogShow = false;
},
handleSure() {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.isNew) {
this.formModel.code = getUID('TrainModel');
this.operateTrainModel({ model: this.formModel, type: 'ADD' });
} else if (this.isUpt) {
this.operateTrainModel({ model: this.formModel, type: 'UPT' });
} else if (this.isDel) {
this.operateTrainModel({ model: this.formModel, type: 'DEL'});
}
this.doClose();
}
});
},
operateTrainModel({ model, type }) {
this.$store.dispatch('map/operateTrainModel', { model, type });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.create-box {
width: 800px;
margin: 0 auto;
padding-top: 20px;
height: 100%;
/deep/ {
.el-step__icon.is-icon {
width: 95px;
}
}
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -28,9 +30,11 @@
:titles="['Section集合', '选择Section']"
/>
</el-scrollbar>
<el-button-group class="map-draft">
<el-button type="primary" @click="createTrainWindowByCollection">{{ $t('map.create') }}</el-button>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="createTrainWindowByCollection">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -126,6 +130,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -364,4 +372,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,22 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<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>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -98,10 +102,14 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.zcList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.zcList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
{ prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' },
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
@ -241,7 +249,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -13,7 +13,7 @@
ref="newForm"
label-position="right"
:model="newModel"
label-width="120px"
label-width="140px"
size="mini"
:rules="newRules"
@submit.native.prevent
@ -39,7 +39,7 @@
label-position="right"
:model="pullModel"
:rules="pullRules"
label-width="120px"
label-width="140px"
size="mini"
>
<el-form-item :label="$t('map.mapName')" prop="id">

View File

@ -4,7 +4,7 @@
<el-card class="box-card">
<div id="scriptTitle">剧本详情</div>
<div id="sciptForm">
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
</div>
<div id="btnList">
<span slot="footer" class="btn-footer">
@ -19,75 +19,68 @@
</template>
<script>
import { UrlConfig } from '@/router/index';
import {listPublishMap} from '@/api/jmap/map'
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import {getQuestById,updateQuest,deleteQuest} from '@/api/quest';
import { launchFullscreen } from '@/utils/screen';
import { scriptRecordNotify } from '@/api/simulation';
import { UrlConfig } from '@/router/index';
import {listPublishMap} from '@/api/jmap/map';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import {getQuestById, updateQuest, deleteQuest} from '@/api/quest';
import { launchFullscreen } from '@/utils/screen';
import { scriptRecordNotify } from '@/api/simulation';
export default {
export default {
name: 'ScriptDetail',
mixins: [WindowResizeHandler],
data() {
return {
mapList:[],
mapList: [],
taskStatusList: [],
disabled:true,
disabled: true,
formModel: {
name: '',
mapId: '',
description:''
description: ''
},
isShow: false,
height: 0,
}
},
props: {
title: String,
height: 0
};
},
computed: {
form() {
let isAdd = this.type === 'ADD'
let form = {
const form = {
labelWidth: '100px',
items: [
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList, disabled: this.disabled},
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true}
]
}
return form
};
return form;
},
rules() {
let crules = {
const crules = {
name: [
{ required: true, message: '请输入剧本', trigger: 'blur' },
{ required: true, message: '请输入剧本', trigger: 'blur' }
],
mapId: [
{ required: true, message: '请选择地图', trigger: 'change' },
{ required: true, message: '请选择地图', trigger: 'change' }
],
description:[
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
description: [
{ required: true, message: '请输入剧本描述', trigger: 'blur' }
]
};
return crules;
}
return crules
},
// title() {
// return ''
// }
},
mounted() {
listPublishMap().then(response => {
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
this.loadInitData();
});
},
watch: {
$route(newVal) {
this.loadInitData();
}
},
mounted() {
listPublishMap().then(response => {
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
this.loadInitData();
});
},
methods: {
resizeHandler() {
this.height = this._clientHeight - 50;
@ -96,7 +89,7 @@
const scriptId =this.$route.params.scriptId;
if (parseInt(scriptId)) {
getQuestById(scriptId).then(resp=>{
let data={'name':resp.data.name,'description':resp.data.description,'mapId':resp.data.mapId};
const data={'name': resp.data.name, 'description': resp.data.description, 'mapId': resp.data.mapId};
this.formModel=data;
this.formModel.id=scriptId;
}).catch(error => {
@ -105,26 +98,26 @@
}
},
drawUp() {
let data=this.formModel;
const data=this.formModel;
scriptRecordNotify(data.id).then(resp => {
let query = { mapId: data.mapId, group: resp.data, scriptId: data.id };
this.$router.push({ path: `${UrlConfig.display}/script`, query });
const query = { mapId: data.mapId, group: resp.data, scriptId: data.id };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
})
});
},
modifyScript(){
let data=this.formModel;
updateQuest(data.id,data).then(resp => {
modifyScript() {
const data=this.formModel;
updateQuest(data.id, data).then(resp => {
this.$emit('refresh');
this.$message.success('修改剧本成功');
}).catch(error => {
this.$messageBox(`修改剧本失败: ${error.message}`);
})
});
},
deleteScript(){
let data=this.formModel;
deleteScript() {
const data=this.formModel;
this.$confirm('此操作将删除此剧本, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -134,13 +127,13 @@
this.$message.success('删除成功');
this.$emit('refresh');
this.$router.push({ path: `${UrlConfig.script.prefix}` });
}).catch(error => {
}).catch(() => {
this.$messageBox('删除失败');
})
}).catch(() => { })
},
});
}).catch(() => { });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -0,0 +1,50 @@
<template>
<div class="script-parent">
<div class="script-card" />
<div class="script-display">
<display ref="display" :size="size" />
</div>
</div>
</template>
<script>
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import Display from '@/views/display/index';
export default {
name: 'ScriptDisplay',
components: {
Display
},
mixins: [WindowResizeHandler],
data() {
return {
size: {
width: document.documentElement.clientWidth - 600,
height: document.documentElement.clientHeight
}
};
},
computed: {
},
mounted() {
},
methods: {
resizeHandler() {
this.size = { width: this._clientWidth - 600, height: this._clientHeight};
},
loadInitData() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.script-parent {
display: flex;
flex-flow: row;
.script-card {
width: 800px;
}
}
</style>

View File

@ -1,30 +1,25 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<create-script ref='createScript' @reloadTable="reloadTable" @create="handleConfirmCreate" title="创建脚本">
</create-script>
<create-script ref='modifyScript' @reloadTable="reloadTable" @create="handleConfirmModify" title="修改脚本">
</create-script>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-script ref="createScript" title="创建脚本" @reloadTable="reloadTable" @create="handleConfirmCreate" />
<create-script ref="modifyScript" title="修改脚本" @reloadTable="reloadTable" @create="handleConfirmModify" />
</div>
</template>
<script>
import { superAdmin } from '@/router';
// import { listPublishMap } from '@/api/jmap/mapdraft';
import { listPublishMap } from '@/api/jmap/map';
// import { getSkinCodeList } from '@/api/management/mapskin'
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay } from '@/api/runplan';
import { UrlConfig } from '@/router/index';
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
import { scriptRecordNotify } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen';
import CreateScript from './create';
// import { listPublishMap } from '@/api/jmap/mapdraft';
import { listPublishMap } from '@/api/jmap/map';
// import { getSkinCodeList } from '@/api/management/mapskin'
import { UrlConfig } from '@/router/index';
import { getQuestPageList, createQuest, deleteQuest, updateQuest} from '@/api/quest';
import { scriptRecordNotify } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen';
import CreateScript from './create';
export default {
export default {
name: 'ScriptManage',
components: {
CreateScript,
CreateScript
},
data() {
return {
@ -60,9 +55,9 @@
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name'])
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return '' }
tagType: (row) => { return ''; }
},
{
title: '创建时间',
@ -77,17 +72,17 @@
{
name: '录制',
handleClick: this.handleRecord,
type: 'success',
type: 'success'
},
{
name: '删除',
handleClick: this.handleDelete,
type: 'danger',
type: 'danger'
},
{
name: '修改',
handleClick: this.handleModify,
type: '',
type: ''
}
]
}
@ -97,8 +92,8 @@
]
},
currentModel: {},
}
currentModel: {}
};
},
created() {
this.loadInitData();
@ -111,8 +106,8 @@
// this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
response.data.forEach(elem => {
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
})
})
});
});
},
//
handleConfirmCreate(data) {
@ -121,20 +116,20 @@
this.$message.success('创建剧本成功');
}).catch(error => {
this.$messageBox(`创建剧本失败: ${error.message}`);
})
});
},
//
handleModify(index, row){
//
handleModify(index, row) {
this.$refs.modifyScript.doShow(row.id);
},
//
handleConfirmModify(data){
updateQuest(data.id,data).then(resp => {
//
handleConfirmModify(data) {
updateQuest(data.id, data).then(resp => {
this.reloadTable();
this.$message.success('修改剧本成功');
}).catch(error => {
this.$messageBox(`修改剧本失败: ${error.message}`);
})
});
},
//
handleCreate(index, row) {
@ -143,12 +138,12 @@
//
handleRecord(index, row) {
scriptRecordNotify(row.id).then(resp => {
let query = { mapId: row.mapId, group: resp.data, scriptId: row.id };
this.$router.push({ path: `${UrlConfig.display}/script`, query });
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
})
});
},
//
handleDelete(index, row) {
@ -158,21 +153,21 @@
type: 'warning'
}).then(() => {
deleteQuest(row.id).then(response => {
this.$message.success('删除成功')
this.reloadTable()
this.$message.success('删除成功');
this.reloadTable();
}).catch(error => {
this.reloadTable()
this.reloadTable();
if (error.code == 500) {
this.$messageBox('删除失败')
this.$messageBox('删除失败');
} else if (error.code == 500009) {
this.$messageBox('该模板已被加载计划使用,无法删除')
this.$messageBox('该模板已被加载计划使用,无法删除');
}
})
}).catch(() => { })
});
}).catch(() => { });
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>