Files
qhmes/web-dist/js/OneNativeList-Nab5jxoj.js
2026-06-16 18:19:57 +08:00

2 lines
10 KiB
Java

var st=Object.defineProperty;var X=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var K=(p,a,o)=>a in p?st(p,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):p[a]=o,Q=(p,a)=>{for(var o in a||(a={}))mt.call(a,o)&&K(p,o,a[o]);if(X)for(var o of X(a))pt.call(a,o)&&K(p,o,a[o]);return p};var $=(p,a,o)=>new Promise((I,_)=>{var l=s=>{try{y(o.next(s))}catch(x){_(x)}},d=s=>{try{y(o.throw(s))}catch(x){_(x)}},y=s=>s.done?I(s.value):Promise.resolve(s.value).then(l,d);y((o=o.apply(p,a)).next())});import{ai as ut,d as z,s as dt,bS as ct,d4 as ft,x as M,aR as gt,aS as vt,aF as _t,M as yt,v as xt}from"./index-X7Y8jykP.js";import{filterMultiDictText as b}from"./JDictSelectUtil-DwVTEDM5.js";import{_ as kt}from"./OneNativeModal.vue_vue_type_style_index_0_lang-CnmmxSbB.js";import{useMethods as wt}from"./useMethods-D3efiSSd.js";import{downloadFile as Ct}from"./renderUtils-BiIzV8ua.js";import{initDictOptions as N}from"./index-Cq6YxX27.js";import{C as ht}from"./index-BwqG9R3y.js";import"./index-CfNJyBRj.js";import{D as bt}from"./dropdown-jkliuVyN.js";import{e as It,o as St,r as m,y as O,z as c,A as i,b as Dt,K as jt,Q as u,f as n,H,E as v,u as w,G as Tt,C as k,F as R}from"./vue-vendor-DNhG1Cve.js";import{_ as zt}from"./index-DTjkSGYl.js";import Mt from"./index-saD4h7VJ.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./OneNativeForm-BBkDSJL0.js";import"./JCheckbox-DmUv8wp7.js";import"./Group-UHkub2tu.js";import"./Checkbox-Dbxs4we4.js";import"./index-BuONesFs.js";import"./index-DSsDi_fL.js";import"./JDictSelectTag-DqzD0_k1.js";import"./useFormItem-b_EqFlJz.js";import"./CompTypeEnum-Dk5ke9k4.js";import"./index-DfHu-LAS.js";import"./Group-DBzJABA_.js";import"./RadioButton-DRBix2Fq.js";import"./JSwitch.vue_vue_type_style_index_0_lang-R2Oaw4pZ.js";import"./index-DsixALRt.js";import"./JUpload.vue_vue_type_style_index_0_lang-B_SS088g.js";import"./JImageUpload-BxXxXpHa.js";import"./UploadOutlined-D3m-zwOG.js";import"./JSearchSelect-B3fSM9V5.js";import"./JPopup-DDVr8ty3.js";import"./JPopupOnlReportModal-CmG4yrak.js";import"./index-BDvqZ5j4.js";import"./BasicModal-xH56XuRZ.js";import"./ModalHeader-Sr8KwhJJ.js";import"./useTimeout-D5AmIBZw.js";import"./index-BzChaRPg.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./index-ByCwbQDV.js";import"./index-Upeu4GGa.js";import"./index-C4wWpZeQ.js";import"./index-M9QP6cvf.js";import"./Skeleton-CimgOdM7.js";import"./useScrollTo-0FPEw5-K.js";import"./useIntersectionObserver-BGOgyKyu.js";import"./useAppInject-DPZGPcR3.js";import"./index-CuWaQdlK.js";import"./index-DO7ZhK45.js";import"./usePopBiz-CvP50ONP.js";import"./useModal-DaJ3Bflg.js";import"./JCategorySelect-BFvbXA0r.js";import"./index-COZPPMBf.js";import"./index-Cl-8Hzo4.js";import"./useMaxLevel-DE205ncc.js";import"./eagerComputed-BTlOruLW.js";import"./JSelectUserByDept-CLCEwgah.js";import"./index-Bzmv9Ie7.js";import"./bem-CTsBfXqP.js";import"./props-Cc-8EPhZ.js";import"./fromPairs-Dx9PT-t0.js";import"./useContextMenu-BncvQCmV.js";import"./difference-CGvbIcA7.js";import"./index-C7ckZv9Z.js";import"./DirectoryTree-nk_YTTIy.js";import"./FolderOpenOutlined-SzIPA7z0.js";import"./useSelectBiz-C58pZLPQ.js";import"./depart.api-nbAZZHTa.js";import"./props-BWd0f6uH.js";import"./TreeIcon-7lwypClM.js";import"./JSelectBiz-CRkPo6gN.js";import"./index-J2mOtM3w.js";import"./JEditor-PW3hmaEx.js";import"./index-Cmtq_YLa.js";import"./Editor-DbH9VuAv.js";import"./uuid-CODpppBC.js";import"./onMountedOrActivated-DhSdLlqP.js";import"./JMarkdownEditor-Cta_PblS.js";import"./index-C9_hfRup.js";import"./JTreeSelect.vue_vue_type_script_setup_true_lang-C_lbOOLy.js";import"./JInputPop.vue_vue_type_style_index_0_lang-BSkWBPP5.js";import"./JSelectInput-DYluZAmU.js";import"./JSelectPosition-CKATrSh9.js";import"./JSelectMultiple-ByaAeU9_.js";import"./JSelectDept-UTtMJ1Qp.js";import"./DeptSelectModal-BB7o3IIg.js";import"./JSelectUser-Dg8SJP_z.js";import"./UserSelectModal-RTq67Ki6.js";import"./JAreaSelect-CpsykH4q.js";import"./areaDataUtil-XMUQ61Vi.js";import"./pcaUtils-DD1r5iUJ.js";import"./JAreaLinkage-BZhoJ4vN.js";import"./index-Cw819OkH.js";import"./JSelectRole-DmJCAzgw.js";import"./JTreeDict.vue_vue_type_style_index_0_lang-CVP_5AVM.js";import"./JCodeEditor-CYntK7CN.js";import"./htmlmixed-DQsDbTFv.js";import"./vue-SgbjusIu.js";/* empty css */import"./JAddInput-DQ2QLVhU.js";import"./MinusCircleOutlined-mDqJKkqP.js";import"./JFormContainer-LLg2uKhY.js";import"./dayjs-jnKD3YGS.js";import"./index-aCD42OrZ.js";import"./quarterOfYear-BU2sPnff.js";import"./dayjs-ALi1pEeb.js";import"./index-DklMb9Qc.js";import"./UpOutlined-B1UMbtrP.js";import"./index-B4gPlWQt.js";import"./scrollTo-D49dA-9c.js";import"./operationUnit-vCu2co3e.js";const Nt={class:"table-operator"},Ot={class:"ant-alert ant-alert-info",style:{"margin-bottom":"16px"}},Rt={style:{"font-weight":"600"}},Et={key:0,style:{"font-size":"12px","font-style":"italic"}},Ft=["src","preview"],Pt={key:0,style:{"font-size":"12px","font-style":"italic"}},At=["onClick"],Bt={class:"ant-dropdown-link"},Vt=["onClick"],Uo=It({__name:"OneNativeList",setup(p){const{handleExportXls:a,handleImportXls:o}=wt(),I=m({}),_=m(!1),l=m([]),d=m();ut();const y=m([{title:"文本",align:"center",dataIndex:"name"},{title:"字典下拉",align:"center",dataIndex:"xiala",customRender:({text:t})=>t?b(l.value.xiala,t):""},{title:"字典单选",align:"center",dataIndex:"danxuan",customRender:({text:t})=>t?b(l.value.danxuan,t):""},{title:"字典多选",align:"center",dataIndex:"duoxuan",customRender:({text:t})=>t?b(l.value.duoxuan,t):""},{title:"开关",align:"center",dataIndex:"kaiguan",customRender:({text:t})=>t?b(l.value.kaiguan,t):""},{title:"日期",align:"center",dataIndex:"riqi",customRender:function({text:t}){return t?t.length>10?t.substr(0,10):t:""}},{title:"年月日时分秒",align:"center",dataIndex:"nyrsfm"},{title:"时间",align:"center",dataIndex:"shijian"},{title:"文件",align:"center",dataIndex:"wenjian"},{title:"图片",align:"center",dataIndex:"tupian"},{title:"操作",dataIndex:"action",align:"center",fixed:"right",width:147}]),s=Dt({list:"/test/jeecgDemo/oneNative/list",delete:"/test/jeecgDemo/oneNative/delete",exportXls:"/test/jeecgDemo/oneNative/exportXls",importExcel:"test/jeecgDemo/oneNative/importExcel"}),x=m([]),f=m({current:1,pageSize:10,pageSizeOptions:["10","20","30"],showTotal:(t,e)=>e[0]+"-"+e[1]+" "+t+"",showQuickJumper:!0,showSizeChanger:!0,total:0}),g=m([]),S=m([]),E=m({column:"createTime",order:"desc"}),F=m({}),{createMessage:U}=dt();function q(t,e){g.value=t,S.value=e}function G({pagination:t,filters:e,sorter:r}){f.value=t,E.value=r,F.value=Q({},e)}function J(){d.value.disableSubmit=!1,d.value.add()}function L(){g.value=[],S.value=[]}function W(){yt.confirm({title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>{z.delete({url:s.delete,data:{ids:g.value}},{joinParamsToUrl:!0}).then(()=>{D()})}})}function Y(){let t=Object.assign(I.value,E.value,F.value);return t.field=Z(),t.pageNo=f.value.current,t.pageSize=f.value.pageSize,ft(t)}function Z(){let t="id,";return y.value.forEach(function(e){t+=","+e.dataIndex}),t}function P(t){t===1&&(f.value.current=1),_.value=!0;let e=Y();z.get({url:s.list,params:e},{isTransformResponse:!1}).then(r=>{r.success?(x.value=r.result.records,r.result&&r.result.total?f.value.total=r.result.total:f.value.total=0):U.warning(r.message)}).finally(()=>{_.value=!1})}function tt(t){return t&&t.indexOf(",")>0&&(t=t.substring(0,t.indexOf(","))),xt(t)}function et(t){d.value.disableSubmit=!1,d.value.edit(t)}function ot(t){d.value.disableSubmit=!0,d.value.edit(t)}function it(t){z.delete({url:s.delete,data:{ids:t}},{joinParamsToUrl:!0}).then(e=>{D()})}function nt(){return $(this,null,function*(){l.value.flzds=yield ct({code:"B01"}),l.value.xiala=yield N("sex"),l.value.danxuan=yield N("sex"),l.value.duoxuan=yield N("urgent_level")})}function D(){g.value=[],S.value=[],P(1)}return St(()=>{l.value.kaiguan=[{text:"",value:"1"},{text:"",value:"2"}],P(),nt()}),(t,e)=>{const r=jt("a-button"),j=vt,A=gt,B=bt,at=Mt,rt=zt,lt=ht;return c(),O(lt,{bordered:!1},{default:i(()=>[u("div",Nt,[n(r,{onClick:J,type:"primary",preIcon:"ant-design:plus"},{default:i(()=>[...e[0]||(e[0]=[v("新增",-1)])]),_:1}),g.value.length>0?(c(),O(B,{key:0},{overlay:i(()=>[n(A,null,{default:i(()=>[n(j,{key:"1",onClick:W},{default:i(()=>[n(w(M),{icon:"ant-design:delete-outlined"}),e[1]||(e[1]=v(" 删除 ",-1))]),_:1})]),_:1})]),default:i(()=>[n(r,null,{default:i(()=>[e[2]||(e[2]=v("批量操作 ",-1)),n(w(M),{icon:"mdi:chevron-down"})]),_:1})]),_:1})):H("",!0)]),u("div",null,[u("div",Ot,[e[3]||(e[3]=u("i",{class:"anticon anticon-info-circle ant-alert-icon"},null,-1)),e[4]||(e[4]=v(" 已选择 ",-1)),u("a",Rt,Tt(g.value.length),1),e[5]||(e[5]=v(" ",-1)),u("a",{style:{"margin-left":"24px"},onClick:L},"清空")]),n(rt,{ref:"table",size:"middle",scroll:{x:!0},bordered:"",rowKey:"id",class:"j-table-force-nowrap",columns:y.value,dataSource:x.value,pagination:f.value,loading:_.value,rowSelection:{selectedRowKeys:g.value,onChange:q},onChange:G},{bodyCell:i(({column:T,text:C,record:h})=>[T.dataIndex==="tupian"?(c(),k(R,{key:0},[C?(c(),k("img",{key:1,src:tt(C),preview:h.id,alt:"",class:"anty-img-wrap"},null,8,Ft)):(c(),k("span",Et,"无图片"))],64)):T.dataIndex==="wenjian"?(c(),k(R,{key:1},[C?(c(),O(r,{key:1,ghost:!0,type:"primary",preIcon:"ant-design:download",size:"small",onClick:V=>w(Ct)(C)},{default:i(()=>[...e[6]||(e[6]=[v(" 下载 ",-1)])]),_:1},8,["onClick"])):(c(),k("span",Pt,"无文件"))],64)):T.dataIndex==="action"?(c(),k(R,{key:2},[u("a",{onClick:V=>et(h)},"编辑",8,At),n(at,{type:"vertical"}),n(B,null,{overlay:i(()=>[n(A,{class:"antd-more"},{default:i(()=>[n(j,null,{default:i(()=>[u("a",{onClick:V=>ot(h)},"详情",8,Vt)]),_:2},1024),n(j,null,{default:i(()=>[n(w(_t),{title:"确定删除吗?",onConfirm:()=>it(h.id),placement:"left"},{default:i(()=>[...e[8]||(e[8]=[u("a",null,"删除",-1)])]),_:1},8,["onConfirm"])]),_:2},1024)]),_:2},1024)]),default:i(()=>[u("a",Bt,[e[7]||(e[7]=v("更多 ",-1)),n(w(M),{icon:"mdi-light:chevron-down"})])]),_:2},1024)],64)):H("",!0)]),_:1},8,["columns","dataSource","pagination","loading","rowSelection"])]),n(kt,{ref_key:"oneProtogenesisModal",ref:d,onOk:D},null,512)]),_:1})}}});export{Uo as default};