fix : 修复需求上报是否专项资金流程图显示
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.isSpecialFund">
|
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.isSpecialFund">
|
||||||
<span>{{localFormData.specialFund }}</span>
|
<span>{{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|||||||
@@ -10,18 +10,18 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" v-if="!route.query.id">
|
<el-col :span="5" v-if="!route.query.id">
|
||||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||||
<el-radio-group v-model="formData.isSpecialFund">
|
<el-radio-group v-model="formData.isSpecialFund" @change="specialFundChange">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
<el-radio :label="false">否</el-radio>
|
<el-radio :label="false">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="route.query.id&&formData.isSpecialFund">
|
<el-col :span="6" v-if="route.query.id && formData.isSpecialFund">
|
||||||
<el-form-item label="专项资金" prop="specialFundId">
|
<el-form-item label="专项资金" prop="specialFundId">
|
||||||
<span>{{ formData.specialFund }}</span>
|
<span>{{ formData.specialFund }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="!route.query.id">
|
<el-col :span="6" v-if="!route.query.id && formData.isSpecialFund">
|
||||||
<el-form-item label="专项资金" prop="specialFundId">
|
<el-form-item label="专项资金" prop="specialFundId">
|
||||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -283,7 +283,7 @@ const formData = ref({
|
|||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||||
specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
// specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||||
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
|
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
|
||||||
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
|
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
|
||||||
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
|
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
|
||||||
@@ -313,10 +313,10 @@ const disabledDate = (time) => {
|
|||||||
|
|
||||||
const getIsFund = async () => {
|
const getIsFund = async () => {
|
||||||
if (!route.query.id) return;
|
if (!route.query.id) return;
|
||||||
loading.value = true
|
// loading.value = true
|
||||||
await getFormInfo(route.query.id).then(res => {
|
await getFormInfo(route.query.id).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
loading.value = false
|
// loading.value = false
|
||||||
formData.value.isSpecialFund = res.data.isSpecialFund
|
formData.value.isSpecialFund = res.data.isSpecialFund
|
||||||
if (res.data.isSpecialFund) {
|
if (res.data.isSpecialFund) {
|
||||||
res.data.specialFundId = getSpecialFundId(res.data.specialFund)
|
res.data.specialFundId = getSpecialFundId(res.data.specialFund)
|
||||||
@@ -428,7 +428,7 @@ const handleResubmit = debounce(() => {
|
|||||||
otherFiles.push(getFileParam(item))
|
otherFiles.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (attachment.value.singleFile==null) {
|
if (attachment.value.singleFile == null) {
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -436,7 +436,7 @@ const handleResubmit = debounce(() => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else{
|
} else {
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
@@ -475,17 +475,26 @@ const getDetailInfo = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const specialFundChange = () => {
|
||||||
|
processInfo()
|
||||||
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
await getIsFund()
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const resFund = await getFundOption()
|
const resFund = await getFundOption()
|
||||||
specialFundOption.value = resFund.data
|
specialFundOption.value = resFund.data
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
|
await processInfo()
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
const processInfo = () => {
|
||||||
|
processStore.setDesign(null)
|
||||||
|
processDiagramViewer.value=false
|
||||||
getProcessInfo(formData.value.isSpecialFund).then(res => {
|
getProcessInfo(formData.value.isSpecialFund).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
deploymentId.value = data.deploymentId
|
deploymentId.value = data.deploymentId
|
||||||
loading.value = false
|
|
||||||
processStore.setDesign(data)
|
processStore.setDesign(data)
|
||||||
processStore.runningList.value = data.runningList;
|
processStore.runningList.value = data.runningList;
|
||||||
processStore.endList.value = data.endList;
|
processStore.endList.value = data.endList;
|
||||||
@@ -495,7 +504,6 @@ const init = async () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
getIsFund()
|
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -506,10 +514,10 @@ const init = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await init()
|
|
||||||
if (route.query.projectId) {
|
if (route.query.projectId) {
|
||||||
await getDetailInfo()
|
await getDetailInfo()
|
||||||
}
|
}
|
||||||
|
await init()
|
||||||
})
|
})
|
||||||
const staging = async () => {
|
const staging = async () => {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user