feat : 需求征集index.vue

This commit is contained in:
clay
2024-05-23 15:53:33 +08:00
parent 17207b2c87
commit db8a96a664

View File

@@ -63,7 +63,7 @@ const tableConfig = reactive({
label: '所属公司', label: '所属公司',
align: 'center', align: 'center',
currentRender: ({row, index}) => ( currentRender: ({row, index}) => (
<div style={{width: '300px',textOverflow: 'ellipsis'}}>{row.companyName}</div>) <div style={{width: '300px', textOverflow: 'ellipsis'}}>{row.companyName}</div>)
}, },
{ {
prop: 'approveName', prop: 'approveName',
@@ -95,15 +95,18 @@ const tableConfig = reactive({
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
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: '详情', func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
} }
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
}
if (buttons.has("delete")) {
btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
} }
if (buttons.has("report")) { if (buttons.has("report")) {
btn.push({label: '需求上报', func: () => handleEdit(row), type: 'primary'}) btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
} }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
@@ -111,7 +114,7 @@ const tableConfig = reactive({
btn.map(item => ( btn.map(item => (
<el-button <el-button
type={item.type} type={item.type}
// v-perm={item.auth} v-perm={item.prem}
onClick={() => item.func()} onClick={() => item.func()}
link link
> >
@@ -137,7 +140,7 @@ const tableConfig = reactive({
params: {} params: {}
}) })
console.log('userInfo',userInfo.value.userName) console.log('userInfo', userInfo.value.userName)
const search = (val) => { const search = (val) => {
tableConfig.params = {...val} tableConfig.params = {...val}