index-DdsDXHfN.js 4.7 KB

1
  1. var q=Object.defineProperty,G=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var D=(a,e,o)=>e in a?q(a,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[e]=o,S=(a,e)=>{for(var o in e||(e={}))X.call(e,o)&&D(a,o,e[o]);if(x)for(var o of x(e))Z.call(e,o)&&D(a,o,e[o]);return a},B=(a,e)=>G(a,Q(e));var n=(a,e,o)=>new Promise((p,d)=>{var f=s=>{try{l(o.next(s))}catch(c){d(c)}},_=s=>{try{l(o.throw(s))}catch(c){d(c)}},l=s=>s.done?p(s.value):Promise.resolve(s.value).then(f,_);l((o=o.apply(a,e)).next())});import{B as R,f as V,u as A}from"./entry/index-BaQQ7BQ_.js";import{u as H,_ as J}from"./useTable-BSOWtk5o.js";import{_ as L}from"./TableImg.vue_vue_type_style_index_0_lang-1Kd8nEMt.js";import{s as W,c as Y,_ as I}from"./formDrawer.vue_vue_type_script_setup_true_lang-CeUhDTW0.js";import{c as ee,d as P}from"./sysPosApi-DcBg5o6f.js";import{l as te}from"./index-D6-fj_Lr.js";import{u as oe}from"./index-Mu5dydaG.js";import{P as ae}from"./SubMenu.vue_vue_type_style_index_0_scoped_9b6103ff_lang-EL89TTg4.js";import"./index-CFMHSB5r.js";import{u as ie,_ as se}from"./useForm-C4X-ZdZ_.js";import"./BasicForm.vue_vue_type_style_index_0_lang-BiIkb6ny.js";import{d as re,f as T,D as ne,q as le,Z as m,_ as ce,$ as g,k as b,u as i,m as $,a6 as w,a7 as u,G as v,a0 as me,aa as E}from"./vue-CF9JqwIh.js";import{X as ue}from"./antd-ILpsl5AZ.js";import"./BasicForm.vue_vue_type_script_setup_true_lang-BhiE9_bz.js";import"./FormItem.vue_vue_type_script_lang-Dp4O1V3R.js";import"./useForm-B90AflV1.js";import"./uuid-BUBnBT7J.js";import"./useWindowSizeFn-CiJNBK0Q.js";import"./onMountedOrActivated-D34Dt7uC.js";import"./sortable.esm-CoO8jRpa.js";import"./componentMap-DjxH3hEY.js";import"./validate-B4kNjbGk.js";import"./index-CXGOl87Z.js";import"./useSortable-6iYBSviO.js";import"./download-D1ZoFQnu.js";import"./base64Conver-BAcTuUD2.js";import"./index-BDVnX7zP.js";import"./IconPicker.vue_vue_type_script_setup_true_lang-0J_QZbkb.js";import"./copyTextToClipboard-Cu8x8bym.js";import"./index-L2ZLrFTi.js";import"./index-D6Qi77pD.js";import"./index-Pqf9ZLE_.js";import"./resourceApi-D9gL48ec.js";const pe={class:"warp"},de={class:"flex justify-between mb-2"},fe={class:"flex"},_e={class:"mr-2",style:{width:"400px"}},Le=re({__name:"index",setup(a){const e=T();ne(()=>n(this,null,function*(){e.value=yield te({dictCode:"sys_disable_type"})}));const{createConfirm:o,createMessage:p}=A(),[d,{openDrawer:f}]=oe(),_=T([{field:"create_time",direction:"DESC"}]),[l,{getFieldsValue:s}]=ie({schemas:W,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[c,{reload:y,getSelectRowKeys:K}]=H({api:ee,rowKey:"id",columns:Y,showIndexColumn:!0,rowSelection:{type:"checkbox"},useSearchForm:!1,bordered:!1,actionColumn:{width:150,title:"操作",dataIndex:"action"},beforeFetch:O,sortFn:U});function M(){f(!0,{isUpdate:!1})}function N(t){f(!0,{record:t,isUpdate:!0})}function C(t){return n(this,null,function*(){t?(yield P([t.id]),p.success("删除成功!"),yield y()):o({content:"你确定要删除?",iconType:"warning",onOk:()=>n(this,null,function*(){const r=K();yield P(r),p.success("删除成功!"),yield y()})})})}function U(t){t!=null&&t.order&&(t!=null&&t.columnKey)&&(_.value=[{field:t.columnKey,direction:t.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function O(t){for(let r in s())t[r]=s()[r];return B(S({},t),{orders:_.value})}function z(k){return n(this,arguments,function*({isUpdate:t,values:r}){yield y()})}function j(){return n(this,null,function*(){yield y()})}return(t,r)=>{const k=le("auth");return m(),ce("div",pe,[g("div",de,[b(i(ae),{title:"岗位管理"}),g("div",fe,[g("div",_e,[b(i(se),{onRegister:i(l),onFieldValueChange:j},null,8,["onRegister"])]),$((m(),w(i(R),{type:"primary",onClick:M,size:"large"},{default:u(()=>[v(" 新增 ")]),_:1})),[[k,["sys:role:add"]]])])]),b(i(J),{onRegister:i(c)},{bodyCell:u(({column:F,record:h})=>[F.key==="disable"?(m(),w(i(ue),{key:0,color:i(V)(e.value,h.disable,"fontColor")},{default:u(()=>[v(me(i(V)(e.value,h.disable,"label")),1)]),_:2},1032,["color"])):E("",!0),F.key==="action"?(m(),w(i(L),{key:1,actions:[{auth:"sys:pos:edit",icon:"icon-edit|iconfont",tooltip:"编辑",label:"编辑",onClick:N.bind(null,h)},{auth:"sys:pos:remove",icon:"icon-delete|iconfont",tooltip:"删除",label:"删除",color:"error",popConfirm:{title:"是否确认删除",placement:"left",confirm:C.bind(null,h)}}]},null,8,["actions"])):E("",!0)]),tableFooter:u(()=>[g("div",null,[$((m(),w(i(R),{type:"primary",ghost:"",danger:"",class:"btn btn-primary btn-sm",onClick:r[0]||(r[0]=()=>C(null))},{default:u(()=>[v(" 删除 ")]),_:1})),[[k,["sys:pos:remove"]]])])]),_:1},8,["onRegister"]),b(I,{onRegister:i(d),onSuccess:z},null,8,["onRegister"])])}}});export{Le as default};