iscs调整
This commit is contained in:
parent
d744d7a69e
commit
15ca63be84
@ -99,12 +99,6 @@ deviceRender[deviceType.BorderRadius] = {
|
|||||||
z: 4
|
z: 4
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 空调机 */
|
|
||||||
deviceRender[deviceType.AirConditioner] = {
|
|
||||||
_type: deviceType.AirConditioner,
|
|
||||||
zlevel: 1,
|
|
||||||
z: 4
|
|
||||||
};
|
|
||||||
/** 轨道排风机 */
|
/** 轨道排风机 */
|
||||||
deviceRender[deviceType.OrbitalVentilator] = {
|
deviceRender[deviceType.OrbitalVentilator] = {
|
||||||
_type: deviceType.OrbitalVentilator,
|
_type: deviceType.OrbitalVentilator,
|
||||||
@ -172,5 +166,4 @@ deviceRender[deviceType.VolumeControlDamper] = {
|
|||||||
z: 4
|
z: 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -1,31 +1,30 @@
|
|||||||
const deviceType = {
|
const deviceType = {
|
||||||
ManualAlarmButton: 'manualAlarmButton',
|
ManualAlarmButton: 'ManualAlarmButton',
|
||||||
Vidicon: 'Vidicon',
|
Vidicon: 'Vidicon',
|
||||||
VidiconCloud: 'VidiconCloud',
|
VidiconCloud: 'VidiconCloud',
|
||||||
CheckBox: 'CheckBox',
|
CheckBox: 'CheckBox',
|
||||||
FrozenPump:'FrozenPump',
|
FrozenPump:'FrozenPump',
|
||||||
FireHydranAlarmButton: 'fireHydranAlarmButton',
|
FireHydranAlarmButton: 'FireHydranAlarmButton',
|
||||||
GasFireControl: 'gasFireControl',
|
GasFireControl: 'GasFireControl',
|
||||||
SmokeDetector: 'smokeDetector',
|
SmokeDetector: 'SmokeDetector',
|
||||||
TemperatureDetector: 'temperatureDetector',
|
TemperatureDetector: 'TemperatureDetector',
|
||||||
PlatformScreenDoor: 'platformScreenDoor',
|
PlatformScreenDoor: 'PlatformScreenDoor',
|
||||||
Ventilator:'Ventilator',
|
Ventilator:'Ventilator',
|
||||||
Chiller:'Chiller',
|
Chiller:'Chiller',
|
||||||
CoolTower:'CoolTower',
|
CoolTower:'CoolTower',
|
||||||
BorderRadius: 'borderRadius',
|
BorderRadius: 'BorderRadius',
|
||||||
EndDoor: 'endDoor',
|
EndDoor: 'EndDoor',
|
||||||
AirConditioner:'AirConditioner',
|
AirConditioner:'AirConditioner',
|
||||||
OrbitalVentilator:'OrbitalVentilator',
|
OrbitalVentilator:'OrbitalVentilator',
|
||||||
JetFan:'JetFan',
|
JetFan:'JetFan',
|
||||||
TunnelFan:'TunnelFan',
|
TunnelFan:'TunnelFan',
|
||||||
FireDamper:'FireDamper',
|
FireDamper:'FireDamper',
|
||||||
SmookProofFd:'SmookProofFd',
|
SmookProofFd:'SmookProofFd',
|
||||||
BrakeMachine: 'brakeMachine',
|
BrakeMachine: 'BrakeMachine',
|
||||||
EntranceGuard: 'entranceGuard',
|
EntranceGuard: 'EntranceGuard',
|
||||||
SemiAutomaticTicketMachine: 'semiAutomaticTicketMachine',
|
SemiAutomaticTicketMachine: 'SemiAutomaticTicketMachine',
|
||||||
TicketMachine: 'ticketMachine',
|
TicketMachine: 'TicketMachine',
|
||||||
AirConditioner: 'airConditioner',
|
VolumeControlDamper: 'VolumeControlDamper'
|
||||||
VolumeControlDamper: 'volumeControlDamper'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -14,7 +14,6 @@ import Chiller from './bas/chiller';
|
|||||||
import CoolTower from './bas/coolTower';
|
import CoolTower from './bas/coolTower';
|
||||||
import EndDoor from './endDoor';
|
import EndDoor from './endDoor';
|
||||||
import BorderRadius from './borderRadius';
|
import BorderRadius from './borderRadius';
|
||||||
import AirConditioner from './bas/airConditioner';
|
|
||||||
import OrbitalVentilator from './bas/orbitalVentilator';
|
import OrbitalVentilator from './bas/orbitalVentilator';
|
||||||
import JetFan from './bas/jetFan';
|
import JetFan from './bas/jetFan';
|
||||||
import TunnelFan from './bas/tunnelFan';
|
import TunnelFan from './bas/tunnelFan';
|
||||||
|
@ -118,7 +118,9 @@ export function parser(data) {
|
|||||||
zrUtil.each(data.semiAutomaticTicketMachineList || [], elem =>{
|
zrUtil.each(data.semiAutomaticTicketMachineList || [], elem =>{
|
||||||
iscsDevice[elem.code] = deviceFactory(deviceType.SemiAutomaticTicketMachine, elem);
|
iscsDevice[elem.code] = deviceFactory(deviceType.SemiAutomaticTicketMachine, elem);
|
||||||
});
|
});
|
||||||
|
zrUtil.each(data.volumeControlDamperList || [], elem => {
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.VolumeControlDamper, elem);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return iscsDevice;
|
return iscsDevice;
|
||||||
@ -214,6 +216,9 @@ export function updateIscsData(device) {
|
|||||||
case deviceType.SmookProofFd:
|
case deviceType.SmookProofFd:
|
||||||
updateIscsListByDevice(iscsData, 'smookProofFdList', device);
|
updateIscsListByDevice(iscsData, 'smookProofFdList', device);
|
||||||
break;
|
break;
|
||||||
|
case deviceType.VolumeControlDamper:
|
||||||
|
updateIscsListByDevice(iscsData, 'volumeControlDamperList', device);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
store.dispatch('iscs/setIscsData', iscsData);
|
store.dispatch('iscs/setIscsData', iscsData);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="content_box">
|
<div class="content_box">
|
||||||
<span>本产品基于长安玖琏</span><span v-if="!project.startsWith('design')">城市轨道交通实训云平台设计开发</span><span v-else>城市轨道交通设计云平台设计开发</span>
|
<span>本产品基于长安玖琏</span><span v-if="!project.startsWith('design')">城市轨道交通实训云平台设计开发</span><span v-else>城市轨道交通设计云平台设计开发</span>
|
||||||
<br><span>实训平台网址:</span><a target="_blank" href="https://joylink.club" style="color: #33F;text-decoration:underline;">https://joylink.club</a>
|
<br><span>实训平台网址:</span><a target="_blank" href="https://joylink.club" style="color: #33F;text-decoration:underline;">https://joylink.club</a>
|
||||||
<br><span>设计平台网址:</span><a target="_blank" href="https://joylink.club" style="color: #33F;text-decoration:underline;">https://joylink.club/design</a>
|
<br><span>设计平台网址:</span><a target="_blank" href="https://joylink.club/design" style="color: #33F;text-decoration:underline;">https://joylink.club/design</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||||
<el-input v-model="addModel.code" />
|
<el-input v-model="addModel.code" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="addModel.width" />
|
<el-input-number v-model="addModel.width" />
|
||||||
@ -23,8 +23,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
export default {
|
export default {
|
||||||
name: 'PlatformScreenDoor',
|
name: 'EntranceGuard',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addModel:{
|
addModel:{
|
||||||
@ -38,27 +40,44 @@ export default {
|
|||||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
|
isUpdate:false,
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
buttonText: '立即创建'
|
buttonText: '立即创建'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'entranceGuardList'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'EntranceGuard' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
if (!this.addModel.code) {
|
|
||||||
this.generateCode();
|
|
||||||
}
|
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const maButtonModel = {
|
const newModel = {
|
||||||
point: {
|
point: {
|
||||||
x: this.addModel.x,
|
x: this.addModel.x,
|
||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.isUpdate ? this.form.code : getUID('EntranceGuard', this.entranceGuardList),
|
||||||
_type: 'entranceGuard',
|
_type: 'EntranceGuard',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', maButtonModel);
|
this.$emit('createDataModel', newModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -66,16 +85,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const maButtonModel = {
|
const newModel = {
|
||||||
point: {
|
point: {
|
||||||
x: this.addModel.x,
|
x: this.addModel.x,
|
||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.addModel.code,
|
||||||
_type: 'entranceGuard',
|
_type: 'EntranceGuard',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', maButtonModel);
|
this.$emit('deleteDataModel', newModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
},
|
},
|
||||||
initPage() {
|
initPage() {
|
||||||
@ -88,10 +107,6 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.addModel.code = 'entranceGuard_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||||
<el-input v-model="addModel.code" />
|
<el-input v-model="addModel.code" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="addModel.width" />
|
<el-input-number v-model="addModel.width" />
|
||||||
@ -23,6 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
export default {
|
export default {
|
||||||
name: 'BrakeMachine',
|
name: 'BrakeMachine',
|
||||||
data() {
|
data() {
|
||||||
@ -38,15 +40,32 @@ export default {
|
|||||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
|
isUpdate:false,
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
buttonText: '立即创建'
|
buttonText: '立即创建'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'brakeMachineList'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'BrakeMachine' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
if (!this.addModel.code) {
|
|
||||||
this.generateCode();
|
|
||||||
}
|
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const maButtonModel = {
|
const maButtonModel = {
|
||||||
@ -54,8 +73,8 @@ export default {
|
|||||||
x: this.addModel.x,
|
x: this.addModel.x,
|
||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.isUpdate ? this.form.code : getUID('BrakeMachine', this.brakeMachineList),
|
||||||
_type: 'brakeMachine',
|
_type: 'BrakeMachine',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', maButtonModel);
|
this.$emit('createDataModel', maButtonModel);
|
||||||
@ -72,7 +91,7 @@ export default {
|
|||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.addModel.code,
|
||||||
_type: 'brakeMachine',
|
_type: 'BrakeMachine',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', maButtonModel);
|
this.$emit('deleteDataModel', maButtonModel);
|
||||||
@ -88,10 +107,6 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.addModel.code = 'brakeMachine_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||||
<el-input v-model="addModel.code" />
|
<el-input v-model="addModel.code" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="addModel.width" />
|
<el-input-number v-model="addModel.width" />
|
||||||
@ -23,6 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
export default {
|
export default {
|
||||||
name: 'SemiAutomaticTicketMachine',
|
name: 'SemiAutomaticTicketMachine',
|
||||||
data() {
|
data() {
|
||||||
@ -38,15 +40,32 @@ export default {
|
|||||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
|
isUpdate:false,
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
buttonText: '立即创建'
|
buttonText: '立即创建'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'semiAutomaticTicketMachineList'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'SemiAutomaticTicketMachine' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
if (!this.addModel.code) {
|
|
||||||
this.generateCode();
|
|
||||||
}
|
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const maButtonModel = {
|
const maButtonModel = {
|
||||||
@ -54,8 +73,8 @@ export default {
|
|||||||
x: this.addModel.x,
|
x: this.addModel.x,
|
||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.semiAutomaticTicketMachineList),
|
||||||
_type: 'semiAutomaticTicketMachine',
|
_type: 'SemiAutomaticTicketMachine',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', maButtonModel);
|
this.$emit('createDataModel', maButtonModel);
|
||||||
@ -72,7 +91,7 @@ export default {
|
|||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.addModel.code,
|
||||||
_type: 'semiAutomaticTicketMachine',
|
_type: 'SemiAutomaticTicketMachine',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', maButtonModel);
|
this.$emit('deleteDataModel', maButtonModel);
|
||||||
@ -88,10 +107,6 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.addModel.code = 'semiAutomaticTicketMachine_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||||
<el-input v-model="addModel.code" />
|
<el-input v-model="addModel.code" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="addModel.width" />
|
<el-input-number v-model="addModel.width" />
|
||||||
@ -23,6 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
export default {
|
export default {
|
||||||
name: 'TicketMachine',
|
name: 'TicketMachine',
|
||||||
data() {
|
data() {
|
||||||
@ -38,15 +40,32 @@ export default {
|
|||||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
|
isUpdate:false,
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
buttonText: '立即创建'
|
buttonText: '立即创建'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'ticketMachineList'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'TicketMachine' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
if (!this.addModel.code) {
|
|
||||||
this.generateCode();
|
|
||||||
}
|
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const maButtonModel = {
|
const maButtonModel = {
|
||||||
@ -54,8 +73,8 @@ export default {
|
|||||||
x: this.addModel.x,
|
x: this.addModel.x,
|
||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.isUpdate ? this.form.code : getUID('TicketMachine', this.ticketMachineList),
|
||||||
_type: 'ticketMachine',
|
_type: 'TicketMachine',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', maButtonModel);
|
this.$emit('createDataModel', maButtonModel);
|
||||||
@ -72,7 +91,7 @@ export default {
|
|||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.addModel.code,
|
||||||
_type: 'ticketMachine',
|
_type: 'TicketMachine',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', maButtonModel);
|
this.$emit('deleteDataModel', maButtonModel);
|
||||||
@ -88,10 +107,6 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.addModel.code = 'ticketMachine_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,6 +91,14 @@
|
|||||||
@deleteDataModel="deleteDataModel"
|
@deleteDataModel="deleteDataModel"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane>
|
||||||
|
<volume-control-damper
|
||||||
|
ref="volumeControlDamper"
|
||||||
|
style="width: 90%"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@ -108,6 +116,7 @@ import JetFan from './jetFan';
|
|||||||
import TunnelFan from './tunnelFan';
|
import TunnelFan from './tunnelFan';
|
||||||
import FireDamper from './fireDamper';
|
import FireDamper from './fireDamper';
|
||||||
import SmookProofFd from './smookProofFd';
|
import SmookProofFd from './smookProofFd';
|
||||||
|
import VolumeControlDamper from './volumeControlDamper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IscsOperate',
|
name: 'IscsOperate',
|
||||||
@ -121,7 +130,8 @@ export default {
|
|||||||
JetFan,
|
JetFan,
|
||||||
TunnelFan,
|
TunnelFan,
|
||||||
FireDamper,
|
FireDamper,
|
||||||
SmookProofFd
|
SmookProofFd,
|
||||||
|
VolumeControlDamper
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
],
|
],
|
||||||
|
128
src/views/system/iscsDraw/iscsBasOperate/volumeControlDamper.vue
Normal file
128
src/views/system/iscsDraw/iscsBasOperate/volumeControlDamper.vue
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
|
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||||
|
<el-input v-model="form.code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图形宽度" prop="width">
|
||||||
|
<el-input-number v-model="form.width" :min="40" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标" prop="x">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标" prop="y">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
|
export default {
|
||||||
|
name:'VolumeControlDamper',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate:false,
|
||||||
|
showDeleteButton: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
form:{
|
||||||
|
code:'',
|
||||||
|
width: 40,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message:'请生成设备图形的编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
width:[
|
||||||
|
{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
x: [
|
||||||
|
{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'volumeControlDamperList'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'VolumeControlDamper' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const newModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'AirConditioner',
|
||||||
|
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.volumeControlDamperList),
|
||||||
|
width: this.form.width,
|
||||||
|
color:'#00ff00'
|
||||||
|
};
|
||||||
|
this.$emit('createDataModel', newModel);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code:'',
|
||||||
|
width: 40,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const newModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'VolumeControlDamper',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.width,
|
||||||
|
color:'#00ff00'
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel', newModel );
|
||||||
|
this.initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||||
<el-input v-model="addModel.code" />
|
<el-input v-model="addModel.code" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="addModel.width" />
|
<el-input-number v-model="addModel.width" />
|
||||||
@ -21,8 +21,9 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
export default {
|
export default {
|
||||||
name: 'FireHydranAlarmButton',
|
name: 'FireHydranAlarmButton',
|
||||||
data() {
|
data() {
|
||||||
@ -38,15 +39,32 @@ export default {
|
|||||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
|
isUpdate: false,
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
buttonText: '立即创建'
|
buttonText: '立即创建'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'fireHydranAlarmButtonList'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'FireHydranAlarmButton' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
if (!this.addModel.code) {
|
|
||||||
this.generateCode();
|
|
||||||
}
|
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const maButtonModel = {
|
const maButtonModel = {
|
||||||
@ -54,8 +72,8 @@ export default {
|
|||||||
x: this.addModel.x,
|
x: this.addModel.x,
|
||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.fireHydranAlarmButtonList),
|
||||||
_type: 'fireHydranAlarmButton',
|
_type: 'FireHydranAlarmButton',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', maButtonModel);
|
this.$emit('createDataModel', maButtonModel);
|
||||||
@ -72,7 +90,7 @@ export default {
|
|||||||
y: this.addModel.y
|
y: this.addModel.y
|
||||||
},
|
},
|
||||||
code: this.addModel.code,
|
code: this.addModel.code,
|
||||||
_type: 'fireHydranAlarmButton',
|
_type: 'FireHydranAlarmButton',
|
||||||
width: this.addModel.width
|
width: this.addModel.width
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', maButtonModel);
|
this.$emit('deleteDataModel', maButtonModel);
|
||||||
@ -88,10 +106,6 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.addModel.code = 'fireHydranAlarmButton_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user