Merge pull request 'fix : 修复页面细节' (#203) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/203
This commit is contained in:
2024-05-19 03:26:53 +00:00
2 changed files with 33 additions and 289 deletions

View File

@@ -10,7 +10,7 @@
<el-form-item label="其他文件">
<el-card style="width: 100%">
<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">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>

View File

@@ -1,4 +1,5 @@
<template>
<div class="detail-block">
<baseTitle title="需求上报"></baseTitle>
<el-form :model="formData" ref="summaryForm" :rules="rules">
<el-row gutter="50">
@@ -205,17 +206,18 @@
</el-col>
</el-row>
</el-form>
<AttachmentUpload label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true"/>
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
<div class="oper-page-btn">
<el-button type="primary" @click="staging">存为草稿</el-button>
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
</div>
</div>
</template>
<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 {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js'
@@ -226,6 +228,8 @@ const router = useRouter()
const tagsViewStore = useTagsView()
const summaryForm = ref()
const deploymentId = ref()
const showTable = ref(true)
const otherFileList = ref([])
const formData = ref({
specialFund:null
})
@@ -254,291 +258,20 @@ const rules = reactive({
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}],
})
const schame = computed(() => {
return [
{
label: '名称',
prop: 'projectName',
component: 'el-input',
props: {},
colProps: {
span: 12
}
},
{
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 getAttachment = (val) => {
console.log('上传文件getAttachment', val)
let fileObj = compositeParam(val)
// fileList.value.push(fileObj)
}
const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val)
showTable.value = false
let fileObj = compositeParam(val)
otherFileList.value.push(fileObj)
nextTick(() => {
showTable.value = true
})
}
const handleSubmit = async (instance) => {
if (!instance) return
instance.validate(async (valid, fields) => {
@@ -578,3 +311,14 @@ init()
const staging = async () => {
}
</script>
<style lang="scss" scoped>
.detail-block {
overflow: hidden;
padding-bottom: 30px;
}
:deep(.el-table--fit){
height: auto!important;
}
</style>