2025-03-20 10:46:42 +08:00

2 lines
5.0 KiB
JavaScript

import{G as A,H as I,L as M,M as O,a6 as q,N as G,O as H,B as Q,C as Z,w as J,D as W}from"./element-plus.2acb577d.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as Y,b as ee}from"./index.81df6f20.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.804ffc77.js";import{d as B,s as oe,r as ae,Z as le,am as se,o as r,c as ne,U as e,L as a,u as o,aa as g,R as m,a as k,M as v,K as c,S as ue,i as ie,Q as re,n as D}from"./@vue.821a47ec.js";import{j as V,d as me}from"./post.6b27df48.js";import{u as pe}from"./usePaging.23706826.js";import{_ as de}from"./edit.vue_vue_type_script_setup_true_lang.711cb382.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./index.f292cd50.js";const ce={class:"post-lists"},_e={class:"flex justify-end mt-4"},fe=B({name:"post"}),et=B({...fe,setup(be){const _=oe(),f=ae(!1),s=le({code:"",name:"",status:""}),{pager:i,getLists:b,resetPage:F,resetParams:x}=pe({fetchFun:V,params:s}),$=async()=>{var n;f.value=!0,await D(),(n=_.value)==null||n.open("add")},j=async n=>{var t,p;f.value=!0,await D(),(t=_.value)==null||t.open("edit"),(p=_.value)==null||p.getDetail(n)},K=async n=>{await Y.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:n}),b()};return b(),(n,t)=>{const p=Q,C=Z,w=A,R=I,d=J,h=te,L=W,E=M,N=ee,u=O,P=q,S=G,T=X,y=se("perms"),U=H;return r(),ne("div",ce,[e(E,{class:"!border-none",shadow:"never"},{default:a(()=>[e(L,{ref:"formRef",class:"mb-[-16px]",model:o(s),inline:!0},{default:a(()=>[e(C,{label:"\u5C97\u4F4D\u7F16\u7801"},{default:a(()=>[e(p,{class:"w-[280px]",modelValue:o(s).code,"onUpdate:modelValue":t[0]||(t[0]=l=>o(s).code=l),clearable:"",onKeyup:g(o(F),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(C,{label:"\u5C97\u4F4D\u540D\u79F0"},{default:a(()=>[e(p,{class:"w-[280px]",modelValue:o(s).name,"onUpdate:modelValue":t[1]||(t[1]=l=>o(s).name=l),clearable:"",onKeyup:g(o(F),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(C,{label:"\u5C97\u4F4D\u72B6\u6001"},{default:a(()=>[e(R,{class:"w-[280px]",modelValue:o(s).status,"onUpdate:modelValue":t[2]||(t[2]=l=>o(s).status=l)},{default:a(()=>[e(w,{label:"\u5168\u90E8",value:""}),e(w,{label:"\u6B63\u5E38",value:1}),e(w,{label:"\u505C\u7528",value:0})]),_:1},8,["modelValue"])]),_:1}),e(C,null,{default:a(()=>[e(d,{type:"primary",onClick:o(F)},{default:a(()=>t[6]||(t[6]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(d,{onClick:o(x)},{default:a(()=>t[7]||(t[7]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(h,{class:"ml-2.5","fetch-fun":o(V),params:o(s),"page-size":o(i).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),e(E,{class:"!border-none mt-4",shadow:"never"},{default:a(()=>[k("div",null,[v((r(),c(d,{type:"primary",onClick:t[3]||(t[3]=l=>$())},{icon:a(()=>[e(N,{name:"el-icon-Plus"})]),default:a(()=>[t[8]||(t[8]=m(" \u65B0\u589E "))]),_:1})),[[y,["dept.jobs/add"]]])]),v((r(),c(S,{class:"mt-4",size:"large",data:o(i).lists},{default:a(()=>[e(u,{label:"\u5C97\u4F4D\u7F16\u7801",prop:"code","min-width":"100"}),e(u,{label:"\u5C97\u4F4D\u540D\u79F0",prop:"name","min-width":"100"}),e(u,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),e(u,{label:"\u5907\u6CE8",prop:"remark","min-width":"100","show-overflow-tooltip":""}),e(u,{label:"\u6DFB\u52A0\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(u,{label:"\u72B6\u6001",prop:"status","min-width":"100"},{default:a(({row:l})=>[e(P,{class:"ml-2",type:l.status?"":"danger"},{default:a(()=>[m(ue(l.status_desc),1)]),_:2},1032,["type"])]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[v((r(),c(d,{type:"primary",link:"",onClick:z=>j(l)},{default:a(()=>t[9]||(t[9]=[m(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[y,["dept.jobs/edit"]]]),v((r(),c(d,{type:"danger",link:"",onClick:z=>K(l.id)},{default:a(()=>t[10]||(t[10]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[y,["dept.jobs/delete"]]])]),_:1})]),_:1},8,["data"])),[[U,o(i).loading]]),k("div",_e,[e(T,{modelValue:o(i),"onUpdate:modelValue":t[4]||(t[4]=l=>ie(i)?i.value=l:null),onChange:o(b)},null,8,["modelValue","onChange"])])]),_:1}),o(f)?(r(),c(de,{key:0,ref_key:"editRef",ref:_,onSuccess:o(b),onClose:t[5]||(t[5]=l=>f.value=!1)},null,8,["onSuccess"])):re("",!0)])}}});export{et as default};