Merge remote-tracking branch 'origin/master'

master
wangh 1 year ago
commit 973f917cf2

@ -8,7 +8,8 @@ new Vue({
label: 'label'
},
treeId: null,
tableData: []
tableData: [],
tableIds:[],
};
},
mounted() {
@ -17,32 +18,51 @@ new Vue({
methods: {
handleNodeClick(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,
objid:e.objid
}
})
})
this.treeId = data.id
this.treeName = data.value
},
handleEdit(index, row) {
console.log(index, row);
},
handleDelete(index, row) {
console.log(index, row);
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post(ctx + 'manage/base_file/remove', {ids: row.objid}, (e) => {
this.$message({
type: 'success',
message: '删除成功!',
});
this.handleNodeClick({value:this.treeName})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
handleSelectionChange(val) {
console.log(val);
this.tableIds = val.map(e=>e.objid).toString()
console.log(this.tableIds);
},
addTree() {
$.modal.open('设备智能驾驶舱', ctx + 'manage/base_customer/add');
},
delTree() {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
this.$confirm('此操作将永久删除该账户, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -64,8 +84,25 @@ new Vue({
addTable() {
$.modal.open('设备智能驾驶舱', ctx + 'manage/base_file/add');
},
delTable(e) {
console.log(1)
delTable() {
this.$confirm('此操作将永久删除选中的文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post(ctx + 'manage/base_file/remove', {ids: this.tableIds}, (e) => {
this.$message({
type: 'success',
message: '删除成功!',
});
this.handleNodeClick({value:this.treeName})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
getTree() {

@ -86,10 +86,10 @@
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button
@click="handleEdit(scope.$index, scope.row)"
size="mini">编辑
</el-button>
<!-- <el-button-->
<!-- @click="handleEdit(scope.$index, scope.row)"-->
<!-- size="mini">编辑-->
<!-- </el-button>-->
<el-button
@click="handleDelete(scope.$index, scope.row)"
size="mini"

Loading…
Cancel
Save