index.1543bb87.js 3.4 KB

1
  1. import{Z as A,cr as x,S as m,_ as B,d as k,m as f,cv as P,r as s,o as h,A as g,x as c,h as p,u as d,D as S,a as W,cw as Y}from"./index.21481465.js";import{u as R}from"./use-page-search.3dcb841a.js";import N from"./role-modal.03772ba8.js";import{a as H,b as M,c as I,d as j}from"./index.c8b996e4.js";import{d as U}from"./index.660c61b7.js";const v=[{value:"1",label:"\u5DF2\u5173\u6CE8",type:"success"},{value:"2",label:"\u5DF2\u51BB\u7ED3",type:"danger"},{value:"4",label:"\u672A\u5173\u6CE8",type:"warning"}],V=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"ID",prop:"id",width:60},{label:"\u624B\u673A\u53F7",prop:"mobile",minWidth:120,align:"left"},{label:"\u540D\u79F0",prop:"nickname",minWidth:80},{label:"openid",prop:"openid",minWidth:150},{label:"\u5173\u6CE8\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:e})=>{var a;return A(x,{type:((a=v.find(({value:n})=>n===String(e.status)))==null?void 0:a.type)||"success"},{default:()=>{var n;return((n=v.find(({value:l})=>l===String(e.status)))==null?void 0:n.label)||"--"}})}},{label:"\u521B\u5EFA\u65F6\u95F4",minWidth:140,prop:"addtime",formatter:({addtime:e})=>m(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u5173\u6CE8\u65F6\u95F4",minWidth:140,prop:"addtime",formatter:({subscribe_time:e})=>m(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],$={title:"\u5FAE\u4FE1\u8D26\u53F7\u6743\u9650\u7BA1\u7406",columns:V,responseCode:0,deleteProp:"payNo",statusRowProp:({companyCode:e})=>({companyNo:e}),apis:{httpList:H,httpDelete:M,httpAdd:!0,httpStatus:I,httpUpdate:j}},_={formItems:[{field:"nickname",type:"input",placeholder:"\u771F\u5B9E\u59D3\u540D",trigger:"change"},{field:"username",type:"input",placeholder:"\u624B\u673A\u53F7",trigger:"change"}]};var i=(e=>(e[e.update=0]="update",e[e.preview=1]="preview",e[e.create=2]="create",e))(i||{});const z="wechatManager",L=k({__name:"index",setup(e){const a=f(null),n=f(null),l=t=>({result:{...t||{}},deleteProp:[]}),F={pageSearchHook:()=>R(l,void 0,_)};P({success:()=>{var t;return(t=n.value)==null?void 0:t.onSearch()}});const C={content:{create:()=>{var t;return(t=a.value)==null?void 0:t.onDisplay(void 0,i.create)},preview:t=>{var o;return(o=a.value)==null?void 0:o.onDisplay(t,i.preview)},update:t=>{var o;return(o=a.value)==null?void 0:o.onDisplay(t,i.update)}}};async function D(t){Y.confirm("\u662F\u5426\u786E\u8BA4\u89E3\u9664\u7ED1\u5B9A?").then(async()=>{var u;(await U({id:t})).code===1&&((u=n.value)==null||u.onSearch())})}return(t,o)=>{const u=s("el-button"),E=s("el-tooltip"),b=s("PageContainer"),y=s("PageAuth");return h(),g(y,{pageName:z},{default:c(()=>[p(b,{hooks:F,events:C,contentConfig:d($),"search-config":d(_),"get-content-ref":r=>n.value=r},{content_action:c(({is_wx:r,id:w})=>[p(E,{content:"\u89E3\u9664\u5FAE\u4FE1\u7ED1\u5B9A"},{default:c(()=>[Number(r)===1?(h(),g(u,{key:0,type:"text",size:"mini",icon:d(S)("close"),onClick:Z=>D(w)},null,8,["icon","onClick"])):W("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"]),p(N,{ref_key:"roleModalRef",ref:a,onRefresh:o[0]||(o[0]=r=>n.value.onSearch())},null,512)]),_:1})}}});var Q=B(L,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/system/wechatManager/index.vue"]]);export{Q as default};