test_lgq/niucloud/public/admin/assets/notice-3328dedd.js

2 lines
7.1 KiB
JavaScript
Raw Normal View History

2024-01-24 17:36:08 +08:00
import{d as defineComponent,O as useRoute,r as ref,n as reactive,a1 as resolveComponent,y as withDirectives,h as openBlock,c as createElementBlock,a as createBaseVNode,t as toDisplayString,u as unref,e as createVNode,w as withCtx,N as t,A as normalizeClass,B as createCommentVNode,ah as ElTableColumn,a2 as ElIcon,aj as ElTable,$ as ElCard,a0 as vLoading,_ as _export_sfc}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{c as getNoticeList}from"./notice-b720dec8.js";import{_ as _sfc_main$1}from"./notice-sms.vue_vue_type_script_setup_true_lang-641df06a.js";import{_ as _sfc_main$2}from"./notice-wechat.vue_vue_type_script_setup_true_lang-27a87836.js";import{_ as _sfc_main$3}from"./notice-weapp.vue_vue_type_script_setup_true_lang-86a73708.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */const _hoisted_1={class:"main-container"},_hoisted_2={class:"flex ml-[18px] justify-between items-center mt-[20px]"},_hoisted_3={class:"text-[20px]"},_hoisted_4={class:"panel-title !text-base"},_hoisted_5={class:"flex flex-row flex-wrap m-[-4px]"},_hoisted_6={class:"flex"},_hoisted_7=["onClick"],_hoisted_8={class:"ml-0.5"},_hoisted_9=["onClick"],_hoisted_10={class:"ml-0.5"},_hoisted_11=["onClick"],_hoisted_12={class:"ml-0.5"},_hoisted_13={class:"panel-title !text-base"},_hoisted_14={class:"flex flex-row flex-wrap m-[-4px]"},_hoisted_15={class:"flex"},_hoisted_16=["onClick"],_hoisted_17={class:"ml-0.5"},_hoisted_18=["onClick"],_hoisted_19={class:"ml-0.5"},_hoisted_20=["onClick"],_hoisted_21={class:"ml-0.5"},_sfc_main=defineComponent({__name:"notice",setup(__props){const route=useRoute(),pageName=route.meta.title,smsDialog=ref(null),wechatDialog=ref(null),weappDialog=ref(null),noticeTableData=reactive({loading:!0,buyer:[],seller:[]}),loadNoticeList=()=>{noticeTableData.loading=!0,noticeTableData.buyer=[],noticeTableData.seller=[],getNoticeList().then(c=>{Object.keys(c.data).forEach(s=>{const a=c.data[s];a.sms_type=a.support_type.indexOf("sms")!==-1?1:0,a.wechat_type=a.support_type.indexOf("wechat")!==-1?1:0,a.weapp_type=a.support_type.indexOf("weapp")!==-1?1:0,a.receiver_type==0&&noticeTableData.buyer.push(a),a.receiver_type==1&&noticeTableData.seller.push(a)}),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,s)=>{const a=ElTableColumn,o=resolveComponent("SuccessFilled"),i=ElIcon,n=ElTable,r=ElCard,_=vLoading;return withDirectives((openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("span",_hoisted_3,toDisplayString(unref(pageName)),1)]),createVNode(r,{class:"box-card !border-none",shadow:"never"},{default:withCtx(()=>[createBaseVNode("h3",_hoisted_4,toDisplayString(unref(t)("buyerNotice")),1),createBaseVNode("div",_hoisted_5,[createVNode(n,{data:noticeTableData.seller,size:"large"},{default:withCtx(()=>[createVNode(a,{prop:"name",label:unref(t)("noticeType"),"min-width":"120"},null,8,["label"]),createVNode(a,{label:unref(t)("operation"),align:"right",fixed:"right","min-width":"300"},{default:withCtx(({row:e})=>[createBaseVNode("div",_hoisted_6,[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(o)]),_:2},1032,["class"]),createBaseVNode("span",_hoisted_8,toDisplayString(unref(t)("sms")),1)],8,_hoisted_7)):createCommentVNode("",!0),e.wechat_type?(openBlock(),createEle