perf: 搜索项 组件
parent
2e831d7388
commit
7dc0d2e346
@ -1,30 +1,32 @@
|
||||
import React, { Component } from "react";
|
||||
import { Select } from "antd";
|
||||
import { observer } from "mobx-react";
|
||||
import React, { Component } from 'react';
|
||||
import { Select } from 'antd';
|
||||
import { observer } from 'mobx-react';
|
||||
import { dateTypes } from './../../libs/ht';
|
||||
|
||||
class DataTypeSelect extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
const store = this.props.store;
|
||||
return (
|
||||
<div>
|
||||
<Select value={store.date_type} style={{ width: "100%" }} placeholder="选择日期类型" onChange={value => store.onChange_datetype(value)}>
|
||||
<Select.Option key="2" value="applyDate">
|
||||
提交日期
|
||||
</Select.Option>
|
||||
<Select.Option key="1" value="ConfirmDate">
|
||||
确认日期
|
||||
</Select.Option>
|
||||
<Select.Option key="3" value="startDate">
|
||||
走团日期
|
||||
</Select.Option>
|
||||
</Select>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const store = this.props.store;
|
||||
return (
|
||||
<div>
|
||||
<Select
|
||||
value={store.date_type}
|
||||
style={{ width: '100%' }}
|
||||
placeholder="选择日期类型"
|
||||
onChange={(value) => store.onChange_datetype(value)}
|
||||
>
|
||||
{dateTypes.map((ele) => (
|
||||
<Select.Option key={ele.key} value={ele.key}>
|
||||
{ele.label}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default observer(DataTypeSelect);
|
||||
|
@ -1,48 +1,46 @@
|
||||
import React, {Component} from 'react';
|
||||
import {Select} from 'antd';
|
||||
import {observer} from "mobx-react";
|
||||
import React, { Component } from 'react';
|
||||
import { Select } from 'antd';
|
||||
import { observer } from 'mobx-react';
|
||||
import { groups } from '../../libs/ht';
|
||||
|
||||
class GroupSelect extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
const store = this.props.store;
|
||||
return (
|
||||
<div>
|
||||
<Select
|
||||
mode={store.group_select_mode}
|
||||
style={{width: '100%',}}
|
||||
placeholder="选择小组"
|
||||
value={store.groups}
|
||||
onChange={(value) => store.group_handleChange(value)}
|
||||
>
|
||||
{this.props.show_all ? <Select.Option key="0" value="ALL">所有小组</Select.Option> : ''}
|
||||
<Select.Option key="1,2,28,7,33" value="1,2,28,7,33">GH事业部</Select.Option>
|
||||
<Select.Option key="32" value="8,9,11,12,20,21">国际事业部</Select.Option>
|
||||
<Select.Option key="10,18,16,30" value="10,18,16,30">孵化学院</Select.Option>
|
||||
<Select.Option key="1" value="1">CH直销</Select.Option>
|
||||
<Select.Option key="2" value="2">CH大客户</Select.Option>
|
||||
<Select.Option key="28" value="28">AH亚洲项目组</Select.Option>
|
||||
<Select.Option key="33" value="33">GH项目组</Select.Option>
|
||||
<Select.Option key="7" value="7">市场推广</Select.Option>
|
||||
<Select.Option key="8" value="8">德语</Select.Option>
|
||||
<Select.Option key="9" value="9">日语</Select.Option>
|
||||
<Select.Option key="11" value="11">法语</Select.Option>
|
||||
<Select.Option key="12" value="12">西语</Select.Option>
|
||||
<Select.Option key="20" value="20">俄语</Select.Option>
|
||||
<Select.Option key="21" value="21">意语</Select.Option>
|
||||
<Select.Option key="10" value="10">商旅</Select.Option>
|
||||
<Select.Option key="18" value="18">CT</Select.Option>
|
||||
<Select.Option key="16" value="16">APP</Select.Option>
|
||||
<Select.Option key="30" value="30">Trippest</Select.Option>
|
||||
<Select.Option key="31" value="31">花梨鹰</Select.Option>
|
||||
</Select>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const { store, mode, value, onChange, show_all, ...extProps } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<Select
|
||||
mode={mode || store?.group_select_mode || null}
|
||||
style={{ width: '100%' }}
|
||||
placeholder="选择小组"
|
||||
value={value || store?.groups || '0'}
|
||||
onChange={(value) => {
|
||||
if (typeof onChange === 'function') {
|
||||
onChange(value);
|
||||
}
|
||||
store?.group_handleChange(value);
|
||||
}}
|
||||
{...extProps}
|
||||
>
|
||||
{show_all ? (
|
||||
<Select.Option key="0" value="0">
|
||||
所有小组
|
||||
</Select.Option>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{groups.map((ele) => (
|
||||
<Select.Option key={ele.key} value={ele.key}>
|
||||
{ele.label}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default observer(GroupSelect);
|
||||
|
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* 事业部
|
||||
*/
|
||||
export const biz = [
|
||||
{ key: '0', label: '公共开支', code: '' },
|
||||
{ key: '1', label: 'GH事业部', code: '' },
|
||||
{ key: '2', label: '国际事业部', code: '' },
|
||||
{ key: '4', label: '孵化学院', code: '' },
|
||||
];
|
||||
/**
|
||||
* 小组
|
||||
*/
|
||||
export const groups = [
|
||||
{ key: '1,2,28,7,33', label: 'GH事业部', code: 'GH', children: [] },
|
||||
{ key: '8,9,11,12,20,21', label: '国际事业部', code: 'INT', children: [] },
|
||||
{ key: '10,18,16,30', label: '孵化学院', code: '', children: [] },
|
||||
{ key: '1', label: 'CH直销', code: '', children: [] },
|
||||
{ key: '2', label: 'CH大客户', code: '', children: [] },
|
||||
{ key: '28', label: 'AH亚洲项目组', code: 'AH', children: [] },
|
||||
{ key: '33', label: 'GH项目组', code: '', children: [] },
|
||||
{ key: '7', label: '市场推广', code: '', children: [] },
|
||||
{ key: '8', label: '德语', code: '', children: [] },
|
||||
{ key: '9', label: '日语', code: '', children: [] },
|
||||
{ key: '11', label: '法语', code: '', children: [] },
|
||||
{ key: '12', label: '西语', code: '', children: [] },
|
||||
{ key: '20', label: '俄语', code: '', children: [] },
|
||||
{ key: '21', label: '意语', code: '', children: [] },
|
||||
{ key: '10', label: '商旅', code: '', children: [] },
|
||||
{ key: '18', label: 'CT', code: 'CT', children: [] },
|
||||
{ key: '16', label: 'APP', code: 'APP', children: [] },
|
||||
{ key: '30', label: 'Trippest', code: 'TP', children: [] },
|
||||
{ key: '31', label: '花梨鹰', code: '', children: [] },
|
||||
];
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
export const sites = [
|
||||
{ key: '2', label: 'CHT', code: 'CHT' },
|
||||
{ key: '8', label: 'AH', code: 'AH' },
|
||||
{ key: '163', label: 'GH', code: 'GH' },
|
||||
{ key: '28', label: '客运中国', code: 'GHKYZG' },
|
||||
{ key: '7', label: '客运海外', code: 'GHKYHW' },
|
||||
{ key: '172', label: 'B业务', code: 'GHTOB' },
|
||||
{ key: '11,12,20,21,10,18', label: '国际(入境)', code: 'JP,VAC,IT,GM,RU,VC' },
|
||||
{ key: '122,200,211,100,188', label: '国际(海外)', code: 'VACHW,ITHW,GMHW,RUHW,VCHW' },
|
||||
{ key: '11', label: '日语', code: 'JP' },
|
||||
{ key: '12', label: '西语', code: 'VAC' },
|
||||
{ key: '122', label: '西语海外', code: 'VACHW' },
|
||||
{ key: '20', label: '意大利', code: 'IT' },
|
||||
{ key: '200', label: '意大利海外', code: 'ITHW' },
|
||||
{ key: '21', label: '德语', code: 'GM' },
|
||||
{ key: '211', label: '德语海外', code: 'GMHW' },
|
||||
{ key: '10', label: '俄语', code: 'RU' },
|
||||
{ key: '100', label: '俄语海外', code: 'RUHW' },
|
||||
{ key: '18', label: '法语', code: 'VC' },
|
||||
{ key: '188', label: '法语海外', code: 'VCHW' },
|
||||
{ key: '16', label: 'CT', code: 'CT' },
|
||||
{ key: '30', label: 'TP', code: 'trippest' },
|
||||
{ key: '31', label: '花梨鹰', code: 'HLY' },
|
||||
];
|
||||
export const dateTypes = [
|
||||
{ key: 'applyDate', label: '提交日期' },
|
||||
{ key: 'ConfirmDate', label: '确认日期' },
|
||||
{ key: 'startDate', label: '走团日期' },
|
||||
];
|
Loading…
Reference in New Issue