This commit is contained in:
joylink_cuiweidong 2020-04-10 10:42:19 +08:00
commit 9e45a0d342
11 changed files with 350 additions and 317 deletions

View File

@ -148,8 +148,8 @@
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>
<template v-for="(button, index) in queryList.actions">
<el-button v-if="button.fileType==='file'" :key="index" :type="button.type ? button.type: 'primary'" size="small" class="button_style" :disabled="button.disabled" :loading="button.disabled">
<input ref="files" type="file" class="file_box" accept=".json, application/json" @change="button.handler">
<el-button v-if="button.fileType==='file' && (button.hasOwnProperty('show') ? button.show: true)" :key="index" :type="button.type ? button.type: 'primary'" size="small" class="button_style uploadDemo" :disabled="button.disabled" :loading="button.disabled">
<input id="queryFormFilesInput" type="file" class="file_box" accept=".json, application/json" @change="button.handler">
{{ $t('map.importMap') }}
</el-button>
<el-button
@ -522,14 +522,33 @@ export default {
margin-right:10px;
margin-left: 0;
margin-bottom: 10px;
}
.uploadDemo {
position: relative;
overflow: hidden;
margin-right: 3px;
cursor: pointer;
/*width: 60px;*/
padding: 0 15px;
height: 32px;
/*input {*/
/*width: 100%;*/
/*height: 100%;*/
/*position: relative;*/
/*left: 0;*/
/*top: 0;*/
/*opacity: 0;*/
/*cursor: pointer;*/
/*}*/
}
.file_box {
width: 50px;
height: 30px;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
z-index: 100;
}
</style>

View File

@ -18,7 +18,7 @@
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
</el-col>
</el-row>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row :show-header="false" @row-click="clickEvent">
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
</el-table>
<el-row justify="center" class="button-group">

View File

@ -293,10 +293,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
// this.$refs.noticeInfo.doShow({}, error.message);
});
} else {
this.doClose();

View File

@ -13,9 +13,9 @@
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
<!--<passive-Timeout ref="passiveTimeout" />-->
</template>
</div>
</template>
@ -34,9 +34,9 @@ import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
// import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
// import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
@ -53,9 +53,9 @@ export default {
MenuStation,
MenuTrain,
MenuLimit,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
// PassiveAlarm,
PassiveContorl
// PassiveTimeout
},
props: {
selected: {
@ -113,7 +113,7 @@ export default {
.ningbo-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;

View File

@ -1,40 +1,48 @@
<template>
<el-dialog class="ningbo-01__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm alarm-detail"
:title="level+'级告警详细信息'"
:visible.sync="show"
width="760px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form label-width="80px" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="线路名称">
<el-input v-model="model.lineName" disabled></el-input>
<el-input v-model="model.lineName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位名称">
<el-input v-model="model.unitName" disabled></el-input>
<el-input v-model="model.unitName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模块名称">
<el-input v-model="model.moduleName" disabled></el-input>
<el-input v-model="model.moduleName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报警时间">
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
</el-date-picker>
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<span slot="label">&emsp;</span>
<el-input v-model="model.level" disabled></el-input>
<el-input v-model="model.level" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认状态">
<el-input v-model="model.confirm" disabled></el-input>
<el-input v-model="model.confirm" disabled />
</el-form-item>
</el-col>
</el-row>
@ -42,25 +50,24 @@
<el-col :span="9" class="alarm-type">
<el-form-item>
<span slot="label">&emsp;&emsp;</span>
<el-input v-model="model.type" disabled></el-input>
<el-input v-model="model.type" disabled />
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item label="子类型">
<el-input v-model="model.childType" disabled></el-input>
<el-input v-model="model.childType" disabled />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="时间摘要">
<el-input v-model="model.timeSummary" disabled></el-input>
<el-input v-model="model.timeSummary" disabled />
</el-form-item>
<el-form-item label="推荐操作">
<el-input v-model="model.recommendedOperation" disabled></el-input>
<el-input v-model="model.recommendedOperation" disabled />
</el-form-item>
<div class="alarm-detail-description">
<span> 报警详细描述</span><br>
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
</el-input>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
</div>
</el-form>
<el-row class="button-group">
@ -68,17 +75,17 @@
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">未确认{{level}}级报警数目1</span>
<span style="line-height:26px">未确认{{ level }}级报警数目1</span>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'AlarmDetail',
data() {
return {
@ -103,40 +110,40 @@
recommendedOperation: '',
alarmDetail: ''
}
}
};
},
computed: {
...mapGetters('map', [
'name',
'name'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
},
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.hasOwnProperty('success')) {
if (elem.success) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name,
}
name: station.name
};
this.doShow(newOperate);
}
}
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -153,7 +160,7 @@
timeSummary: '控制模式摘要',
recommendedOperation: '',
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
}
};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -167,41 +174,40 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
commit() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
isClose() {
return this.dialogShow;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.alarm-type .el-input {
width: 220px;
}

View File

@ -1,7 +1,16 @@
<template>
<el-dialog class="ningbo-01__systerm cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<span>{{name}}{{msg}}!</span>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm cmd-notice"
title="操作命令提示"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span>{{ name }}{{ msg }}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
</el-row>
@ -9,8 +18,8 @@
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'CmdNotice',
data() {
return {
@ -19,7 +28,7 @@
operate: null,
name: '',
msg: ''
}
};
},
computed: {
show() {
@ -27,18 +36,18 @@
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
},
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name,
}
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = '请求超时';
@ -48,12 +57,12 @@
this.doShow(newOperate);
}
}
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -73,34 +82,33 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
operation: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
commit() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
isClose() {
return this.dialogShow;
}
}
}
};
</script>

