| 1 |
- var p=(t,a,o)=>new Promise((h,c)=>{var g=r=>{try{n(o.next(r))}catch(d){c(d)}},f=r=>{try{n(o.throw(r))}catch(d){c(d)}},n=r=>r.done?h(r.value):Promise.resolve(r.value).then(g,f);n((o=o.apply(t,a)).next())});import{a as w,B as x}from"./index-e473004f.js";import{u as v,_ as q}from"./useForm-19fca69f.js";import"./FormItem.vue_vue_type_script_lang-35d3ca4d.js";import{b5 as N,ak as I,ap as D,_ as y}from"./index.js";import{w as C,a as Y}from"./waterApi-ca53c425.js";import{l as F,S as M}from"./antd-ecb53b14.js";import{m as S,d as O,f as T,Y as z,a6 as B,a7 as L,l as R,u as s,_,$ as P,aa as k}from"./vue-8fccce23.js";const Z=[{title:"设备编号",dataIndex:"deviceUniqueCode",width:120},{title:"设备信息",dataIndex:"deviceInfo",width:160},{title:"检测时间",dataIndex:"detectionTime",width:160},{title:"透析用水中的有毒化学物质",dataIndex:"toxicChemicals",children:[{title:"铝(mg/L) 正常值≤0.01",dataIndex:"aluminum",width:120},{title:"总氯(mg/L) 正常值≤0.1",dataIndex:"totalChlorine",width:120},{title:"铜(mg/L) 正常值≤0.01",dataIndex:"copper",width:120},{title:"氟化物 (mg/L) 正常值≤0.2",dataIndex:"fluoride",width:120},{title:"铅(mg/L) 正常值≤ 0.005",dataIndex:"lead",width:120},{title:"硝酸盐(氮)(mg/L)正常值≤2",dataIndex:"nitrate",width:130},{title:"硫酸盐 (mg/L) 正常值≤100",dataIndex:"sulfate",width:120},{title:"锌(mg/L) 正常值≤0.1",dataIndex:"zinc",width:120}]},{title:"透析溶液中的电解质",dataIndex:"electrolyte",children:[{title:"钙(mmol/L) 正常值≤2 (0.05mmol/L)",dataIndex:"calcium",width:120},{title:"镁(mmol/L) 正常值≤4 (0.15mmol/L)",dataIndex:"magnesium",width:120},{title:"钾(mmol/L) 正常值≤8 (0.2mmol/L)",dataIndex:"potassium",width:120},{title:"钠(mmol/L) 正常值≤70 (3.0mmol/L)",dataIndex:"sodium",width:120}]},{title:"透析用水中的微量元素",dataIndex:"traceElement",children:[{title:"锑(mg/L) 正常值≤0.006",dataIndex:"antimony",width:120},{title:"砷(mg/L) 正常值≤0.005",dataIndex:"arsenic",width:120},{title:"钡(mg/L) 正常值≤0.1",dataIndex:"barium",width:120},{title:"铍(mg/L) 正常值≤0.0004",dataIndex:"beryllium",width:120},{title:"镉(mg/L) 正常值≤0.001",dataIndex:"cadmium",width:120},{title:"铬(mg/L) 正常值≤0.014",dataIndex:"chromium",width:120},{title:"汞(mg/L) 正常值≤0.0002",dataIndex:"mercury",width:120},{title:"硒(mg/L) 正常值≤0.09",dataIndex:"selenium",width:120},{title:"银(mg/L) 正常值≤0.005",dataIndex:"silver",width:120},{title:"铊(mg/L) 正常值≤0.02",dataIndex:"thallium",width:120}]}],H=[{label:"设备编号搜索",field:"uniqueCodes",component:"Input",ifShow:!1},{field:"selDervice",component:"PlainTitle",defaultValue:"选择设备",colProps:{span:24}},{label:"设备编号",field:"deviceId",required:!0,itemProps:{validateTrigger:"blur"},component:"ApiSelect",componentProps:({formModel:t})=>({api:C,params:{uniqueCode:t.uniqueCodes},labelField:"uniqueCode",valueField:"id",resultField:"data",placeholder:"请选择设备编号",getPopupContainer:()=>document.body,showSearch:!0,filterOption:!1,onSearch:a=>{t.uniqueCodes=a},onChange:a=>p(void 0,null,function*(){const o=yield Y(a);t.deviceManufacturer=o==null?void 0:o.manufacturer,t.deviceModel=o==null?void 0:o.model})})},{label:"设备厂家",field:"deviceManufacturer",required:!0,component:"Input",slot:"deviceManufacturer",componentProps:{disabled:!0}},{label:"设备型号",field:"deviceModel",required:!0,component:"Input",slot:"deviceModel",componentProps:{disabled:!0}},{field:"deteRecords",component:"PlainTitle",defaultValue:"检测记录",colProps:{span:24}},{label:"检测时间",field:"detectionTime",component:"DatePicker",componentProps:()=>({placeholder:"请选择检测时间",getPopupContainer:()=>document.body,valueFormat:"YYYY-MM-DD HH:mm:ss",showTime:!0}),defaultValue:F().format("YYYY-MM-DD HH:mm:ss")},{label:"检测人",field:"inspectorId",required:!0,component:"ApiSelect",componentProps:{api:N,params:{pageNum:1,pageSize:999,disable:"0"},mode:"single",labelField:"nickname",valueField:"id",resultField:"data",placeholder:"请选择检测人"}},{label:"铝(mg/L)",field:"to_aluminum",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入氟化物(mg/L)"}},{label:"总氯(mg/L)",field:"to_totalChlorine",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入总氯(mg/L)"}},{label:"铜(mg/L)",field:"to_copper",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入铜(mg/L)"}},{label:"氟化物(mg/L)",field:"to_fluoride",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入氟化物(mg/L)"}},{label:"铅(mg/L)",field:"to_lead",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入铅(mg/L)"}},{label:"硝酸盐(氮)(mg/L)",field:"to_nitrate",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入硝酸盐(氮)(mg/L)"}},{label:"锌(mg/L)",field:"to_zinc",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入锌(mg/L)"}},{label:"硫酸盐(mg/L)",field:"to_sulfate",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入硫酸盐(mg/L)"}},{label:"钙(mmol/L)",field:"el_calcium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入钙(mmol/L)"}},{label:"镁(mmol/L)",field:"el_magnesium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入镁(mmol/L)"}},{label:"钠(mmol/L)",field:"el_sodium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入钠(mmol/L)"}},{label:"钾(mmol/L)",field:"el_potassium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入钾(mmol/L)"}},{label:"砷(mg/L)",field:"tr_arsenic",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入砷(mg/L)"}},{label:"锑(mg/L)",field:"tr_antimony",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入锑(mg/L)"}},{label:"铍(mg/L)",field:"tr_beryllium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入铍(mg/L)"}},{label:"钡(mg/L)",field:"tr_barium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入钡(mg/L)"}},{label:"铬(mg/L)",field:"tr_chromium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入铬(mg/L)"}},{label:"镉(mg/L)",field:"tr_cadmium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入镉(mg/L)"}},{label:"硒(mg/L)",field:"tr_selenium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入硒(mg/L)"}},{label:"汞(mg/L)",field:"tr_mercury",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入汞(mg/L)"}},{label:"银(mg/L)",field:"tr_silver",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入银(mg/L)"}},{label:"铊(mg/L)",field:"tr_thallium",required:!0,component:"InputNumber",componentProps:{placeholder:"请输入铊(mg/L)"}}],ee=[{field:"shiftDate",component:"RangePicker",componentProps:{format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD"},colProps:{span:12}},{field:"searchNames",component:"Input",componentProps:{placeholder:"请输入设备编号"},renderComponentContent:()=>({prefix:()=>S(M)}),colProps:{span:12}}],te=t=>I.post({url:"/biz/device/chemicalPollutantDetection/query/page",params:D(t)}),V=t=>I.post({url:"/biz/device/chemicalPollutantDetection/add",params:t}),oe=t=>I.post({url:"/biz/device/chemicalPollutantDetection/removeByIds",params:t}),j="38%",A=O({__name:"formDrawer",emits:["success","register"],setup(t,{emit:a}){const o=T("新增检测"),[h,{resetFields:c,validate:g}]=v({labelWidth:150,schemas:H,showActionButtonGroup:!1,actionColOptions:{span:23},baseColProps:{span:12},wrapperCol:{span:23}}),[f,{setDrawerProps:n,closeDrawer:r}]=w(()=>p(this,null,function*(){yield c(),n({confirmLoading:!1})}));function d(){return p(this,null,function*(){try{const e=yield g();n({confirmLoading:!0});const b={},i={},m={};Object.keys(e).forEach(l=>{if(l.indexOf("_")!==-1){const u=l.split("_");switch(u[0]){case"to":b[u[1]]=e[l],delete e[l];break;case"el":i[u[1]]=e[l],delete e[l];break;case"tr":m[u[1]]=e[l],delete e[l];break}}}),e.toxicChemicals=b,e.electrolyte=i,e.traceElement=m,console.log("values:::::::::",e),yield V(e),r(),a("success",e)}finally{n({confirmLoading:!1})}})}return(e,b)=>(z(),B(s(x),k(e.$attrs,{destroyOnClose:"",onRegister:s(f),title:o.value,width:j,onOk:d,showFooter:!0,okText:"确定"}),{default:L(()=>[R(s(q),{onRegister:s(h),layout:"vertical",class:"!px-6 !pt-2"},{deviceManufacturer:L(({model:i,field:m})=>[_("span",null," "+P(i[m]),1)]),deviceModel:L(({model:i,field:m})=>[_("span",null," "+P(i[m]),1)]),_:1},8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const E=y(A,[["__scopeId","data-v-a257c00d"]]),re=Object.freeze(Object.defineProperty({__proto__:null,default:E},Symbol.toStringTag,{value:"Module"}));export{E as F,Z as a,oe as b,te as c,re as f,ee as s};
|