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

@ -2,30 +2,30 @@
<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 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-input-number>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</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 {
export default {
name: 'ButtonDraft',
components: {
},
@ -42,10 +42,10 @@
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheAlarmCode'), trigger: 'blur' },
{ required: true, message: this.$t('rules.enterTheAlarmCode'), trigger: 'blur' }
],
alarmWidth: [
{ required: true, message: this.$t('rules.enterTheAlarmWidth'), trigger: 'blur' },
{ required: true, message: this.$t('rules.enterTheAlarmWidth'), trigger: 'blur' }
]
}
};
@ -56,7 +56,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Alarm' ){
if (model._type === 'Alarm' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
@ -72,7 +72,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
if (valid) {
const alarmModel = {
point:{
x: this.form.x,
@ -80,9 +80,9 @@
},
code: this.form.code,
_type: 'Alarm',
width: this.form .alarmWidth,
width: this.form.alarmWidth
};
this.$emit('createAlarm', alarmModel);
this.$emit('createData', alarmModel);
this.initPage();
} else {
return false;
@ -97,9 +97,9 @@
},
code: this.form.code,
_type: 'Alarm',
width: this.form .alarmWidth,
width: this.form.alarmWidth
};
this.$emit('deleteDataModel',alarmModel );
this.$emit('deleteDataModel', alarmModel );
this.initPage();
},
initPage() {
@ -115,10 +115,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);
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

@ -2,36 +2,36 @@
<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 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-input-number>
<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-input-number>
<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"></el-input-number><span>&nbsp&nbsp{{$t('ibp.recommendedSize')}}</span>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</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 {
export default {
name: 'AppendageBoxDraft',
components: {
},
@ -50,16 +50,16 @@
},
rules: {
code: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameCode'), trigger: 'blur' },
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameCode'), trigger: 'blur' }
],
appendageBoxWidth: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameWidth'), trigger: 'blur' },
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameWidth'), trigger: 'blur' }
],
appendageBoxHeight: [
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameHeight'), trigger: 'blur' },
{ required: true, message: this.$t('ibp.enterTheEscalatorFrameHeight'), trigger: 'blur' }
],
borderWidth: [
{ required: true, message: this.$t('ibp.enterTheBorderWidth'), trigger: 'blur'},
{ required: true, message: this.$t('ibp.enterTheBorderWidth'), trigger: 'blur'}
]
}
};
@ -70,7 +70,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'AppendageBox' ){
if (model._type === 'AppendageBox' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
@ -79,7 +79,7 @@
this.form.appendageBoxHeight = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.borderWidth = model.borderWidth
this.form.borderWidth = model.borderWidth;
}
}
},
@ -88,7 +88,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
if (valid) {
const appendageBoxModel = {
point: {
x: this.form.x,
@ -96,11 +96,11 @@
},
_type: 'AppendageBox',
code: this.form.code,
width: this.form .appendageBoxWidth,
width: this.form.appendageBoxWidth,
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('createAppendageBox', appendageBoxModel);
this.$emit('createData', appendageBoxModel);
this.initPage();
} else {
return false;
@ -115,11 +115,11 @@
},
_type: 'AppendageBox',
code: this.form.code,
width: this.form .appendageBoxWidth,
width: this.form.appendageBoxWidth,
height: this.form.appendageBoxHeight,
borderWidth: this.form.borderWidth
};
this.$emit('deleteDataModel',appendageBoxModel );
this.$emit('deleteDataModel', appendageBoxModel );
this.initPage();
},
initPage() {
@ -137,10 +137,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);
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

@ -2,44 +2,44 @@
<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 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>
<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-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-input-number>
<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-input-number>
<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-color-picker>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</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 {
export default {
name: 'ArrowDraft',
components: {
},
@ -59,20 +59,20 @@
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheArrowCode'), trigger: 'blur' },
{ 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' },
{ required: true, message: this.$t('rules.enterTheArrowLength'), trigger: 'blur' }
],
arrowWidth: [
{ required: true, message: this.$t('rules.enterTheArrowWidth'), trigger: 'blur' },
{ required: true, message: this.$t('rules.enterTheArrowWidth'), trigger: 'blur' }
],
fillColor: [
{ required: true, message: this.$t('rules.enterTheArrowColor'), trigger: 'blur' },
],
{ required: true, message: this.$t('rules.enterTheArrowColor'), trigger: 'blur' }
]
}
};
},
@ -82,7 +82,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Arrow' ){
if (model._type === 'Arrow' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
@ -101,7 +101,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
if (valid) {
const arrowModel = {
point: {
x: this.form.x,
@ -111,12 +111,12 @@
code: this.form.code,
orientation: this.form.orientation,
fill: this.form.fillColor,
width: this.form .arrowWidth,
length: this.form.arrowLength,
width: this.form.arrowWidth,
length: this.form.arrowLength
};
this.$emit('createArrow', arrowModel);
this.$emit('createData', arrowModel);
this.initPage();
}else {
} else {
return false;
}
});
@ -132,10 +132,10 @@
code: this.form.code,
orientation: this.form.orientation,
fill: this.form.fillColor,
width: this.form .arrowWidth,
length: this.form.arrowLength,
width: this.form.arrowWidth,
length: this.form.arrowLength
};
this.$emit('deleteDataModel',arrowModel);
this.$emit('deleteDataModel', arrowModel);
this.initPage();
},
initPage() {
@ -154,10 +154,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);
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

