|
|
|
@ -9,14 +9,23 @@ new Vue({
|
|
|
|
|
},
|
|
|
|
|
treeId: null,
|
|
|
|
|
tableData: [],
|
|
|
|
|
tableIds:[],
|
|
|
|
|
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 {
|
|
|
|
@ -25,7 +34,7 @@ new Vue({
|
|
|
|
|
name: e.fileName,
|
|
|
|
|
date: e.createTime,
|
|
|
|
|
people: e.customName,
|
|
|
|
|
objid:e.objid
|
|
|
|
|
objid: e.objid
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
@ -53,7 +62,7 @@ new Vue({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '删除成功!',
|
|
|
|
|
});
|
|
|
|
|
this.handleNodeClick({value:this.treeName})
|
|
|
|
|
this.handleNodeClick({value: this.treeName})
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
@ -63,7 +72,7 @@ new Vue({
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
this.tableIds = val.map(e=>e.objid).toString()
|
|
|
|
|
this.tableIds = val.map(e => e.objid).toString()
|
|
|
|
|
console.log(this.tableIds);
|
|
|
|
|
},
|
|
|
|
|
addTree() {
|
|
|
|
@ -103,7 +112,7 @@ new Vue({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '删除成功!',
|
|
|
|
|
});
|
|
|
|
|
this.handleNodeClick({value:this.treeName})
|
|
|
|
|
this.handleNodeClick({value: this.treeName})
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
@ -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 {
|
|
|
|
|