fix : 修复页面细节

This commit is contained in:
2024-05-19 11:26:32 +08:00
parent c498a3de62
commit 726c746a87
2 changed files with 33 additions and 289 deletions

View File

@@ -10,7 +10,7 @@
<el-form-item label="其他文件"> <el-form-item label="其他文件">
<el-card style="width: 100%"> <el-card style="width: 100%">
<file-upload @getFile="getOtherFile" :showFileList="false"/> <file-upload @getFile="getOtherFile" :showFileList="false"/>
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
:data="otherFileList" :isSettingCol="false" :pagination="false"> :data="otherFileList" :isSettingCol="false" :pagination="false">
<template #empty> <template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/> <el-empty :image-size="90" description="暂无数据" style="padding: 0"/>

View File

@@ -1,4 +1,5 @@
<template> <template>
<div class="detail-block">
<baseTitle title="需求上报"></baseTitle> <baseTitle title="需求上报"></baseTitle>
<el-form :model="formData" ref="summaryForm" :rules="rules"> <el-form :model="formData" ref="summaryForm" :rules="rules">
<el-row gutter="50"> <el-row gutter="50">
@@ -205,17 +206,18 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<AttachmentUpload label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true"/>
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>--> <!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button type="primary" @click="staging">存为草稿</el-button> <el-button type="primary" @click="staging">存为草稿</el-button>
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button> <el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
</div> </div>
</div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {markRaw} from 'vue';
import FileUpload from './components/FileUpload.vue';
import {getProcessInfo, requirementReported} from "./api"; import {getProcessInfo, requirementReported} from "./api";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
@@ -226,6 +228,8 @@ const router = useRouter()
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const summaryForm = ref() const summaryForm = ref()
const deploymentId = ref() const deploymentId = ref()
const showTable = ref(true)
const otherFileList = ref([])
const formData = ref({ const formData = ref({
specialFund:null specialFund:null
}) })
@@ -254,291 +258,20 @@ const rules = reactive({
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}], serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}], contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}],
}) })
const schame = computed(() => { const getAttachment = (val) => {
return [ console.log('上传文件getAttachment', val)
{ let fileObj = compositeParam(val)
label: '名称', // fileList.value.push(fileObj)
prop: 'projectName', }
component: 'el-input', const getOtherFile = (val) => {
props: {}, console.log('上传文件getOtherFile', val)
colProps: { showTable.value = false
span: 12 let fileObj = compositeParam(val)
} otherFileList.value.push(fileObj)
}, nextTick(() => {
{ showTable.value = true
label: '专项资金', })
prop: 'specialFund', }
component: markRaw(fvSelect),
props: {
placeholder: '请选择专项资金',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '开始时间',
prop: 'startTime',
component: 'el-date-picker',
props: {
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss'
},
colProps: {
span: 12
}
},
{
label: '所属公司',
prop: 'companyName',
component: 'el-input',
props: {},
colProps: {
span: 12
}
},
{
label: '项目类型',
prop: 'projectType',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '结束时间',
prop: 'endTime',
component: 'el-date-picker',
props: {
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss'
},
colProps: {
span: 12
}
},
{
label: '出资类型',
prop: 'investmentType',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '项目影响',
prop: 'projectImpact',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '所属业务板块',
prop: 'businessSegment',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '预期成果形式',
prop: 'resultForm',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '预期技术标准制定',
prop: 'technicalStandard',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '产学研联合',
prop: 'industryUniversityResearch',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '开展政府申报',
prop: 'governmentDeclaration',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '知识产权状况',
prop: 'intellectualProperty',
component: markRaw(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
},
colProps: {
span: 12
}
},
{
label: '发明专利',
prop: 'inventionPatent',
component: 'el-input',
props: {},
colProps: {
span: 6
}
},
{
label: '实用性新型专利',
prop: 'newPatent',
component: 'el-input',
props: {},
colProps: {
span: 6
}
},
{
label: '软件著作权',
prop: 'softwareCopyright',
component: 'el-input',
props: {},
colProps: {
span: 6
}
},
{
label: '著作权',
prop: 'copyright',
component: 'el-input',
props: {},
colProps: {
span: 6
}
},
{
label: '其他',
prop: 'other',
component: 'el-input',
props: {},
colProps: {
span: 6
}
}, {
label: '经济概算',
prop: 'economicEstimate',
component: 'el-input',
props: {},
colProps: {
span: 6
}
}, {
label: '申请公司总部科技创新专项资金',
prop: 'specialFundAmount',
component: 'el-input',
props: {},
colProps: {
span: 6
}
},
{
label: '现有业务描述',
prop: 'serviceDescription',
component: 'el-input',
props: {
type: 'textarea'
},
colProps: {
span: 24
}
},
{
label: '研发项目关键内容描述',
prop: 'contentDescription',
component: 'el-input',
props: {
type: 'textarea'
},
colProps: {
span: 24
}
}
// {
// label: '',
// prop: 'fileList',
// component: markRaw(FileUpload),
// props: {
// url: '',
// tip: '上传txt文件'
// },
// colProps: {
// span: 24
// }
// }
]
})
const handleSubmit = async (instance) => { const handleSubmit = async (instance) => {
if (!instance) return if (!instance) return
instance.validate(async (valid, fields) => { instance.validate(async (valid, fields) => {
@@ -578,3 +311,14 @@ init()
const staging = async () => { const staging = async () => {
} }
</script> </script>
<style lang="scss" scoped>
.detail-block {
overflow: hidden;
padding-bottom: 30px;
}
:deep(.el-table--fit){
height: auto!important;
}
</style>