|
@@ -36,6 +36,8 @@ class PushContainer extends Component {
|
|
|
oKBg:'',
|
|
|
okColor:'red',
|
|
|
num:0, //计数
|
|
|
+ text:'',
|
|
|
+ currId:''
|
|
|
}
|
|
|
this.$cont = React.createRef();
|
|
|
this.itemList = null;
|
|
@@ -46,6 +48,7 @@ class PushContainer extends Component {
|
|
|
this.handleAllCheckbox=this.handleAllCheckbox.bind(this)
|
|
|
this.handleMangerTemplate=this.handleMangerTemplate.bind(this)
|
|
|
this.handleDelList=this.handleDelList.bind(this)
|
|
|
+ this.makeSure=this.makeSure.bind(this)
|
|
|
}
|
|
|
componentDidMount(){
|
|
|
// const height = getWindowInnerHeight()-160;
|
|
@@ -114,7 +117,6 @@ class PushContainer extends Component {
|
|
|
let e = event?event:window.event;
|
|
|
if(e.keyCode == 13) {
|
|
|
this.makeSure()
|
|
|
- // store.dispatch(changeVisible(false))
|
|
|
}
|
|
|
}
|
|
|
handleInput(e){
|
|
@@ -148,12 +150,13 @@ class PushContainer extends Component {
|
|
|
* 改变模板标题
|
|
|
* @param {模板id和模板title} obj
|
|
|
*/
|
|
|
- handleTitleChange(obj) {
|
|
|
+ handleTitleChange(id,text) {
|
|
|
store.dispatch(changeVisible(true))
|
|
|
this.setState({
|
|
|
type:3,
|
|
|
- obj:obj,
|
|
|
- title:obj.text,
|
|
|
+ currId:id,
|
|
|
+ title:text,
|
|
|
+ text:text,
|
|
|
okText:'保存',
|
|
|
okBorderColor:'#3B9ED0',
|
|
|
okColor:'#fff',
|
|
@@ -180,6 +183,7 @@ class PushContainer extends Component {
|
|
|
store.dispatch(allChecked(false))
|
|
|
store.dispatch(allCheckedShow(!tmpFlg))
|
|
|
}
|
|
|
+
|
|
|
handleDelList(){ //批量删除
|
|
|
this.setState({
|
|
|
type:2,
|
|
@@ -199,13 +203,13 @@ class PushContainer extends Component {
|
|
|
store.dispatch(delBatchItem(this.props.checkItems))
|
|
|
store.dispatch(changeVisible(false))
|
|
|
}else if(this.state.type == 3){
|
|
|
- if(this.state.title == this.state.obj.text){
|
|
|
+ if(this.state.title == this.state.text){
|
|
|
store.dispatch(changeVisible(false))
|
|
|
Notify.success('标题修改成功');
|
|
|
return;
|
|
|
}
|
|
|
let tempObj = {
|
|
|
- id:this.state.obj.id,
|
|
|
+ id:this.state.currId,
|
|
|
title:this.state.title
|
|
|
}
|
|
|
store.dispatch(changeTitleAsync(tempObj))
|