You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
4.2KB

  1. import{G as q,E as Y,y as F,a as V,r as m,o as H,b as n,c,L as h,h as a,e as p,f as e,u as _,j as g,i as N,d as x,k as J,s as K}from"./index-dd5fae99.js";import{E as Q}from"./index-29b4120c.js";import{l as W,b as X}from"./projectCollectionEnter-718f1371.js";import{g as y,a as Z}from"./getIsShowRegionTree-21a24141.js";const ee={class:"px-20 pt-10 pb-20 w-full"},ae={class:"flex"},te={class:"flex justify-between items-center"},le=["onClick"],oe=["onClick"],ne=["onClick"],re=J({name:"projectCollection"}),pe=Object.assign(re,{setup(se){const G=q(Y.userStore).userInfo,{proxy:w}=K(),O=F(),r=V({projectName:void 0,buildOrg:void 0}),d=m(),C=m(0),T=V([{label:"序号",type:"index",width:"60"},{label:"项目编号",key:"baseProjId",prop:"baseProjId"},{label:"项目名称",key:"baseProjName",prop:"baseProjName"},{label:"建设单位",key:"baseBuildDeprt",prop:"baseBuildDeprt"},{label:"行政区划",key:"baseAreaName",prop:"baseAreaName"},{label:"预算年度",key:"baseProjSetYear",prop:"baseProjSetYear",width:"80"},{label:"操作",slot:"action",width:"160",fixed:"right"}]),I=m([]),f=m(),D=o=>{f.value=o.regionLevel===3?o.regionCode:void 0,d.value.pageParams.pageNumber=1,u()},s=m("1"),M=o=>{s.value=o,k()},u=async(o=d.value.pageParams)=>{const t=await W(s.value,{...o,...r,regionCode:f.value});I.value=t.data.records,C.value=t.data.total},S=()=>{u()},k=()=>{r.projectName=void 0,r.buildOrg=void 0,d.value.pageParams.pageNumber=1,d.value.pageParams.pageSize=10,u()},$=o=>{w.$messageBox.confirm("确定要删除该项吗?","提示!",{type:"warning"}).then(async()=>{await X(s.value,s.value==="1"?o.baseProjId:o.draftId),w.$message.success("删除成功!"),await u()})};return H(()=>{y(["SUPER_ADMIN","REGION_MANAGER"])||(f.value=G.value.regionCode,u(d.value.pageParams))}),(o,t)=>{const i=n("el-col"),j=n("el-input"),b=n("el-form-item"),v=n("el-button"),P=n("el-row"),B=n("el-form"),E=n("el-card"),R=n("el-tab-pane"),U=n("el-tabs"),L=n("table-list"),z=n("el-container");return c(),h(z,{class:"overflow-y-auto"},{default:a(()=>[p("div",ee,[e(P,null,{default:a(()=>[_(y)(["SUPER_ADMIN","REGION_MANAGER"])?(c(),h(i,{key:0,span:4,class:"pr-16"},{default:a(()=>[e(Q,{params:_(Z)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:D},null,8,["params"])]),_:1})):g("",!0),e(i,{span:_(y)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:a(()=>[e(E,{class:"w-full search"},{default:a(()=>[e(B,{model:r,size:"small","label-suffix":":"},{default:a(()=>[e(P,{gutter:16},{default:a(()=>[e(i,{span:8},{default:a(()=>[e(b,{label:"项目名称"},{default:a(()=>[e(j,{modelValue:r.projectName,"onUpdate:modelValue":t[0]||(t[0]=l=>r.projectName=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:8},{default:a(()=>[e(b,{label:"项目单位"},{default:a(()=>[e(j,{modelValue:r.buildOrg,"onUpdate:modelValue":t[1]||(t[1]=l=>r.buildOrg=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:8},{default:a(()=>[e(b,{class:"btn"},{default:a(()=>[p("div",ae,[e(v,{type:"primary",onClick:S},{default:a(()=>t[4]||(t[4]=[N("查询")])),_:1}),e(v,{onClick:k},{default:a(()=>t[5]||(t[5]=[N("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(E,{class:"w-full mt-8 tab-card"},{header:a(()=>[p("div",te,[e(U,{modelValue:s.value,"onUpdate:modelValue":t[2]||(t[2]=l=>s.value=l),onTabChange:M},{default:a(()=>[e(R,{label:"归集列表",name:"1"}),e(R,{label:"草稿箱",name:"2"})]),_:1},8,["modelValue"]),p("div",null,[e(v,{type:"primary",size:"small",icon:"Plus",onClick:t[3]||(t[3]=l=>_(O).push({name:"projectCollectionEnter"}))},{default:a(()=>t[6]||(t[6]=[N("录入项目")])),_:1})])])]),default:a(()=>[e(L,{ref_key:"tableListRef",ref:d,column:T,data:I.value,total:C.value,onGetTableData:u},{action:a(({scope:l})=>[p("a",{onClick:A=>o.$router.push({name:"projectCollectionDetail",query:{id:l.row.baseProjId,draftId:l.row.draftId,type:s.value}})},"查看",8,le),l.row.canOperation?(c(),x("a",{key:0,onClick:A=>o.$router.push({name:"projectCollectionEnter",query:{id:l.row.baseProjId,draftId:l.row.draftId,type:s.value}})},"编辑",8,oe)):g("",!0),l.row.canOperation?(c(),x("a",{key:1,class:"text-danger",onClick:A=>$(l.row)},"删除",8,ne)):g("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1})])]),_:1})}}});export{pe as default};