rcgy_xmf_qrcode/js/chunk-ba2252dc.2d768d54.js

2 lines
4.7 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba2252dc"],{"7b62":function(t,e,i){"use strict";i("d4ca")},d4ca:function(t,e,i){},e3b2:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-content"},[t._m(0),e("div",{staticClass:"tips"},[e("p",[e("span",{staticClass:"el-icon-warning-outline",staticStyle:{margin:"0 12px"}}),t._v(" 温馨提示:有 "),e("span",{staticStyle:{color:"rgba(251, 71, 2, 1)"}},[t._v(t._s(t.count))]),t._v(" 个投票即将开始 ")])]),e("div",{staticClass:"content"},[e("div",{},[e("button",{staticClass:"btn-orange",staticStyle:{height:"32px"},on:{click:function(e){return t.addvoting()}}},[t._m(1)]),e("VueTable",{ref:"table",attrs:{config:t.config},on:{tableCheck:t.tableCheck}},[e("template",{slot:"footer"},[e("div",{staticClass:"table-footer"},[e("button",{on:{click:function(e){return t.edit(t.table_row)}}},[t._v("编辑")]),e("button",{on:{click:function(e){return t.del(t.table_row)}}},[t._v("删除")]),e("button",{on:{click:function(e){return t.voteDetails(t.table_row)}}},[t._v("详情")]),e("button",{on:{click:function(e){return t.release(t.table_row)}}},[t._v("发布")])])])],2)],1)]),e("addEidt",{ref:"addEdit",attrs:{drawerTitle:t.addEidtDrawerTitle,drawerVrisible:t.addEidt_vrisible},on:{submitSuccess:t.submitSuccess,handleClose:t.addEidtHandleClose}}),e("detailsVrisible",{attrs:{drawerVrisible:t.details_vrisible,voteId:t.detailId},on:{handleClose:t.getClose,details_obj:t.details_obj}}),e("detailsDetails",{attrs:{drawerVrisible:t.details_details,voteId:t.detailsDetailsId,detailsData:t.detailsDetailsData},on:{handleClose:t.getClose,goBack:t.goBack}})],1)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-titel"},[e("span",[t._v("投票管理")])])},function(){var t=this,e=t._self._c;return e("span",[e("i",{staticClass:"el-icon-plus"}),t._v("新增投票")])}],l=i("70db"),n=i("49e8e"),d=i("c899"),o=i("48e8"),r={components:{addEidt:l["a"],detailsVrisible:n["a"],detailsDetails:d["a"]},data(){return{detailId:null,detailsDetailsId:null,detailsDetailsData:null,addEidtDrawerTitle:"新增活动",details_vrisible:!1,details_details:!1,addEidt_vrisible:!1,table_row:[],config:{thead:[{label:"序号",type:"index",width:"80"},{label:"投票标题",prop:"title",width:"auto"},{label:"投票开始时间",prop:"beginDate",width:"auto"},{label:"投票结束时间",prop:"endDate",width:"auto"},{label:"活动状态",prop:"status",width:"auto",type:"function",callback:(t,e)=>{switch(t.status){case 1:return"未开始";case 2:return"进行中";case 3:return"已结束";default:break}}},{label:"投票结果",prop:"voteResult",width:"auto"}],url:"voteList",table_data:[],search_item:[],data:{pageNum:1,size:10}},activeName:0,count:null}},mounted(){this.getTipsData()},methods:{getTipsData(){Object(o["W"])().then(t=>{this.count=t.count})},submitSuccess(){this.$refs.table.loadData(),this.getTipsData()},addvoting(){this.addEidt_vrisible=!0},addEidtHandleClose(){this.addEidt_vrisible=!1},tableCheck(t){this.table_row=t},voteDetails(t){t.length>1?this.$message.error("只能查看一条数据的详情"):t.length?(this.detailId=this.table_row[0].id,this.details_vrisible=!0):this.$message.error("请选择")},del(t){if(t.length){let t=[];for(let e=0;e<this.table_row.length;e++)t.push(this.table_row[e].id);this.$confirm("是否确认删除?删除不可恢复","删除",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{this.$refs.table.tableDelete(t)}).catch(t=>{})}else this.$message.error("请选中需要删除的数据")},getClose(t){this.drawer_vrisible=!1,this.details_vrisible=!1,this.details_details=!1},details_obj(t){this.details_vrisible=!1,this.details_details=!0,this.detailsDetailsId=t.id,this.detailsDetailsData=t,console.log(t)},goBack(){this.details_vrisible=!0,this.details_details=!1},edit(t){t.length>1?this.$message.error("只能查看一条数据的详情"):t.length?(this.$refs.addEdit.edit(t[0].id),this.addEidt_vrisible=!0):this.$message.error("请选择")},release(t){if(t.length){let t=[];for(let e=0;e<this.table_row.length;e++)t.push(this.table_row[e].id);this.$confirm("是否确认发布","批量发布",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{let e={ids:t};Object(o["ab"])(e).then(t=>{t.status&&(this.$message({message:t.message,type:"success"}),this.$refs.table.loadData())})}).catch(t=>{})}else this.$message.error("请选中需要发布的数据")}}},c=r,u=(i("7b62"),i("2877")),h=Object(u["a"])(c,s,a,!1,null,"3e34fdd0",null);e["default"]=h.exports}}]);
//# sourceMappingURL=chunk-ba2252dc.2d768d54.js.map