页面搭建
parent
6d0a3017f6
commit
be3e002cda
|
|
@ -74,6 +74,8 @@ const DashboardLayout: React.FC = () => {
|
|||
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
// debugger;
|
||||
console.log(location.pathname);
|
||||
|
||||
const pathname = location.pathname;
|
||||
const dispatch = useDispatch<Dispatch>();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import { MenuItem } from "../_";
|
||||
|
||||
export function findMenu(menus: MenuItem[], pathname: string) {
|
||||
//document.title = TITLE;
|
||||
|
||||
if (!menus) {
|
||||
return [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const Page = () => {
|
|||
<div className={styles.title}>
|
||||
<Image src={title} />转移路线示意图
|
||||
</div>
|
||||
<div style={{display:'flex',justifyContent:'center'}}>
|
||||
<div style={{display:'flex',justifyContent:'center',height: 'calc(100% - 40px)',alignItems:'center'}}>
|
||||
<Image src={zd} width='80%' preview={false} />
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.title{
|
||||
font-size: 16px;
|
||||
color: #000000;
|
||||
width: 112px;
|
||||
// width: 112px;
|
||||
height: 32px
|
||||
}
|
||||
.content{
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
const [form] = Form.useForm();
|
||||
|
||||
const onFinish = (values) => {
|
||||
let dataSo;
|
||||
let dateSo;
|
||||
if (values.tm) {
|
||||
dataSo = {
|
||||
dateSo = {
|
||||
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
}
|
||||
delete values.tm
|
||||
setSearchVal({...values, dataSo});
|
||||
setSearchVal({...values, dateSo});
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -36,9 +36,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</Form.Item>
|
||||
{searchBtn ? <Form.Item>
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item> : null }
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@ const ToolBar = ({ setSearchVal, onExport, storeData, role }) => {
|
|||
const [form] = Form.useForm();
|
||||
|
||||
const onFinish = (values) => {
|
||||
let dataSo;
|
||||
let dateSo;
|
||||
if (values.tm) {
|
||||
dataSo = {
|
||||
dateSo = {
|
||||
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
}
|
||||
delete values.tm
|
||||
setSearchVal({ ...values, dataSo });
|
||||
setSearchVal({ ...values, dateSo });
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
|
||||
import BasicCrudModal from '../../../components/crud/BasicCrudModal';
|
||||
import { Table, Card, Modal, Form, Input, Button, Row, Col, Timeline, message, Tabs, Image } from 'antd';
|
||||
import { FileWordOutlined, FilePdfOutlined, FileZipOutlined, FileExcelOutlined } from '@ant-design/icons';
|
||||
import { FileWordOutlined, FilePdfOutlined, FileZipOutlined, PaperClipOutlined } from '@ant-design/icons';
|
||||
import { useSelector } from 'react-redux';
|
||||
import ToolBar from './toolbar';
|
||||
import ModalForm from './form';
|
||||
|
|
@ -10,6 +10,8 @@ import usePageTable from '../../../components/crud/usePageTable2';
|
|||
import { createCrudService } from '../../../components/crud/_';
|
||||
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
|
||||
import { render } from 'react-dom';
|
||||
import { httpgetExport } from '../../../utils/request';
|
||||
import { exportFile } from '../../../utils/tools';
|
||||
|
||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||
const typeOb={0:'宪法',1:'法律',2:'行政法规',3:'督察法规',4:'司法解释',5:'地方性法规'}
|
||||
|
|
@ -26,33 +28,33 @@ const Page = () => {
|
|||
const [isFetch, setIsFetch] = useState(false)
|
||||
const columns = [
|
||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
||||
{ title: '标题', key: 'name', dataIndex: 'name', ellipsis: true },
|
||||
{
|
||||
title: '制定机关', key: 'fillUnit', dataIndex: 'fillUnit', width: 140,
|
||||
title: '制定机关', key: 'fillUnit', dataIndex: 'fillUnit',
|
||||
},
|
||||
{
|
||||
title: '法律性质', key: 'type', dataIndex: 'type', width: 140,
|
||||
title: '法律性质', key: 'type', dataIndex: 'type',
|
||||
render: (value) => <span>{typeOb[value]}</span>,
|
||||
},
|
||||
{
|
||||
title: '时效性', key: 'timeliness', dataIndex: 'timeliness', width: 300,render:(v)=><>
|
||||
title: '时效性', key: 'timeliness', dataIndex: 'timeliness', render:(v)=><>
|
||||
{timelinessOb[v]}
|
||||
</>
|
||||
},
|
||||
{
|
||||
title: '公布日期', key: 'announcementDate', dataIndex: 'announcementDate', width: 300
|
||||
title: '公布日期', key: 'announcementDate', dataIndex: 'announcementDate'
|
||||
},
|
||||
{
|
||||
title: '施行日期', key: 'implementationDate', dataIndex: 'implementationDate', width: 300
|
||||
title: '施行日期', key: 'implementationDate', dataIndex: 'implementationDate'
|
||||
},
|
||||
{
|
||||
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
||||
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc'
|
||||
},
|
||||
{
|
||||
title: '附件', key: 'files', dataIndex: 'files', width: 300,render:(v,r)=><a onClick={()=>viewPdf(v[0].fileId)}>{v[0]?.fileName}</a>
|
||||
title: '附件', key: 'files', dataIndex: 'files',render:(v,r)=><a onClick={()=>download(v[0].fileId,v[0]?.fileName)}><PaperClipOutlined />{v[0]?.fileName}</a>
|
||||
},
|
||||
{
|
||||
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
||||
title: '操作', key: 'operation',
|
||||
render: (value, row, index) => (
|
||||
<CrudOpRender_text
|
||||
edit={true}
|
||||
|
|
@ -87,7 +89,16 @@ const Page = () => {
|
|||
refresh()
|
||||
setIsFetch(!isFetch)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 文件下载
|
||||
* @param {String} params 文件fileId
|
||||
*/
|
||||
const download = async(id, name) => {
|
||||
var extension = name?.split('.').pop().toLowerCase();
|
||||
httpgetExport(apiurl.zdgl.download+id).then(res => {
|
||||
exportFile(name,res.data)
|
||||
})
|
||||
}
|
||||
const viewPdf = (params) => {
|
||||
setIframeSrc(params)
|
||||
setPdfViewOPen(true)
|
||||
|
|
@ -114,7 +125,7 @@ const Page = () => {
|
|||
/>
|
||||
</Card>
|
||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width, y: "calc( 100vh - 400px )" }} />
|
||||
<Table columns={columns} rowKey="inx" {...tableProps} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +1,53 @@
|
|||
import React, { useEffect,useState } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Form, Input, Button, DatePicker, Select } from 'antd';
|
||||
import { DownOutlined, UpOutlined } from '@ant-design/icons'
|
||||
|
||||
import moment from 'moment';
|
||||
const { RangePicker } = DatePicker;
|
||||
const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||
const addBtn = role?.rule?.find(item => item.menuName == "新增");
|
||||
const searchBtn = role?.rule?.find(item => item.menuName == "查询");
|
||||
const [form] = Form.useForm();
|
||||
const [showGj , setShowGj] =useState(false)
|
||||
const [showGj, setShowGj] = useState(false)
|
||||
const onFinish = (values) => {
|
||||
let dataSo;
|
||||
if (values.tm) {
|
||||
dataSo = {
|
||||
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if (values.announcementDate) {
|
||||
// 公布时间
|
||||
values.stmAd= values.announcementDate[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
values.etmAd= values.announcementDate[1].format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
delete values.tm
|
||||
setSearchVal({...values});
|
||||
if (values.implementationDate) {
|
||||
// 施行日期
|
||||
values.stmIm= values.implementationDate[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
values.etmIm= values.implementationDate[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if (values.uploadTime) {
|
||||
// 上传日期
|
||||
values.stmUd= values.uploadTime[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
values.etmUd= values.uploadTime[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
||||
delete values.announcementDate
|
||||
delete values.implementationDate
|
||||
delete values.uploadTime
|
||||
|
||||
setSearchVal({ ...values });
|
||||
}
|
||||
|
||||
const opntios=[
|
||||
{label:'宪法',value:0},
|
||||
{label:'法律',value:1},
|
||||
{label:'行政法规',value:2},
|
||||
{label:'督察法规',value:3},
|
||||
{label:'司法解释',value:4},
|
||||
{label:'地方性法规',value:5},
|
||||
const opntios = [
|
||||
{ label: '宪法', value: 0 },
|
||||
{ label: '法律', value: 1 },
|
||||
{ label: '行政法规', value: 2 },
|
||||
{ label: '督察法规', value: 3 },
|
||||
{ label: '司法解释', value: 4 },
|
||||
{ label: '地方性法规', value: 5 },
|
||||
]
|
||||
const opntios1=[
|
||||
{label:'尚未生效',value:0},
|
||||
{label:'有效',value:1},
|
||||
{label:'已修改',value:2},
|
||||
{label:'已废止',value:3},
|
||||
const opntios1 = [
|
||||
{ label: '尚未生效', value: 0 },
|
||||
{ label: '有效', value: 1 },
|
||||
{ label: '已修改', value: 2 },
|
||||
{ label: '已废止', value: 3 },
|
||||
]
|
||||
const styles={
|
||||
const styles = {
|
||||
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
||||
fontWeight: '700',
|
||||
fontStyle: 'normal',
|
||||
|
|
@ -43,50 +55,50 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
}
|
||||
return (
|
||||
<>
|
||||
<div style={{display:'flex',justifyContent:'space-between'}}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||
<div style={{display:'flex'}}>
|
||||
<Form.Item label="标题" name="name">
|
||||
<Input allowClear style={{width:'150px'}}/>
|
||||
</Form.Item>
|
||||
<Form.Item label="制定机关" name="fillUnit">
|
||||
<Input allowClear style={{width:'150px'}}/>
|
||||
</Form.Item>
|
||||
<Form.Item label="法律性质" name="type">
|
||||
<Select allowClear style={{width:'150px'}} options={opntios}/>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<Form.Item label="标题" name="name">
|
||||
<Input allowClear style={{ width: '150px' }} />
|
||||
</Form.Item>
|
||||
<Form.Item label="制定机关" name="fillUnit">
|
||||
<Input allowClear style={{ width: '150px' }} />
|
||||
</Form.Item>
|
||||
<Form.Item label="法律性质" name="type">
|
||||
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||
</Form.Item>
|
||||
|
||||
{
|
||||
(onSave) ?
|
||||
<Form.Item>
|
||||
<Button onClick={onSave}>新增</Button>
|
||||
</Form.Item>
|
||||
:null
|
||||
}
|
||||
<Form.Item>
|
||||
<div style={styles} onClick={()=>setShowGj(!showGj)}>高级搜索 {!showGj&&<DownOutlined />} {showGj&&<UpOutlined />}</div>
|
||||
</Form.Item>
|
||||
{
|
||||
(onSave) ?
|
||||
<Form.Item>
|
||||
<Button onClick={onSave}>新增</Button>
|
||||
</Form.Item>
|
||||
: null
|
||||
}
|
||||
<Form.Item>
|
||||
<div style={styles} onClick={() => setShowGj(!showGj)}>高级搜索 {!showGj && <DownOutlined />} {showGj && <UpOutlined />}</div>
|
||||
</Form.Item>
|
||||
</div>
|
||||
{showGj&&<div style={{display:'flex'}}>
|
||||
<Form.Item label="时效性" name="timeliness">
|
||||
<Select allowClear style={{width:'150px'}} options={opntios1}/>
|
||||
</Form.Item>
|
||||
<Form.Item label="公布日期" name="announcementDate">
|
||||
<RangePicker allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item label="施行日期" name="implementationDate">
|
||||
<RangePicker allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item label="上传时间" name="name">
|
||||
<RangePicker allowClear />
|
||||
</Form.Item>
|
||||
{showGj && <div style={{ display: 'flex' }}>
|
||||
<Form.Item label="时效性" name="timeliness">
|
||||
<Select allowClear style={{ width: '150px' }} options={opntios1} />
|
||||
</Form.Item>
|
||||
<Form.Item label="公布日期" name="announcementDate">
|
||||
<RangePicker allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item label="施行日期" name="implementationDate">
|
||||
<RangePicker allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item label="上传时间" name="uploadTime">
|
||||
<RangePicker allowClear />
|
||||
</Form.Item>
|
||||
</div>}
|
||||
</Form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -79,17 +79,28 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
|
|||
})
|
||||
}
|
||||
useEffect(()=>{
|
||||
httpget(apiurl.szzf.ajdj.detail + record.id).then(res=>{
|
||||
if(mode == 'edit' || mode =='view'){
|
||||
httpget(apiurl.szzf.ajdj.detail + record.id).then(res=>{
|
||||
let obj = {
|
||||
createName: localStorage.getItem('userName'),
|
||||
createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
createBy:localStorage.getItem('userId')
|
||||
}
|
||||
if(res.data?.caseDate){
|
||||
obj.caseDate=dayjs(res.data.caseDate)
|
||||
}
|
||||
|
||||
setFormData({...res.data,...obj})
|
||||
})
|
||||
}else if(mode == 'save'){
|
||||
let obj = {
|
||||
createName: localStorage.getItem('userName'),
|
||||
createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
createBy:localStorage.getItem('userId')
|
||||
}
|
||||
if(res.data.caseDate){
|
||||
obj.caseDate=dayjs(res.data.caseDate)
|
||||
}
|
||||
setFormData({...res.data,...obj})
|
||||
})
|
||||
createBy:localStorage.getItem('userId'),
|
||||
}
|
||||
setFormData({...obj})
|
||||
}
|
||||
|
||||
},[])
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -30,28 +30,28 @@ const Page = () => {
|
|||
const [isFetch, setIsFetch] = useState(false)
|
||||
const columns = [
|
||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||
{ title: '填报时间', key: 'createTime', dataIndex: 'createTime', width: 250, ellipsis: true },
|
||||
{ title: '填报时间', key: 'createTime', dataIndex: 'createTime', ellipsis: true },
|
||||
{
|
||||
title: '案件名称', key: 'caseName', dataIndex: 'caseName', width: 140,
|
||||
title: '案件名称', key: 'caseName', dataIndex: 'caseName',
|
||||
},
|
||||
{
|
||||
title: '案件编号', key: 'caseId', dataIndex: 'caseId', width: 140,
|
||||
title: '案件编号', key: 'caseId', dataIndex: 'caseId',
|
||||
|
||||
},
|
||||
{
|
||||
title: '发现时间', key: 'caseDate', dataIndex: 'caseDate', width: 300,
|
||||
title: '发现时间', key: 'caseDate', dataIndex: 'caseDate',
|
||||
|
||||
},
|
||||
{
|
||||
title: '案件类型', key: 'caseType', dataIndex: 'caseType', width: 300,
|
||||
title: '案件类型', key: 'caseType', dataIndex: 'caseType',
|
||||
render: (value) => <span>{caseTypeOb[value]}</span>,
|
||||
},
|
||||
{
|
||||
title: '案件来源', key: 'caseSource', dataIndex: 'caseSource', width: 300,
|
||||
title: '案件来源', key: 'caseSource', dataIndex: 'caseSource',
|
||||
render: (value) => <span>{caseSourceOb[value]}</span>,
|
||||
},
|
||||
{
|
||||
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
||||
title: '操作', key: 'operation', width: 240,
|
||||
render: (value, row, index) => (
|
||||
<CrudOpRender_text
|
||||
edit={true}
|
||||
|
|
@ -121,7 +121,7 @@ const Page = () => {
|
|||
/>
|
||||
</Card>
|
||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width, y: "calc( 100vh - 400px )" }} />
|
||||
<Table columns={columns} rowKey="inx" {...tableProps} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -129,9 +129,12 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
|
|||
formType = 1
|
||||
}
|
||||
if (type == 'save') {
|
||||
form.setFieldsValue(formJsonData)
|
||||
formType = 0
|
||||
}
|
||||
if (formType == 1 || formType == 2 || formType == 3) {
|
||||
console.log(formJsonData,'456778');
|
||||
|
||||
form.setFieldsValue(formJsonData)
|
||||
if (formJsonData?.[fileKey]) {
|
||||
setFileList(formJsonData[fileKey])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
|
||||
import BasicCrudModal from '../../../components/crud/BasicCrudModal';
|
||||
import { Table, Card, Modal, Form, Input, Button, Row, Col, Timeline, message, Tabs, Image } from 'antd';
|
||||
import { FileWordOutlined, FilePdfOutlined, FileZipOutlined, FileExcelOutlined } from '@ant-design/icons';
|
||||
import { FileWordOutlined, FilePdfOutlined, FileZipOutlined, PaperClipOutlined } from '@ant-design/icons';
|
||||
import { useSelector } from 'react-redux';
|
||||
import ToolBar from './toolbar';
|
||||
import ModalForm from './form';
|
||||
|
|
@ -9,6 +9,8 @@ import apiurl from '../../../service/apiurl';
|
|||
import usePageTable from '../../../components/crud/usePageTable2';
|
||||
import { createCrudService } from '../../../components/crud/_';
|
||||
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
|
||||
import { httpgetExport } from '../../../utils/request';
|
||||
import { exportFile } from '../../../utils/tools';
|
||||
|
||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||
const obj={0:"党支部工作制度",1:"行政工作制度",2:"部门工作制度",3:"安全管理制度",4:"工程管理制度",5:"技术规程",6:"岗位责任制"}
|
||||
|
|
@ -24,24 +26,24 @@ const Page = () => {
|
|||
const [isFetch, setIsFetch] = useState(false)
|
||||
const columns = [
|
||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
||||
{ title: '标题', key: 'name', dataIndex: 'name', ellipsis: true },
|
||||
{
|
||||
title: '制度类型', key: 'type', dataIndex: 'type', width: 140,render:(v)=><>{obj[v]}</>
|
||||
title: '制度类型', key: 'type', dataIndex: 'type',render:(v)=><>{obj[v]}</>
|
||||
},
|
||||
{
|
||||
title: '发布日期', key: 'releaseDate', dataIndex: 'releaseDate', width: 300
|
||||
title: '发布日期', key: 'releaseDate', dataIndex: 'releaseDate'
|
||||
},
|
||||
{
|
||||
title: '发布单位', key: 'fillUnit', dataIndex: 'fillUnit', width: 300
|
||||
title: '发布单位', key: 'fillUnit', dataIndex: 'fillUnit'
|
||||
},
|
||||
{
|
||||
title: '上传时间', key: 'uploadDate', dataIndex: 'uploadDate', width: 300
|
||||
title: '上传时间', key: 'uploadDate', dataIndex: 'uploadDate'
|
||||
},
|
||||
{
|
||||
title: '附件', key: 'files', dataIndex: 'files', width: 300,render:(v,r)=><a onClick={()=>viewPdf(v[0].fileId)}>{v[0]?.fileName}</a>
|
||||
title: '附件', key: 'files', dataIndex: 'files', render:(v,r)=><a onClick={()=>download(v[0].fileId,v[0]?.fileName)}><PaperClipOutlined />{v[0]?.fileName}</a>
|
||||
},
|
||||
{
|
||||
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
||||
title: '操作', key: 'operation', fixed: 'right', align: 'center',
|
||||
render: (value, row, index) => (
|
||||
<CrudOpRender_text
|
||||
edit={true}
|
||||
|
|
@ -76,7 +78,16 @@ const Page = () => {
|
|||
refresh()
|
||||
setIsFetch(!isFetch)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 文件下载
|
||||
* @param {String} params 文件fileId
|
||||
*/
|
||||
const download = async(id, name) => {
|
||||
var extension = name?.split('.').pop().toLowerCase();
|
||||
httpgetExport(apiurl.zdgl.download+id).then(res => {
|
||||
exportFile(name,res.data)
|
||||
})
|
||||
}
|
||||
const viewPdf = (params) => {
|
||||
setIframeSrc(params)
|
||||
setPdfViewOPen(true)
|
||||
|
|
@ -103,7 +114,7 @@ const Page = () => {
|
|||
/>
|
||||
</Card>
|
||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width, y: "calc( 100vh - 400px )" }} />
|
||||
<Table columns={columns} rowKey="inx" {...tableProps} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
|||
const [showGj, setShowGj] = useState(false)
|
||||
const onFinish = (values) => {
|
||||
let dataSo;
|
||||
if (values.tm) {
|
||||
if (values.releaseDate) {
|
||||
dataSo = {
|
||||
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||
stm: moment(values.releaseDate[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||
etm: moment(values.releaseDate[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
}
|
||||
delete values.tm
|
||||
setSearchVal({ ...values, dataSo });
|
||||
delete values.releaseDate
|
||||
setSearchVal({ ...values, ...dataSo });
|
||||
}
|
||||
|
||||
const opntios = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue