import{I as H,y as J,w as K,D as Q,C as W,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{d as ne,a as x,e as ie}from"./project_role_set.05bbe367.js";import"./lodash.1d82ee7c.js";import{_ as se}from"./edit.vue_vue_type_script_setup_true_name_procurementContractEdit_lang.4821a40f.js";import re from"./detail.8c164c79.js";import{d as R,a0 as B,s as P,r as y,ai as ue,o as n,c as ce,V as t,M as o,O as m,u as i,L as r,S as $,a as L,k as de,T as d,n as D}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"./custom.13e75d58.js";const me=d("\u67E5\u8BE2"),pe=d("\u91CD\u7F6E"),_e=d(" \u65B0\u589E "),fe=d(" \u5220\u9664 "),ve={class:"mt-4"},Ce=d(" \u7F16\u8F91 "),he=d(" \u5220\u9664 "),ke=d(" \u8BE6\u60C5 "),Ee={class:"flex justify-end mt-4"},we=R({name:"projectLists"}),ct=R({...we,setup(Fe){B([]);const E=P(),v=P(),C=y(!1),w=y(!1),h=B({name:""}),F=y([]),N=a=>{F.value=a.map(({id:e})=>e)},{dictData:b}=le(""),{pager:p,getLists:k,resetParams:S,resetPage:T}=ae({fetchFun:ne,params:h}),I=async()=>{var a;C.value=!0,await D(),(a=v.value)==null||a.open("add")},A=async a=>{var u,s;console.log(a.id);let e=await x({id:a.id});C.value=!0,await D(),(u=v.value)==null||u.open("edit"),(s=v.value)==null||s.setFormData(e)},g=async a=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({id:a}),k()},M=async a=>{var u,s;let e=await x({id:a.id});w.value=!0,await D(),(u=E.value)==null||u.open(),(s=E.value)==null||s.setFormData(e)};return k(),(a,e)=>{const u=H,s=J,c=K,U=Q,j=W,q=oe,_=X,O=Y,z=ee,f=ue("perms"),G=Z;return n(),ce("div",null,[t(j,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(U,{class:"mb-[-16px]",model:h,inline:""},{default:o(()=>[t(s,{label:"\u9879\u76EE\u540D\u79F0",prop:"procurement_contract_id"},{default:o(()=>[t(u,{class:"w-[280px]",modelValue:h.name,"onUpdate:modelValue":e[0]||(e[0]=l=>h.name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(s,null,{default:o(()=>[t(c,{type:"primary",onClick:i(T)},{default:o(()=>[me]),_:1},8,["onClick"]),t(c,{onClick:i(S)},{default:o(()=>[pe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((n(),r(j,{class:"!border-none",shadow:"never"},{default:o(()=>[m((n(),r(c,{type:"primary",onClick:I},{icon:o(()=>[t(q,{name:"el-icon-Plus"})]),default:o(()=>[_e]),_:1})),[[f,["project.project/add"]]]),m((n(),r(c,{disabled:!F.value.length,onClick:e[1]||(e[1]=l=>g(F.value))},{default:o(()=>[fe]),_:1},8,["disabled"])),[[f,["project.project/delete"]]]),L("div",ve,[t(O,{data:i(p).lists,onSelectionChange:N},{default:o(()=>[t(_,{type:"selection",width:"55"}),t(_,{label:"\u5E8F\u53F7",type:"index",width:"55"}),t(_,{label:"\u89D2\u8272\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),t(_,{label:"\u6392\u5E8F\u53F7",prop:"sort","show-overflow-tooltip":""}),t(_,{label:"\u64CD\u4F5C",width:"350",fixed:"right"},{default:o(({row:l})=>[m((n(),r(c,{type:"primary",link:"",onClick:V=>A(l)},{default:o(()=>[Ce]),_:2},1032,["onClick"])),[[f,["project.project/edit"]]]),m((n(),r(c,{type:"danger",link:"",onClick:V=>g(l.id)},{default:o(()=>[he]),_:2},1032,["onClick"])),[[f,["project.project/delete"]]]),m((n(),r(c,{link:"",onClick:V=>M(l)},{default:o(()=>[ke]),_:2},1032,["onClick"])),[[f,["project.project/detail"]]])]),_:1})]),_:1},8,["data"])]),L("div",Ee,[t(z,{modelValue:i(p),"onUpdate:modelValue":e[2]||(e[2]=l=>de(p)?p.value=l:null),onChange:i(k)},null,8,["modelValue","onChange"])])]),_:1})),[[G,i(p).loading]]),C.value?(n(),r(se,{key:0,ref_key:"editRef",ref:v,"dict-data":i(b),onSuccess:i(k),onClose:e[3]||(e[3]=l=>C.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),w.value?(n(),r(re,{key:1,ref_key:"detailRef",ref:E,"dict-data":i(b),onClose:e[4]||(e[4]=l=>w.value=!1)},null,8,["dict-data"])):$("",!0)])}}});export{ct as default};