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