修改bug
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="imports-table-detail">
|
<div class="imports-table-detail">
|
||||||
<a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
<a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="tableSource.length > 0">
|
<div class="page" v-if="tableSource.length > 0">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
{
|
{
|
||||||
serialNumber:'001',
|
serialNumber:'001',
|
||||||
serialName:'条款001',
|
serialName:'条款001',
|
||||||
serialContent:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
serialContent:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
||||||
functionArea:'aaa',
|
functionArea:'aaa',
|
||||||
tecArea:'bbb'
|
tecArea:'bbb'
|
||||||
}
|
}
|
||||||
@@ -194,8 +194,7 @@
|
|||||||
dataIndex: 'serialContent',
|
dataIndex: 'serialContent',
|
||||||
key: 'serialContent',
|
key: 'serialContent',
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 200,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('functionalAreas'),
|
title: this.$t('functionalAreas'),
|
||||||
|
|||||||
@@ -279,9 +279,10 @@
|
|||||||
},
|
},
|
||||||
//跳转详情
|
//跳转详情
|
||||||
onDetail(item) {
|
onDetail(item) {
|
||||||
|
|
||||||
let newUrl = this.$router.resolve({
|
let newUrl = this.$router.resolve({
|
||||||
path: '/docManage/library/detail',
|
path: '/docManage/library/detail',
|
||||||
query: item
|
query: { id:item.documentId }
|
||||||
})
|
})
|
||||||
window.open(newUrl.href, '_blank')
|
window.open(newUrl.href, '_blank')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,10 +46,12 @@
|
|||||||
selectedKeys: [],
|
selectedKeys: [],
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
|
treeData1: [],
|
||||||
treeData: [],
|
treeData: [],
|
||||||
dataList:[],
|
dataList:[],
|
||||||
searchValue:'',
|
searchValue:'',
|
||||||
data:[]
|
data:[],
|
||||||
|
parentItem:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -70,13 +72,15 @@
|
|||||||
//获取数据
|
//获取数据
|
||||||
loadData(){
|
loadData(){
|
||||||
let params = {
|
let params = {
|
||||||
title:this.searchValue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
|
getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
|
||||||
if(res.success){
|
if(res.success){
|
||||||
|
console.log('result',res.result)
|
||||||
this.data=[...res.result]
|
this.data=[...res.result]
|
||||||
this.treeData=[...this.addAttr(this.data)]
|
this.treeData1=[...this.addAttr(this.data)]
|
||||||
|
this.treeData=[...this.treeData1]
|
||||||
// console.log('treeData',this.treeData)
|
// console.log('treeData',this.treeData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -84,6 +88,7 @@
|
|||||||
onSearch(){
|
onSearch(){
|
||||||
// this.treeData=[]
|
// this.treeData=[]
|
||||||
// this.treeData=this.getSearch(this.data)
|
// this.treeData=this.getSearch(this.data)
|
||||||
|
// this.getSearch(this.searchValue,this.treeData1)
|
||||||
},
|
},
|
||||||
//获取用户的订阅
|
//获取用户的订阅
|
||||||
getSubscribtion(){
|
getSubscribtion(){
|
||||||
@@ -111,21 +116,26 @@
|
|||||||
// console.log('dataI',dataI)
|
// console.log('dataI',dataI)
|
||||||
return dataI
|
return dataI
|
||||||
},
|
},
|
||||||
getSearch(dataI){
|
getSearch(key,tree){
|
||||||
let dataSearch=[]
|
let dataSearch=[]
|
||||||
console.log('tree',this.treeData,this.data)
|
let parentKey;
|
||||||
if((Array.isArray(dataI)) && dataI.length>0){
|
for (let i = 0; i < tree.length; i++) {
|
||||||
dataI.forEach((item,index)=>{
|
const node = tree[i];
|
||||||
this.$set(item,'key',item.id)
|
|
||||||
if(item.title.indexOf(this.searchValue)>-1){
|
if (node.children) {
|
||||||
dataSearch.push(item)
|
if (node.children.some(item => item.title.indexOf(key)>-1)) {
|
||||||
|
console.log('titel',node)
|
||||||
|
parentKey = node.key;
|
||||||
|
this.parentItem.push(node)
|
||||||
|
} else if (this.getParentKey(key, node.children)) {
|
||||||
|
parentKey = this.getParentKey(key, node.children);
|
||||||
}
|
}
|
||||||
let arr = [];
|
}
|
||||||
this.addAttr(item.children,arr);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
console.log('dataSearch',dataSearch)
|
console.log('dataSearch',this.parentItem)
|
||||||
return dataSearch
|
return this.parentItem
|
||||||
|
|
||||||
|
// return dataSearch
|
||||||
},
|
},
|
||||||
afterVisibleChange(val) {
|
afterVisibleChange(val) {
|
||||||
// console.log('visible', val);
|
// console.log('visible', val);
|
||||||
|
|||||||
Reference in New Issue
Block a user