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

2 lines
5.8 KiB
JavaScript

import{G as q,H as z,L as G,M as H,N as K,O as Q,C as Z,B as J,w as W,D as X}from"./element-plus.2acb577d.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as ee,b as te}from"./index.81df6f20.js";import{u as oe}from"./usePaging.23706826.js";import{u as ae}from"./useDictOptions.4fbfb4d7.js";import{a as le,e as ne,b as se}from"./oa_flow_type.b60fa00e.js";import{d as h,s as ie,r as E,Z as ue,am as pe,o as s,c as T,U as t,L as l,u as a,T as re,a9 as me,K as p,R as r,M as c,a as B,S as de,i as ce,Q as _e,n as $}from"./@vue.821a47ec.js";import"./lodash.6bfd3540.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_oaFlowTypeEdit_lang.df60d2b2.js";import{d as we}from"./department.23a87470.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"./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"./picker.vue_vue_type_script_setup_true_lang.280c1c5d.js";import"./index.230e97a9.js";import"./index.vue_vue_type_style_index_0_lang.9e5f7fb0.js";import"./index.37024cd6.js";import"./index.f292cd50.js";const ve={class:"mt-4"},ye={style:{display:"flex","justify-content":"space-around"}},be={class:"flex mt-4 justify-end"},Ce=h({name:"oaFlowTypeLists"}),mt=h({...Ce,setup(Fe){const _=ie(),f=E(!1),i=ue({type:"",title:"",name:""}),F=E([]),S=n=>{F.value=n.map(({id:e})=>e)},{dictData:g}=ae("oa_approve_cate"),{pager:d,getLists:w,resetParams:N,resetPage:O}=oe({fetchFun:se,params:i}),P=async()=>{var n;f.value=!0,await $(),(n=_.value)==null||n.open("add")},R=async n=>{var v,y;let e=await le({id:n.id});f.value=!0,await $(),(v=_.value)==null||v.open("edit"),(y=_.value)==null||y.setFormData(e)},k=async n=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({id:n}),w()},D=E([]);return(async()=>{const n=await we();D.value=n})(),w(),(n,e)=>{const v=q,y=z,b=Z,V=J,m=W,U=X,x=G,L=te,u=H,I=K,j=Y,C=pe("perms"),M=Q;return s(),T("div",null,[t(x,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(U,{class:"mb-[-16px]",model:a(i),inline:""},{default:l(()=>[t(b,{label:"\u6240\u5C5E\u5206\u7C7B",prop:"type"},{default:l(()=>[t(y,{modelValue:a(i).type,"onUpdate:modelValue":e[0]||(e[0]=o=>a(i).type=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u5206\u7C7B",class:"flex-1 w-[280px]"},{default:l(()=>[(s(!0),T(re,null,me(a(g).oa_approve_cate,o=>(s(),p(v,{key:o.value,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(b,{label:"\u5BA1\u6279\u540D\u79F0",prop:"title"},{default:l(()=>[t(V,{class:"w-[280px]",modelValue:a(i).title,"onUpdate:modelValue":e[1]||(e[1]=o=>a(i).title=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(b,{label:"\u5BA1\u6279\u6807\u8BC6",prop:"name"},{default:l(()=>[t(V,{class:"w-[280px]",modelValue:a(i).name,"onUpdate:modelValue":e[2]||(e[2]=o=>a(i).name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u6807\u8BC6"},null,8,["modelValue"])]),_:1}),t(b,null,{default:l(()=>[t(m,{type:"primary",onClick:a(O)},{default:l(()=>e[6]||(e[6]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(m,{onClick:a(N)},{default:l(()=>e[7]||(e[7]=[r("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),c((s(),p(x,{class:"!border-none",shadow:"never"},{default:l(()=>[c((s(),p(m,{type:"primary",onClick:P},{icon:l(()=>[t(L,{name:"el-icon-Plus"})]),default:l(()=>[e[8]||(e[8]=r(" \u65B0\u589E "))]),_:1})),[[C,["works.bgsp.oa_flow_type/add"]]]),c((s(),p(m,{disabled:!a(F).length,onClick:e[3]||(e[3]=o=>k(a(F)))},{default:l(()=>e[9]||(e[9]=[r(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[C,["works.bgsp.oa_flow_type/delete"]]]),B("div",ve,[t(I,{data:a(d).lists,onSelectionChange:S},{default:l(()=>[t(u,{type:"selection",width:"55"}),t(u,{label:"\u6240\u5C5E\u5206\u7C7B",prop:"type_text","show-overflow-tooltip":""}),t(u,{label:"\u5BA1\u6279\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),t(u,{label:"\u5BA1\u6279\u6807\u8BC6",prop:"name","show-overflow-tooltip":""}),t(u,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"update_time","show-overflow-tooltip":""}),t(u,{label:"\u56FE\u6807",prop:"icon"},{default:l(({row:o,$index:A})=>[B("div",ye,[t(L,{name:o.icon,size:20},null,8,["name"])])]),_:1}),t(u,{label:"\u5E94\u7528\u90E8\u95E8",prop:"department_names","show-overflow-tooltip":""},{default:l(({row:o})=>[r(de(o.department_names),1)]),_:1}),t(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:o})=>[c((s(),p(m,{type:"primary",link:"",onClick:A=>R(o)},{default:l(()=>e[10]||(e[10]=[r(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[C,["works.bgsp.oa_flow_type/edit"]]]),c((s(),p(m,{type:"danger",link:"",onClick:A=>k(o.id)},{default:l(()=>e[11]||(e[11]=[r(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[C,["works.bgsp.oa_flow_type/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",be,[t(j,{modelValue:a(d),"onUpdate:modelValue":e[4]||(e[4]=o=>ce(d)?d.value=o:null),onChange:a(w)},null,8,["modelValue","onChange"])])]),_:1})),[[M,a(d).loading]]),a(f)?(s(),p(fe,{key:0,ref_key:"editRef",ref:_,deptList:a(D),"dict-data":a(g),onSuccess:a(w),onClose:e[5]||(e[5]=o=>f.value=!1)},null,8,["deptList","dict-data","onSuccess"])):_e("",!0)])}}});export{mt as default};