修改文档归档

master
夜笙歌 1 year ago
parent 5793a1c1d3
commit 80dcdab5b3

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

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

Loading…
Cancel
Save