1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0281b5f2"],{2430:function(t,e,a){"use strict";a.r(e);var n=a("a34a"),o=a.n(n),i=a("b562"),r=a("2f62");function s(t,e,a,n,o,i,r){try{var s=t[i](r),c=s.value}catch(t){return void a(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function c(t){return function(){var e=this,a=arguments;return new Promise((function(n,o){var i=t.apply(e,a);function r(t){s(i,n,o,r,c,"next",t)}function c(t){s(i,n,o,r,c,"throw",t)}r(void 0)}))}}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function u(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var d={name:"keyword",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{key:"",type:"",page:1,limit:20},tabList:[],total:0,columns1:[{title:"ID",key:"id",width:80},{title:"关键字",key:"key",minWidth:120},{title:"回复类型",key:"typeName",minWidth:150},{title:"是否显示",slot:"status",minWidth:120},{title:"操作",slot:"action",fixed:"right",width:200}],modal:!1,qrcode:""}},created:function(){this.getList()},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?l(a,!0).forEach((function(e){u(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):l(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(r.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{download:function(t){var e=this;this.$Spin.show(),Object(i.b)(t.id).then((function(t){e.$Spin.hide(),e.modal=!0,e.qrcode=t.data.url})).catch((function(t){e.$Spin.hide(),e.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(i.d)(this.formValidate).then(function(){var e=c(o.a.mark((function e(a){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.tabList=n.list,t.total=a.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},onchangeIsShow:function(t){var e=this,a={id:t.id,status:t.status};Object(i.e)(a).then(function(){var t=c(o.a.mark((function t(a){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(a.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},userSearchs:function(){this.formValidate.page=1,this.getList()},add:function(){this.$emit("keyword-action","0")},edit:function(t){this.$emit("keyword-action","".concat(t.id))},del:function(t,e,a){var n=this,o={title:e,num:a,url:"app/wechat/keyword/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.tabList.splice(a,1),n.tabList.length||(n.formValidate.page=1==n.formValidate.page?1:n.formValidate.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))}}},f=(a("5927"),a("2877")),p=Object(f.a)(d,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{attrs:{bordered:!1,padding:30,"dis-hover":""}},[a("Form",{ref:"levelFrom",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"回复类型:",prop:"type","label-for":"type"}},[a("Select",{staticClass:"input-add",attrs:{placeholder:"请选择","element-id":"type",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[a("Option",{attrs:{value:"text"}},[t._v("文字消息")]),a("Option",{attrs:{value:"image"}},[t._v("图片消息")]),a("Option",{attrs:{value:"news"}},[t._v("图文消息")]),a("Option",{attrs:{value:"voice"}},[t._v("声音消息")])],1)],1),a("FormItem",{attrs:{label:"关键字:",prop:"key","label-for":"key"}},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入关键字"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.key,callback:function(e){t.$set(t.formValidate,"key",e)},expression:"formValidate.key"}}),a("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1),a("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加关键字")]),a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tabList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"status",fn:function(e){var n=e.row;return e.index,[a("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var n=e.row,o=e.index;return[a("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.download(n)}}},[t._v("下载二维码")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(n,"关键字回复",o)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),a("Modal",{attrs:{title:"二维码","footer-hide":""},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[a("div",{staticClass:"acea-row row-around"},[a("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[a("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode,expression:"qrcode"}]})])])])])],1)}),[],!1,null,"171d5294",null);e.default=p.exports},"34c7":function(t,e,a){"use strict";var n=a("87ed");a.n(n).a},5927:function(t,e,a){"use strict";var n=a("cfda");a.n(n).a},"87ed":function(t,e,a){},ac7a:function(t,e,a){"use strict";a.r(e);var n=a("3137"),o=a("2430"),i={name:"index",components:{ReplyFollow:n.default,ReplyKeyword:o.default},data:function(){return{activeName:"1",keywordSave:""}},methods:{menuSelect:function(t){this.activeName=t,this.followAction()},keywordAction:function(t){this.keywordSave=t},followAction:function(){this.keywordSave=""}}},r=(a("34c7"),a("2877")),s=Object(r.a)(i,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,padding:0,"dis-hover":""}},[a("Row",{attrs:{type:"flex",wrap:!1}},[a("Col",{staticClass:"fixed"},[a("Menu",{attrs:{"active-name":t.activeName,width:"auto"},on:{"on-select":t.menuSelect}},[a("MenuItem",{attrs:{name:"1"}},[t._v("微信关注回复")]),a("MenuItem",{attrs:{name:"2"}},[t._v("关键字回复")]),a("MenuItem",{attrs:{name:"3"}},[t._v("无效关键字回复")])],1)],1),a("Col",{staticClass:"auto"},["2"!==t.activeName||t.keywordSave?t._e():a("ReplyKeyword",{attrs:{"active-name":t.activeName},on:{"keyword-action":t.keywordAction}}),"2"!==t.activeName||t.keywordSave?a("ReplyFollow",{attrs:{"active-name":t.activeName,"keyword-save":t.keywordSave},on:{"follow-action":t.followAction}}):t._e()],1)],1)],1)],1)}),[],!1,null,"1c3637ff",null);e.default=s.exports},cfda:function(t,e,a){}}]);
|