import{_ as A,r as g,am as I,aa as W,C as G,e as i,o as m,c as w,m as K,f as a,w as s,F as C,h as o,K as L,G as V,H as N,l as k,p as M,z as O,ab as J,v as Q,E as X}from"./index.82404a61.js";import{b as Z,c as ee,d as te}from"./waterloggedArea.273b7f92.js";const le={class:"water-analysis-page"},oe={class:"top"},ae={__name:"tableDalgo",props:["typeList","isComponent","waterloggingRelationWaterloggingListM"],setup(u,{expose:F,emit:_}){const{typeList:c,isComponent:y,waterloggingRelationWaterloggingListM:h}=u,{proxy:v}=Q(),R=g({Authorization:"Bearer "+I()});console.log("isComponent",y),F({submit:S,closed:B,resetFiled:Y});const b=g([]);let t=g({});const d=g([]),x=W({stCode:[{required:!0,message:"\u5185\u6D9D\u70B9\u4E0D\u80FD\u4E3A\u7A7A",trigger:["blur","change"]}],projectNo:[{required:!0,message:"\u5173\u8054\u9879\u76EE\u4E0D\u80FD\u4E3A\u7A7A",trigger:["blur","change"]}]});function D(r){return X.confirm(`\u4E0B\u8F7D\u6B64\u6587\u4EF6: ${r.name}\uFF1F`).then(()=>window.open(r.url),()=>!1)}function S(){v.$refs.ruleForm.validate(r=>{r&&(t.value.fileSaveRequestList=[],d.value.forEach(e=>{e.hasOwnProperty("response")?(e.response.data.refType="waterlogging_engineering",e.response.data.refField="waterlogging_engineeringNode",t.value.fileSaveRequestList.push(e.response.data)):t.value.fileSaveRequestList.push(e)}),c.type==4?Z({...t.value,year:y.examineYear}).then(({code:e})=>{e==200&&(_("onModalClose"),h())}):ee({...t.value,year:y.examineYear}).then(({code:e})=>{e==200&&(_("onModalClose"),h())}))})}function T(){d.value=c.fileList1,t.value=c,t.value.completeTime=c.projectCompleteTime,v.$refs.ruleForm.resetFields(),U()}function Y(){v.$refs.ruleForm.resetFields(),d.value=[]}function B(){_("onModalClose")}async function U(){let{data:r}=await te();b.value=r}function q(r){var p,n;let e=b.value.filter(f=>r==f.projectNo);t.value.projectNo=r,t.value.projectStatus=(p=e[0])==null?void 0:p.projectStatus,t.value.completeTime=(n=e[0])==null?void 0:n.completeTime}return G(()=>{T()}),(r,e)=>{const p=i("el-input"),n=i("el-form-item"),f=i("el-option"),j=i("el-select"),E=i("el-tag"),P=i("el-date-picker"),z=i("el-button"),H=i("el-upload"),$=i("el-form");return m(),w("div",le,[K("div",oe,[a($,{"label-width":"auto",rules:x,inline:"",ref:"ruleForm",model:o(t),disabled:u.typeList.type==1},{default:s(()=>[C(a(n,{label:"\u5185\u6D9D\u70B9:",style:{width:"45%"},prop:"stCode"},{default:s(()=>[a(p,{modelValue:o(t).stName,"onUpdate:modelValue":e[0]||(e[0]=l=>o(t).stName=l),disabled:""},null,8,["modelValue"])]),_:1},512),[[L,u.typeList.type==2||u.typeList.type==1]]),C(a(n,{label:"\u5185\u6D9D\u70B9:",style:{width:"45%"},prop:"stCode"},{default:s(()=>[a(j,{"value-key":"stCode",clearable:"",modelValue:o(t).stCode,"onUpdate:modelValue":e[1]||(e[1]=l=>o(t).stCode=l),class:"m-3",placeholder:"\u8BF7\u9009\u62E9\u5185\u6D9D\u70B9",size:"mini",style:{width:"100%"}},{default:s(()=>[(m(!0),w(V,null,N(o(t).loggingList,l=>(m(),k(f,{key:l.stCode,label:l.stName,value:l.stCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},512),[[L,u.typeList.type==4]]),a(n,{label:"\u5173\u8054\u9879\u76EE:",style:{width:"45%"},prop:"projectNo"},{default:s(()=>[a(j,{clearable:"",modelValue:o(t).projectNo,"onUpdate:modelValue":e[2]||(e[2]=l=>o(t).projectNo=l),class:"m-2",placeholder:"\u8BF7\u9009\u62E9\u5173\u8054\u9879\u76EE",size:"mini",style:{width:"100%"},"value-key":"projectNo",onChange:q},{default:s(()=>[(m(!0),w(V,null,N(o(b),l=>(m(),k(f,{key:l.projectNo,label:l.projectName,value:l.projectNo},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(n,{label:"\u9879\u76EE\u72B6\u6001:",style:{width:"45%"},prop:"projectStatus"},{default:s(()=>[a(E,{round:"",type:o(t).projectStatus==0?"error":"success"},{default:s(()=>[M(O(o(t).projectStatus==0?"\u672A\u5B8C\u5DE5":"\u5DF2\u5B8C\u5DE5"),1)]),_:1},8,["type"])]),_:1}),a(n,{label:"\u9879\u76EE\u5B8C\u5DE5\u65F6\u95F4:",style:{width:"45%"},prop:"completeTime"},{default:s(()=>[a(P,{style:{width:"100%"},modelValue:o(t).completeTime,"onUpdate:modelValue":e[3]||(e[3]=l=>o(t).completeTime=l),type:"date",placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE\u5B8C\u5DE5\u65F6\u95F4",disabled:"",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue"])]),_:1}),a(n,{label:"\u9644\u4EF6:",style:{width:"93%"}},{default:s(()=>[a(H,{"file-list":o(d),"onUpdate:file-list":e[4]||(e[4]=l=>J(d)?d.value=l:null),class:"upload-demo",style:{width:"100%"},action:"/prod-api/system/upload",headers:o(R),multiple:"","on-preview":D,"before-remove":r.beforeRemove},{default:s(()=>[a(z,{type:"primary"},{default:s(()=>[M("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","headers","before-remove"])]),_:1}),a(n,{label:"\u5907\u6CE8",prop:"remark",style:{width:"95%"}},{default:s(()=>[a(p,{modelValue:o(t).remark,"onUpdate:modelValue":e[5]||(e[5]=l=>o(t).remark=l),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model","disabled"])])])}}},ne=A(ae,[["__scopeId","data-v-29de48ea"]]);export{ne as default};