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.
 
 
 
 

37 lines
3.6 KiB

import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Col, Divider, Upload } from 'antd';
import React from 'react';
import { CardForm, DescriptionsDetail } from '@component/ui';
import { ProDescriptions, ProFormRate, ProTable, } from '@ant-design/pro-components';
import moment from 'moment';
import { formatImageUrl } from '@component/utils';
import { getDetail } from './action';
import { useRequest } from 'ahooks';
import { PreviewFile } from '@component/ui';
export default function ({ id, type }) {
const { data, loading } = useRequest(getDetail, {
defaultParams: {
serviceRelationId: id,
type,
},
});
return (_jsxs(_Fragment, { children: [_jsx(CardForm, Object.assign({ loading: loading, title: "\u670D\u52A1\u8BC4\u4EF7\u8868\u5355", gutter: [10, 10] }, { children: _jsx(Col, Object.assign({ span: 24 }, { children: _jsx(ProTable, { bordered: true, columns: [
{ title: '评价内容', dataIndex: 'itemValName', width: '50%' },
{
title: '服务评价',
dataIndex: 'itemValCode',
width: '50%',
render: (_, record) => {
if (record.method == '2') {
return (_jsx(ProFormRate, { readonly: true, noStyle: true, fieldProps: {
value: record.itemValCode,
allowHalf: false,
} }));
}
return record.itemValCode;
},
},
], options: false, toolbar: null, search: false, dataSource: data === null || data === void 0 ? void 0 : data.answerList, rowKey: "visitRecordId", pagination: false }) })) })), _jsx(Divider, { className: "self-pro-divider" }), _jsx(CardForm, Object.assign({ loading: loading, title: "\u603B\u4F53\u8BC4\u5206", gutter: [10, 10] }, { children: _jsx(Col, Object.assign({ span: 24 }, { children: _jsx(ProFormRate, { readonly: true, label: "\u5BF9\u672C\u6B21\u670D\u52A1\u7684\u603B\u4F53\u8BC4\u5206\uFF1F", name: "serviceScore", fieldProps: { value: data === null || data === void 0 ? void 0 : data.serviceScore, allowHalf: false } }) })) })), _jsx(Divider, { className: "self-pro-divider" }), _jsx(CardForm, Object.assign({ loading: loading, title: "\u8BC4\u4EF7\u4FE1\u606F", gutter: [10, 10] }, { children: _jsx(Col, Object.assign({ span: 24 }, { children: _jsxs(DescriptionsDetail, Object.assign({ column: 2, layout: "horizontal" }, { children: [_jsx(ProDescriptions.Item, Object.assign({ label: "\u8BC4\u4EF7\u4EBA" }, { children: data === null || data === void 0 ? void 0 : data.reviewName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u8BC4\u4EF7\u65F6\u95F4" }, { children: (data === null || data === void 0 ? void 0 : data.reviewDate)
? moment(data.reviewDate).format('YYYY-MM-DD')
: '' })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u5907\u6CE8", span: 2 }, { children: data === null || data === void 0 ? void 0 : data.reviewRemarks })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u9644\u4EF6" }, { children: _jsx(PreviewFile, { disabled: true, listType: "picture-card", fileList: formatImageUrl(data === null || data === void 0 ? void 0 : data.reviewAtts) }) }))] })) })) }))] }));
}