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
14KB

  1. import{E as ne,$ as k,y as Ae,a as I,r as _,B as Ve,o as Ne,b as i,c as d,d as A,f as t,h as o,u as w,L as D,j as y,F as Y,H as ae,e as V,N as U,i as C,t as Me,k as Pe,s as De}from"./index-dd5fae99.js";import{E as Ce}from"./index-29b4120c.js";import"./uploadAction-3962500e.js";import{o as te,l as Te,s as Oe,p as Ee,e as Se}from"./annualPlanStore-7a8e5db4.js";import $e from"./approvalDialog-95f2f765.js";import Ie from"./importProjectDialog-09cd66c0.js";import Ye from"./exportFieldDialog-e871f4a1.js";import{u as Ue}from"./useExportExc-f315048b.js";import{g as B,a as Re}from"./getIsShowRegionTree-21a24141.js";import Le from"./operationDialog-7bbc4815.js";import"./index-b6aa4cff.js";const{statusOptions:f}=ne.dictStore.globalDicts||{},re={type:"selection",width:"50",reserveSelection:!0},le=[{label:"序号",type:"index",width:"60"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"申报单位",key:"buildOrg",prop:"buildOrg",minWidth:"200",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:80},{label:"项目申报资金(万元)",key:"declaredAmount",prop:"declaredAmount",width:"150"},{label:"项目批复资金(万元)",key:"approvalAmount",prop:"approvalAmount",width:"150"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:"80"},{label:"是否开启方案申报",key:"isStartDeclaredProject",prop:"isStartDeclaredProject",width:"140",render:r=>k("span",r.isStartDeclaredProject?"是":"否")},{label:"项目状态",key:"status",prop:"status",width:"180",render:r=>{var p,b,c,v;return[k("span",{class:["dot mr-4",`bg-${(p=f[r.status])==null?void 0:p.color}`]}),k("span",{class:`text-${(b=f[r.status])==null?void 0:b.color}`},r.status&&((c=f[r.stage])==null?void 0:c.name)+"-"+((v=f[r.status])==null?void 0:v.name))]}},{label:"创建时间",key:"createOn",prop:"createOn",width:"180"},{label:"操作",slot:"action",width:"120",fixed:"right"}],Fe=[re,{label:"序号",type:"index",width:"60"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"申报单位",key:"buildOrg",prop:"buildOrg",minWidth:"200",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:80},{label:"项目申报资金(万元)",key:"declaredAmount",prop:"declaredAmount",width:"150"},{label:"项目批复资金(万元)",key:"approvalAmount",prop:"approvalAmount",width:"150"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:"80"},{label:"是否开启方案申报",key:"isStartDeclaredProject",prop:"isStartDeclaredProject",width:"140",render:r=>k("span",r.isStartDeclaredProject?"是":"否")},{label:"项目状态",key:"status",prop:"status",width:"180",render:r=>{var p,b,c,v;return[k("span",{class:["dot mr-4",`bg-${(p=f[r.status])==null?void 0:p.color}`]}),k("span",{class:`text-${(b=f[r.status])==null?void 0:b.color}`},r.status&&((c=f[r.stage])==null?void 0:c.name)+"-"+((v=f[r.status])==null?void 0:v.name))]}},{label:"创建时间",key:"createOn",prop:"createOn",width:"180"},{label:"操作",slot:"action",width:"180",fixed:"right"}],Ge=[re,{label:"序号",type:"index",width:"60"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"申报单位",key:"buildOrg",prop:"buildOrg",minWidth:"200",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:80},{label:"运维包",key:"operationPackageName",prop:"operationPackageName",width:"150"},{label:"项目申报资金(万元)",key:"declaredAmount",prop:"declaredAmount",width:"150"},{label:"项目批复资金(万元)",key:"approvalAmount",prop:"approvalAmount",width:"150"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:"80"},{label:"是否开启方案申报",key:"isStartDeclaredProject",prop:"isStartDeclaredProject",width:"140",render:r=>k("span",r.isStartDeclaredProject?"是":"否")},{label:"项目状态",key:"status",prop:"status",width:"180",render:r=>{var p,b,c,v;return[k("span",{class:["dot mr-4",`bg-${(p=f[r.status])==null?void 0:p.color}`]}),k("span",{class:`text-${(b=f[r.status])==null?void 0:b.color}`},r.status&&((c=f[r.stage])==null?void 0:c.name)+"-"+((v=f[r.status])==null?void 0:v.name))]}},{label:"创建时间",key:"createOn",prop:"createOn",width:"180"},{label:"操作",slot:"action",width:"150",fixed:"right"}],oe={"00":le,"01":Fe,"02":Ge,"03":le},Be={class:"flex"},ze={class:"flex"},qe={class:"flex"},We={class:"flex justify-between items-center"},He={class:"flex justify-between items-center mb-20"},Je={class:"flex items-center"};const Ke=["onClick"],Qe=["onClick"],Xe=["onClick"],Ze=["onClick"],ea=["onClick"],aa=Pe({name:"planList"}),ga=Object.assign(aa,{props:{isTemporaryAugment:{type:Number,default:0}},setup(r){const{proxy:p}=De(),b=r,c=Ae(),{statusOptionsCascader:v,projectTypeOptions:se}=ne.dictStore.globalDicts||{},a=I({projectName:void 0,buildOrg:void 0,projectType:void 0,operationPackageId:void 0,status:void 0,declareAmountMin:void 0,declareAmountMax:void 0,approveAmountMin:void 0,approveAmountMax:void 0,projectYear:void 0,times:void 0}),u=_("00"),h=_(),z=_(0),q=_(oe[u.value]),W=_([]),ie=_({}),N=_(),ue=n=>{N.value=n.regionLevel===3?n.regionCode:void 0,h.value.pageParams.pageNumber=1,j()},j=async(n=h.value.pageParams)=>{var s,x,m;u.value!=="02"&&(a.operationPackageId=void 0);const e=await Te({...n,...a,queryProjectType:u.value,status:(s=a.status)==null?void 0:s[a.status.length-1],projectYear:a.projectYear*1||void 0,declareAmountMin:a.declareAmountMin*1||void 0,declareAmountMax:a.declareAmountMax*1||void 0,approveAmountMin:a.approveAmountMin*1||void 0,approveAmountMax:a.approveAmountMax*1||void 0,createOnMin:((x=a.times)==null?void 0:x[0])||void 0,createOnMax:((m=a.times)==null?void 0:m[1])||void 0,regionCode:N.value||void 0,times:void 0});W.value=e.data.records,z.value=e.data.total},de=(n,e)=>u.value==="01"?!n.isStartDeclaredProject:!0,H=()=>{j()},J=()=>{a.projectName=void 0,a.buildOrg=void 0,a.operationPackageId=void 0,a.projectType=void 0,a.status=void 0,a.declareAmountMin=void 0,a.declareAmountMax=void 0,a.approveAmountMin=void 0,a.approveAmountMax=void 0,a.projectYear=void 0,a.times=void 0,h.value.pageParams.pageNumber=1,h.value.pageParams.pageSize=10,j()},M=_([]),pe=n=>{M.value=n},ce=()=>{if(!M.value.length){p.$message.warning("请至少选择一个项目");return}p.$messageBox.confirm(`是否${N.value==="331181"?"列入年度计划":"开启方案申报"}?`,"提示!",{type:"warning"}).then(async()=>{await Oe({projectIds:M.value.map(n=>n.projectId)}),p.$message.success(`${N.value==="331181"?"列入":"开启"}成功!`),j()})},R=I({visible:!1}),me=()=>{R.visible=!1},O=I({visible:!1}),ta=n=>{O.visible=!0},L=()=>{O.visible=!1},{exportData:K}=Ue(),fe=async n=>{await K(()=>{var e,s,x;return Ee({...h.value.pageParams,...a,status:(e=a.status)==null?void 0:e[a.status.length-1],createOnMin:((s=a.times)==null?void 0:s[0])||void 0,createOnMax:((x=a.times)==null?void 0:x[1])||void 0,regionCode:N.value||void 0,isTemporaryAugment:b.isTemporaryAugment,times:void 0,exportOptionList:n})}),L()},la=async()=>{await K(()=>{var n,e,s;return Se({...h.value.pageParams,...a,status:(n=a.status)==null?void 0:n[a.status.length-1],createOnMin:((e=a.times)==null?void 0:e[0])||void 0,createOnMax:((s=a.times)==null?void 0:s[1])||void 0,regionCode:N.value||void 0,times:void 0,isTemporaryAugment:b.isTemporaryAugment})}),L()},P=I({visible:!1,title:void 0,rowData:void 0}),be=n=>{P.visible=!0,P.title=`立项批复-${n.projectName}`,P.rowData=n},ve=n=>{P.visible=!1,n&&j()};Ve(()=>ie.value.file,async n=>{H()});const F=_([]);Ne(async()=>{B(["SUPER_ADMIN","REGION_MANAGER"])||j();const n=await te();F.value=n.data});function _e(){J(),q.value=oe[u.value],M.value=[],h.value.clearSelection()}const G=_(!1);function ye(){if(!M.value.length){p.$message.warning("请至少选择一个项目");return}G.value=!0}function ge(){j()}async function we(){const n=await te();F.value=n.data}return(n,e)=>{const s=i("el-col"),x=i("el-input"),m=i("el-form-item"),Q=i("el-option"),X=i("el-select"),T=i("el-row"),ke=i("el-cascader"),E=i("el-input-number"),Z=i("el-date-picker"),S=i("el-button"),he=i("el-form"),ee=i("el-card"),$=i("el-tab-pane"),je=i("el-tabs"),oa=i("el-upload"),xe=i("table-list");return d(),A(Y,null,[t(T,null,{default:o(()=>[w(B)(["SUPER_ADMIN","REGION_MANAGER"])?(d(),D(s,{key:0,span:4,class:"pr-16"},{default:o(()=>[t(Ce,{params:w(Re)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:ue},null,8,["params"])]),_:1})):y("",!0),t(s,{span:w(B)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:o(()=>[t(ee,{class:"w-full search"},{default:o(()=>[t(he,{model:a,size:"small","label-suffix":":"},{default:o(()=>[t(T,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(m,{label:"项目名称"},{default:o(()=>[t(x,{modelValue:a.projectName,"onUpdate:modelValue":e[0]||(e[0]=l=>a.projectName=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(m,{label:"申报单位"},{default:o(()=>[t(x,{modelValue:a.buildOrg,"onUpdate:modelValue":e[1]||(e[1]=l=>a.buildOrg=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(m,{label:"项目类型"},{default:o(()=>[t(X,{modelValue:a.projectType,"onUpdate:modelValue":e[2]||(e[2]=l=>a.projectType=l),placeholder:"全部",class:"w-full"},{default:o(()=>[(d(!0),A(Y,null,ae(w(se),(l,g)=>(d(),D(Q,{key:g,label:l,value:g},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(T,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(m,{label:"项目状态"},{default:o(()=>[t(ke,{modelValue:a.status,"onUpdate:modelValue":e[3]||(e[3]=l=>a.status=l),class:"w-full",props:{label:"name",value:"code"},options:w(v)},null,8,["modelValue","options"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(m,{class:"whitespace-nowrap",label:"申报资金(万元)"},{default:o(()=>[V("div",Be,[t(E,{modelValue:a.declareAmountMin,"onUpdate:modelValue":e[4]||(e[4]=l=>a.declareAmountMin=l),clearable:"",controls:!1,onMousewheel:e[5]||(e[5]=U(()=>{},["prevent"]))},null,8,["modelValue"]),e[19]||(e[19]=C("  至  ")),t(E,{modelValue:a.declareAmountMax,"onUpdate:modelValue":e[6]||(e[6]=l=>a.declareAmountMax=l),clearable:"",controls:!1,onMousewheel:e[7]||(e[7]=U(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(m,{class:"whitespace-nowrap",label:"批复资金(万元)"},{default:o(()=>[V("div",ze,[t(E,{modelValue:a.approveAmountMin,"onUpdate:modelValue":e[8]||(e[8]=l=>a.approveAmountMin=l),controls:!1,clearable:"",onMousewheel:e[9]||(e[9]=U(()=>{},["prevent"]))},null,8,["modelValue"]),e[20]||(e[20]=C("  至  ")),t(E,{modelValue:a.approveAmountMax,"onUpdate:modelValue":e[10]||(e[10]=l=>a.approveAmountMax=l),controls:!1,clearable:"",onMousewheel:e[11]||(e[11]=U(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1}),t(T,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(m,{label:"预算年度"},{default:o(()=>[t(Z,{modelValue:a.projectYear,"onUpdate:modelValue":e[12]||(e[12]=l=>a.projectYear=l),type:"year","value-format":"YYYY",placeholder:"请选择"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:16},{default:o(()=>[t(m,{label:"创建时间"},{default:o(()=>[t(Z,{modelValue:a.times,"onUpdate:modelValue":e[13]||(e[13]=l=>a.times=l),type:"datetimerange",editable:!1,format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),u.value==="02"?(d(),D(s,{key:0,span:8},{default:o(()=>[t(m,{label:"运维包"},{default:o(()=>[t(X,{modelValue:a.operationPackageId,"onUpdate:modelValue":e[14]||(e[14]=l=>a.operationPackageId=l),"reserve-keyword":"",filterable:"",placeholder:"全部",class:"w-full",onVisibleChange:we},{default:o(()=>[(d(!0),A(Y,null,ae(F.value,(l,g)=>(d(),D(Q,{key:g,label:l.operationPackageName,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(T,null,{default:o(()=>[t(s,{span:24},{default:o(()=>[t(m,{class:"btn"},{default:o(()=>[V("div",qe,[t(S,{type:"primary",onClick:H},{default:o(()=>e[21]||(e[21]=[C("查询 ")])),_:1}),t(S,{onClick:J},{default:o(()=>e[22]||(e[22]=[C("重置 ")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(ee,{class:"w-full mt-8 tab-card"},{header:o(()=>[V("div",We,[t(je,{modelValue:u.value,"onUpdate:modelValue":e[15]||(e[15]=l=>u.value=l),onTabChange:_e},{default:o(()=>[t($,{label:"所有项目",name:"00"}),t($,{label:"建设类项目",name:"01"}),t($,{label:"运维类项目",name:"02"}),t($,{label:"跨年度项目",name:"03"})]),_:1},8,["modelValue"])])]),default:o(()=>[V("div",He,[V("div",Je,[e[24]||(e[24]=V("span",{class:"mr-24"},"列表",-1)),u.value==="01"?(d(),D(S,{key:0,type:"primary",size:"small",onClick:ce},{default:o(()=>[C(Me(N.value==="331181"?"列入年度计划":"开启方案申报"),1)]),_:1})):y("",!0),u.value==="02"?(d(),D(S,{key:1,type:"primary",size:"small",onClick:ye},{default:o(()=>e[23]||(e[23]=[C("关联运维包 ")])),_:1})):y("",!0)]),y("",!0)]),t(xe,{ref_key:"tableListRef",ref:h,column:q.value,data:W.value,total:z.value,"row-key":"projectId",selectable:de,onSelectionChange:pe,onGetTableData:j},{action:o(({scope:l})=>[u.value==="00"?(d(),A("a",{key:0,onClick:g=>w(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"详情",8,Ke)):y("",!0),u.value==="01"?(d(),A(Y,{key:1},[l.row.status===10014?(d(),A("a",{key:0,onClick:g=>be(l.row)},"立项批复",8,Qe)):y("",!0),V("a",{onClick:g=>w(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"详情",8,Xe)],64)):y("",!0),u.value==="02"?(d(),A("a",{key:2,onClick:g=>w(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"详情",8,Ze)):y("",!0),u.value==="03"?(d(),A("a",{key:3,onClick:g=>w(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"详情",8,ea)):y("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1}),t($e,{visible:P.visible,title:P.title,data:P.rowData,onClose:ve},null,8,["visible","title","data"]),t(Ie,{visible:R.visible,data:R.rowData,onClose:me},null,8,["visible","data"]),t(Ye,{visible:O.visible,data:O.rowData,onClose:L,onExportProject:fe},null,8,["visible","data"]),t(Le,{modelValue:G.value,"onUpdate:modelValue":e[17]||(e[17]=l=>G.value=l),"select-project-list":M.value,"onUpdate:selectProjectList":e[18]||(e[18]=l=>M.value=l),onRelevanceSuccess:ge},null,8,["modelValue","select-project-list"])],64)}}});export{ga as default};