修改样式

This commit is contained in:
linxd
2025-07-16 15:10:42 +08:00
parent 38304c5f5b
commit 0fcd597275
11 changed files with 49 additions and 22 deletions

View File

@ -1,5 +1,5 @@
.evaluate-template-table { .evaluate-template-table {
margin-top: 16px; // margin-top: 16px;
.action-buttons { .action-buttons {
display: flex; display: flex;

View File

@ -611,8 +611,16 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
const filterColumns = (col: any) => { const filterColumns = (col: any) => {
if (isDetail) { if (isDetail) {
// 如果是详情,过滤掉操作列 // 如果是详情,过滤掉操作列 过滤掉是否可编辑列
if (col.key === 'level1Action') { if (
[
'level1Action',
'indicatorStEditST',
'baseIndicatorEditST',
'descIndicatorEditST',
'scoreEditST',
].includes(col.key)
) {
return false; return false;
} }
} }
@ -685,7 +693,6 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
dataIndex: 'index', dataIndex: 'index',
align: 'center', align: 'center',
key: 'index', key: 'index',
width: 50,
render: (_: any, record: TableRowItem, index: number) => { render: (_: any, record: TableRowItem, index: number) => {
return <>{index + 1}</>; return <>{index + 1}</>;
}, },
@ -695,7 +702,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
dataIndex: 'indicatorType', dataIndex: 'indicatorType',
align: 'center', align: 'center',
key: 'indicatorType', key: 'indicatorType',
width: 120, ellipsis: true, // 自动加省略号
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
return renderWithRowSpan(text, record, (cellContent) => { return renderWithRowSpan(text, record, (cellContent) => {
if (isDetail) { if (isDetail) {
@ -733,6 +740,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
align: 'center', align: 'center',
dataIndex: 'baseIndicator', dataIndex: 'baseIndicator',
key: 'baseIndicator', key: 'baseIndicator',
ellipsis: true, // 自动加省略号
width: 150, width: 150,
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
return renderWithRowSpan(text, record, (cellContent) => { return renderWithRowSpan(text, record, (cellContent) => {
@ -756,6 +764,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
// (0.是、1.否 int类型) // (0.是、1.否 int类型)
title: '是否可编辑', title: '是否可编辑',
align: 'center', align: 'center',
ellipsis: true, // 自动加省略号
dataIndex: 'baseIndicatorEditST', dataIndex: 'baseIndicatorEditST',
key: 'baseIndicatorEditST', key: 'baseIndicatorEditST',
width: 50, width: 50,
@ -780,7 +789,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
align: 'center', align: 'center',
dataIndex: 'descIndicator', dataIndex: 'descIndicator',
key: 'descIndicator', key: 'descIndicator',
width: 200, width: 100,
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
return renderWithRowSpan(text, record, (cellContent) => { return renderWithRowSpan(text, record, (cellContent) => {
if (isDetail) { if (isDetail) {
@ -803,6 +812,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
// (0.是、1.否 int类型) // (0.是、1.否 int类型)
title: '是否可编辑', title: '是否可编辑',
align: 'center', align: 'center',
ellipsis: true, // 自动加省略号
dataIndex: 'descIndicatorEditST', dataIndex: 'descIndicatorEditST',
key: 'descIndicatorEditST', key: 'descIndicatorEditST',
width: 50, width: 50,
@ -829,7 +839,8 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
align: 'center', align: 'center',
dataIndex: 'stScore', dataIndex: 'stScore',
key: 'stScore', key: 'stScore',
width: 80, width: 100,
ellipsis: true, // 自动加省略号
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
return renderWithRowSpan(text, record, (cellContent) => { return renderWithRowSpan(text, record, (cellContent) => {
if (isDetail) { if (isDetail) {
@ -852,6 +863,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
// (0.是、1.否 int类型) // (0.是、1.否 int类型)
title: '是否可编辑', title: '是否可编辑',
align: 'center', align: 'center',
ellipsis: true, // 自动加省略号
dataIndex: 'scoreEditST', dataIndex: 'scoreEditST',
key: 'scoreEditST', key: 'scoreEditST',
width: 50, width: 50,
@ -928,6 +940,7 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
align: 'center', align: 'center',
dataIndex: 'indicatorStEditST', dataIndex: 'indicatorStEditST',
key: 'indicatorStEditST', key: 'indicatorStEditST',
ellipsis: true, // 自动加省略号
width: 50, width: 50,
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
return renderWithRowSpan(text, record, (cellContent) => { return renderWithRowSpan(text, record, (cellContent) => {
@ -956,7 +969,8 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
dataIndex: 'subIndicator', dataIndex: 'subIndicator',
key: 'subIndicator', key: 'subIndicator',
align: 'center', align: 'center',
width: 200, ellipsis: true, // 自动加省略号
width: 150,
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
if (isDetail) { if (isDetail) {
return text || '-'; return text || '-';
@ -977,8 +991,9 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
title: intl.formatMessage({ id: 'supplierTemplateManage.evaluateTable.score' }), title: intl.formatMessage({ id: 'supplierTemplateManage.evaluateTable.score' }),
dataIndex: 'ndScore', dataIndex: 'ndScore',
key: 'ndScore', key: 'ndScore',
width: 80, ellipsis: true, // 自动加省略号
align: 'center', align: 'center',
width: 100,
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
if (isDetail) { if (isDetail) {
return text || '-'; return text || '-';
@ -1025,6 +1040,8 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
dataIndex: 'descScore', dataIndex: 'descScore',
align: 'center', align: 'center',
key: 'descScore', key: 'descScore',
ellipsis: true, // 自动加省略号
width: 150,
render: (text: string, record: TableRowItem) => { render: (text: string, record: TableRowItem) => {
if (isDetail) { if (isDetail) {
return text || '-'; return text || '-';

View File

@ -3,7 +3,7 @@ import { useState } from "react";
// 获取用户信息 这里没用dva, 因为包装组件写法复杂(当前框架),尤其是有form表单组件时 // 获取用户信息 这里没用dva, 因为包装组件写法复杂(当前框架),尤其是有form表单组件时
export const useUser = () => { export const useUser = () => {
const [user, setUser] = useState<any>({ const [user, setUser] = useState<any>({
role: 'admin1', // 模拟用户权限 role: 'admin', // 模拟用户权限
userId: '1234567890', userId: '1234567890',
}); });
const getUserInfo = ()=>{ const getUserInfo = ()=>{

View File

@ -194,11 +194,11 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
<Col span={8}> <Col span={8}>
<Form.Item <Form.Item
name={['coscoSupplierBase', 'enterpriseType']} name={['coscoSupplierBase', 'enterpriseType']}
label="企业类" label="企业类"
rules={[{ required: true, message: '请选择企业类' }]} rules={[{ required: true, message: '请选择企业类' }]}
> >
<Select <Select
placeholder="请选择企业类" placeholder="请选择企业类"
options={companyTypeOptions.map((item) => ({ options={companyTypeOptions.map((item) => ({
label: item.dicName, label: item.dicName,
value: item.code, value: item.code,

View File

@ -199,11 +199,11 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
<Col span={8}> <Col span={8}>
<Form.Item <Form.Item
name={['coscoSupplierBase', 'enterpriseType']} name={['coscoSupplierBase', 'enterpriseType']}
label="企业类" label="企业类"
rules={[{ required: true, message: '请选择企业类' }]} rules={[{ required: true, message: '请选择企业类' }]}
> >
<Select <Select
placeholder="请选择企业类" placeholder="请选择企业类"
options={companyTypeOptions.map(item => ({ options={companyTypeOptions.map(item => ({
label: item.dicName, label: item.dicName,
value: item.code, value: item.code,

View File

@ -11,6 +11,9 @@
:global(.ant-card-head) { :global(.ant-card-head) {
background-color: #fafafa; background-color: #fafafa;
} }
:global(.ant-card-body) {
padding: 0;
}
} }
.formActions { .formActions {
@ -48,13 +51,15 @@
.detail-card { .detail-card {
margin-bottom: 16px; margin-bottom: 16px;
:global(.ant-card-body) {
padding: 0;
}
} }
.indicator-table { .indicator-table {
margin-top: 16px; // margin-top: 16px;
} }
.status-tag { .status-tag {
margin-right: 0; margin-right: 0;
} }

View File

@ -446,7 +446,6 @@ const SupplierAnnualTemplateManageAdd: React.FC<PageProps> = ({ breadcrumb, disp
<Card <Card
title={intl.formatMessage({ id: 'supplierAnnualTemplateManage.add.basicInfo' })} title={intl.formatMessage({ id: 'supplierAnnualTemplateManage.add.basicInfo' })}
bordered={false} bordered={false}
className={styles.innerCard}
> >
<Row gutter={24}> <Row gutter={24}>
<Col span={8}> <Col span={8}>

View File

@ -133,7 +133,7 @@ const SupplierAnnualTemplateManageDetail: React.FC = () => {
{templateDetail ? ( {templateDetail ? (
<> <>
<Card title={intl.formatMessage({ id: 'supplierAnnualTemplateManage.add.basicInfo' })} bordered={false} className={styles['detail-card']}> <Card title={intl.formatMessage({ id: 'supplierAnnualTemplateManage.add.basicInfo' })} bordered={false} className={styles['detail-card']}>
<Descriptions column={2} bordered> <Descriptions column={2} bordered style={{marginTop: 16}}>
<Descriptions.Item label={intl.formatMessage({ id: 'supplierAnnualTemplateManage.list.templateName' })}> <Descriptions.Item label={intl.formatMessage({ id: 'supplierAnnualTemplateManage.list.templateName' })}>
{templateDetail.templateName} {templateDetail.templateName}
</Descriptions.Item> </Descriptions.Item>

View File

@ -12,6 +12,9 @@
:global(.ant-card-head) { :global(.ant-card-head) {
background-color: #fafafa; background-color: #fafafa;
} }
:global(.ant-card-body) {
padding: 0;
}
} }
.template-indicator-card { .template-indicator-card {

View File

@ -427,7 +427,7 @@ const SupplierTemplateManageAdd: React.FC<PageProps> = ({ breadcrumb, dispatch }
<Card <Card
title={intl.formatMessage({ id: 'supplierTemplateManage.card.basicInfo' })} title={intl.formatMessage({ id: 'supplierTemplateManage.card.basicInfo' })}
bordered={false} bordered={false}
className={styles.innerCard} // className={styles.innerCard}
> >
<Row gutter={24}> <Row gutter={24}>
<Col span={8}> <Col span={8}>

View File

@ -5,6 +5,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
import { getTemplateDetail } from '@/servers/api/supplierEvaluate'; import { getTemplateDetail } from '@/servers/api/supplierEvaluate';
import { TemplateStatusText, CategoryLimitationTypeText } from '@/dicts/supplierTemplateDict'; import { TemplateStatusText, CategoryLimitationTypeText } from '@/dicts/supplierTemplateDict';
import EvaluateTemplateTable from '@/components/EvaluateTemplateTable'; import EvaluateTemplateTable from '@/components/EvaluateTemplateTable';
import styles from './supplierTemplateManage.less';
const { Title } = Typography; const { Title } = Typography;
@ -84,8 +85,9 @@ const SupplierTemplateManageDetail: React.FC = () => {
<Card <Card
title={intl.formatMessage({ id: 'supplierTemplateManage.detail.card.basicInfo' })} title={intl.formatMessage({ id: 'supplierTemplateManage.detail.card.basicInfo' })}
bordered={false} bordered={false}
className={styles.innerCard}
> >
<Descriptions column={2} bordered> <Descriptions column={2} bordered style={{marginTop: 16}}>
<Descriptions.Item <Descriptions.Item
label={intl.formatMessage({ label={intl.formatMessage({
id: 'supplierTemplateManage.detail.label.templateName', id: 'supplierTemplateManage.detail.label.templateName',
@ -139,6 +141,7 @@ const SupplierTemplateManageDetail: React.FC = () => {
<Card <Card
title={intl.formatMessage({ id: 'supplierTemplateManage.detail.card.indicators' })} title={intl.formatMessage({ id: 'supplierTemplateManage.detail.card.indicators' })}
bordered={false} bordered={false}
className={styles.innerCard}
> >
{templateData.length > 0 ? ( {templateData.length > 0 ? (
<EvaluateTemplateTable value={templateData} isDetail={true} /> <EvaluateTemplateTable value={templateData} isDetail={true} />