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

2 lines
6.1 KiB
JavaScript

import{G as Q,H as X,y as Z,I as ee,J as te,w as oe,D as ae,C as le,L as se,M as ne,N as ue}from"./element-plus.517d4382.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as ie,a as pe}from"./index.8b1962e9.js";import{u as me}from"./usePaging.f6660143.js";import{a as de,u as ce}from"./useDictOptions.b5854a9e.js";import{a as _e,e as fe}from"./task_type.78685821.js";import{_ as ve}from"./edit.vue_vue_type_script_setup_true_name_taskTypeEdit_lang.c60355cb.js";import{f as T}from"./cost_project.d46e72b8.js";import{d as S,s as ke,r as g,a0 as Ee,ai as Ce,o as s,c as w,V as e,M as a,O as v,u,L as i,S as Fe,W as x,a8 as L,a as P,k as be,T as m,n as $}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.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";const ge=m("\u67E5\u8BE2"),he=m("\u91CD\u7F6E"),ye=m(" \u65B0\u589E "),we=m(" \u5220\u9664 "),Be={class:"mt-4"},De=m(" \u7F16\u8F91 "),Ve=m(" \u5220\u9664 "),Ae={class:"flex justify-end mt-4"},je=S({name:"taskTypeLists"}),Et=S({...je,setup(Te){const k=ke(),E=g(!1),h=g(!1),N=async l=>{h.value=!0;const t=await T({name:l!=null?l:""});B.projectList=t,h.value=!1},{optionsData:B}=de({projectList:{api:T}}),n=Ee({name:"",superior_sort:"",cost_project_id:"",start_time:"",end_time:""}),C=g(""),U=()=>{n.start_time=C.value[0],n.end_time=C.value[1]},y=g([]),I=l=>{y.value=l.map(({id:t})=>t)},{dictData:D}=ce("superior_category"),{pager:d,getLists:F,resetParams:M,resetPage:R}=me({fetchFun:_e,params:n}),Y=async()=>{var l;E.value=!0,await $(),(l=k.value)==null||l.open("add")},O=async l=>{var t,c;E.value=!0,await $(),(t=k.value)==null||t.open("edit"),(c=k.value)==null||c.setFormData(l)},V=async l=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:l}),F()};return F(),(l,t)=>{const c=Q,A=X,_=Z,G=ee,H=te,p=oe,J=ae,j=le,W=pe,r=se,q=ne,z=re,b=Ce("perms"),K=ue;return s(),w("div",null,[e(j,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(J,{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":N,loading:h.value,class:"flex-1"},{default:a(()=>[(s(!0),w(x,null,L(u(B).projectList,(o,f)=>(s(),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(()=>[(s(!0),w(x,null,L(u(D).superior_category,(o,f)=>(s(),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:U,"value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),e(_,null,{default:a(()=>[e(p,{type:"primary",onClick:u(R)},{default:a(()=>[ge]),_:1},8,["onClick"]),e(p,{onClick:u(M)},{default:a(()=>[he]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((s(),i(j,{class:"!border-none",shadow:"never"},{default:a(()=>[v((s(),i(p,{type:"primary",onClick:Y},{icon:a(()=>[e(W,{name:"el-icon-Plus"})]),default:a(()=>[ye]),_:1})),[[b,["task.task_type/add"]]]),v((s(),i(p,{disabled:!y.value.length,onClick:t[4]||(t[4]=o=>V(y.value))},{default:a(()=>[we]),_:1},8,["disabled"])),[[b,["task.task_type/delete"]]]),P("div",Be,[e(q,{data:u(d).lists,onSelectionChange:I},{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((s(),i(p,{type:"primary",link:"",onClick:f=>O(o)},{default:a(()=>[De]),_:2},1032,["onClick"])),[[b,["task.task_type/edit"]]]),v((s(),i(p,{type:"danger",link:"",onClick:f=>V(o.id)},{default:a(()=>[Ve]),_:2},1032,["onClick"])),[[b,["task.task_type/delete"]]])]),_:1})]),_:1},8,["data"])]),P("div",Ae,[e(z,{modelValue:u(d),"onUpdate:modelValue":t[5]||(t[5]=o=>be(d)?d.value=o:null),onChange:u(F)},null,8,["modelValue","onChange"])])]),_:1})),[[K,u(d).loading]]),E.value?(s(),i(ve,{key:0,ref_key:"editRef",ref:k,"dict-data":u(D),onSuccess:u(F),onClose:t[6]||(t[6]=o=>E.value=!1)},null,8,["dict-data","onSuccess"])):Fe("",!0)])}}});export{Et as default};