Merge pull request 'develop' (#25) from develop into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m55s
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m55s
Reviewed-on: #25
This commit is contained in:
commit
bd77179459
@ -6,19 +6,33 @@ import {
|
|||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useSearchParams } from '@umijs/max';
|
import { useNavigate, useSearchParams } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import Create from '../modals/JinGangQuCreate';
|
import Create from '../modals/JinGangQuCreate';
|
||||||
import Update from '../modals/JinGangQuUpdate';
|
import Update from '../modals/JinGangQuUpdate';
|
||||||
|
|
||||||
export default function Index({ title = '金刚区配置' }) {
|
export default function Index({ title = '金刚区配置' }) {
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
|
const navigate = useNavigate();
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
title={title}
|
title={title}
|
||||||
enableTabs={true}
|
enableTabs={true}
|
||||||
tabKey={`company-set-gan-info-${searchParams.get('id')}`}
|
tabKey={`company-set-gan-info-${searchParams.get('id')}`}
|
||||||
tabLabel={title}
|
tabLabel={title}
|
||||||
|
extra={[
|
||||||
|
<Space
|
||||||
|
key="back"
|
||||||
|
align="center"
|
||||||
|
style={{ marginRight: 20, padding: '10px 0 0 0' }}
|
||||||
|
>
|
||||||
|
<MyButtons.Default
|
||||||
|
title="返回上一页"
|
||||||
|
size="middle"
|
||||||
|
onClick={() => navigate(-1)}
|
||||||
|
/>
|
||||||
|
</Space>,
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<ProTable
|
<ProTable
|
||||||
{...MyProTableProps.props}
|
{...MyProTableProps.props}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { defaultMenu } from '@/common/utils/wxCustomerConfig';
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { CaretDownOutlined } from '@ant-design/icons';
|
import { CaretDownOutlined } from '@ant-design/icons';
|
||||||
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
import { useSearchParams } from '@umijs/max';
|
import { useNavigate, useSearchParams } from '@umijs/max';
|
||||||
import { Card, Col, Flex, Form, message, Row, Space, Tag } from 'antd';
|
import { Card, Col, Flex, Form, message, Row, Space, Tag } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
@ -24,6 +24,7 @@ interface FormData {
|
|||||||
|
|
||||||
export default function Index({ title = '小程序页面配置' }) {
|
export default function Index({ title = '小程序页面配置' }) {
|
||||||
const [form] = Form.useForm<FormData>();
|
const [form] = Form.useForm<FormData>();
|
||||||
|
const navigate = useNavigate();
|
||||||
const [menuIndex, setMenuIndex] = useState<number>(0);
|
const [menuIndex, setMenuIndex] = useState<number>(0);
|
||||||
const [getShowData, setShowData] = useState<any>({});
|
const [getShowData, setShowData] = useState<any>({});
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
@ -49,7 +50,8 @@ export default function Index({ title = '小程序页面配置' }) {
|
|||||||
const handleValuesChange = (row: FormData) => {
|
const handleValuesChange = (row: FormData) => {
|
||||||
console.log('row', row);
|
console.log('row', row);
|
||||||
let data: ApiTypes.Company.CompanyConfigs.Store = {
|
let data: ApiTypes.Company.CompanyConfigs.Store = {
|
||||||
companies_id: Number(searchParams.get('id')) || 0,
|
// companies_id: Number(searchParams.get('id')) || 0,
|
||||||
|
companies_id: 4,
|
||||||
config_key: 'Theme',
|
config_key: 'Theme',
|
||||||
config_value: {
|
config_value: {
|
||||||
color: formValues?.color,
|
color: formValues?.color,
|
||||||
@ -65,7 +67,8 @@ export default function Index({ title = '小程序页面配置' }) {
|
|||||||
if (getShowData?.id) {
|
if (getShowData?.id) {
|
||||||
Apis.Company.CompanyConfigs.Update({
|
Apis.Company.CompanyConfigs.Update({
|
||||||
...data,
|
...data,
|
||||||
id: getShowData?.id || 0,
|
// id: getShowData?.id || 0,
|
||||||
|
id: 2,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
message.success('保存成功');
|
message.success('保存成功');
|
||||||
});
|
});
|
||||||
@ -120,6 +123,19 @@ export default function Index({ title = '小程序页面配置' }) {
|
|||||||
enableTabs={true}
|
enableTabs={true}
|
||||||
tabKey="company-set-page-info"
|
tabKey="company-set-page-info"
|
||||||
tabLabel={title}
|
tabLabel={title}
|
||||||
|
extra={[
|
||||||
|
<Space
|
||||||
|
key="back"
|
||||||
|
align="center"
|
||||||
|
style={{ marginRight: 20, padding: '10px 0 0 0' }}
|
||||||
|
>
|
||||||
|
<MyButtons.Default
|
||||||
|
title="返回上一页"
|
||||||
|
size="middle"
|
||||||
|
onClick={() => navigate(-1)}
|
||||||
|
/>
|
||||||
|
</Space>,
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div className="page-config-container">
|
<div className="page-config-container">
|
||||||
<Row gutter={[24, 0]}>
|
<Row gutter={[24, 0]}>
|
||||||
@ -273,10 +289,10 @@ export default function Index({ title = '小程序页面配置' }) {
|
|||||||
},
|
},
|
||||||
formItemProps: {
|
formItemProps: {
|
||||||
onChange: () => {
|
onChange: () => {
|
||||||
let formValues = form.getFieldsValue();
|
let formMenuValues = form.getFieldsValue();
|
||||||
setFormValues({
|
setFormValues({
|
||||||
...formValues,
|
...formValues,
|
||||||
menu: formValues?.menu,
|
menu: formMenuValues?.menu,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user