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

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