var T=Object.defineProperty,Y=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var p=(e,a,t)=>a in e?T(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,d=(e,a)=>{for(var t in a||(a={}))m.call(a,t)&&p(e,t,a[t]);if(n)for(var t of n(a))u.call(a,t)&&p(e,t,a[t]);return e},c=(e,a)=>Y(e,w(a));var f=(e,a)=>{var t={};for(var s in e)m.call(e,s)&&a.indexOf(s)<0&&(t[s]=e[s]);if(e!=null&&n)for(var s of n(e))a.indexOf(s)<0&&u.call(e,s)&&(t[s]=e[s]);return t};import{n as o}from"./index.js";const r={xs:{span:24},sm:{span:24},lg:{span:8}},P={span:24},i={model:"TaskProgress",viewInPage:!1,properties:[{field:"id",label:"ID系统自动生成",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"ID系统自动生成"},colProps:r,component:"InputNumber",rules:[{required:!0,message:"请输入ID系统自动生成！"}]},table:{}},{field:"taskId",label:"dat_detect_task.id",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"dat_detect_task.id"},colProps:r,component:"InputNumber",rules:[{required:!0,message:"请输入dat_detect_task.id！"}]},table:{}},{field:"deviceSn",label:"设备序列号",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"设备序列号"},colProps:r,component:"Input"},table:{}},{field:"taskDataJson",label:"参数配置",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"参数配置"},component:"InputTextArea",colProps:{span:24}},table:{}},{field:"createTime",label:"CreateTime",defaultValue:void 0,form:{colProps:r,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入CreateTime！"}]},table:{}},{field:"updateTime",label:"UpdateTime",defaultValue:void 0,form:{colProps:r,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入UpdateTime！"}]},table:{}}]},v=["id","taskId","deviceSn","createTime","updateTime"],h=["taskId","deviceSn","taskDataJson"],k=["taskId","deviceSn","taskDataJson","createTime","updateTime"],D=["taskId","deviceSn","taskDataJson","createTime","updateTime"],I=new Map(v.map((e,a)=>[e,a])),q=i.properties.filter(e=>v.includes(e.field)).map(s=>{var{field:e,label:a,form:M}=s,t=f(M,[]);return c(d({field:e,label:a,defaultValue:void 0},t),{required:!1,rules:[{required:!1}]})}).sort((e,a)=>{const t=I.get(e.field),s=I.get(a.field);return t-s}),g=new Map(h.map((e,a)=>[e,a])),$=i.properties.filter(e=>h.includes(e.field)).map(({field:e,label:a,defaultValue:t,form:s})=>c(d({field:e,label:a,defaultValue:t},s),{colProps:P})).sort((e,a)=>{const t=g.get(e.field),s=g.get(a.field);return t-s}),x=new Map(k.map((e,a)=>[e,a])),S=i.properties.filter(e=>k.includes(e.field)).map(({field:e,label:a,table:t})=>d({dataIndex:e,title:a},t)).sort((e,a)=>{const t=x.get(e.dataIndex),s=x.get(a.dataIndex);return t-s}),b=new Map(D.map((e,a)=>[e,a])),V=i.properties.filter(e=>D.includes(e.field)).map(({field:e,label:a,table:t})=>d({dataIndex:e,title:a},t)).sort((e,a)=>{const t=b.get(e.dataIndex),s=b.get(a.dataIndex);return t-s}),l="/v1/data/task-progress",A=e=>o.post({url:`${l}/`,data:e}),_=(e,a=!1)=>o.put({url:`${l}/`,data:e,params:{updateAllFields:a}}),B=e=>o.delete({url:`${l}/${e}`}),J=e=>o.get({url:`${l}/search`,params:e}),y=e=>o.get({url:`${l}/${e}`}),R=e=>o.post({url:`${l}/batch-delete`,data:e});export{q as a,R as b,S as c,V as d,A as e,$ as f,y as g,B as r,J as s,_ as u};
