| | |
| | | IsLeftStyle = "" //提示框的样式 |
| | | BgColorStyle = "" |
| | | toastTime = null; |
| | | isSuccess = false; |
| | | message; |
| | | visible; |
| | | closeAction(){ |
| | | this.visible = false; |
| | | } |
| | | showToast(msg,type) { |
| | | try { |
| | | if(type == 'success'){ |
| | | this.isSuccess = true; |
| | | }else{ |
| | | this.isSuccess = false; |
| | | } |
| | | this.message = msg; |
| | | this.visible = true; |
| | | let delay = 5000; |
| | | console.log(this.message); |
| | | console.log('1'); |
| | | // setTimeout(() => { |
| | | // this.visible = false; |
| | | // }, delay ); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | | |
| | | |
| | | } |
| | | IsLeftStyle = "width: 100%;top: 14%;display: flex;justify-content: center;" |
| | | Alert(content,error = false,left = false){ |
| | | this.Tongzhishow = false |
| | | clearTimeout(this.toastTime) |
| | |
| | | |
| | | if (error) { |
| | | this.TongzhiIcon = "utility:error"; |
| | | this.BgColorStyle = "background-color:#ba0517 !important;padding: 9px 9px 9px 18px;"; |
| | | this.BgColorStyle = "background-color:#ba0517 !important;padding:0.65rem 0.75rem 0.65rem 1.25rem;"; |
| | | }else{ |
| | | this.TongzhiIcon = "utility:success"; |
| | | this.BgColorStyle = "background-color:rgb(46, 132, 74)!important;padding: 9px 9px 9px 18px;"; |
| | | toastTime = setTimeout(() => { |
| | | this.Tongzhishow = false |
| | | },3000) |
| | | this.BgColorStyle = "background-color:rgb(46, 132, 74)!important;padding:0.65rem 0.75rem 0.65rem 1.25rem;"; |
| | | // this.toastTime = setTimeout(() => { |
| | | // this.Tongzhishow = false |
| | | // },3000) |
| | | } |
| | | // if (left) { |
| | | // // this.IsLeftStyle = "left: 0.25rem;" |
| | | this.IsLeftStyle = "width: 100%;top: 14%;display: flex;justify-content: center;" |
| | | // }else{ |
| | | // this.IsLeftStyle = "color:#fff" |
| | | // } |
| | |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | if (flag) { |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | if (flag) { |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | } |
| | | |
| | |
| | | isloading ++; |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | }) |
| | | |
| | |
| | | isloading ++; |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | }) |
| | | } |
| | |
| | | var flag = this.compareSelected(); |
| | | if (flag == false) { |
| | | this.OnLoading(false); |
| | | // this.Alert("医院不匹配,保存失败!",true); |
| | | this.showToast('医院不匹配,保存失败!','error'); |
| | | this.Alert("医院不匹配,保存失败!",true); |
| | | return; |
| | | } |
| | | debugger; |
| | |
| | | this.UpdateDatas(this.notselected); |
| | | window.location.hash = "Refresh"+"=="+this.ParamIdStr; |
| | | this.OnLoading(false); |
| | | // this.Alert('保存成功',false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert('保存成功',false); |
| | | }else{ |
| | | this.OnLoading(false); |
| | | // this.Alert(response,true); |
| | | this.showToast(response,'error'); |
| | | this.Alert(response,true); |
| | | } |
| | | |
| | | }); |