| 1 |
- var z=Object.defineProperty,A=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var O=(n,o,e)=>o in n?z(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e,V=(n,o)=>{for(var e in o||(o={}))H.call(o,e)&&O(n,e,o[e]);if(R)for(var e of R(o))J.call(o,e)&&O(n,e,o[e]);return n},$=(n,o)=>A(n,G(o));var d=(n,o,e)=>new Promise((w,m)=>{var C=i=>{try{u(e.next(i))}catch(r){m(r)}},y=i=>{try{u(e.throw(i))}catch(r){m(r)}},u=i=>i.done?w(i.value):Promise.resolve(i.value).then(C,y);u((e=e.apply(n,o)).next())});import{aj as _,aR as F,at as L}from"./index.js";import{u as X,a as I,_ as ee}from"./useTable-bf847966.js";import{_ as te}from"./formDrawer.vue_vue_type_script_setup_true_lang-dc91a57b.js";import{_ as oe}from"./viewDrawer.vue_vue_type_script_setup_true_lang-5e2e0151.js";import{c as ae,s as ne}from"./data-98afcb37.js";import{c as ie,d as E}from"./smsChannelApi-bf893b54.js";import{l as T}from"./index-fe06ec6c.js";import{u as K}from"./index-d7f80bb7.js";import{d as se,f as v,B as re,q as le,Y as l,Z as ce,l as k,a7 as c,a6 as f,u as a,E as b,$ as M,a9 as D,n as U}from"./vue-b33f04cb.js";import{O as N}from"./antd-f204cf77.js";import"./useForm-b1e549d3.js";import"./FormItem.vue_vue_type_script_lang-aa52e9e4.js";import"./useFormItem-1a9613e7.js";import"./index-c733fbf6.js";import"./useWindowSizeFn-e2b93e2a.js";import"./uuid-31b8b5a4.js";import"./useSortable-764357db.js";import"./download-7fff4f5c.js";import"./index-2f799b33.js";import"./copyTextToClipboard-2136d900.js";import"./index-2f695166.js";import"./TextEditor-6383dadf.js";import"./onMountedOrActivated-3a1cee4e.js";import"./componentMap-5ed4f2d1.js";import"./sortable.esm-4ae27e0b.js";import"./index-f7f1225a.js";const Ue=se({__name:"index",setup(n){const o=v(),e=v();re(()=>d(this,null,function*(){o.value=yield T({dictCode:"sys_sms_channel"}),e.value=yield T({dictCode:"sys_disable_type"})}));const{createConfirm:w,createMessage:m}=L(),[C,{openDrawer:y}]=K(),[u,{openDrawer:i}]=K(),r=v([{field:"create_time",direction:"DESC"}]),[q,{reload:g,getSelectRowKeys:P}]=X({title:"短信渠道",api:ie,rowKey:"id",columns:ae,showIndexColumn:!0,rowSelection:{type:"checkbox"},formConfig:{labelWidth:120,schemas:ne,autoSubmitOnEnter:!0,baseColProps:{xs:24,sm:12,md:12,lg:8},resetButtonOptions:{preIcon:"icon-delete|iconfont"},submitButtonOptions:{preIcon:"icon-search|iconfont"}},useSearchForm:!0,bordered:!1,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:Z,sortFn:Y});function j(t){i(!0,{record:t})}function Q(){y(!0,{isUpdate:!1})}function W(t){y(!0,{record:t,isUpdate:!0})}function S(t){return d(this,null,function*(){t?(yield E([t.id]),m.success("删除成功!"),yield g()):w({content:"你确定要删除?",iconType:"warning",onOk:()=>d(this,null,function*(){const p=P();yield E(p),m.success("删除成功!"),yield g()})})})}function Y(t){t!=null&&t.order&&(t!=null&&t.columnKey)&&(r.value=[{field:t.columnKey,direction:t.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function Z(t){return $(V({},t),{orders:r.value})}function x(B){return d(this,arguments,function*({isUpdate:t,values:p}){yield g()})}return(t,p)=>{const B=le("auth");return l(),ce("div",null,[k(a(ee),{onRegister:a(q)},{bodyCell:c(({column:h,record:s})=>[h.key==="type"?(l(),f(a(N),{key:0,color:a(_)(o.value,s.type,"fontColor")},{default:c(()=>[b(M(a(_)(o.value,s.type,"label")),1)]),_:2},1032,["color"])):D("",!0),h.key==="disable"?(l(),f(a(N),{key:1,color:a(_)(e.value,s.disable,"fontColor")},{default:c(()=>[b(M(a(_)(e.value,s.disable,"label")),1)]),_:2},1032,["color"])):D("",!0),h.key==="action"?(l(),f(a(I),{key:2,actions:[{auth:"sms:channel:query",icon:"icon-eye|iconfont",tooltip:"查看",label:"查看",onClick:j.bind(null,s)},{auth:"sms:channel:edit",icon:"icon-edit|iconfont",tooltip:"编辑",label:"编辑",onClick:W.bind(null,s)},{auth:"sms:channel:remove",icon:"icon-delete|iconfont",tooltip:"删除",label:"删除",color:"error",popConfirm:{title:"是否确认删除",placement:"left",confirm:S.bind(null,s)}}]},null,8,["actions"])):D("",!0)]),toolbar:c(()=>[U((l(),f(a(F),{type:"primary",onClick:Q,preIcon:"icon-plus|iconfont"},{default:c(()=>[b(" 新增 ")]),_:1})),[[B,["sms:channel:add"]]]),U((l(),f(a(F),{type:"primary",danger:"",onClick:p[0]||(p[0]=h=>S(null)),preIcon:"icon-delete|iconfont"},{default:c(()=>[b(" 批量删除 ")]),_:1})),[[B,["sms:channel:remove"]]])]),_:1},8,["onRegister"]),k(te,{onRegister:a(C),onSuccess:x},null,8,["onRegister"]),k(oe,{onRegister:a(u),onSuccess:x},null,8,["onRegister"])])}}});export{Ue as default};
|