Files
laws_weilai/jero-web/src/views/documentManage/library/index.vue
T
2022-02-18 18:02:11 +08:00

157 lines
4.0 KiB
Java

<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<search :flag="'1'" :url="url"/>
</div>
<div class="table-operator">
<a-button @click="handleExport()" type="primary">数据导出</a-button>
<a-button @click="handleFileExport()" type="primary">带文件导出</a-button>
<a-button @click="handleAdd()" type="primary">{{$t('add')}}</a-button>
<a-button @click="handleModule()" type="primary">模板下载</a-button>
<a-button @click="handleModule()" type="primary">导入</a-button>
<a-button @click="handleDel()" type="primary">批量删除</a-button>
<a-button @click="handleCompare()" type="primary" icon="plus">推送</a-button>
</div>
<div>
<tableData
:flag="'1'"
:OperationList="OperationList"
@editTable="editTable"
@deleteTable="deleteTable"
:url="url"
showAction
@Collection="Collection"
@subscribe="subscribe"
/>
</div>
<addForm
ref="addFormRef"
:url="url"
:flag="'1'"
/>
<frameAssembly
:url="url"
ref="frameAssemblyRef"
/>
</a-card>
</template>
<script>
import search from '@/components/search/index'
import tableData from '@/components/tableDate/index'
import addForm from './modules/addForm'
import frameAssembly from '@/components/frameAssembly/index'
import { getAction, postAction, deleteAction } from '@/api/manage'
import eventBUs from '../../../common/event'
export default {
name: 'docLibrary',
components: {
search,
addForm,
tableData,
frameAssembly
},
data() {
return {
OperationList: [
{
text: '收藏',
ClickEvent: 'Collection'
},
{
text: '订阅',
ClickEvent: 'subscribe'
},
{
text: '编辑',
ClickEvent: 'editTable'
},
{
text: '删除',
ClickEvent: 'deleteTable'
}
],
selectedRowKeys: [],
loading: false,
url: {
tableHeader: 'document/bussDocumentLibraryEO/getHeader', //表格头部字段
seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段
tableList: 'document/bussDocumentLibraryEO/queryPageInfo', //表格数据
getAddForm: 'document/bussDocumentLibraryEO/getAddForm', // 表单的字段
addInfo: 'document/bussDocumentLibraryEO/addInfo', //新增
updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑
getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除
}
}
},
mounted() {
},
methods: {
onSelectChange() {
},
handleExport() {
},
handleFileExport() {
},
handleAdd() {
this.$refs.addFormRef.add()
},
handleModule() {
},
handleDel() {
},
handleCompare() {
this.$nextTick(() => {
this.$refs.frameAssemblyRef.visible = true
})
// this.$refs.addFormRef.add()
},
handleFileImport() {
},
//编辑按钮
editTable(val) {
this.$refs.addFormRef.edit(val)
},
//删除按钮
deleteTable(val) {
let _this = this
this.$confirm({
content: '确认删除?',
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(res.message)
eventBUs.$emit('searchReset')
} else {
this.$message.warning(res.message)
}
})
}
})
},
//收藏按钮
Collection(val) {
console.log('val111', val)
},
//订阅按钮
subscribe(val) {
console.log('val222', val)
}
}
}
</script>
<style scoped>
</style>