2 lines
5.2 KiB
JavaScript
2 lines
5.2 KiB
JavaScript
import{I as q,y as O,w as W,D as z,C as G,L as H,_ as J,M as K,N as Q}from"./element-plus.517d4382.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as Y,a as Z}from"./index.8b1962e9.js";import{u as ee}from"./usePaging.f6660143.js";import{u as te}from"./useDictOptions.b5854a9e.js";import{_ as oe,a as ae,b as le}from"./edit.vue_vue_type_script_setup_true_name_taskAllocationEdit_lang.af80577a.js";import{d as V,s as ne,r as D,a0 as se,ai as ie,o as l,c,V as e,M as t,O as d,u as i,L as p,S as re,a as B,W as ue,a8 as pe,k as me,T as r,n as x,U as ce}from"./@vue.ab566ce7.js";import"./lodash.1d82ee7c.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_style_index_0_lang.c7aef442.js";import"./common.9d529cba.js";import"./task_type.78685821.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./cost_project.d46e72b8.js";import"./index.e6dda1f5.js";import"./index.b17dae19.js";const de=r("\u67E5\u8BE2"),_e=r("\u91CD\u7F6E"),fe=r(" \u65B0\u589E "),ke=r(" \u5220\u9664 "),ve={class:"mt-4"},Ee={key:0},he={key:1},Fe=r(" \u7F16\u8F91 "),Ce=r(" \u5220\u9664 "),be={class:"flex justify-end mt-4"},we=V({name:"taskAllocationLists"}),ft=V({...we,setup(ye){const _=ne(),f=D(!1),k=se({project:""}),F=D([]),j=n=>{F.value=n.map(({id:o})=>o)},{dictData:L}=te("task_type,major_type"),{pager:m,getLists:v,resetParams:T,resetPage:$}=ee({fetchFun:ae,params:k}),A=async()=>{var n;f.value=!0,await x(),(n=_.value)==null||n.open("add")},S=async n=>{var o,E;f.value=!0,await x(),(o=_.value)==null||o.open("edit"),(E=_.value)==null||E.setFormData(n)},b=async n=>{await Y.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await le({id:n}),v()};return v(),(n,o)=>{const E=q,w=O,u=W,N=z,y=G,P=Z,s=H,R=J,I=K,U=X,h=ie("perms"),M=Q;return l(),c("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(N,{class:"mb-[-16px]",model:k,inline:""},{default:t(()=>[e(w,{label:"\u9879\u76EE\u540D\u79F0",prop:"project"},{default:t(()=>[e(E,{class:"w-[280px]",modelValue:k.project,"onUpdate:modelValue":o[0]||(o[0]=a=>k.project=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(w,null,{default:t(()=>[e(u,{type:"primary",onClick:i($)},{default:t(()=>[de]),_:1},8,["onClick"]),e(u,{onClick:i(T)},{default:t(()=>[_e]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),d((l(),p(y,{class:"!border-none",shadow:"never"},{default:t(()=>[d((l(),p(u,{type:"primary",onClick:A},{icon:t(()=>[e(P,{name:"el-icon-Plus"})]),default:t(()=>[fe]),_:1})),[[h,["task.task_allocation/add"]]]),d((l(),p(u,{disabled:!F.value.length,onClick:o[1]||(o[1]=a=>b(F.value))},{default:t(()=>[ke]),_:1},8,["disabled"])),[[h,["task.task_allocation/delete"]]]),B("div",ve,[e(I,{data:i(m).lists,onSelectionChange:j},{default:t(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"\u5355\u636E\u7F16\u53F7",prop:"num","show-overflow-tooltip":""}),e(s,{label:"\u9879\u76EE\u540D\u79F0",prop:"project","show-overflow-tooltip":""}),e(s,{label:"\u9879\u76EE\u7F16\u53F7",prop:"project_num","show-overflow-tooltip":""}),e(s,{label:"\u9879\u76EE\u8D1F\u8D23\u4EBA",prop:"head","show-overflow-tooltip":""}),e(s,{label:"\u767B\u8BB0\u65E5\u671F",prop:"apptime","show-overflow-tooltip":""}),e(s,{label:"\u9644\u4EF6",prop:"annex","show-overflow-tooltip":""},{default:t(({row:a})=>[a.annex&&a.annex.length>0?(l(),c("div",Ee,[(l(!0),c(ue,null,pe(a.annex,(C,g)=>(l(),c("div",{key:g},[e(R,{href:C,target:"_blank"},{default:t(()=>[r("\u6587\u4EF6"+ce(g+1)+"\u67E5\u770B",1)]),_:2},1032,["href"])]))),128))])):(l(),c("div",he," \u6682\u65E0\u6587\u4EF6 "))]),_:1}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:a})=>[d((l(),p(u,{type:"primary",link:"",onClick:C=>S(a)},{default:t(()=>[Fe]),_:2},1032,["onClick"])),[[h,["task.task_allocation/edit"]]]),d((l(),p(u,{type:"danger",link:"",onClick:C=>b(a.id)},{default:t(()=>[Ce]),_:2},1032,["onClick"])),[[h,["task.task_allocation/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",be,[e(U,{modelValue:i(m),"onUpdate:modelValue":o[2]||(o[2]=a=>me(m)?m.value=a:null),onChange:i(v)},null,8,["modelValue","onChange"])])]),_:1})),[[M,i(m).loading]]),f.value?(l(),p(oe,{key:0,ref_key:"editRef",ref:_,"dict-data":i(L),onSuccess:i(v),onClose:o[3]||(o[3]=a=>f.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0)])}}});export{ft as default};
|