Commit b8559d09 by 李长胜

修改横向问题

1 parent 0469d166
...@@ -177,7 +177,6 @@ ...@@ -177,7 +177,6 @@
</span> </span>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<div class="merchant-right"> <div class="merchant-right">
<div> <div>
...@@ -229,7 +228,7 @@ export default { ...@@ -229,7 +228,7 @@ export default {
firstPageObj: {}, firstPageObj: {},
powerDataArray: [], powerDataArray: [],
merchantProTreeResponsesArray:[], merchantProTreeResponsesArray: [],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -325,28 +324,31 @@ export default { ...@@ -325,28 +324,31 @@ export default {
} }
// let newTreeList=this.powerDataArray[this.currentIndex].products[this.subCurrentIndex].merchantProTreeResponses // let newTreeList=this.powerDataArray[this.currentIndex].products[this.subCurrentIndex].merchantProTreeResponses
return this.powerDataArray[this.currentIndex].products[this.subCurrentIndex].merchantProTreeResponses return this.powerDataArray[this.currentIndex].products[this.subCurrentIndex].merchantProTreeResponses
} }
}, },
// watch: { watch: {
// treeInputName(val) { merchantProTreeResponses: {
// this.$refs.tree.filter(val) // immediate: true,
// } handler(val) {
// }, this.handlerTreeDom()
},
deep: true
}
},
methods: { methods: {
// 处理树横向 // 处理树横向
renderContent(h, { node, data }) { renderContent(h, { node, data }) {
let className = '' let className = ''
if (data.perms&&data.count>this.maxval) { if (data.perms && data.count > this.maxval) {
className = 'especially' className = 'especially'
} }
return <div class={className}>{data.label}</div> return <div class={className}>{data.label}</div>
}, },
//将后台返回数据中数值为空的字段全部替换为“-” //将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData(initialData) { formateNullFieldData(initialData) {
const isEmpty = function(val) { const isEmpty = function (val) {
if (!String(val) || String(val) === 'null') { if (!String(val) || String(val) === 'null') {
return '-' return '-'
} }
...@@ -354,7 +356,7 @@ export default { ...@@ -354,7 +356,7 @@ export default {
} }
var that = this var that = this
if (initialData instanceof Array) { if (initialData instanceof Array) {
initialData.forEach(function(val, key, array) { initialData.forEach(function (val, key, array) {
array[key] = that.formateNullFieldData(val) array[key] = that.formateNullFieldData(val)
}) })
} else if (initialData instanceof Object) { } else if (initialData instanceof Object) {
...@@ -449,15 +451,15 @@ export default { ...@@ -449,15 +451,15 @@ export default {
}) })
) )
this.merchantProTreeResponsesArray = this.toContiuneTree(this.merchantProTreeResponsesArray, 0, maxval) this.merchantProTreeResponsesArray = this.toContiuneTree(this.merchantProTreeResponsesArray, 0, maxval)
console.log(this.merchantProTreeResponsesArray); console.log(this.merchantProTreeResponsesArray)
this.maxval = maxval-1 this.maxval = maxval - 1
this.$nextTick(() => { this.$nextTick(() => {
this.changeTreeClass(maxval) this.changeTreeClass(maxval)
}) })
}, },
// 改变tree节点样式 // 改变tree节点样式
changeTreeClass(maxval) { changeTreeClass(maxval) {
let piefix = (maxval-1)*20 let piefix = (maxval - 1) * 20
var classDomList = document.getElementsByClassName('especially') var classDomList = document.getElementsByClassName('especially')
for (var i = 0; i < classDomList.length; i++) { for (var i = 0; i < classDomList.length; i++) {
classDomList[i].parentNode.style.cssText = 'float:left' classDomList[i].parentNode.style.cssText = 'float:left'
...@@ -505,7 +507,7 @@ export default { ...@@ -505,7 +507,7 @@ export default {
this.subMerchantTableTotal = res.length this.subMerchantTableTotal = res.length
} }
// total > 50?calc(100vh - '199px'): calc(100vh - '152px') // total > 50?calc(100vh - '199px'): calc(100vh - '152px')
this.$refs.subMerchantTable.tableHeightValues=`calc(100vh - 300px)` this.$refs.subMerchantTable.tableHeightValues = `calc(100vh - 300px)`
// if (res && res.length == 0) { // if (res && res.length == 0) {
// this.$refs.subMerchantTable.setTableHeightFun() // this.$refs.subMerchantTable.setTableHeightFun()
// } // }
...@@ -641,8 +643,8 @@ export default { ...@@ -641,8 +643,8 @@ export default {
// line-height: 20px; // line-height: 20px;
display: inline-block; display: inline-block;
width: calc(100% - 200px); width: calc(100% - 200px);
word-wrap:break-word; word-wrap: break-word;
line-height:initial; line-height: initial;
} }
.account-type-span { .account-type-span {
display: inline-block; display: inline-block;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!