2025-03-20 10:25:32 +08:00

2 lines
5.5 KiB
JavaScript

import{G as H,H as K,L as Q,M as Z,N as z,O as J,B as W,C as X,w as Y,D as ee}from"./element-plus.2acb577d.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as oe,b as le}from"./index.81df6f20.js";import{u as ae}from"./usePaging.23706826.js";import{u as ue}from"./useDictOptions.4fbfb4d7.js";import{_ as se,a as ne,b as ie,c as re}from"./edit.vue_vue_type_script_setup_true_name_oaScheduleEdit_lang.23308f54.js";import"./lodash.6bfd3540.js";import{_ as pe}from"./detail.vue_vue_type_script_setup_true_name_customdetail_lang.7ac81037.js";import{d as S,s as me,r as w,Z as de,am as ce,o as n,c as fe,U as t,L as o,u as l,R as p,M as _,K as m,a as x,i as _e,Q as $,n as D}from"./@vue.821a47ec.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"./index.f292cd50.js";const Ce={class:"mt-4"},ve={class:"flex mt-4 justify-end"},be=S({name:"oaScheduleLists"}),lt=S({...be,setup(Fe){const C=me(),v=w(!1),k=w(null),b=w(!1),d=de({title:"",labor_type:""}),B=w([]),R=u=>{B.value=u.map(({id:e})=>e)},{dictData:L}=ue(""),{pager:f,getLists:F,resetParams:N,resetPage:O}=ae({fetchFun:re,params:d}),P=async()=>{var u;v.value=!0,await D(),(u=C.value)==null||u.open("add")},T=async u=>{var e,i;v.value=!0,await D(),(e=C.value)==null||e.open("edit"),(i=C.value)==null||i.setFormData(u)},U=async u=>{var i,c;let e=await ne({id:u});b.value=!0,await D(),(i=k.value)==null||i.open(),(c=k.value)==null||c.setFormData(e)},y=async u=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({id:u}),F()};return F(),(u,e)=>{const i=W,c=X,g=H,A=K,r=Y,I=ee,V=Q,M=le,s=Z,j=z,q=te,E=ce("perms"),G=J;return n(),fe("div",null,[t(V,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(I,{class:"mb-[-16px]",model:l(d),inline:""},{default:o(()=>[t(c,{label:"\u5DE5\u4F5C\u8BB0\u5F55\u4E3B\u9898",prop:"title"},{default:o(()=>[t(i,{class:"w-[280px]",modelValue:l(d).title,"onUpdate:modelValue":e[0]||(e[0]=a=>l(d).title=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u8BB0\u5F55\u4E3B\u9898"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u5DE5\u4F5C\u7C7B\u578B",prop:"labor_type",class:"w-[260px]"},{default:o(()=>[t(A,{modelValue:l(d).labor_type,"onUpdate:modelValue":e[1]||(e[1]=a=>l(d).labor_type=a),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5DE5\u4F5C\u7C7B\u578B",class:"flex-1"},{default:o(()=>[t(g,{label:"\u6848\u5934\u5DE5\u4F5C",value:1}),t(g,{label:"\u5916\u52E4\u5DE5\u4F5C",value:2})]),_:1},8,["modelValue"])]),_:1}),t(c,null,{default:o(()=>[t(r,{type:"primary",onClick:l(O)},{default:o(()=>e[7]||(e[7]=[p("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(r,{onClick:l(N)},{default:o(()=>e[8]||(e[8]=[p("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((n(),m(V,{class:"!border-none",shadow:"never"},{default:o(()=>[_((n(),m(r,{type:"primary",onClick:P},{icon:o(()=>[t(M,{name:"el-icon-Plus"})]),default:o(()=>[e[9]||(e[9]=p(" \u65B0\u589E "))]),_:1})),[[E,["works.rcbg.oa_schedule/add"]]]),_((n(),m(r,{disabled:!l(B).length,onClick:e[2]||(e[2]=a=>y(l(B)))},{default:o(()=>e[10]||(e[10]=[p(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[E,["works.rcbg.oa_schedule/delete"]]]),x("div",Ce,[t(j,{data:l(f).lists,onSelectionChange:R},{default:o(()=>[t(s,{type:"selection",width:"55"}),t(s,{label:"\u5DE5\u4F5C\u8BB0\u5F55\u4E3B\u9898",prop:"title","show-overflow-tooltip":""}),t(s,{label:"\u5F00\u59CB\u65F6\u95F4",prop:"start_time","show-overflow-tooltip":""}),t(s,{label:"\u7ED3\u675F\u65F6\u95F4",prop:"end_time","show-overflow-tooltip":""}),t(s,{label:"\u5DE5\u65F6",prop:"labor_time","show-overflow-tooltip":""}),t(s,{label:"\u5DE5\u4F5C\u7C7B\u578B",prop:"labor_type_text","show-overflow-tooltip":""}),t(s,{label:"\u63CF\u8FF0",prop:"remark","show-overflow-tooltip":""}),t(s,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:o(({row:a})=>[_((n(),m(r,{type:"primary",link:"",onClick:h=>T(a)},{default:o(()=>e[11]||(e[11]=[p(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[E,["works.rcbg.oa_schedule/edit"]]]),_((n(),m(r,{type:"danger",link:"",onClick:h=>y(a.id)},{default:o(()=>e[12]||(e[12]=[p(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[E,["works.rcbg.oa_schedule/delete"]]]),t(r,{type:"primary",link:"",onClick:h=>U(a.id)},{default:o(()=>e[13]||(e[13]=[p(" \u8BE6\u60C5 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),x("div",ve,[t(q,{modelValue:l(f),"onUpdate:modelValue":e[3]||(e[3]=a=>_e(f)?f.value=a:null),onChange:l(F)},null,8,["modelValue","onChange"])])]),_:1})),[[G,l(f).loading]]),l(v)?(n(),m(se,{key:0,ref_key:"editRef",ref:C,"dict-data":l(L),onSuccess:l(F),onClose:e[4]||(e[4]=a=>v.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),l(b)?(n(),m(pe,{key:1,ref_key:"detailRef",ref:k,onSuccess:e[5]||(e[5]=a=>b.value=!1),onClose:e[6]||(e[6]=a=>b.value=!1)},null,512)):$("",!0)])}}});export{lt as default};