import{_ as j,r as m,am as U,C as q,e as f,o as i,c as u,m as D,f as F,w as v,G as J,H as M,h as a,l as b,ab as z,p as S,J as T,z as _,F as P,K as G,v as H,E as A}from"./index.82404a61.js";import{p as K}from"./prevention.b5b1f2ff.js";import{p as O}from"./rules.4ab3a271.js";const W={class:"water-analysis-page"},Y={class:"top"},ee={style:{display:"flex","flex-direction":"column"}},ae={key:3},te={__name:"tableDalgo",props:["typeList"],setup(o,{expose:w,emit:C}){const{typeList:l}=o,{proxy:g}=H();g.useDict("fund_source");const B=m({Authorization:"Bearer "+U()});w({submit:E,closed:R,resetFiled:Z});const c=m(0),p=m(0),h=m("");let e=m({projectNo:"",fileSaveRequestList:[]});function x(n,t){l.iSstandardFlag=null,n=="realCXQ"?(c.value=t*1-e.value.targetCXQ*1,p.value=e.value.realDBMJZJCQMJ*1-e.value.targetDBMJZJCQMJ*1):(p.value=t*1-e.value.targetDBMJZJCQMJ*1,c.value=e.value.realCXQ*1-e.value.targetCXQ*1)}const y=m([]);function Q(n){return A.confirm(`\u4E0B\u8F7D\u6B64\u6587\u4EF6: ${n.name}\uFF1F`).then(()=>window.open(n.url),()=>!1)}function V(n){return!0}function E(){g.$refs.ruleForm.validate(n=>{if(n){const t=[];y.value.forEach(d=>{d.hasOwnProperty("response")?(d.response.data.refType="NLFZBZ",t.push(d.response.data)):t.push(d)});const L=[{id:l.data["CXQ-id"],realValue:e.value.realCXQ,standardFlag:c.value>=0?1:0},{id:l.data["DBMJZJCQMJ-id"],realValue:e.value.realDBMJZJCQMJ,standardFlag:p.value>=0?1:0}];e.value={itemDataType:l.itemDataType,standardFlag:l.iSstandardFlag||h.value,itemUpdateFieldRequestList:L,fileSaveRequestList:t,performanceEvaluateId:l.data.performanceEvaluateId},console.log("FormList.value",e.value),K(e.value).then(({code:d})=>{d==200&&C("onModalClose")})}})}function I(){var t;console.log("typeListtypeList",l);let n=(t=l.monitorDynamicTableTitleList)==null?void 0:t.length;e.value=l.data,y.value=l.fileList1,e.value.monitorDynamicTableTitleList=l.monitorDynamicTableTitleList.slice(0,n-2),g.$refs.ruleForm.resetFields()}function Z(){g.$refs.ruleForm.resetFields(),y.value=[]}function R(){C("onModalClose")}return q(()=>{I()}),(n,t)=>{const L=f("el-input"),d=f("el-form-item"),X=f("el-button"),N=f("el-upload"),$=f("el-form");return i(),u("div",W,[D("div",Y,[F($,{"label-width":"auto",rules:a(O),inline:"",ref:"ruleForm",model:a(e),disabled:o.typeList.type==1},{default:v(()=>[(i(!0),u(J,null,M(a(e).monitorDynamicTableTitleList,s=>(i(),u("div",ee,[s.key=="real"||s.key=="target"?(i(!0),u(J,{key:0},M(s.titleGroup,r=>(i(),b(d,{label:s.key=="real"?"\u5B9E\u9645"+r.value+":":"\u76EE\u6807"+r.value+":",prop:r.key,disabled:o.typeList.type==1||o.typeList.type==2},{default:v(()=>[F(L,{disabled:s.key!="real",modelValue:a(e)[r.key],"onUpdate:modelValue":k=>a(e)[r.key]=k,placeholder:r.placeholder,onChange:k=>x(r.key,a(e)[r.key])},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder","onChange"])]),_:2},1032,["label","prop","disabled"]))),256)):(i(),b(d,{key:1,label:s.value+":",prop:s.key,disabled:o.typeList.type==1||o.typeList.type==2},{default:v(()=>[s.key=="attachFileList"?(i(),b(N,{key:0,"file-list":a(y),"onUpdate:file-list":t[0]||(t[0]=r=>z(y)?y.value=r:null),class:"upload-demo",action:"/prod-api/system/upload",headers:a(B),multiple:"","on-preview":Q,"before-remove":V,style:{width:"100vh"}},{default:v(()=>[F(X,{type:"primary"},{default:v(()=>[S("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","headers"])):s.key=="standardFlag"&&o.typeList.iSstandardFlag?(i(),u("div",{key:1,style:T({color:o.typeList.iSstandardFlag?"#108ee9":"red"})},_(o.typeList.iSstandardFlag?"\u8FBE\u6807":"\u672A\u8FBE\u6807"),5)):s.key=="standardFlag"&&!o.typeList.iSstandardFlag?(i(),u("div",{key:2,style:T({color:a(c)>=0&&a(p)>=0?"#108ee9":"red"})},[P(D("span",null,_(a(c)>=0&&a(p)>=0?h.value=1:h.value=0),513),[[G,!1]]),S(" "+_(a(c)>=0&&a(p)>=0?"\u8FBE\u6807":"\u672A\u8FBE\u6807"),1)],4)):(i(),u("div",ae,_(a(e)[s.key]),1))]),_:2},1032,["label","prop","disabled"]))]))),256))]),_:1},8,["rules","model","disabled"])])])}}},ne=j(te,[["__scopeId","data-v-87ade1c8"]]);export{ne as default};