|
@@ -2,8 +2,7 @@ import React, { Component } from 'react';
|
|
import style from './index.less';
|
|
import style from './index.less';
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow } from '@store/actions/tabTemplate';
|
|
import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow } from '@store/actions/tabTemplate';
|
|
-import { initItemList, delItem, delBatchItem, changeTitleAsync, saveTemplateDetail } from '@store/async-actions/tabTemplate';
|
|
|
|
-import { CHANGE_TYPE } from "@store/types/typeConfig";
|
|
|
|
|
|
+import { initItemList, delItem, delBatchItem, changeTitleAsync, setPageView } from '@store/async-actions/tabTemplate';
|
|
import { connect } from "react-redux";
|
|
import { connect } from "react-redux";
|
|
import store from '@store';
|
|
import store from '@store';
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
@@ -66,7 +65,7 @@ class PushContainer extends Component {
|
|
*/
|
|
*/
|
|
handleActiveClick(id) {
|
|
handleActiveClick(id) {
|
|
if (id == '1') {
|
|
if (id == '1') {
|
|
- store.dispatch(initItemList());
|
|
|
|
|
|
+ store.dispatch(initItemList("",1));
|
|
}
|
|
}
|
|
store.dispatch(tabChange(id))
|
|
store.dispatch(tabChange(id))
|
|
}
|
|
}
|
|
@@ -205,6 +204,11 @@ class PushContainer extends Component {
|
|
})
|
|
})
|
|
store.dispatch(changeVisible(true))
|
|
store.dispatch(changeVisible(true))
|
|
}
|
|
}
|
|
|
|
+ handleClickGetMore(page){
|
|
|
|
+ let tmpPage = ++page
|
|
|
|
+ store.dispatch(initItemList("",tmpPage,true))
|
|
|
|
+ }
|
|
|
|
+
|
|
makeSure() {
|
|
makeSure() {
|
|
if (this.state.type == 1) {
|
|
if (this.state.type == 1) {
|
|
store.dispatch(delItem(this.state.id))
|
|
store.dispatch(delItem(this.state.id))
|
|
@@ -225,11 +229,12 @@ class PushContainer extends Component {
|
|
store.dispatch(changeTitleAsync(tempObj))
|
|
store.dispatch(changeTitleAsync(tempObj))
|
|
} else if (this.state.type == 4) { //模板引入
|
|
} else if (this.state.type == 4) { //模板引入
|
|
const { items } = this.props;
|
|
const { items } = this.props;
|
|
|
|
+ store.dispatch(setPageView(this.state.id,items[0].type))
|
|
items && items.map((part) => {
|
|
items && items.map((part) => {
|
|
if (this.state.id == part.id) {
|
|
if (this.state.id == part.id) {
|
|
let typeConfig = part.type;
|
|
let typeConfig = part.type;
|
|
- store.dispatch(keepPushData(part, 'part')) //引用数据的存储,用于保存模板是判断数据是否变化
|
|
|
|
- pushAllDataList(typeConfig, 'push', part, 'template') //引用
|
|
|
|
|
|
+ // store.dispatch(keepPushData(part, 'part'))//引用数据的存储,用于保存模板是判断数据是否变化
|
|
|
|
+ // pushAllDataList(typeConfig, 'push', part, 'template')//引用
|
|
if (didPushParamChange()) {
|
|
if (didPushParamChange()) {
|
|
store.dispatch(billing())
|
|
store.dispatch(billing())
|
|
}
|
|
}
|
|
@@ -242,7 +247,7 @@ class PushContainer extends Component {
|
|
store.dispatch(changeVisible(false));
|
|
store.dispatch(changeVisible(false));
|
|
}
|
|
}
|
|
render() {
|
|
render() {
|
|
- const { activeId, checkItems, visible, showMsg, items, allCheckShow } = this.props;
|
|
|
|
|
|
+ const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow } = this.props;
|
|
return <div className={style["container"]} ref={this.$cont} >
|
|
return <div className={style["container"]} ref={this.$cont} >
|
|
<Tab tabs={this.state.tabs}
|
|
<Tab tabs={this.state.tabs}
|
|
activeId={activeId}
|
|
activeId={activeId}
|
|
@@ -252,6 +257,8 @@ class PushContainer extends Component {
|
|
<PushItemsContainer></PushItemsContainer>
|
|
<PushItemsContainer></PushItemsContainer>
|
|
<TemplateItems
|
|
<TemplateItems
|
|
items={items}
|
|
items={items}
|
|
|
|
+ current={current}
|
|
|
|
+ hasMore={hasMore}
|
|
checkItems={checkItems}
|
|
checkItems={checkItems}
|
|
allCheckShow={allCheckShow}
|
|
allCheckShow={allCheckShow}
|
|
handleContentClick={this.handleContentClick}
|
|
handleContentClick={this.handleContentClick}
|
|
@@ -260,6 +267,7 @@ class PushContainer extends Component {
|
|
handleDelList={this.handleDelList}
|
|
handleDelList={this.handleDelList}
|
|
handleMangerTemplate={this.handleMangerTemplate}
|
|
handleMangerTemplate={this.handleMangerTemplate}
|
|
handleAllCheckbox={this.handleAllCheckbox}
|
|
handleAllCheckbox={this.handleAllCheckbox}
|
|
|
|
+ handleClickGetMore={this.handleClickGetMore}
|
|
></TemplateItems>
|
|
></TemplateItems>
|
|
<MedicalInfoContainer></MedicalInfoContainer>
|
|
<MedicalInfoContainer></MedicalInfoContainer>
|
|
<ScaleSearchContainer></ScaleSearchContainer>
|
|
<ScaleSearchContainer></ScaleSearchContainer>
|
|
@@ -285,6 +293,8 @@ class PushContainer extends Component {
|
|
const mapStateToProps = (state) => {
|
|
const mapStateToProps = (state) => {
|
|
return {
|
|
return {
|
|
items: state.tabTemplate.items,
|
|
items: state.tabTemplate.items,
|
|
|
|
+ current: state.tabTemplate.current,
|
|
|
|
+ hasMore: state.tabTemplate.hasMore,
|
|
activeId: state.tabTemplate.activeId,
|
|
activeId: state.tabTemplate.activeId,
|
|
checkItems: state.tabTemplate.checkItems,
|
|
checkItems: state.tabTemplate.checkItems,
|
|
allChecked: state.tabTemplate.allChecked,
|
|
allChecked: state.tabTemplate.allChecked,
|