iscs 转换函数代码调整

ibp盘绘制代码调整
This commit is contained in:
joylink_cuiweidong 2020-06-28 15:27:10 +08:00
parent d76dfe293e
commit 36883d9587
2 changed files with 36 additions and 66 deletions

View File

@ -207,53 +207,9 @@ function updateIscsListByDevice(state, name, device) {
}
export function updateIscsData(state, device) {
// const state = store.state;
switch (device._type) {
case deviceType.Vidicon : updateIscsListByDevice(state, 'vidiconList', device); break;
case deviceType.VidiconCloud : updateIscsListByDevice(state, 'vidiconCloudList', device); break;
case deviceType.ManualAlarmButton : updateIscsListByDevice(state, 'manualAlarmButtonList', device); break;
case deviceType.FireHydranAlarmButton: updateIscsListByDevice(state, 'fireHydranAlarmButtonList', device); break;
case deviceType.GasFireControl: updateIscsListByDevice(state, 'gasFireControlList', device); break;
case deviceType.SmokeDetector: updateIscsListByDevice(state, 'smokeDetectorList', device); break;
case deviceType.TemperatureDetector: updateIscsListByDevice(state, 'temperatureDetectorList', device); break;
case deviceType.PlatformScreenDoor: updateIscsListByDevice(state, 'platformScreenDoorList', device); break;
case deviceType.FrozenPump : updateIscsListByDevice(state, 'frozenPumpList', device); break;
case deviceType.Ventilator : updateIscsListByDevice(state, 'ventilatorList', device); break;
case deviceType.Chiller : updateIscsListByDevice(state, 'chillerList', device); break;
case deviceType.CoolTower : updateIscsListByDevice(state, 'coolTowerList', device); break;
case deviceType.EndDoor: updateIscsListByDevice(state, 'endDoorList', device); break;
case deviceType.BorderRadius: updateIscsListByDevice(state, 'borderRadiusList', device); break;
case deviceType.BrakeMachine: updateIscsListByDevice(state, 'brakeMachineList', device); break;
case deviceType.EntranceGuard: updateIscsListByDevice(state, 'entranceGuardList', device); break;
case deviceType.TicketMachine: updateIscsListByDevice(state, 'ticketMachineList', device); break;
case deviceType.SemiAutomaticTicketMachine: updateIscsListByDevice(state, 'semiAutomaticTicketMachineList', device); break;
case deviceType.AirConditioner: updateIscsListByDevice(state, 'airConditionerList', device); break;
case deviceType.OrbitalVentilator: updateIscsListByDevice(state, 'orbitalVentilatorList', device); break;
case deviceType.JetFan: updateIscsListByDevice(state, 'jetFanList', device); break;
case deviceType.TunnelFan: updateIscsListByDevice(state, 'tunnelFanList', device); break;
case deviceType.FireDamper: updateIscsListByDevice(state, 'fireDamperList', device); break;
case deviceType.SmookExhaustFd: updateIscsListByDevice(state, 'smookExhaustFdList', device); break;
case deviceType.SmookProofFd: updateIscsListByDevice(state, 'smookProofFdList', device); break;
case deviceType.VolumeControlDamper: updateIscsListByDevice(state, 'volumeControlDamperList', device); break;
case deviceType.IscsRect: updateIscsListByDevice(state, 'iscsRectList', device); break;
case deviceType.IscsText: updateIscsListByDevice(state, 'iscsTextList', device); break;
case deviceType.IscsLine: updateIscsListByDevice(state, 'iscsLineList', device); break;
case deviceType.Escalator: updateIscsListByDevice(state, 'escalatorList', device); break;
case deviceType.StairControl: updateIscsListByDevice(state, 'stairControlList', device); break;
case deviceType.FasBrakeMachine: updateIscsListByDevice(state, 'fasBrakeMachineList', device); break;
case deviceType.Staircase: updateIscsListByDevice(state, 'staircaseList', device); break;
case deviceType.SingleStaircase: updateIscsListByDevice(state, 'singleStaircaseList', device); break;
case deviceType.ArcStatus: updateIscsListByDevice(state, 'arcStatusList', device); break;
case deviceType.IscsButton: updateIscsListByDevice(state, 'iscsButtonList', device); break;
case deviceType.StateTable: updateIscsListByDevice(state, 'stateTableList', device); break;
case deviceType.LightingGroup: updateIscsListByDevice(state, 'lightingGroupList', device); break;
case deviceType.BalancedElectric: updateIscsListByDevice(state, 'balancedElectricList', device); break;
case deviceType.ElectricButterflyValve: updateIscsListByDevice(state, 'electricButterflyValveList', device); break;
case deviceType.Cistern: updateIscsListByDevice(state, 'cisternList', device); break;
case deviceType.Electrically: updateIscsListByDevice(state, 'electricallyList', device); break;
case deviceType.Stairs: updateIscsListByDevice(state, 'stairsList', device); break;
case deviceType.Elevator: updateIscsListByDevice(state, 'elevatorList', device); break;
case deviceType.Draught: updateIscsListByDevice(state, 'draughtList', device); break;
case deviceType.IscsImage: updateIscsListByDevice(state, 'iscsImageList', device); break;
let type = device._type;
if (type) {
type = type.replace(type[0], type[0].toLowerCase()) + 'List';
updateIscsListByDevice(state, type, device);
}
}

View File

@ -174,6 +174,7 @@ import IbpKey from './ibpKey';
import IbpClock from './ibpClock';
import IbpRotateTip from './ibpRotateTip';
import { putIbpDrawData, getIbpInfo } from '@/api/ibp';
import {getStationList} from '@/api/runplan';
export default {
name: 'IbpOperate',
@ -200,28 +201,34 @@ export default {
return {
enabledTab: 'Background',
data: '',
stationOptions:[
{
value: 'Station_203_0.07533',
// label: ''
label: '车站一'
},
{
value: 'Station_207_0.62282',
// label: ''
label: '车站二'
},
{
value: 'Station_209_0.95175',
label: '车站三'
// label: ''
}
],
stationOptions:[],
// stationOptions:[
// {
// value: 'Station_203_0.07533',
// // label: ''
// label: ''
// },
// {
// value: 'Station_207_0.62282',
// // label: ''
// label: ''
// },
// {
// value: 'Station_209_0.95175',
// label: ''
// // label: ''
// }
// ],
// drawData: {},
stationCode: '',
// stationCode: '',
height: this.$store.state.app.height - 190
};
},
computed:{
stationCode() {
return this.$route.query.stationCode;
}
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
@ -230,6 +237,7 @@ export default {
},
async created() {
try {
const resp = await getStationList(this.$route.query.mapId);
const res = await getIbpInfo(this.$route.query.ibpId);
if (res.data.data) {
const drawData = JSON.parse(res.data.data).drawData;
@ -237,6 +245,12 @@ export default {
} else {
this.setEmptyShow();
}
if (resp.data && resp.data.length > 0) {
const stationList = resp.data;
stationList.forEach(station=>{
this.stationOptions.push({label:station.name, value:station.code});
});
}
} catch (error) {
console.log('error', error);
}