fix:项目添加网格
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m27s

This commit is contained in:
zsqtony 2025-09-19 09:45:31 +08:00
parent e736f95419
commit d773694c97
2 changed files with 14 additions and 24 deletions

View File

@ -15,10 +15,9 @@ export default defineConfig({
proxy: { proxy: {
'/api/': { '/api/': {
// target: 'http://yt:8003', // target: 'http://yt:8003',
// target: 'http://10.39.13.78:8001/', target: 'http://10.39.13.78:8001/',
// target: 'https://test-admin.linyikj.com.cn/', // target: 'https://test-admin.linyikj.com.cn/',
// target: 'https://admin.linyikj.com.cn/',
target: 'https://admin.linyikj.com.cn/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },

View File

@ -6,8 +6,9 @@ import {
} from '@/common'; } from '@/common';
import { Selects } from '@/components/Select'; import { Selects } from '@/components/Select';
import MyTransferUnits from '@/components/TransferUnits'; import MyTransferUnits from '@/components/TransferUnits';
import { Apis } from '@/gen/Apis';
import { BetaSchemaForm } from '@ant-design/pro-components'; import { BetaSchemaForm } from '@ant-design/pro-components';
import { Form } from 'antd'; import { Form, message } from 'antd';
export default function Create(props: MyBetaModalFormProps) { export default function Create(props: MyBetaModalFormProps) {
const [form] = Form.useForm(); const [form] = Form.useForm();
@ -36,23 +37,14 @@ export default function Create(props: MyBetaModalFormProps) {
// } // }
// }} // }}
onFinish={async (values: any) => { onFinish={async (values: any) => {
console.log(values, 'values'); return Apis.Grid.Grids.Store({
// (values.asset_projects_id = asset_projects_id: props?.item?.id || values?.asset_projects_id,
// values?.asset_projects_id || props?.item?.id), ...values,
// values?.grid_ranges?.map( }).then(() => {
// (res: { asset_projects_id: string }) => { props.reload?.();
// res.asset_projects_id = props?.item?.id; message.success('网格添加成功');
// }, return true;
// ); });
// return Apis.Grid.Grids.Store({
// ...values,
// })
// .then(() => {
// props.reload?.();
// message.success('网格添加成功');
// return true;
// })
// .catch(() => false);
}} }}
columns={[ columns={[
...(props?.item?.id ...(props?.item?.id
@ -84,11 +76,10 @@ export default function Create(props: MyBetaModalFormProps) {
formItemProps: { ...rulesHelper.text }, formItemProps: { ...rulesHelper.text },
}), }),
{ {
valueType: 'formItem', dataIndex: 'grid_ranges',
dataIndex: 'grid_units_id',
title: '选择单元', title: '选择单元',
colProps: { span: 24 }, colProps: { span: 24 },
formItemProps: { ...rulesHelper.text }, formItemProps: { ...rulesHelper.array },
renderFormItem: () => ( renderFormItem: () => (
<MyTransferUnits <MyTransferUnits
item={{ item={{