Merge pull request 'dj' (#239) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/239
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -11,7 +15,7 @@ const router = useRouter()
|
|||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '专项资金名称',
|
label: '专项资金名称',
|
||||||
prop: 'requirementName',
|
prop: 'name',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询'
|
placeholder: '请输入名称查询'
|
||||||
@@ -67,10 +71,10 @@ const tableConfig = reactive({
|
|||||||
let btn = []
|
let btn = []
|
||||||
// let buttons = new Set(Array.from(row.buttons))
|
// let buttons = new Set(Array.from(row.buttons))
|
||||||
// if (buttons.has("details")) {
|
// if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
// }
|
// }
|
||||||
// if (buttons.has("edit")) {
|
// if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑',prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
// }
|
// }
|
||||||
// if (buttons.has("delete")) {
|
// if (buttons.has("delete")) {
|
||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||||
@@ -101,25 +105,30 @@ const tableConfig = reactive({
|
|||||||
{name: '导出', key: '_export', color: '#DED0B2', auth: ''},
|
{name: '导出', key: '_export', color: '#DED0B2', auth: ''},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
const tableIns = ref()
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Fund/detail',
|
name: 'Fund/detail',
|
||||||
query: {
|
query: {
|
||||||
id:row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Fund/add',
|
name: 'Fund/add',
|
||||||
query: {}
|
query: {}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Fund/edit',
|
name: 'Fund/edit',
|
||||||
query: {
|
query: {
|
||||||
id:row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user