Commit 1df84bfe authored by 前端-许佳敏's avatar 前端-许佳敏

fix

parent 1c6474fd
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"@umijs/test": "^3.2.0", "@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7", "bizcharts": "^4.0.7",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"god": "0.1.23", "god": "0.1.24",
"lingxi-design-ui": "^1.0.6", "lingxi-design-ui": "^1.0.6",
"lint-staged": "^10.0.7", "lint-staged": "^10.0.7",
"mobx": "^5.15.4", "mobx": "^5.15.4",
......
...@@ -6,6 +6,7 @@ import { ISchemaFieldComponentProps, FormPath, useFormEffects, createFormActions ...@@ -6,6 +6,7 @@ import { ISchemaFieldComponentProps, FormPath, useFormEffects, createFormActions
// 自定义搜索型下拉框 // 自定义搜索型下拉框
const SearchSelect = (props: ISchemaFieldComponentProps) => { const SearchSelect = (props: ISchemaFieldComponentProps) => {
const { schema, form, path } = props const { schema, form, path } = props
console.log(props)
// 可选参数 fetchSearch, select为search // 可选参数 fetchSearch, select为search
const { fetchSearch, fetchParams = 'name', fetchFormat, ...resetProps } = schema.getExtendsComponentProps() const { fetchSearch, fetchParams = 'name', fetchFormat, ...resetProps } = schema.getExtendsComponentProps()
const [dataSource, setDataSource] = useState<any[]>([]) const [dataSource, setDataSource] = useState<any[]>([])
...@@ -36,13 +37,7 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => { ...@@ -36,13 +37,7 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
return ( return (
<Select <Select
showSearch
onChange={e => console.log(e)} onChange={e => console.log(e)}
onSearch={value => {
setLoading(true)
run(value)
}
}
filterOption={false} filterOption={false}
loading={loading} loading={loading}
options={dataSource} options={dataSource}
......
export interface MemberType {
id: number;
typeName: string;
}
export interface BusinessType {
id: number;
typeName: string;
}
export interface UseType { export interface UseType {
url: string; memberType: MemberType[];
method: string; businessType: BusinessType[];
} }
export interface UserRegister { export interface UserRegister {
......
...@@ -14,8 +14,7 @@ import { ...@@ -14,8 +14,7 @@ import {
PauseCircleOutlined, PauseCircleOutlined,
EyeOutlined EyeOutlined
} from '@ant-design/icons' } from '@ant-design/icons'
// import { StandardTable } from 'god' import { StandardTable } from 'god'
import StandardTable from '../../../../../../../god-dumi/es/standard-table';
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableController' import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableController'
......
...@@ -175,53 +175,27 @@ const Repositories: React.FC<{}> = () => { ...@@ -175,53 +175,27 @@ const Repositories: React.FC<{}> = () => {
currentRef={ref} currentRef={ref}
tableProps={{ rowKey: 'id' }} tableProps={{ rowKey: 'id' }}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
formilyLayouts={{ controlRender={
justify: 'space-between' <NiceForm
}} actions={formActions}
formilyChilds={{ onSubmit={values => ref.current.reload(values)}
children: controllerBtns expressionScope={{
}}
formilyProps={{
layouts: {
order: 2
},
ctx: {
schema: repositSchema,
components: componentExport,
expressionScope: {
controllerBtns controllerBtns
}, }}
effects: ($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'search', 'search',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
} // 填充下拉框
}, useAsyncInitSelect(['category'], async () => (await PublicApi.getProductSelectGetSelectCategory({name: ''})).data.map(v => ({label: v.name, value: v.id})))
useAsyncInitSelect(['brand'], async () => (await PublicApi.getProductSelectGetSelectBrand({name: ''})).data.map(v => ({label: v.name, value: v.id})))
}} }}
// controlRender={ schema={repositSchema}
// <NiceForm />
// actions={formActions} }
// onSubmit={values => ref.current.reload(values)}
// expressionScope={{
// controllerBtns
// }}
// effects={($, actions) => {
// useStateFilterSearchLinkageEffect(
// $,
// actions,
// 'search',
// FORM_FILTER_PATH,
// );
// // 填充下拉框
// // useAsyncInitSelect(['category'])
// // useAsyncInitSelect(['brand'])
// }}
// schema={repositSchema}
// />
// }
/> />
</Card> </Card>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -18,16 +18,16 @@ export const repositSchema: ISchema = { ...@@ -18,16 +18,16 @@ export const repositSchema: ISchema = {
grid: true grid: true
}, },
properties: { properties: {
// ctl: { ctl: {
// type: 'object', type: 'object',
// "x-component": 'Children', "x-component": 'Children',
// "x-component-props": { "x-component-props": {
// children: "{{controllerBtns}}" children: "{{controllerBtns}}"
// } }
// }, },
search: { search: {
type: 'string', type: 'string',
"x-component": 'SearchFilter', "x-component": 'Search',
"x-mega-props": { "x-mega-props": {
}, },
"x-component-props": { "x-component-props": {
......
import {action, computed, observable, runInAction} from 'mobx' import {action, computed, observable, runInAction} from 'mobx'
import { IProductModule, IProductSelectAttribute, IBasicFormParam, IPriceAttributeParam, IOtherParam, IDecsParams } from '@/module/productModule'; // mobx要用到的数据类型 import { IProductModule, IProductSelectAttribute, IBasicFormParam, IPriceAttributeParam, IOtherParam, IDecsParams } from '@/module/productModule'; // mobx要用到的数据类型
import { GetProductGoodsGetGoodsListResponseDetail, GetProductCommodityGetCommodityResponse } from '@/services'; import { GetProductGoodsGetGoodsListResponseDetail } from '@/services';
class ProductStore implements IProductModule { class ProductStore implements IProductModule {
@observable public attributeLists: any[] = []; @observable public attributeLists: any[] = [];
...@@ -11,7 +11,7 @@ class ProductStore implements IProductModule { ...@@ -11,7 +11,7 @@ class ProductStore implements IProductModule {
@observable public priceAttributeParams: any[] = []; @observable public priceAttributeParams: any[] = [];
@observable public productAttributeAndImageParams: any[] = []; @observable public productAttributeAndImageParams: any[] = [];
@observable public areaOption: any[] = []; @observable public areaOption: any[] = [];
@observable public productInfoByEdit: GetProductCommodityGetCommodityResponse; @observable public productInfoByEdit: any;
@observable public productDescription: IDecsParams; @observable public productDescription: IDecsParams;
@observable public isAllAttributePic: boolean = true; // 是否所有属性共用 @observable public isAllAttributePic: boolean = true; // 是否所有属性共用
...@@ -129,7 +129,7 @@ class ProductStore implements IProductModule { ...@@ -129,7 +129,7 @@ class ProductStore implements IProductModule {
} }
@action.bound @action.bound
public setProductInfoByEdit(data: GetProductCommodityGetCommodityResponse) { public setProductInfoByEdit(data: any) {
this.productInfoByEdit = data this.productInfoByEdit = data
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment