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