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