|
|
|
@ -10,13 +10,22 @@ new Vue({
|
|
|
|
|
treeId: null,
|
|
|
|
|
tableData: [],
|
|
|
|
|
tableIds: [],
|
|
|
|
|
defaultCheckedKeys:[]
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getTree()
|
|
|
|
|
async mounted() {
|
|
|
|
|
await this.getTree()
|
|
|
|
|
let thisId = location.href?.split('?')?.[1]?.split('=')?.[1]
|
|
|
|
|
if(thisId){
|
|
|
|
|
let thisTreeItem = this.treeData.find(e=>e.id.toString() === thisId)
|
|
|
|
|
this.handleNodeClick(thisTreeItem)
|
|
|
|
|
this.defaultCheckedKeys = [+thisId]
|
|
|
|
|
console.log(this.defaultCheckedKeys)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleNodeClick(data) {
|
|
|
|
|
console.log(data)
|
|
|
|
|
$.post(ctx + 'manage/base_file/fileList', {name: data.value}, (e) => {
|
|
|
|
|
this.tableData = e.data.map((e, i) => {
|
|
|
|
|
return {
|
|
|
|
@ -113,8 +122,8 @@ new Vue({
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getTree() {
|
|
|
|
|
$.get(ctx + 'broad/home/queryCustomer', {}, (e) => {
|
|
|
|
|
async getTree() {
|
|
|
|
|
await $.get(ctx + 'broad/home/queryCustomer', {}, (e) => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.treeData = e.data.map(e => {
|
|
|
|
|
return {
|
|
|
|
|