fix(check)

This commit is contained in:
wang_yp 2025-04-19 13:21:25 +08:00
parent 365b87db92
commit 8fa7d6fa68
5 changed files with 28 additions and 7 deletions

View File

@ -8,7 +8,6 @@ import {
Breadcrumb,
Layout,
Menu,
MenuProps,
theme,
Image,
} from "antd";

View File

@ -24,7 +24,10 @@ export const items: ItemType<MenuItemType>[] = [
label: `城市管理`,
icon: <UserOutlined />,
children: [
{ key: "/city/list", label: `城市管理` },
{
key: "/city/list",
label: `城市管理`,
},
{ key: "/city/hum", label: `人文管理` },
{ key: "/city/history", label: `历史底蕴` },
{ key: "/city/food", label: `地方美食` },

View File

@ -41,7 +41,7 @@ export const formConfig = [
label: "内容",
name: "content",
value: "",
rules: [{ required: true, message: "城市不能为空" }],
rules: [{ required: true, message: "内容不能为空" }],
},
];

View File

@ -1,5 +1,6 @@
import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import { CityConfig } from "@/service/config";
import { ColumnsType } from "antd/lib/table";
export const formConfig = [
{
@ -9,9 +10,19 @@ export const formConfig = [
value: "",
rules: [{ required: true, message: "商品分类名称不能为空!" }],
},
{
type: FormType.select,
label: "城市",
name: "city_identity",
selectUrl: CityConfig.LIST,
rules: [{ required: true, message: "内容不能为空" }],
key: "city_name",
value: "",
},
{
type: FormType.input,
label: "描述",
rules: [{ required: true, message: "描述不能为空" }],
name: "remark",
value: "",
},

View File

@ -18,12 +18,16 @@ const SkuCat = (props: Store) => {
skuCatStore.getlist();
}, [skuCatStore]);
const addHandler = () => {
setIsModalOpen(true);
setId(null);
setRecord(null);
};
return (
<div className="contentBox">
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
<Button type="default" onClick={() => setIsModalOpen(true)}>
</Button>
<Button type="default" onClick={() => addHandler()}></Button>
<BTable
store={skuCatStore}
scroll={{ x: "max-content" }}
@ -59,7 +63,11 @@ const SkuCat = (props: Store) => {
formRef={formRef}
colProps={25}
onFinish={() => {
skuCatStore.add(formRef.current?.getFieldsValue())
if (userId) {
skuCatStore.putItem(record.identity,formRef.current?.getFieldsValue());
} else {
skuCatStore.add(formRef.current?.getFieldsValue());
}
setIsModalOpen(false);
}}
createCallback={() => {