This commit is contained in:
fan 2020-09-14 18:35:06 +08:00
commit b44e193bcf
20 changed files with 1465 additions and 1603 deletions

View File

@ -25,8 +25,8 @@ export function jl3dEditorLoader(mapid,scope){
if(data.data ){
if(data.data.assets){
initData(editmapid,data.data.id);
// loadData(editmapid,data.data);
// initData(editmapid,data.data.id);
loadData(editmapid,data.data);
}else{
initData(editmapid,data.data.id);
}

View File

@ -45,6 +45,7 @@ export function StationStandList() {
let stand= {
code : stationstanddata[j].code,
position : stationstanddata[j].position,
posy:stationstanddata[j].position.y,
name : stationstanddata[j].name,
right : stationstanddata[j].right,
section : stationstanddata[j].standTrackCode,
@ -75,13 +76,14 @@ export function StationStandList() {
}
if(newstationstand.code != null){
newstationstand.stands.sort(compare("posy"));
scope.list.push(newstationstand);
}
}
}
console.log(scope.list);
resolve("loadedstation");
});
}
@ -207,6 +209,13 @@ export function StationStandList() {
}
}
function compare(property){
return function(a,b){
var value1 = a[property];
var value2 = b[property];
return value1 - value2;
}
}
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -1,124 +1,124 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.alarmCode')" prop="code">
<el-input :disabled="true" v-model="form.code">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{$t('ibp.generateCode')}}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.alarmWidth')" prop="alarmWidth">
<el-input-number v-model="form.alarmWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.alarmCode')" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.alarmWidth')" prop="alarmWidth">
<el-input-number v-model="form.alarmWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<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>
export default {
name: 'ButtonDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
alarmWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheAlarmCode'), trigger: 'blur' },
],
alarmWidth: [
{ required: true, message: this.$t('rules.enterTheAlarmWidth'), trigger: 'blur' },
]
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Alarm' ){
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.alarmWidth = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
export default {
name: 'ButtonDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
alarmWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheAlarmCode'), trigger: 'blur' }
],
alarmWidth: [
{ required: true, message: this.$t('rules.enterTheAlarmWidth'), trigger: 'blur' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
const alarmModel = {
point:{
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'Alarm',
width: this.form .alarmWidth,
};
this.$emit('createAlarm', alarmModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const alarmModel = {
point:{
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'Alarm',
width: this.form .alarmWidth,
};
this.$emit('deleteDataModel',alarmModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
alarmWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "alarm_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Alarm' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.alarmWidth = 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 alarmModel = {
point:{
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'Alarm',
width: this.form.alarmWidth
};
this.$emit('createData', alarmModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const alarmModel = {
point:{
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'Alarm',
width: this.form.alarmWidth
};
this.$emit('deleteDataModel', alarmModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
alarmWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'alarm_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,146 +1,146 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.escalatorFrameCode')" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{$t('ibp.generateCode')}}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorFrameWidth')" prop="appendageBoxWidth">
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="50"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorFrameHeight')" prop="appendageBoxHeight">
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="75"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.borderWidth')" prop="borderWidth">
<el-input-number v-model="form.borderWidth" controls-position="right" :min="1"></el-input-number><span>&nbsp&nbsp{{$t('ibp.recommendedSize')}}</span>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.escalatorFrameCode')" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorFrameWidth')" prop="appendageBoxWidth">
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="50" />
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorFrameHeight')" prop="appendageBoxHeight">
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="75" />
</el-form-item>
<el-form-item :label="this.$t('ibp.borderWidth')" prop="borderWidth">
<el-input-number v-model="form.borderWidth" controls-position="right" :min="1" /><span>&nbsp;&nbsp;{{ $t('ibp.recommendedSize') }}</span>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<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>
export default {
name: 'AppendageBoxDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
appendageBoxWidth: '',
appendageBoxHeight: '',
x: 10,
y: 10,
borderWidth: 25
},
rules: {
code: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameCode'), trigger: 'blur' },
],
appendageBoxWidth: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameWidth'), trigger: 'blur' },
],
appendageBoxHeight: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameHeight'), trigger: 'blur' },
],
borderWidth: [
{ required: true, message: this.$t('ibp.enterTheBorderWidth'), trigger: 'blur'},
]
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'AppendageBox' ){
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.appendageBoxWidth = model.width;
this.form.appendageBoxHeight = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.borderWidth = model.borderWidth
}
export default {
name: 'AppendageBoxDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
appendageBoxWidth: '',
appendageBoxHeight: '',
x: 10,
y: 10,
borderWidth: 25
},
rules: {
code: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameCode'), trigger: 'blur' }
],
appendageBoxWidth: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameWidth'), trigger: 'blur' }
],
appendageBoxHeight: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameHeight'), trigger: 'blur' }
],
borderWidth: [
{ required: true, message: this.$t('ibp.enterTheBorderWidth'), trigger: 'blur'}
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
const appendageBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'AppendageBox',
code: this.form.code,
width: this.form .appendageBoxWidth,
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('createAppendageBox', appendageBoxModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const appendageBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'AppendageBox',
code: this.form.code,
width: this.form .appendageBoxWidth,
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('deleteDataModel',appendageBoxModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
appendageBoxWidth: '',
appendageBoxHeight: '',
borderWidth: 25,
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "aBox"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'AppendageBox' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.appendageBoxWidth = model.width;
this.form.appendageBoxHeight = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.borderWidth = model.borderWidth;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const appendageBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'AppendageBox',
code: this.form.code,
width: this.form.appendageBoxWidth,
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('createData', appendageBoxModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const appendageBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'AppendageBox',
code: this.form.code,
width: this.form.appendageBoxWidth,
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('deleteDataModel', appendageBoxModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
appendageBoxWidth: '',
appendageBoxHeight: '',
borderWidth: 25,
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'aBox' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,163 +1,163 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.arrowCode')" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{$t('ibp.generateCode')}}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowDirection')" prop="orientation">
<el-select v-model="form.orientation" :placeholder="this.$t('rules.selectTheDirectionOfTheArrow')">
<el-option :label="this.$t('ibp.up')" value="top"></el-option>
<el-option :label="this.$t('ibp.down')" value="bottom"></el-option>
<el-option :label="this.$t('ibp.left')" value="left"></el-option>
<el-option :label="this.$t('ibp.right')" value="right"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowLength')" prop="arrowLength">
<el-input-number v-model="form.arrowLength" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowWidth')" prop="arrowLength">
<el-input-number v-model="form.arrowWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowColor')" prop="fillColor">
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<el-form-item :label="this.$t('ibp.vertexXCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.vertexYCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.arrowCode')" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowDirection')" prop="orientation">
<el-select v-model="form.orientation" :placeholder="this.$t('rules.selectTheDirectionOfTheArrow')">
<el-option :label="this.$t('ibp.up')" value="top" />
<el-option :label="this.$t('ibp.down')" value="bottom" />
<el-option :label="this.$t('ibp.left')" value="left" />
<el-option :label="this.$t('ibp.right')" value="right" />
</el-select>
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowLength')" prop="arrowLength">
<el-input-number v-model="form.arrowLength" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowWidth')" prop="arrowLength">
<el-input-number v-model="form.arrowWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.arrowColor')" prop="fillColor">
<el-color-picker v-model="form.fillColor" />
</el-form-item>
<el-form-item :label="this.$t('ibp.vertexXCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.vertexYCoordinate')">
<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>
export default {
name: 'ArrowDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
orientation: 'left',
arrowWidth: '',
arrowLength: '',
fillColor: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheArrowCode'), trigger: 'blur' },
],
orientation: [
{ required: true, message: this.$t('rules.selectTheDirectionOfTheArrow'), trigger: 'change'}
],
arrowLength: [
{ required: true, message: this.$t('rules.enterTheArrowLength'), trigger: 'blur' },
],
arrowWidth: [
{ required: true, message: this.$t('rules.enterTheArrowWidth'), trigger: 'blur' },
],
fillColor: [
{ required: true, message: this.$t('rules.enterTheArrowColor'), trigger: 'blur' },
],
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Arrow' ){
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.orientation = model.orientation;
this.form.arrowLength = model.length;
this.form.arrowWidth = model.width;
this.form.fillColor = model.fill;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
export default {
name: 'ArrowDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
orientation: 'left',
arrowWidth: '',
arrowLength: '',
fillColor: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheArrowCode'), trigger: 'blur' }
],
orientation: [
{ required: true, message: this.$t('rules.selectTheDirectionOfTheArrow'), trigger: 'change'}
],
arrowLength: [
{ required: true, message: this.$t('rules.enterTheArrowLength'), trigger: 'blur' }
],
arrowWidth: [
{ required: true, message: this.$t('rules.enterTheArrowWidth'), trigger: 'blur' }
],
fillColor: [
{ required: true, message: this.$t('rules.enterTheArrowColor'), trigger: 'blur' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
const arrowModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Arrow',
code: this.form.code,
orientation: this.form.orientation,
fill: this.form.fillColor,
width: this.form .arrowWidth,
length: this.form.arrowLength,
};
this.$emit('createArrow', arrowModel);
this.initPage();
}else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const arrowModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Arrow',
code: this.form.code,
orientation: this.form.orientation,
fill: this.form.fillColor,
width: this.form .arrowWidth,
length: this.form.arrowLength,
};
this.$emit('deleteDataModel',arrowModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
orientation: 'left',
arrowWidth: '',
arrowLength: '',
fillColor: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "arrow_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Arrow' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.orientation = model.orientation;
this.form.arrowLength = model.length;
this.form.arrowWidth = model.width;
this.form.fillColor = model.fill;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const arrowModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Arrow',
code: this.form.code,
orientation: this.form.orientation,
fill: this.form.fillColor,
width: this.form.arrowWidth,
length: this.form.arrowLength
};
this.$emit('createData', arrowModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const arrowModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Arrow',
code: this.form.code,
orientation: this.form.orientation,
fill: this.form.fillColor,
width: this.form.arrowWidth,
length: this.form.arrowLength
};
this.$emit('deleteDataModel', arrowModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
orientation: 'left',
arrowWidth: '',
arrowLength: '',
fillColor: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'arrow_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -62,7 +62,7 @@ export default {
width: this.form.bgWidth,
height: this.form.bgHeight
};
this.$emit('updateBg', bgModel);
this.$emit('createData', bgModel);
},
initPage() {
this.form.bgWidth = this.$store.state.ibp.ibpBgDevice.model ? this.$store.state.ibp.ibpBgDevice.model.width : 1;

View File

@ -118,7 +118,7 @@ export default {
width: this.form.buttonWidth,
mean: this.from.mean
};
this.$emit('createButton', buttonModel);
this.$emit('createData', buttonModel);
this.initPage();
} else {
return false;

View File

@ -1,125 +1,125 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.digitalClockCode')" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{$t('ibp.generateCode')}}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.digitalClockWidth')" prop="clockWidth">
<el-input-number v-model="form.clockWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item :label="this.$t('ibp.digitalClockCode')" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.digitalClockWidth')" prop="clockWidth">
<el-input-number v-model="form.clockWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<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>
export default {
name: 'ClockDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
clockWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheDigitalClockCode'), trigger: 'blur' },
],
clockWidth: [
{ required: true, message: this.$t('rules.enterTheDigitalClockWidth'), trigger: 'blur' },
]
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Clock' ){
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.clockWidth = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
export default {
name: 'ClockDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
clockWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheDigitalClockCode'), trigger: 'blur' }
],
clockWidth: [
{ required: true, message: this.$t('rules.enterTheDigitalClockWidth'), trigger: 'blur' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const clockModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Clock',
code: this.form.code,
width: this.form.clockWidth,
};
this.$emit('createClock', clockModel);
this.initPage();
}else {
return false;
}
});
},
deleteDevice() {
const clockModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Clock',
code: this.form.code,
width: this.form.clockWidth,
};
this.$emit('deleteDataModel',clockModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
buttonColor: '',
buttonWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "clock_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Clock' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.clockWidth = 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 clockModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Clock',
code: this.form.code,
width: this.form.clockWidth
};
this.$emit('createData', clockModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const clockModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Clock',
code: this.form.code,
width: this.form.clockWidth
};
this.$emit('deleteDataModel', clockModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
buttonColor: '',
buttonWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'clock_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,161 +1,161 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item :label="this.$t('ibp.escalatorCode')" prop="code">
<el-input :disabled="true" v-model="form.code">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{$t('ibp.generateCode')}}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorWidth')" prop="elevatorWidth">
<el-input-number v-model="form.elevatorWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorHeight')" prop="elevatorHeight">
<el-input-number v-model="form.elevatorHeight" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorColor')" prop="elevatorColor">
<el-color-picker v-model="form.elevatorColor"></el-color-picker>
</el-form-item>
<el-form-item :label="this.$t('ibp.startingDirection')" prop="direction">
<el-select v-model="form.direction" placeholder="请选择启动方向">
<el-option :label="this.$t('ibp.doNotStart')" value="none"></el-option>
<el-option :label="this.$t('ibp.startUp')" value="top"></el-option>
<el-option :label="this.$t('ibp.startDown')" value="bottom"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item :label="this.$t('ibp.escalatorCode')" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorWidth')" prop="elevatorWidth">
<el-input-number v-model="form.elevatorWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorHeight')" prop="elevatorHeight">
<el-input-number v-model="form.elevatorHeight" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.escalatorColor')" prop="elevatorColor">
<el-color-picker v-model="form.elevatorColor" />
</el-form-item>
<el-form-item :label="this.$t('ibp.startingDirection')" prop="direction">
<el-select v-model="form.direction" placeholder="请选择启动方向">
<el-option :label="this.$t('ibp.doNotStart')" value="none" />
<el-option :label="this.$t('ibp.startUp')" value="top" />
<el-option :label="this.$t('ibp.startDown')" value="bottom" />
</el-select>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<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>
export default {
name: 'ElevatorDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
elevatorWidth: '',
elevatorHeight: '',
elevatorColor:'',
direction:'none',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('ibp.enterTheElevatorCode'), trigger: 'blur' },
],
elevatorWidth: [
{ required: true, message: this.$t('ibp.enterTheElevatorWidth'), trigger: 'blur' },
],
elevatorHeight: [
{ required: true, message: this.$t('ibp.enterTheElevatorHeight'), trigger: 'blur' },
],
elevatorColor: [
{ required: true, message: this.$t('ibp.enterTheElevatorColor'), trigger: 'change' },
],
direction: [
{ required: true, message: this.$t('ibp.selectTheStartingDirection'), trigger: 'change' },
],
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Elevator' ){
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.elevatorWidth = model.width;
this.form.elevatorHeight = model.height;
this.form.elevatorColor = model.fillColor;
this.form.direction = model.direction;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
export default {
name: 'ElevatorDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
form: {
code: '',
elevatorWidth: '',
elevatorHeight: '',
elevatorColor:'',
direction:'none',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: this.$t('ibp.enterTheElevatorCode'), trigger: 'blur' }
],
elevatorWidth: [
{ required: true, message: this.$t('ibp.enterTheElevatorWidth'), trigger: 'blur' }
],
elevatorHeight: [
{ required: true, message: this.$t('ibp.enterTheElevatorHeight'), trigger: 'blur' }
],
elevatorColor: [
{ required: true, message: this.$t('ibp.enterTheElevatorColor'), trigger: 'change' }
],
direction: [
{ required: true, message: this.$t('ibp.selectTheStartingDirection'), trigger: 'change' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
const elevatorModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Elevator',
code: this.form.code,
width: this.form.elevatorWidth,
height: this.form.elevatorHeight,
fillColor: this.form.elevatorColor,
direction: this.form.direction,
};
this.$emit('createElevator', elevatorModel);
this.initPage();
} else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const elevatorModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Elevator',
code: this.form.code,
width: this.form.elevatorWidth,
height: this.form.elevatorHeight,
fillColor: this.form.elevatorColor,
direction: this.form.direction,
};
this.$emit('deleteDataModel',elevatorModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
elevatorWidth: '',
elevatorHeight: '',
elevatorColor:'',
direction:'none',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "elevator_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Elevator' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.elevatorWidth = model.width;
this.form.elevatorHeight = model.height;
this.form.elevatorColor = model.fillColor;
this.form.direction = model.direction;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const elevatorModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Elevator',
code: this.form.code,
width: this.form.elevatorWidth,
height: this.form.elevatorHeight,
fillColor: this.form.elevatorColor,
direction: this.form.direction
};
this.$emit('createData', elevatorModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const elevatorModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'Elevator',
code: this.form.code,
width: this.form.elevatorWidth,
height: this.form.elevatorHeight,
fillColor: this.form.elevatorColor,
direction: this.form.direction
};
this.$emit('deleteDataModel', elevatorModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
elevatorWidth: '',
elevatorHeight: '',
elevatorColor:'',
direction:'none',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'elevator_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -129,7 +129,7 @@ export default {
bottomText:this.form.bottomText,
mean:this.form.mean
};
this.$emit('createKey', keyModel);
this.$emit('createData', keyModel);
this.initPage();
} else {
return false;

View File

@ -1,155 +1,155 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item :label="this.$t('ibp.circularLampCode')" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{$t('ibp.generateCode')}}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.circularLampRadius')" prop="r">
<el-input-number v-model="form.r" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="表示状态">
<el-select v-model="form.mean" placeholder="请选择">
<el-option
v-for="item in showMeanList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="关联设备">
<el-input v-model="form.linkDevice"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item :label="this.$t('ibp.circularLampCode')" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
</el-input>
</el-form-item>
<el-form-item :label="this.$t('ibp.circularLampRadius')" prop="r">
<el-input-number v-model="form.r" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.xCoordinate')">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item :label="this.$t('ibp.yCoordinate')">
<el-input-number v-model="form.y" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="表示状态">
<el-select v-model="form.mean" placeholder="请选择">
<el-option
v-for="item in showMeanList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="关联设备">
<el-input v-model="form.linkDevice" />
</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>
export default {
name: 'LampDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
showMeanList: [
{label: '扣车', value: 'Show_Detain'},
{label: '屏蔽门打开', value: 'Show_Open_Screen_Door'},
{label: '屏蔽门紧闭', value: 'Show_Close_Screen_Door'}
export default {
name: 'LampDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
showMeanList: [
{label: '扣车', value: 'Show_Detain'},
{label: '屏蔽门打开', value: 'Show_Open_Screen_Door'},
{label: '屏蔽门紧闭', value: 'Show_Close_Screen_Door'}
],
form: {
code: '',
r: '',
x: 10,
y: 10,
mean: '',
linkDevice: ''
},
rules: {
code: [
{ required: true, message: '请输入按钮编号', trigger: 'blur' }
],
form: {
code: '',
r: '',
x: 10,
y: 10,
mean: '',
linkDevice: ''
},
rules: {
code: [
{ required: true, message: '请输入按钮编号', trigger: 'blur' },
],
r: [
{ required: true, message: '请输入圆形灯半径', trigger: 'blur'}
],
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'CircularLamp' ){
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.r = model.r;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.mean = model.mean;
this.form.linkDevice = model.linkDevice;
}
r: [
{ required: true, message: '请输入圆形灯半径', trigger: 'blur'}
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if(valid){
const lampModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'CircularLamp',
code: this.form.code,
r: this.form.r,
mean: this.form.mean,
linkDevice: this.form.linkDevice,
fillColor: '#332C22'
};
this.$emit('createLamp', lampModel);
this.initPage();
}else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const lampModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'CircularLamp',
code: this.form.code,
r: this.form.r,
mean: this.form.mean,
linkDevice: this.form.linkDevice,
fillColor: '#332C22'
};
this.$emit('deleteDataModel',lampModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
r: '',
x: 10,
y: 10,
mean: '',
linkDevice: '',
};
},
generateCode() {
const mydate = new Date();
this.form.code = "lamp_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'CircularLamp' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.r = model.r;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.mean = model.mean;
this.form.linkDevice = model.linkDevice;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const lampModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'CircularLamp',
code: this.form.code,
r: this.form.r,
mean: this.form.mean,
linkDevice: this.form.linkDevice,
fillColor: '#332C22'
};
this.$emit('createData', lampModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const lampModel = {
point: {
x: this.form.x,
y: this.form.y
},
_type: 'CircularLamp',
code: this.form.code,
r: this.form.r,
mean: this.form.mean,
linkDevice: this.form.linkDevice,
fillColor: '#332C22'
};
this.$emit('deleteDataModel', lampModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = this.$t('ibp.createNow');
this.showDeleteButton = false;
this.form = {
code: '',
r: '',
x: 10,
y: 10,
mean: '',
linkDevice: ''
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'lamp_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

View File

@ -1,156 +1,156 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item label="线段编号" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="线段宽度" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50"></el-input-number>
</el-form-item>
<el-form-item label="线段颜色" prop="fillColor">
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<el-form-item label="起始X轴坐标">
<el-input-number v-model="form.x1" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="起始Y轴坐标">
<el-input-number v-model="form.y1" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="终止X轴坐标">
<el-input-number v-model="form.x2" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="终止Y轴坐标">
<el-input-number v-model="form.y2" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item label="线段编号" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="线段宽度" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50" />
</el-form-item>
<el-form-item label="线段颜色" prop="fillColor">
<el-color-picker v-model="form.fillColor" />
</el-form-item>
<el-form-item label="起始X轴坐标">
<el-input-number v-model="form.x1" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="起始Y轴坐标">
<el-input-number v-model="form.y1" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="终止X轴坐标">
<el-input-number v-model="form.x2" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="终止Y轴坐标">
<el-input-number v-model="form.y2" controls-position="right" :min="0" />
</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">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'TextDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
lineWidth: '',
fillColor: '#000000',
x1: 10,
y1: 10,
x2: 20,
y2: 10
},
rules: {
code: [
{ required: true, message: '请输入线段编号', trigger: 'blur' },
],
lineWidth: [
{ required: true, message: '请输入线段宽度', trigger: 'blur' },
],
fillColor: [
{ required: true, message: '请输入线段颜色', trigger: 'blur' },
],
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'IbpLine' ){
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.lineWidth = model.lineWidth;
this.form.fillColor = model.fillColor;
this.form.x1 = model.point1.x;
this.form.y1 = model.point1.y;
this.form.x2 = model.point2.x;
this.form.y2 = model.point2.y;
}
export default {
name: 'TextDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
lineWidth: '',
fillColor: '#000000',
x1: 10,
y1: 10,
x2: 20,
y2: 10
},
rules: {
code: [
{ required: true, message: '请输入线段编号', trigger: 'blur' }
],
lineWidth: [
{ required: true, message: '请输入线段宽度', trigger: 'blur' }
],
fillColor: [
{ required: true, message: '请输入线段颜色', trigger: 'blur' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) =>{
if (valid){
const lineModel = {
point1: {
x: this.form.x1,
y: this.form.y1
},
point2: {
x: this.form.x2,
y: this.form.y2
},
code: this.form.code,
_type: 'IbpLine',
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor
};
this.$emit('createLine', lineModel);
this.initPage();
}else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const lineModel = {
point1: {
x: this.form.x1,
y: this.form.y1
},
point2: {
x: this.form.x2,
y: this.form.y2
},
code: this.form.code,
_type: 'IbpLine',
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor
};
this.$emit('deleteDataModel',lineModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
lineWidth: '',
fillColor: '',
x1: 10,
y1: 10,
x2: 20,
y2: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "line_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'IbpLine' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.lineWidth = model.lineWidth;
this.form.fillColor = model.fillColor;
this.form.x1 = model.point1.x;
this.form.y1 = model.point1.y;
this.form.x2 = model.point2.x;
this.form.y2 = model.point2.y;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) =>{
if (valid) {
const lineModel = {
point1: {
x: this.form.x1,
y: this.form.y1
},
point2: {
x: this.form.x2,
y: this.form.y2
},
code: this.form.code,
_type: 'IbpLine',
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor
};
this.$emit('createData', lineModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const lineModel = {
point1: {
x: this.form.x1,
y: this.form.y1
},
point2: {
x: this.form.x2,
y: this.form.y2
},
code: this.form.code,
_type: 'IbpLine',
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor
};
this.$emit('deleteDataModel', lineModel );
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
lineWidth: '',
fillColor: '',
x1: 10,
y1: 10,
x2: 20,
y2: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'line_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,141 +1,141 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="旋转提示编号" prop="code">
<el-input :disabled="true" v-model="form.code">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="旋转提示宽度" prop="rotateTipWidth">
<el-input-number v-model="form.rotateTipWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="提示颜色" prop="rotateTipColor">
<el-select v-model="form.rotateTipColor" placeholder="请选择提示颜色">
<el-option label="红色" value="red"></el-option>
<el-option label="黑色" value="black"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="旋转提示编号" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="旋转提示宽度" prop="rotateTipWidth">
<el-input-number v-model="form.rotateTipWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="提示颜色" prop="rotateTipColor">
<el-select v-model="form.rotateTipColor" placeholder="请选择提示颜色">
<el-option label="红色" value="red" />
<el-option label="黑色" value="black" />
</el-select>
</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">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'KeyDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
rotateTipWidth: '',
rotateTipColor: 'black',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: '请输入旋转提示编号', trigger: 'blur' },
],
rotateTipWidth: [
{ required: true, message: '请输入旋转提示宽度', trigger: 'blur' },
],
rotateTipColor: [
{ required: true, message: '请选择按钮颜色', trigger: 'change'}
]
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'RotateTip' ){
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.rotateTipWidth = model.width;
this.form.rotateTipColor = model.color?model.color:'black';
this.form.x = model.point.x;
this.form.y = model.point.y;
}
export default {
name: 'KeyDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
rotateTipWidth: '',
rotateTipColor: 'black',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: '请输入旋转提示编号', trigger: 'blur' }
],
rotateTipWidth: [
{ required: true, message: '请输入旋转提示宽度', trigger: 'blur' }
],
rotateTipColor: [
{ required: true, message: '请选择按钮颜色', trigger: 'change'}
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if(valid) {
const rotateTipModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'RotateTip',
code: this.form.code,
width: this.form.rotateTipWidth,
color: this.form.rotateTipColor
};
this.$emit('createRotateTip', rotateTipModel);
this.initPage();
}else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const rotateTipModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'RotateTip',
code: this.form.code,
width: this.form .rotateTipWidth,
color: this.form.rotateTipColor
};
this.$emit('deleteDataModel',rotateTipModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
rotateTipWidth: '',
rotateTipColor: 'black',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "rTip_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'RotateTip' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.rotateTipWidth = model.width;
this.form.rotateTipColor = model.color ? model.color : 'black';
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const rotateTipModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'RotateTip',
code: this.form.code,
width: this.form.rotateTipWidth,
color: this.form.rotateTipColor
};
this.$emit('createData', rotateTipModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const rotateTipModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'RotateTip',
code: this.form.code,
width: this.form.rotateTipWidth,
color: this.form.rotateTipColor
};
this.$emit('deleteDataModel', rotateTipModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
rotateTipWidth: '',
rotateTipColor: 'black',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'rTip_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,128 +1,128 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="端子编号" prop="code">
<el-input :disabled="true" v-model="form.code">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="端子宽度" prop="terminalWidth">
<el-input-number v-model="form.terminalWidth" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="端子编号" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="端子宽度" prop="terminalWidth">
<el-input-number v-model="form.terminalWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="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">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'KeyDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
terminalWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: '请输入端子编号', trigger: 'blur' },
],
terminalWidth: [
{ required: true, message: '请输入端子宽度', trigger: 'blur' },
],
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'TeleTerminal' ){
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.terminalWidth = model.width;
this.form.terminalHeight = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
export default {
name: 'KeyDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
terminalWidth: '',
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: '请输入端子编号', trigger: 'blur' }
],
terminalWidth: [
{ required: true, message: '请输入端子宽度', trigger: 'blur' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
const TerminalModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'TeleTerminal',
code: this.form.code,
width: this.form.terminalWidth,
};
this.$emit('createTeleTerminal', TerminalModel);
this.initPage();
} else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const TerminalModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'TeleTerminal',
code: this.form.code,
width: this.form .terminalWidth,
};
this.$emit('deleteDataModel',TerminalModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
terminalWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = "terminal"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'TeleTerminal' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.terminalWidth = model.width;
this.form.terminalHeight = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const TerminalModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'TeleTerminal',
code: this.form.code,
width: this.form.terminalWidth
};
this.$emit('createData', TerminalModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const TerminalModel = {
point: {
x: this.form.x,
y: this.form.y
},
draggable: true,
_type: 'TeleTerminal',
code: this.form.code,
width: this.form.terminalWidth
};
this.$emit('deleteDataModel', TerminalModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
terminalWidth: '',
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'terminal' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -10,13 +10,20 @@
<el-input v-model="form.context" type="textarea" />
</el-form-item>
<el-form-item label="文字颜色" prop="textFill">
<el-input v-model="form.textFill" />
<el-color-picker v-model="form.textFill" />
</el-form-item>
<el-form-item label="文字大小" prop="fontSize">
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100" />
</el-form-item>
<el-form-item label="文字粗细" prop="fontWeight">
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" />
<el-select v-model="form.fontWeight">
<el-option
v-for="item in fontWeightList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
@ -24,24 +31,6 @@
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1" />
</el-form-item>
<!--<el-form-item label="文字背景">-->
<!--<el-switch v-model="form.hasRect" @change="handleChange"></el-switch>-->
<!--</el-form-item>-->
<!--<el-form-item v-show="form.hasRect" label="背景X轴坐标">-->
<!--<el-input-number v-model="form.xBg" controls-position="right" :min="0"></el-input-number>-->
<!--</el-form-item>-->
<!--<el-form-item v-show="form.hasRect" label="背景Y轴坐标">-->
<!--<el-input-number v-model="form.yBg" controls-position="right" :min="0"></el-input-number>-->
<!--</el-form-item>-->
<!--<el-form-item v-show="form.hasRect" label="背景宽度">-->
<!--<el-input-number v-model="form.bgWidth" controls-position="right" :min="1"></el-input-number>-->
<!--</el-form-item>-->
<!--<el-form-item v-show="form.hasRect" label="背景高度">-->
<!--<el-input-number v-model="form.bgHeight" controls-position="right" :min="1"></el-input-number>-->
<!--</el-form-item>-->
<!--<el-form-item v-show="form.hasRect" label="背景颜色" prop="elevatorColor">-->
<!--<el-color-picker v-model="form.textBackgroundColor"></el-color-picker>-->
<!--</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">删除</el-button>
@ -61,6 +50,17 @@ export default {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
fontWeightList: [
{ label: '100', value: '100' },
{ label: '200', value: '200' },
{ label: '300', value: '300' },
{ label: '400', value: '400' },
{ label: '500', value: '500' },
{ label: '600', value: '600' },
{ label: '700', value: '700' },
{ label: '800', value: '800' },
{ label: '900', value: '900' }
],
form: {
code: '',
context: '',
@ -69,12 +69,6 @@ export default {
fontWeight: '',
x: 10,
y: 10
// hasRect: false,
// xBg: 10,
// yBg: 10,
// bgWidth: 0,
// bgHeight: 0,
// textBackgroundColor: ''
},
rules: {
code: [
@ -112,12 +106,6 @@ export default {
this.form.fontWeight = model.fontWeight;
this.form.x = model.point.x;
this.form.y = model.point.y;
// this.form.hasRect = model.hasRect;
// this.form.xBg = model.textRect ? model.textRect.x : 10;
// this.form.yBg = model.textRect ? model.textRect.y : 10;
// this.form.bgWidth = model.textRect ? model.textRect.width : 0;
// this.form.bgHeight = model.textRect ? model.textRect.height : 0;
// this.form.textBackgroundColor = model.textRect ? model.textRect.textBackgroundColor : '';
}
}
},
@ -139,17 +127,8 @@ export default {
fontSize: this.form.fontSize,
fontWeight: this.form.fontWeight,
fontFamily: 'consolas'
// hasRect: this.form.hasRect,
// textRect: this.form.hasRect ?
// {
// x: this.form.xBg,
// y: this.form.yBg,
// width: this.form.bgWidth,
// height: this.form.bgHeight
// }:'',
// textBackgroundColor: this.form.hasRect?this.form.textBackgroundColor: ''
};
this.$emit('createText', textModel);
this.$emit('createData', textModel);
this.initPage();
} else {
return false;
@ -171,15 +150,6 @@ export default {
fontSize: this.form.fontSize,
fontWeight: this.form.fontWeight,
fontFamily: 'consolas'
// hasRect: this.form.hasRect,
// textRect: this.form.hasRect ?
// {
// x: this.form.xBg,
// y: this.form.yBg,
// width: this.form.bgWidth,
// height: this.form.bgHeight
// }:'',
// textBackgroundColor: this.form.hasRect?this.form.textBackgroundColor: ''
};
this.$emit('deleteDataModel', textModel);
this.initPage();

View File

@ -1,172 +1,172 @@
<template>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item label="矩形编号" prop="code">
<el-input :disabled="true" v-model="form.code" >
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="矩形宽度" prop="tipBoxWidth">
<el-input-number v-model="form.tipBoxWidth" controls-position="right" :min="1" ></el-input-number>
</el-form-item>
<el-form-item label="矩形高度" prop="tipBoxHeight">
<el-input-number v-model="form.tipBoxHeight" controls-position="right" :min="1" ></el-input-number>
</el-form-item>
<el-form-item label="填充颜色" prop="fillColor">
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<el-form-item label="填充透明颜色">
<el-switch v-model="opacity"></el-switch>
</el-form-item>
<el-form-item label="边框线宽" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" ></el-input-number>
</el-form-item>
<el-form-item label="边线颜色" prop="stroke">
<el-color-picker v-model="form.stroke"></el-color-picker>
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item label="矩形编号" prop="code">
<el-input v-model="form.code" :disabled="true">
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
</el-input>
</el-form-item>
<el-form-item label="矩形宽度" prop="tipBoxWidth">
<el-input-number v-model="form.tipBoxWidth" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="矩形高度" prop="tipBoxHeight">
<el-input-number v-model="form.tipBoxHeight" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="填充颜色" prop="fillColor">
<el-color-picker v-model="form.fillColor" />
</el-form-item>
<el-form-item label="填充透明颜色">
<el-switch v-model="opacity" />
</el-form-item>
<el-form-item label="边框线宽" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="边线颜色" prop="stroke">
<el-color-picker v-model="form.stroke" />
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="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">删除</el-button>
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'TextDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
opacity: false,
form: {
code: '',
tipBoxWidth: '',
tipBoxHeight: '',
fillColor: '#CE950F',
x: 10,
y: 10,
lineWidth: 0,
stroke: ''
},
rules: {
code: [
{ required: true, message: '请输入提示框编号', trigger: 'blur' },
],
tipBoxWidth: [
{ required: true, message: '请输入提示框宽度', trigger: 'blur' },
],
tipBoxHeight: [
{ required: true, message: '请输入提示框高度', trigger: 'blur' },
],
fillColor: [
{ required: true, message: '请输入提示框颜色', trigger: 'blur' },
]
}
};
},
computed: {
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'TipBox' ){
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.tipBoxWidth = model.width;
this.form.tipBoxHeight = model.height;
this.form.fillColor = model.fillColor;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.opacity = model.opacity;
this.form.lineWidth = model.lineWidth;
this.form.stroke = model.stroke;
}
export default {
name: 'TextDraft',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
opacity: false,
form: {
code: '',
tipBoxWidth: '',
tipBoxHeight: '',
fillColor: '#CE950F',
x: 10,
y: 10,
lineWidth: 0,
stroke: ''
},
rules: {
code: [
{ required: true, message: '请输入提示框编号', trigger: 'blur' }
],
tipBoxWidth: [
{ required: true, message: '请输入提示框宽度', trigger: 'blur' }
],
tipBoxHeight: [
{ required: true, message: '请输入提示框高度', trigger: 'blur' }
],
fillColor: [
{ required: true, message: '请输入提示框颜色', trigger: 'blur' }
]
}
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const tipBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'TipBox',
width: this.form.tipBoxWidth,
height: this.form.tipBoxHeight,
fillColor: this.form.fillColor,
opacity: this.opacity,
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('createTipBox', tipBoxModel);
this.initPage();
} else {
return false;
}
});
};
},
computed: {
},
deleteDevice() {
const tipBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'TipBox',
width: this.form.tipBoxWidth,
height: this.form.tipBoxHeight,
fillColor: this.form.fillColor,
opacity: this.opacity,
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('deleteDataModel',tipBoxModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
tipBoxWidth: '',
tipBoxHeight: '',
fillColor: '',
x: 10,
y: 10,
opacity: false,
lineWidth: 0,
stroke: ''
};
},
generateCode() {
const mydate = new Date();
this.form.code = "tipBox_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
},
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'TipBox' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.tipBoxWidth = model.width;
this.form.tipBoxHeight = model.height;
this.form.fillColor = model.fillColor;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.opacity = model.opacity;
this.form.lineWidth = model.lineWidth;
this.form.stroke = model.stroke;
}
}
};
},
mounted() {
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const tipBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'TipBox',
width: this.form.tipBoxWidth,
height: this.form.tipBoxHeight,
fillColor: this.form.fillColor,
opacity: this.opacity,
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('createData', tipBoxModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const tipBoxModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'TipBox',
width: this.form.tipBoxWidth,
height: this.form.tipBoxHeight,
fillColor: this.form.fillColor,
opacity: this.opacity,
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('deleteDataModel', tipBoxModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
tipBoxWidth: '',
tipBoxHeight: '',
fillColor: '',
x: 10,
y: 10,
opacity: false,
lineWidth: 0,
stroke: ''
};
},
generateCode() {
const mydate = new Date();
this.form.code = 'tipBox_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -2,153 +2,28 @@
<transition name="el-zoom-in-center">
<div class="map-control">
<div class="clearfix">
<span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span>
<el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode">
<div style="float: left;padding-top: 17px;">
<span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span>
<span>{{ stationCode }}</span>
</div>
<!-- <el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode">
<el-option
v-for="item in stationOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-select> -->
<el-button type="text" style="float: right; padding: 15px 0; margin-right: 5px;" @click="handleSave">{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="ibpEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane :label="this.$t('ibp.background')" name="Background">
<el-tab-pane v-for="(each, index) in tabList" :key="index" :label="each.label" :name="each.name">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-bg
ref="background"
<component
:is="each.menus"
:ref="each.name"
style="width:90%"
@updateBg="createDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.line')" name="IbpLine">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-line
ref="ibpline"
style="width:90%"
@createLine="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.text')" name="IbpText">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-text
ref="ibptext"
style="width:90%"
@createText="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.rect')" name="TipBox">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-tip-box
ref="tipbox"
style="width:90%"
@createTipBox="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.button')" name="SquareButton">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-button
ref="squarebutton"
style="width:90%"
@createButton="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.circularLamp')" name="CircularLamp">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-lamp
ref="circularlamp"
style="width:90%"
@createLamp="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.arrow')" name="Arrow">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-arrow
ref="arrow"
style="width:90%"
@createArrow="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.escalatorFrame')" name="AppendageBox">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-appendage-box
ref="appendagebox"
style="width:90%"
@createAppendageBox="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.alarm')" name="Alarm">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-alarm
ref="alarm"
style="width:90%"
@createAlarm="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.telephoneTerminal')" name="TeleTerminal">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-telephone-terminal
ref="teleTerminal"
style="width:90%"
@createTeleTerminal="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.escalator')" name="Elevator">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-elevator
ref="elevator"
style="width:90%"
@createElevator="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.key')" name="Key">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-key
ref="key"
style="width:90%"
@createKey="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.digitalClock')" name="Clock">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-clock
ref="clock"
style="width:90%"
@createClock="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane :label="this.$t('ibp.rotateTip')" name="RotateTip">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
<ibp-rotate-tip
ref="rotateTip"
style="width:90%"
@createRotateTip="createDataModel"
@createData="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-scrollbar>
@ -200,32 +75,34 @@ export default {
data() {
return {
enabledTab: 'Background',
lazy: true,
tabList:[
{ label: this.$t('ibp.background'), name:'Background', menus: IbpBg },
{ label: this.$t('ibp.line'), name:'IbpLine', menus: IbpLine },
{ label: this.$t('ibp.text'), name:'IbpText', menus: IbpText },
{ label: this.$t('ibp.rect'), name:'TipBox', menus: IbpTipBox },
{ label: this.$t('ibp.button'), name:'SquareButton', menus: IbpButton },
{ label: this.$t('ibp.circularLamp'), name:'CircularLamp', menus: IbpLamp },
{ label: this.$t('ibp.arrow'), name:'Arrow', menus: IbpArrow },
{ label: this.$t('ibp.escalatorFrame'), name:'AppendageBox', menus: IbpAppendageBox },
{ label: this.$t('ibp.alarm'), name:'Alarm', menus: IbpAlarm },
{ label: this.$t('ibp.telephoneTerminal'), name:'TeleTerminal', menus: IbpTelephoneTerminal },
{ label: this.$t('ibp.escalator'), name:'Elevator', menus: IbpElevator },
{ label: this.$t('ibp.key'), name:'Key', menus: IbpKey },
{ label: this.$t('ibp.digitalClock'), name:'Clock', menus: IbpClock },
{ label: this.$t('ibp.rotateTip'), name:'RotateTip', menus: IbpRotateTip }
],
data: '',
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: '',
height: this.$store.state.app.height - 190
};
},
computed:{
stationCode() {
if (this.stationOptions.length) {
const obj = this.stationOptions.find(ele => ele.value == this.$route.query.stationCode);
return obj.label;
}
return this.$route.query.stationCode;
}
},
@ -254,9 +131,6 @@ export default {
} catch (error) {
console.log('error', error);
}
},
beforeDestroy() {
},
methods: {
createDataModel(model) {
@ -278,31 +152,35 @@ export default {
}
},
setIbpShow(data) {
this.$emit('set-ibp-show', data);
if (data) {
this.$emit('set-ibp-show', data);
}
this.handleTabClick();
},
setEmptyShow() {
this.$emit('set-empty-show');
},
changeStationCode(e) {
this.$emit('ibpChange', e);
this.handleTabClick();
},
// changeStationCode(e) {
// this.$emit('ibpChange', e);
// this.handleTabClick();
// },
handleTabClick() {
this.$refs.ibpline.initPage();
this.$refs.ibptext.initPage();
this.$refs.tipbox.initPage();
this.$refs.squarebutton.initPage();
this.$refs.circularlamp.initPage();
this.$refs.arrow.initPage();
this.$refs.appendagebox.initPage();
this.$refs.alarm.initPage();
this.$refs.elevator.initPage();
this.$refs.key.initPage();
this.$refs.teleTerminal.initPage();
this.$refs.clock.initPage();
this.$refs.rotateTip.initPage();
this.$refs.background.initPage();
this.$nextTick(() => {
this.$refs.IbpLine[0].initPage();
this.$refs.IbpText[0].initPage();
this.$refs.TipBox[0].initPage();
this.$refs.SquareButton[0].initPage();
this.$refs.CircularLamp[0].initPage();
this.$refs.Arrow[0].initPage();
this.$refs.AppendageBox[0].initPage();
this.$refs.Alarm[0].initPage();
this.$refs.Elevator[0].initPage();
this.$refs.Key[0].initPage();
this.$refs.TeleTerminal[0].initPage();
this.$refs.Clock[0].initPage();
this.$refs.RotateTip[0].initPage();
this.$refs.Background[0].initPage();
});
}
}
};
@ -317,6 +195,7 @@ export default {
.clearfix{
height: 50px;
padding: 0 22px;
overflow: hidden;
}
.ibpEdit{
height: calc(100% - 50px);

View File

@ -167,6 +167,7 @@ export default {
},
setIbp(data, oldData) {
this.$ibp.setIbp(oldData, data);
this.$store.dispatch('ibp/setIbpData', oldData);
},
handleBanOpenScreenDoorStatus() {
this.$store.state.ibp.ibp['keyList'].forEach(item => {

View File

@ -30,9 +30,12 @@
/>
</el-form-item>
<el-form-item label="通知选择:" prop="noticeType">
<el-radio-group v-model="messageModel.noticeType">
<el-checkbox-group v-model="messageModel.noticeType">
<el-checkbox v-for="(item, index) in regionList" :key="index" :label="item.value">{{ item.label }}</el-checkbox>
</el-checkbox-group>
<!-- <el-radio-group v-model="messageModel.noticeType">
<el-radio v-for="(item, index) in regionList" :key="index" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group>
</el-radio-group> -->
</el-form-item>
</el-form>
</div>
@ -60,7 +63,7 @@ export default {
type: '',
subject: '',
content: '',
noticeType: '01'
noticeType: []
},
rules: {
type: [
@ -71,10 +74,10 @@ export default {
],
content:[
{ required: true, message: this.$t('rules.enterTheNewsContent'), trigger: 'blur' }
],
noticeType: [
{ required: true, message: this.$t('rules.chooseNewsCanBeClosed'), trigger: 'change' }
]
// noticeType: [
// { required: true, message: this.$t('rules.chooseNewsCanBeClosed'), trigger: 'change' }
// ]
}
};
},

Binary file not shown.