niucloud-admin/niucloud/public/admin/assets/template-35ebf064.js
全栈小学生 1c498f5a2a up
2025-01-03 17:59:49 +08:00

2 lines
4.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as A,v as $,f as j,l as I,r as x,h as u,c as y,e as a,w as o,a as _,t as p,u as e,i as f,k as t,J as M,m as C,B as O,F as R,O as U,ay as z,E as J,a8 as K,a9 as P,a0 as W,Z,a1 as G,K as H,L as Q}from"./index-a59af0dd.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css */import{_ as X}from"./index.vue_vue_type_script_setup_true_lang-4d04ecba.js";/* empty css *//* empty css *//* empty css *//* empty css */import{p as Y,q as ee}from"./wechat-50253001.js";import{e as te}from"./notice-fbcf0bbd.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ne={class:"main-container"},le={class:"flex justify-between items-center"},oe={class:"text-page-title"},se={class:"flex items-center"},ce={class:"mr-[5px]"},ie=A({__name:"template",setup(re){const E=$(),T=j(),N=E.meta.title,c=I({loading:!0,data:[]}),b=x("/channel/wechat/message"),B=s=>{T.push({path:b.value})},g=(s=1)=>{c.loading=!0,Y().then(l=>{c.loading=!1;let d=[];l.data.forEach(i=>{if(i.notice.length){const m=[];Object.keys(i.notice).forEach((r,k)=>{const h=i.notice[r];h.addon_name=i.title,m.push(h)}),m.length&&(m[0].rowspan=m.length,d=d.concat(m))}}),c.data=d}).catch(l=>{c.loading=!1})};g();const V=s=>{if(s.columnIndex===0)return s.row.rowspan?{rowspan:s.row.rowspan,colspan:1}:{rowspan:0,colspan:0}},v=(s=null)=>{const l=z.service({lock:!0,background:"rgba(0, 0, 0, 0)"});ee({keys:s?[s.key]:[]}).then(()=>{g(),l.close()}).catch(()=>{l.close()})},L=s=>{const l=x({key:"",type:"",status:0});l.value.status=s.is_wechat?0:1,l.value.key=s.key,l.value.type="wechat",c.loading=!0,te(l.value).then(d=>{g()}).catch(()=>{c.loading=!1})};return(s,l)=>{const d=J,i=K,m=P,r=W,k=X,h=Z,D=G,F=H,S=Q;return u(),y("div",ne,[a(F,{class:"card !border-none",shadow:"never"},{default:o(()=>[_("div",le,[_("span",oe,p(e(N)),1),a(d,{type:"primary",class:"w-[100px]",onClick:l[0]||(l[0]=n=>v())},{default:o(()=>[f(p(e(t)("batchAcquisition")),1)]),_:1})]),a(m,{modelValue:b.value,"onUpdate:modelValue":l[1]||(l[1]=n=>b.value=n),class:"my-[20px]",onTabChange:B},{default:o(()=>[a(i,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),a(i,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),a(i,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),a(i,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),M((u(),C(D,{data:c.data,"span-method":V,size:"large"},{empty:o(()=>[_("span",null,p(c.loading?"":e(t)("emptyData")),1)]),default:o(()=>[a(r,{prop:"addon_name",label:e(t)("addon"),"min-width":"120"},null,8,["label"]),a(r,{prop:"name","show-overflow-tooltip":!0,label:e(t)("name"),"min-width":"150"},{default:o(({row:n})=>[_("div",se,[_("span",ce,p(n.name),1),n.wechat.tips?(u(),C(h,{key:0,content:n.wechat.tips,placement:"top"},{default:o(()=>[a(k,{name:"element WarningFilled"})]),_:2},1032,["content"])):O("",!0)])]),_:1},8,["label"]),a(r,{label:e(t)("messageType"),"min-width":"100",align:"center"},{default:o(({row:n})=>[_("span",null,p(n.message_type==1?e(t)("buyerNews"):e(t)("sellerMessage")),1)]),_:1},8,["label"]),a(r,{label:e(t)("isStart"),"min-width":"100",align:"center"},{default:o(({row:n})=>[f(p(n.is_wechat==1?e(t)("startUsing"):e(t)("statusDeactivate")),1)]),_:1},8,["label"]),a(r,{label:e(t)("response"),"min-width":"180"},{default:o(({row:n})=>[(u(!0),y(R,null,U(n.wechat.content,(w,q)=>(u(),y("div",{key:"a"+q,class:"text-left"},p(w.join("")),1))),128))]),_:1},8,["label"]),a(r,{prop:"wechat_template_id",label:e(t)("serialNumber"),"min-width":"140"},null,8,["label"]),a(r,{label:e(t)("operation"),fixed:"right",align:"right",width:"200"},{default:o(({row:n})=>[a(d,{type:"primary",link:"",onClick:w=>L(n)},{default:o(()=>[f(p(n.is_wechat==1?e(t)("close"):e(t)("open")),1)]),_:2},1032,["onClick"]),a(d,{type:"primary",link:"",onClick:w=>v(n)},{default:o(()=>[f(p(e(t)("regain")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[S,c.loading]])]),_:1})])}}});const Te=ae(ie,[["__scopeId","data-v-9d3fc6e2"]]);export{Te as default};