fix : 修复页面
This commit is contained in:
@@ -26,7 +26,20 @@
|
||||
<el-date-picker
|
||||
v-model="formData.startTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
placeholder="开始时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
type="datetime"
|
||||
placeholder="结束时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -35,7 +48,14 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="affiliatedCompanyId">
|
||||
<el-input v-model="formData.affiliatedCompanyId" placeholder="请输入所属公司" clearable></el-input>
|
||||
<el-select v-model="formData.affiliatedCompanyId" placeholder="请选择所属公司" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in companyOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -55,19 +75,7 @@
|
||||
<el-input v-model="formData.rdSubject" placeholder="请输入研发主体" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable>
|
||||
@@ -196,7 +204,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||
<el-input v-model="formData.specialFundAmount" clearable :disabled="formData.specialFund===null"></el-input>
|
||||
<el-input v-model="formData.specialFundAmount" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@@ -227,10 +235,12 @@ import {getProcessInfo, requirementReported} from "./api";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getSubCompOpt} from "../../../api/user/user";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const router = useRouter()
|
||||
const tagsViewStore = useTagsView()
|
||||
const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const attachment = ref()
|
||||
const deploymentId = ref()
|
||||
@@ -244,7 +254,8 @@ const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||
companyName: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||
affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||
@@ -261,14 +272,14 @@ const rules = reactive({
|
||||
copyright: [{required: true, message: '请输入著作权', trigger: 'blur'}],
|
||||
other: [{required: true, message: '请输入其他', trigger: 'blur'}],
|
||||
economicEstimate: [{required: true, message: '请输入经济概算', trigger: 'blur'}],
|
||||
// specialFundAmount: [{required: true, message: '请输入专项资金', trigger: 'blur'}],
|
||||
specialFundAmount: [{required: true, message: '请输入专项资金', trigger: 'blur'}],
|
||||
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
|
||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
||||
})
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Summary/add') {
|
||||
tag = '需求汇总'
|
||||
tag = '需求上报'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -302,14 +313,48 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if(fileList.value.length===0){
|
||||
attachment.value.validate()
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let params = {
|
||||
"specialFund": "2",
|
||||
"projectName": "3",
|
||||
"startTime": "2024-05-24 00:00:00",
|
||||
"endTime": "2024-05-29 00:00:00",
|
||||
"projectType": "3",
|
||||
"investmentType": "3",
|
||||
"businessSegment": "2",
|
||||
"technicalStandard": "2",
|
||||
"governmentDeclaration": "2",
|
||||
"inventionPatent": "3",
|
||||
"newPatent": "3",
|
||||
"economicEstimate": "3",
|
||||
"other": "3",
|
||||
"copyright": "3",
|
||||
"softwareCopyright": "3",
|
||||
"industryUniversityResearch": "2",
|
||||
"intellectualProperty": "00",
|
||||
"resultForm": "3",
|
||||
"projectImpact": "3",
|
||||
"rdSubject": "3",
|
||||
"affiliatedCompanyId": 93,
|
||||
"serviceDescription": "3",
|
||||
"contentDescription": "3",
|
||||
"specialFundAmount": "3",
|
||||
"deploymentId": "e75b2040-15b4-11ef-8cdf-f268fc747b04",
|
||||
"files": [
|
||||
{
|
||||
"fileId": 207,
|
||||
"type": 1
|
||||
},
|
||||
],
|
||||
"requirementId": 102
|
||||
}
|
||||
// if (!instance) return
|
||||
// instance.validate(async (valid, fields) => {
|
||||
// if (fileList.value.length === 0) {
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
// if (!valid) return
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
@@ -317,12 +362,11 @@ const handleSubmit = async (instance) => {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
files: files,
|
||||
requirementId:102
|
||||
}
|
||||
// ...formData.value,
|
||||
// deploymentId: deploymentId.value,
|
||||
// files: files,
|
||||
// requirementId:102
|
||||
// }
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -335,9 +379,11 @@ const handleSubmit = async (instance) => {
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
})
|
||||
// })
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { reactive, ref, shallowRef } from 'vue';
|
||||
import {reactive, ref, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import { useRouter } from 'vue-router';
|
||||
import {useRouter} from 'vue-router';
|
||||
|
||||
const localData = reactive({
|
||||
const localData = reactive({})
|
||||
|
||||
})
|
||||
|
||||
const tableIns= ref()
|
||||
const tableIns = ref()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
@@ -99,11 +97,6 @@ const tableConfig = reactive({
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
label: '经营概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
@@ -115,9 +108,9 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if(row.state!==null){
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||
}else {
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
@@ -128,11 +121,27 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
} else if (row.state === '0') {
|
||||
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<el-button type={'primary'} link onClick={()=>handleDetail(row)} >详情</el-button>
|
||||
<el-button type={'primary'} link onClick={()=>handleAdd(row)} >上报</el-button>
|
||||
</div>
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -140,15 +149,14 @@ const tableConfig = reactive({
|
||||
api: '/workflow/mosr/requirement/collect',
|
||||
params: {},
|
||||
btns: [
|
||||
// {name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
||||
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
|
||||
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
|
||||
{name: '年度计划导出', key: '_export', color: '#DED0B2', auth: ''},
|
||||
{name: '经费预算生成', key: 'preMonty', color: '#DED0B2', auth: ''},
|
||||
]
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if(obj.time) {
|
||||
if (obj.time) {
|
||||
obj.startTime = obj.time[0]
|
||||
obj.endTime = obj.time[1]
|
||||
delete obj.dateValue
|
||||
@@ -158,8 +166,9 @@ const search = (val) => {
|
||||
}
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch(key) {
|
||||
case 'add': handleAdd()
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -174,7 +183,7 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/detail',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user