feat : 需求征集index.vue
This commit is contained in:
@@ -63,7 +63,7 @@ const tableConfig = reactive({
|
||||
label: '所属公司',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (
|
||||
<div style={{width: '300px',textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
||||
<div style={{width: '300px', textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
@@ -95,15 +95,18 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")){
|
||||
btn.push({label: '详情', func: () => handleDetail(row), type: 'primary'})
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
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")) {
|
||||
btn.push({label: '需求上报', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -111,7 +114,7 @@ const tableConfig = reactive({
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -137,7 +140,7 @@ const tableConfig = reactive({
|
||||
params: {}
|
||||
})
|
||||
|
||||
console.log('userInfo',userInfo.value.userName)
|
||||
console.log('userInfo', userInfo.value.userName)
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
|
||||
Reference in New Issue
Block a user