@@ -104,7 +104,7 @@ export default function Show({ title }: { title?: string } = {}) {
}
>
- * 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用;
+ * 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用、品牌;
diff --git a/src/pages/company/index.tsx b/src/pages/company/auto/index.tsx
similarity index 96%
rename from src/pages/company/index.tsx
rename to src/pages/company/auto/index.tsx
index 882bc74..42190a8 100644
--- a/src/pages/company/index.tsx
+++ b/src/pages/company/auto/index.tsx
@@ -9,9 +9,9 @@ import { Apis } from '@/gen/Apis';
import { ProTable } from '@ant-design/pro-components';
import { useNavigate } from '@umijs/max';
import { Space } from 'antd';
-import ComponentsInfo from './components/ComponentsInfo';
import CompanyCreate from './modals/CompanyCreate';
import CompanyUpdate from './modals/CompanyUpdate';
+import ComponentsInfo from './table/ComponentsInfo';
export default function Index({ title = '机构列表' }) {
const navigate = useNavigate();
@@ -77,7 +77,7 @@ export default function Index({ title = '机构列表' }) {
title="配置"
data-tooltip-position="top"
onClick={() => {
- navigate(`/company/${item.id}`);
+ navigate(`/company/auto/${item.id}`);
}}
/>
[
- (
-
+
+ MyProTableProps.request(
+ params,
+ sort,
+ Apis.Company.CompanyPropertyBrands.List,
+ )
+ }
+ toolBarRender={(action) => [
+ ,
+ ]}
+ columns={[
+ MyColumns.ID(),
+ {
+ title: '机构',
+ dataIndex: ['company', 'name'],
+ search: false,
+ },
+ {
+ title: '物业名称',
+ dataIndex: 'name',
+ },
+ {
+ title: 'logo',
+ render: (_, item) => {
+ return (
+
+ {item?.logo?.[0] && (
+
+ )}
+
+ );
+ },
+ },
+ MyColumns.Option({
+ render: (_, item: any, index, action) => (
+
+
+
+ Apis.Company.CompanyPropertyBrands.Delete({
+ id: item.id,
+ }).then(() => action?.reload())
+ }
+ />
+
+ ),
+ }),
+ ]}
+ />
+
+ );
+}
diff --git a/src/pages/company/components/modals/PropertyBrandUpdate.tsx b/src/pages/company/brand/modals/BrandUpdate.tsx
similarity index 100%
rename from src/pages/company/components/modals/PropertyBrandUpdate.tsx
rename to src/pages/company/brand/modals/BrandUpdate.tsx
diff --git a/src/pages/company/components/modals/PropertyBrandsCreate.tsx b/src/pages/company/brand/modals/BrandsCreate.tsx
similarity index 80%
rename from src/pages/company/components/modals/PropertyBrandsCreate.tsx
rename to src/pages/company/brand/modals/BrandsCreate.tsx
index 12189c5..027d4af 100644
--- a/src/pages/company/components/modals/PropertyBrandsCreate.tsx
+++ b/src/pages/company/brand/modals/BrandsCreate.tsx
@@ -5,6 +5,7 @@ import {
MyModalFormProps,
rulesHelper,
} from '@/common';
+import { Selects } from '@/components/Select';
import { Apis } from '@/gen/Apis';
import { BetaSchemaForm } from '@ant-design/pro-components';
import { Form, message } from 'antd';
@@ -28,7 +29,7 @@ export default function Create(props: MyBetaModalFormProps) {
onFinish={async (values) =>
Apis.Company.CompanyPropertyBrands.Store({
...values,
- companies_id: props?.item?.id,
+ companies_id: values?.companies_id || props?.item?.id,
})
.then(() => {
props.reload?.();
@@ -38,6 +39,16 @@ export default function Create(props: MyBetaModalFormProps) {
.catch(() => false)
}
columns={[
+ ...(props?.item?.id
+ ? []
+ : [
+ Selects?.Companies({
+ key: 'companies_id',
+ title: '公司',
+ colProps: { span: 24 },
+ required: true,
+ }),
+ ]),
{
key: 'name',
title: '品牌名称',
diff --git a/src/pages/company/company_apps/index.tsx b/src/pages/company/company_apps/index.tsx
new file mode 100644
index 0000000..022a2f4
--- /dev/null
+++ b/src/pages/company/company_apps/index.tsx
@@ -0,0 +1,92 @@
+import {
+ MyButtons,
+ MyColumns,
+ MyPageContainer,
+ MyProTableProps,
+ usePageTabs,
+} from '@/common';
+import { Apis } from '@/gen/Apis';
+import { ProTable } from '@ant-design/pro-components';
+import { useNavigate } from '@umijs/max';
+import { Image, Space } from 'antd';
+import AppCreate from './modals/AppCreate';
+import AppUpdate from './modals/AppUpdate';
+
+export default function Index({ title = '品牌管理' }) {
+ const navigate = useNavigate();
+
+ // 注册当前页面为标签页
+ usePageTabs({
+ tabKey: 'company-brands',
+ tabLabel: title,
+ });
+
+ return (
+