vue+ele启用停用

编程入门 行业动态 更新时间:2024-10-10 10:30:12
	//停用/启用change_status(row,index) {let _this=this;console.log(row);let obj={};if(row.status==0){obj={uid:1,id:row.id,project_id:row.project_id,title:row.title,logo:row.logo,content:row.content,status:1,ntype:row.ntype,ptype:row.ptype,};postFormAPI(obj, "/web_notice/addnotice").then(res => {if (res.data.code === 1) {this.tableData[index].status=1;this.flag=1;console.log("status=1");} else {_this.$message.error(res.data.data.info.detail);}}).catch(error => {alert(error)_this.$message.error(error);});}else{obj={uid:1,id:row.id,project_id:row.project_id,title:row.title,logo:row.logo,content:row.content,status:0,ntype:row.ntype,ptype:row.ptype,};postFormAPI(obj, "/web_notice/addnotice").then(res => {if (res.data.code === 1) {this.tableData[index].status=0;this.flag=1;console.log("status=0");} else {_this.$message.error(res.data.data.info.detail);}}).catch(error => {alert(error)_this.$message.error(error);});}},

更多推荐

vue,ele

本文发布于:2023-05-20 18:08:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/154938.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:vue   ele

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!