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

fix

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