2 lines
7.0 KiB
JavaScript
2 lines
7.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,_ 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 ue,a as ne}from"./index.8b1962e9.js";import{u as ie}from"./usePaging.f6660143.js";import{u as se}from"./useDictOptions.b5854a9e.js";import{_ as re,s as pe,a as de,b as ce}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.e6c2a3fa.js";import{d as R,a0 as x,s as L,r as B,ai as me,o as u,c as f,V as e,M as a,O as v,u as s,L as p,S as $,a as A,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 we from"./detail.3eb8c2a0.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"),Fe=d("\u91CD\u7F6E"),he=d(" \u65B0\u589E "),be=d(" \u5220\u9664 "),Be={class:"mt-4"},Ce={key:0},ke={key:1},De=d(" \u7F16\u8F91 "),ge=d(" \u5220\u9664 "),Ve={class:"flex justify-end mt-4"},xe=R({name:"projectLists"}),bt=R({...xe,setup(Le){x([]);const S=L(),E=L(),w=B(!1),C=B(!1),n=x({name:"",happen_time:"",device_accident:"",type:""}),h=B([]),U=i=>{h.value=i.map(({id:t})=>t)},{dictData:k}=se("refund_type"),{pager:_,getLists:y,resetParams:N,resetPage:T}=ie({fetchFun:pe,params:n}),j=async()=>{var i;w.value=!0,await P(),(i=E.value)==null||i.open("add")},M=async i=>{var c,r;console.log(i.id);let t=await de({id:i.id});w.value=!0,await P(),(c=E.value)==null||c.open("edit"),(r=E.value)==null||r.setFormData(t)},D=async i=>{await ue.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:i}),y()};return y(),(i,t)=>{const c=G,r=H,Y=K,m=Q,I=X,g=Z,q=ne,l=ee,J=te,O=oe,W=le,F=me("perms"),z=ae;return u(),f("div",null,[e(g,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(I,{class:"mb-[-16px]",model:n,inline:""},{default:a(()=>[e(r,{label:"\u4E8B\u6545\u7C7B\u578B",prop:"type"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:n.device_accident,"onUpdate:modelValue":t[0]||(t[0]=o=>n.device_accident=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E8B\u6545\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u8BBE\u5907\u4E8B\u6545",prop:"type"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:n.device_accident,"onUpdate:modelValue":t[1]||(t[1]=o=>n.device_accident=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u4E8B\u6545"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u4E8B\u6545\u540D\u79F0",prop:"name"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:n.name,"onUpdate:modelValue":t[2]||(t[2]=o=>n.name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E8B\u6545\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u53D1\u751F\u65F6\u95F4",prop:"require"},{default:a(()=>[e(Y,{class:"w-[280px]",modelValue:n.happen_time,"onUpdate:modelValue":t[3]||(t[3]=o=>n.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(m,{type:"primary",onClick:s(T)},{default:a(()=>[ye]),_:1},8,["onClick"]),e(m,{onClick:s(N)},{default:a(()=>[Fe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((u(),p(g,{class:"!border-none",shadow:"never"},{default:a(()=>[v((u(),p(m,{type:"primary",onClick:j},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[he]),_:1})),[[F,["safety.safety_accident/add"]]]),v((u(),p(m,{disabled:!h.value.length,onClick:t[4]||(t[4]=o=>D(h.value))},{default:a(()=>[be]),_:1},8,["disabled"])),[[F,["safety.safety_accident/delete"]]]),A("div",Be,[e(O,{data:s(_).lists,onSelectionChange:U},{default:a(()=>[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\u6545\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(l,{label:"\u53D1\u751F\u65F6\u95F4",prop:"happen_time","show-overflow-tooltip":""}),e(l,{label:"\u4E8B\u6545\u7C7B\u578B",prop:"type","show-overflow-tooltip":""}),e(l,{label:"\u8BBE\u5907\u4E8B\u6545",prop:"device_accident","show-overflow-tooltip":""}),e(l,{label:"\u627F\u5305\u5546\u4EBA\u5458",prop:"contractor_user","show-overflow-tooltip":""}),e(l,{label:"\u975E\u672C\u4F01\u4E1A\u4EBA\u5458",prop:"not_our_company_user","show-overflow-tooltip":""}),e(l,{label:"\u672C\u4F01\u4E1A\u4EBA\u5458",prop:"our_company_user","show-overflow-tooltip":""}),e(l,{label:"\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:a(({row:o})=>[o.file&&o.file.length>0?(u(),f("div",Ce,[(u(!0),f(_e,null,fe(o.file,(b,V)=>(u(),f("div",{key:V},[e(J,{href:b,target:"_blank"},{default:a(()=>[d("\u6587\u4EF6"+Ee(V+1)+"\u67E5\u770B",1)]),_:2},1032,["href"])]))),128))])):(u(),f("div",ke," \u6682\u65E0\u6587\u4EF6 "))]),_:1}),e(l,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:a(({row:o})=>[v((u(),p(m,{type:"primary",link:"",onClick:b=>M(o)},{default:a(()=>[De]),_:2},1032,["onClick"])),[[F,["safety.safety_accident/edit"]]]),v((u(),p(m,{type:"danger",link:"",onClick:b=>D(o.id)},{default:a(()=>[ge]),_:2},1032,["onClick"])),[[F,["safety.safety_accident/delete"]]])]),_:1})]),_:1},8,["data"])]),A("div",Ve,[e(W,{modelValue:s(_),"onUpdate:modelValue":t[5]||(t[5]=o=>ve(_)?_.value=o:null),onChange:s(y)},null,8,["modelValue","onChange"])])]),_:1})),[[z,s(_).loading]]),w.value?(u(),p(re,{key:0,ref_key:"editRef",ref:E,"dict-data":s(k),onSuccess:s(y),onClose:t[6]||(t[6]=o=>w.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),C.value?(u(),p(we,{key:1,ref_key:"detailRef",ref:S,"dict-data":s(k),onClose:t[7]||(t[7]=o=>C.value=!1)},null,8,["dict-data"])):$("",!0)])}}});export{bt as default};
|