2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
import{G as Z,H as ee,y as te,I as oe,J as ae,w as le,D as se,C as ne,L as ue,M as re,N as ie}from"./element-plus.258bf9e7.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as me,a as de}from"./index.ec401e3b.js";import{_ as ce}from"./index.vue_vue_type_style_index_0_lang.e91ff55f.js";import{u as _e}from"./usePaging.f6660143.js";import{a as fe,u as ve}from"./useDictOptions.c644f395.js";import{a as x,e as ke}from"./task_type.9e05f637.js";import{_ as Ee}from"./edit.vue_vue_type_script_setup_true_name_taskTypeEdit_lang.46ecfb63.js";import{f as T}from"./cost_project.2762b876.js";import{d as N,s as Ce,r as g,a0 as Fe,ai as be,o as u,c as w,V as e,M as a,O as v,u as s,L as i,S as ge,W as L,a8 as P,a as $,k as he,T as d,n as S}from"./@vue.ab566ce7.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"./lodash.1d82ee7c.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.9492d03b.js";const ye=d("\u67E5\u8BE2"),we=d("\u91CD\u7F6E"),Be=d(" \u65B0\u589E "),De=d(" \u5220\u9664 "),Ve={class:"mt-4"},Ae=d(" \u7F16\u8F91 "),je=d(" \u5220\u9664 "),xe={class:"flex justify-end mt-4"},Te=N({name:"taskTypeLists"}),bt=N({...Te,setup(Le){const k=Ce(),E=g(!1),h=g(!1),U=async l=>{h.value=!0;const t=await T({name:l!=null?l:""});B.projectList=t,h.value=!1},{optionsData:B}=fe({projectList:{api:T}}),n=Fe({name:"",superior_sort:"",cost_project_id:"",start_time:"",end_time:""}),C=g(""),I=()=>{n.start_time=C.value[0],n.end_time=C.value[1]},y=g([]),M=l=>{y.value=l.map(({id:t})=>t)},{dictData:D}=ve("superior_category"),{pager:p,getLists:F,resetParams:R,resetPage:Y}=_e({fetchFun:x,params:n}),z=async()=>{var l;E.value=!0,await S(),(l=k.value)==null||l.open("add")},O=async l=>{var t,c;E.value=!0,await S(),(t=k.value)==null||t.open("edit"),(c=k.value)==null||c.setFormData(l)},V=async l=>{await me.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ke({id:l}),F()};return F(),(l,t)=>{const c=Z,A=ee,_=te,G=oe,H=ae,m=le,J=ce,W=se,j=ne,q=de,r=ue,K=re,Q=pe,b=be("perms"),X=ie;return u(),w("div",null,[e(j,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(W,{class:"mb-[-16px]",model:n,inline:""},{default:a(()=>[e(_,{label:"\u6240\u5C5E\u9879\u76EE",prop:"cost_project_id"},{default:a(()=>[e(A,{modelValue:n.cost_project_id,"onUpdate:modelValue":t[0]||(t[0]=o=>n.cost_project_id=o),remote:"",filterable:"","remote-method":U,loading:h.value,class:"flex-1"},{default:a(()=>[(u(!0),w(L,null,P(s(B).projectList,(o,f)=>(u(),i(c,{key:f,label:o.projectinfo,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(_,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"unit_name"},{default:a(()=>[e(G,{class:"w-[280px]",modelValue:n.name,"onUpdate:modelValue":t[1]||(t[1]=o=>n.name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u4E0A\u7EA7\u7C7B\u522B",prop:"qualification_grade"},{default:a(()=>[e(A,{class:"flex-1",modelValue:n.superior_sort,"onUpdate:modelValue":t[2]||(t[2]=o=>n.superior_sort=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4E0A\u7EA7\u7C7B\u522B"},{default:a(()=>[(u(!0),w(L,null,P(s(D).superior_category,(o,f)=>(u(),i(c,{key:f,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"\u65F6\u95F4\u6BB5"},{default:a(()=>[e(H,{modelValue:C.value,"onUpdate:modelValue":t[3]||(t[3]=o=>C.value=o),type:"daterange","unlink-panels":"","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",onChange:I,"value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),e(_,null,{default:a(()=>[e(m,{type:"primary",onClick:s(Y)},{default:a(()=>[ye]),_:1},8,["onClick"]),e(m,{onClick:s(R)},{default:a(()=>[we]),_:1},8,["onClick"]),e(J,{class:"ml-2.5","fetch-fun":s(x),params:n,"page-size":s(p).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),v((u(),i(j,{class:"!border-none",shadow:"never"},{default:a(()=>[v((u(),i(m,{type:"primary",onClick:z},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[Be]),_:1})),[[b,["task.task_type/add"]]]),v((u(),i(m,{disabled:!y.value.length,onClick:t[4]||(t[4]=o=>V(y.value))},{default:a(()=>[De]),_:1},8,["disabled"])),[[b,["task.task_type/delete"]]]),$("div",Ve,[e(K,{data:s(p).lists,onSelectionChange:M},{default:a(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"\u6807\u8BC6",prop:"dataid","show-overflow-tooltip":""}),e(r,{label:"\u4EFB\u52A1\u7F16\u53F7",prop:"num","show-overflow-tooltip":""}),e(r,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(r,{label:"\u4E0A\u7EA7\u7C7B\u522B",prop:"superior_sort","show-overflow-tooltip":""}),e(r,{label:"\u4EFB\u52A1\u7EA7\u6B21",prop:"level","show-overflow-tooltip":""}),e(r,{label:"\u5907\u6CE8",prop:"remarks","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:o})=>[v((u(),i(m,{type:"primary",link:"",onClick:f=>O(o)},{default:a(()=>[Ae]),_:2},1032,["onClick"])),[[b,["task.task_type/edit"]]]),v((u(),i(m,{type:"danger",link:"",onClick:f=>V(o.id)},{default:a(()=>[je]),_:2},1032,["onClick"])),[[b,["task.task_type/delete"]]])]),_:1})]),_:1},8,["data"])]),$("div",xe,[e(Q,{modelValue:s(p),"onUpdate:modelValue":t[5]||(t[5]=o=>he(p)?p.value=o:null),onChange:s(F)},null,8,["modelValue","onChange"])])]),_:1})),[[X,s(p).loading]]),E.value?(u(),i(Ee,{key:0,ref_key:"editRef",ref:k,"dict-data":s(D),onSuccess:s(F),onClose:t[6]||(t[6]=o=>E.value=!1)},null,8,["dict-data","onSuccess"])):ge("",!0)])}}});export{bt as default};
|