feat : 表单权限处理

This commit is contained in:
clay
2024-06-01 22:18:57 +08:00
parent dd5d24768b
commit 495e39c802
4 changed files with 110 additions and 14 deletions

View File

@@ -96,17 +96,41 @@ const tableConfig = reactive({
{
prop: 'projectType',
label: '项目类型',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
}
}
},
{
prop: 'rdSubject',
label: '研发主体',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
}
}
},
{
prop: 'projectImpact',
label: '项目影响',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
}
}
},
{
prop: 'startTime',

View File

@@ -153,17 +153,41 @@ const tableConfig = reactive({
{
prop: 'projectType',
label: '项目类型',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
}
}
},
{
prop: 'rdSubject',
label: '研发主体',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
}
}
},
{
prop: 'projectImpact',
label: '项目影响',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
}
}
},
{
prop: 'economicEstimate',

View File

@@ -158,17 +158,41 @@ const tableConfig = reactive({
{
prop: 'projectType',
label: '项目类型',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
}
}
},
{
prop: 'rdSubject',
label: '研发主体',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
}
}
},
{
prop: 'projectImpact',
label: '项目影响',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
}
}
},
{
prop: 'economicEstimate',

View File

@@ -152,17 +152,41 @@ const tableConfig = reactive({
{
prop: 'projectType',
label: '项目类型',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
}
}
},
{
prop: 'rdSubject',
label: '研发主体',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
}
}
},
{
prop: 'projectImpact',
label: '项目影响',
align: 'center'
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
}
}
},
{
prop: 'economicEstimate',
@@ -187,7 +211,7 @@ const tableConfig = reactive({
label: '状态',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) =>{
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_initiation'} value={row.state}/>)
} else {
@@ -207,7 +231,7 @@ const tableConfig = reactive({
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], 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: () => handleDelete(row), type: 'primary'})