View File

@ -213,11 +213,11 @@ export default {
operateType: 'Stand_View_Status',
skinCode: '06',
trainingName: '查看站台信息({10}-{12}站台)',
trainingRemark: '查看站台信息功能',
trainingRemark: '站台详细信息功能',
trainingType: 'Stand',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查看站台信息】' },
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【站台详细信息】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
]
},
@ -292,12 +292,12 @@ export default {
operateType: 'Section_Set_Limit_Speed',
skinCode: '06',
trainingName: '设置临时限速({8}{9})',
trainingRemark: '设置临时限速功能(限速值:自动',
trainingRemark: '设置临时限速功能(限速值:不限速',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【设置临时限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值自动】', val: '0' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速】', val: '0' },
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
@ -453,7 +453,7 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【区段解封】' },
{ deviceType: '03', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '03', orderNum: 2, operateCode: '1043', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '1046', tip: '鼠标左键选择({7})区段', val: '{17}' },
{ deviceType: '03', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确定】按钮' },
@ -484,7 +484,7 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【区段解封】' },
{ deviceType: '03', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '1063', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '1066', tip: '鼠标左键选择({7})区段', val: '{17}' },
{ deviceType: '03', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确定】按钮' },

View File

@ -2,11 +2,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -196,11 +196,11 @@ export default {
name: this.$t('map.mapData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled},
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.hasAssociatedSection },
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.isSwitchSectionType },
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true},
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: this.hasAssociatedSection },
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
]

View File

@ -18,6 +18,7 @@ import UpdateOperate from './draft.vue';
import SetProject from './project';
import CopyMap from './copy';
import LocalMap from './localMap';
import { superAdmin } from '@/router/index_APP_TARGET';
export default {
name: 'PublishMap',
@ -139,8 +140,8 @@ export default {
],
actions: [
{ text: '地图排序', handler: this.mapSort },
{ text: '导出', handler: this.localExport},
{ text: '导入', handler: this.localImport, fileType: 'file'}
{ text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0; }},
{ text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0; }}
]
},
@ -373,7 +374,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
const obj = this.$refs.files;
const obj = document.getElementById('queryFormFilesInput');
if (!obj.files) return;
const f = obj.files[0];
const reader = new FileReader();
@ -384,7 +385,6 @@ export default {
localImportMap(JSON.parse(data)).then(res => {
loading.close();
that.$message.success('导入成功!');
that.loadInitData();
loading.close();
}).catch(error => {
loading.close();

View File

@ -1,6 +1,6 @@
<template>
<el-dialog v-dialogDrag title="导出地图" :visible.sync="dialogVisible" width="30%" center>
<el-select v-model="selectMapList" multiple placeholder="请选择" style="text-align: center">
<el-dialog v-dialogDrag title="导出地图" :visible.sync="dialogVisible" width="20%" center>
<el-select v-model="selectMapList" multiple placeholder="请选择地图" style="width: 60%; position: relative; left: 20%;">
<el-option
v-for="item in publishMapList"
:key="item.id"