@ -2,30 +2,30 @@
<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 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-input-number>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</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 {
export default {
name: 'ClockDraft',
components: {
},
@ -42,10 +42,10 @@
},
rules: {
code: [
{ required: true, message: this.$t('rules.enterTheDigitalClockCode'), trigger: 'blur' },
{ required: true, message: this.$t('rules.enterTheDigitalClockCode'), trigger: 'blur' }
],
clockWidth: [
{ required: true, message: this.$t('rules.enterTheDigitalClockWidth'), trigger: 'blur' },
{ required: true, message: this.$t('rules.enterTheDigitalClockWidth'), trigger: 'blur' }
]
}
};
@ -56,7 +56,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Clock' ){
if (model._type === 'Clock' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
@ -80,11 +80,11 @@
},
_type: 'Clock',
code: this.form.code,
width: this.form.clockWidth,
width: this.form.clockWidth
};
this.$emit('createClock', clockModel);
this.$emit('createData', clockModel);
this.initPage();
}else {
} else {
return false;
}
});
@ -97,9 +97,9 @@
},
_type: 'Clock',
code: this.form.code,
width: this.form.clockWidth,
width: this.form.clockWidth
};
this.$emit('deleteDataModel',clockModel );
this.$emit('deleteDataModel', clockModel );
this.initPage();
},
initPage() {
@ -116,10 +116,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);
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

@ -2,42 +2,42 @@
<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 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-input-number>
<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-input-number>
<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-color-picker>
<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>
<el-option :label="this.$t('ibp.startUp')" value="top"></el-option>
<el-option :label="this.$t('ibp.startDown')" value="bottom"></el-option>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</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 {
export default {
name: 'ElevatorDraft',
components: {
},
@ -57,20 +57,20 @@
},
rules: {
code: [
{ required: true, message: this.$t('ibp.enterTheElevatorCode'), trigger: 'blur' },
{ required: true, message: this.$t('ibp.enterTheElevatorCode'), trigger: 'blur' }
],
elevatorWidth: [
{ required: true, message: this.$t('ibp.enterTheElevatorWidth'), trigger: 'blur' },
{ required: true, message: this.$t('ibp.enterTheElevatorWidth'), trigger: 'blur' }
],
elevatorHeight: [
{ required: true, message: this.$t('ibp.enterTheElevatorHeight'), trigger: 'blur' },
{ required: true, message: this.$t('ibp.enterTheElevatorHeight'), trigger: 'blur' }
],
elevatorColor: [
{ required: true, message: this.$t('ibp.enterTheElevatorColor'), trigger: 'change' },
{ required: true, message: this.$t('ibp.enterTheElevatorColor'), trigger: 'change' }
],
direction: [
{ required: true, message: this.$t('ibp.selectTheStartingDirection'), trigger: 'change' },
],
{ required: true, message: this.$t('ibp.selectTheStartingDirection'), trigger: 'change' }
]
}
};
},
@ -80,7 +80,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'Elevator' ){
if (model._type === 'Elevator' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
@ -99,7 +99,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
if (valid) {
const elevatorModel = {
point: {
x: this.form.x,
@ -110,9 +110,9 @@
width: this.form.elevatorWidth,
height: this.form.elevatorHeight,
fillColor: this.form.elevatorColor,
direction: this.form.direction,
direction: this.form.direction
};
this.$emit('createElevator', elevatorModel);
this.$emit('createData', elevatorModel);
this.initPage();
} else {
return false;
@ -131,9 +131,9 @@
width: this.form.elevatorWidth,
height: this.form.elevatorHeight,
fillColor: this.form.elevatorColor,
direction: this.form.direction,
direction: this.form.direction
};
this.$emit('deleteDataModel',elevatorModel );
this.$emit('deleteDataModel', elevatorModel );
this.initPage();
},
initPage() {
@ -152,10 +152,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);
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

@ -2,18 +2,18 @@
<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 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-input-number>
<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-input-number>
<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-input-number>
<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="请选择">
@ -21,24 +21,24 @@
v-for="item in showMeanList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="关联设备">
<el-input v-model="form.linkDevice"></el-input>
<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" @click="deleteDevice" type="danger">{{$t('global.delete')}}</el-button>
<el-button v-show="showDeleteButton" @click="initPage">{{$t('global.cancel')}}</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 {
export default {
name: 'LampDraft',
components: {
},
@ -62,11 +62,11 @@
},
rules: {
code: [
{ required: true, message: '请输入按钮编号', trigger: 'blur' },
{ required: true, message: '请输入按钮编号', trigger: 'blur' }
],
r: [
{ required: true, message: '请输入圆形灯半径', trigger: 'blur'}
],
]
}
};
},
@ -76,7 +76,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'CircularLamp' ){
if (model._type === 'CircularLamp' ) {
this.buttonText = this.$t('global.modify');
this.showDeleteButton = true;
this.isUpdate = true;
@ -94,7 +94,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if(valid){
if (valid) {
const lampModel = {
point: {
x: this.form.x,
@ -107,9 +107,9 @@
linkDevice: this.form.linkDevice,
fillColor: '#332C22'
};
this.$emit('createLamp', lampModel);
this.$emit('createData', lampModel);
this.initPage();
}else {
} else {
return false;
}
});
@ -128,7 +128,7 @@
linkDevice: this.form.linkDevice,
fillColor: '#332C22'
};
this.$emit('deleteDataModel',lampModel );
this.$emit('deleteDataModel', lampModel );
this.initPage();
},
initPage() {
@ -141,15 +141,15 @@
x: 10,
y: 10,
mean: '',
linkDevice: '',
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);
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

