Merge pull request 'dj' (#115) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/115
This commit is contained in:
2024-05-09 10:11:32 +00:00

View File

@@ -1,13 +1,108 @@
<template>
<div>
需求征集
</div>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
</template>
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import Tag from '@/components/Tag.vue'
const router = useRouter()
const searchConfig = reactive([
{
label: '名称',
prop: 'roleName',
component: 'el-input',
props: {
placeholder: '请输入名称查询',
clearable: true
}
},
{
label: '状态',
prop: 'state',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择',
clearable: true,
cacheKey: 'normal_disable'
}
}
])
const tableIns = ref()
const auths = {
edit: ['admin:role:edit'],
add: ['admin:role:add'],
export: ['admin:role:export'],
}
const tableConfig = reactive({
columns: [
{
type: 'selection',
prop: 'selection'
},
{
prop: 'roleName',
label: '名称',
align: 'center'
},
{
prop: 'roleKey',
label: '所属公司',
align: 'center'
},
{
prop: 'time',
label: '发布时间',
align: 'center'
},
{
prop: 'state',
label: '状态',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state}/>)
},
{
prop: 'oper',
label: '操作',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
return (
<div>
<el-button type={'primary'} link onClick={()=>{}}>详情</el-button>
<el-button type={'primary'} link onClick={()=>{}}>上报</el-button>
</div>
)
}
}
],
api: '',
btns: [
{name: '新增', key: 'add', auth: auths.add, type: 'primary'},
{name: '导出', key: 'add', auth: auths.add, type: 'primary'},
],
params: {}
})
const search = (val) => {
tableConfig.params = {...val}
tableIns.value.refresh()
}
const headBtnClick = (key) => {
switch (key) {
case 'add':
handleAdd()
break;
case 'export':
handleExport()
break;
}
}
</script>
<style lang="scss" scoped>
</style>
</style>