Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/iscs/constant/iscsData.js
This commit is contained in:
commit
f33fbbfb52
File diff suppressed because one or more lines are too long
@ -17,6 +17,10 @@ export default class BrakeMachine extends Group {
|
||||
position: [this.model.point.x, this.model.point.y]
|
||||
});
|
||||
this.path = createPathSvg(this.model);
|
||||
if (this.model.isRight) {
|
||||
this.grouper.origin = [this.model.width / 2, this.model.width / 2 ];
|
||||
this.grouper.rotation = Math.PI;
|
||||
}
|
||||
this.add(this.grouper);
|
||||
this.grouper.add(this.path);
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ export default class line extends Group {
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
console.log(model);
|
||||
this.grouper = new Group({
|
||||
id: model.code,
|
||||
position: [model.point1.x, model.point1.y]
|
||||
|
@ -82,13 +82,13 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$emit('iscsChange', this.$route.params.id);
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
createDataModel(model) {
|
||||
console.log(model);
|
||||
const newModel = deviceFactory(model._type, model);
|
||||
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
|
||||
},
|
||||
|
@ -7,6 +7,9 @@
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" />
|
||||
</el-form-item>
|
||||
<el-form-item label="闸机朝右" prop="isRight">
|
||||
<el-checkbox v-model="addModel.isRight" />
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标" prop="x">
|
||||
<el-input-number v-model="addModel.x" />
|
||||
</el-form-item>
|
||||
@ -33,7 +36,8 @@ export default {
|
||||
code: '',
|
||||
width: 25,
|
||||
x: 10,
|
||||
y: 10
|
||||
y: 10,
|
||||
isRight:false
|
||||
},
|
||||
rules: {
|
||||
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
|
||||
@ -61,6 +65,7 @@ export default {
|
||||
this.addModel.width = model.width;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
this.addModel.isRight = model.isRight;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -73,6 +78,7 @@ export default {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
isRight: this.addModel.isRight,
|
||||
code: this.isUpdate ? this.form.code : getUID('BrakeMachine', this.iscs.brakeMachineList),
|
||||
_type: 'BrakeMachine',
|
||||
width: this.addModel.width
|
||||
@ -91,6 +97,7 @@ export default {
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
isRight: this.addModel.isRight,
|
||||
_type: 'BrakeMachine',
|
||||
width: this.addModel.width
|
||||
};
|
||||
@ -105,7 +112,8 @@ export default {
|
||||
code: '',
|
||||
width: 25,
|
||||
x: 10,
|
||||
y: 10
|
||||
y: 10,
|
||||
isRight:false
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +103,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$emit('iscsChange', this.$route.params.id);
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
|
@ -170,6 +170,9 @@ export default {
|
||||
enabledTab: 'frozenPump'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$emit('iscsChange', this.$route.params.id);
|
||||
},
|
||||
methods:{
|
||||
createDataModel(model) {
|
||||
const newModel = deviceFactory(model._type, model);
|
||||
|
@ -93,9 +93,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$emit('iscsChange', this.$route.params.id);
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
createDataModel(model) {
|
||||
|
@ -64,6 +64,7 @@ export default {
|
||||
this.addModel.height = model.height;
|
||||
this.addModel.x = model.point.x;
|
||||
this.addModel.y = model.point.y;
|
||||
this.addModel.right = model.right;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -41,7 +41,7 @@ export default {
|
||||
form: {
|
||||
code: '',
|
||||
lineWidth: '',
|
||||
fillColor: '#000000',
|
||||
fillColor: '#fff',
|
||||
x1: 10,
|
||||
y1: 10,
|
||||
x2: 20,
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
this.form = {
|
||||
code: '',
|
||||
lineWidth: '',
|
||||
fillColor: '',
|
||||
fillColor: '#fff',
|
||||
x1: 10,
|
||||
y1: 10,
|
||||
x2: 20,
|
||||
|
@ -152,7 +152,9 @@ export default {
|
||||
},
|
||||
// 右键点击事件
|
||||
onContextMenu(em) {
|
||||
this.$store.dispatch('iscs/setUpdateDeviceData', em.eventTarget.model);
|
||||
if (em.eventTarget) {
|
||||
this.$store.dispatch('iscs/setUpdateDeviceData', em.eventTarget.model);
|
||||
}
|
||||
},
|
||||
// 绘图时调用,元素可拖拽
|
||||
drawIscsInit() {
|
||||
|
Loading…
Reference in New Issue
Block a user