@ -2,31 +2,31 @@
<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-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-input-number>
<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-color-picker>
<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-input-number>
<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-input-number>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">删除</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>
@ -34,7 +34,7 @@
</template>
<script>
export default {
export default {
name: 'TextDraft',
components: {
},
@ -54,14 +54,14 @@
},
rules: {
code: [
{ required: true, message: '请输入线段编号', trigger: 'blur' },
{ required: true, message: '请输入线段编号', trigger: 'blur' }
],
lineWidth: [
{ required: true, message: '请输入线段宽度', trigger: 'blur' },
{ required: true, message: '请输入线段宽度', trigger: 'blur' }
],
fillColor: [
{ required: true, message: '请输入线段颜色', trigger: 'blur' },
],
{ required: true, message: '请输入线段颜色', trigger: 'blur' }
]
}
};
},
@ -71,7 +71,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'IbpLine' ){
if (model._type === 'IbpLine' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
@ -90,7 +90,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) =>{
if (valid){
if (valid) {
const lineModel = {
point1: {
x: this.form.x1,
@ -105,9 +105,9 @@
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor
};
this.$emit('createLine', lineModel);
this.$emit('createData', lineModel);
this.initPage();
}else {
} else {
return false;
}
});
@ -128,7 +128,7 @@
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor
};
this.$emit('deleteDataModel',lineModel );
this.$emit('deleteDataModel', lineModel );
this.initPage();
},
initPage() {
@ -147,10 +147,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);
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

@ -2,28 +2,28 @@
<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-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-input-number>
<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-input-number>
<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-input-number>
<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>
<el-option label="黑色" value="black"></el-option>
<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" @click="deleteDevice" type="danger">删除</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>
@ -31,7 +31,7 @@
</template>
<script>
export default {
export default {
name: 'KeyDraft',
components: {
},
@ -49,10 +49,10 @@
},
rules: {
code: [
{ required: true, message: '请输入旋转提示编号', trigger: 'blur' },
{ required: true, message: '请输入旋转提示编号', trigger: 'blur' }
],
rotateTipWidth: [
{ required: true, message: '请输入旋转提示宽度', trigger: 'blur' },
{ required: true, message: '请输入旋转提示宽度', trigger: 'blur' }
],
rotateTipColor: [
{ required: true, message: '请选择按钮颜色', trigger: 'change'}
@ -66,13 +66,13 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'RotateTip' ){
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.rotateTipColor = model.color ? model.color : 'black';
this.form.x = model.point.x;
this.form.y = model.point.y;
}
@ -83,7 +83,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if(valid) {
if (valid) {
const rotateTipModel = {
point: {
x: this.form.x,
@ -95,9 +95,9 @@
width: this.form.rotateTipWidth,
color: this.form.rotateTipColor
};
this.$emit('createRotateTip', rotateTipModel);
this.$emit('createData', rotateTipModel);
this.initPage();
}else {
} else {
return false;
}
});
@ -112,10 +112,10 @@
draggable: true,
_type: 'RotateTip',
code: this.form.code,
width: this.form .rotateTipWidth,
width: this.form.rotateTipWidth,
color: this.form.rotateTipColor
};
this.$emit('deleteDataModel',rotateTipModel);
this.$emit('deleteDataModel', rotateTipModel);
this.initPage();
},
initPage() {
@ -132,10 +132,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);
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

