gameapi-client/dist-API/assets/index.CUbErF3f.js

2 lines
7.4 KiB
JavaScript

import{T as S,_ as de,r as f,C as se,J as me,k as d,G as F,o as c,c as L,d as a,e as t,H as C,f as n,l as pe,q as w,t as s,I as K,n as k,m as V,D as Q,X as E,K as be,L as fe,B as ce,h as _e,v as ge,x as he}from"./index.R3qQMktZ.js";function ve(i){return S({url:"/member/label/list",method:"get",params:i})}function we(i){return S({url:"/member/label/"+i,method:"get"})}function ye(i){return S({url:"/member/label",method:"post",data:i})}function Ne(i){return S({url:"/member/label",method:"put",data:i})}function Ce(i){return S({url:"/member/label/"+i,method:"delete"})}const ke=i=>(ge("data-v-3782023e"),i=i(),he(),i),Ve={class:"app-container"},Se={class:"right-box"},Ie=ke(()=>k("span",null,"0",-1)),Le={key:0},Ue={class:"dialog-footer"},De=ce({name:"Label"}),Be=Object.assign(De,{setup(i){const{proxy:r}=_e(),{ff_member_label_icon:A}=r.useDict("ff_member_label_icon"),j=f([]),_=f(!1),U=f(!0),I=f(!0),D=f([]),G=f(!0),H=f(!0),B=f(0),R=f(""),J=se({form:{},queryParams:{pageNum:1,pageSize:10,orderNum:null,labelName:null,iconColor:null},rules:{labelName:[{required:!0,message:r.t("请输入标签名称")}],iconColor:[{required:!0,message:r.t("请选择图标")}]}}),{queryParams:b,form:u,rules:X}=me(J);function h(){U.value=!0,ve(b.value).then(l=>{j.value=l.rows,B.value=l.total,U.value=!1})}function M(){_.value=!1,q()}function q(){u.value={id:null,orderNum:null,labelName:null,iconColor:"NO_ICON",remark:null},r.resetForm("labelRef")}function $(){b.value.pageNum=1,h()}function W(){r.resetForm("queryRef"),$()}function Y(l){D.value=l.map(o=>o.id),G.value=l.length!=1,H.value=!l.length}function Z(){q(),_.value=!0,R.value=r.t("添加会员标签")}function x(l){q();const o=l.id||D.value;we(o).then(y=>{u.value=y.data,_.value=!0,R.value=r.t("修改会员标签")})}function ee(){r.$refs.labelRef.validate(l=>{l&&(u.value.id!=null?Ne(u.value).then(o=>{r.$modal.msgSuccess(r.t("修改成功")),_.value=!1,h()}):ye(u.value).then(o=>{r.$modal.msgSuccess(r.t("新增成功")),_.value=!1,h()}))})}function le(l){const o=l.id||D.value;r.$modal.confirm(r.t('是否确认删除会员标签ID为"')+o+r.t('"的数据项?')).then(function(){return Ce(o)}).then(()=>{h(),r.$modal.msgSuccess(r.t("删除成功"))}).catch(()=>{})}return h(),(l,o)=>{const y=d("el-input"),N=d("el-form-item"),v=d("el-button"),z=d("el-form"),P=d("el-col"),ae=d("right-toolbar"),T=d("el-row"),m=d("el-table-column"),te=d("el-table"),oe=d("pagination"),ne=d("el-radio"),re=d("el-radio-group"),ue=d("el-dialog"),O=F("hasPermi"),ie=F("loading");return c(),L("div",Ve,[a(T,{justify:"space-between"},{default:t(()=>[a(P,{span:18},{default:t(()=>[C(a(z,{model:n(b),ref:"queryRef",inline:!0,"label-width":"68px"},{default:t(()=>[a(N,{label:l.t("标签名称"),prop:"labelName"},{default:t(()=>[a(y,{modelValue:n(b).labelName,"onUpdate:modelValue":o[0]||(o[0]=e=>n(b).labelName=e),placeholder:l.t("请输入标签名称"),clearable:"",onKeyup:pe($,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(N,null,{default:t(()=>[a(v,{type:"primary",icon:"Search",onClick:$},{default:t(()=>[w(s(l.t("搜索")),1)]),_:1}),a(v,{icon:"Refresh",onClick:W},{default:t(()=>[w(s(l.t("重置")),1)]),_:1})]),_:1})]),_:1},8,["model"]),[[K,n(I)]])]),_:1}),a(P,{span:6},{default:t(()=>[k("div",Se,[C((c(),V(v,{type:"primary",plain:"",icon:"Plus",onClick:Z},{default:t(()=>[w(s(l.t("新增标签")),1)]),_:1})),[[O,["member:label:add"]]]),a(ae,{showSearch:n(I),"onUpdate:showSearch":o[1]||(o[1]=e=>Q(I)?I.value=e:null),onQueryTable:h},null,8,["showSearch"])])]),_:1})]),_:1}),C((c(),V(te,{data:n(j),onSelectionChange:Y,border:!0,stripe:""},{default:t(()=>[a(m,{type:"selection",width:"55",align:"center"}),a(m,{label:l.t("排序"),align:"center",prop:"orderNum",width:"60"},null,8,["label"]),a(m,{label:l.t("ID"),align:"center",prop:"id",width:"60"},null,8,["label"]),a(m,{label:l.t("图标"),align:"center",prop:"iconColor"},{default:t(e=>[a(T,{justify:"center"},{default:t(()=>{var p,g;return[k("span",{class:"icon-color-text",style:E({background:(p=e==null?void 0:e.row)==null?void 0:p.iconColor})},s((g=e==null?void 0:e.row)==null?void 0:g.labelName),5)]}),_:2},1024)]),_:1},8,["label"]),a(m,{label:l.t("标签名称"),align:"center",prop:"labelName"},null,8,["label"]),a(m,{label:l.t("描述"),align:"center",prop:"remark","show-overflow-tooltip":"","min-width":"300"},null,8,["label"]),a(m,{label:l.t("该标签人数"),align:"center"},{default:t(e=>[Ie]),_:1},8,["label"]),a(m,{label:l.t("操作"),align:"center","class-name":"small-padding fixed-width"},{default:t(e=>[C((c(),V(v,{link:"",type:"primary",icon:"Edit",onClick:p=>x(e.row)},{default:t(()=>[w(s(l.t("修改")),1)]),_:2},1032,["onClick"])),[[O,["member:label:edit"]]]),C((c(),V(v,{link:"",type:"primary",icon:"Delete",onClick:p=>le(e.row)},{default:t(()=>[w(s(l.t("删除")),1)]),_:2},1032,["onClick"])),[[O,["member:label:remove"]]])]),_:1},8,["label"]),a(m,{label:l.t("操作人"),align:"center",prop:"updateBy"},{default:t(e=>{var p,g;return[k("span",null,s(((p=e==null?void 0:e.row)==null?void 0:p.updateBy)||((g=e==null?void 0:e.row)==null?void 0:g.createBy)||"--"),1)]}),_:1},8,["label"]),a(m,{label:l.t("操作时间"),align:"center",prop:"updateTime"},{default:t(e=>{var p,g;return[k("span",null,s(((p=e==null?void 0:e.row)==null?void 0:p.updateTime)||((g=e==null?void 0:e.row)==null?void 0:g.createTime)||"--"),1)]}),_:1},8,["label"])]),_:1},8,["data"])),[[ie,n(U)]]),C(a(oe,{total:n(B),page:n(b).pageNum,"onUpdate:page":o[2]||(o[2]=e=>n(b).pageNum=e),limit:n(b).pageSize,"onUpdate:limit":o[3]||(o[3]=e=>n(b).pageSize=e),onPagination:h},null,8,["total","page","limit"]),[[K,n(B)>0]]),a(ue,{title:n(R),modelValue:n(_),"onUpdate:modelValue":o[8]||(o[8]=e=>Q(_)?_.value=e:null),width:"500px","append-to-body":""},{footer:t(()=>[k("div",Ue,[a(v,{type:"primary",onClick:ee},{default:t(()=>[w(s(l.t("确 定")),1)]),_:1}),a(v,{onClick:M},{default:t(()=>[w(s(l.t("取 消")),1)]),_:1})])]),default:t(()=>[a(z,{ref:"labelRef",model:n(u),rules:n(X),"label-width":"80px"},{default:t(()=>[a(N,{label:l.t("排序"),prop:"orderNum"},{default:t(()=>[a(y,{modelValue:n(u).orderNum,"onUpdate:modelValue":o[4]||(o[4]=e=>n(u).orderNum=e),placeholder:l.t("请输入排序")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(N,{label:l.t("标签名称"),prop:"labelName"},{default:t(()=>[a(y,{modelValue:n(u).labelName,"onUpdate:modelValue":o[5]||(o[5]=e=>n(u).labelName=e),placeholder:l.t("请输入标签名称"),maxlength:"16","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(N,{label:l.t("图标"),prop:"iconColor"},{default:t(()=>[a(re,{modelValue:n(u).iconColor,"onUpdate:modelValue":o[6]||(o[6]=e=>n(u).iconColor=e)},{default:t(()=>[a(T,{justify:"space-between"},{default:t(()=>[(c(!0),L(be,null,fe(n(A),e=>(c(),V(P,{span:8,key:e.value},{default:t(()=>[a(ne,{value:e.value},{default:t(()=>[e.value==="NO_ICON"?(c(),L("span",Le,s(e.label),1)):(c(),L("span",{key:1,class:"icon-color-text",style:E({background:e.value})},s(n(u).labelName),5))]),_:2},1032,["value"])]),_:2},1024))),128))]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),a(N,{label:l.t("描述"),prop:"remark"},{default:t(()=>[a(y,{modelValue:n(u).remark,"onUpdate:modelValue":o[7]||(o[7]=e=>n(u).remark=e),maxlength:"90",placeholder:l.t("请输入描述"),"show-word-limit":"",type:"textarea",rows:4},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}}),qe=de(Be,[["__scopeId","data-v-3782023e"]]);export{qe as default};