fix : 修复页面细节

This commit is contained in:
2024-05-30 16:05:09 +08:00
parent 2ab4eb1a7e
commit 94528cfa06
18 changed files with 412 additions and 301 deletions

View File

@@ -7,7 +7,6 @@
import {reactive, ref, shallowRef} from 'vue';
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {useRouter} from 'vue-router';
const localData = reactive({})
const tableIns = ref()
@@ -16,10 +15,12 @@ const router = useRouter()
const searchConfig = reactive([
{
label: '名称',
label: '需求名称',
prop: 'requirementName',
props: {
placeholder: '请输入'
placeholder: '请输入需求名称',
clearable: true,
checkStrictly: true
},
component: 'el-input',
colProps: {}
@@ -28,42 +29,52 @@ const searchConfig = reactive([
label: '项目类型',
prop: 'projectType',
component: shallowRef(fvSelect),
props: {},
props: {
placeholder: '请选择项目类型',
cacheKey: 'project_type',
clearable: true,
filterable: true,
},
colProps: {}
},
{
label: '研发主体',
prop: 'productMainBody',
component: shallowRef(fvSelect),
props: {},
colProps: {}
},
{
label: '项目影响',
prop: 'projectEffect',
component: shallowRef(fvSelect),
props: {},
colProps: {}
},
{
label: '起止时间',
prop: 'startTime',
component: 'el-date-picker',
props: {},
colProps: {}
},
{
label: '最小金额',
prop: 'minMoney',
component: 'el-input',
colProps: {}
},
{
label: '最大金额',
prop: 'maxMoney',
component: 'el-input',
props: {
placeholder: '请选择研发主体',
cacheKey: 'rd_subject',
clearable: true,
filterable: true
},
colProps: {}
},
// {
// label: '项目影响',
// prop: 'projectEffect',
// component: shallowRef(fvSelect),
// props: {},
// colProps: {}
// },
// {
// label: '起止时间',
// prop: 'startTime',
// component: 'el-date-picker',
// props: {},
// colProps: {}
// },
// {
// label: '最小金额',
// prop: 'minMoney',
// component: 'el-input',
// colProps: {}
// },
// {
// label: '最大金额',
// prop: 'maxMoney',
// component: 'el-input',
// colProps: {}
// },
])
const tableConfig = reactive({
@@ -100,7 +111,10 @@ const tableConfig = reactive({
{
prop: 'startTime',
label: '起止时间',
align: 'center'
align: 'center',
currentRender: ({row}) => {
return row.startTime + ' 至 ' + row.endTime
}
},
{
prop: 'state',
@@ -108,7 +122,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null&&row.state != 0) {
if (row.state !== null && row.state != 0) {
return (<Tag dictType={'demand_summary'} value={row.state}/>)
} else {
return '--'
@@ -127,13 +141,13 @@ const tableConfig = reactive({
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: ['mosr:collect: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: '上报',prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>
@@ -175,26 +189,26 @@ const search = (val) => {
const handleAdd = (row) => {
router.push({
name:'Summary/add',
name: 'Summary/add',
query: {
id:row.requirementId
id: row.requirementId
}
})
}
const handleEdit = (row) => {
router.push({
name:'Summary/edit',
name: 'Summary/edit',
query: {
id:row.requirementId,
projectId:row.projectId
id: row.requirementId,
projectId: row.projectId
}
})
}
const handleDetail = (row) => {
router.push({
name:'Summary/detail',
name: 'Summary/detail',
query: {
id:row.requirementId,
id: row.requirementId,
projectId: row.projectId,
state: row.state
}