全栈小学生 e89199db6a 1
2023-06-01 19:37:55 +08:00

2 lines
7.6 KiB
JavaScript

import{E as ElIcon}from"./base-962c0c23.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-58212670.js";import"./index-6ef4c1c3.js";/* empty css */import{t}from"./index-e4761856.js";import{c as getNoticeList}from"./notice-2828befb.js";import{_ as _sfc_main$1}from"./notice-sms.vue_vue_type_script_setup_true_lang-e3528846.js";import{_ as _sfc_main$2}from"./notice-wechat.vue_vue_type_script_setup_true_lang-e8f0f882.js";import{_ as _sfc_main$3}from"./notice-weapp.vue_vue_type_script_setup_true_lang-de0c49ea.js";import{a as ElTableColumn,E as ElTable}from"./index-92e1b5d5.js";import{E as ElCard}from"./index-69523418.js";import{v as vLoading}from"./directive-c0c3e9a3.js";import{d as defineComponent,r as ref,M as reactive,Q as resolveComponent,L as withDirectives,u as unref,b as openBlock,e as createElementBlock,q as createVNode,p as withCtx,f as createBaseVNode,x as toDisplayString,n as normalizeClass,C as createCommentVNode}from"./runtime-core.esm-bundler-dc7a07d7.js";import{_ as _export_sfc}from"./_plugin-vue_export-helper-c27b6911.js";import"./vue-router-79053937.js";import"./el-overlay-60700377.js";import"./event-ff03ec12.js";import"./index-5d86eb33.js";import"./focus-trap-b8b5a003.js";/* empty css *//* empty css */import"./el-radio-bfd4b1ad.js";import"./storage-abe718b1.js";import"./index-8bcaafa6.js";import"./index-bba9e58c.js";import"./index-93f2c618.js";import"./index-7a123a20.js";import"./el-avatar-3bb47ce2.js";import"./index-d57cc47d.js";import"./common-6291c908.js";import"./common-2cf17469.js";/* empty css */import"./index-61c777fa.js";import"./_Uint8Array-6ff3cafa.js";import"./_initCloneObject-28e6bdaa.js";import"./index-df51d91a.js";import"./isEqual-c7d5e6d9.js";import"./flatten-d5d1dc97.js";import"./_isIterateeCall-c579b126.js";const _hoisted_1={class:"main-container"},_hoisted_2={class:"panel-title"},_hoisted_3={class:"flex flex-row flex-wrap m-[-4px]"},_hoisted_4={class:"flex"},_hoisted_5=["onClick"],_hoisted_6={class:"ml-0.5"},_hoisted_7=["onClick"],_hoisted_8={class:"ml-0.5"},_hoisted_9=["onClick"],_hoisted_10={class:"ml-0.5"},_hoisted_11={class:"panel-title"},_hoisted_12={class:"flex flex-row flex-wrap m-[-4px]"},_hoisted_13={class:"flex"},_hoisted_14=["onClick"],_hoisted_15={class:"ml-0.5"},_hoisted_16=["onClick"],_hoisted_17={class:"ml-0.5"},_hoisted_18=["onClick"],_hoisted_19={class:"ml-0.5"},_sfc_main=defineComponent({__name:"notice",setup(__props){const smsDialog=ref(null),wechatDialog=ref(null),weappDialog=ref(null);let noticeTableData=reactive({loading:!0,buyer:[],seller:[]});const loadNoticeList=()=>{noticeTableData.loading=!0,noticeTableData.buyer=[],noticeTableData.seller=[],getNoticeList().then(c=>{Object.keys(c.data).forEach(a=>{let o=c.data[a];o.sms_type=o.support_type.indexOf("sms")!==-1?1:0,o.wechat_type=o.support_type.indexOf("wechat")!==-1?1:0,o.weapp_type=o.support_type.indexOf("weapp")!==-1?1:0,o.receiver_type==1&&noticeTableData.buyer.push(o),o.receiver_type==2&&noticeTableData.seller.push(o)}),noticeTableData.loading=!1}).catch(()=>{noticeTableData.loading=!1})};loadNoticeList();const setNotice=(data,type)=>{data.type=type,eval("data.status=data.is_"+type),eval(type+"Dialog.value.setFormData(data)"),eval(type+"Dialog.value.showDialog = true;")};return(c,a)=>{const o=ElTableColumn,s=resolveComponent("SuccessFilled"),i=ElIcon,n=ElTable,r=ElCard,p=vLoading;return withDirectives((openBlock(),createElementBlock("div",_hoisted_1,[createVNode(r,{class:"box-card !border-none",shadow:"never"},{default:withCtx(()=>[createBaseVNode("h3",_hoisted_2,toDisplayString(unref(t)("buyerNotice")),1),createBaseVNode("div",_hoisted_3,[createVNode(n,{data:unref(noticeTableData).seller,size:"large"},{default:withCtx(()=>[createVNode(o,{prop:"name",label:unref(t)("noticeType"),"min-width":"120"},null,8,["label"]),createVNode(o,{label:unref(t)("operation"),fixed:"right","min-width":"300"},{default:withCtx(({row:e})=>[createBaseVNode("div",_hoisted_4,[e.sms_type==1?(openBlock(),createElementBlock("div",{key:0,class:"text-sm mr-1 flex items-center cursor-pointer",onClick:l=>setNotice(e,"sms")},[createVNode(i,{class:normalizeClass(["text-[15px] mr-[3px]",e.is_sms?"open":""])},{default:withCtx(()=>[createVNode(s)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_6,toDisplayString(unref(t)("sms")),1)],8,_hoisted_5)):createCommentVNode("",!0),e.wechat_type?(openBlock(),createElementBlock("div",{key:1,class:"text-sm flex items-center cursor-pointer ml-[20px]",onClick:l=>setNotice(e,"wechat")},[createVNode(i,{class:normalizeClass(["text-[15px] mr-[3px]",e.is_wechat?"open":""])},{default:withCtx(()=>[createVNode(s)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_8,toDisplayString(unref(t)("wechat")),1)],8,_hoisted_7)):createCommentVNode("",!0),e.weapp_type?(openBlock(),createElementBlock("div",{key:2,class:"text-sm flex items-center cursor-pointer ml-[20px]",onClick:l=>setNotice(e,"weapp")},[createVNode(i,{class:normalizeClass(["text-[15px] mr-[3px]",e.is_weapp?"open":""])},{default:withCtx(()=>[createVNode(s)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_10,toDisplayString(unref(t)("weapp")),1)],8,_hoisted_9)):createCommentVNode("",!0)])]),_:1},8,["label"])]),_:1},8,["data"])])]),_:1}),createVNode(r,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:withCtx(()=>[createBaseVNode("h3",_hoisted_11,toDisplayString(unref(t)("sellerNotice")),1),createBaseVNode("div",_hoisted_12,[createVNode(n,{data:unref(noticeTableData).buyer,size:"large"},{default:withCtx(()=>[createVNode(o,{prop:"name",label:unref(t)("noticeType"),"min-width":"120"},null,8,["label"]),createVNode(o,{label:unref(t)("operation"),fixed:"right","min-width":"300"},{default:withCtx(({row:e})=>[createBaseVNode("div",_hoisted_13,[e.sms_type==1?(openBlock(),createElementBlock("div",{key:0,class:"text-sm mr-1 flex items-center cursor-pointer",onClick:l=>setNotice(e,"sms")},[createVNode(i,{class:normalizeClass(["text-[15px] mr-[3px]",e.is_sms?"open":""])},{default:withCtx(()=>[createVNode(s)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_15,toDisplayString(unref(t)("sms")),1)],8,_hoisted_14)):createCommentVNode("",!0),e.wechat_type?(openBlock(),createElementBlock("div",{key:1,class:"text-sm flex items-center cursor-pointer ml-[20px]",onClick:l=>setNotice(e,"wechat")},[createVNode(i,{class:normalizeClass(["text-[15px] mr-[3px]",e.is_wechat?"open":""])},{default:withCtx(()=>[createVNode(s)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_17,toDisplayString(unref(t)("wechat")),1)],8,_hoisted_16)):createCommentVNode("",!0),e.weapp_type?(openBlock(),createElementBlock("div",{key:2,class:"text-sm flex items-center cursor-pointer ml-[20px]",onClick:l=>setNotice(e,"weapp")},[createVNode(i,{class:normalizeClass(["text-[15px] mr-[3px]",e.is_weapp?"open":""])},{default:withCtx(()=>[createVNode(s)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_19,toDisplayString(unref(t)("weapp")),1)],8,_hoisted_18)):createCommentVNode("",!0)])]),_:1},8,["label"])]),_:1},8,["data"])])]),_:1}),createVNode(_sfc_main$1,{ref_key:"smsDialog",ref:smsDialog,onComplete:a[0]||(a[0]=e=>loadNoticeList())},null,512),createVNode(_sfc_main$2,{ref_key:"wechatDialog",ref:wechatDialog,onComplete:a[1]||(a[1]=e=>loadNoticeList())},null,512),createVNode(_sfc_main$3,{ref_key:"weappDialog",ref:weappDialog,onComplete:a[2]||(a[2]=e=>loadNoticeList())},null,512)])),[[p,unref(noticeTableData).loading]])}}}),notice_vue_vue_type_style_index_0_scoped_66d0d78b_lang="",notice=_export_sfc(_sfc_main,[["__scopeId","data-v-66d0d78b"]]);export{notice as default};