var F=Object.defineProperty,_=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var c=(e,t,a)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,d=(e,t)=>{for(var a in t||(t={}))u.call(t,a)&&c(e,a,t[a]);if(r)for(var a of r(t))m.call(t,a)&&c(e,a,t[a]);return e},i=(e,t)=>_(e,J(t));var f=(e,t)=>{var a={};for(var s in e)u.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&r)for(var s of r(e))t.indexOf(s)<0&&m.call(e,s)&&(a[s]=e[s]);return a};import{am as o}from"./index.js";const p={xs:{span:24},sm:{span:24},lg:{span:8}},M={span:24},n={model:"DetectTaskItem",viewInPage:!1,properties:[{field:"id",label:"ID系统自动生成",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"ID系统自动生成"},colProps:p,component:"InputNumber",rules:[{required:!0,message:"请输入ID系统自动生成！"}]},table:{}},{field:"detectTaskId",label:"dat_detect_task.id",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"dat_detect_task.id"},colProps:p,component:"InputNumber",rules:[{required:!0,message:"请输入dat_detect_task.id！"}]},table:{}},{field:"algoId",label:"sys_algo.id",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"sys_algo.id"},colProps:p,component:"InputNumber",rules:[{required:!0,message:"请输入sys_algo.id！"}]},table:{}},{field:"paramJson",label:"参数配置",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"参数配置"},component:"InputTextArea",colProps:{span:24}},table:{}},{field:"roiJson",label:"ROI区域设置",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"ROI区域设置"},component:"InputTextArea",colProps:{span:24}},table:{}}]},h=["id","detectTaskId","algoId"],w=["detectTaskId","algoId","paramJson","roiJson"],P=["detectTaskId","algoId","paramJson","roiJson"],k=["detectTaskId","algoId","paramJson","roiJson"],I=new Map(h.map((e,t)=>[e,t])),q=n.properties.filter(e=>h.includes(e.field)).map(s=>{var{field:e,label:t,form:v}=s,a=f(v,[]);return i(d({field:e,label:t,defaultValue:void 0},a),{required:!1,rules:[{required:!1}]})}).sort((e,t)=>{const a=I.get(e.field),s=I.get(t.field);return a-s}),g=new Map(w.map((e,t)=>[e,t])),A=n.properties.filter(e=>w.includes(e.field)).map(({field:e,label:t,defaultValue:a,form:s})=>i(d({field:e,label:t,defaultValue:a},s),{colProps:M})).sort((e,t)=>{const a=g.get(e.field),s=g.get(t.field);return a-s}),x=new Map(P.map((e,t)=>[e,t])),y=n.properties.filter(e=>P.includes(e.field)).map(({field:e,label:t,table:a})=>d({dataIndex:e,title:t},a)).sort((e,t)=>{const a=x.get(e.dataIndex),s=x.get(t.dataIndex);return a-s}),b=new Map(k.map((e,t)=>[e,t])),C=n.properties.filter(e=>k.includes(e.field)).map(({field:e,label:t,table:a})=>d({dataIndex:e,title:t},a)).sort((e,t)=>{const a=b.get(e.dataIndex),s=b.get(t.dataIndex);return a-s}),l="/v1/data/detect-task-item",V=e=>o.post({url:`${l}/`,data:e}),B=(e,t=!1)=>o.put({url:`${l}/`,data:e,params:{updateAllFields:t}}),D=e=>o.delete({url:`${l}/${e}`}),N=e=>o.get({url:`${l}/search`,params:e}),R=e=>o.get({url:`${l}/${e}`}),O=e=>o.post({url:`${l}/batch-delete`,data:e});export{q as a,O as b,y as c,C as d,V as e,A as f,R as g,D as r,N as s,B as u};
