2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
|
import{d as G,O as K,n as W,r as g,f as X,h as m,c as f,e as a,w as n,a as u,t as i,u as t,i as d,N as l,F as C,G as D,I as v,y as q,R as J,a8 as Q,E as Z,W as ee,X as le,as as ae,aF as te,cK as re,Y as ne,$ as oe,ah as ie,aw as se,aj as me,at as de,a0 as pe}from"./index-4dcc0234.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"./el-form-item-4ed993c7.js";import{_ as ce}from"./default_headimg-a897263d.js";import{B as ue,v as _e,p as be,C as fe,D as ge}from"./member-97cfd04b.js";import{_ as he}from"./add-member.vue_vue_type_script_setup_true_lang-ca7422e5.js";import{_ as ve}from"./edit-member.vue_vue_type_script_setup_true_lang-7698037b.js";/* empty css */import"./index-742b412a.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";import"./attachment-c69dd9fd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";/* empty css */import"./sys-8ead7f22.js";const ye={class:"main-container"},ke={class:"flex justify-between items-center"},xe={class:"text-[20px]"},we={class:"mt-[10px]"},Ce={class:"flex items-center"},De=["src"],Pe={key:1,class:"w-[50px] h-[50px] mr-[10px]",src:ce,alt:""},Ee={class:"flex flex flex-col"},Me={class:"flex flex-col items-start"},Ve={class:"flex items-center"},Le={class:"mt-[16px] flex justify-end"},fl=G({__name:"member",setup($e){const T=K().meta.title,o=W({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{keyword:"",register_type:"",member_label:"",register_channel:"",create_time:[]}}),P=g(),E=g([]);(async()=>{E.value=await(await ue({})).data})();const M=g([]);(async()=>{M.value=await(await _e()).data})();const F=s=>{s&&(s.resetFields(),_())},_=(s=1)=>{o.loading=!0,o.page=s,be({page:o.page,limit:o.limit,...o.searchParam}).then(r=>{o.loading=!1,o.data=r.data.data,o.total=r.data.total}).catch(()=>{o.loading=!1})};_();const B=X(),k=g(null),x=g(null);function N(s){const r=g({type:"member_label",id:s.member_id,title:l("setLable"),data:s});x.value.setDialogType(r.value),x.value.showDialog=!0}function z(s){Q.confirm(l("memberDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{fe(s.member_id).then(()=>{_()}).catch(()=>{})})}const I=()=>{k.value.setFormData(),k.value.showDialog=!0},R=s=>{B.push(`/member/detail?id=${s.member_id}`)},V=(s,r)=>{ge({status:r,member_ids:[s.member_id]}).then(b=>{b.code>=0&&_()})};return(s,r)=>{const b=Z,U=ee,h=le,y=ae,L=te,S=re,Y=ne,$=oe,p=ie,w=se,j=me,A=de,H=pe;return m(),f("div",ye,[a($,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[u("div",ke,[u("span",xe,i(t(T)),1),a(b,{type:"primary",onClick:I},{default:n(()=>[d(i(t(l)("addMember")),1)]),_:1})]),a($,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:n(()=>[a(Y,{inline:!0,model:o.searchParam,ref_key:"searchFormRef",ref:P},{default:n(()=>[a(h,{label:t(l)("memberInfo"),prop:"keyword"},{default:n(()=>[a(U,{modelValue:o.searchParam.keyword,"onUpdate:modelValue":r[0]||(r[0]=e=>o.searchParam.keyword=e),class:"w-[240px]",placeholder:t(l)("memberInfoPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(h,{label:t(l)("registerChannel"),prop:"register_channel"},{default:n(()=>[a(L,{modelValue:o.searchParam.register_channel,"onUpdate:modelValue":r[1]||(r[1]=e=>o.searchParam.register_channel=e),clearable:"",placeholder:t(l)("channelPlaceholder"),class:"input-width"},{def
|