You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.6 KiB
81 lines
2.6 KiB
<template>
|
|
<!-- 自定义表单 -->
|
|
<el-divider content-position="left">项目入库详情</el-divider>
|
|
<BasicForm @register="registerProjectForm" />
|
|
<el-divider content-position="left">项目审批详情</el-divider>
|
|
<BasicTable @register="registerTable"/>
|
|
<!-- <el-dialog v-model="dialogTableVisible" title="Shipping address">
|
|
<el-table :data="gridData">
|
|
<el-table-column property="date" label="Date" width="150" />
|
|
<el-table-column property="name" label="Name" width="200" />
|
|
<el-table-column property="address" label="Address" />
|
|
</el-table>
|
|
|
|
</el-dialog> -->
|
|
</template>
|
|
<script lang="ts" name="Detailpage" setup>
|
|
import { defineProps,watchEffect} from 'vue'
|
|
import { useForm, BasicForm } from '/@/components/Form';
|
|
import { formSchemas,ProcessColumns} from './projectInfo.data';
|
|
import{queryProjectInfoById,queryProcessInfo} from './projectInfo.api'
|
|
import {BasicTable } from '/@/components/Table';
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
|
let proid = defineProps(["dataTo"])
|
|
|
|
watchEffect(async ()=>{
|
|
console.log("dataTo",proid.dataTo)
|
|
let param:any = {
|
|
projectid:proid.dataTo
|
|
}
|
|
let res =await queryProjectInfoById(param)
|
|
console.log("结果是",res)
|
|
setFieldsValue(res)
|
|
reload()
|
|
})
|
|
|
|
|
|
/**
|
|
* BasicForm绑定注册;
|
|
* useForm 是整个框架的核心用于表单渲染,里边封装了很多公共方法;
|
|
* 支持(schemas: 渲染表单列,autoSubmitOnEnter:回车提交,submitButtonOptions:自定义按钮文本和图标等方法);
|
|
* 平台通过此封装,简化了代码,支持自定义扩展;
|
|
*/
|
|
const [registerProjectForm,{setFieldsValue}] = useForm({
|
|
//注册表单列
|
|
schemas: formSchemas,
|
|
showActionButtonGroup: false,
|
|
//回车提交
|
|
// autoSubmitOnEnter: true,
|
|
// //不显示重置按钮
|
|
// showResetButton: false,
|
|
//自定义提交按钮文本和图标
|
|
// submitButtonOptions: { text: '提交', preIcon: '' },
|
|
//查询列占比 24代表一行 取值范围 0-24
|
|
// actionColOptions: { span: 17 },
|
|
labelCol: { style: { width: '120px' } },
|
|
wrapperCol:{ style: { width: 'auto' } },
|
|
disabled:true
|
|
});
|
|
|
|
|
|
|
|
const { tableContext } = useListPage({
|
|
tableProps: {
|
|
size:'small',//紧凑型表格
|
|
title: '流程审批情况',
|
|
api:queryProcessInfo,
|
|
columns: ProcessColumns,
|
|
showActionColumn:false,
|
|
useSearchForm:false,
|
|
beforeFetch(params) {
|
|
params.status = "1",
|
|
params.projectid=proid.dataTo
|
|
},
|
|
},
|
|
});
|
|
// BasicTable绑定注册
|
|
const [registerTable,{reload}] = tableContext;
|
|
|
|
</script>
|
|
<style></style>
|
|
|