1 |
- /* empty css *//* empty css */import{_ as e}from"./index-3b70780d.js";import{_ as a}from"./search.vue_vue_type_script_setup_true_lang-471e225c.js";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-5151e9b9.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as t,m as i,at as o,p as s,x as r,an as n,o as c,c as u,f as m,a as d,w as p,F as f,y as _,l as h,e as w,W as v,b,aE as y,t as j,a6 as k,a4 as g,aD as x,a2 as V,a3 as P,A as C,B as z,b4 as A,S as O,a7 as W,J as K,aj as L,a8 as T,$ as B,av as U,aw as I,_ as q}from"./index-20b58eed.js";import{_ as E}from"./create.vue_vue_type_style_index_0_lang-dfe87289.js";import F from"./configPublic-39d18258.js";import{u as N}from"./useGetList-226731c9.js";import{g as S}from"./index-850f8962.js";import{w as $}from"./index-d1acff7a.js";/* empty css *//* empty css */import"./http-1137b5ca.js";/* empty css *//* empty css */import"./index-e4654928.js";/* empty css *//* empty css *//* empty css */import"./index-9ea4bd9e.js";const D=e=>(U("data-v-845836f4"),e=e(),I(),e),G={class:"flex flex-col justify-between w-full sm:flex-row"},H={key:0,class:"w-full"},J={class:"table-default"},M={class:"mt-3"},Q={class:"pt-5 pl-2"},R={class:"flex items-center"},X=D((()=>w("span",null,"总发送次数",-1))),Y=D((()=>w("br",null,null,-1))),Z={class:"flex flex-col"},ee=D((()=>w("br",null,null,-1))),ae=D((()=>w("br",null,null,-1))),le=D((()=>w("br",null,null,-1))),te=D((()=>w("br",null,null,-1))),ie=q(t({__name:"index",setup(t){const U=i(!1),I=i(!1),q=i({}),D=i([]),ie=i("新增"),{data:oe,query:se,search:re,reset:ne,loading:ce}=N("wechatPlatform/keyword/list");o("rolesIdentify");const ue=s((()=>{var e;return null==(e=oe.value)?void 0:e.data})),me=i([]),de=e=>{me.value=e},pe=(e,a)=>{var l;switch(q.value=a,e){case"createVisible":U.value=!0,(null==(l=q.value)?void 0:l.id)?(ie.value="编辑",q.value.single?ie.value=q.value.currentwechat.nick_name:q.value.look&&(ie.value="查看")):ie.value="新增";break;case"configPublicVisible":I.value=!0}},fe=()=>{se.value=Object.assign({page:se.value.page,limit:se.value.limit,miniprogram_id:se.value.miniprogram_id}),re()},_e=()=>{if(me.value.length<=0)return g.warning("至少选择一条数据");{const e="确定批量删除吗?";x.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{const e=me.value.map((e=>e.id)).join(",");S({ids:e}).then((e=>{g.success(e.message),re()}))})).catch((()=>{}))}},he=e=>{switch(e){case"createVisible":U.value=!1;break;case"configPublicVisible":I.value=!1}re()},we=(e,a)=>{if("wechatPlatformOfficialAccountList"===e)$({limit:99,...a}).then((e=>{D.value=e.data}))};return r((()=>{we("wechatPlatformOfficialAccountList"),re()})),(t,i)=>{const o=V,s=P,r=C,N=z,$=A,ie=O,oe=W,ne=K,me=L,ve=T,be=l,ye=a,je=e,ke=n("action"),ge=B;return c(),u("div",G,[m(U)?(c(),h(E,{key:1,onClose:i[5]||(i[5]=e=>he("createVisible")),primary:m(q)},null,8,["primary"])):(c(),u("div",H,[d(ye,{search:m(re),reset:fe},{body:p((()=>[d(s,{label:"关键字"},{default:p((()=>[d(o,{placeholder:"请输入关键字",modelValue:m(se).keyword,"onUpdate:modelValue":i[0]||(i[0]=e=>m(se).keyword=e),clearable:""},null,8,["modelValue"])])),_:1}),d(s,{label:"公众号"},{default:p((()=>[d(N,{modelValue:m(se).wechat_authorization_info_id,"onUpdate:modelValue":i[1]||(i[1]=e=>m(se).wechat_authorization_info_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{((e,a)=>{"wechatPlatformOfficialAccountList"===a&&we("wechatPlatformOfficialAccountList",{nick_name:e})})(e,"wechatPlatformOfficialAccountList")},placeholder:"选择公众号"},{default:p((()=>[(c(!0),u(f,null,_(m(D),(e=>(c(),h(r,{key:e.id,label:e.nick_name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1})])),content:p((()=>[w("div",J,[w("div",M,[d($,{title:"注:如果一个公众号出现关键字重复配置(比如关键字相同,回复内容相同或不同的情况),以最新一次配置为准,原配置将被覆盖",type:"warning","show-icon":"",closable:!1})]),w("div",Q,[v((c(),h(ie,{type:"primary",size:"default",onClick:i[2]||(i[2]=e=>pe("createVisible",null))},{default:p((()=>[b("新增")])),_:1})),[[ke,"wechatPlatform.WechatKeywords.add"]]),v((c(),h(ie,{size:"default",onClick:_e},{default:p((()=>[b("批量删除")])),_:1})),[[ke,"wechatPlatform.WechatKeywords.del"]])]),v((c(),h(ve,{data:m(ue),class:"mt-3",onSelectionChange:de},{default:p((()=>[d(oe,{type:"selection",width:"80"}),d(oe,{prop:"keyword",label:"关键字","min-width":"200"}),d(oe,{prop:"created_at",label:"创建时间","min-width":"200"}),d(oe,{prop:"send_total",label:"总发送次数","min-width":"200"},{header:p((()=>[w("div",R,[X,d(me,{placement:"top"},{content:p((()=>[b(" 统计该关键字及内容在所有已配置公众号中的累计发送次数"),Y])),default:p((()=>[d(ne,null,{default:p((()=>[d(m(y))])),_:1})])),_:1})])])),default:p((e=>[w("span",null,j(e.row.send_total),1)])),_:1}),d(oe,{prop:"nick_name",label:"配置公众号","min-width":"200"},{default:p((e=>[w("div",Z,[(c(!0),u(f,null,_(e.row.wechat_accounts,(e=>(c(),u("div",{class:"text-lg font-bold",key:e.id},j(e.nick_name),1)))),128))])])),_:1}),d(oe,{label:"操作",width:"200",fixed:"right"},{default:p((e=>[v((c(),h(ie,{link:"",type:"primary",size:"small",onClick:a=>pe("createVisible",e.row)},{default:p((()=>[b("编辑")])),_:2},1032,["onClick"])),[[ke,"wechatPlatform.WechatKeywords.edit"]]),ee,v((c(),h(ie,{link:"",type:"primary",size:"small",onClick:a=>pe("createVisible",{look:!0,...e.row})},{default:p((()=>[b("查看")])),_:2},1032,["onClick"])),[[ke,"wechatPlatform.WechatKeywords.detail"]]),ae,v((c(),h(ie,{link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,void x.confirm("确定要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{S({ids:l.id}).then((e=>{g.success(e.message),re()}))})).catch((()=>{}));var l}},{default:p((()=>[b("删除")])),_:2},1032,["onClick"])),[[ke,"wechatPlatform.WechatKeywords.del"]]),le,v((c(),h(ie,{link:"",type:"primary",size:"small",onClick:a=>pe("configPublicVisible",e.row)},{default:p((()=>[b("配置公众号")])),_:2},1032,["onClick"])),[[ke,"wechatPlatform.WechatKeywords.allocation"]]),te])),_:1})])),_:1},8,["data"])),[[ge,m(ce)]]),d(be)])])),_:1},8,["search"]),d(je,{modelValue:m(I),"onUpdate:modelValue":i[4]||(i[4]=e=>k(I)?I.value=e:null),title:"配置公众号","destroy-on-close":""},{default:p((()=>[d(F,{onClose:i[3]||(i[3]=e=>he("configPublicVisible")),typeName:"关键字回复",primary:m(q)},null,8,["primary"])])),_:1},8,["modelValue"])]))])}}}),[["__scopeId","data-v-845836f4"]]);export{ie as default};
|