修改样式

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 {
margin-top: 16px;
// margin-top: 16px;
.action-buttons {
display: flex;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -133,7 +133,7 @@ const SupplierAnnualTemplateManageDetail: React.FC = () => {
{templateDetail ? (
<>
<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' })}>
{templateDetail.templateName}
</Descriptions.Item>

View File

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

View File

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

View File

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