This commit is contained in:
fan 2020-12-30 11:15:34 +08:00
commit 82797b16bb
13 changed files with 64 additions and 59 deletions

View File

@ -264,7 +264,7 @@
:placeholder="item.placeholder" :placeholder="item.placeholder"
:disabled="item.disabled" :disabled="item.disabled"
:value-format="'HH:mm:ss'" :value-format="'HH:mm:ss'"
:picker-options="{ selectableRange: '00:00:00 - 23:59:59' }" :picker-options="{ selectableRange: item.selectableRange ||'00:00:00 - 23:59:59' }"
/> />
</el-form-item> </el-form-item>
</template> </template>

View File

@ -8,7 +8,7 @@ import KeyboardController from './keyboardController';
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser'; import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
import { updateIscsData } from './utils/parser'; import { updateIscsData } from './utils/parser';
import store from '@/store/index'; import store from '@/store/index';
import { selectLineCode } from './constant/deviceStyle'; import fuzhouStyle from './constant/skinCode/fuzhou_01.js';
const renderer = 'canvas'; const renderer = 'canvas';
const devicePixelRatio = 1; const devicePixelRatio = 1;
@ -60,7 +60,7 @@ class Iscs {
// 保存原始数据 // 保存原始数据
this.data = config; this.data = config;
this.lineCode = lineCode; this.lineCode = lineCode;
this.style = this.loadStyle(lineCode); this.style = fuzhouStyle;
// 保存需展现的画布大小 // 保存需展现的画布大小
this.canvasSize = { this.canvasSize = {
x: 0, x: 0,
@ -112,9 +112,11 @@ class Iscs {
if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); } if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); }
} }
loadStyle(lineCode) {
return selectLineCode(lineCode); // loadStyle(lineCode) {
} // return selectLineCode(lineCode);
// }
setCenter(deviceCode) { setCenter(deviceCode) {
const device = this.iscsDevice[deviceCode]; const device = this.iscsDevice[deviceCode];
if (device && device.instance) { if (device && device.instance) {

View File

@ -7,12 +7,12 @@
<!--<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" @change="handleChange" />--> <!--<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" @change="handleChange" />-->
<!--<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />--> <!--<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />-->
<div style="border-bottom: 1px solid #EBEEF5; padding: 10px 10px;"> <div style="border-bottom: 1px solid #EBEEF5; padding: 10px 10px;">
<el-select v-model="lineCode" size="mini" placeholder="请选择线路"> <el-select v-model="mapId" size="mini" placeholder="请选择线路">
<el-option <el-option
v-for="item in lineList" v-for="item in mapPublishList"
:key="item.code" :key="item.id"
:label="item.name" :label="item.name"
:value="item.code" :value="item.id"
/> />
</el-select> </el-select>
</div> </div>
@ -34,7 +34,6 @@
import { DeviceMenu } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth'; import { removeSessionStorage } from '@/utils/auth';
import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map'; import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map';
import { getLineCodeList } from '@/api/management/mapline';
export default { export default {
name: 'UserMapList', name: 'UserMapList',
@ -53,10 +52,10 @@ export default {
y: 0 y: 0
}, },
editModel: {}, editModel: {},
lineCode: '', mapId: '',
mapList: [], mapList: [],
mapStationList: [], mapStationList: [],
lineList: [], mapPublishList: [],
pageTreeMap: { pageTreeMap: {
'01': [], '01': [],
'02': [ '02': [
@ -885,8 +884,8 @@ export default {
}; };
}, },
treeList() { treeList() {
if (this.lineCode) { if (this.mapId) {
return this.pageTreeMap[this.lineCode]; return this.pageTreeMap[this.mapId];
} else { } else {
return []; return [];
} }
@ -904,11 +903,12 @@ export default {
removeSessionStorage('demonList'); removeSessionStorage('demonList');
}, },
mounted() { mounted() {
if (this.$route.query.lineCode) { if (this.$route.query.mapId) {
this.lineCode = this.$route.query.lineCode; this.mapId = this.$route.query.mapId;
} }
getLineCodeList().then(resp => {
this.lineList = resp.data || []; getPublishMapListOnline().then(resp => {
this.mapPublishList = resp.data || [];
}).catch(() => { }).catch(() => {
this.$message.error('获取线路列表异常!'); this.$message.error('获取线路列表异常!');
}); });
@ -928,7 +928,7 @@ export default {
case 'system' : case 'system' :
break; break;
case 'interface': case 'interface':
this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, lineCode: this.lineCode} }); this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, mapId: this.mapId} });
break; break;
} }
}, },

View File

