项目申报表单添加 10.18

master
zhc077 1 month ago
parent 9605d25f7a
commit fecd768869
  1. 101
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/projectApplicationList.vue

@ -1,35 +1,35 @@
<template>
<PageWrapper title="基本信息">
<a-card title="项目概况" :bordered="false">
<BasicForm @register="registerProjectInfo" />
<BasicForm @register="registerProjectInfo"/>
</a-card>
<a-card title="项目负责人" :bordered="false" class="!mt-5">
<BasicForm @register="registerUser" />
<BasicForm @register="registerUser"/>
</a-card>
<a-card title="申请单位概况" :bordered="false" class="!mt-5">
<BasicForm @register="registerDepart" />
<BasicForm @register="registerDepart"/>
</a-card>
<template #rightFooter>
<a-button type="primary" @click="submitAll"> 提交 </a-button>
<a-button @click="cancel">取消</a-button>
<a-button type="primary" @click="submitAll">提交</a-button>
</template>
</PageWrapper>
</template>
<script lang="ts">
import { BasicForm, useForm } from '@/components/Form';
import { defineComponent, ref } from 'vue';
// import PersonTable from './PersonTable.vue';
import { PageWrapper } from '@/components/Page';
import { projectBaseInfoSchemas, userSchemas, departSchemas } from './data';
import { Card } from 'ant-design-vue';
import {defHttp} from "@/utils/http/axios";
import {save4shenbao} from './data.api';
import {BasicForm, useForm} from '@/components/Form';
import {defineComponent} from 'vue';
// import PersonTable from './PersonTable.vue';
import {PageWrapper} from '@/components/Page';
import {departSchemas, projectBaseInfoSchemas, userSchemas} from './data';
import {Card} from 'ant-design-vue';
import {save4shenbao} from './data.api';
export default defineComponent({
export default defineComponent({
name: 'FormHightPage',
components: { BasicForm, PageWrapper, [Card.name]: Card },
components: {BasicForm, PageWrapper, [Card.name]: Card},
setup() {
const [registerProjectInfo, { validate: validateProjectInfoForm }] = useForm({
const [registerProjectInfo, {validate: validateProjectInfoForm}] = useForm({
baseColProps: {
span: 6,
},
@ -39,7 +39,7 @@
showActionButtonGroup: false,
});
const [registerUser, { validate: validateUserForm }] = useForm({
const [registerUser, {validate: validateUserForm}] = useForm({
baseColProps: {
span: 6,
},
@ -49,7 +49,7 @@
showActionButtonGroup: false,
});
const [registerDepart, { validate: validateDepartForm }] = useForm({
const [registerDepart, {validate: validateDepartForm}] = useForm({
baseColProps: {
span: 6,
},
@ -59,54 +59,45 @@
showActionButtonGroup: false,
});
// async function submitForm() {
// let data = getFieldsValue();
// let params = Object.assign({}, formData, data);
// console.log('', params)
// await saveOrUpdate(params, true)
// }
async function submitAll() {
try {
// if (tableRef.value) {
// console.log('table data:', tableRef.value.getDataSource());
// }
const [projectBaseInfoValues, userValues, deaprtValues] = await Promise.all([validateProjectInfoForm(), validateUserForm(), validateDepartForm()]);
const param = await Promise.resolve([validateProjectInfoForm(), validateUserForm(), validateDepartForm()]);
console.log('projectBaseInfoValues form data:', projectBaseInfoValues);
console.log('userValuesform data:', userValues);
console.log('deaprtValues form data:', deaprtValues);
// saveOrUpdate(,false);
console.log(222222);
console.log(222222);
// let param = { id: record.id, useStatus: '1' };
// let param = JSON.parse(projectBaseInfoValues);
console.log("param:",JSON.stringify(param));
console.log(333);
// const params = {};
console.log("projectBaseInfoValues:"+projectBaseInfoValues);
save4shenbao(projectBaseInfoValues);
// await reload();
// defHttp.post({ url: "/project/project/save4shenbao", projectBaseInfoValues}, { isTransformResponse: false });
} catch (error) {}
async function submitAll() {
try {
Promise.all([validateProjectInfoForm(), validateUserForm(), validateDepartForm()]).then(function (results) {
const params = {...results[0], ...results[1], ...results[2]}
console.log('results', params);
save4shenbao(params);
});
} catch (error){};
}
} catch (error) {
}
}
async function cancel() {
alert("kkkkkkk")
// window.close();
}
// return { register, registerUser, registerDepart, submitAll, tableRef };
return { registerProjectInfo, registerUser, registerDepart, submitAll };
return {registerProjectInfo, registerUser, registerDepart,cancel,submitAll};
},
});
});
function cancel2() {
alert("kkkkkkk")
window.close();
}
</script>
<style lang="less" scoped>
.high-form {
.high-form {
padding-bottom: 48px;
}
}
/** update-begin-author:taoyan date:2022-5-16 for:/issues/63 下拉框z-index问题 */
:deep(.ant-select-dropdown) {
/** update-begin-author:taoyan date:2022-5-16 for:/issues/63 下拉框z-index问题 */
:deep(.ant-select-dropdown) {
z-index: 98 !important;
}
/** update-end-author:taoyan date:2022-5-16 for:/issues/63 下拉框z-index问题 */
}
/** update-end-author:taoyan date:2022-5-16 for:/issues/63 下拉框z-index问题 */
</style>

Loading…
Cancel
Save