营业执照上传开发
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { useAccess } from '@umijs/max';
|
||||
import { Button, message, Modal } from 'antd';
|
||||
import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
updatePolicyInfo,
|
||||
deletePolicyInfo,
|
||||
} from '@/services/cms/policyInfo';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import DictTag, { DictValueEnumObj } from '@/components/DictTag';
|
||||
import EditModal from './components/EditModal';
|
||||
import DetailModal from './components/DetailModal';
|
||||
|
||||
@@ -20,6 +22,13 @@ const PolicyMgmt: React.FC = () => {
|
||||
const [detailModalVisible, setDetailModalVisible] = useState(false);
|
||||
const [currentRow, setCurrentRow] = useState<API.PolicyInfo.PolicyInfoItem>();
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
const [userTypeEnum, setUserTypeEnum] = useState<DictValueEnumObj>({});
|
||||
|
||||
useEffect(() => {
|
||||
getDictValueEnum('user_type', false, true).then((data) => {
|
||||
setUserTypeEnum(data);
|
||||
});
|
||||
}, []);
|
||||
|
||||
const handleDelete = async (ids: string) => {
|
||||
Modal.confirm({
|
||||
@@ -56,6 +65,25 @@ const PolicyMgmt: React.FC = () => {
|
||||
hideInSearch: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '标签',
|
||||
dataIndex: 'policyTag',
|
||||
hideInSearch: true,
|
||||
width: 160,
|
||||
render: (_, record) => {
|
||||
if (!record.policyTag) {
|
||||
return '-';
|
||||
}
|
||||
const tags = String(record.policyTag).split(',').filter(Boolean);
|
||||
return (
|
||||
<span style={{ display: 'flex', flexWrap: 'wrap', gap: 4 }}>
|
||||
{tags.map((tag) => (
|
||||
<DictTag key={tag} enums={userTypeEnum} value={tag.trim()} />
|
||||
))}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '发文单位',
|
||||
dataIndex: 'sourceUnit',
|
||||
|
||||
Reference in New Issue
Block a user