@ -126,7 +126,7 @@ export default {
} }
}, },
setIscs(data, oldData) { setIscs(data, oldData) {
this.$iscs.setIscs(oldData, data, this.$route.query.lineCode); this.$iscs.setIscs(oldData, data, this.$route.query.mapId);
}, },
// //
handleModel(model) { handleModel(model) {

View File

@ -102,9 +102,8 @@ export default {
alarmInfo: true, alarmInfo: true,
selectStation: 'mainHouseOne', selectStation: 'mainHouseOne',
stationList:[], stationList:[],
tractionList:['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'], tractionList:[],
group:'', group:'',
lineCode:'',
buttonId:'substation', buttonId:'substation',
buttonList:{ buttonList:{
stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 }, stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 },
@ -328,18 +327,15 @@ export default {
this.stationList = []; this.stationList = [];
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot && station.visible) { if (!station.depot && station.visible) {
let param = {}; const param = {
if (station.runPlanName.includes('站')) { name: station.name.includes('站') ? station.name : `${station.name}`,
param = {
name: station.runPlanName,
id: station.code
};
} else {
param = {
name: station.runPlanName + '站',
id: station.code id: station.code
}; };
if (station.centralized) {
this.tractionList.push(param.name);
} }
this.stationList.push(param); this.stationList.push(param);
} }
}); });
@ -350,7 +346,6 @@ export default {
}, },
mounted() { mounted() {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.lineCode = this.$route.query.lineCode;
this.subscribe(); this.subscribe();
const data = Object.values(this.buttonList); const data = Object.values(this.buttonList);
this.initButtonGroup(data); this.initButtonGroup(data);
@ -437,7 +432,7 @@ export default {
if (station) { if (station) {
stationName = station.name; stationName = station.name;
} }
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode, mapId: this.$route.query.mapId, noPreLogout:this.$route.query.noPreLogout }; const query = {stationName: stationName, stationId: this.selectStation, group: this.group, mapId: this.$route.query.mapId, noPreLogout:this.$route.query.noPreLogout };
if (isReplace) { if (isReplace) {
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });

View File

@ -32,7 +32,7 @@
<span>{{ $t('global.startTime')+$t('global.colon') }}</span> <span>{{ $t('global.startTime')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" /> <el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" />
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;"> <el-row style="margin-top: 5px;height: 28px;line-height: 28px;">

View File

@ -107,8 +107,8 @@ export default {
{ name: '多条服务', value: '02' } { name: '多条服务', value: '02' }
] }, ] },
{ prop: 'serviceNumber', label: '服务号', type: 'text', rightWidth:true, maxlength:3, show:this.formModel.gernarateType == '01'}, { prop: 'serviceNumber', label: '服务号', type: 'text', rightWidth:true, maxlength:3, show:this.formModel.gernarateType == '01'},
{ prop: 'beginTime', label: '开始时间', type: 'timePicker'}, { prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'overTime', label: '结束时间', type: 'timePicker'}, { prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'runLevel', label: '运行等级', type: 'select', options: this.runLevelList }, { prop: 'runLevel', label: '运行等级', type: 'select', options: this.runLevelList },
{ prop: 'departureInterval', label: '发车间隔', type: 'number', show:this.formModel.gernarateType == '02', min:0, step:1, precisionFlag:true, precision:0, message:'s'}, { prop: 'departureInterval', label: '发车间隔', type: 'number', show:this.formModel.gernarateType == '02', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s' }, { prop: 'reentryTime', label: '折返时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s' },

View File

@ -145,6 +145,7 @@
:placeholder="$t('planMonitor.modifying.selectTime')" :placeholder="$t('planMonitor.modifying.selectTime')"
value-format="HH:mm:ss" value-format="HH:mm:ss"
size="mini" size="mini"
:picker-options="{selectableRange:'02:00:00-23:59:59'}"
:clearable="false" :clearable="false"
/> />
</el-col> </el-col>

View File

@ -88,8 +88,8 @@ export default {
return { return {
labelWidth: '100px', labelWidth: '100px',
items: [ items: [
{ prop: 'beginTime', label: '开始时间', type: 'timePicker'}, { prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'overTime', label: '结束时间', type: 'timePicker'}, { prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'}, { prop: 'departureTimeInterval', label: '发车间隔', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
// { prop: 'parkedTime', label: '', type: 'number', min:0, step:1, precisionFlag:true, precision:0}, // { prop: 'parkedTime', label: '', type: 'number', min:0, step:1, precisionFlag:true, precision:0},
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'}, { prop: 'reentryTime', label: '折返时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'},

View File

@ -6,7 +6,7 @@
<div class="li_plan" @click="handleGernaratePlanningTrain">{{ $t('planMonitor.gerneratePlan') }}</div> <div class="li_plan" @click="handleGernaratePlanningTrain">{{ $t('planMonitor.gerneratePlan') }}</div>
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div> <div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div> <div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
<div class="li_plan" @click="handleMovePlanningTrain">移计划</div> <div class="li_plan" @click="handleMovePlanningTrain">计划</div>
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div> <div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div> <div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div> <div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>

View File

@ -8,7 +8,7 @@
<!-- <ul class="ul-box"> --> <!-- <ul class="ul-box"> -->
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div> <div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div> <div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
<div class="li_plan" @click="handleMovePlanningTrain">移计划</div> <div class="li_plan" @click="handleMovePlanningTrain">计划</div>
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div> <div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div> <div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div> <div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>

View File

@ -40,7 +40,7 @@ export default {
width: 400 width: 400
}, },
{ {
prop: 'startTime', prop: 'endTime',
label: '到点' label: '到点'
}, },
{ {
@ -48,7 +48,7 @@ export default {
label: '停站时间' label: '停站时间'
}, },
{ {
prop: 'endTime', prop: 'startTime',
label: '发点' label: '发点'
}, },
{ {
@ -72,16 +72,16 @@ export default {
if (trainObj) { if (trainObj) {
const stationTimeList = trainObj.stationTimeList; const stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) { if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => { for (var i = 0; i < stationTimeList.length; i += 2) {
const stationObj = { const stationObj = {
stationName: formatName(elem.stationCode), stationName: formatName(stationTimeList[i].stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime), endTime : formatTime(i == 0 ? null : stationTimeList[i].secondTime + 7200),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime), stopTime: formatTime(i == 0 ? null : stationTimeList[i + 1].secondTime - stationTimeList[i].secondTime),
endTime: formatTime(elem.secondTime), startTime: formatTime(stationTimeList[i + 1].secondTime + 7200),
level: '' level:formatTime(i == (stationTimeList.length - 2) ? null : (stationTimeList[i + 2].secondTime - stationTimeList[i + 1].secondTime))
}; };
this.stationListConfig.data.push(stationObj); this.stationListConfig.data.push(stationObj);
}); }
} }
} }
} }

View File

@ -22,7 +22,7 @@ export default {
dialogVisible:false, dialogVisible:false,
loading:false, loading:false,
formModel:{ formModel:{
fromId: '', fromMapId: '',
toMapId: '' toMapId: ''
}, },
rules: { rules: {
@ -77,10 +77,10 @@ export default {
title: this.$t('global.operate'), title: this.$t('global.operate'),
width: '300', width: '300',
buttons: [ buttons: [
{ // {
name: this.$t('publish.copy'), // name: this.$t('publish.copy'),
handleClick: this.handleCopy // handleClick: this.handleCopy
}, // },
{ {
name: this.$t('global.delete'), name: this.$t('global.delete'),
handleClick: this.handleDelete, handleClick: this.handleDelete,
@ -89,6 +89,9 @@ export default {
} }
] ]
} }
],
actions: [
{ text: '复制', btnCode: 'copy', handler: this.handleCopy }
] ]
} }
}; };
@ -101,6 +104,7 @@ export default {
return { return {
labelWidth: '100px', labelWidth: '100px',
items: [ items: [
{ prop: 'fromMapId', label: '数据来源', type: 'select', required: true, options: this.covertOtherData()},
{ prop: 'toMapId', label: '复制到', type: 'select', required: true, options: this.covertData()} { prop: 'toMapId', label: '复制到', type: 'select', required: true, options: this.covertData()}
] ]
}; };
@ -119,7 +123,10 @@ export default {
}); });
}, },
covertData() { covertData() {
return this.mapList.filter(data=>{ return data.value != this.formModel.fromId; }); return this.mapList.filter(data=>{ return data.value != this.formModel.fromMapId; });
},
covertOtherData() {
return this.mapList.filter(data=>{ return data.value != this.formModel.toMapId; });
}, },
covertMap(row) { covertMap(row) {
return this.mapListMap[row.mapId]; return this.mapListMap[row.mapId];
@ -143,7 +150,7 @@ export default {
this.queryList.reload(); this.queryList.reload();
}, },
handleCopy(index, row) { handleCopy(index, row) {
this.formModel.fromId = row.id; // this.formModel.fromId = row.id;
this.$nextTick(()=>{ this.$nextTick(()=>{
this.dialogVisible = true; this.dialogVisible = true;
}); });