Merge pull request 'master' (#874) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/874
This commit is contained in:
@@ -376,6 +376,11 @@ const handleDelete = (row, type) => {
|
||||
}else{
|
||||
isHaveOneFile.value=true
|
||||
}
|
||||
if(localStorage.getItem('collectData')){
|
||||
let collectData=JSON.parse(localStorage.getItem('collectData'))
|
||||
collectData.fileList=allFileList.value
|
||||
localStorage.setItem('collectData', JSON.stringify(collectData))
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -576,6 +576,7 @@ const handleDelete = (row) => {
|
||||
if (res.code === 1000) {
|
||||
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
// showTable.value = formData.value.fileList.length !== 0;
|
||||
changeRequirementData()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable @change="changeCollectData"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
@@ -26,7 +26,7 @@
|
||||
placeholder="开始时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
style="width: 100%" @change="changeCollectData"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
@@ -43,14 +43,14 @@
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:disabled="!formData.startTime"
|
||||
:disabled-date="disabledDate"
|
||||
:disabled-date="disabledDate" @change="changeCollectData"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('project_type')"
|
||||
:key="item.value"
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="研发主体" prop="rdSubject">
|
||||
<el-select v-model="formData.rdSubject" placeholder="请选择研发主体" clearable filterable>
|
||||
<el-select v-model="formData.rdSubject" placeholder="请选择研发主体" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('rd_subject')"
|
||||
:key="item.value"
|
||||
@@ -74,7 +74,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable>
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('invest_type')"
|
||||
:key="item.value"
|
||||
@@ -86,7 +86,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="业务板块" prop="businessSegment">
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable>
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('business_segment')"
|
||||
:key="item.value"
|
||||
@@ -98,7 +98,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="标准制定" prop="technicalStandard">
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable>
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('technical_standard')"
|
||||
:key="item.value"
|
||||
@@ -115,14 +115,14 @@
|
||||
placeholder="请输入经费预算"
|
||||
clearable
|
||||
:formatter="(value) => value.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||
:parser="(value) => value.replace(/\$\s?|(,*)+[^0-9.]/g, '')"
|
||||
:parser="(value) => value.replace(/\$\s?|(,*)+[^0-9.]/g, '')" @change="changeCollectData"
|
||||
/>
|
||||
<!-- <el-input-number v-model="formData.economicEstimate" placeholder="请输入经费预算" :controls="false"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-select v-model="formData.industryUniversityResearch" clearable placeholder="请选择产学研联合">
|
||||
<el-select v-model="formData.industryUniversityResearch" clearable placeholder="请选择产学研联合" @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('industry_university')"
|
||||
:key="item.value"
|
||||
@@ -134,7 +134,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-select v-model="formData.governmentDeclaration" clearable placeholder="请选择开展政府申报">
|
||||
<el-select v-model="formData.governmentDeclaration" clearable placeholder="请选择开展政府申报" @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('government_declaration')"
|
||||
:key="item.value"
|
||||
@@ -162,7 +162,7 @@
|
||||
<el-col :span="6" v-if="!route.query.id && formData.isSpecialFund"
|
||||
:style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="所属专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable>
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -179,14 +179,14 @@
|
||||
placeholder="请输入申请总部专项资金"
|
||||
clearable
|
||||
:formatter="(value) => value.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||
:parser="(value) => value.replace(/\$\s?|(,*)+[^0-9.]/g, '')"
|
||||
:parser="(value) => value.replace(/\$\s?|(,*)+[^0-9.]/g, '')" @change="changeCollectData"
|
||||
/>
|
||||
<!-- <el-input-number v-model="formData.specialFundAmount" placeholder="请输入申请总部专项资金" :controls="false"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':'-40px'}">
|
||||
<el-form-item label="是否在预算内" prop="isWithinBudget" required >
|
||||
<el-select v-model="formData.isWithinBudget" clearable placeholder="请选择是否在预算内">
|
||||
<el-select v-model="formData.isWithinBudget" clearable placeholder="请选择是否在预算内" @change="changeCollectData">
|
||||
<el-option label="是" :value="true"/>
|
||||
<el-option label="否" :value="false"/>
|
||||
</el-select>
|
||||
@@ -213,7 +213,7 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期成果形式" prop="resultForm"
|
||||
:style="{marginRight:!formData.isSpecialFund?'0':route.query.id?'':'40px'}">
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple>
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('result_form')"
|
||||
:key="item.value"
|
||||
@@ -225,7 +225,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable @change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('intellectual_property')"
|
||||
:key="item.value"
|
||||
@@ -237,28 +237,28 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||
<el-input-number v-model="formData.inventionPatent" placeholder="请输入发明专利数量" :controls="false"/>
|
||||
<el-input-number v-model="formData.inventionPatent" placeholder="请输入发明专利数量" :controls="false" @change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="新型专利(项)" prop="newPatent">
|
||||
<el-input-number v-model="formData.newPatent" placeholder="请输入实用性新型专利数量" :controls="false"
|
||||
<el-input-number v-model="formData.newPatent" placeholder="请输入实用性新型专利数量" :controls="false" @change="changeCollectData"
|
||||
style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||
<el-input-number v-model="formData.softwareCopyright" placeholder="请输入软件著作权数量" :controls="false"/>
|
||||
<el-input-number v-model="formData.softwareCopyright" placeholder="请输入软件著作权数量" :controls="false" @change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="著作权(项)" prop="copyright">
|
||||
<el-input-number v-model="formData.copyright" placeholder="请输入著作权数量" :controls="false"/>
|
||||
<el-input-number v-model="formData.copyright" placeholder="请输入著作权数量" :controls="false" @change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="其他(项)" prop="other">
|
||||
<el-input-number v-model="formData.other" placeholder="请输入其他数量" :controls="false"/>
|
||||
<el-input-number v-model="formData.other" placeholder="请输入其他数量" :controls="false" @change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -268,14 +268,14 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea"
|
||||
:style="{marginRight:!formData.isSpecialFund?'20px':'80px'}"
|
||||
:style="{marginRight:!formData.isSpecialFund?'20px':'80px'}" @change="changeCollectData"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="建设目标描述" prop="contentDescription">
|
||||
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea"
|
||||
:style="{marginRight:!formData.isSpecialFund?'20px':'80px'}"
|
||||
:style="{marginRight:!formData.isSpecialFund?'20px':'80px'}" @change="changeCollectData"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -395,14 +395,53 @@ const rules = reactive({
|
||||
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: ['blur', 'change']}],
|
||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: ['blur', 'change']}]
|
||||
})
|
||||
// watch(() => otherFileList.value, (newVal) => {
|
||||
// console.log('newVal',newVal)
|
||||
// otherFileList.value=newVal
|
||||
// changeCollectData()
|
||||
// }, {deep: true})
|
||||
watch(() => singleList.value, (newVal) => {
|
||||
showSingleTable.value = newVal.length !== 0;
|
||||
}, {deep: true})
|
||||
localStorage.removeItem('originallySelectedList')
|
||||
|
||||
if(localStorage.getItem('collectData')){
|
||||
let collectData=JSON.parse(localStorage.getItem('collectData'))
|
||||
if(collectData.fileList){
|
||||
if (name.value === 'Summary/edit') {
|
||||
attachment.value.allFileList=collectData.fileList
|
||||
}else {
|
||||
otherFileList.value=collectData.fileList
|
||||
}
|
||||
}
|
||||
if(collectData.optionalChargeLeadership){
|
||||
optionalChargeLeadershipList.value=collectData.optionalChargeLeadership
|
||||
}
|
||||
formData.value=collectData
|
||||
}
|
||||
|
||||
const changeCollectData=()=>{
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: [],
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
if (name.value === 'Summary/edit') {
|
||||
params.fileList= attachment.value.allFileList
|
||||
}else {
|
||||
params.fileList= otherFileList.value
|
||||
}
|
||||
localStorage.setItem('collectData', JSON.stringify(params))
|
||||
}
|
||||
const handleShowOptionalChargeLeadershipPicker = () => {
|
||||
optionalChargeLeadershipPickerRef.value.showUserPicker()
|
||||
}
|
||||
|
||||
const optionalChargeLeaderPickerOkOrCancel = (userList) => {
|
||||
optionalChargeLeadershipList.value = userList
|
||||
formData.value.optionalChargeLeadership = optionalChargeLeadershipList.value
|
||||
changeCollectData()
|
||||
}
|
||||
|
||||
const handleBack = () => {
|
||||
@@ -479,15 +518,9 @@ const getOtherFile = (val) => {
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
changeCollectData()
|
||||
}
|
||||
// watch(() => otherFileList.value, (newVal) => {
|
||||
// console.log('newVal',newVal)
|
||||
// showTable.value = newVal.length !== 0;
|
||||
// console.log('showTable.value',showTable.value)
|
||||
// }, {deep: true})
|
||||
watch(() => singleList.value, (newVal) => {
|
||||
showSingleTable.value = newVal.length !== 0;
|
||||
}, {deep: true})
|
||||
|
||||
const getFileParam = (item) => {
|
||||
if (item === undefined) return;
|
||||
return {
|
||||
@@ -495,6 +528,7 @@ const getFileParam = (item) => {
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
|
||||
const handleSubmit = debounce(async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
@@ -535,18 +569,19 @@ const handleSubmit = debounce(async (instance) => {
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
// let res = await requirementReported(params)
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// await router.push({
|
||||
// name: 'Summary'
|
||||
// })
|
||||
// localStorage.removeItem('collectData')
|
||||
// }
|
||||
})
|
||||
})
|
||||
const handleResubmit = debounce((instance) => {
|
||||
@@ -599,6 +634,7 @@ const handleResubmit = debounce((instance) => {
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
localStorage.removeItem('collectData')
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -623,6 +659,7 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const specialFundChange = () => {
|
||||
processInfo()
|
||||
changeCollectData()
|
||||
}
|
||||
const init = async () => {
|
||||
await getIsFund()
|
||||
|
||||
Reference in New Issue
Block a user