Commit becc7ff0 by 李君

优化

1 parent 607213f4
<template> <template>
<el-dialog :title="$t('dialog.mapCoordinateTitle')" class="manage-dialog xy-dialog" :visible.sync="xyEditVisible" :show-close="false" <el-dialog :title="$t('dialog.mapCoordinateTitle')" class="manage-dialog xy-dialog" :visible.sync="xyEditVisible" :show-close="false"
@close="dialogClose"> @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-option v-for="item in channelList" :key="item.id" :label="item.serialnum" :value="item.serialnum" />
</el-select> </el-select>
<div class="xy-content"> <div class="xy-content">
......
...@@ -75,38 +75,38 @@ export default { ...@@ -75,38 +75,38 @@ export default {
stroke: 'transparent', stroke: 'transparent',
} }
}); });
circle.on('mousedown', function(evt1) { // circle.on('mousedown', function(evt1) {
console.log(evt1) // console.log(evt1)
evt1.cancelBubble = true; // evt1.cancelBubble = true;
let dragable = true; // let dragable = true;
let downPoint = [evt1.event.zrX, evt1.event.zrY]; // let downPoint = [evt1.event.zrX, evt1.event.zrY];
let initPoint = zrender.util.clone(this.position); // let initPoint = zrender.util.clone(this.position);
this.attr('z', 99999); // this.attr('z', 99999);
this.attr('shape', { r: 120 }); // this.attr('shape', { r: 120 });
this.on('mousemove', function(evt2) { // this.on('mousemove', function(evt2) {
if (dragable) { // if (dragable) {
let pos = [evt2.event.zrX - downPoint[0], evt2.event.zrY - downPoint[1]]; // let pos = [evt2.event.zrX - downPoint[0], evt2.event.zrY - downPoint[1]];
let position = [initPoint[0] + pos[0], initPoint[1] + pos[1]]; // let position = [initPoint[0] + pos[0], initPoint[1] + pos[1]];
this.attr('position', position); // this.attr('position', position);
picList[gateId].dots[index].x = fdots[index].x + position[0]; // picList[gateId].dots[index].x = fdots[index].x + position[0];
picList[gateId].dots[index].y = fdots[index].y + position[1]; // picList[gateId].dots[index].y = fdots[index].y + position[1];
that.setText(gateId); // that.setText(gateId);
that.renderPartList(gateId); // that.renderPartList(gateId);
} // }
}); // });
this.on('mouseup', function(evt3) { // this.on('mouseup', function(evt3) {
dragable = false; // dragable = false;
postGateData(gateId); // postGateData(gateId);
this.attr('z', tempZ); // this.attr('z', tempZ);
this.attr('shape', { r: 20 }); // this.attr('shape', { r: 20 });
//that.saveGateData(gateId) // //that.saveGateData(gateId)
}) // })
this.on('mouseout', function(evt3) { // this.on('mouseout', function(evt3) {
dragable = false; // dragable = false;
this.attr('z', tempZ); // this.attr('z', tempZ);
this.attr('shape', { r: 20 }); // this.attr('shape', { r: 20 });
}) // })
}) // })
if (sdots) { if (sdots) {
let position = [sdots[index].x - circle.shape.cx, sdots[index].y - circle.shape.cy]; let position = [sdots[index].x - circle.shape.cx, sdots[index].y - circle.shape.cy];
circle.attr('position', position); circle.attr('position', position);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="aiot_alone_long"> <div class="aiot_alone_long">
<div class="aiot_left"> <div class="aiot_left">
<div style="margin:0 0 10px 10px"> <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> </div>
<el-row class="manage-content"> <el-row class="manage-content">
<el-col :span="24" class="treeMenu boxShadow"> <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!