2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
import{I as K,y as Q,w as X,D as Y,C as Z,L as ee,a0 as oe,M as te,N as ae}from"./element-plus.b3353ca6.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.f8e9523f.js";import{f as ne,a as ie}from"./index.892155dd.js";import{u as ue}from"./usePaging.f6660143.js";import{u as se}from"./useDictOptions.c47985a3.js";import{d as re,a as P,e as pe}from"./project_document.143520b0.js";import{d as N,a0 as $,s as L,r as g,ai as de,o as l,c as h,V as e,M as t,O as _,u as s,L as p,S as R,a as S,W as ce,a8 as me,k as _e,T as d,n as D,U as fe}from"./@vue.ab566ce7.js";import"./lodash.1d82ee7c.js";import{_ as ve}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.3bb9fcca.js";import he from"./detail.0f80bde4.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.vue_vue_type_style_index_0_lang.0516907d.js";import"./common.1dd75afe.js";import"./index.771e5a41.js";import"./project_document_set.75325523.js";import"./index.vue_vue_type_script_setup_true_lang.3dd325bc.js";import"./project.31b61d2e.js";import"./custom.735a8774.js";const we=d("\u67E5\u8BE2"),Fe=d("\u91CD\u7F6E"),ke=d(" \u65B0\u589E "),Ce=d(" \u5220\u9664 "),be={class:"mt-4"},Ee={key:0},ye={key:1},ge=d(" \u7F16\u8F91 "),De=d(" \u5220\u9664 "),je=d(" \u8BE6\u60C5 "),xe={class:"flex justify-end mt-4"},Be=N({name:"projectLists"}),yo=N({...Be,setup(Ve){$([]);const b=L(),w=L(),F=g(!1),E=g(!1),m=$({code:"",name:""}),y=g([]),T=n=>{y.value=n.map(({id:o})=>o)},{dictData:j}=se(""),{pager:f,getLists:k,resetParams:I,resetPage:U}=ue({fetchFun:re,params:m}),A=async()=>{var n;F.value=!0,await D(),(n=w.value)==null||n.open("add")},M=async n=>{var r,u;console.log(n.id);let o=await P({id:n.id});F.value=!0,await D(),(r=w.value)==null||r.open("edit"),(u=w.value)==null||u.setFormData(o)},x=async n=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:n}),k()},q=async n=>{var r,u;let o=await P({id:n.id});E.value=!0,await D(),(r=b.value)==null||r.open(),(u=b.value)==null||u.setFormData(o)};return k(),(n,o)=>{const r=K,u=Q,c=X,O=Y,B=Z,W=ie,i=ee,z=oe,G=te,H=le,v=de("perms"),J=ae;return l(),h("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(O,{class:"mb-[-16px]",model:m,inline:""},{default:t(()=>[e(u,{label:"\u6587\u6863\u7F16\u7801",prop:"code"},{default:t(()=>[e(r,{class:"w-[280px]",modelValue:m.code,"onUpdate:modelValue":o[0]||(o[0]=a=>m.code=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6587\u6863\u7F16\u7801"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u6587\u6863\u540D\u79F0",prop:"name"},{default:t(()=>[e(r,{class:"w-[280px]",modelValue:m.name,"onUpdate:modelValue":o[1]||(o[1]=a=>m.name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6587\u6863\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(c,{type:"primary",onClick:s(U)},{default:t(()=>[we]),_:1},8,["onClick"]),e(c,{onClick:s(I)},{default:t(()=>[Fe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((l(),p(B,{class:"!border-none",shadow:"never"},{default:t(()=>[_((l(),p(c,{type:"primary",onClick:A},{icon:t(()=>[e(W,{name:"el-icon-Plus"})]),default:t(()=>[ke]),_:1})),[[v,["project.project_document/add"]]]),_((l(),p(c,{disabled:!y.value.length,onClick:o[2]||(o[2]=a=>x(y.value))},{default:t(()=>[Ce]),_:1},8,["disabled"])),[[v,["project.project_document/delete"]]]),S("div",be,[e(G,{data:s(f).lists,onSelectionChange:T},{default:t(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(i,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(i,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(i,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(i,{label:"\u6587\u6863\u5927\u7C7B",prop:"large_category","show-overflow-tooltip":""}),e(i,{label:"\u6587\u6863\u4E2D\u7C7B",prop:"middle_category","show-overflow-tooltip":""}),e(i,{label:"\u6587\u6863\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),e(i,{label:"\u6587\u6863\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{label:"\u7248\u672C\u53F7",prop:"version","show-overflow-tooltip":""}),e(i,{label:"\u9644\u4EF6",prop:"annex","show-overflow-tooltip":""},{default:t(({row:a})=>[a.annex&&a.annex.length>0?(l(),h("div",Ee,[(l(!0),h(ce,null,me(a.annex,(C,V)=>(l(),h("div",{key:V},[e(z,{href:C,target:"_blank"},{default:t(()=>[d("\u6587\u4EF6"+fe(V+1)+"\u67E5\u770B",1)]),_:2},1032,["href"])]))),128))])):(l(),h("div",ye," \u6682\u65E0\u6587\u4EF6 "))]),_:1}),e(i,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:t(({row:a})=>[_((l(),p(c,{type:"primary",link:"",onClick:C=>M(a)},{default:t(()=>[ge]),_:2},1032,["onClick"])),[[v,["project.project_document/edit"]]]),_((l(),p(c,{type:"danger",link:"",onClick:C=>x(a.id)},{default:t(()=>[De]),_:2},1032,["onClick"])),[[v,["project.project_document/delete"]]]),_((l(),p(c,{link:"",onClick:C=>q(a)},{default:t(()=>[je]),_:2},1032,["onClick"])),[[v,["project.project_document/detail"]]])]),_:1})]),_:1},8,["data"])]),S("div",xe,[e(H,{modelValue:s(f),"onUpdate:modelValue":o[3]||(o[3]=a=>_e(f)?f.value=a:null),onChange:s(k)},null,8,["modelValue","onChange"])])]),_:1})),[[J,s(f).loading]]),F.value?(l(),p(ve,{key:0,ref_key:"editRef",ref:w,"dict-data":s(j),onSuccess:s(k),onClose:o[4]||(o[4]=a=>F.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0),E.value?(l(),p(he,{key:1,ref_key:"detailRef",ref:b,"dict-data":s(j),onClose:o[5]||(o[5]=a=>E.value=!1)},null,8,["dict-data"])):R("",!0)])}}});export{yo as default};
|