2 lines
7.5 KiB
JavaScript
2 lines
7.5 KiB
JavaScript
import{I as Q,y as X,G as Y,H as Z,w as ee,D as te,C as le,L as oe,M as ae,N as ue}from"./element-plus.e49c119c.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.8c9f8a22.js";import{f as ne,a as ie}from"./index.0aba8d1b.js";import{u as re}from"./usePaging.f6660143.js";import{u as de}from"./useDictOptions.f0a47c79.js";import{d as pe,a as g,e as ce}from"./project_cost_temp_set.2e67266e.js";import{d as L,a0 as x,s as A,r as D,ai as me,o as i,c as $,V as e,M as o,O as _,u as d,L as p,S as U,W as _e,a8 as Ee,a as P,T as c,U as fe,k as ve,n as V}from"./@vue.ab566ce7.js";import"./lodash.86334a69.js";import{_ as be}from"./edit.vue_vue_type_script_setup_true_name_procurementContractEdit_lang.d1373a3c.js";import{_ as je}from"./detail.vue_vue_type_style_index_0_lang.ffb81e9a.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.8497a500.js";import"./lodash-es.49f4af13.js";import"./dayjs.5571e62a.js";import"./axios.9ce976cc.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.156d1593.js";import"./color.4188bfef.js";import"./clone.a0efef30.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ca37accd.js";import"./ms.a9ae1d6d.js";import"./nprogress.30953505.js";import"./vue-clipboard3.4e4a29c9.js";import"./clipboard.1a812829.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.4e8ca2f8.js";import"./projecttype.7bdf04aa.js";import"./custom.ec06ae29.js";const Ce=c("\u67E5\u8BE2"),De=c("\u91CD\u7F6E"),Fe=c(" \u65B0\u589E "),we=c(" \u5220\u9664 "),he={class:"mt-4"},Ve=c(" \u7F16\u8F91 "),ye=c(" \u5220\u9664 "),ke=c(" \u8BE6\u60C5 "),Be={class:"flex justify-end mt-4"},ge=L({name:"projectLists"}),jt=L({...ge,setup(xe){x([]);const F=A(),v=A(),b=D(!1),w=D(!1),S=D([{name:"\u662F",id:1},{name:"\u5426",id:2}]),a=x({project_type_name:"",subject_code:"",first_level_subject:"",second_level_subject:"",third_level_subject:"",unit:"",is_travel:""}),h=D([]),R=s=>{h.value=s.map(({id:t})=>t)},{dictData:y}=de(""),{pager:E,getLists:j,resetParams:N,resetPage:T}=re({fetchFun:pe,params:a}),I=async()=>{var s;b.value=!0,await V(),(s=v.value)==null||s.open("add")},M=async s=>{var n,u;console.log(s.id);let t=await g({id:s.id});b.value=!0,await V(),(n=v.value)==null||n.open("edit"),(u=v.value)==null||u.setFormData(t)},k=async s=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:s}),j()},O=async s=>{var n,u;let t=await g({id:s.id});w.value=!0,await V(),(n=F.value)==null||n.open(),(u=F.value)==null||u.setFormData(t)};return j(),(s,t)=>{const n=Q,u=X,q=Y,G=Z,m=ee,H=te,B=le,W=ie,r=oe,z=ae,J=se,f=me("perms"),K=ue;return i(),$("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(H,{class:"mb-[-16px]",model:a,inline:""},{default:o(()=>[e(u,{label:"\u9879\u76EE\u7C7B\u578B\u540D\u79F0",prop:"project_type_name"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:a.project_type_name,"onUpdate:modelValue":t[0]||(t[0]=l=>a.project_type_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u7C7B\u578B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u79D1\u76EE\u7F16\u7801",prop:"subject_code"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:a.subject_code,"onUpdate:modelValue":t[1]||(t[1]=l=>a.subject_code=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79D1\u76EE\u7F16\u7801"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u4E00\u7EA7\u79D1\u76EE",prop:"first_level_subject"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:a.first_level_subject,"onUpdate:modelValue":t[2]||(t[2]=l=>a.first_level_subject=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E00\u7EA7\u79D1\u76EE"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u4E8C\u7EA7\u79D1\u76EE",prop:"second_level_subject"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:a.second_level_subject,"onUpdate:modelValue":t[3]||(t[3]=l=>a.second_level_subject=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E8C\u7EA7\u79D1\u76EE"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u4E09\u7EA7\u79D1\u76EE",prop:"third_level_subject"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:a.third_level_subject,"onUpdate:modelValue":t[4]||(t[4]=l=>a.third_level_subject=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E8C\u7EA7\u79D1\u76EE"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5355\u4F4D",prop:"unit"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:a.unit,"onUpdate:modelValue":t[5]||(t[5]=l=>a.unit=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5DEE\u65C5\u79D1\u76EE",prop:"unit"},{default:o(()=>[e(G,{class:"w-[280px]",modelValue:a.is_travel,"onUpdate:modelValue":t[6]||(t[6]=l=>a.is_travel=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u7684\u662F\u5426\u5C5E\u4E8E\u5DEE\u65C5\u79D1\u76EE"},{default:o(()=>[(i(!0),$(_e,null,Ee(S.value,(l,C)=>(i(),p(q,{key:C,label:l.name,value:parseInt(l.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:o(()=>[e(m,{type:"primary",onClick:d(T)},{default:o(()=>[Ce]),_:1},8,["onClick"]),e(m,{onClick:d(N)},{default:o(()=>[De]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),p(B,{class:"!border-none",shadow:"never"},{default:o(()=>[_((i(),p(m,{type:"primary",onClick:I},{icon:o(()=>[e(W,{name:"el-icon-Plus"})]),default:o(()=>[Fe]),_:1})),[[f,["project.project/add"]]]),_((i(),p(m,{disabled:!h.value.length,onClick:t[7]||(t[7]=l=>k(h.value))},{default:o(()=>[we]),_:1},8,["disabled"])),[[f,["project.project/delete"]]]),P("div",he,[e(z,{data:d(E).lists,onSelectionChange:R},{default:o(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(r,{label:"\u9879\u76EE\u7C7B\u578B",prop:"project_type_name","show-overflow-tooltip":""}),e(r,{label:"\u79D1\u76EE\u7F16\u7801",prop:"subject_code","show-overflow-tooltip":""}),e(r,{label:"\u4E00\u7EA7\u79D1\u76EE",prop:"first_level_subject","show-overflow-tooltip":""}),e(r,{label:"\u4E8C\u7EA7\u79D1\u76EE",prop:"second_level_subject","show-overflow-tooltip":""}),e(r,{label:"\u4E09\u7EA7\u79D1\u76EE",prop:"third_level_subject","show-overflow-tooltip":""}),e(r,{label:"\u5355\u4F4D",prop:"unit","show-overflow-tooltip":""}),e(r,{label:"\u5DEE\u65C5\u79D1\u76EE","show-overflow-tooltip":""},{default:o(({row:l})=>[c(fe(l.is_travel==1?"\u662F":"\u5426"),1)]),_:1}),e(r,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:o(({row:l})=>[_((i(),p(m,{type:"primary",link:"",onClick:C=>M(l)},{default:o(()=>[Ve]),_:2},1032,["onClick"])),[[f,["project.project/edit"]]]),_((i(),p(m,{type:"danger",link:"",onClick:C=>k(l.id)},{default:o(()=>[ye]),_:2},1032,["onClick"])),[[f,["project.project/delete"]]]),_((i(),p(m,{link:"",onClick:C=>O(l)},{default:o(()=>[ke]),_:2},1032,["onClick"])),[[f,["project.project/detail"]]])]),_:1})]),_:1},8,["data"])]),P("div",Be,[e(J,{modelValue:d(E),"onUpdate:modelValue":t[8]||(t[8]=l=>ve(E)?E.value=l:null),onChange:d(j)},null,8,["modelValue","onChange"])])]),_:1})),[[K,d(E).loading]]),b.value?(i(),p(be,{key:0,ref_key:"editRef",ref:v,"dict-data":d(y),onSuccess:d(j),onClose:t[9]||(t[9]=l=>b.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),w.value?(i(),p(je,{key:1,ref_key:"detailRef",ref:F,"dict-data":d(y),onClose:t[10]||(t[10]=l=>w.value=!1)},null,8,["dict-data"])):U("",!0)])}}});export{jt as default};
|