预算书-基本情况表 功能添加 10.25

master
zhc077 4 weeks ago
parent f46571ad09
commit 6b8b165eb7
  1. 112
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue

@ -1,26 +1,82 @@
<template> <template>
<PageWrapper title="详情组件示例"> <div>
<Description title="基础示例" :collapseOptions="{ canExpand: true, helpMessage: 'help me' }" <PageWrapper>
:column="3" :data="mockData" :schema="schema"/>
<Description <Description
title="项目基本信息"
:collapseOptions="{ canExpand: false, helpMessage: 'help me' }"
:column="2"
:data="projectBaseInfoData"
:schema="schema"
/>
<!-- <Description
class="mt-4" class="mt-4"
title="垂直示例" title="垂直示例"
layout="vertical" layout="vertical"
:collapseOptions="{ canExpand: true, helpMessage: 'help me' }" :collapseOptions="{ canExpand: false, helpMessage: 'help me' }"
:column="2" :column="2"
:data="mockData" :data="mockData"
:schema="schema" :schema="schema"
/> />-->
<Description @register="register" class="mt-4"/> <Description @register="register" class="mt-4"/>
<Description @register="register1" class="mt-4"/> <Description @register="register1" class="mt-4"/>
</PageWrapper> </PageWrapper>
</div>
<div>
<!--引用表格-->
<BasicTable @register="registerTable"></BasicTable>
</div>
</template> </template>
<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import {onMounted} from 'vue';
import {DescItem, Description, useDescription} from '/@/components/Description/index'; import {DescItem, Description, useDescription} from '/@/components/Description/index';
import {PageWrapper} from '/@/components/Page'; import {PageWrapper} from '/@/components/Page';
import {BasicTable} from '/@/components/Table';
import {useRoute} from "vue-router";
import {getFengMian} from './FengMian.api';
import {useModal} from "@/components/Modal";
import {useListPage} from "@/hooks/system/useListPage";
import {columns} from "@/views/projectObjective/ProjectObjective.data";
import {list} from '@/views/projectObjective/ProjectObjective.api';
const route = useRoute();
//model
const [registerModal, {openModal}] = useModal();
//table
const {tableContext} = useListPage({
tableProps: {
title: '项目绩效目标及分年度目标:',
api: list,
columns,
canResize: false,
formConfig: {
//labelWidth: 120,
// schemas: searchFormSchema,
autoSubmitOnEnter: true,
showAdvancedButton: true,
fieldMapToNumber: [],
fieldMapToTime: [],
},
}
})
const [registerTable, {reload}, {rowSelection, selectedRowKeys}] = tableContext
const projectBaseInfoData: Recordable = {
username: 'oooooo777',
nickName: 'VB',
age: '123',
phone: '15695909xxx',
email: '190848757@qq.com',
addr: '厦门市思明区',
sex: '男',
certy: '3504256199xxxxxxxxx',
tag: 'orange',
};
const mockData: Recordable = { const mockData: Recordable = {
username: 'test', username: 'test',
@ -58,23 +114,43 @@ const schema: DescItem[] = [
label: '地址', label: '地址',
}, },
]; ];
export default defineComponent({ // export default defineComponent({
components: {Description, PageWrapper}, // components: {
setup() { // Description, PageWrapper, BasicTable
const [register] = useDescription({ // }
// ,
// setup() {
const [register] = useDescription({
title: 'useDescription', title: 'useDescription',
data: mockData, // data: mockData,
data: projectBaseInfoData,
schema: schema, schema: schema,
}); });
const [register1] = useDescription({ /*const [register1] = useDescription({
title: '无边框', title: '无边框',
bordered: false, bordered: false,
data: mockData, data: mockData,
schema: schema, schema: schema,
}); });*/
return {mockData, schema, register, register1};
}, async function getData() {
let params = {
id: route.query.id,
};
let obj = await getFengMian(params);
console.log('data', JSON.stringify(obj))
projectBaseInfoData.value = obj
}
onMounted(() => {
getData()
}); });
// return {mockData, projectBaseInfoData, schema, register/*, register1*/};
// },
// });
</script> </script>

Loading…
Cancel
Save