import{I as J,y as K,w as Q,D as W,C as X,L as Y,M as Z,N as ee}from"./element-plus.517d4382.js";import{_ as ie}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 ne}from"./usePaging.f6660143.js";import{u as le}from"./useDictOptions.b5854a9e.js";import{d as ae,b as A,e as ue}from"./build_division.c5f0dbf5.js";import"./lodash.1d82ee7c.js";import{_ as se}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.91f3e832.js";import re from"./detail.524cd91b.js";import{d as R,a0 as x,s as $,r as y,ai as de,o as s,c as pe,V as e,M as o,O as c,u as r,L as d,S as L,a as P,k as me,T as _,n as C}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.b17dae19.js";import"./picker.6eb62d2f.js";import"./index.ee772d81.js";import"./index.0a0ddda3.js";import"./index.vue_vue_type_script_setup_true_lang.f8507404.js";import"./vue3-video-play.b66b1487.js";import"./vuedraggable.05ef589e.js";import"./vue.6436c619.js";import"./sortablejs.81b741d7.js";import"./build_process_settings.0da246d6.js";const _e=_("\u67E5\u8BE2"),ce=_("\u91CD\u7F6E"),fe=_(" \u65B0\u589E "),ve=_(" \u5220\u9664 "),ge={class:"mt-4"},be=_(" \u7F16\u8F91 "),Ee=_(" \u5220\u9664 "),ye=_(" \u8BE6\u60C5 "),we={class:"flex justify-end mt-4"},Be=R({name:"projectLists"}),yi=R({...Be,setup(De){x([]);const w=$(),b=$(),E=y(!1),B=y(!1),N=y([]),l=x({subentry_engineering:"",subentry_engineering_code:"",sub_division_engineering:"",division_engineering:""}),S=()=>{Object.assign(l,{project_approval_date:"",start_date:"",delivery_date:""}),N.value="",v()},D=y([]),T=n=>{D.value=n.map(({id:i})=>i)},{dictData:F}=le(""),{pager:f,getLists:v,resetParams:Ce,resetPage:U}=ne({fetchFun:ae,params:l}),j=async()=>{var n;E.value=!0,await C(),(n=b.value)==null||n.open("add")},I=async n=>{var u,a;console.log(n.id);let i=await A({id:n.id});E.value=!0,await C(),(u=b.value)==null||u.open("edit"),(a=b.value)==null||a.setFormData(i)},h=async n=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ue({id:n}),v()},M=async n=>{var u,a;let i=await A({id:n.id});B.value=!0,await C(),(u=w.value)==null||u.open(),(a=w.value)==null||a.setFormData(i)};return v(),(n,i)=>{const u=J,a=K,p=Q,O=W,k=X,q=te,m=Y,z=Z,G=ie,g=de("perms"),H=ee;return s(),pe("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(O,{class:"mb-[-16px]",model:l,inline:""},{default:o(()=>[e(a,{label:"\u5206\u90E8\u5DE5\u7A0B",prop:"division_engineering"},{default:o(()=>[e(u,{class:"w-[280px]",modelValue:l.division_engineering,"onUpdate:modelValue":i[0]||(i[0]=t=>l.division_engineering=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u90E8\u5DE5\u7A0B"},null,8,["modelValue"])]),_:1}),e(a,{label:"\u5B50\u5206\u90E8\u5DE5\u7A0B",prop:"sub_division_engineering"},{default:o(()=>[e(u,{class:"w-[280px]",modelValue:l.sub_division_engineering,"onUpdate:modelValue":i[1]||(i[1]=t=>l.sub_division_engineering=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5B50\u5206\u90E8\u5DE5\u7A0B"},null,8,["modelValue"])]),_:1}),e(a,{label:"\u5206\u9879\u5DE5\u7A0B",prop:"subentry_engineering"},{default:o(()=>[e(u,{class:"w-[280px]",modelValue:l.subentry_engineering,"onUpdate:modelValue":i[2]||(i[2]=t=>l.subentry_engineering=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u9879\u5DE5\u7A0B"},null,8,["modelValue"])]),_:1}),e(a,{label:"\u5206\u9879\u5DE5\u7A0B\u7F16\u7801",prop:"subentry_engineering_code"},{default:o(()=>[e(u,{class:"w-[280px]",modelValue:l.subentry_engineering_code,"onUpdate:modelValue":i[3]||(i[3]=t=>l.subentry_engineering_code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u9879\u5DE5\u7A0B\u7F16\u7801"},null,8,["modelValue"])]),_:1}),e(a,null,{default:o(()=>[e(p,{type:"primary",onClick:r(U)},{default:o(()=>[_e]),_:1},8,["onClick"]),e(p,{onClick:S},{default:o(()=>[ce]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),c((s(),d(k,{class:"!border-none",shadow:"never"},{default:o(()=>[c((s(),d(p,{type:"primary",onClick:j},{icon:o(()=>[e(q,{name:"el-icon-Plus"})]),default:o(()=>[fe]),_:1})),[[g,["build.build_division/add"]]]),c((s(),d(p,{disabled:!D.value.length,onClick:i[4]||(i[4]=t=>h(D.value))},{default:o(()=>[ve]),_:1},8,["disabled"])),[[g,["build.build_division/delete"]]]),P("div",ge,[e(z,{data:r(f).lists,onSelectionChange:T},{default:o(()=>[e(m,{type:"selection",width:"55"}),e(m,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(m,{label:"\u5206\u90E8\u5DE5\u7A0B",prop:"division_engineering","show-overflow-tooltip":""}),e(m,{label:"\u5B50\u5206\u90E8\u5DE5\u7A0B",prop:"sub_division_engineering","show-overflow-tooltip":""}),e(m,{label:"\u5206\u9879\u5DE5\u7A0B",prop:"subentry_engineering","show-overflow-tooltip":""}),e(m,{label:"\u5206\u9879\u5DE5\u7A0B\u7F16\u7801",prop:"subentry_engineering_code","show-overflow-tooltip":""}),e(m,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:o(({row:t})=>[c((s(),d(p,{type:"primary",link:"",onClick:V=>I(t)},{default:o(()=>[be]),_:2},1032,["onClick"])),[[g,["build.build_division/edit"]]]),c((s(),d(p,{type:"danger",link:"",onClick:V=>h(t.id)},{default:o(()=>[Ee]),_:2},1032,["onClick"])),[[g,["build.build_division/delete"]]]),c((s(),d(p,{link:"",onClick:V=>M(t)},{default:o(()=>[ye]),_:2},1032,["onClick"])),[[g,["build.build_division/detail"]]])]),_:1})]),_:1},8,["data"])]),P("div",we,[e(G,{modelValue:r(f),"onUpdate:modelValue":i[5]||(i[5]=t=>me(f)?f.value=t:null),onChange:r(v)},null,8,["modelValue","onChange"])])]),_:1})),[[H,r(f).loading]]),E.value?(s(),d(se,{key:0,ref_key:"editRef",ref:b,"dict-data":r(F),onSuccess:r(v),onClose:i[6]||(i[6]=t=>E.value=!1)},null,8,["dict-data","onSuccess"])):L("",!0),B.value?(s(),d(re,{key:1,ref_key:"detailRef",ref:w,"dict-data":r(F),onClose:i[7]||(i[7]=t=>B.value=!1)},null,8,["dict-data"])):L("",!0)])}}});export{yi as default};