| 1 |
- var V=Object.defineProperty,z=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var I=(e,o,t)=>o in e?V(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,_=(e,o)=>{for(var t in o||(o={}))X.call(o,t)&&I(e,t,o[t]);if(k)for(var t of k(o))E.call(o,t)&&I(e,t,o[t]);return e},h=(e,o)=>z(e,O(o));var u=(e,o,t)=>new Promise((g,s)=>{var m=i=>{try{p(t.next(i))}catch(r){s(r)}},b=i=>{try{p(t.throw(i))}catch(r){s(r)}},p=i=>i.done?g(i.value):Promise.resolve(i.value).then(m,b);p((t=t.apply(e,o)).next())});import"./PageTab.vue_vue_type_style_index_0_scoped_58eceae6_lang-fa97ce6e.js";import{P as U}from"./PageTab-9281e917.js";import{X as j}from"./XTForm-6038013b.js";import{u as q,B as A}from"./useTable-867c4776.js";import{T as G}from"./TableAction-5a56375b.js";import"./TableImg.vue_vue_type_style_index_0_lang-5ef0e11d.js";import{b1 as H,bk as v,bl as K,d as L,Z as R,r as w,aa as Q,o as x,m as B,g as f,f as n,af as y,y as Z,ah as $,bd as J,be as W,w as Y,bf as ee,t as D,q as te,bz as oe,j as ae}from"./index-610a1d46.js";import{l as ie,a as ne}from"./index-981858ed.js";import{X as se}from"./XTUpload.vue_vue_type_style_index_0_scoped_61a00cd1_lang-bad913d6.js";import{u as re}from"./index-985aa6f5.js";/* empty css */import"./useForm-c19ef35c.js";import"./index-b6d11df2.js";import"./index-72381a11.js";import"./index-4ed0dc84.js";import"./uuid-98bbe2a6.js";import"./download-a90dd227.js";import"./uniqBy-2b2a500d.js";import"./index-ee1a65fd.js";import"./useWindowSizeFn-1829b247.js";import"./useContentViewHeight-20fe3432.js";import"./componentMap-5f77da43.js";import"./clickOutside-a1389e7b.js";import"./sortable.esm-4ae27e0b.js";import"./SettingOutlined-56eda530.js";import"./RedoOutlined-bc502432.js";import"./index-74f93929.js";const le=[{title:"合同编号",dataIndex:"numbering",align:"left",width:160},{title:"检测类别",dataIndex:"inspectionType",align:"left",width:90},{title:"委托单位名称",dataIndex:"clientName",align:"left"},{title:"样品名称",dataIndex:"sampleName",align:"left"},{title:"检测依据",dataIndex:"status",align:"left"}];H();const ce=e=>v.post({url:"/info/originRecord/query/page",params:K(e)}),de=e=>v.post({url:"/info/originRecord/removeByIds",params:e}),pe=e=>v.post({url:"/info/originRecord/file/"+e}),ue={class:"px-4 py-2"},me={class:"bg-white wrap"},fe={class:"flex justify-between header"},ye={class:"mt-4 content"},ge=L({__name:"index",setup(e){const{createMessage:o}=oe(),[t,{openModal:g}]=re(),s=R({}),m=[{key:"inspectionType",dictCode:"inspection_type"}],b=[{label:"原始记录库",key:"0"}],p=w([]),i=w(""),r=R({blurry:"",inspectionType:null}),T=w([{field:"create_time",direction:"DESC"}]);Q(()=>u(this,null,function*(){const a=yield ie(m.map(l=>l.dictCode));for(const l in a){const c=m.filter(d=>d.dictCode==l)[0];s[c.key]=a[l]}p.value=[{name:"blurry",componentType:"Input",placeholder:"请输入名称/编号",prefix:"icon-xt-search",width:280},{name:"inspectionType",componentType:"Select",placeholder:"请选择",width:150,defaultValue:null,dicts:[{label:"全部",value:null},...s.inspectionType]}]}));const[S,{reload:C}]=q({rowKey:"id",api:ce,columns:le,bordered:!1,showIndexColumn:!0,pagination:!0,striped:!1,rowSelection:{type:"checkbox"},clickToRowSelect:!1,batchShow:!1,actionColumn:{width:100,title:"操作",dataIndex:"action"},beforeFetch:M});function M(a){return h(_({},a),{orders:T.value}),h(_({},a),{orders:T.value,blurry:r.blurry,inspectionType:r.inspectionType})}function P(a){return u(this,null,function*(){i.value=a.contractBasisId;const l=yield pe(a.contractBasisId),c=yield ne(l);c&&(g(!0,{id:l,realName:`原始记录(${a.numbering})`,previewUrl:c}),i.value="")})}function F(a){return u(this,null,function*(){yield de([a.id]),o.success("删除成功"),yield C()})}function N(a){return u(this,null,function*(){r.blurry=a.blurry||"",r.inspectionType=a.inspectionType||"",yield C()})}return(a,l)=>(x(),B("div",ue,[f(n(U),{data:b}),y("div",me,[y("div",fe,[y("div",null,[f(n(j),{"form-data":p.value,onChange:N},null,8,["form-data"])])]),y("div",ye,[f(n(A),{onRegister:n(S)},{bodyCell:Z(({column:c,record:d})=>[c.key==="status"?(x(),B("span",{key:0,style:$({backgroundColor:n(J)(s.status,d.status),color:n(W)(s.status,d.status),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},Y(n(ee)(s.status,d.status)),5)):D("",!0),c.key==="action"?(x(),te(n(G),{key:1,actions:[{auth:"",icon:"icon-xt-details_default|iconfont",tooltip:"原始记录",onClick:P.bind(null,d),loading:i.value==d.contractBasisId},{auth:"",icon:"icon-xt-details_delete_default|iconfont",tooltip:"删除",ifShow:!1,popConfirm:{title:"是否取消删除",placement:"left",confirm:F.bind(null,d,c)}}]},null,8,["actions"])):D("",!0)]),_:1},8,["onRegister"])])]),f(n(se),{onRegister:n(t)},null,8,["onRegister"])]))}});const He=ae(ge,[["__scopeId","data-v-aa436877"]]);export{He as default};
|