|
|
|
@ -20,17 +20,20 @@ |
|
|
|
|
import { BasicForm, useForm } from '@/components/Form'; |
|
|
|
|
import {defineComponent, ref} from 'vue'; |
|
|
|
|
import { PageWrapper } from '@/components/Page'; |
|
|
|
|
import { projectBaseInfoSchemas, userSchemas, departSchemas } from './jiBenXinXi'; |
|
|
|
|
import { projectBaseInfoSchemas, userSchemas, departSchemas } from './JiBenXinXi'; |
|
|
|
|
import { Card } from 'ant-design-vue'; |
|
|
|
|
import {defHttp} from "@/utils/http/axios"; |
|
|
|
|
import {save4shenbao,getProjectById,getUserByProjectId,getDepartByProjectId} from './jiBenXinXi.api'; |
|
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
|
|
|
|
|
|
import {save4shenbao,getProjectById,getUserByProjectId,getDepartByProjectId} from './JiBenXinXi.api'; |
|
|
|
|
import {useRoute, useRouter} from 'vue-router'; |
|
|
|
|
export default defineComponent({ |
|
|
|
|
name: 'FormHightPage', |
|
|
|
|
components: { BasicForm, PageWrapper, [Card.name]: Card }, |
|
|
|
|
setup() { |
|
|
|
|
const { currentRoute, back } = useRouter(); |
|
|
|
|
const route = useRoute(); |
|
|
|
|
const {back } = useRouter(); |
|
|
|
|
let params = { |
|
|
|
|
id: route.query.id, |
|
|
|
|
} |
|
|
|
|
const [registerProjectInfo, { validate: validateProjectInfoForm ,setFieldsValue}] = useForm({ |
|
|
|
|
baseColProps: { |
|
|
|
|
span: 6, |
|
|
|
@ -41,14 +44,14 @@ export default defineComponent({ |
|
|
|
|
showActionButtonGroup: false, |
|
|
|
|
}); |
|
|
|
|
const uploadValue = async() => { |
|
|
|
|
const baseInfoObj = await getProjectById(); |
|
|
|
|
console.log('baseInfoObj',JSON.stringify(baseInfoObj)) |
|
|
|
|
await setFieldsValue(baseInfoObj) |
|
|
|
|
const projectObj = await getProjectById(params); |
|
|
|
|
console.log('projectObj',JSON.stringify(projectObj)) |
|
|
|
|
await setFieldsValue(projectObj) |
|
|
|
|
} |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
uploadValue() |
|
|
|
|
|
|
|
|
|
},0) |
|
|
|
|
|
|
|
|
|
const [registerUser, formMethods] = useForm({ |
|
|
|
|
baseColProps: { |
|
|
|
|
span: 6, |
|
|
|
@ -60,16 +63,16 @@ export default defineComponent({ |
|
|
|
|
}); |
|
|
|
|
const setFieldValues = formMethods.setFieldsValue; |
|
|
|
|
const uploadValue2 = async() => { |
|
|
|
|
console.log( formMethods.setFieldsValue,' formMethods.setFieldsValue') |
|
|
|
|
const userInfoObj = await getUserByProjectId(); |
|
|
|
|
// console.log( formMethods.setFieldsValue,' formMethods.setFieldsValue') |
|
|
|
|
const userInfoObj = await getUserByProjectId(params); |
|
|
|
|
console.log('userInfoObj',JSON.stringify(userInfoObj)) |
|
|
|
|
// await setFieldValues({currentPerfession:1}) |
|
|
|
|
await setFieldValues({userInfoObj}) |
|
|
|
|
await setFieldValues(userInfoObj) |
|
|
|
|
} |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
uploadValue2() |
|
|
|
|
|
|
|
|
|
},200) |
|
|
|
|
|
|
|
|
|
const [registerDepart, formMethods2] = useForm({ |
|
|
|
|
baseColProps: { |
|
|
|
|
span: 6, |
|
|
|
@ -81,11 +84,11 @@ export default defineComponent({ |
|
|
|
|
}); |
|
|
|
|
const setFieldValues2 = formMethods2.setFieldsValue; |
|
|
|
|
const uploadValue3 = async() => { |
|
|
|
|
console.log( formMethods2.setFieldsValue,' formMethods.setFieldsValue') |
|
|
|
|
const departInfoObj = await getDepartByProjectId(); |
|
|
|
|
// console.log( formMethods2.setFieldsValue,' formMethods.setFieldsValue') |
|
|
|
|
const departInfoObj = await getDepartByProjectId(params); |
|
|
|
|
console.log('departInfoObj',JSON.stringify(departInfoObj)) |
|
|
|
|
// await setFieldValues2({bankNo:1,category:'2'}) |
|
|
|
|
await setFieldValues2({departInfoObj}) |
|
|
|
|
await setFieldValues2(departInfoObj) |
|
|
|
|
} |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
uploadValue3() |
|
|
|
|