Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
# Conflicts: # src/views/display/tipScriptRecord.vue
This commit is contained in:
commit
7f907cc6ba
@ -1,79 +1,79 @@
|
|||||||
export default {
|
export default {
|
||||||
confirm: '确 定',
|
confirm: 'confirm',
|
||||||
cancel: '取 消',
|
cancel: 'cancel',
|
||||||
creatingSuccessful: '创建成功!',
|
creatingSuccessful: 'Created successfully!',
|
||||||
creatingFailed: '创建失败',
|
creatingFailed: 'Create a failure',
|
||||||
confirmDeletion: '是否确认删除?',
|
confirmDeletion: 'Confirm deletion?',
|
||||||
confirmBatchGeneration: '是否确认批量生成?',
|
confirmBatchGeneration: 'Is batch generation confirmed?',
|
||||||
hint: '提示',
|
hint: 'hint',
|
||||||
cancelledDelete: '已取消删除',
|
cancelledDelete: 'Cancelled delete',
|
||||||
cancelGeneration: '已取消批量生成',
|
cancelGeneration: 'Batch generation has been cancelled',
|
||||||
|
|
||||||
updateSuccessfully: '更新成功',
|
updateSuccessfully: 'The update is successful',
|
||||||
saveSuccessfully: '保存成功',
|
saveSuccessfully: 'Save success',
|
||||||
saveFailed: '保存失败',
|
saveFailed: 'Save failed',
|
||||||
updateFailed: '更新失败',
|
updateFailed: 'Update failed',
|
||||||
successfullyDelete: '删除成功',
|
successfullyDelete: 'Delete the success',
|
||||||
failDelete: '删除失败',
|
failDelete: 'Delete failed',
|
||||||
operationAbnormal: '操作异常',
|
operationAbnormal: 'Abnormal operation',
|
||||||
createSuccess: '创建成功',
|
createSuccess: 'Creating a successful',
|
||||||
|
|
||||||
cannotCoincide: '起始坐标和结束坐标不能重合',
|
cannotCoincide: 'The starting and ending coordinates cannot coincide',
|
||||||
cannotMerged: '存在非物理区段,不能合并',
|
cannotMerged: 'Non-physical extents exist and cannot be merged',
|
||||||
linkCannotMerged: '不在同一Link上的物理区段不能合并',
|
linkCannotMerged: 'Physical extents that are not on the same Link cannot be merged',
|
||||||
|
|
||||||
selectedSectionEmpty: '选择的区段为空',
|
selectedSectionEmpty: 'The selected section is empty',
|
||||||
selectedStationEmpty: '选择的车站为空',
|
selectedStationEmpty: 'The selected station is empty',
|
||||||
|
|
||||||
selectMap: '请先选择地图',
|
selectMap: 'Please select the map first',
|
||||||
selectTrainType: '请选择查看的列车模型',
|
selectTrainType: 'Please select the train model to view',
|
||||||
|
|
||||||
stationFont: '车站字体',
|
stationFont: 'The font',
|
||||||
kilometerFont: '公里标字体',
|
kilometerFont: 'Kilometer mark font',
|
||||||
meter: '米',
|
meter: 'meter',
|
||||||
angle: '度',
|
angle: 'angle',
|
||||||
|
|
||||||
operationSuccessfully: '操作成功',
|
operationSuccessfully: 'Operation is successful',
|
||||||
operationFailed: '操作失败',
|
operationFailed: 'The operation failure',
|
||||||
setupSuccessfully: '设置成功',
|
setupSuccessfully: 'Set up the success',
|
||||||
setupFailed: '设置失败',
|
setupFailed: 'Setup failed',
|
||||||
recoveryPrivilegesSuccessful: '回收权限成功',
|
recoveryPrivilegesSuccessful: 'Successful recovery authority',
|
||||||
recoveryPrivilegesFailed: '回收权限失败',
|
recoveryPrivilegesFailed: 'Recovery authority failed',
|
||||||
unpackingSuccessful: '解包成功',
|
unpackingSuccessful: 'Unpack the success',
|
||||||
unpackingFailed: '解包失败',
|
unpackingFailed: 'Unpack the failure',
|
||||||
pleaseEnterNameQuery: '请输入名称查询',
|
pleaseEnterNameQuery: 'Please enter name query',
|
||||||
routeSameID: '相同ID的数据已存在',
|
routeSameID: 'Data with the same ID already exists',
|
||||||
|
|
||||||
skinDeleteSuccessfully: '删除皮肤成功',
|
skinDeleteSuccessfully: 'Skin removed successfully',
|
||||||
skinDeleteFailed: '删除皮肤失败',
|
skinDeleteFailed: 'Failed to remove skin',
|
||||||
publishedOperationalGraphSuccessfully: '发布运行图成功',
|
publishedOperationalGraphSuccessfully: 'Published operational diagram successfully',
|
||||||
publishedOperationalGraphFailed: '发布运行图失败',
|
publishedOperationalGraphFailed: 'Failed to publish operation diagram',
|
||||||
deleteOperationGraphFailed: '删除运行图失败',
|
deleteOperationGraphFailed: 'Failed to delete operation diagram',
|
||||||
importOperationGraphSuccessfully: '导入运行图成功!',
|
importOperationGraphSuccessfully: 'The operation diagram was successfully imported!',
|
||||||
importOperationGraphFailed: '导入运行图失败!',
|
importOperationGraphFailed: 'Failed to import operation diagram!',
|
||||||
parsingOperationGraphFailed: '解析运行图失败!',
|
parsingOperationGraphFailed: 'Failed to parse the operational diagram!',
|
||||||
productCreationSuccessfully: '创建产品成功',
|
productCreationSuccessfully: 'Product creation success',
|
||||||
productCreationFailed: '创建产品失败',
|
productCreationFailed: 'Failed to create product',
|
||||||
updateProductSuccessfully: '更新产品成功',
|
updateProductSuccessfully: 'Product update is successful.',
|
||||||
updateProductFailed: '更新产品失败',
|
updateProductFailed: 'Product update failed',
|
||||||
deleteProductSuccessfully: '删除产品成功',
|
deleteProductSuccessfully: 'Product deleted successfully',
|
||||||
deleteProductFailed: '删除产品失败',
|
deleteProductFailed: 'Product deletion failed',
|
||||||
cannotDeleteProduct: '产品已被使用无法删除',
|
cannotDeleteProduct: 'The product has been used and cannot be deleted',
|
||||||
pathCreationSuccessful: '创建交路成功!',
|
pathCreationSuccessful: 'Create road successfully!',
|
||||||
createRoutingFailed: '创建交路失败',
|
createRoutingFailed: 'Failed to create junction',
|
||||||
pathUpdataSuccessful: '更新交路成功!',
|
pathUpdataSuccessful: 'Road update successful!',
|
||||||
pathUpdataFailed: '更新交路失败',
|
pathUpdataFailed: 'Update traffic failed',
|
||||||
|
|
||||||
failedLoadMap: '加载地图数据失败',
|
failedLoadMap: 'Failed to load map data',
|
||||||
sectionPointsDeficiency: '区段坐标缺失',
|
sectionPointsDeficiency: 'Segment coordinates missing',
|
||||||
|
|
||||||
dataValidationFailed: '数据校验不通过',
|
dataValidationFailed: 'Data validation failed',
|
||||||
dataValidationSuccess: '数据校验通过!',
|
dataValidationSuccess: 'Data verified!',
|
||||||
|
|
||||||
requestFailed: '请求失败',
|
requestFailed: 'The request failed',
|
||||||
|
|
||||||
dataQuestion: '有问题数据',
|
dataQuestion: 'Data in question',
|
||||||
dataList: '数据列表',
|
dataList: 'Data list',
|
||||||
|
|
||||||
updateProductTip: 'Will this operation modify the commodity status?',
|
updateProductTip: 'Will this operation modify the commodity status?',
|
||||||
deleteProductTip: 'This operation will delete the item. Do you want to continue?',
|
deleteProductTip: 'This operation will delete the item. Do you want to continue?',
|
||||||
|
@ -142,6 +142,7 @@ export default {
|
|||||||
meter: '米',
|
meter: '米',
|
||||||
|
|
||||||
code: '编码:',
|
code: '编码:',
|
||||||
|
codeC: '编码',
|
||||||
imageName: '图片名称:',
|
imageName: '图片名称:',
|
||||||
imageWidth: '图片宽度:',
|
imageWidth: '图片宽度:',
|
||||||
imageHeight: '图片高度:',
|
imageHeight: '图片高度:',
|
||||||
@ -329,6 +330,7 @@ export default {
|
|||||||
|
|
||||||
trainCode: '列车编号:',
|
trainCode: '列车编号:',
|
||||||
groupNumber: '车组号:',
|
groupNumber: '车组号:',
|
||||||
|
trainNumber: '车组号',
|
||||||
modelCode: '车类型:',
|
modelCode: '车类型:',
|
||||||
|
|
||||||
trainmodelCreate: '新建车类型',
|
trainmodelCreate: '新建车类型',
|
||||||
|
@ -3,8 +3,8 @@ import * as throttleUtil from '@/utils/throttle';
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
_clientWidth: '',
|
_clientWidth: 0,
|
||||||
_clientHeight: ''
|
_clientHeight: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
|
@ -40,6 +40,7 @@ import Lessoncategory from '@/views/lesson/lessoncategory/index';
|
|||||||
|
|
||||||
import Scriptmanage from '@/views/scriptManage/index';
|
import Scriptmanage from '@/views/scriptManage/index';
|
||||||
import ScriptmanageHome from '@/views/scriptManage/home';
|
import ScriptmanageHome from '@/views/scriptManage/home';
|
||||||
|
import ScriptDisplay from '@/views/scriptManage/display/index';
|
||||||
|
|
||||||
import ScriptDetail from '@/views/scriptManage/detail/index';
|
import ScriptDetail from '@/views/scriptManage/detail/index';
|
||||||
import Teach from '@/views/teach/index';
|
import Teach from '@/views/teach/index';
|
||||||
@ -133,6 +134,7 @@ export const userPlan = '015'; // 计划系统
|
|||||||
|
|
||||||
export const UrlConfig = {
|
export const UrlConfig = {
|
||||||
display: '/display',
|
display: '/display',
|
||||||
|
scriptDisplay: '/scriptDisplay',
|
||||||
examRuleDraft: '/examRule/draft',
|
examRuleDraft: '/examRule/draft',
|
||||||
examRuleManage: '/examRule/manage',
|
examRuleManage: '/examRule/manage',
|
||||||
map: {
|
map: {
|
||||||
@ -211,7 +213,8 @@ export const UrlConfig = {
|
|||||||
},
|
},
|
||||||
script: {
|
script: {
|
||||||
prefix: '/script',
|
prefix: '/script',
|
||||||
detail: '/script/detail'
|
detail: '/script/detail',
|
||||||
|
display: '/script/display'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -310,6 +313,13 @@ export const asyncRouter = [
|
|||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/scriptDisplay/:mode',
|
||||||
|
component: ScriptDisplay,
|
||||||
|
meta: {
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/trainroom',
|
path: '/trainroom',
|
||||||
component: TrainRoom,
|
component: TrainRoom,
|
||||||
|
@ -3,9 +3,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.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' // 琰培
|
// BASE_API = 'http://192.168.3.4:9000' // 琰培
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
|
@ -267,7 +267,7 @@ export default {
|
|||||||
group: this.group,
|
group: this.group,
|
||||||
conversationId: this.conversationId
|
conversationId: this.conversationId
|
||||||
};
|
};
|
||||||
const res = await postDataBd(param).catch(error => {
|
await postDataBd(param).catch(error => {
|
||||||
this.sending = false;
|
this.sending = false;
|
||||||
const message = JSON.parse(error.message);
|
const message = JSON.parse(error.message);
|
||||||
if (message.err_no == 3301) {
|
if (message.err_no == 3301) {
|
||||||
|
@ -107,6 +107,14 @@ export default {
|
|||||||
Jl3dDrive
|
Jl3dDrive
|
||||||
},
|
},
|
||||||
mixins: [WindowResizeHandler],
|
mixins: [WindowResizeHandler],
|
||||||
|
props: {
|
||||||
|
size: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mode: '',
|
mode: '',
|
||||||
@ -235,8 +243,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resizeHandler() {
|
resizeHandler() {
|
||||||
const width = this._clientWidth;
|
const width = this.size ? this.size.width : this._clientWidth;
|
||||||
const height = this._clientHeight;
|
const height = this.size ? this.size.height : this._clientHeight;
|
||||||
|
|
||||||
this.$store.dispatch('config/resize', { width, height });
|
this.$store.dispatch('config/resize', { width, height });
|
||||||
|
|
||||||
@ -332,9 +340,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 加载地图数据
|
// 加载地图数据
|
||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
const width = document.documentElement.clientWidth;
|
// const width = document.documentElement.clientWidth;
|
||||||
const height = document.documentElement.clientHeight + 200;
|
// const height = document.documentElement.clientHeight + 200;
|
||||||
this.$store.dispatch('config/resize', { width, height });
|
// this.$store.dispatch('config/resize', { width, height });
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||||
<tip-script-record ref="tipTaskRecord" :group="group" />
|
<!-- <tip-script-record ref="tipTaskRecord" :group="group" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -45,7 +45,8 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
offset: {
|
offset: {
|
||||||
type: Number
|
type: Number,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<<<<<<< HEAD
|
||||||
<div class="reminder-drag">
|
<div class="reminder-drag">
|
||||||
<div class="reminder-box" ref="drapBox" :style="{height:'100%'}">
|
<div class="reminder-box" ref="drapBox" :style="{height:'100%'}">
|
||||||
<div class="actionPane">
|
<div class="actionPane">
|
||||||
@ -13,15 +14,45 @@
|
|||||||
<el-button type="success" @click="saveScenesData" :loading="isSavingScript" >{{$t('scriptRecord.saveData')}}</el-button>
|
<el-button type="success" @click="saveScenesData" :loading="isSavingScript" >{{$t('scriptRecord.saveData')}}</el-button>
|
||||||
<!-- 暂停 -->
|
<!-- 暂停 -->
|
||||||
</el-button-group>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import GetAction from './scriptRecord/getAction';
|
import GetAction from './scriptRecord/getAction';
|
||||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
|
||||||
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
|
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
export default {
|
export default {
|
||||||
name: 'TipScriptRecord',
|
name: 'TipScriptRecord',
|
||||||
props: {
|
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>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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;" />
|
<div :id="canvasId" style="background: #000;" />
|
||||||
<progress-bar ref="progressBar" />
|
<progress-bar ref="progressBar" />
|
||||||
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
|
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
|
||||||
@ -60,7 +60,7 @@ export default {
|
|||||||
return canvasId;
|
return canvasId;
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
if (this.mode === TrainingMode.EDIT || this.mode === TrainingMode.MAP_EDIT) {
|
if (this.mode == TrainingMode.EDIT || this.mode == TrainingMode.MAP_EDIT) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
<i class="el-icon-close" />
|
<i class="el-icon-close" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-row type="flex" justify="center">
|
<el-row type="flex" justify="center" class="content_box">
|
||||||
<el-form label-width="100px" class="demo-ruleForm">
|
<el-form label-width="80px" class="demo-ruleForm">
|
||||||
<el-form-item :label="$t('map.viewShows')">
|
<el-form-item :label="$t('map.viewShows')">
|
||||||
<el-checkbox-group v-model="viewSelect" :min="1" @change="handleSelectView">
|
<el-checkbox-group v-model="viewSelect" :min="1" @change="handleSelectView">
|
||||||
<el-checkbox :label="ViewMode.LOGIC">{{ $t('map.logicalView') }}</el-checkbox>
|
<el-checkbox :label="ViewMode.LOGIC">{{ $t('map.logicalView') }}</el-checkbox>
|
||||||
@ -28,6 +28,12 @@
|
|||||||
{{ view.name }}</el-checkbox>
|
{{ view.name }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-row>
|
</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -53,8 +59,15 @@ export default {
|
|||||||
{ code: 'Signal', name: this.$t('map.signal') },
|
{ code: 'Signal', name: this.$t('map.signal') },
|
||||||
{ code: 'Switch', name: this.$t('map.switch') }
|
{ code: 'Switch', name: this.$t('map.switch') }
|
||||||
],
|
],
|
||||||
|
HybridViewTypeList: [],
|
||||||
|
|
||||||
|
defaultLogicalSelect: [],
|
||||||
|
defaultPhysicalSelect: [],
|
||||||
|
defaultHybridSelect: [],
|
||||||
|
|
||||||
logicalLevelsSelect: [],
|
logicalLevelsSelect: [],
|
||||||
physicalLevelsSelect: []
|
physicalLevelsSelect: [],
|
||||||
|
hybridLevelsSelect: [] // 混合图层
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -75,22 +88,40 @@ export default {
|
|||||||
initPage() {
|
initPage() {
|
||||||
this.$Dictionary.logicalViewType().then(list => {
|
this.$Dictionary.logicalViewType().then(list => {
|
||||||
this.LogicalViewTypeList = 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.LogicalViewTypeList.forEach(elem => {
|
||||||
this.logicalLevelsSelect.push(elem.code);
|
this.logicalLevelsSelect.push(elem.code);
|
||||||
|
this.defaultLogicalSelect.push(elem.code);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$Dictionary.physicalViewType().then(list => {
|
this.$Dictionary.physicalViewType().then(list => {
|
||||||
this.PhysicalViewTypeList = 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.PhysicalViewTypeList.forEach(elem => {
|
||||||
this.physicalLevelsSelect.push(elem.code);
|
this.physicalLevelsSelect.push(elem.code);
|
||||||
|
this.defaultPhysicalSelect.push(elem.code);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSelectView(value) {
|
handleSelectView(value) {
|
||||||
if (value.length == 2) {
|
if (value.length == 2) {
|
||||||
this.$emit('handleSelectView', '03');
|
this.$emit('handleSelectView', '03');
|
||||||
|
this.hybridLevelsSelect = this.copyList(this.defaultHybridSelect);
|
||||||
} else {
|
} else {
|
||||||
this.$emit('handleSelectView', value);
|
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) {
|
handleSelectLogicalView(handle) {
|
||||||
@ -98,6 +129,12 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSelectPhysicalView(handle) {
|
handleSelectPhysicalView(handle) {
|
||||||
this.$emit('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;
|
right: 24px;
|
||||||
top: 43px;
|
top: 43px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
padding: 15px;
|
|
||||||
|
|
||||||
.title{
|
.title{
|
||||||
margin-bottom: 8px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
padding: 9px;
|
||||||
.fl-title{
|
.fl-title{
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
@ -140,17 +177,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content_box{
|
||||||
|
padding: 15px;
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/deep/{
|
/deep/{
|
||||||
.el-dialog__body{
|
.el-dialog__body{
|
||||||
padding: 0 8px 8px 21px;
|
padding: 0 8px 8px 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-checkbox{
|
.el-checkbox{
|
||||||
margin-right: 14px;
|
margin-right: 10px;
|
||||||
|
width: 75px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item{
|
.el-form-item{
|
||||||
margin-bottom: 2px;
|
margin-bottom: -4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
@click="showMap"
|
@click="showMap"
|
||||||
>{{ $t('map.viewLayer') }}</el-button>
|
>{{ $t('map.viewLayer') }}</el-button>
|
||||||
</div>
|
</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">
|
<el-tab-pane label="进路" name="route">
|
||||||
<route-operate
|
<route-operate
|
||||||
ref="routeOperate"
|
ref="routeOperate"
|
||||||
@ -228,6 +228,12 @@ export default {
|
|||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/deep/ {
|
||||||
|
.map_card .el-tabs__header .el-tabs__item.is-active {
|
||||||
|
border-bottom-color: #f5f7fa;
|
||||||
|
background: #f5f7fa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/deep/ .map-draft-group {
|
/deep/ .map-draft-group {
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -97,7 +97,7 @@ export default {
|
|||||||
prop: 'stationCode'
|
prop: 'stationCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('map.routeType'),
|
title: this.$t('map.accessType'),
|
||||||
prop: 'natureType'
|
prop: 'natureType'
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -129,7 +129,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('map.routeSideTurnoutData'),
|
title: this.$t('map.accessSideTurnoutData'),
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('map.preview'),
|
name: this.$t('map.preview'),
|
||||||
@ -165,7 +165,7 @@ export default {
|
|||||||
|
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('map.routePhysical'),
|
title: this.$t('map.accessPhysical'),
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('map.preview'),
|
name: this.$t('map.preview'),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<span>s</span>
|
<span>s</span>
|
||||||
</el-form-item>
|
</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-select v-model="addModel.natureType" :filterable="true">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in RouteNatureTypeList"
|
v-for="item in RouteNatureTypeList"
|
||||||
@ -457,10 +457,10 @@ export default {
|
|||||||
{ required: true, message: this.$t('rules.proximitySection'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.proximitySection'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
natureType: [
|
natureType: [
|
||||||
{ required: true, message: this.$t('rules.routePropertyType'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.accessPropertyType'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
autoType: [
|
autoType: [
|
||||||
{ required: true, message: this.$t('rules.autoRouteType'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.autoAccessType'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
routeSectionList: [
|
routeSectionList: [
|
||||||
{ required: true, message: '请选择进路物理区段数据', trigger: 'change' }
|
{ required: true, message: '请选择进路物理区段数据', trigger: 'change' }
|
||||||
|
@ -4,15 +4,14 @@
|
|||||||
<div class="map-view">
|
<div class="map-view">
|
||||||
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||||
</div>
|
</div>
|
||||||
<div v-loading="loading" class="map-draft">
|
<div class="map-draft">
|
||||||
<div v-if="viewDraft==='draft'">
|
<div v-show="viewDraft==='draft'">
|
||||||
<map-operate
|
<map-operate
|
||||||
ref="mapOperate"
|
ref="mapOperate"
|
||||||
:card-height="cardHeight"
|
:card-height="cardHeight"
|
||||||
:map-info="mapInfo"
|
:map-info="mapInfo"
|
||||||
:selected="selected"
|
:selected="selected"
|
||||||
:map-saveing="mapSaveing"
|
:map-saveing="mapSaveing"
|
||||||
@hook:mounted="loading = false"
|
|
||||||
@handleSelectLogicalView="handleSelectLogicalView"
|
@handleSelectLogicalView="handleSelectLogicalView"
|
||||||
@handleSelectPhysicalView="handleSelectPhysicalView"
|
@handleSelectPhysicalView="handleSelectPhysicalView"
|
||||||
@saveMapEvent="saveMapEvent"
|
@saveMapEvent="saveMapEvent"
|
||||||
@ -24,14 +23,13 @@
|
|||||||
@showMap="showMap"
|
@showMap="showMap"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="viewDraft != 'draft'">
|
<div v-show="viewDraft != 'draft'">
|
||||||
<data-relation
|
<data-relation
|
||||||
ref="dataRelation"
|
ref="dataRelation"
|
||||||
:card-height="cardHeight"
|
:card-height="cardHeight"
|
||||||
:map-info="mapInfo"
|
:map-info="mapInfo"
|
||||||
:selected="selected"
|
:selected="selected"
|
||||||
@selectView="selectViewDraft"
|
@selectView="selectViewDraft"
|
||||||
@hook:mounted="loading = false"
|
|
||||||
@showMap="showMap"
|
@showMap="showMap"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -40,6 +38,7 @@
|
|||||||
@handleSelectView="handleSelectView"
|
@handleSelectView="handleSelectView"
|
||||||
@handleSelectLogicalView="handleSelectLogicalView"
|
@handleSelectLogicalView="handleSelectLogicalView"
|
||||||
@handleSelectPhysicalView="handleSelectPhysicalView"
|
@handleSelectPhysicalView="handleSelectPhysicalView"
|
||||||
|
@handleSelectHybridView="handleSelectHybridView"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,7 +56,6 @@ import { EventBus } from '@/scripts/event-bus';
|
|||||||
import ConfigMap from './configMap';
|
import ConfigMap from './configMap';
|
||||||
|
|
||||||
import DataRelation from './dataRelation/index';
|
import DataRelation from './dataRelation/index';
|
||||||
import { setTimeout } from 'timers';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MapView',
|
name: 'MapView',
|
||||||
@ -80,8 +78,7 @@ export default {
|
|||||||
autoSaveTask: null,
|
autoSaveTask: null,
|
||||||
selected: null,
|
selected: null,
|
||||||
mapInfo: { name: this.$t('map.pleaseSelectMap') },
|
mapInfo: { name: this.$t('map.pleaseSelectMap') },
|
||||||
timeDemon: null,
|
timeDemon: null
|
||||||
loading: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -89,7 +86,7 @@ export default {
|
|||||||
this.initAutoSaveTask();
|
this.initAutoSaveTask();
|
||||||
},
|
},
|
||||||
$route() {
|
$route() {
|
||||||
this.$$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.loadInitPage();
|
this.loadInitPage();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -125,10 +122,7 @@ export default {
|
|||||||
this.$refs.configMap.doShow();
|
this.$refs.configMap.doShow();
|
||||||
},
|
},
|
||||||
selectViewDraft(data) {
|
selectViewDraft(data) {
|
||||||
this.loading = true;
|
|
||||||
setTimeout(() => {
|
|
||||||
this.viewDraft = data;
|
this.viewDraft = data;
|
||||||
}, 300);
|
|
||||||
},
|
},
|
||||||
loadInitPage() {
|
loadInitPage() {
|
||||||
this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT });
|
this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT });
|
||||||
@ -180,6 +174,11 @@ export default {
|
|||||||
this.$refs.jlmapVisual.setLevelVisible(handle);
|
this.$refs.jlmapVisual.setLevelVisible(handle);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleSelectHybridView(handle) {
|
||||||
|
if (this.$refs && this.$refs.jlmapVisual) {
|
||||||
|
this.$refs.jlmapVisual.setLevelVisible(handle);
|
||||||
|
}
|
||||||
|
},
|
||||||
clickEvent(em) {
|
clickEvent(em) {
|
||||||
var device = this.getDeviceByEm(em);
|
var device = this.getDeviceByEm(em);
|
||||||
this.onSelect(device);
|
this.onSelect(device);
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="dataForm" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="dataForm" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
|
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -109,6 +113,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -271,7 +279,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.coordinate {
|
.coordinate {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<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">
|
<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>
|
<div class="card_title">{{ items.name }}</div>
|
||||||
<template v-for="item in items.item">
|
<template v-for="item in items.item">
|
||||||
<template v-if="checkFieldType(item, 'select')">
|
<template v-if="checkFieldType(item, 'select')">
|
||||||
@ -305,14 +305,16 @@ export default {
|
|||||||
width: 110px;
|
width: 110px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form{
|
.form_data{
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
padding-bottom: 0;
|
padding-top: 6px;
|
||||||
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card{
|
.card{
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
padding-top: 18px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
@ -329,6 +331,10 @@ export default {
|
|||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.card_code{
|
||||||
|
border: 0px solid #ccc;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.input-with-select .el-input-group__prepend {
|
.input-with-select .el-input-group__prepend {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -35,9 +37,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -135,6 +139,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -269,4 +277,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -25,9 +27,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -117,6 +121,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -250,4 +258,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -329,7 +329,7 @@ export default {
|
|||||||
},
|
},
|
||||||
resizeCardHeight() {
|
resizeCardHeight() {
|
||||||
var padding = 0;
|
var padding = 0;
|
||||||
this.cardHeights = this.cardHeight - padding - 90;
|
this.cardHeights = this.cardHeight - padding - 74;
|
||||||
},
|
},
|
||||||
handleSelectControlPage(device) {
|
handleSelectControlPage(device) {
|
||||||
const type = device._type;
|
const type = device._type;
|
||||||
@ -394,7 +394,7 @@ export default {
|
|||||||
|
|
||||||
/deep/ .map-draft-group {
|
/deep/ .map-draft-group {
|
||||||
float: right;
|
float: right;
|
||||||
margin: 10px 5px;
|
margin: 6px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .view-control {
|
/deep/ .view-control {
|
||||||
@ -405,6 +405,19 @@ export default {
|
|||||||
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
||||||
padding: 0 20px;
|
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 {
|
.mapEdit .el-tabs__nav-prev {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -37,9 +39,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -127,6 +131,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -240,7 +248,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.coordinate {
|
.coordinate {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -93,6 +97,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -231,7 +239,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.coordinate {
|
.coordinate {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -150,6 +150,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -276,7 +280,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.view-control {
|
.view-control {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -36,11 +38,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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="isNew" type="primary" size="small" @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="isFd" type="primary" size="small" @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="isSd" type="primary" size="small" @click="isSdCreate">{{ $t('map.create') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -157,6 +161,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '130px',
|
labelWidth: '130px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -568,6 +576,12 @@ export default {
|
|||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.coordinate {
|
.coordinate {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.create')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.create')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -25,9 +27,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.splitMerge')" name="three">
|
<el-tab-pane class="view-control" :label="$t('map.splitMerge')" name="three">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
||||||
@ -43,6 +47,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
:type="field === 'splitSection' ? 'danger' : 'primary'"
|
:type="field === 'splitSection' ? 'danger' : 'primary'"
|
||||||
|
size="small"
|
||||||
@click="hover('splitSection')"
|
@click="hover('splitSection')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -67,6 +72,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
:type="field === 'leftSection' ? 'danger' : 'primary'"
|
:type="field === 'leftSection' ? 'danger' : 'primary'"
|
||||||
|
size="small"
|
||||||
@click="hover('leftSection')"
|
@click="hover('leftSection')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -81,6 +87,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
:type="field === 'rightSection' ? 'danger' : 'primary'"
|
:type="field === 'rightSection' ? 'danger' : 'primary'"
|
||||||
|
size="small"
|
||||||
@click="hover('rightSection')"
|
@click="hover('rightSection')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -113,9 +120,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.switchSection')" name="five">
|
<el-tab-pane class="view-control" :label="$t('map.switchSection')" name="five">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
||||||
@ -145,9 +154,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -284,13 +295,17 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '160px',
|
labelWidth: '160px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: '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: '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', 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.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||||
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||||
@ -1360,7 +1375,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.el-transfer {
|
.el-transfer {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
<template>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -54,9 +56,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
@ -197,12 +201,16 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: 'name&&code', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
|
|
||||||
{ prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
|
{ 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: '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: '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 },
|
{ 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' }
|
{ required: true, message: this.$t('rules.signalGuidePositionX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'guidePosition.y': [
|
'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>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -25,9 +27,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -101,12 +105,16 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
|
|
||||||
{ prop: 'name', label: this.$t('map.stationName'), type: 'input' },
|
{ 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: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||||
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
||||||
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
||||||
@ -317,4 +325,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -25,9 +27,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -92,12 +96,16 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '160px',
|
labelWidth: '160px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: '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: '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: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
|
||||||
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
|
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
|
||||||
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
|
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
|
||||||
@ -272,4 +280,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -48,9 +50,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -122,12 +126,16 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '130px',
|
labelWidth: '130px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
|
|
||||||
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', disabled: true },
|
{ 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: '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: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||||
{ prop: 'nameShow', label: this.$t('map.stationstandShowName'), 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' }
|
{ required: true, message: this.$t('rules.stationstandHeight'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
'position.x': [
|
'position.x': [
|
||||||
{ required: true, message: this.$t('rule.stationstandPositionX'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
'position.y': [
|
'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>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -25,9 +27,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -97,12 +101,16 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '170px',
|
labelWidth: '170px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: '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: '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: '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.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' },
|
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: this.$t('map.switchPositionY'), type: 'number', placeholder: 'px' },
|
||||||
@ -412,7 +420,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.el-transfer {
|
.el-transfer {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -29,9 +31,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -116,6 +120,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '130px',
|
labelWidth: '130px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -234,7 +242,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-select .el-input {
|
.el-select .el-input {
|
||||||
width: 130px;
|
width: 130px;
|
||||||
|
@ -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>
|
|
@ -1,63 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<!-- <el-tab-pane class="view-control" label="属性" name="first">
|
<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="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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<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 :data="trainList.filter(data => !search || data.groupNumber.toLowerCase().includes(search.toLowerCase()))" style="width: 100%">
|
||||||
<el-table-column label="车组号" prop="groupNumber" />
|
<el-table-column :label="$t('map.trainNumber')" prop="groupNumber" />
|
||||||
<el-table-column label="编码" prop="code" />
|
<el-table-column :label="$t('map.codeC')" prop="code" />
|
||||||
<el-table-column align="right">
|
<el-table-column align="right">
|
||||||
<template slot="header" slot-scope="scope">
|
<template slot="header">
|
||||||
<el-input v-model="search" size="mini" placeholder="输入关键字搜索" />
|
<el-input v-model="search" size="mini" :placeholder="$t('map.pleaseSelect')" />
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table></el-scrollbar>
|
</el-table>
|
||||||
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<train-model ref="trainMode" />
|
<train-model ref="trainMode" />
|
||||||
@ -214,4 +177,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -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>
|
|
@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft">
|
<div class="button_box">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button-group class="map-draft-group">
|
||||||
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
@ -28,9 +30,11 @@
|
|||||||
:titles="['Section集合', '选择Section']"
|
:titles="['Section集合', '选择Section']"
|
||||||
/>
|
/>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft">
|
<div class="button_box">
|
||||||
<el-button type="primary" @click="createTrainWindowByCollection">{{ $t('map.create') }}</el-button>
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="createTrainWindowByCollection">{{ $t('map.create') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -126,6 +130,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
@ -364,4 +372,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -98,10 +102,14 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: {
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
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: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
|
||||||
{ prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' },
|
{ prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' },
|
||||||
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
|
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
|
||||||
@ -241,7 +249,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.coordinate {
|
.coordinate {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
ref="newForm"
|
ref="newForm"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
:model="newModel"
|
:model="newModel"
|
||||||
label-width="120px"
|
label-width="140px"
|
||||||
size="mini"
|
size="mini"
|
||||||
:rules="newRules"
|
:rules="newRules"
|
||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
@ -39,7 +39,7 @@
|
|||||||
label-position="right"
|
label-position="right"
|
||||||
:model="pullModel"
|
:model="pullModel"
|
||||||
:rules="pullRules"
|
:rules="pullRules"
|
||||||
label-width="120px"
|
label-width="140px"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
>
|
||||||
<el-form-item :label="$t('map.mapName')" prop="id">
|
<el-form-item :label="$t('map.mapName')" prop="id">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div id="scriptTitle">剧本详情</div>
|
<div id="scriptTitle">剧本详情</div>
|
||||||
<div id="sciptForm">
|
<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>
|
||||||
<div id="btnList">
|
<div id="btnList">
|
||||||
<span slot="footer" class="btn-footer">
|
<span slot="footer" class="btn-footer">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import {listPublishMap} from '@/api/jmap/map'
|
import {listPublishMap} from '@/api/jmap/map';
|
||||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import {getQuestById, updateQuest, deleteQuest} from '@/api/quest';
|
import {getQuestById, updateQuest, deleteQuest} from '@/api/quest';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
@ -40,54 +40,47 @@
|
|||||||
description: ''
|
description: ''
|
||||||
},
|
},
|
||||||
isShow: false,
|
isShow: false,
|
||||||
height: 0,
|
height: 0
|
||||||
}
|
};
|
||||||
},
|
|
||||||
props: {
|
|
||||||
title: String,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
const form = {
|
||||||
let form = {
|
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
|
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
|
||||||
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList, disabled: this.disabled},
|
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList, disabled: this.disabled},
|
||||||
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
|
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入剧本', trigger: 'blur' },
|
{ required: true, message: '请输入剧本', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
{ required: true, message: '请选择地图', trigger: 'change' }
|
||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
{ 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: {
|
watch: {
|
||||||
$route(newVal) {
|
$route(newVal) {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
listPublishMap().then(response => {
|
||||||
|
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||||
|
this.loadInitData();
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resizeHandler() {
|
resizeHandler() {
|
||||||
this.height = this._clientHeight - 50;
|
this.height = this._clientHeight - 50;
|
||||||
@ -96,7 +89,7 @@
|
|||||||
const scriptId =this.$route.params.scriptId;
|
const scriptId =this.$route.params.scriptId;
|
||||||
if (parseInt(scriptId)) {
|
if (parseInt(scriptId)) {
|
||||||
getQuestById(scriptId).then(resp=>{
|
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=data;
|
||||||
this.formModel.id=scriptId;
|
this.formModel.id=scriptId;
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
@ -105,26 +98,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
drawUp() {
|
drawUp() {
|
||||||
let data=this.formModel;
|
const data=this.formModel;
|
||||||
scriptRecordNotify(data.id).then(resp => {
|
scriptRecordNotify(data.id).then(resp => {
|
||||||
let query = { mapId: data.mapId, group: resp.data, scriptId: data.id };
|
const query = { mapId: data.mapId, group: resp.data, scriptId: data.id };
|
||||||
this.$router.push({ path: `${UrlConfig.display}/script`, query });
|
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
modifyScript() {
|
modifyScript() {
|
||||||
let data=this.formModel;
|
const data=this.formModel;
|
||||||
updateQuest(data.id, data).then(resp => {
|
updateQuest(data.id, data).then(resp => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success('修改剧本成功');
|
this.$message.success('修改剧本成功');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`修改剧本失败: ${error.message}`);
|
this.$messageBox(`修改剧本失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
deleteScript() {
|
deleteScript() {
|
||||||
let data=this.formModel;
|
const data=this.formModel;
|
||||||
this.$confirm('此操作将删除此剧本, 是否继续?', '提示', {
|
this.$confirm('此操作将删除此剧本, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@ -134,13 +127,13 @@
|
|||||||
this.$message.success('删除成功');
|
this.$message.success('删除成功');
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$router.push({ path: `${UrlConfig.script.prefix}` });
|
this.$router.push({ path: `${UrlConfig.script.prefix}` });
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('删除失败');
|
this.$messageBox('删除失败');
|
||||||
})
|
});
|
||||||
}).catch(() => { })
|
}).catch(() => { });
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
50
src/views/scriptManage/display/index.vue
Normal file
50
src/views/scriptManage/display/index.vue
Normal 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>
|
@ -1,20 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
<create-script ref="createScript" title="创建脚本" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
||||||
<create-script ref='createScript' @reloadTable="reloadTable" @create="handleConfirmCreate" title="创建脚本">
|
<create-script ref="modifyScript" title="修改脚本" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||||
</create-script>
|
|
||||||
<create-script ref='modifyScript' @reloadTable="reloadTable" @create="handleConfirmModify" title="修改脚本">
|
|
||||||
</create-script>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { superAdmin } from '@/router';
|
|
||||||
// import { listPublishMap } from '@/api/jmap/mapdraft';
|
// import { listPublishMap } from '@/api/jmap/mapdraft';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
// import { getSkinCodeList } from '@/api/management/mapskin'
|
// import { getSkinCodeList } from '@/api/management/mapskin'
|
||||||
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay } from '@/api/runplan';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import { getQuestPageList, createQuest, deleteQuest, updateQuest} from '@/api/quest';
|
import { getQuestPageList, createQuest, deleteQuest, updateQuest} from '@/api/quest';
|
||||||
import { scriptRecordNotify } from '@/api/simulation';
|
import { scriptRecordNotify } from '@/api/simulation';
|
||||||
@ -24,7 +19,7 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'ScriptManage',
|
name: 'ScriptManage',
|
||||||
components: {
|
components: {
|
||||||
CreateScript,
|
CreateScript
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -60,9 +55,9 @@
|
|||||||
prop: 'mapId',
|
prop: 'mapId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
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: '创建时间',
|
title: '创建时间',
|
||||||
@ -77,17 +72,17 @@
|
|||||||
{
|
{
|
||||||
name: '录制',
|
name: '录制',
|
||||||
handleClick: this.handleRecord,
|
handleClick: this.handleRecord,
|
||||||
type: 'success',
|
type: 'success'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: '删除',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger',
|
type: 'danger'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '修改',
|
name: '修改',
|
||||||
handleClick: this.handleModify,
|
handleClick: this.handleModify,
|
||||||
type: '',
|
type: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -97,8 +92,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {},
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
@ -111,8 +106,8 @@
|
|||||||
// this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
// this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||||
response.data.forEach(elem => {
|
response.data.forEach(elem => {
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 确定创建
|
// 确定创建
|
||||||
handleConfirmCreate(data) {
|
handleConfirmCreate(data) {
|
||||||
@ -121,7 +116,7 @@
|
|||||||
this.$message.success('创建剧本成功');
|
this.$message.success('创建剧本成功');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建剧本失败: ${error.message}`);
|
this.$messageBox(`创建剧本失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 修改
|
// 修改
|
||||||
handleModify(index, row) {
|
handleModify(index, row) {
|
||||||
@ -134,7 +129,7 @@
|
|||||||
this.$message.success('修改剧本成功');
|
this.$message.success('修改剧本成功');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`修改剧本失败: ${error.message}`);
|
this.$messageBox(`修改剧本失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 创建
|
// 创建
|
||||||
handleCreate(index, row) {
|
handleCreate(index, row) {
|
||||||
@ -143,12 +138,12 @@
|
|||||||
// 录制
|
// 录制
|
||||||
handleRecord(index, row) {
|
handleRecord(index, row) {
|
||||||
scriptRecordNotify(row.id).then(resp => {
|
scriptRecordNotify(row.id).then(resp => {
|
||||||
let query = { mapId: row.mapId, group: resp.data, scriptId: row.id };
|
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id };
|
||||||
this.$router.push({ path: `${UrlConfig.display}/script`, query });
|
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
@ -158,21 +153,21 @@
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteQuest(row.id).then(response => {
|
deleteQuest(row.id).then(response => {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功');
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
if (error.code == 500) {
|
if (error.code == 500) {
|
||||||
this.$messageBox('删除失败')
|
this.$messageBox('删除失败');
|
||||||
} else if (error.code == 500009) {
|
} else if (error.code == 500009) {
|
||||||
this.$messageBox('该模板已被加载计划使用,无法删除')
|
this.$messageBox('该模板已被加载计划使用,无法删除');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}).catch(() => { })
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user