删除多余组件

This commit is contained in:
zyy 2020-06-17 11:16:56 +08:00
parent 18c4d36606
commit 52bee79e22
4 changed files with 2 additions and 260 deletions

View File

@ -23,21 +23,6 @@
<el-input v-model="signalName" size="small" disabled /> <el-input v-model="signalName" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<!-- <div class="table">
<span>信号按钮列表</span>
<el-table
ref="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column prop="name" label="按钮名称" />
<el-table-column prop="status" label="按钮状态" />
</el-table>
</div> -->
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -67,7 +52,6 @@ export default {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
selected: null, selected: null,
// tempData: [],
operate: null, operate: null,
stationName: '', stationName: '',
signalName: '' signalName: ''
@ -111,16 +95,6 @@ export default {
this.stationName = station.name; this.stationName = station.name;
} }
} }
/** status 04:封锁*/
// const signal = (selected || {}).state;
// this.tempData = [{ code: selected.code, name: selected.name, status: !selected.blockade ? '' : '' }];
// const timer = setInterval(() => {
// if (this.$refs.table) {
// this.$refs.table.setCurrentRow(this.tempData[0]);
// clearInterval(timer);
// }
// }, 300);
} }
this.dialogShow = true; this.dialogShow = true;

View File

@ -1,228 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationName" size="mini" disabled />
</div>
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationStrategy" size="mini" disabled />
</div>
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
<el-table
ref="table"
:data="strategyList"
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-column :id="domIdChoose" prop="label" style="margin-left:30px" />
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
export default {
name: 'StandBackStrategy',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
strategyList: [
{
value: '01',
label: '无折返'
},
{
value: '02',
label: '无人折返'
},
{
value: '03',
label: '自动换端'
},
{
value: '04',
label: '关闭'
}
],
stationName: '',
stationStrategy: '',
selection: [],
isConfirm: false,
strategy: '',
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return '变通策略管理';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
this.$nextTick(() => {
this.$refs.table.setCurrentRow(null);
});
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.stationName = '';
this.stationStrategy = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
this.strategyList.forEach(item => {
if (item.value == opts.reentryStrategy) {
this.stationStrategy = item.label;
}
});
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
clickEvent(row, column, event) {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${row.value}`
};
this.strategy = row.value;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
commit() {
if (this.isConfirm) {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
this.doClose();
}
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -6,7 +6,6 @@
<stand-detail ref="standDetail" /> <stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" /> <stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" /> <stand-stop-time ref="standStopTime" />
<stand-back-strategy ref="standBackStrategy" />
<StandBulkBuckleTrain ref="standBulkBuckleTrain" /> <StandBulkBuckleTrain ref="standBulkBuckleTrain" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
</div> </div>
@ -16,7 +15,6 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl'; import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail'; import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel'; import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime'; import StandStopTime from './dialog/standStopTime';
@ -24,7 +22,6 @@ import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -39,7 +36,6 @@ export default {
StandDetail, StandDetail,
StandRunLevel, StandRunLevel,
NoticeInfo, NoticeInfo,
StandBackStrategy,
StandStopTime StandStopTime
}, },
props: { props: {

View File

@ -2,10 +2,10 @@ 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.41: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://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康