修复花名册搜索问题
This commit is contained in:
parent
cf472e7a26
commit
fc6f1a0838
|
|
@ -330,7 +330,7 @@ export default class Resource extends React.Component {
|
||||||
|
|
||||||
const btn = [
|
const btn = [
|
||||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
|
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
|
||||||
resource.getTableInfo(); resource.setPanelStatus(false)
|
resource.hideRadioGroup();resource.getTableInfo(); resource.setPanelStatus(false);
|
||||||
}}>{i18n.button.search()}</Button>),
|
}}>{i18n.button.search()}</Button>),
|
||||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} type="primary" onClick={() => this.saveTemplate()}>{i18n.button.saveTemplate()}</Button>),
|
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} type="primary" onClick={() => this.saveTemplate()}>{i18n.button.saveTemplate()}</Button>),
|
||||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju7`} type="primary" onClick={() => resource.openSearchDialog(true)}>{i18n.button.conditionSet()}</Button>),
|
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju7`} type="primary" onClick={() => resource.openSearchDialog(true)}>{i18n.button.conditionSet()}</Button>),
|
||||||
|
|
@ -483,8 +483,9 @@ export default class Resource extends React.Component {
|
||||||
} else {
|
} else {
|
||||||
return <div onKeyDown={(e) => {
|
return <div onKeyDown={(e) => {
|
||||||
if (e.keyCode == 13 && e.target.tagName === "INPUT") {
|
if (e.keyCode == 13 && e.target.tagName === "INPUT") {
|
||||||
rankScheme.getTableInfo();
|
resource.hideRadioGroup()
|
||||||
rankScheme.setPanelStatus(false)
|
resource.getTableInfo();
|
||||||
|
resource.setPanelStatus(false)
|
||||||
}
|
}
|
||||||
}}>{arr}</div>
|
}}>{arr}</div>
|
||||||
}
|
}
|
||||||
|
|
@ -533,7 +534,7 @@ export default class Resource extends React.Component {
|
||||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
|
||||||
searchType={['base', 'advanced']}
|
searchType={['base', 'advanced']}
|
||||||
showSearchAd={isPanelShow}
|
showSearchAd={isPanelShow}
|
||||||
searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? lastName : form2.getFormParams().lastName}
|
searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? lastName : form2.getFormParams()["-1_hrm_lastname"]}
|
||||||
searchsBasePlaceHolder='请输入姓名'
|
searchsBasePlaceHolder='请输入姓名'
|
||||||
setShowSearchAd={bool => store.setPanelStatus(bool)}
|
setShowSearchAd={bool => store.setPanelStatus(bool)}
|
||||||
hideSearchAd={() => store.setPanelStatus(false)}
|
hideSearchAd={() => store.setPanelStatus(false)}
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,9 @@ let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(
|
||||||
);
|
);
|
||||||
|
|
||||||
// 不需要读取系统多语言
|
// 不需要读取系统多语言
|
||||||
getLocaleLabel = function (nextState, replace, callback) {
|
// getLocaleLabel = function (nextState, replace, callback) {
|
||||||
callback();
|
// callback();
|
||||||
};
|
// };
|
||||||
|
|
||||||
//const Home = (props) => props.children;
|
//const Home = (props) => props.children;
|
||||||
|
|
||||||
|
|
@ -134,9 +134,9 @@ class NetworkStrategy extends React.Component {
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
// 多语言加载之后,已经 mount 的组件,需要重新 render 一次,刷新多语言配置。
|
// 多语言加载之后,已经 mount 的组件,需要重新 render 一次,刷新多语言配置。
|
||||||
// getLocaleLabelByCode('hrm').then(() => this.setState({
|
getLocaleLabelByCode('organization').then(() => this.setState({
|
||||||
// reRender: true
|
reRender: true
|
||||||
// }));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
render = () => (
|
render = () => (
|
||||||
|
|
@ -167,7 +167,3 @@ module.exports = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// module.exports = {
|
|
||||||
// Route: Routes,
|
|
||||||
// store: stores,
|
|
||||||
// };
|
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ export class ResourceStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
@observable rangeConditions = [];
|
@observable rangeConditions = [];
|
||||||
|
@observable defaultRangeConditions = [];
|
||||||
@observable radioParams = {};
|
@observable radioParams = {};
|
||||||
|
|
||||||
@observable refreshRadioGroup = new Date().getTime();
|
@observable refreshRadioGroup = new Date().getTime();
|
||||||
|
|
@ -102,6 +103,8 @@ export class ResourceStore {
|
||||||
|
|
||||||
@action onRadioGroupChangeHandle = params => {
|
@action onRadioGroupChangeHandle = params => {
|
||||||
this.radioParams = params;
|
this.radioParams = params;
|
||||||
|
this.form2.resetForm();
|
||||||
|
this.lastName = '';
|
||||||
this.getTableInfo();
|
this.getTableInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +135,6 @@ export class ResourceStore {
|
||||||
isQuickSearch:true
|
isQuickSearch:true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form2.resetForm();
|
|
||||||
Api.getSearchList(params).then(res => {
|
Api.getSearchList(params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
||||||
|
|
@ -223,6 +225,7 @@ export class ResourceStore {
|
||||||
Api.getQuickSearchCondition().then(res => {
|
Api.getQuickSearchCondition().then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.rangeConditions = res.data.rangeConditions;
|
this.rangeConditions = res.data.rangeConditions;
|
||||||
|
this.defaultRangeConditions = res.data.rangeConditions;
|
||||||
this.enable = res.data.enable;
|
this.enable = res.data.enable;
|
||||||
} else {
|
} else {
|
||||||
message.warning(res.msg);
|
message.warning(res.msg);
|
||||||
|
|
@ -756,7 +759,7 @@ export class ResourceStore {
|
||||||
|
|
||||||
updateFields(val) {
|
updateFields(val) {
|
||||||
this.form2.updateFields({
|
this.form2.updateFields({
|
||||||
lastname: {
|
"-1_hrm_lastname": {
|
||||||
value: val
|
value: val
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -792,10 +795,8 @@ export class ResourceStore {
|
||||||
this.search = true;
|
this.search = true;
|
||||||
this.searchDialog.loading = true;
|
this.searchDialog.loading = true;
|
||||||
this.getSearchTemplate(bool);
|
this.getSearchTemplate(bool);
|
||||||
bool && this.getSearchCondition();
|
//第一次加载或者切换模板时
|
||||||
if (!bool) {
|
(bool && this.isEmptyObject(this.form2.getFormParams())) && this.getSearchCondition();
|
||||||
this.scLoadingReset();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
arrToJson(arr, rows, rowKey = "isused") {
|
arrToJson(arr, rows, rowKey = "isused") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue