修改bug
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<div class="page" v-if="tableSource.length > 0">
|
||||
<a-pagination
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
{
|
||||
serialNumber:'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',
|
||||
tecArea:'bbb'
|
||||
}
|
||||
@@ -194,8 +194,7 @@
|
||||
dataIndex: 'serialContent',
|
||||
key: 'serialContent',
|
||||
align: "center",
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('functionalAreas'),
|
||||
|
||||
@@ -279,9 +279,10 @@
|
||||
},
|
||||
//跳转详情
|
||||
onDetail(item) {
|
||||
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/docManage/library/detail',
|
||||
query: item
|
||||
query: { id:item.documentId }
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
|
||||
@@ -46,10 +46,12 @@
|
||||
selectedKeys: [],
|
||||
expandedKeys: [],
|
||||
autoExpandParent: true,
|
||||
treeData1: [],
|
||||
treeData: [],
|
||||
dataList:[],
|
||||
searchValue:'',
|
||||
data:[]
|
||||
data:[],
|
||||
parentItem:[]
|
||||
}
|
||||
},
|
||||
props:{
|
||||
@@ -70,13 +72,15 @@
|
||||
//获取数据
|
||||
loadData(){
|
||||
let params = {
|
||||
title:this.searchValue
|
||||
|
||||
}
|
||||
|
||||
getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
|
||||
if(res.success){
|
||||
console.log('result',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)
|
||||
}
|
||||
})
|
||||
@@ -84,6 +88,7 @@
|
||||
onSearch(){
|
||||
// this.treeData=[]
|
||||
// this.treeData=this.getSearch(this.data)
|
||||
// this.getSearch(this.searchValue,this.treeData1)
|
||||
},
|
||||
//获取用户的订阅
|
||||
getSubscribtion(){
|
||||
@@ -111,21 +116,26 @@
|
||||
// console.log('dataI',dataI)
|
||||
return dataI
|
||||
},
|
||||
getSearch(dataI){
|
||||
getSearch(key,tree){
|
||||
let dataSearch=[]
|
||||
console.log('tree',this.treeData,this.data)
|
||||
if((Array.isArray(dataI)) && dataI.length>0){
|
||||
dataI.forEach((item,index)=>{
|
||||
this.$set(item,'key',item.id)
|
||||
if(item.title.indexOf(this.searchValue)>-1){
|
||||
dataSearch.push(item)
|
||||
let parentKey;
|
||||
for (let i = 0; i < tree.length; i++) {
|
||||
const node = tree[i];
|
||||
|
||||
if (node.children) {
|
||||
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)
|
||||
return dataSearch
|
||||
console.log('dataSearch',this.parentItem)
|
||||
return this.parentItem
|
||||
|
||||
// return dataSearch
|
||||
},
|
||||
afterVisibleChange(val) {
|
||||
// console.log('visible', val);
|
||||
|
||||
Reference in New Issue
Block a user