样式优化

ds1.0
fanluyan 2 years ago
parent 1f9476a5c3
commit 42a7c92543

@ -192,7 +192,7 @@ export default {
};
},
mounted() {
console.log(this.terminalPhoto);
////console.log(this.terminalPhoto);
this.changeBigPic(this.terminalPhoto[0], 0);
},
watch: {
@ -206,7 +206,7 @@ export default {
},
created() {
this.roleUser = localStorage.getItem("role");
console.log(this.roleUser);
////console.log(this.roleUser);
},
methods: {
@ -244,7 +244,7 @@ export default {
termId: data.termId,
})
.then((res) => {
console.log(res);
//console.log(res);
this.localPoints = res.data.list;
this.color = res.data.color;
this.borderwidth = res.data.boderWidth;
@ -258,12 +258,12 @@ export default {
//线
openLine() {
this.flagLine = true;
console.log("我是绘制线缆");
//1
updateMarkEnableStatus({
status: 1,
}).then((res) => {
console.log(res);
//console.log(res);
});
this.drawline();
},
@ -271,38 +271,35 @@ export default {
closeLine() {
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.flagLine = false;
console.log("关闭线缆");
//0
updateMarkEnableStatus({
status: 0,
}).then((res) => {
console.log(res);
//console.log(res);
});
},
//线
drawline() {
this.canvas = this.$refs.myCanvas;
this.imgpic = this.$refs.picJpg;
console.log(this.canvas);
console.log(this.imgpic);
this.canvas.width = this.imgpic.imageWidth; //
this.canvas.height = this.imgpic.imageHeight; //
this.ctx = this.canvas.getContext("2d");
console.log(this.localPoints);
if (this.flagLine == true) {
this.localPoints = this.localPoints;
console.log(this.localPoints);
} else {
this.localPoints = [];
}
console.log(this.ctx);
this.ctx.beginPath();
//线
this.ctx.strokeStyle = this.color;
// 线
this.ctx.lineWidth = this.borderwidth;
console.log(this.ctx.lineWidth, this.ctx.strokeStyle);
console.log(this.localPoints);
if (this.localPoints == null) {
return;
} else {
@ -329,22 +326,19 @@ export default {
},
//
leftClick() {
console.log("我点击了左侧按钮", this.activeSmall);
this.activeSmall--;
this.$refs.scrollBox.scrollLeft -= this.$refs.scrollBox.offsetWidth / 5;
this.changeBigPic(this.terminalPhoto[this.activeSmall], this.activeSmall);
},
rightClick() {
console.log(this.activeSmall);
console.log(this.terminalPhoto.length);
this.activeSmall++;
this.$refs.scrollBox.scrollLeft += this.$refs.scrollBox.offsetWidth / 5;
this.changeBigPic(this.terminalPhoto[this.activeSmall], this.activeSmall);
},
//
changeBigPic(data, i) {
console.log(data, i);
console.log("鼠标222222222", this.currentPage, this.activeSmall);
// //console.log(data, i);
// //console.log("222222222", this.currentPage, this.activeSmall);
this.srcList = [];
this.localPoints = [];
this.activeSmall = i;
@ -364,22 +358,21 @@ export default {
//
handleScroll(e) {
let direction = e.deltaY > 0 ? "down" : "up"; //deltaY
console.log(e.deltaY, direction);
if (direction == "down") {
console.log(this.$refs.scrollBox.offsetWidth / 5);
this.$refs.scrollBox.scrollLeft += this.$refs.scrollBox.offsetWidth / 5;
this.$refs.scrollBox.scrollLeft +=
(this.$refs.scrollBox.offsetWidth / 5) * 3;
}
if (direction == "up") {
this.$refs.scrollBox.scrollLeft -= this.$refs.scrollBox.offsetWidth / 5;
this.$refs.scrollBox.scrollLeft -=
(this.$refs.scrollBox.offsetWidth / 5) * 3;
}
},
//
smallLeftClick() {
console.log("缩略图箭头左侧");
this.$refs.scrollBox.scrollLeft -= this.$refs.scrollBox.offsetWidth;
},
smallRightClick() {
console.log("缩略图箭头右侧");
this.$refs.scrollBox.scrollLeft += this.$refs.scrollBox.offsetWidth;
},
},

@ -175,9 +175,8 @@ export default {
console.log(this.zzradio);
getdyTreeListJoggle({ type: this.zzradio })
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
console.log(this.lineTreeData);
this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum;
this.currentData = JSON.parse(localStorage.getItem("currentData"));
@ -187,11 +186,9 @@ export default {
this.currentData !== null &&
Object.keys(this.currentData).length !== 0
) {
console.log("aaaa");
this.currentNodekey = this.currentData.id;
this.handleNodeClick(this.currentData);
} else {
console.log("aaaa");
this.currentData = this.lineTreeData[0]; //
this.currentNodekey = this.lineTreeData[0].id; //
this.handleNodeClick(this.currentData);
@ -208,7 +205,6 @@ export default {
//treenode
handleNodeClick(data) {
console.log(data);
this.currentData = data;
// this.scrollView();
this.$store.commit("currentData", this.currentData); //currentDatavuex

Loading…
Cancel
Save