2 lines
6.0 KiB
JavaScript
2 lines
6.0 KiB
JavaScript
import{I as H,y as J,w as K,D as Q,C as X,L as Y,_ as Z,M as ee,N as te}from"./element-plus.517d4382.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as ae,a as le}from"./index.8b1962e9.js";import{u as se}from"./usePaging.f6660143.js";import{u as re}from"./useDictOptions.b5854a9e.js";import{_ as ie,s as ne,a as ue,b as pe}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.69f646b1.js";import{d as R,a0 as x,s as j,r as b,ai as de,o as s,c as f,V as e,M as t,O as v,u as i,L as n,S as L,a as $,W as me,a8 as ce,k as _e,T as u,n as P,U as fe}from"./@vue.ab566ce7.js";import"./lodash.1d82ee7c.js";import ve from"./detail.87c84d13.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 Ee=u("\u67E5\u8BE2"),ye=u("\u91CD\u7F6E"),ge=u(" \u65B0\u589E "),he=u(" \u5220\u9664 "),we={class:"mt-4"},Ce={key:0},be={key:1},ke=u(" \u7F16\u8F91 "),Fe=u(" \u5220\u9664 "),Be={class:"flex justify-end mt-4"},De=R({name:"projectLists"}),gt=R({...De,setup(Ve){x([]);const S=j(),E=j(),y=b(!1),k=b(!1),p=x({project_type:"",target:""}),w=b([]),N=r=>{w.value=r.map(({id:o})=>o)},{dictData:F}=re("refund_type"),{pager:c,getLists:g,resetParams:T,resetPage:U}=se({fetchFun:ne,params:p}),A=async()=>{var r;y.value=!0,await P(),(r=E.value)==null||r.open("add")},I=async r=>{var _,d;console.log(r.id);let o=await ue({id:r.id});y.value=!0,await P(),(_=E.value)==null||_.open("edit"),(d=E.value)==null||d.setFormData(o)},B=async r=>{await ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:r}),g()};return g(),(r,o)=>{const _=H,d=J,m=K,q=Q,D=X,M=le,l=Y,O=Z,W=ee,z=oe,h=de("perms"),G=te;return s(),f("div",null,[e(D,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(q,{class:"mb-[-16px]",model:p,inline:""},{default:t(()=>[e(d,{label:"\u9879\u76EE\u7C7B\u522B",prop:"project_type"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:p.project_type,"onUpdate:modelValue":o[0]||(o[0]=a=>p.project_type=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u7C7B\u522B"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5B89\u5168\u76EE\u6807",prop:"target"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:p.target,"onUpdate:modelValue":o[1]||(o[1]=a=>p.target=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5B89\u5168\u76EE\u6807"},null,8,["modelValue"])]),_:1}),e(d,null,{default:t(()=>[e(m,{type:"primary",onClick:i(U)},{default:t(()=>[Ee]),_:1},8,["onClick"]),e(m,{onClick:i(T)},{default:t(()=>[ye]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((s(),n(D,{class:"!border-none",shadow:"never"},{default:t(()=>[v((s(),n(m,{type:"primary",onClick:A},{icon:t(()=>[e(M,{name:"el-icon-Plus"})]),default:t(()=>[ge]),_:1})),[[h,["safety.safety_target/add"]]]),v((s(),n(m,{disabled:!w.value.length,onClick:o[2]||(o[2]=a=>B(w.value))},{default:t(()=>[he]),_:1},8,["disabled"])),[[h,["safety.safety_target/delete"]]]),$("div",we,[e(W,{data:i(c).lists,onSelectionChange:N},{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\u7C7B\u522B",prop:"project_type","show-overflow-tooltip":""}),e(l,{label:"\u5B89\u5168\u76EE\u6807",prop:"target","show-overflow-tooltip":""}),e(l,{label:"\u57FA\u672C\u8981\u6C42",prop:"require","show-overflow-tooltip":""}),e(l,{label:"\u76EE\u6807\u89C4\u8303",prop:"target_standard","show-overflow-tooltip":""}),e(l,{label:"\u5408\u683C\u7387",prop:"pass_rate","show-overflow-tooltip":""}),e(l,{label:"\u5141\u8BB8\u504F\u5DEE",prop:"deviation","show-overflow-tooltip":""}),e(l,{label:"\u9644\u4EF6",prop:"file","show-overflow-tooltip":""},{default:t(({row:a})=>[a.file&&a.file.length>0?(s(),f("div",Ce,[(s(!0),f(me,null,ce(a.file,(C,V)=>(s(),f("div",{key:V},[e(O,{href:C,target:"_blank"},{default:t(()=>[u("\u6587\u4EF6"+fe(V+1)+"\u67E5\u770B",1)]),_:2},1032,["href"])]))),128))])):(s(),f("div",be," \u6682\u65E0\u6587\u4EF6 "))]),_:1}),e(l,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:t(({row:a})=>[v((s(),n(m,{type:"primary",link:"",onClick:C=>I(a)},{default:t(()=>[ke]),_:2},1032,["onClick"])),[[h,["safety.safety_target/edit"]]]),v((s(),n(m,{type:"danger",link:"",onClick:C=>B(a.id)},{default:t(()=>[Fe]),_:2},1032,["onClick"])),[[h,["safety.safety_target/delete"]]])]),_:1})]),_:1},8,["data"])]),$("div",Be,[e(z,{modelValue:i(c),"onUpdate:modelValue":o[3]||(o[3]=a=>_e(c)?c.value=a:null),onChange:i(g)},null,8,["modelValue","onChange"])])]),_:1})),[[G,i(c).loading]]),y.value?(s(),n(ie,{key:0,ref_key:"editRef",ref:E,"dict-data":i(F),onSuccess:i(g),onClose:o[4]||(o[4]=a=>y.value=!1)},null,8,["dict-data","onSuccess"])):L("",!0),k.value?(s(),n(ve,{key:1,ref_key:"detailRef",ref:S,"dict-data":i(F),onClose:o[5]||(o[5]=a=>k.value=!1)},null,8,["dict-data"])):L("",!0)])}}});export{gt as default};
|