|
|
@@ -1,19 +1,21 @@
|
|
|
<template>
|
|
|
- <div class="full-height full-width flex flex-col">
|
|
|
- <avue-crud ref="crud"
|
|
|
- v-model="form"
|
|
|
- v-model:page="page"
|
|
|
- :before-open="beforeOpen"
|
|
|
- :data="data"
|
|
|
- :option="option"
|
|
|
- :table-loading="loading"
|
|
|
- @row-del="rowDel"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad">
|
|
|
+ <el-card shadow="hover" class="full-height full-width flex flex-col">
|
|
|
+ <avue-crud
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ v-model:page="page"
|
|
|
+ :before-open="beforeOpen"
|
|
|
+ :data="data"
|
|
|
+ :option="option"
|
|
|
+ :table-loading="loading"
|
|
|
+ @row-del="rowDel"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="onLoad"
|
|
|
+ >
|
|
|
</avue-crud>
|
|
|
- </div>
|
|
|
+ </el-card>
|
|
|
</template>
|
|
|
|
|
|
<route>
|
|
|
@@ -24,10 +26,9 @@ name: '回收站',
|
|
|
</route>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
keyWords: '',
|
|
|
loading: false,
|
|
|
@@ -95,12 +96,13 @@ export default {
|
|
|
{
|
|
|
label: '删除人',
|
|
|
prop: 'createUserName'
|
|
|
- }]
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onLoad () {
|
|
|
+ onLoad() {
|
|
|
this.loading = true
|
|
|
this.page.current = this.page.currentPage
|
|
|
this.page.size = this.page.pageSize
|
|
|
@@ -113,15 +115,16 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- beforeOpen (done, type) {
|
|
|
+ beforeOpen(done, type) {
|
|
|
if (type === 'edit') {
|
|
|
this.$confirm('确定恢复所选择的文件?', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$api.recycle.recycleBack({ recycleBinId: this.form.id }).then(res => {
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.recycle
|
|
|
+ .recycleBack({ recycleBinId: this.form.id })
|
|
|
+ .then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
this.onLoad()
|
|
|
@@ -129,39 +132,36 @@ export default {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
- })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- currentChange (currentPage) {
|
|
|
+ currentChange(currentPage) {
|
|
|
this.page.currentPage = currentPage
|
|
|
},
|
|
|
- sizeChange (pageSize) {
|
|
|
+ sizeChange(pageSize) {
|
|
|
this.page.size = pageSize
|
|
|
},
|
|
|
- refreshChange () {
|
|
|
+ refreshChange() {
|
|
|
this.onLoad()
|
|
|
},
|
|
|
- rowDel (row) {
|
|
|
+ rowDel(row) {
|
|
|
this.$confirm('确定彻底删除所选择的文件?', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$api.recycle.recycleRemove({ ids: row.id }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message.success(res.msg)
|
|
|
- this.onLoad()
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.recycle.recycleRemove({ ids: row.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.onLoad()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
})
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
+<style scoped></style>
|