Compare commits

..

2 Commits

Author SHA1 Message Date
francis-fh
e5a41feea9 111
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
2026-06-17 01:07:44 +08:00
francis-fh
37e3f3bd6b 11 2026-06-17 00:27:11 +08:00
4 changed files with 55 additions and 20 deletions

View File

@@ -10,15 +10,16 @@ const Footer: React.FC = () => {
background: 'none',
}}
links={[
// {
// key: '石河子政务网',
// title: '石河子政务网',
// href: 'http://www.qingdao.gov.cn/',
// blankTarget: true,
// },
{
key: '石河子政务网',
title: '石河子政务网',
href: 'http://www.qingdao.gov.cn/',
blankTarget: true,
},{
key: '石河子人社局',
title: '石河子人社局',
href: 'https://hrss.qingdao.gov.cn/',
title: '新疆生产建设兵团第八师人力资源和社会保障局',
href: 'http://rsj.xjbt.gov.cn/c/2023-11-10/8310036.shtml',
blankTarget: true,
},
]}

View File

@@ -206,12 +206,14 @@ export const CompanyDetailView = ({
onCancel,
record,
scaleEnum,
industryEnum,
loading,
}: {
open: boolean;
onCancel: () => void;
record?: API.CompanyList.Company;
scaleEnum?: DictValueEnumObj;
industryEnum?: DictValueEnumObj;
loading?: boolean;
}) => {
const contacts = record?.companyContactList?.filter(
@@ -253,8 +255,8 @@ export const CompanyDetailView = ({
<DictTag enums={scaleEnum} value={record.scale} />
)}
{statusTag}
{record?.industry ? (
<span className="company-detail__industry">{record.industry}</span>
{record?.industry != null && record.industry !== '' ? (
<DictTag enums={industryEnum} value={record.industry} />
) : null}
</div>
</div>

View File

@@ -1,6 +1,6 @@
import React, { Fragment, useEffect, useRef, useState } from 'react';
import { FormattedMessage, useAccess } from '@umijs/max';
import { Button, FormInstance, message, Modal } from 'antd';
import { Button, FormInstance, message, Modal, Tag } from 'antd';
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
import { DeleteOutlined, FormOutlined, PlusOutlined, AlignLeftOutlined, AuditOutlined } from '@ant-design/icons';
import EditCompanyListRow, { CompanyDetailView } from './edit';
@@ -14,7 +14,8 @@ import {
putCmsCompanyList,
} from '@/services/company/list';
import { getDictValueEnum } from '@/services/system/dict';
import DictTag from '@/components/DictTag';
import { getCmsIndustryTreeList } from '@/services/classify/industry';
import DictTag, { DictValueEnumObj } from '@/components/DictTag';
import { postCompanyApproval } from '@/services/company/review';
const buildListSearchParams = (values: Record<string, any>): API.CompanyList.Params => {
@@ -36,6 +37,25 @@ const loadCompanyDetail = async (record: API.CompanyList.Company) => {
return { ...record, ...detail };
};
/** 将行业树数据展平为 DictValueEnumObj */
const flattenIndustryTree = (tree: { id: number; label: string; children?: any[] }[]): DictValueEnumObj => {
const map: DictValueEnumObj = {};
const walk = (nodes: { id: number; label: string; children?: any[] }[]) => {
nodes?.forEach((node) => {
map[node.id] = {
text: node.label,
label: node.label,
value: node.id,
};
if (node.children?.length) {
walk(node.children);
}
});
};
walk(tree);
return map;
};
function ManagementList() {
const access = useAccess();
@@ -48,6 +68,7 @@ function ManagementList() {
const [detailLoading, setDetailLoading] = useState<boolean>(false);
const [detailData, setDetailData] = useState<API.CompanyList.Company | undefined>();
const [scaleEnum, setScaleEnum] = useState<Record<string, any>>({});
const [industryEnum, setIndustryEnum] = useState<DictValueEnumObj>({});
const [approvalVisible, setApprovalVisible] = useState<boolean>(false);
const [approvalStatus, setApprovalStatus] = useState<1 | 2>(1);
const [approvalReason, setApprovalReason] = useState<string>('');
@@ -89,6 +110,11 @@ function ManagementList() {
getDictValueEnum('scale', true, true).then((data) => {
setScaleEnum(data);
});
getCmsIndustryTreeList().then((res) => {
if (res?.data) {
setIndustryEnum(flattenIndustryTree(res.data));
}
});
}, []);
const columns: ProColumns<API.CompanyList.Company>[] = [
@@ -118,6 +144,9 @@ function ManagementList() {
dataIndex: 'industry',
valueType: 'text',
align: 'center',
render: (_, record) => {
return <DictTag enums={industryEnum} value={record.industry} />;
},
},
{
title: '公司规模',
@@ -142,16 +171,17 @@ function ManagementList() {
valueType: 'select',
align: 'center',
valueEnum: {
0: { text: '待审核', status: 'Processing' },
1: { text: '通过', status: 'Success' },
2: { text: '驳回', status: 'Error' },
},
render: (_, record) => {
if (record.status === 1) {
return <span style={{ color: '#52c41a' }}></span>;
return <Tag color="success"></Tag>;
} else if (record.status === 2) {
return <span style={{ color: '#ff4d4f' }}></span>;
return <Tag color="error"></Tag>;
}
return <span style={{ color: '#999' }}></span>;
return <Tag color="orange"></Tag>;
},
},
{
@@ -186,7 +216,7 @@ function ManagementList() {
size="small"
key="detail"
icon={<AlignLeftOutlined />}
hidden={!access.hasPerms('area:business:List.view')}
hidden={!access.hasPerms('cms:company:query')}
onClick={async () => {
setDetailData({ ...record });
setDetailVisible(true);
@@ -208,7 +238,7 @@ function ManagementList() {
size="small"
key="edit"
icon={<FormOutlined />}
hidden={!access.hasPerms('area:business:List.update')}
hidden={!access.hasPerms('cms:company:edit')}
onClick={async () => {
const hide = message.loading('正在加载详情');
try {
@@ -228,6 +258,7 @@ function ManagementList() {
type="link"
size="small"
key="approval"
hidden={!access.hasPerms('sys:company:approval')}
icon={<AuditOutlined />}
onClick={() => {
setCurrentRow(record);
@@ -244,7 +275,7 @@ function ManagementList() {
danger
key="batchRemove"
icon={<DeleteOutlined />}
hidden={!access.hasPerms('area:subway:List')}
hidden={!access.hasPerms('cms:company:remove')}
onClick={async () => {
Modal.confirm({
title: '删除',
@@ -290,7 +321,7 @@ function ManagementList() {
<Button
type="primary"
key="add"
hidden={!access.hasPerms('manage:List:add')}
hidden={!access.hasPerms('cms:company:add')}
onClick={async () => {
setCurrentRow(undefined);
setModalVisible(true);
@@ -301,7 +332,7 @@ function ManagementList() {
<Button
type="primary"
key="export"
hidden={!access.hasPerms('system:user:export')}
hidden={!access.hasPerms('cms:company:export')}
onClick={async () => {
const searchVal = formTableRef.current?.getFieldsValue();
handleExport(buildListSearchParams(searchVal || {}));
@@ -347,6 +378,7 @@ function ManagementList() {
}}
record={detailData}
scaleEnum={scaleEnum}
industryEnum={industryEnum}
/>
<Modal

View File

@@ -383,7 +383,7 @@ function ManagementList() {
<Button
type="primary"
key="add"
hidden={!access.hasPerms('manage:List:add')}
hidden={!access.hasPerms('bussiness:job:add')}
onClick={async () => {
setCurrentRow(undefined);
setModalVisible(true);