fix : 二级页面上加基础信息

This commit is contained in:
2024-06-10 23:28:34 +08:00
parent 050c5cf57a
commit 1009cb7345
11 changed files with 195 additions and 53 deletions

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name">
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='40'?'40':''"
@@ -10,6 +12,8 @@
<script setup lang="jsx">
import {searchFileList} from "@/api/project-manage/attachment.js";
import {ElNotification} from "element-plus";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute()
const router = useRouter()
@@ -20,6 +24,25 @@ const uploadState = ref(true)
const fileList = ref([])
const projectId = ref(route.query.id)
const requirementId = ref(route.query.requirementId)
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const paneList=ref([
{
label:'需求征集',
@@ -42,7 +65,15 @@ const paneList=ref([
name:'50'
}
])
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const handleClick = (tab) => {
activeName.value=tab.props.name
loading.value=true