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.
 
 
 
 

46 lines
1.9 KiB

import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { useServiceContext } from '../../context';
import { ProTable } from '@ant-design/pro-components';
import { getList } from './action';
import { dateFormatter } from '@component/utils';
import Detail from './detail';
import { Button, Modal } from 'antd';
import React from 'react';
import { useState } from 'react';
export default function () {
const { serviceId, service_type } = useServiceContext();
const [visible, setVisible] = useState(false);
const columns = [
{
title: '评价人',
dataIndex: 'reviewName',
},
{
title: '评价企业',
dataIndex: 'serviceObjectName',
},
{
title: '评分',
dataIndex: 'serviceScore',
},
{
title: '评价时间',
dataIndex: 'reviewDate',
renderText: dateFormatter,
},
{
title: '操作',
render: (_, record) => (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ type: "link", onClick: () => setVisible(true) }, { children: "\u8BE6\u60C5" })), _jsx(Modal, Object.assign({ open: visible, title: "\u8BE6\u60C5", width: "80%", onOk: () => setVisible(false), onCancel: () => setVisible(false), closable: false, bodyStyle: {
height: 400,
overflowY: 'scroll',
overflowX: 'hidden',
} }, { children: _jsx(Detail, { id: record.serviceRelationId, type: "2" }) }))] })),
},
];
if (service_type == 'jizhongfuwu') {
return (_jsx(ProTable, { request: getList, params: {
serviceId,
}, columns: columns, search: false, toolBarRender: false }));
}
return _jsx(Detail, { id: serviceId, type: "2" });
}