index-BuVGSgCC.js 9.7 KB

1
  1. var ye=Object.defineProperty,be=Object.defineProperties;var Ce=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;var A=(f,i,s)=>i in f?ye(f,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):f[i]=s,P=(f,i)=>{for(var s in i||(i={}))_e.call(i,s)&&A(f,s,i[s]);if(Q)for(var s of Q(i))ke.call(i,s)&&A(f,s,i[s]);return f},T=(f,i)=>be(f,Ce(i));var v=(f,i,s)=>new Promise((x,p)=>{var R=l=>{try{w(s.next(l))}catch(_){p(_)}},k=l=>{try{w(s.throw(l))}catch(_){p(_)}},w=l=>l.done?x(l.value):Promise.resolve(l.value).then(R,k);w((s=s.apply(f,i)).next())});import{u as E}from"./index-DYp2Qjp4.js";import{u as we,_ as xe}from"./useForm-BfB231QP.js";import"./helper-B0yEaptj.js";import{ap as De,W as Se,a as F,i as ze,u as Re,_ as Be}from"./entry/index-CRWhxBeP.js";import{P as Ie}from"./PageTitle-DoNYlIhY.js";import{S as Pe}from"./Sift-DdDLimfj.js";import"./index-CD5zFmZN.js";import"./index-lE2idd8k.js";import{a3 as Te,B as z,Y as $,Q as j,R as Ee}from"./antd-BfqWtMX3.js";/* empty css */import{S as Fe}from"./SubMenu-C918eZhZ.js";import Le from"./FormDrawerSift-DcdrsTll.js";import{D as Me}from"./data-D9Iyo4yU.js";import{s as Ve,T as Ne}from"./reveiwDrawer-BCtPiqCT.js";import{V as Ue}from"./index-BJUkcCht.js";import{d as Qe,ai as Ae,f as m,Y as $e,r as O,o as je,Z as d,_ as h,$ as y,k as r,a5 as c,u as n,a4 as q,a8 as C,a9 as Oe,ac as qe,a0 as H,F as K,a7 as Y,ad as He,G}from"./vue-DM5HGU8Z.js";import{b as Ke}from"./feildApi-CbV-MHXu.js";import{b as Ye}from"./resourceApi-CKj0y817.js";import{b as Ge}from"./repositoryApi-Bt2jc6T8.js";import{c as Je}from"./cateApi-BE6kfD5q.js";import{V as We}from"./ViewDrawer-COs3HGm2.js";import{b as Xe}from"./uuid-BUBnBT7J.js";import{b as J,d as Ze,C as et,a as tt}from"./common-DpkSdXuu.js";import{a as at}from"./libraryApi-28_gbvCl.js";import"./FormItem.vue_vue_type_script_lang-r-ozwU0K.js";import"./index-BGDG2Aiy.js";import"./useSortable-BUyXn7hO.js";import"./download-DbzL13NI.js";import"./base64Conver-DEMZeTZS.js";import"./index-BZ4uXGij.js";import"./IconPicker.vue_vue_type_script_setup_true_lang-BMkV6zCu.js";import"./copyTextToClipboard-B8vsl9wq.js";import"./index-BshNMORD.js";import"./index-CIEo7xez.js";import"./index-DOkdpLQv.js";import"./onMountedOrActivated-Ckq_czNf.js";import"./UploadPreviewModal-BZsd-hmR.js";import"./useWindowSizeFn-CEueHQop.js";import"./BasicForm.vue_vue_type_script_setup_true_lang-ByuHmjlN.js";import"./BasicForm.vue_vue_type_style_index_0_lang-wVUE9AOT.js";import"./useForm-C-769eP8.js";import"./imageEnum-BRgYKvjO.js";import"./sysOrgApi-tY_yXKfV.js";import"./ToExamineContentDrawer-DbIFgLbY.js";import"./data-SiVRATnY.js";import"./attentionApi-BlenvL9Y.js";const ot={class:"head"},nt={class:"flex justify-between"},rt={class:"flex items-center"},st={class:"flex"},it={class:"flex justify-between my-2"},lt={class:"flex"},ut={key:0,class:"flex mb-2"},ct={class:"section"},mt=["onClick"],dt={key:0},ft=["href"],pt={key:0},gt=["onClick"],vt=["src"],ht={key:0,class:"footer"},yt=Qe({__name:"index",setup(f){const{createMessage:i}=Re(),s=Ae(),x=m([]),p=m([]),R=m([]),k=$e(),w=m([]),l=m(""),_=m(""),W=m([]),B=m(""),L=m("软件CBB"),M=m([]),V=m(""),[X,{openDrawer:Z}]=E(),[ee,{openDrawer:te}]=E(),[ae,{openDrawer:oe}]=E(),[ne,{getFieldsValue:re}]=we({schemas:Ve,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),b=m([]),N=O({name:"",tags:[]});je(()=>v(this,null,function*(){const e=yield Je({});x.value=e.splice(1,10).map(t=>({text:t.name,event:t.id})),B.value=x.value[0].event,yield U()}));const I=m(),u=O({id:"biz_cbb_library_table",columns:[],stripe:!1,border:"inner",data:[],proxyConfig:null,showOverflow:!0,resizable:!1,toolbarConfig:null,round:!0,height:window.screen.height-320,headerRowClassName:"row-class",headerCellClassName:"table-basic_header",columnConfig:{resizable:!1},pagerConfig:{total:0,currentPage:1,pageSize:10,autoHidden:!1,layouts:["Total","PrevPage","Number","NextPage","Sizes","FullJump"]}}),se={pageChange({pageSize:e,currentPage:t}){u.pagerConfig.currentPage=t,u.pagerConfig.pageSize=e,D()},cellClick({row:e,columnIndex:t,column:a}){a.type!=et.ATTACHMENT&&(e!=null&&e.id||(e.id=e.resourceId),e.menuId=l.value,(t===0||t===1)&&te(!0,{record:{row:e},menuId:l.value,createByNickname:"",isUpdate:!0}))}};function U(){return v(this,null,function*(){const e=yield Ge({categoryId:B.value});w.value=De.mapTree(e,a=>T(P({},a),{title:a.name,key:a.id,children:a.children}));const t=yield at({status:"menu_unReviewed"});M.value=t.data})}function ie(e){return v(this,null,function*(){var t,a;if(e.data){const o=(a=(t=e.info)==null?void 0:t.node)==null?void 0:a.dataRef;l.value=e.data,V.value=o==null?void 0:o.parentId,o&&(_.value=o==null?void 0:o.name,yield le(),yield D())}})}function le(){return v(this,null,function*(){p.value=[];const e=yield Ke({menuId:l.value||""});p.value=e!=null&&e.length?Me(e):[],I.value.loadColumn([...p.value])})}function D(){return v(this,null,function*(){u.loading=!0;const t={exactList:b.value.map(o=>{let g={fieldKey:o.field,inputBoxType:o.type};return ze(o.value)?g.multiContent=o.value:g.simpleContent=o.value,g}),blurry:N.name||"",menuId:l.value||""},a=yield Ye(T(P({},t),{pageNum:u.pagerConfig.currentPage}));u.pagerConfig.total=a.total||0,u.data=a.data||[],u.loading=!1,R.value=tt(p.value)})}function ue(e){openDrawerDownload(!0,{record:e,index:0,resourceId:e==null?void 0:e.id,isUpdate:!0})}function ce(){u.loading=!0,p.value=[],I.value.loadColumn([...p.value]),u.pagerConfig.total=0,u.data=[],u.loading=!1}function S(e){return v(this,null,function*(){var t;if(e=="filter"){const a=[];b.value.forEach(o=>{const g={field:o.field,value:o.value};o.isDict&&(g.value=o.dict),a.push(g)}),Z(!0,{record:a,columns:p.value})}e=="toExamine"&&oe(!0,{isUpdate:!1,record:{}}),e=="edit"&&(l.value&&_.value?k.push({path:"/bizMe/library/edit",query:{categoryId:l.value,ownerRegionId:B.value,repositoryId:V.value,groupId:Xe(),title:_.value}}):i.warning("请选择分类")),(e=="back"||e=="route"||e=="pageTitle")&&k.push({path:"/bizMange/platformManage",query:{selectId:(t=s.query)==null?void 0:t.id}})})}function me(e){return v(this,null,function*(){L.value=e.text,B.value=e.event,yield U(),ce()})}function de(e){var t;k.push((t=J(e.reference))==null?void 0:t.path)}function fe(){k.push({path:"/bizMe/flow"})}function pe(){return v(this,null,function*(){N.name=re().name,u.pagerConfig.currentPage=1,yield D()})}function ge(e){return v(this,null,function*(){b.value=[];for(const t in e)e[t]&&R.value.forEach(a=>{a.field==t&&b.value.push({field:a.field,label:a.label,value:e[t],showVal:e[t],type:a.type})});u.pagerConfig.currentPage=1,yield D()})}function ve(){}function he(e){return v(this,null,function*(){e.type=="clear"&&(b.value=[]),e.type=="close"&&(b.value=b.value.filter(t=>{var a;return t.field!=((a=e.item)==null?void 0:a.field)})),u.pagerConfig.currentPage=1,yield D()})}return(e,t)=>(d(),h("div",null,[y("div",null,[y("div",ot,[y("div",nt,[y("div",rt,[r(n(Se),{arrow:"",placement:"bottom",trigger:["click","hover"],dropMenuList:x.value,onMenuEvent:me,overlayClassName:"flow-overlay"},{default:c(()=>[y("div",st,[r(n(Ie),{title:L.value},null,8,["title"]),r(n(Te),{class:"ml-2"})])]),_:1},8,["dropMenuList"])]),y("div",it,[y("div",lt,[r(n(xe),{onRegister:n(ne),onFieldValueChange:pe,style:{width:"280px"},class:"mr-2"},null,8,["onRegister"]),p.value.length?(d(),q(n($),{key:0,count:b.value.length},{default:c(()=>[r(n(z),{size:"large",onClick:t[0]||(t[0]=()=>S("filter")),class:"border-none"},{icon:c(()=>[r(F,{icon:"icon-filter|iconfont",size:18,color:"#3D4155"})]),_:1})]),_:1},8,["count"])):C("",!0),r(n(z),{size:"large",onClick:t[1]||(t[1]=()=>S("toExamine")),class:"ml-2 border-none"},{icon:c(()=>[r(n($),{dot:!!M.value.length},{default:c(()=>[r(F,{icon:"icon-time|iconfont",size:18,color:"#3D4155"})]),_:1},8,["dot"])]),_:1}),p.value.length?(d(),q(n(z),{key:1,size:"large",onClick:t[2]||(t[2]=()=>S("edit")),class:"ml-2 border-none"},{icon:c(()=>[r(F,{icon:"icon-edit|iconfont",size:18,color:"#3D4155"})]),_:1})):C("",!0)])])]),b.value.length?(d(),h("div",ut,[r(n(Pe),{data:b.value,onClose:he},null,8,["data"])])):C("",!0)]),y("div",ct,[r(n(Ee),{gutter:10},{default:c(()=>[r(n(j),{span:4,class:"menu"},{default:c(()=>[r(n(Fe),{type:"tree",treeData:w.value,"select-item":l.value,"onUpdate:selected":ie},null,8,["treeData","select-item"])]),_:1}),r(n(j),{span:20,class:"content"},{default:c(()=>[r(n(Ue),Oe({ref_key:"gridRef",ref:I},u,qe(se),{class:"table-basic"}),{reference:c(({row:a})=>{var o;return[a.reference?(d(),h("div",{key:0,onClick:g=>de(a)},H((o=n(J)(a.reference))==null?void 0:o.text),9,mt)):C("",!0)]}),hyperlinks:c(({row:a})=>[a.hyperLink?(d(),h("div",dt,[(d(!0),h(K,null,Y(a.hyperLink,(o,g)=>(d(),h("span",{key:o},[y("a",{href:o,target:"_blank"},H(o),9,ft),g<a.hyperLink.length-1?(d(),h("span",pt," ; ")):C("",!0)]))),128))])):C("",!0)]),fileStorage:c(({row:a})=>[a.attachment?(d(),h("div",{key:0,class:"flex cursor-pointer table-attachment",onClick:o=>ue(a)},[(d(!0),h(K,null,Y(a.attachment,(o,g)=>(d(),h("img",{width:"28",height:"36",class:"table-attachment_item",key:o,style:He({zIndex:999-g,marginLeft:g>0?"-18px":"0px"}),src:n(Ze)(o)},null,12,vt))),128))],8,gt)):C("",!0)]),_:1},16)]),_:1})]),_:1})])]),W.value.length?(d(),h("div",ht,[t[7]||(t[7]=y("div",null,null,-1)),y("div",null,[r(n(z),{border:!1,onClick:t[3]||(t[3]=()=>S("back")),class:"mr-2"},{default:c(()=>t[5]||(t[5]=[G(" 取消 ")])),_:1}),r(n(z),{type:"primary",border:!1,onClick:t[4]||(t[4]=()=>S("route"))},{default:c(()=>t[6]||(t[6]=[G(" 添加 ")])),_:1})])])):C("",!0),r(Le,{onRegister:n(X),onSuccess:ge},null,8,["onRegister"]),r(Ne,{onRegister:n(ae),onSuccess:fe},null,8,["onRegister"]),r(We,{onRegister:n(ee),onSuccess:ve},null,8,["onRegister"])]))}}),da=Be(yt,[["__scopeId","data-v-8395519c"]]);export{da as default};