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