2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
import{I as me,y as fe,w as ge,D as ve,C as be,L as ke,V as he,M as ye,W as Ee,a3 as Ce,F as we,N as Ve}from"./element-plus.517d4382.js";import{_ as Be}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as L,a as De}from"./index.8b1962e9.js";import{u as je}from"./usePaging.f6660143.js";import{u as xe}from"./useDictOptions.b5854a9e.js";import{b as M,d as Fe,a as $e,e as Pe}from"./projecttype.80aa89f5.js";import{d as Q,a0 as W,s as H,r as c,ai as Se,o as s,c as i,V as a,M as o,O as f,u as _,L as d,S as J,a as m,W as E,a8 as C,k as Ue,T as u,n as K,U as w}from"./@vue.ab566ce7.js";import"./lodash.1d82ee7c.js";import{_ as Ae}from"./edit.vue_vue_type_script_setup_true_name_procurementContractEdit_lang.12f4496d.js";import Le from"./detail.044e5998.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"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./custom.99349afc.js";const Re=u("\u67E5\u8BE2"),Te=u("\u91CD\u7F6E"),Ne=u(" \u65B0\u589E "),qe=u(" \u5220\u9664 "),Ie={class:"mt-4"},Me={key:0},We={key:1},Ge={key:0},Oe={key:1},ze={key:0},He={key:1},Je=u(" \u7F16\u8F91 "),Ke=u(" \u5220\u9664 "),Qe=u(" App\u6807\u7B7E "),Xe=u(" \u9884\u7B97 "),Ye=u(" \u6807\u7B7E "),Ze={class:"flex justify-end mt-4"},et={class:"dialog-footer"},tt=u("\u53D6\u6D88"),lt=u(" \u786E\u5B9A "),ot={class:"dialog-footer"},at=u("\u53D6\u6D88"),st=u(" \u786E\u5B9A "),ut={class:"dialog-footer"},nt=u("\u53D6\u6D88"),it=u(" \u786E\u5B9A "),rt=Q({name:"projectLists"}),Zt=Q({...rt,setup(dt){W([]);const X=H(),P=H(),S=c(!1),G=c(!1),U=W({name:""}),g=c([]),v=c([]),b=c([]),p=W({id:"",name:"",web_tags:"",app_tags:"",budget_tags:""}),Y=t=>{v.value=[],V.value=!0,t.app_tags&&t.app_tags.length>0&&(t.app_tags.includes(",")?v.value=t.app_tags.split(","):v.value=[t.app_tags]);for(const e in p)t[e]!=null&&t[e]!=null&&(p[e]=t[e])},Z=t=>{b.value=[],B.value=!0,t.web_tags&&t.web_tags.length>0&&(t.web_tags.includes(",")?b.value=t.web_tags.split(","):b.value=[t.web_tags]);for(const e in p)t[e]!=null&&t[e]!=null&&(p[e]=t[e])},ee=t=>{g.value=[],D.value=!0,t.budget_tags&&t.budget_tags.length>0&&(t.budget_tags.includes(",")?g.value=t.budget_tags.split(","):g.value=[t.budget_tags]);for(const e in p)t[e]!=null&&t[e]!=null&&(p[e]=t[e])},V=c(!1),B=c(!1),D=c(!1),te=()=>{v.value.length>0?(p.app_tags=v.value.toString(),M(p).then(t=>{console.log(t),V.value=!1,k()})):L.msgError("\u8BF7\u9009\u62E9\u6807\u7B7E")},le=()=>{b.value.length>0?(p.web_tags=b.value.toString(),M(p).then(t=>{B.value=!1,k()})):L.msgError("\u8BF7\u9009\u62E9\u6807\u7B7E")},oe=()=>{g.value.length>0?(p.budget_tags=g.value.toString(),M(p).then(t=>{console.log(t),D.value=!1,k()})):L.msgError("\u8BF7\u9009\u62E9\u9884\u7B97")},R=c([]),ae=t=>{R.value=t.map(({id:e})=>e)},{dictData:j}=xe("project_web_tags,project_app_tags,project_budget_tags"),{pager:x,getLists:k,resetParams:se,resetPage:ue}=je({fetchFun:Fe,params:U}),ne=async()=>{var t;S.value=!0,await K(),(t=P.value)==null||t.open("add")},ie=async t=>{var A,F;console.log(t.id);let e=await $e({id:t.id});S.value=!0,await K(),(A=P.value)==null||A.open("edit"),(F=P.value)==null||F.setFormData(e)},O=async t=>{await L.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Pe({id:t}),k()};return k(),(t,e)=>{const A=me,F=fe,r=ge,re=ve,z=be,de=De,h=ke,T=he,pe=ye,_e=Be,N=Ee,q=Ce,I=we,y=Se("perms"),ce=Ve;return s(),i("div",null,[a(z,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[a(re,{class:"mb-[-16px]",model:U,inline:""},{default:o(()=>[a(F,{label:"\u9879\u76EE\u540D\u79F0",prop:"procurement_contract_id"},{default:o(()=>[a(A,{class:"w-[280px]",modelValue:U.name,"onUpdate:modelValue":e[0]||(e[0]=l=>U.name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),a(F,null,{default:o(()=>[a(r,{type:"primary",onClick:_(ue)},{default:o(()=>[Re]),_:1},8,["onClick"]),a(r,{onClick:_(se)},{default:o(()=>[Te]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((s(),d(z,{class:"!border-none",shadow:"never"},{default:o(()=>[f((s(),d(r,{type:"primary",onClick:ne},{icon:o(()=>[a(de,{name:"el-icon-Plus"})]),default:o(()=>[Ne]),_:1})),[[y,["project.project/add"]]]),f((s(),d(r,{disabled:!R.value.length,onClick:e[1]||(e[1]=l=>O(R.value))},{default:o(()=>[qe]),_:1},8,["disabled"])),[[y,["project.project/delete"]]]),m("div",Ie,[a(pe,{data:_(x).lists,onSelectionChange:ae},{default:o(()=>[a(h,{type:"selection",width:"55"}),a(h,{label:"\u5E8F\u53F7",type:"index",width:"55"}),a(h,{label:"\u9879\u76EE\u7C7B\u578B",prop:"name","show-overflow-tooltip":""}),a(h,{label:"\u6807\u7B7E",prop:"custom_name","show-overflow-tooltip":""},{default:o(({row:l})=>[l.web_tags_text.length>0?(s(),i("div",Me,[(s(!0),i(E,null,C(l.web_tags_text,(n,$)=>(s(),i("text",{key:$},[a(T,{class:"ml-2",type:"success"},{default:o(()=>[u(w(n),1)]),_:2},1024)]))),128))])):(s(),i("div",We,"\u4E0D\u9650"))]),_:1}),a(h,{label:"App\u6807\u7B7E","show-overflow-tooltip":""},{default:o(({row:l})=>[l.app_tags_text.length>0?(s(),i("div",Ge,[(s(!0),i(E,null,C(l.app_tags_text,(n,$)=>(s(),i("text",{key:$},[a(T,{class:"ml-2",type:"success"},{default:o(()=>[u(w(n),1)]),_:2},1024)]))),128))])):(s(),i("div",Oe,"\u4E0D\u9650"))]),_:1}),a(h,{label:"\u9884\u7B97",prop:"custom_name","show-overflow-tooltip":""},{default:o(({row:l})=>[l.budget_tags_text.length>0?(s(),i("div",ze,[(s(!0),i(E,null,C(l.budget_tags_text,(n,$)=>(s(),i("text",{key:$},[a(T,{class:"ml-2",type:"success"},{default:o(()=>[u(w(n),1)]),_:2},1024)]))),128))])):(s(),i("div",He,"\u4E0D\u9650"))]),_:1}),a(h,{label:"\u64CD\u4F5C",width:"350",fixed:"right"},{default:o(({row:l})=>[f((s(),d(r,{type:"primary",link:"",onClick:n=>ie(l)},{default:o(()=>[Je]),_:2},1032,["onClick"])),[[y,["project.project/edit"]]]),f((s(),d(r,{type:"danger",link:"",onClick:n=>O(l.id)},{default:o(()=>[Ke]),_:2},1032,["onClick"])),[[y,["project.project/delete"]]]),f((s(),d(r,{link:"",onClick:n=>Y(l)},{default:o(()=>[Qe]),_:2},1032,["onClick"])),[[y,["project.project/detail"]]]),f((s(),d(r,{link:"",onClick:n=>ee(l)},{default:o(()=>[Xe]),_:2},1032,["onClick"])),[[y,["project.project/detail"]]]),f((s(),d(r,{link:"",onClick:n=>Z(l)},{default:o(()=>[Ye]),_:2},1032,["onClick"])),[[y,["project.project/detail"]]])]),_:1})]),_:1},8,["data"])]),m("div",Ze,[a(_e,{modelValue:_(x),"onUpdate:modelValue":e[2]||(e[2]=l=>Ue(x)?x.value=l:null),onChange:_(k)},null,8,["modelValue","onChange"])])]),_:1})),[[ce,_(x).loading]]),S.value?(s(),d(Ae,{key:0,ref_key:"editRef",ref:P,"dict-data":_(j),onSuccess:_(k),onClose:e[3]||(e[3]=l=>S.value=!1)},null,8,["dict-data","onSuccess"])):J("",!0),G.value?(s(),d(Le,{key:1,ref_key:"detailRef",ref:X,"dict-data":_(j),onClose:e[4]||(e[4]=l=>G.value=!1)},null,8,["dict-data"])):J("",!0),a(I,{modelValue:V.value,"onUpdate:modelValue":e[7]||(e[7]=l=>V.value=l),title:"app\u6807\u7B7E",width:"600px","before-close":t.handleClose},{footer:o(()=>[m("span",et,[a(r,{onClick:e[6]||(e[6]=l=>V.value=!1)},{default:o(()=>[tt]),_:1}),a(r,{type:"primary",onClick:te},{default:o(()=>[lt]),_:1})])]),default:o(()=>[m("div",null,[a(q,{modelValue:v.value,"onUpdate:modelValue":e[5]||(e[5]=l=>v.value=l)},{default:o(()=>[(s(!0),i(E,null,C(_(j).project_app_tags,(l,n)=>(s(),d(N,{label:l.value,key:n},{default:o(()=>[u(w(l.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue","before-close"]),a(I,{modelValue:B.value,"onUpdate:modelValue":e[10]||(e[10]=l=>B.value=l),title:"\u6807\u7B7E",width:"600px","before-close":t.handleClose},{footer:o(()=>[m("span",ot,[a(r,{onClick:e[9]||(e[9]=l=>B.value=!1)},{default:o(()=>[at]),_:1}),a(r,{type:"primary",onClick:le},{default:o(()=>[st]),_:1})])]),default:o(()=>[m("div",null,[a(q,{modelValue:b.value,"onUpdate:modelValue":e[8]||(e[8]=l=>b.value=l)},{default:o(()=>[(s(!0),i(E,null,C(_(j).project_web_tags,(l,n)=>(s(),d(N,{label:l.value,key:n},{default:o(()=>[u(w(l.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue","before-close"]),a(I,{modelValue:D.value,"onUpdate:modelValue":e[13]||(e[13]=l=>D.value=l),title:"\u9884\u7B97",width:"600px","before-close":t.handleClose},{footer:o(()=>[m("span",ut,[a(r,{onClick:e[12]||(e[12]=l=>D.value=!1)},{default:o(()=>[nt]),_:1}),a(r,{type:"primary",onClick:oe},{default:o(()=>[it]),_:1})])]),default:o(()=>[m("div",null,[m("div",null,[a(q,{modelValue:g.value,"onUpdate:modelValue":e[11]||(e[11]=l=>g.value=l)},{default:o(()=>[(s(!0),i(E,null,C(_(j).project_budget_tags,(l,n)=>(s(),d(N,{label:l.value,key:n},{default:o(()=>[u(w(l.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])])]),_:1},8,["modelValue","before-close"])])}}});export{Zt as default};
|