niucloud-admin/niucloud/public/admin/assets/sms_records-ad17bbfa.js
全栈小学生 26524c4bf5 update admin
2023-08-12 16:21:13 +08:00

2 lines
6.5 KiB
JavaScript

import{d as H,R as D,r as V,e as n,f as d,y as o,x as i,g as f,B as m,u as l,F as L,z as N,v as y,A as k,Q as I,H as E}from"./base-04829be5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{t}from"./index-043d021e.js";import{c as O,f as K}from"./notice-4a980f20.js";import{_ as M}from"./notice-records-info.vue_vue_type_script_setup_true_lang-11f22020.js";import{u as A}from"./vue-router-fee568b2.js";import{E as G}from"./index-db9b8d96.js";import{a as Q,E as q}from"./index-6bd50bb5.js";import{a as J,b as W,E as X}from"./index-02bf3820.js";import{E as Z}from"./index-0515f627.js";import{E as ee}from"./index-eb678249.js";import{E as te}from"./index-88566e4e.js";import{a as ae,E as oe}from"./index-ed9a1afd.js";import{E as le}from"./index-1808e3f9.js";import{v as re}from"./directive-013f0a4e.js";import"./common-111e3797.js";import"./common-2cf17469.js";import"./index-faea7bd5.js";import"./storage-1a3ddb14.js";import"./index-7e933ae4.js";import"./index-30df2c14.js";import"./index-236cb599.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-92283b18.js";import"./typescript-defaf979.js";import"./index-a2524300.js";/* empty css */import"./index-b1557f8a.js";import"./index-9a9de0a3.js";import"./error-78e43d3e.js";import"./scroll-e5463626.js";import"./vnode-85ccdc7f.js";import"./index-1d455165.js";import"./focus-trap-be36cfe9.js";import"./event-9519ab40.js";import"./index-de053f2e.js";import"./index-4edf2cad.js";import"./index-d7f4b4bb.js";import"./castArray-11aea762.js";import"./_Uint8Array-99b916e9.js";import"./_initCloneObject-e5a1aa13.js";import"./index-94a82d50.js";import"./index-e9e16697.js";import"./index-bf9de702.js";import"./strings-4ec3ae35.js";import"./isEqual-ba353d68.js";import"./debounce-f064e94e.js";import"./index-b519934c.js";import"./validator-6838b9a3.js";import"./flatten-94587e2b.js";import"./index-9d53c87f.js";import"./index-c3b3b83a.js";import"./_isIterateeCall-f0970b1f.js";const ie={class:"main-container"},ne={class:"flex justify-between items-center"},me={class:"text-[20px]"},pe={class:"mt-[10px]"},se={key:0},ce={key:1},de={key:2},ue={class:"mt-[16px] flex justify-end"},Nt=H({__name:"sms_records",setup(_e){const T=A().meta.title,e=D({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{key:"",receiver:"",create_time:[]}}),h=D({buyer:{label:t("buyerNotice"),list:[]},seller:{label:t("sellerNotice"),list:[]}});(async()=>{await O().then(p=>{Object.keys(p.data).forEach(a=>{const b=p.data[a],s={value:a,name:b.name};b.receiver_type==0?h.buyer.list.push(s):h.seller.list.push(s)})}).catch(()=>{})})();const w=V(),u=(p=1)=>{e.loading=!0,e.page=p,K({page:e.page,limit:e.limit,...e.searchParam}).then(a=>{e.loading=!1,e.data=a.data.data,e.total=a.data.total}).catch(()=>{e.loading=!1})};u();const g=V(null),F=p=>{g.value.setFormData(p),g.value.showDialog=!0};return(p,a)=>{const b=G,s=Q,x=J,z=W,B=X,R=Z,v=ee,S=q,P=te,c=ae,U=oe,$=le,j=re;return n(),d("div",ie,[o(P,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[f("div",ne,[f("span",me,m(l(T)),1)]),o(P,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:i(()=>[o(S,{inline:!0,model:e.searchParam,ref_key:"searchFormRef",ref:w},{default:i(()=>[o(s,{label:l(t)("searchReceiver"),prop:"receiver"},{default:i(()=>[o(b,{modelValue:e.searchParam.receiver,"onUpdate:modelValue":a[0]||(a[0]=r=>e.searchParam.receiver=r),placeholder:l(t)("receiverPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:l(t)("noticeKey"),prop:"key"},{default:i(()=>[o(B,{modelValue:e.searchParam.key,"onUpdate:modelValue":a[1]||(a[1]=r=>e.searchParam.key=r),clearable:"",placeholder:l(t)("groupIdPlaceholder"),class:"input-width"},{default:i(()=>[o(x,{label:l(t)("selectPlaceholder"),value:""},null,8,["label"]),(n(!0),d(L,null,N(h,(r,_)=>(n(),y(z,{key:_,label:r.label},{default:i(()=>[(n(!0),d(L,null,N(r.list,(C,Y)=>(n(),y(x,{label:C.name,value:C.value,key:Y},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:l(t)("createTime"),prop:"create_time"},{default:i(()=>[o(R,{modelValue:e.searchParam.create_time,"onUpdate:modelValue":a[2]||(a[2]=r=>e.searchParam.create_time=r),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":l(t)("startDate"),"end-placeholder":l(t)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),o(s,null,{default:i(()=>[o(v,{type:"primary",onClick:a[3]||(a[3]=r=>u())},{default:i(()=>[k(m(l(t)("search")),1)]),_:1}),o(v,{onClick:a[4]||(a[4]=r=>{var _;return(_=w.value)==null?void 0:_.resetFields()})},{default:i(()=>[k(m(l(t)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),f("div",pe,[I((n(),y(U,{data:e.data,size:"large"},{empty:i(()=>[f("span",null,m(e.loading?"":l(t)("emptyData")),1)]),default:i(()=>[o(c,{prop:"name",label:l(t)("noticeKey"),"min-width":"120"},null,8,["label"]),o(c,{prop:"notice_type",label:l(t)("noticeType"),"min-width":"120"},{default:i(({row:r})=>[r.notice_type=="sms"?(n(),d("div",se,m(l(t)("sms")),1)):E("",!0),r.notice_type=="wechat"?(n(),d("div",ce,m(l(t)("wechat")),1)):E("",!0),r.notice_type=="weapp"?(n(),d("div",de,m(l(t)("weapp")),1)):E("",!0)]),_:1},8,["label"]),o(c,{prop:"nickname",label:l(t)("nickname"),"min-width":"120"},null,8,["label"]),o(c,{prop:"receiver",label:l(t)("receiver"),"min-width":"120"},null,8,["label"]),o(c,{prop:"create_time",label:l(t)("createTime"),"min-width":"140"},null,8,["label"]),o(c,{label:l(t)("operation"),fixed:"right",width:"100"},{default:i(({row:r})=>[o(v,{type:"primary",link:"",onClick:_=>F(r)},{default:i(()=>[k(m(l(t)("info")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[j,e.loading]]),f("div",ue,[o($,{"current-page":e.page,"onUpdate:currentPage":a[5]||(a[5]=r=>e.page=r),"page-size":e.limit,"onUpdate:pageSize":a[6]||(a[6]=r=>e.limit=r),layout:"total, sizes, prev, pager, next, jumper",total:e.total,onSizeChange:a[7]||(a[7]=r=>u()),onCurrentChange:u},null,8,["current-page","page-size","total"])])]),o(M,{ref_key:"recordsDialog",ref:g,onComplete:u},null,512)]),_:1})])}}});export{Nt as default};