engineering/public/admin/assets/index.715509f6.js
2024-02-27 10:28:16 +08:00

2 lines
6.5 KiB
JavaScript

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