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