大铁线路图纸检索

This commit is contained in:
fan 2021-05-17 17:29:33 +08:00
parent 0a9c8665ff
commit d00f74e190
6 changed files with 126 additions and 52 deletions

View File

@ -4,22 +4,57 @@
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="设备类型:">
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
<el-option
v-for="item in deviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备名称:">
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
</el-form-item>
</el-form>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="fileName"
label="文件"
width="400"
/>
<el-table-column
prop="name"
label="操作"
>
<template slot-scope="scope">
<div class="text-button" @click="openPdf(scope.row)">打开</div>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import { getUploadFile } from '@/api/pdf';
export default {
name: 'TrainMove',
@ -30,7 +65,21 @@ export default {
return {
selected: null,
dialogShow: false,
loading: false
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
mapId: '',
deviceId: '',
deviceCode: '',
deviceName: ''
}
};
},
computed: {
@ -45,31 +94,32 @@ export default {
}
},
methods: {
doShow(operate, selected) {
doShow(selected) {
this.selected = selected;
//
this.form.deviceName = selected.name;
this.form.deviceType = selected._type;
const params = { mapId: this.$route.query.mapId, deviceType: selected._type.toUpperCase(), deviceId: selected.code };
this.loading = true;
getUploadFile(params).then(resp => {
this.tableData = resp.data;
this.loading = false;
}).catch(error => {
this.loading = false;
this.$message.error('图纸检索失败!');
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
openPdf(row) {
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
window.open(url, '_blank');
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
@ -83,4 +133,16 @@ export default {
padding: 0 5px;
background-color: #F0F0F0;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -7,6 +7,7 @@
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="chengdou-03__systerm" />
<draw-select ref="drawSelect" />
</div>
</template>
@ -21,9 +22,9 @@ import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import DrawSelect from './dialog/drawSelect';
export default {
name: 'SectionMenu',
@ -34,7 +35,8 @@ export default {
NoticeInfo,
TrainAddPlan,
SetFault,
LoadSpareTrain
LoadSpareTrain,
DrawSelect
},
props: {
selected: {
@ -134,7 +136,7 @@ export default {
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();

View File

@ -8,6 +8,7 @@
<route-hand-control ref="routeHandControl" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
<draw-select ref="drawSelect" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
</div>
</template>
@ -28,6 +29,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import DrawSelect from './dialog/drawSelect';
export default {
name: 'SignalMenu',
@ -40,7 +42,8 @@ export default {
RouteGuide,
NoticeInfo,
PasswordBox,
SetFault
SetFault,
DrawSelect
},
props: {
selected: {
@ -55,6 +58,10 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '图纸调用',
handler: this.drawingCall
}
// {
// label: '',
// handler: this.arrangementRoute,
@ -190,13 +197,16 @@ export default {
methods: {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -1,6 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<draw-select ref="drawSelect" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
@ -8,7 +9,7 @@
<script>
import PopMenu from '@/components/PopMenu';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import DrawSelect from './dialog/drawSelect';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';
@ -22,7 +23,8 @@ export default {
components: {
PopMenu,
SetFault,
NoticeInfo
NoticeInfo,
DrawSelect
},
mixins: [
CancelMouseState
@ -41,24 +43,8 @@ export default {
menuNormal: {
Local: [
{
label: '系统结构图一前置图',
file: '01-系统结构图一前视图.pdf',
handler: this.handlerOpenPdf
},
{
label: '系统结构图二后视图',
file: '02-系统结构图二后视图.pdf',
handler: this.handlerOpenPdf
},
{
label: '系统供电示意图',
file: '03-系统供电示意图.pdf',
handler: this.handlerOpenPdf
},
{
label: '车站布线图',
file: '04-车站布线图.pdf',
handler: this.handlerOpenPdf
label: '图纸调用',
handler: this.drawingCall
}
],
Center: [
@ -114,6 +100,9 @@ export default {
this.menu = this.menuForce;
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -6,11 +6,13 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<draw-select ref="drawSelect" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import DrawSelect from './dialog/drawSelect';
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
@ -31,7 +33,8 @@ export default {
SwitchControl,
NoticeInfo,
SetFault,
SwitchHookLock
SwitchHookLock,
DrawSelect
},
mixins: [
CancelMouseState
@ -48,7 +51,12 @@ export default {
return {
menu: [],
menuNormal: {
Local: [],
Local: [
{
label: '图纸调用',
handler: this.drawingCall
}
],
Center: [
// {
// label: '',
@ -131,8 +139,8 @@ export default {
methods: {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
@ -147,6 +155,9 @@ export default {
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

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.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
BASE_API = 'http://192.168.3.120:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康