import{I as G,y as H,w as J,D as K,C as Q,L as X,M as Y,N as Z}from"./element-plus.258bf9e7.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as te,a as oe}from"./index.ec401e3b.js";import{u as ae}from"./usePaging.f6660143.js";import{u as le}from"./useDictOptions.c644f395.js";import{_ as ie,a as ne,b as V,c as se}from"./edit.vue_vue_type_script_setup_true_name_procurementContractEdit_lang.7d1b8bc3.js";import"./lodash.1d82ee7c.js";import re from"./detail.69866d03.js";import{d as R,a0 as x,s as P,r as E,ai as ue,o as n,c as pe,V as e,M as o,O as m,u as s,L as u,S as $,a as L,k as ce,T as d,n as F}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.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.9492d03b.js";import"./project_role_set.05bbe367.js";import"./projecttype.f974a874.js";import"./custom.13e75d58.js";const de=d("\u67E5\u8BE2"),me=d("\u91CD\u7F6E"),_e=d(" \u65B0\u589E "),fe=d(" \u5220\u9664 "),ve={class:"mt-4"},he=d(" \u7F16\u8F91 "),we=d(" \u5220\u9664 "),Ce=d(" \u8BE6\u60C5 "),be={class:"flex justify-end mt-4"},ke=R({name:"projectLists"}),ct=R({...ke,setup(De){x([]);const b=P(),v=P(),h=E(!1),k=E(!1),w=x({name:""}),D=E([]),S=a=>{D.value=a.map(({id:t})=>t)},{dictData:y}=le(""),{pager:_,getLists:C,resetParams:A,resetPage:N}=ae({fetchFun:ne,params:w}),T=async()=>{var a;h.value=!0,await F(),(a=v.value)==null||a.open("add")},I=async a=>{var p,r;console.log(a.id);let t=await V({id:a.id});h.value=!0,await F(),(p=v.value)==null||p.open("edit"),(r=v.value)==null||r.setFormData(t)},g=async a=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await se({id:a}),C()},M=async a=>{var p,r;let t=await V({id:a.id});k.value=!0,await F(),(p=b.value)==null||p.open(),(r=b.value)==null||r.setFormData(t)};return C(),(a,t)=>{const p=G,r=H,c=J,U=K,j=Q,q=oe,i=X,z=Y,O=ee,f=ue("perms"),W=Z;return n(),pe("div",null,[e(j,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(U,{class:"mb-[-16px]",model:w,inline:""},{default:o(()=>[e(r,{label:"\u9879\u76EE\u540D\u79F0",prop:"procurement_contract_id"},{default:o(()=>[e(p,{class:"w-[280px]",modelValue:w.name,"onUpdate:modelValue":t[0]||(t[0]=l=>w.name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[e(c,{type:"primary",onClick:s(N)},{default:o(()=>[de]),_:1},8,["onClick"]),e(c,{onClick:s(A)},{default:o(()=>[me]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((n(),u(j,{class:"!border-none",shadow:"never"},{default:o(()=>[m((n(),u(c,{type:"primary",onClick:T},{icon:o(()=>[e(q,{name:"el-icon-Plus"})]),default:o(()=>[_e]),_:1})),[[f,["project.project/add"]]]),m((n(),u(c,{disabled:!D.value.length,onClick:t[1]||(t[1]=l=>g(D.value))},{default:o(()=>[fe]),_:1},8,["disabled"])),[[f,["project.project/delete"]]]),L("div",ve,[e(z,{data:s(_).lists,onSelectionChange:S,"row-key":"id",lazy:"","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:o(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(i,{label:"\u8282\u70B9\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{label:"WBS\u7F16\u7801",prop:"wbs_code","show-overflow-tooltip":""}),e(i,{label:"\u8F93\u51FA\u8D44\u6599",prop:"output_data","show-overflow-tooltip":""}),e(i,{label:"\u8D1F\u8D23\u89D2\u8272",prop:"project_role_name","show-overflow-tooltip":""}),e(i,{label:"\u5C42\u7EA7",prop:"sort","show-overflow-tooltip":""}),e(i,{label:"\u672C\u7EA7\u6743\u91CD",prop:"weight","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:o(({row:l})=>[m((n(),u(c,{type:"primary",link:"",onClick:B=>I(l)},{default:o(()=>[he]),_:2},1032,["onClick"])),[[f,["project.project/edit"]]]),m((n(),u(c,{type:"danger",link:"",onClick:B=>g(l.id)},{default:o(()=>[we]),_:2},1032,["onClick"])),[[f,["project.project/delete"]]]),m((n(),u(c,{link:"",onClick:B=>M(l)},{default:o(()=>[Ce]),_:2},1032,["onClick"])),[[f,["project.project/detail"]]])]),_:1})]),_:1},8,["data"])]),L("div",be,[e(O,{modelValue:s(_),"onUpdate:modelValue":t[2]||(t[2]=l=>ce(_)?_.value=l:null),onChange:s(C)},null,8,["modelValue","onChange"])])]),_:1})),[[W,s(_).loading]]),h.value?(n(),u(ie,{key:0,ref_key:"editRef",ref:v,"dict-data":s(y),onSuccess:s(C),onClose:t[3]||(t[3]=l=>h.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),k.value?(n(),u(re,{key:1,ref_key:"detailRef",ref:b,"dict-data":s(y),onClose:t[4]||(t[4]=l=>k.value=!1)},null,8,["dict-data"])):$("",!0)])}}});export{ct as default};