var H=Object.defineProperty,N=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(e,t,a)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))_.call(t,a)&&x(e,a,t[a]);if(m)for(var a of m(t))w.call(t,a)&&x(e,a,t[a]);return e},I=(e,t)=>N(e,O(t));var Y=(e,t)=>{var a={};for(var o in e)_.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&m)for(var o of m(e))t.indexOf(o)<0&&w.call(e,o)&&(a[o]=e[o]);return a};import{n as z,l as K,o as E,S as U,j as G,_ as L}from"./index.js";import{u as W,B as Z}from"./useTable-e949a6b7.js";import"./useForm-baba730a.js";import{j as b}from"./antd-0679333d.js";import{d as J,Z as Q,_ as X,$ as M,k as D,u as h}from"./vue-72a104e4.js";import"./index-8a6826ba.js";import"./useWindowSizeFn-1db11f4f.js";import"./onMountedOrActivated-ee461833.js";import"./sortable.esm-15c0a34e.js";import"./copyTextToClipboard-3ca69a78.js";const ee="/v1/data/task-log",te=e=>z.get({url:`${ee}/search`,params:e}),i={xs:{span:24},sm:{span:24},lg:{span:6}},ae={span:24},u={model:"TaskLog",viewInPage:!1,properties:[{field:"id",label:"ID系统自动生成",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"ID系统自动生成"},colProps:i,component:"InputNumber",rules:[{required:!0,message:"请输入ID系统自动生成！"}]},table:{}},{field:"taskId",label:"任务ID",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"dat_detect_task.id"},colProps:i,component:"InputNumber",rules:[{required:!0,message:"请输入dat_detect_task.id！"}]},table:{width:140}},{field:"deviceSn",label:"设备序列号",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"设备序列号"},colProps:i,component:"Input"},table:{width:200}},{field:"content",label:"处理信息",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"处理信息"},colProps:i,component:"Input"},table:{ellipsis:!0}},{field:"createTime",label:"创建时间",defaultValue:void 0,form:{colProps:i,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入CreateTime！"}]},table:{width:150}},{field:"updateTime",label:"UpdateTime",defaultValue:void 0,form:{colProps:i,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入UpdateTime！"}]},table:{}}]},B=["deviceSn","createTime"],C=["taskId","deviceSn","content"],V=["taskId","deviceSn","content","createTime"],q=["taskId","deviceSn","content","createTime"],P=new Map(B.map((e,t)=>[e,t])),T=u.properties.filter(e=>B.includes(e.field)).map(o=>{var{field:e,label:t,form:f}=o,a=Y(f,[]);return I(c({field:e,label:t,defaultValue:void 0},a),{required:!1,rules:[{required:!1}]})}).sort((e,t)=>{const a=P.get(e.field),o=P.get(t.field);return a-o}),S=new Map(C.map((e,t)=>[e,t]));u.properties.filter(e=>C.includes(e.field)).map(({field:e,label:t,defaultValue:a,form:o})=>I(c({field:e,label:t,defaultValue:a},o),{colProps:ae})).sort((e,t)=>{const a=S.get(e.field),o=S.get(t.field);return a-o});const k=new Map(V.map((e,t)=>[e,t])),oe=u.properties.filter(e=>V.includes(e.field)).map(({field:e,label:t,table:a})=>c({dataIndex:e,title:t},a)).sort((e,t)=>{const a=k.get(e.dataIndex),o=k.get(t.dataIndex);return a-o}),F=new Map(q.map((e,t)=>[e,t]));u.properties.filter(e=>q.includes(e.field)).map(({field:e,label:t,table:a})=>c({dataIndex:e,title:t},a)).sort((e,t)=>{const a=F.get(e.dataIndex),o=F.get(t.dataIndex);return a-o});const se={class:"header"},le=J({__name:"index",setup(e){K(),E();const[t,{reload:a,setSelectedRowKeys:o}]=W({api:n=>te(f(n)),columns:oe,formConfig:{labelWidth:0,schemas:T,showAdvancedButton:!1},useSearchForm:!0,showTableSetting:!1,bordered:!0,showIndexColumn:!1,canResize:!1,rowKey:n=>n.id}),f=n=>{const v=n,{pageNum:p,pageSize:y,field:A="id",order:R="descend"}=v,$=Y(v,["pageNum","pageSize","field","order"]),l={pageNum:p,pageSize:y,orderByClause:`${A} ${R==="descend"?"desc":"asc"}`};return Object.keys($).forEach(g=>{const d=T.find(j=>j.field===g),s=n[g],r=g;d?s!==void 0&&s!==""&&(d.component==="Input"?l[r]=`%${s.trim()}%`:["Select","ApiSelect","ApiTreeSelect"].includes(d.component)?l[r]=G(s)?s.value:s:d.component==="RangePicker"?(l[`${r}From`]=b(s[0]).startOf("d").format("YYYY-MM-DD HH:mm:ss"),l[`${r}To`]=b(s[1]).endOf("d").format("YYYY-MM-DD HH:mm:ss")):d.component==="DatePicker"?l[r]=b(s).format(d.componentProps.format||"YYYY-MM-DD"):l[r]=s):l[r]=s}),l};return(n,p)=>(Q(),X("div",null,[M("div",se,[D(h(U),{size:"19",name:"list"}),p[0]||(p[0]=M("div",{class:"title"},"检测日志",-1))]),D(h(Z),{onRegister:h(t)},null,8,["onRegister"])]))}});const Ye=L(le,[["__scopeId","data-v-fdc90b07"]]);export{Ye as default};
