2 lines
6.0 KiB
JavaScript
2 lines
6.0 KiB
JavaScript
import{I as G,y as H,J as K,w as Q,D as X,C as Z,L as ee,a2 as te,M as oe,N as ae}from"./element-plus.258bf9e7.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as ne,a as ie}from"./index.ec401e3b.js";import{u as se}from"./usePaging.f6660143.js";import{u as ue}from"./useDictOptions.c644f395.js";import{_ as re,s as pe,a as me,b as de}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.4722e412.js";import{d as S,a0 as x,s as L,r as b,ai as ce,o as n,c as _,V as e,M as t,O as f,u as s,L as u,S as $,a as P,W as _e,a8 as fe,k as ve,T as r,n as R,U as Ee}from"./@vue.ab566ce7.js";import"./lodash.1d82ee7c.js";import Fe from"./detail.ebb39588.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.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.vue_vue_type_script_setup_true_lang.5a5f706a.js";import"./project.bccf4059.js";import"./index.9492d03b.js";import"./department.1c914e1a.js";import"./organization.f0387125.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./custom.13e75d58.js";const he=r("\u67E5\u8BE2"),ye=r("\u91CD\u7F6E"),ke=r(" \u65B0\u589E "),we=r(" \u5220\u9664 "),be={class:"mt-4"},Ce={key:0},De={key:1},ge=r(" \u7F16\u8F91 "),Be=r(" \u5220\u9664 "),Ve={class:"flex justify-end mt-4"},xe=S({name:"projectLists"}),wt=S({...xe,setup(Le){x([]);const N=L(),v=L(),E=b(!1),C=b(!1),p=x({name:"",happen_time:""}),k=b([]),T=i=>{k.value=i.map(({id:o})=>o)},{dictData:D}=ue("refund_type"),{pager:c,getLists:F,resetParams:j,resetPage:M}=se({fetchFun:pe,params:p}),U=async()=>{var i;E.value=!0,await R(),(i=v.value)==null||i.open("add")},Y=async i=>{var h,m;console.log(i.id);let o=await me({id:i.id});E.value=!0,await R(),(h=v.value)==null||h.open("edit"),(m=v.value)==null||m.setFormData(o)},g=async i=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:i}),F()};return F(),(i,o)=>{const h=G,m=H,I=K,d=Q,q=X,B=Z,A=ie,l=ee,J=te,O=oe,W=le,y=ce("perms"),z=ae;return n(),_("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(q,{class:"mb-[-16px]",model:p,inline:""},{default:t(()=>[e(m,{label:"\u4E8B\u4EF6\u540D\u79F0",prop:"name"},{default:t(()=>[e(h,{modelValue:p.name,"onUpdate:modelValue":o[0]||(o[0]=a=>p.name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u53D1\u751F\u65F6\u95F4",prop:"require"},{default:t(()=>[e(I,{modelValue:p.happen_time,"onUpdate:modelValue":o[1]||(o[1]=a=>p.happen_time=a),clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u53D1\u751F\u65F6\u95F4"},null,8,["modelValue"])]),_:1}),e(m,null,{default:t(()=>[e(d,{type:"primary",onClick:s(M)},{default:t(()=>[he]),_:1},8,["onClick"]),e(d,{onClick:s(j)},{default:t(()=>[ye]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((n(),u(B,{class:"!border-none",shadow:"never"},{default:t(()=>[f((n(),u(d,{type:"primary",onClick:U},{icon:t(()=>[e(A,{name:"el-icon-Plus"})]),default:t(()=>[ke]),_:1})),[[y,["safety.safety_event/add"]]]),f((n(),u(d,{disabled:!k.value.length,onClick:o[2]||(o[2]=a=>g(k.value))},{default:t(()=>[we]),_:1},8,["disabled"])),[[y,["safety.safety_event/delete"]]]),P("div",be,[e(O,{data:s(c).lists,onSelectionChange:T},{default:t(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(l,{label:"\u7EC4\u7EC7\u540D\u79F0",prop:"org_name","show-overflow-tooltip":""}),e(l,{label:"\u90E8\u95E8\u540D\u79F0",prop:"dept_name","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(l,{label:"\u4E8B\u4EF6\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(l,{label:"\u53D1\u751F\u65F6\u95F4",prop:"happen_time","show-overflow-tooltip":""}),e(l,{label:"\u4E8B\u4EF6\u5185\u5BB9",prop:"content","show-overflow-tooltip":""}),e(l,{label:"\u5907\u6CE8",prop:"remark","show-overflow-tooltip":""}),e(l,{label:"\u9644\u4EF6",prop:"file","show-overflow-tooltip":""},{default:t(({row:a})=>[a.file&&a.file.length>0?(n(),_("div",Ce,[(n(!0),_(_e,null,fe(a.file,(w,V)=>(n(),_("div",{key:V},[e(J,{href:w,target:"_blank"},{default:t(()=>[r("\u6587\u4EF6"+Ee(V+1)+"\u67E5\u770B",1)]),_:2},1032,["href"])]))),128))])):(n(),_("div",De," \u6682\u65E0\u6587\u4EF6 "))]),_:1}),e(l,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:t(({row:a})=>[f((n(),u(d,{type:"primary",link:"",onClick:w=>Y(a)},{default:t(()=>[ge]),_:2},1032,["onClick"])),[[y,["safety.safety_event/edit"]]]),f((n(),u(d,{type:"danger",link:"",onClick:w=>g(a.id)},{default:t(()=>[Be]),_:2},1032,["onClick"])),[[y,["safety.safety_event/delete"]]])]),_:1})]),_:1},8,["data"])]),P("div",Ve,[e(W,{modelValue:s(c),"onUpdate:modelValue":o[3]||(o[3]=a=>ve(c)?c.value=a:null),onChange:s(F)},null,8,["modelValue","onChange"])])]),_:1})),[[z,s(c).loading]]),E.value?(n(),u(re,{key:0,ref_key:"editRef",ref:v,"dict-data":s(D),onSuccess:s(F),onClose:o[4]||(o[4]=a=>E.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),C.value?(n(),u(Fe,{key:1,ref_key:"detailRef",ref:N,"dict-data":s(D),onClose:o[5]||(o[5]=a=>C.value=!1)},null,8,["dict-data"])):$("",!0)])}}});export{wt as default};
|