|
|
|
@ -2,50 +2,32 @@ new Vue({
|
|
|
|
|
el: '#app',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
treeData: [
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
label: '一级 1',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: '二级 1-1',
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '一级 2',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: '二级 2-1'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '一级 3',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: '二级 3-1',
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
treeData: [],
|
|
|
|
|
defaultProps: {
|
|
|
|
|
children: 'children',
|
|
|
|
|
label: 'label'
|
|
|
|
|
},
|
|
|
|
|
tableData: [1, 2, 3, 4, 5, 6, 7].map((e, i) => {
|
|
|
|
|
return {
|
|
|
|
|
no: i,
|
|
|
|
|
name: `名称${i}`,
|
|
|
|
|
date: '' + new Date(1),
|
|
|
|
|
people: '张三'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
treeId: null,
|
|
|
|
|
tableData: []
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getTree()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleNodeClick(data) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
$.post(ctx + 'manage/base_file/fileList', {name: data.value}, (e) => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.tableData = e.data.map((e, i) => {
|
|
|
|
|
return {
|
|
|
|
|
no: i,
|
|
|
|
|
name: e.fileName,
|
|
|
|
|
date: e.createTime,
|
|
|
|
|
people: e.customName,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.treeId = data.id
|
|
|
|
|
},
|
|
|
|
|
handleEdit(index, row) {
|
|
|
|
|
console.log(index, row);
|
|
|
|
@ -56,17 +38,47 @@ new Vue({
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
},
|
|
|
|
|
addTree(){
|
|
|
|
|
|
|
|
|
|
addTree() {
|
|
|
|
|
$.modal.open('设备智能驾驶舱', ctx + 'manage/base_customer/add');
|
|
|
|
|
},
|
|
|
|
|
delTree(){
|
|
|
|
|
|
|
|
|
|
delTree() {
|
|
|
|
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
$.post(ctx + 'manage/base_customer/remove', {ids: this.treeId}, (e) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '删除成功!',
|
|
|
|
|
});
|
|
|
|
|
this.getTree()
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消删除'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addTable(){
|
|
|
|
|
|
|
|
|
|
addTable() {
|
|
|
|
|
$.modal.open('设备智能驾驶舱', ctx + 'manage/base_file/add');
|
|
|
|
|
},
|
|
|
|
|
delTable(){
|
|
|
|
|
delTable(e) {
|
|
|
|
|
console.log(1)
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getTree() {
|
|
|
|
|
$.get(ctx + 'broad/home/queryCustomer', {}, (e) => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.treeData = e.data.map(e => {
|
|
|
|
|
return {
|
|
|
|
|
label: e.customerName,
|
|
|
|
|
value: e.customerName,
|
|
|
|
|
id: e.objid
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|