• 特别关心


    /*
          *特别关心
          */ 
          handleislike() {
            if(this.isCare) {
              //取消关注
              const h = this.$createElement;
              this.$msgbox({
                title: '消息',
                message: h('div', {
                  style:'text-align:center'
                }, [
                h('img', { 
                    attrs: {src: '../../static/images/animal.png'},
                    style:' 60px;height:52px;margin:0 auto;'
                  },null),
                  h('p', null, '确定取消关心吗?'),
                ]),
                showCancelButton: true,
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                customClass: 'careMsgBox',
                cancelButtonClass: 'cancelButtonStyle',
                confirmButtonClass: 'confirmButtonStyle',
                beforeClose: (action, instance, done) => {
                  done();
                  this.patientInfo.GzTag = ''
                  // this.list(1)
                }
              }).then(action => {
                //取消关注
                API.common.updateGz({
                  'adminId': this.userId, //医生ID
                  'patientId': this.patientId,//患者的id (必填)
                  'operateType': 0,//(操作类型 1:关注 0:取消关注) (必填)
                  'operateTag':'' //关注的标签
                }).then((res)=>{
                  if(res.code == 0) {
                    this.isCare = false
                  }
                }).catch((error)=>{
                  console.log(error)
                })
              }).catch(()=>{
    
              });
            }else {
              //增加关注
              this.$prompt('标签', '添加', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                inputPlaceholder: '请输入标签',
                customClass: 'careMsgBoxAdd',
                cancelButtonClass: 'cancelButtonStyle',
                confirmButtonClass: 'confirmButtonStyle',
              }).then(({ value }) => {
                if(!value) {
                  this.$message.error('标签不能为空!');
                }else if(value.toString().length<6){
                  this.addTag = value
                  API.common.updateGz({
                    'adminId': this.userId, //医生ID
                    'patientId': this.patientId,//患者的id (必填)
                    'operateType': 1,//(操作类型 1:关注 0:取消关注) (必填)
                    'operateTag': value //关注的标签
                  }).then((res)=>{
                    if(res.code == 0) {
                      this.isCare = true
                      this.$message({
                        type: 'success',
                        message: '关注成功!'
                      });
                      this.patientInfo.GzTag = value
                    }
                  }).catch((error)=>{
                    console.log(error)
                  })
                }else{
                  this.$message.error('标签长度不能大于5!')
                }
              }).catch(() => {
                this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });
            }
          },
  • 相关阅读:
    使Eclipse下支持编写HTML/JS/CSS/JSP页面的自动提示
    SpringMVC与Struts2的对比
    事务不提交,也有可能写redo和数据文件
    14.4.1 InnoDB Startup Configuration
    SLB 权重问题
    perl 访问网站一些useragent的设置
    14.3.5.3 How to Minimize and Handle Deadlocks 如何减少和处理死锁
    nginx 区分pc和mobile 到不同的404页面
    dokcer 运行和进入容器
    docker 私有仓库查询
  • 原文地址:https://www.cnblogs.com/xuyan1/p/8321078.html
Copyright © 2020-2023  润新知