Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
cd55c5b269
@ -270,7 +270,7 @@ deviceRender[deviceType.ArcStatus] = {
|
||||
deviceRender[deviceType.IscsButton] = {
|
||||
_type: deviceType.IscsButton,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
z: 5
|
||||
};
|
||||
/** 状态表 */
|
||||
deviceRender[deviceType.StateTable] = {
|
||||
|
@ -27,6 +27,7 @@ export default class Button extends Group {
|
||||
this.buttonText = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
z2: model.z2 || 0,
|
||||
style: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
@ -46,6 +47,7 @@ export default class Button extends Group {
|
||||
this.imageButton = new Image({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z2: model.z2 || 0,
|
||||
style: {
|
||||
x: textRect.x - model.levelPadding,
|
||||
y: textRect.y - model.verticalPadding,
|
||||
@ -61,6 +63,7 @@ export default class Button extends Group {
|
||||
this.textButtonRect = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z2: model.z2 || 0,
|
||||
shape: {
|
||||
x: textRect.x - model.levelPadding,
|
||||
y: textRect.y - model.verticalPadding,
|
||||
@ -75,6 +78,7 @@ export default class Button extends Group {
|
||||
this.lineLeftTop = new Polyline({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z2: model.z2 || 0,
|
||||
draggable: false,
|
||||
shape: {
|
||||
points: [
|
||||
@ -91,6 +95,7 @@ export default class Button extends Group {
|
||||
this.lineBottomRight = new Polyline({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z2: model.z2 || 0,
|
||||
draggable: false,
|
||||
shape: {
|
||||
points: [
|
||||
@ -111,6 +116,7 @@ export default class Button extends Group {
|
||||
this.textButtonRectSmall = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z2: model.z2 || 0,
|
||||
shape: {
|
||||
x: textRect.x - model.levelPadding + 6,
|
||||
y: textRect.y - model.verticalPadding + 6,
|
||||
@ -145,7 +151,6 @@ export default class Button extends Group {
|
||||
this.add(this.grouper);
|
||||
this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColor || '#FFF'}); });
|
||||
this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColorActive || '#000'}); });
|
||||
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
|
@ -503,7 +503,7 @@ class Jlmap {
|
||||
}
|
||||
} else if (elem.deviceType === 'DIRECTION_ROD' && elem.uniqueCode) {
|
||||
store.state.map.map.directionRodList.forEach(item => {
|
||||
if (elem.uniqueCode === `${item.startStationCode}-${item.endStationCode}-${item.right}`) {
|
||||
if (elem.uniqueCode === item.uniqueCode) {
|
||||
const updateRod = this.mapDevice[item.code];
|
||||
updateRod.reversed = elem.reversed;
|
||||
this.$painter.update(updateRod);
|
||||
|
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px" style="width: 100%;padding: 10px 50px;">
|
||||
<el-form-item label="图层:" prop="z2">
|
||||
<el-input-number v-model="form.z2" controls-position="right" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isUpdate" label="按钮编号:" prop="code">
|
||||
<el-input v-model="form.code" size="small" :disabled="true" />
|
||||
</el-form-item>
|
||||
@ -19,6 +22,12 @@
|
||||
<el-form-item label="选中文字颜色:" prop="textColorActive">
|
||||
<el-color-picker v-model="form.textColorActive" size="small" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="背景颜色:" prop="textColor">
|
||||
<el-color-picker v-model="form.fillColor" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选中背景颜色:" prop="textColor">
|
||||
<el-color-picker v-model="form.fillColorActive" size="small" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="文字大小:" prop="fontSize">
|
||||
<el-input-number v-model="form.fontSize" size="small" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
@ -72,6 +81,7 @@ export default {
|
||||
],
|
||||
form: {
|
||||
code: '',
|
||||
z2: 0,
|
||||
levelPadding: 10,
|
||||
verticalPadding: 5,
|
||||
fontSize: 10,
|
||||
@ -80,6 +90,8 @@ export default {
|
||||
context: '',
|
||||
function: '',
|
||||
textColor: '',
|
||||
// fillColor: '#D1C2C2',
|
||||
// fillColorActive: '#847b7b',
|
||||
textColorActive: '#000'
|
||||
},
|
||||
rules: {
|
||||
@ -105,6 +117,7 @@ export default {
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.z2 = model.z2;
|
||||
this.form.levelPadding = model.levelPadding;
|
||||
this.form.verticalPadding = model.verticalPadding;
|
||||
this.form.x = model.point.x;
|
||||
@ -149,6 +162,7 @@ export default {
|
||||
},
|
||||
code: this.isUpdate ? this.form.code : getUID('IscsButton', this.iscs.iscsButtonList),
|
||||
_type: 'IscsButton',
|
||||
z2: this.form.z2,
|
||||
levelPadding: this.form.levelPadding,
|
||||
verticalPadding: this.form.verticalPadding,
|
||||
context: this.form.context,
|
||||
@ -186,6 +200,7 @@ export default {
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code: '',
|
||||
z2: '',
|
||||
levelPadding: 10,
|
||||
verticalPadding: 2,
|
||||
fontSize: 10,
|
||||
|
@ -191,9 +191,7 @@ export default {
|
||||
if (selected && selected._type.toUpperCase() === 'DirectionRod'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.resetEditData();
|
||||
console.log(this.editModel, '------------');
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
console.log(this.editModel, '***********');
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'locationSectionCode'.toUpperCase()) {
|
||||
this.addModel.sectionCode = selected.code;
|
||||
@ -213,7 +211,6 @@ export default {
|
||||
create() {
|
||||
const uid = getUID('DirectionRod', this.floodGateList || []);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](this.addModel.sectionCode);
|
||||
console.log(section);
|
||||
const model = {
|
||||
_type: 'DirectionRod',
|
||||
code: uid,
|
||||
@ -231,6 +228,7 @@ export default {
|
||||
this.$refs.createForm.resetForm();
|
||||
},
|
||||
updateMapModel(data) {
|
||||
data.uniqueCode = `${data.startStationCode}-${data.endStationCode}-${data.right}`;
|
||||
this.$emit('updateMapModel', data);
|
||||
},
|
||||
deleteObj() {
|
||||
|
Loading…
Reference in New Issue
Block a user