import{I as G,y as H,G as W,H as z,w as J,D as K,C as Q,L as X,M as Y,N as Z}from"./element-plus.517d4382.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as oe,a as te}from"./index.8b1962e9.js";import{u as le}from"./usePaging.f6660143.js";import{u as ue}from"./useDictOptions.b5854a9e.js";import{a as ae,b as re,e as ne}from"./supervision_project.4c9eb87e.js";import"./lodash.1d82ee7c.js";import{_ as pe}from"./edit.vue_vue_type_script_setup_true_name_supervisionProjectEdit_lang.00cb84c7.js";import{d as S,s as se,r as A,a0 as ie,ai as de,o as r,c as E,V as e,M as u,O as b,u as n,L as s,S as _e,W as D,a8 as g,a as x,k as ce,T as m,n as P}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.e6dda1f5.js";import"./index.b17dae19.js";const me=m("\u67E5\u8BE2"),ve=m("\u91CD\u7F6E"),fe=m(" \u65B0\u589E "),Ee=m(" \u5220\u9664 "),be={class:"mt-4"},we=m(" \u7F16\u8F91 "),Fe=m(" \u5220\u9664 "),je={class:"flex justify-end mt-4"},Be=S({name:"supervisionProjectLists"}),io=S({...Be,setup(he){const w=se(),F=A(!1),a=ie({project_name:"",project_code:"",industry:"",nature:"",build_unit:"",project_level:"",engineering_status:""}),V=A([]),U=i=>{V.value=i.map(({id:t})=>t)},{dictData:v}=ue("supervision_project_industry,supervision_project_build_area,supervision_project_nature, supervision_planning_approval_type,supervision_project_level,supervision_project_status"),{pager:f,getLists:j,resetParams:I,resetPage:L}=le({fetchFun:ae,params:a}),$=async()=>{var i;F.value=!0,await P(),(i=w.value)==null||i.open("add")},N=async i=>{var _,p;let t=await re({id:i.id});F.value=!0,await P(),(_=w.value)==null||_.open("edit"),(p=w.value)==null||p.setFormData(t)},y=async i=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({id:i}),j()};return j(),(i,t)=>{const _=G,p=H,B=W,h=z,c=J,T=K,k=Q,R=te,l=X,q=Y,M=ee,C=de("perms"),O=Z;return r(),E("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(T,{class:"mb-[-16px]",model:a,inline:""},{default:u(()=>[e(p,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name"},{default:u(()=>[e(_,{class:"w-[280px]",modelValue:a.project_name,"onUpdate:modelValue":t[0]||(t[0]=o=>a.project_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u9879\u76EE\u7F16\u53F7",prop:"project_code"},{default:u(()=>[e(_,{class:"w-[280px]",modelValue:a.project_code,"onUpdate:modelValue":t[1]||(t[1]=o=>a.project_code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u884C\u4E1A",prop:"industry"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:a.industry,"onUpdate:modelValue":t[2]||(t[2]=o=>a.industry=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u884C\u4E1A"},{default:u(()=>[(r(!0),E(D,null,g(n(v).supervision_project_industry,(o,d)=>(r(),s(B,{key:d,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,{label:"\u6027\u8D28",prop:"nature"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:a.nature,"onUpdate:modelValue":t[3]||(t[3]=o=>a.nature=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u884C\u4E1A"},{default:u(()=>[(r(!0),E(D,null,g(n(v).supervision_project_nature,(o,d)=>(r(),s(B,{key:d,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,{label:"\u5EFA\u8BBE\u5355\u4F4D",prop:"build_unit"},{default:u(()=>[e(_,{class:"w-[280px]",modelValue:a.build_unit,"onUpdate:modelValue":t[4]||(t[4]=o=>a.build_unit=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5EFA\u8BBE\u5355\u4F4D"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u9879\u76EE\u7B49\u7EA7",prop:"project_level"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:a.project_level,"onUpdate:modelValue":t[5]||(t[5]=o=>a.project_level=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u884C\u4E1A"},{default:u(()=>[(r(!0),E(D,null,g(n(v).supervision_project_level,(o,d)=>(r(),s(B,{key:d,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,{label:"\u5DE5\u7A0B\u72B6\u6001",prop:"engineering_status"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:a.engineering_status,"onUpdate:modelValue":t[6]||(t[6]=o=>a.engineering_status=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u884C\u4E1A"},{default:u(()=>[(r(!0),E(D,null,g(n(v).supervision_project_status,(o,d)=>(r(),s(B,{key:d,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,null,{default:u(()=>[e(c,{type:"primary",onClick:n(L)},{default:u(()=>[me]),_:1},8,["onClick"]),e(c,{onClick:n(I)},{default:u(()=>[ve]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),b((r(),s(k,{class:"!border-none",shadow:"never"},{default:u(()=>[b((r(),s(c,{type:"primary",onClick:$},{icon:u(()=>[e(R,{name:"el-icon-Plus"})]),default:u(()=>[fe]),_:1})),[[C,["supervision_project.supervision_project/add"]]]),b((r(),s(c,{disabled:!V.value.length,onClick:t[7]||(t[7]=o=>y(V.value))},{default:u(()=>[Ee]),_:1},8,["disabled"])),[[C,["supervision_project.supervision_project/delete"]]]),x("div",be,[e(q,{data:n(f).lists,onSelectionChange:U},{default:u(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u7F16\u53F7",prop:"project_code","show-overflow-tooltip":""}),e(l,{label:"\u884C\u4E1A",prop:"industry_text","show-overflow-tooltip":""}),e(l,{label:"\u6027\u8D28",prop:"nature_text","show-overflow-tooltip":""}),e(l,{label:"\u5EFA\u8BBE\u5355\u4F4D",prop:"build_unit","show-overflow-tooltip":""}),e(l,{label:"\u5EFA\u8BBE\u533A\u57DF",prop:"build_area_text","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u5730\u5740",prop:"address","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u7B49\u7EA7",prop:"project_level_text","show-overflow-tooltip":""}),e(l,{label:"\u603B\u6295\u8D44(\u4E07\u5143)",prop:"total_investment","show-overflow-tooltip":""}),e(l,{label:"\u7ACB\u9879\u65E5\u671F",prop:"initiation_date","show-overflow-tooltip":""}),e(l,{label:"\u5173\u8054\u5408\u540C",prop:"contract","show-overflow-tooltip":""}),e(l,{label:"\u5408\u540C\u91D1\u989D",prop:"contract_amount","show-overflow-tooltip":""}),e(l,{label:"\u5408\u540C\u670D\u52A1\u5185\u5BB9",prop:"contract_content","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u6982\u51B5",prop:"project_overview","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u8981\u6C42",prop:"project_requirements","show-overflow-tooltip":""}),e(l,{label:"\u5907\u6CE8",prop:"remark","show-overflow-tooltip":""}),e(l,{label:"\u76D1\u7BA1\u90E8\u95E8",prop:"supervision_department","show-overflow-tooltip":""}),e(l,{label:"\u5B9E\u65BD\u90E8\u95E8",prop:"implementation_department","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u90E8",prop:"project_department","show-overflow-tooltip":""}),e(l,{label:"\u5DE5\u7A0B\u72B6\u6001",prop:"engineering_status_text","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u8D1F\u8D23\u4EBA\u5458",prop:"project_manager","show-overflow-tooltip":""}),e(l,{label:"\u7532\u65B9\u5355\u4F4D",prop:"part_a_unit","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:o})=>[b((r(),s(c,{type:"primary",link:"",onClick:d=>N(o)},{default:u(()=>[we]),_:2},1032,["onClick"])),[[C,["supervision_project.supervision_project/edit"]]]),b((r(),s(c,{type:"danger",link:"",onClick:d=>y(o.id)},{default:u(()=>[Fe]),_:2},1032,["onClick"])),[[C,["supervision_project.supervision_project/delete"]]])]),_:1})]),_:1},8,["data"])]),x("div",je,[e(M,{modelValue:n(f),"onUpdate:modelValue":t[8]||(t[8]=o=>ce(f)?f.value=o:null),onChange:n(j)},null,8,["modelValue","onChange"])])]),_:1})),[[O,n(f).loading]]),F.value?(r(),s(pe,{key:0,ref_key:"editRef",ref:w,"dict-data":n(v),onSuccess:n(j),onClose:t[9]||(t[9]=o=>F.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{io as default};