微信公众号管理后台

35.fad499a39466c977528e.js 7.9KB

1
  1. webpackJsonp([35],{agKs:function(e,t){},xis1:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={data:function(){return{wxList:this.$store.state.wxList,checkList:[],configList:[],keyword:"",app_id:"",position:"",is_deleted:"",time:"",editTime:!1,obj:{},loadingTime:!1,total:1,page:1,page_size:20,pickerOptions:{disabledDate:function(e){return e.getTime()>Date.now()}},pickerOptions_dele:{disabledDate:function(e){return e.getTime()<Date.now()}},timeRange:[],positionList:[{key:1,name:"首条"},{key:2,name:"次条"},{key:3,name:"三条"},{key:4,name:"四条"},{key:5,name:"五条"},{key:6,name:"六条"},{key:7,name:"七条"},{key:8,name:"八条"},{key:9,name:"九条"}]}},created:function(){this.init()},methods:{init:function(e){var t=this;this.page=e||1,this.loadingTime=!0;var i={keyword:this.keyword,position:this.position,is_deleted:this.is_deleted,start_time:this.timeRange?this.timeRange[0]:"",end_time:this.timeRange?this.timeRange[1]:"",page:this.page,page_size:this.page_size,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id,appid:this.app_id};this.$axios.post(this.URL.BASEURL+this.URL.groupConfig_msg_list,i).then(function(e){t.loadingTime=!1,(e=e.data)&&0==e.errno?(t.configList=e.rst.data,t.total=e.rst.pageInfo.total,t.page_size=Number(e.rst.pageInfo.size)):t.$message({message:e.err,type:"warning"})}).catch(function(e){console.log(e),t.loadingTime=!1})},toEdit:function(){var e=this,t={id_list:this.checkList?this.checkList.join(","):"",del_time:this.time,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id,appid:this.app_id};this.$axios.post(this.URL.BASEURL+this.URL.groupConfig_msg_setTime,t).then(function(t){e.loadingTime=!1,(t=t.data)&&0==t.errno?(e.$message({message:"成功设置定时时间",type:"success"}),e.time="",e.init()):e.$message({message:t.err,type:"warning"})}).catch(function(t){console.log(t),e.loadingTime=!1}),this.editTime=!1},toCheck:function(){0==this.checkList.length?this.$message({message:"请选择公众号",type:"warning"}):this.editTime=!0},handleSelectionChange:function(e){var t=this;this.checkList=[],e.forEach(function(e){t.checkList.push(e.id)})},handleCurrentChange:function(e){this.init(e)}},watch:{time:function(){}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loadingTime,expression:"loadingTime"}],staticClass:"setTime",staticStyle:{"overflow-y":"scroll",height:"100%"},attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[a("div",{staticClass:"mainBox"},[a("wx-item"),e._v(" "),a("div",{staticClass:"searchCon"},[a("div",{staticClass:"pageFlex"},[a("label",[e._v("公众号:")]),e._v(" "),a("el-select",{staticStyle:{width:"200px"},attrs:{size:"mini",filterable:"",clearable:"","collapse-tags":"",placeholder:"请选择"},model:{value:e.app_id,callback:function(t){e.app_id=t},expression:"app_id"}},e._l(e.wxList,function(e){return a("el-option",{key:e.app_id,attrs:{label:e.nickname,value:e.app_id}})}),1)],1),e._v(" "),a("div",{staticClass:"pageFlex"},[a("label",[e._v("标题:")]),e._v(" "),a("el-input",{staticClass:"input",attrs:{size:"mini",clearable:"","prefix-icon":"el-icon-search",type:"text",placeholder:"请输入标题"},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}})],1),e._v(" "),a("div",{staticClass:"pageFlex"},[a("label",[e._v("图文位置:")]),e._v(" "),a("el-select",{staticClass:"input",staticStyle:{width:"100px"},attrs:{clearable:"",filterable:"",size:"mini",placeholder:"图文位置"},model:{value:e.position,callback:function(t){e.position=t},expression:"position"}},e._l(e.positionList,function(e){return a("el-option",{key:e.key,attrs:{label:e.name,value:e.key}})}),1)],1),e._v(" "),a("div",{staticClass:"pageFlex"},[a("label",[e._v("是否删除:")]),e._v(" "),a("el-select",{staticClass:"input",staticStyle:{width:"100px"},attrs:{clearable:"",size:"mini",placeholder:"是否删除"},model:{value:e.is_deleted,callback:function(t){e.is_deleted=t},expression:"is_deleted"}},[a("el-option",{key:1,attrs:{label:"是",value:1}}),e._v(" "),a("el-option",{key:0,attrs:{label:"否",value:0}})],1)],1),e._v(" "),a("div",{staticClass:"pageFlex"},[a("label",[e._v("时间:")]),e._v(" "),a("el-date-picker",{staticStyle:{width:"300px"},attrs:{clearable:"",size:"mini","value-format":"yyyy-MM-dd HH:mm:ss",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":e.pickerOptions,"default-time":["00:00:00","23:59:59"]},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1),e._v(" "),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.init(1)}}},[e._v("搜索")])],1),e._v(" "),a("div",{staticClass:"mainBorder"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.configList,border:""},on:{"selection-change":e.handleSelectionChange}},[a("template",{slot:"empty"},[a("img",{staticClass:"pic",attrs:{src:i("z3Om"),alt:""}}),e._v(" "),a("span",[e._v("暂无数据")])]),e._v(" "),a("el-table-column",{attrs:{type:"selection",align:"center",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{align:"left","min-width":"160",label:"标题"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[t.row.url&&t.row.title?a("a",{staticStyle:{cursor:"pointer"},attrs:{href:t.row.url,target:"_blank"}},[e._v(e._s(t.row.title))]):a("span",[e._v(e._s(t.row.title||"-"))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"公众号"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"pageFlex",staticStyle:{"justify-content":"center"}},[a("img",{staticStyle:{width:"30px","margin-right":"6px","flex-shrink":"0"},attrs:{src:t.row.head_img,alt:""}}),e._v(" "),a("div",[e._v(e._s(t.row.nickname||"-"))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",align:"center",label:"群发时间"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"子图文位置"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.position||"-"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"是否删除"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1==t.row.is_deleted?"是":0==t.row.is_deleted?"否":"-"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(i){e.checkList=[].concat(t.row.id),e.editTime=!0,e.obj=t.$index}}},[e._v("\n 更改\n ")])]}}])})],2),e._v(" "),e.configList.length>0?a("div",{staticClass:"bottom",staticStyle:{position:"relative"}},[a("div",{staticClass:"leftBtn"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.toCheck}},[e._v("批量更改")])],1),e._v(" "),a("el-pagination",{attrs:{background:"","current-page":e.page,"page-size":e.page_size,layout:"prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)],1),e._v(" "),a("my-dialog",{attrs:{visible:e.editTime,width:"30%",minWidth:"500px"},on:{"update:visible":function(t){e.editTime=t},close:function(t){e.editTime=!1}}},[a("div",{staticClass:"toast"},[a("h3",[e._v("更改定时时间")]),e._v(" "),a("div",{staticClass:"toastMain"},[a("label",[e._v("定时时间:")]),e._v(" "),a("el-date-picker",{attrs:{size:"mini",type:"datetime",placeholder:"选择日期时间","picker-options":e.pickerOptions_dele,"value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}})],1),e._v(" "),a("div",{staticClass:"toastBtn"},[a("el-button",{attrs:{size:"mini"},on:{click:function(t){e.editTime=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.toEdit}},[e._v("确定")])],1)])])],1)},staticRenderFns:[]};var n=i("VU/8")(a,s,!1,function(e){i("agKs")},"data-v-78a3e65e",null);t.default=n.exports}});