formDrawer-cd9d1ea5.js 2.6 KB

1
  1. var r=(g,u,s)=>new Promise((p,m)=>{var o=e=>{try{i(s.next(e))}catch(l){m(l)}},c=e=>{try{i(s.throw(e))}catch(l){m(l)}},i=e=>e.done?p(e.value):Promise.resolve(e.value).then(o,c);i((s=s.apply(g,u)).next())});import{a as C,B as k}from"./index-c98ef572.js";import{X as x}from"./XTForm-6038013b.js";/* empty css */import{C as B}from"./CommonList-96fe734f.js";import{i as N,a as $}from"./indexApi-8892431a.js";import{d as Y,a0 as I,e as R,f as n,r as f,Z as T,o as P,q as M,y as S,af as d,g as v,z,j as L}from"./index-610a1d46.js";/* empty css */const V={class:"!pl-4"},j=Y({__name:"formDrawer",emits:["success","register"],setup(g,{emit:u}){const s=I(),p=R(()=>n(o)?"全部问题反馈":"全部系统公告"),m="800px",o=f(!1),c=f([]),i=T({blurry:""}),e=f([]),[l,{setDrawerProps:y,closeDrawer:D}]=C(t=>r(this,null,function*(){y({confirmLoading:!1}),o.value=t.isUpdate,yield _(),o.value||(c.value=[{name:"blurry",componentType:"Input",placeholder:"请输入搜索内容",prefix:"icon-xt-search",width:280},{name:"createTime",componentType:"RangePicker",placeholder:"请选择",format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD"}]),c.value=[]}));function _(){return r(this,null,function*(){if(o.value){const t=yield N({});e.value=t.map(a=>(a.icon="project-1|svg",a.title=`${a.content}`,a.descBefore=`${a.commitNickName}`,a.descAfter=`(${a.numbering}) ${a.sampleName}`,a))}else{const t=yield $({pageSize:5});e.value=t.data.map(a=>(a.tag={name:"公告",color:"#1D72FF",bgColor:"#EFF3FF"},a.title=`${a.title}`,a.descBefore=`${a.updateNickName}`,a.descAfter=`${a.content}`,a.date=`${a.updateTime}`,a.type="detail",a))}})}function w(){return r(this,null,function*(){try{D(),u("success",{})}finally{y({confirmLoading:!1})}})}function h(t){return r(this,null,function*(){i.blurry=t.blurry?t.blurry:"",yield _()})}function b(t){return r(this,null,function*(){})}function F(t){return r(this,null,function*(){o.value&&s.push({path:"/bizBus/contractDetail",query:{id:t.contractBasisId,name:t.sampleName||"无",contract:t.numbering||"123123",tab:5}})})}return(t,a)=>(P(),M(n(k),z(t.$attrs,{destroyOnClose:"",onRegister:n(l),title:n(p),width:m,onOk:w,showFooter:!1}),{default:S(()=>[d("div",V,[d("div",null,[v(n(x),{"form-data":c.value,onChange:h},null,8,["form-data"])]),d("div",null,[v(n(B),{type:"list",data:e.value,split:!0,foot:!0,onPage:b,onItemClick:F,total:e.value.length},null,8,["data","total"])])])]),_:1},16,["onRegister","title"]))}});const H=L(j,[["__scopeId","data-v-073e7305"]]);export{H as default};