# Conflicts:
#	src/iscs/constant/iscsData.js
This commit is contained in:
joylink_fanyuhong 2020-02-06 13:39:23 +08:00
commit f33fbbfb52
11 changed files with 32 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -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);
}

View File

@ -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]

View File

@ -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);
},

View File

@ -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
};
}
}

View File

@ -103,6 +103,7 @@ export default {
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {

View File

@ -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);

View File

@ -93,9 +93,9 @@ export default {
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {
},
methods: {
createDataModel(model) {

View File

@ -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;
}
}
},

View File

@ -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,

View File

@ -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() {