fix : 修复首页查看跳转问题及简化代码

This commit is contained in:
2024-06-02 11:54:19 +08:00
parent cd715fbf98
commit c05322a2bf
8 changed files with 59 additions and 90 deletions

View File

@@ -25,7 +25,7 @@
v-model="formData.deadline"
type="datetime"
placeholder="截止时间"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-config-provider>
</el-form-item>

View File

@@ -204,7 +204,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount">
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount" v-if="formData.isSpecialFund">
<el-input v-model="formData.specialFundAmount" clearable></el-input>
</el-form-item>
</el-col>
@@ -297,16 +297,16 @@ const rules = reactive({
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
})
// const getIsFund = async () => {
// getFormInfo(route.query.id).then(res => {
// if (res.code === 1000) {
// formData.value.isSpecialFund = res.data.isSpecialFund
// if(res.data.isSpecialFund){
// formData.value.specialFund = Number(res.data.specialFund)
// }
// }
// })
// }
const getIsFund = async () => {
getFormInfo(route.query.id).then(res => {
if (res.code === 1000) {
formData.value.isSpecialFund = res.data.isSpecialFund
if(res.data.isSpecialFund){
formData.value.specialFund = Number(res.data.specialFund)
}
}
})
}
const compositeParam = (item, type) => {
let tag = ''
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
@@ -346,12 +346,6 @@ const handleSubmit = debounce(async (instance) => {
if (!instance) return
instance.validate(async (valid, fields) => {
if (!valid) return
// if (JSON.stringify(file.value) === "{}") {
// attachment.value.validate()
// } else {
// attachment.value.clearValidate()
// }
let singleFile = {}
if (file.value.fileId !== undefined) {
singleFile = {
@@ -430,12 +424,6 @@ const handleResubmit = debounce(() => {
let otherFiles = []
let fileArray
if (name.value === 'Summary/edit') {
// console.log('attachment.value', attachment.value.singleFile)
// if (attachment.value.singleFile === null) {
// attachment.value.validate()
// } else {
// attachment.value.clearValidate()
// }
singleFile = {
fileId: attachment.value.singleFile?.fileId
}
@@ -502,7 +490,7 @@ const getDetailInfo = async () => {
const init = async () => {
const resFund = await getFundOption()
specialFundOption.value = resFund.data
// await getIsFund()
await getIsFund()
const res = await getSubCompOpt()
companyOption.value = res.data
getProcessInfo().then(res => {

View File

@@ -11,8 +11,6 @@ const localData = reactive({})
const tableIns = ref()
const router = useRouter()
const searchConfig = reactive([
{
label: '需求名称',
@@ -76,7 +74,6 @@ const searchConfig = reactive([
// colProps: {}
// },
])
const tableConfig = reactive({
columns: [
{