feat: 初始化需求征集主页面
This commit is contained in:
@@ -1,11 +1,106 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
需求征集
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user