feat : 需求征集新增/编辑/详情页面初始化

This commit is contained in:
2024-05-10 00:28:40 +08:00
parent bf6a683261
commit 90de57698b
4 changed files with 389 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ const tableConfig = reactive({
label: '状态',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state}/>)
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>)
},
{
prop: 'oper',
@@ -72,17 +72,19 @@ const tableConfig = reactive({
currentRender: ({row, index}) => {
return (
<div>
<el-button type={'primary'} link onClick={()=>{}}>详情</el-button>
<el-button type={'primary'} link onClick={()=>{}}>上报</el-button>
<el-button type="primary" link onClick={() => handleDetail(row)}>详情
</el-button>
<el-button type="primary" link onClick={() => handleEdit(row)}>编辑</el-button>
<el-button type="primary" link onClick={() => handleReport(row)}>上报</el-button>
</div>
)
}
}
],
api: '',
api: '/admin/role',
btns: [
{name: '新增', key: 'add', auth: auths.add, type: 'primary'},
{name: '导出', key: 'add', auth: auths.add, type: 'primary'},
{name: '新增', key: 'add', auth: auths.add, color: '#DED0B2'},
{name: '导出', key: 'add', auth: auths.add, type: ''},
],
params: {}
})
@@ -91,13 +93,40 @@ const search = (val) => {
tableConfig.params = {...val}
tableIns.value.refresh()
}
const handleAdd = () => {
router.push({
path: '/projectdemand/demandadd',
query: {
isAdd: 1
}
})
}
const handleEdit = (row) => {
router.push({
path: '/projectdemand/demandedit',
query: {
id: row.roleId
}
})
}
const handleDetail = (row) => {
router.push({
path: '/projectdemand/demanddetail',
query: {
id: row.roleId
}
})
}
const headBtnClick = (key) => {
switch (key) {
case 'add':
handleAdd()
break;
case 'export':
handleExport()
case 'edit':
handleEdit()
break;
case 'detail':
handleDetail()
break;
}
}