fix : 修复项目基本信息展示
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</el-row>
|
||||
<baseTitle v-if="type!='phase'" :title="getTagName(type)+'信息'" ></baseTitle>
|
||||
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e" ></fvForm>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<file-component
|
||||
:title="getTagName(type)+'附件'"
|
||||
@@ -429,13 +429,14 @@ const schema = computed(() => {
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth:'left',
|
||||
labelWidth: 'left',
|
||||
component: () => {
|
||||
let singleFileArray = [props.formData.singleFile]
|
||||
return <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
tableConfig={editSingleTableConfig}
|
||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
</fvTable>
|
||||
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
tableConfig={editSingleTableConfig}
|
||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
</fvTable>
|
||||
: <span>--</span>
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"></fvForm>
|
||||
<div class="steps-box">
|
||||
<el-steps :active="localActive" finish-status="success">
|
||||
<el-step
|
||||
@@ -30,10 +30,11 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElLoading, ElNotification} from 'element-plus';
|
||||
import {computed, reactive, ref, watchEffect} from 'vue';
|
||||
import {useRoute} from 'vue-router';
|
||||
import {getBaseInfoApi} from './api';
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const props = defineProps({
|
||||
// 步骤对应内容list
|
||||
stepList: {
|
||||
@@ -93,9 +94,17 @@ const localSteps = ref([
|
||||
])
|
||||
|
||||
const baseForm = ref()
|
||||
const baseFormData = ref([])
|
||||
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
@@ -103,23 +112,189 @@ const schema = computed(() => {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '征集公司',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集描述',
|
||||
prop: 'collectExplain',
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
// {
|
||||
// label: '是否专项资金项目',
|
||||
// prop: 'isSpecialFund',
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// }
|
||||
// },
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '申请总部专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
@@ -273,7 +448,31 @@ const handleStep = (key, index) => {
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
const getBaseInfo = async () => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
@@ -290,6 +489,7 @@ const getBaseInfo = async () => {
|
||||
}
|
||||
localStepSuccess.value = formatProcedure(data.procedure)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
emits('setDetail', formatActive(localActive.value))
|
||||
loading.close()
|
||||
} catch {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="detail-block" v-loading="loading">
|
||||
<baseTitle title="需求上报信息" style="margin-top: -15px"></baseTitle>
|
||||
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
||||
<el-row gutter="50">
|
||||
<el-row gutter="20" style="margin-bottom: -18px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<span>{{ localFormData.projectName }}</span>
|
||||
@@ -129,7 +129,7 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row gutter="14" >
|
||||
<el-row gutter="20" style="margin-bottom: -18px">
|
||||
<el-col :span="24">
|
||||
<baseTitle title="项目描述"></baseTitle>
|
||||
</el-col>
|
||||
|
||||
Reference in New Issue
Block a user