Commit becc7ff0 by 李君

优化

1 parent 607213f4
<template>
<el-dialog :title="$t('dialog.mapCoordinateTitle')" class="manage-dialog xy-dialog" :visible.sync="xyEditVisible" :show-close="false"
@close="dialogClose">
<span style="margin-right: 15px;">{{$t('table.laneName')}}</span><el-select @change="channelChange" v-model="channelVal">
<span style="margin-right: 15px;">{{$t('table.deviceNum')}}</span><el-select @change="channelChange" v-model="channelVal">
<el-option v-for="item in channelList" :key="item.id" :label="item.serialnum" :value="item.serialnum" />
</el-select>
<div class="xy-content">
......
......@@ -75,38 +75,38 @@ export default {
stroke: 'transparent',
}
});
circle.on('mousedown', function(evt1) {
console.log(evt1)
evt1.cancelBubble = true;
let dragable = true;
let downPoint = [evt1.event.zrX, evt1.event.zrY];
let initPoint = zrender.util.clone(this.position);
this.attr('z', 99999);
this.attr('shape', { r: 120 });
this.on('mousemove', function(evt2) {
if (dragable) {
let pos = [evt2.event.zrX - downPoint[0], evt2.event.zrY - downPoint[1]];
let position = [initPoint[0] + pos[0], initPoint[1] + pos[1]];
this.attr('position', position);
picList[gateId].dots[index].x = fdots[index].x + position[0];
picList[gateId].dots[index].y = fdots[index].y + position[1];
that.setText(gateId);
that.renderPartList(gateId);
}
});
this.on('mouseup', function(evt3) {
dragable = false;
postGateData(gateId);
this.attr('z', tempZ);
this.attr('shape', { r: 20 });
//that.saveGateData(gateId)
})
this.on('mouseout', function(evt3) {
dragable = false;
this.attr('z', tempZ);
this.attr('shape', { r: 20 });
})
})
// circle.on('mousedown', function(evt1) {
// console.log(evt1)
// evt1.cancelBubble = true;
// let dragable = true;
// let downPoint = [evt1.event.zrX, evt1.event.zrY];
// let initPoint = zrender.util.clone(this.position);
// this.attr('z', 99999);
// this.attr('shape', { r: 120 });
// this.on('mousemove', function(evt2) {
// if (dragable) {
// let pos = [evt2.event.zrX - downPoint[0], evt2.event.zrY - downPoint[1]];
// let position = [initPoint[0] + pos[0], initPoint[1] + pos[1]];
// this.attr('position', position);
// picList[gateId].dots[index].x = fdots[index].x + position[0];
// picList[gateId].dots[index].y = fdots[index].y + position[1];
// that.setText(gateId);
// that.renderPartList(gateId);
// }
// });
// this.on('mouseup', function(evt3) {
// dragable = false;
// postGateData(gateId);
// this.attr('z', tempZ);
// this.attr('shape', { r: 20 });
// //that.saveGateData(gateId)
// })
// this.on('mouseout', function(evt3) {
// dragable = false;
// this.attr('z', tempZ);
// this.attr('shape', { r: 20 });
// })
// })
if (sdots) {
let position = [sdots[index].x - circle.shape.cx, sdots[index].y - circle.shape.cy];
circle.attr('position', position);
......
......@@ -20,7 +20,7 @@
<div class="aiot_alone_long">
<div class="aiot_left">
<div style="margin:0 0 10px 10px">
<el-button type="primary" size="mini" class="manage-add-btn fl-btn" @click="addDesk">{{$t('button.groupAdd')}}</el-button>
<el-button type="primary" size="mini" class="search-btn" @click="addDesk">{{$t('button.groupAdd')}}</el-button>
</div>
<el-row class="manage-content">
<el-col :span="24" class="treeMenu boxShadow">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!