|
|
|
@ -1,26 +1,15 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<div v-if="falg"> |
|
|
|
|
<PageWrapper> |
|
|
|
|
<Description |
|
|
|
|
title="项目基本信息" |
|
|
|
|
:collapseOptions="{ canExpand: false, helpMessage: 'help me' }" |
|
|
|
|
title="项目基本信息:" |
|
|
|
|
:collapseOptions="{ canExpand: false}" |
|
|
|
|
:column="2" |
|
|
|
|
:data="projectBaseInfoData" |
|
|
|
|
:schema="schema" |
|
|
|
|
/> |
|
|
|
|
<!-- <Description |
|
|
|
|
class="mt-4" |
|
|
|
|
title="垂直示例" |
|
|
|
|
layout="vertical" |
|
|
|
|
:collapseOptions="{ canExpand: false, helpMessage: 'help me' }" |
|
|
|
|
:column="2" |
|
|
|
|
:data="mockData" |
|
|
|
|
:schema="schema" |
|
|
|
|
/>--> |
|
|
|
|
|
|
|
|
|
<Description @register="register" class="mt-4"/> |
|
|
|
|
<Description @register="register1" class="mt-4"/> |
|
|
|
|
</PageWrapper> |
|
|
|
|
<BasicTable @register="registerTimeTable" /> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<!--引用表格--> |
|
|
|
@ -28,29 +17,31 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import {onMounted} from 'vue'; |
|
|
|
|
import {DescItem, Description, useDescription} from '/@/components/Description/index'; |
|
|
|
|
import {onMounted,ref} from 'vue'; |
|
|
|
|
import {Description} from '/@/components/Description/index'; |
|
|
|
|
import {PageWrapper} from '/@/components/Page'; |
|
|
|
|
import {BasicTable} from '/@/components/Table'; |
|
|
|
|
import {BasicColumn, BasicTable, useTable} 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'; |
|
|
|
|
import {getBaseInfo, list} from '@/views/projectObjective/ProjectObjective.api'; |
|
|
|
|
import {columns2} from "@/views/cooperationDepart/CooperationDepart.data"; |
|
|
|
|
import {list2} from "@/views/cooperationDepart/CooperationDepart.api"; |
|
|
|
|
import {refundTimeTableData, refundTimeTableSchema} from "@/views/demo/page/desc/high/data"; |
|
|
|
|
import {demoListApi} from "@/api/demo/table"; |
|
|
|
|
|
|
|
|
|
const route = useRoute(); |
|
|
|
|
|
|
|
|
|
const falg = ref(false) |
|
|
|
|
//注册model |
|
|
|
|
const [registerModal, {openModal}] = useModal(); |
|
|
|
|
//注册table数据 |
|
|
|
|
const {tableContext} = useListPage({ |
|
|
|
|
tableProps: { |
|
|
|
|
title: '项目绩效目标及分年度目标:', |
|
|
|
|
api: list, |
|
|
|
|
api: listProjectObjectiveByProjectId, |
|
|
|
|
columns, |
|
|
|
|
canResize: false, |
|
|
|
|
showTableSetting: false, |
|
|
|
@ -62,83 +53,88 @@ const {tableContext} = useListPage({ |
|
|
|
|
pagination: false, |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
const [registerTable] = tableContext |
|
|
|
|
|
|
|
|
|
async function listProjectObjectiveByProjectId() { |
|
|
|
|
let params = { |
|
|
|
|
projectId: route.query.id, |
|
|
|
|
}; |
|
|
|
|
console.log(JSON.stringify(params)); |
|
|
|
|
return await list(params); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [registerTable, {reload}, {rowSelection, selectedRowKeys}] = tableContext |
|
|
|
|
const [registerTimeTable] = useTable({ |
|
|
|
|
title: '主要合作单位:', |
|
|
|
|
columns: columns2, |
|
|
|
|
pagination: false, |
|
|
|
|
// dataSource: list, |
|
|
|
|
api: listCooperationByProjectId, |
|
|
|
|
showIndexColumn: false, |
|
|
|
|
scroll: { y: 300 }, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const projectBaseInfoData: Recordable = { |
|
|
|
|
username: 'oooooo777', |
|
|
|
|
nickName: 'VB', |
|
|
|
|
age: '123', |
|
|
|
|
phone: '15695909xxx', |
|
|
|
|
email: '190848757@qq.com', |
|
|
|
|
addr: '厦门市思明区', |
|
|
|
|
sex: '男', |
|
|
|
|
certy: '3504256199xxxxxxxxx', |
|
|
|
|
tag: 'orange', |
|
|
|
|
async function listCooperationByProjectId() { |
|
|
|
|
let params = { |
|
|
|
|
projectId: route.query.id, |
|
|
|
|
}; |
|
|
|
|
console.log(JSON.stringify(params)); |
|
|
|
|
return await list2(params); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const mockData: Recordable = { |
|
|
|
|
username: 'test', |
|
|
|
|
nickName: 'VB', |
|
|
|
|
age: '123', |
|
|
|
|
phone: '15695909xxx', |
|
|
|
|
email: '190848757@qq.com', |
|
|
|
|
addr: '厦门市思明区', |
|
|
|
|
sex: '男', |
|
|
|
|
certy: '3504256199xxxxxxxxx', |
|
|
|
|
tag: 'orange', |
|
|
|
|
const projectBaseInfoData: any = { |
|
|
|
|
projectName: '', |
|
|
|
|
projectTime: '', |
|
|
|
|
phone: '', |
|
|
|
|
realName: '', |
|
|
|
|
email: '', |
|
|
|
|
title: '', |
|
|
|
|
}; |
|
|
|
|
const schema: DescItem[] = [ |
|
|
|
|
|
|
|
|
|
const schema: any = [ |
|
|
|
|
{ |
|
|
|
|
field: 'username', |
|
|
|
|
label: '用户名', |
|
|
|
|
field: 'projectName', |
|
|
|
|
label: '项目名称', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
field: 'nickName', |
|
|
|
|
label: '昵称', |
|
|
|
|
render: (curVal, data) => { |
|
|
|
|
return `${data.username}-${curVal}`; |
|
|
|
|
}, |
|
|
|
|
field: 'projectTime', |
|
|
|
|
label: '项目实施时间', |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
field: 'phone', |
|
|
|
|
label: '联系电话', |
|
|
|
|
field: 'realName', |
|
|
|
|
label: '项目负责人姓名', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
field: 'email', |
|
|
|
|
label: '邮箱', |
|
|
|
|
label: '项目负责人职称', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
field: 'addr', |
|
|
|
|
label: '地址', |
|
|
|
|
field: 'title', |
|
|
|
|
label: '项目负责人职称', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
field: 'phone', |
|
|
|
|
label: '项目负责人手机', |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
const [register] = useDescription({ |
|
|
|
|
title: 'useDescription', |
|
|
|
|
// data: mockData, |
|
|
|
|
data: projectBaseInfoData, |
|
|
|
|
schema: schema, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/*const [register1] = useDescription({ |
|
|
|
|
title: '无边框', |
|
|
|
|
bordered: false, |
|
|
|
|
data: mockData, |
|
|
|
|
schema: schema, |
|
|
|
|
});*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function getData() { |
|
|
|
|
let params = { |
|
|
|
|
id: route.query.id, |
|
|
|
|
}; |
|
|
|
|
let obj = await getFengMian(params); |
|
|
|
|
console.log('data', JSON.stringify(obj)) |
|
|
|
|
projectBaseInfoData.value = obj |
|
|
|
|
let obj = await getBaseInfo(params); |
|
|
|
|
// console.log('data', JSON.stringify(obj)) |
|
|
|
|
projectBaseInfoData.projectName = obj.projectName; |
|
|
|
|
projectBaseInfoData.email = obj.email; |
|
|
|
|
projectBaseInfoData.phone = obj.phone; |
|
|
|
|
projectBaseInfoData.realName = obj.realName; |
|
|
|
|
projectBaseInfoData.projectTime = obj.projectTime; |
|
|
|
|
projectBaseInfoData.title = obj.title; |
|
|
|
|
console.log('projectBaseInfoData', JSON.stringify(projectBaseInfoData)) |
|
|
|
|
falg.value = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
getData() |
|
|
|
|
}); |
|
|
|
|
getData(); |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|