Files
qiaoqiaoyun/dist/js/AppRecycleModal-0d337747.js
2025-07-09 23:02:05 +08:00

2 lines
6.8 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var f=(t,y,r)=>new Promise((A,c)=>{var a=o=>{try{d(r.next(o))}catch(m){c(m)}},h=o=>{try{d(r.throw(o))}catch(m){c(m)}},d=o=>o.done?A(o.value):Promise.resolve(o.value).then(a,h);d((r=r.apply(t,y)).next())});import{d as L,f as v,w as q,e as G,a3 as J,a4 as Q,a5 as l,V as g,a6 as S,af as M,ai as w,k as x,a8 as X,ae as R,a7 as Y,ak as Z,W as F}from"./vue-vendor-24c7dc61.js";import{B as ee}from"./index-1c3affea.js";import"./index-621e597c.js";import{u as te}from"./useListPage-62a041ef.js";import{n as oe,i as D}from"./antd-vue-vendor-0d72f01e.js";import{a7 as ne,j as ae,D as ie,k as B,a as se,l as le}from"./index-831af9dd.js";import{q as re}from"./organization.api-98a6e46c.js";import{U as pe}from"./UserAvatar-1a3df675.js";import ce from"./BasicTable-d435f501.js";import{T as de}from"./componentMap-c857637c.js";import"./BasicModal-58413bab.js";import"./useWindowSizeFn-8f085f6f.js";import"./useMethods-f689b480.js";import"./vxe-table-vendor-8813019a.js";import"./index-52c8c841.js";import"./useForm-14b2bc77.js";import"./helper-22dafba0.js";import"./JAreaLinkage-173780c9.js";import"./areaDataUtil-cdeee717.js";import"./china-area-data-vendor-556d14ee.js";import"./useFormItem-86503382.js";import"./JSelectUser-a44af43a.js";import"./useSelectBiz-2f560b0b.js";import"./props-8a7ac45b.js";import"./JSelectBiz-55a9591f.js";import"./JSelectDept-a90caee3.js";import"./index-f2fd5a28.js";import"./useContextMenu-810f9346.js";import"./JCodeEditor-66bd225e.js";import"./codemirror-17b6f671.js";import"./codemirror-26b29690.js";import"./active-line-512fef49.js";import"./JPopup-2a779923.js";import"./EasyCronInput-b2123242.js";import"./JCheckbox-0b89d32a.js";import"./JDictSelectTag-54dc3bdb.js";import"./JSelectUserByDept-bd619076.js";import"./UserSelectByDepModal-db060ece.js";import"./depart.api-339f4da6.js";import"./JEditor-249b2194.js";import"./index-b845562c.js";import"./JImageUpload-d644253a.js";import"./download-1ac6acce.js";import"./index-f99b266a.js";import"./JUpload-76e119c7.js";import"./index-d508f1f4.js";import"./index-6507b9cd.js";import"./index-4d0525a5.js";import"./UserSelectModal-d78c1490.js";const me=L({name:"AppRecycleModal",components:{BasicModal:ee,BasicTable:ce,TableAction:de,SearchOutlined:oe,UserAvatar:pe},emits:["reload","register"],setup(t,{emit:y}){const r=v(0);r.value=window.innerHeight-300;const A=ne(),c=v(""),a=v(!1),h=[{title:"应用名称",dataIndex:"appName",width:300,align:"left"},{title:"工作表数",dataIndex:"formCount",width:100,align:"left",customRender:({text:e})=>e||0},{title:"删除人",dataIndex:"realname",width:200,align:"left"},{title:"删除时间",dataIndex:"deleteTime",width:150,align:"left"}];function d(){return f(this,null,function*(){const e="/online/lowApp/tenantAppList";let n={tenantId:A.getTenant,delFlag:1};c.value&&(n.searchKeyWord=c.value);const s=yield B.get({url:e,params:n},{isTransformResponse:!1});let b=[];return s.success&&(b=s.result,o(b)),{records:b}})}function o(e){e.sort(function(i,n){let s=D(i.deleteTime).unix(),b=D(n.deleteTime).unix();return s-b})}const m=te({designScope:"recycle-data-list-modal",tableProps:{immediate:!1,api:d,useSearchForm:!1,columns:h,showActionColumn:!1,actionColumn:{width:160,fixed:"right"},showIndexColumn:!1,rowSelection:{columnWidth:50},showTableSetting:!1,tableSetting:{setting:!1}}}),{prefixCls:C,tableContext:T,createMessage:k}=m,[p,u,{rowSelection:_,selectedRowKeys:E}]=T,[O,{closeModal:U}]=ae(()=>f(this,null,function*(){yield u.reload(),u.setProps({showActionColumn:a.value})})),{createWarningModal:z}=se();q(()=>A.getTenant,e=>f(this,null,function*(){a.value=!1,e&&(yield W(e))}),{immediate:!0});function W(e){return f(this,null,function*(){const i=yield re(e);if(i){const{superAdmin:n,packCodes:s}=i;n===!0&&(a.value=n),s&&s.length>0&&(s.indexOf("appAdmin")>=0||s.indexOf("superAdmin")>=0)&&(a.value=!0)}})}function K(e){return a.value===!0?[{label:"彻底删除",icon:"ant-design:redo",popConfirm:{title:"是否确认删除,删除之后无法恢复",confirm:j.bind(null,e.id)}},{label:"还原",icon:"ant-design:redo",onClick:()=>N(e)}]:[]}function N(e){return f(this,null,function*(){const i="/online/lowApp/restore";let n={id:e.id};yield B.get({url:i,params:n}),yield u.reload(),y("reload")})}const $={},H=G(()=>window.innerWidth*.8);function P(){z({title:"彻底删除记录",content:"记录删除后无法恢复,请确认您和工作表成员都不再需要这些记录再行删除。",okCancel:!0,okText:"删除",cancelText:"取消",onOk:()=>{}})}function V(){u.reload()}function j(e){return f(this,null,function*(){const i="/online/lowApp/deleteCompletely";let n={id:e};yield B.delete({url:i,params:n},{joinParamsToUrl:!0}),yield u.reload()})}return{deleteData:P,prefixCls:C,bodyHeight:r,registerModal:O,closeModal:U,registerTable:p,rowSelection:_,tableStyle:$,modalWidth:H,selectedRowKeys:E,keyword:c,getTableAction:K,hasAdminAuth:a,onSearchByKeyword:ie(V,500)}}});const I=t=>(J("data-v-327b4e20"),t=t(),Q(),t),ue={key:0,style:{display:"flex"},class:"pointer"},fe={class:"app-name-text",style:{"margin-left":"5px","margin-top":"5px"}},ge={style:{width:"100%",height:"100%"},title:"关闭"},ye={style:{display:"flex","flex-direction":"row","align-items":"center","margin-right":"60px"}},he=I(()=>l("span",{style:{"font-size":"17px","font-weight":"500","margin-left":"5px"}}," 回收站应用 ",-1)),_e=I(()=>l("span",{style:{"margin-left":"6px",color:"rgb(158, 158, 158)","font-size":"13px"}}," 记录7天后将被自动删除 ",-1)),we=I(()=>l("span",{style:{flex:"1"}},null,-1)),xe={style:{width:"200px",margin:"0 20px"}};function Ae(t,y,r,A,c,a){const h=g("Icon"),d=g("UserAvatar"),o=g("TableAction"),m=g("BasicTable"),C=g("SearchOutlined"),T=g("a-input"),k=g("BasicModal");return S(),M(k,{minHeight:100,onRegister:t.registerModal,width:"950px",destroyOnClose:"",canFullscreen:!1,footer:null},{closeIcon:w(()=>[l("div",ge,[x(h,{icon:"ant-design:close-outlined",style:{"font-size":"22px","margin-top":"21px"}})])]),title:w(()=>[l("div",ye,[he,_e,we,l("span",xe,[x(T,{placeholder:"请输入关键字搜索",class:"my-input",value:t.keyword,"onUpdate:value":y[0]||(y[0]=p=>t.keyword=p),onChange:t.onSearchByKeyword},{prefix:w(()=>[x(C,{style:{color:"#c0c0c0"}})]),_:1},8,["value","onChange"])])])]),default:w(()=>[l("div",{class:X([t.prefixCls,"p-2"]),style:R(t.tableStyle)},[x(m,{onRegister:t.registerTable},{bodyCell:w(({column:p,text:u,record:_})=>[p.dataIndex==="appName"?(S(),Y("div",ue,[l("div",{class:"icon-name",style:R({"background-color":_.iconBackColor})},[x(h,{style:{color:"#ffffff"},size:24,icon:_.iconType?_.iconType:"ant-design:appstore-outlined"},null,8,["icon"])],4),l("span",fe,Z(u),1)])):F("",!0),p.dataIndex==="realname"?(S(),M(d,{key:1,detail:_},null,8,["detail"])):F("",!0)]),action:w(({record:p})=>[x(o,{actions:t.getTableAction(p)},null,8,["actions"])]),_:1},8,["onRegister"])],6)]),_:1},8,["onRegister"])}const _t=le(me,[["render",Ae],["__scopeId","data-v-327b4e20"]]);export{_t as default};