2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{G as A,H as I,L as M,M as O,a6 as q,N as z,O as G,B as H,C as Q,w as Z,D as J}from"./element-plus.2acb577d.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as X,b as Y}from"./index.81df6f20.js";import{d as D,s as h,r as ee,Z as te,am as oe,o as u,c as ae,U as t,L as o,u as a,aa as w,R as i,a as V,M as E,K as d,S as le,i as se,Q as ne,n as B}from"./@vue.821a47ec.js";import{_ as ue,o as ie,a as re}from"./edit.vue_vue_type_script_setup_true_lang.ec5a4d4b.js";import{u as me}from"./usePaging.23706826.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 pe={class:"post-lists"},de={class:"flex justify-end mt-4"},_e=D({name:"post"}),We=D({..._e,setup(ce){const _=h(),c=ee(!1),s=te({master:"",name:"",status:""}),{pager:r,getLists:f,resetPage:v,resetParams:F}=me({fetchFun:re,params:s}),x=async()=>{var n;c.value=!0,await B(),(n=_.value)==null||n.open("add")},$=async n=>{var e,m;c.value=!0,await B(),(e=_.value)==null||e.open("edit"),(m=_.value)==null||m.getDetail(n)},K=async n=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({id:n}),f()};return f(),(n,e)=>{const m=H,C=Q,g=A,R=I,p=Z,L=J,k=M,N=Y,b=O,P=q,S=z,T=W,y=oe("perms"),U=G;return u(),ae("div",pe,[t(k,{class:"!border-none",shadow:"never"},{default:o(()=>[t(L,{ref:"formRef",class:"mb-[-16px]",model:a(s),inline:!0},{default:o(()=>[t(C,{label:"\u7EC4\u7EC7\u540D\u79F0"},{default:o(()=>[t(m,{class:"w-[280px]",modelValue:a(s).name,"onUpdate:modelValue":e[0]||(e[0]=l=>a(s).name=l),clearable:"",onKeyup:w(a(v),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(C,{label:"\u7EC4\u7EC7\u8D1F\u8D23\u4EBA"},{default:o(()=>[t(m,{class:"w-[280px]",modelValue:a(s).master,"onUpdate:modelValue":e[1]||(e[1]=l=>a(s).master=l),clearable:"",onKeyup:w(a(v),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(C,{label:"\u7EC4\u7EC7\u72B6\u6001"},{default:o(()=>[t(R,{class:"w-[280px]",modelValue:a(s).status,"onUpdate:modelValue":e[2]||(e[2]=l=>a(s).status=l)},{default:o(()=>[t(g,{label:"\u6B63\u5E38",value:0}),t(g,{label:"\u505C\u7528",value:1})]),_:1},8,["modelValue"])]),_:1}),t(C,null,{default:o(()=>[t(p,{type:"primary",onClick:a(v)},{default:o(()=>e[6]||(e[6]=[i("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(p,{onClick:a(F)},{default:o(()=>e[7]||(e[7]=[i("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),t(k,{class:"!border-none mt-4",shadow:"never"},{default:o(()=>[V("div",null,[E((u(),d(p,{type:"primary",onClick:e[3]||(e[3]=l=>x())},{icon:o(()=>[t(N,{name:"el-icon-Plus"})]),default:o(()=>[e[8]||(e[8]=i(" \u65B0\u589E "))]),_:1})),[[y,["dept.jobs/add"]]])]),E((u(),d(S,{class:"mt-4",size:"large",data:a(r).lists},{default:o(()=>[t(b,{label:"\u7EC4\u7EC7\u540D\u79F0",prop:"name","min-width":"100"}),t(b,{label:"\u72B6\u6001",prop:"status","min-width":"100"},{default:o(({row:l})=>[t(P,{class:"ml-2",type:l.status?"danger":""},{default:o(()=>[i(le(l.status==0?"\u6B63\u5E38":"\u7981\u7528"),1)]),_:2},1032,["type"])]),_:1}),t(b,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:l})=>[E((u(),d(p,{type:"primary",link:"",onClick:j=>$(l)},{default:o(()=>e[9]||(e[9]=[i(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[y,["dept.jobs/edit"]]]),E((u(),d(p,{type:"danger",link:"",onClick:j=>K(l.id)},{default:o(()=>e[10]||(e[10]=[i(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[y,["dept.jobs/delete"]]])]),_:1})]),_:1},8,["data"])),[[U,a(r).loading]]),V("div",de,[t(T,{modelValue:a(r),"onUpdate:modelValue":e[4]||(e[4]=l=>se(r)?r.value=l:null),onChange:a(f)},null,8,["modelValue","onChange"])])]),_:1}),a(c)?(u(),d(ue,{key:0,ref_key:"editRef",ref:_,onSuccess:a(f),onClose:e[5]||(e[5]=l=>c.value=!1)},null,8,["onSuccess"])):ne("",!0)])}}});export{We as default};
|