feat: There is no way the,

This commit is contained in:
Superman_Main
2021-11-29 17:38:57 +08:00
parent 69f7c928e9
commit 48215f7da6
@@ -130,6 +130,8 @@ export default {
rowDataRight: JSON.parse(this.$route.query.rowDataRight),
resRightMapList: [],
saveItemId: '',
saveLeftId: '',
saveRightId: '',
saveItemIdRight: '',
leftString: '',
rightString: '',
@@ -175,6 +177,14 @@ export default {
} else if (parseFloat(res.data.similarityDegree) < parseFloat('75%')) {
this.textcontent = '不相似'
}
const treeNodeLeft = {}
treeNodeLeft.id = this.saveLeftId
const treeNodeRight = {}
treeNodeRight.id = this.saveRightId
console.log(treeNodeLeft)
console.log(treeNodeRight)
this.handleLeftTreeClick("domesticTree1",treeNodeLeft)
this.handleRightTreeClick("domesticTree2",treeNodeRight)
// this.resultModal = true
this.spinShow = false
}, e => {
@@ -232,6 +242,7 @@ export default {
$(this.oldRightId).find('#itemsRightText_' + this.saveItemIdRight).html(this.oldRightContent)
}
this.saveItemId = item.itemsId
this.saveLeftId = item.id
this.itemLeftIndex = index
@@ -250,25 +261,26 @@ export default {
this.leftName = item.itemsNum + ' ' + item.itemsName
this.saveItemIdRight = this.resRightMapList[item.targetStand].itemsId
this.saveRightId = this.resRightMapList[item.targetStand].id
let scrollToContainer = mainContainer.find(`.children:eq(${item.targetStand})`)
this.rightName = scrollToContainer.children(':first').html()
scrollToContainer.css('border', '2px solid red')
// 非动画效果
// mainContainer.scrollTop(
// scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
// );
mainContainer.scrollTop(
scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
);
// 动画效果
mainContainer.animate({
scrollTop: scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
})// 2秒滑动到指定位置
// mainContainer.animate({
// scrollTop: scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
// })// 2秒滑动到指定位置
} else {
if (this.oldLeftId !== '') {
$(this.oldLeftId).find('#itemsLeftText_' + this.saveItemId).html(this.oldLeftContent)
$(this.oldRightId).find('#itemsRightText_' + this.saveItemIdRight).html(this.oldRightContent)
}
this.saveItemIdRight = item.itemsId
this.saveRightId = item.id
this.itemRightIndex = index
@@ -287,6 +299,7 @@ export default {
this.rightName = item.itemsNum + ' ' + item.itemsName
this.saveItemId = this.resLeftMapList[item.targetStand].itemsId
this.saveLeftId = this.resLeftMapList[item.targetStand].id
let scrollToContainer = mainContainer.find(`.children:eq(${item.targetStand})`)// 滚动到<div id="thisMainPanel">中类名为son-panel的第六个处
this.leftName = scrollToContainer.children('div:nth-child(2)').html()
@@ -507,6 +520,7 @@ export default {
},
handleLeftTreeClick(treeId, treeNode) {
console.log(treeNode.id)
const domId = `left_${treeNode.id}`
function getElementTop(element) {
var el = (typeof element == "string") ? document.getElementById(element) : element;
@@ -520,7 +534,8 @@ export default {
},
handleRightTreeClick(treeId, treeNode) {
const domId = `right_${treeNode.id}`
console.log(treeNode.id)
const domId = `right_${treeNode.id}`
function getElementTop(element) {
var el = (typeof element == "string") ? document.getElementById(element) : element;
if (el.parentNode === null || el.style.display == 'none') {