Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
0247dce3aa
@ -57,10 +57,10 @@ export default {
|
||||
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;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -57,10 +57,10 @@ export default {
|
||||
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;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -57,10 +57,10 @@ export default {
|
||||
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;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -57,10 +57,10 @@ export default {
|
||||
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;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'AirConditioner' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'Chiller' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'CoolTower' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'FireDamper' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -69,8 +69,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'FrozenPump' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'JetFan' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'OrbitalVentilator' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'SmookProofFd' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'TunnelFan' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'Ventilator' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
|
@ -56,10 +56,10 @@ export default {
|
||||
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;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
@ -23,6 +23,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'GasFireControl',
|
||||
data() {
|
||||
@ -38,15 +40,32 @@ export default {
|
||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate:false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'gasFireControlList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'GasFireControl' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
@ -54,8 +73,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'gasFireControl',
|
||||
code: this.isUpdate ? this.form.code : getUID('GasFireControl', this.gasFireControlList),
|
||||
_type: 'GasFireControl',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
@ -72,7 +91,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'gasFireControl',
|
||||
_type: 'GasFireControl',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
@ -88,10 +107,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'gasFireControl_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
@ -23,6 +23,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'ManualAlarmButton',
|
||||
data() {
|
||||
@ -38,15 +40,32 @@ export default {
|
||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate:false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'manualAlarmButtonList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'ManualAlarmButton' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
@ -54,8 +73,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'manualAlarmButton',
|
||||
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.manualAlarmButtonList),
|
||||
_type: 'ManualAlarmButton',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
@ -72,7 +91,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'manualAlarmButton',
|
||||
_type: 'ManualAlarmButton',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
@ -88,10 +107,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'manualAlarmButton_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
@ -23,8 +23,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'GasFireControl',
|
||||
name: 'SmokeDetector',
|
||||
data() {
|
||||
return {
|
||||
addModel:{
|
||||
@ -38,15 +40,32 @@ export default {
|
||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate:false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'smokeDetectorList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'SmokeDetector' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
@ -54,8 +73,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'smokeDetector',
|
||||
code: this.isUpdate ? this.form.code : getUID('SmokeDetector', this.smokeDetectorList),
|
||||
_type: 'SmokeDetector',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
@ -72,7 +91,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'smokeDetector',
|
||||
_type: 'SmokeDetector',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
@ -88,10 +107,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'smokeDetector_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabeled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
@ -23,6 +23,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'TemperatureDetector',
|
||||
data() {
|
||||
@ -38,10 +40,30 @@ export default {
|
||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate: false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'temperatureDetectorList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'TemperatureDetector' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
@ -54,8 +76,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'temperatureDetector',
|
||||
code: this.isUpdate ? this.form.code : getUID('TemperatureDetector', this.temperatureDetectorList),
|
||||
_type: 'TemperatureDetector',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
@ -72,7 +94,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'temperatureDetector',
|
||||
_type: 'TemperatureDetector',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
@ -88,10 +110,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'temperatureDetector_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" controls-position="right" />
|
||||
@ -26,8 +26,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'PlatformScreenDoor',
|
||||
name: 'BorderRadius',
|
||||
data() {
|
||||
return {
|
||||
addModel:{
|
||||
@ -43,15 +45,33 @@ export default {
|
||||
x: [{ required: true, message: '请输入图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate: false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'borderRadiusList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'BorderRadius' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.height = model.height;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
@ -59,8 +79,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'borderRadius',
|
||||
code: this.isUpdate ? this.form.code : getUID('BorderRadius', this.borderRadiusList),
|
||||
_type: 'BorderRadius',
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height
|
||||
};
|
||||
@ -78,7 +98,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'borderRadius',
|
||||
_type: 'BorderRadius',
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height
|
||||
};
|
||||
@ -96,10 +116,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'borderRadius_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
@ -23,8 +23,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'PlatformScreenDoor',
|
||||
name: 'EndDoor',
|
||||
data() {
|
||||
return {
|
||||
addModel:{
|
||||
@ -38,15 +40,32 @@ export default {
|
||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate: false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'endDoorList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'EndDoor' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
@ -54,8 +73,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'endDoor',
|
||||
code: this.isUpdate ? this.form.code : getUID('EndDoor', this.endDoorList),
|
||||
_type: 'EndDoor',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
@ -72,7 +91,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'endDoor',
|
||||
_type: 'EndDoor',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
@ -88,10 +107,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'endDoor_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||
<el-input v-model="addModel.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
@ -23,6 +23,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name: 'PlatformScreenDoor',
|
||||
data() {
|
||||
@ -38,15 +40,32 @@ export default {
|
||||
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
isUpdate: false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'platformScreenDoorList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'PlatformScreenDoor' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.addModel.code = model.code;
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
@ -54,8 +73,8 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'platformScreenDoor',
|
||||
code: this.isUpdate ? this.form.code : getUID('PlatformScreenDoor', this.platformScreenDoorList),
|
||||
_type: 'PlatformScreenDoor',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
@ -72,7 +91,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'platformScreenDoor',
|
||||
_type: 'PlatformScreenDoor',
|
||||
width: this.addModel.width
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
@ -88,10 +107,6 @@ export default {
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'platformScreenDoor_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user