@ -2,22 +2,22 @@
<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-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-input-number>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">删除</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>
@ -25,7 +25,7 @@
</template>
<script>
export default {
export default {
name: 'KeyDraft',
components: {
},
@ -42,11 +42,11 @@
},
rules: {
code: [
{ required: true, message: '请输入端子编号', trigger: 'blur' },
{ required: true, message: '请输入端子编号', trigger: 'blur' }
],
terminalWidth: [
{ required: true, message: '请输入端子宽度', trigger: 'blur' },
],
{ required: true, message: '请输入端子宽度', trigger: 'blur' }
]
}
};
},
@ -56,7 +56,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'TeleTerminal' ){
if (model._type === 'TeleTerminal' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
@ -73,7 +73,7 @@
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid){
if (valid) {
const TerminalModel = {
point: {
x: this.form.x,
@ -82,9 +82,9 @@
draggable: true,
_type: 'TeleTerminal',
code: this.form.code,
width: this.form.terminalWidth,
width: this.form.terminalWidth
};
this.$emit('createTeleTerminal', TerminalModel);
this.$emit('createData', TerminalModel);
this.initPage();
} else {
return false;
@ -101,9 +101,9 @@
draggable: true,
_type: 'TeleTerminal',
code: this.form.code,
width: this.form .terminalWidth,
width: this.form.terminalWidth
};
this.$emit('deleteDataModel',TerminalModel);
this.$emit('deleteDataModel', TerminalModel);
this.initPage();
},
initPage() {
@ -119,10 +119,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);
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

@ -2,37 +2,37 @@
<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-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-input-number>
<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-input-number>
<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-color-picker>
<el-color-picker v-model="form.fillColor" />
</el-form-item>
<el-form-item label="填充透明颜色">
<el-switch v-model="opacity"></el-switch>
<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-input-number>
<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-color-picker>
<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-input-number>
<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-input-number>
<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" @click="deleteDevice" type="danger">删除</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>
@ -41,7 +41,7 @@
<script>
export default {
export default {
name: 'TextDraft',
components: {
},
@ -63,16 +63,16 @@
},
rules: {
code: [
{ required: true, message: '请输入提示框编号', trigger: 'blur' },
{ required: true, message: '请输入提示框编号', trigger: 'blur' }
],
tipBoxWidth: [
{ required: true, message: '请输入提示框宽度', trigger: 'blur' },
{ required: true, message: '请输入提示框宽度', trigger: 'blur' }
],
tipBoxHeight: [
{ required: true, message: '请输入提示框高度', trigger: 'blur' },
{ required: true, message: '请输入提示框高度', trigger: 'blur' }
],
fillColor: [
{ required: true, message: '请输入提示框颜色', trigger: 'blur' },
{ required: true, message: '请输入提示框颜色', trigger: 'blur' }
]
}
};
@ -83,7 +83,7 @@
watch: {
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
if (model._type === 'TipBox' ){
if (model._type === 'TipBox' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
@ -119,7 +119,7 @@
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('createTipBox', tipBoxModel);
this.$emit('createData', tipBoxModel);
this.initPage();
} else {
return false;
@ -142,7 +142,7 @@
lineWidth: this.form.lineWidth,
stroke: this.form.stroke
};
this.$emit('deleteDataModel',tipBoxModel);
this.$emit('deleteDataModel', tipBoxModel);
this.initPage();
},
initPage() {
@ -163,10 +163,10 @@
},
generateCode() {
const mydate = new Date();
this.form.code = "tipBox_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
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">
<div style="float: left;padding-top: 17px;">
<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">
<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) {
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.