Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

2 linhas
9.3KB

  1. import{E as h,r as m,a as N,$ as z,y as pe,o as me,b as u,c,d as b,f as e,h as a,w as C,F as O,H as I,u as P,L as R,v as x,e as g,i as v,j as M,k as ce,a0 as fe,s as _e}from"./index-dd5fae99.js";import{l as be,m as ge,n as ve,a as ye,r as je}from"./index-b6aa4cff.js";import{u as we}from"./useExportExc-f315048b.js";const Ye="/video/project_study_video.mp4",ke={class:"flex"},Ve={class:"flex"},Te={class:"flex justify-between items-center"},he=["onClick"],Ce=["onClick"],xe=["onClick"],De=["onClick"],Ne=ce({name:"projectDeclare"}),$e=Object.assign(Ne,{setup(Oe){const{statusOptionsCascader:A,statusOptions:Y,projectConTypeOptions:W}=h.dictStore.globalDicts||{},{proxy:U}=_e(),D=m(!1),l=N({stage:void 0,status:void 0,projectName:"",projectType:void 0,projectYear:void 0,createTiming_:void 0}),y=async(r=V.value.pageParams)=>{var n,s,j;const t={...r,...l,createOnMin:((n=l.createTiming_)==null?void 0:n.length)&&l.createTiming_[0],createOnMax:((s=l.createTiming_)==null?void 0:s.length)&&l.createTiming_[1],projectYear:l.projectYear*1||void 0,createTiming_:void 0,status:(j=l.status)==null?void 0:j[l.status.length-1]},i=d.value?await be(t):await ge(t);E.value=i.data.records,H.value=i.data.total},$=m("已申报"),G=(r,t)=>{switch(r.props.name){case"已申报":d.value=!0,k();break;case"草稿箱":d.value=!1,k();break}},d=m(!0),J=N([{label:"序号",type:"index",width:"80"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"250",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:"100"},{label:"申报金额(万元)",key:"declaredAmount",prop:"declaredAmount",width:"120"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:"100"},{label:"创建时间",key:"createOn",prop:"createOn",showOverflowTooltip:!0,width:"180"},{label:"项目状态",key:"status",prop:"status",width:"220",render:r=>{var t,i,n,s;return[z("span",{class:["dot mr-4",`bg-${r.status&&((t=Y[r.status])==null?void 0:t.color)}`]}),z("span",{class:`text-${r.status&&((i=Y[r.status])==null?void 0:i.color)}`},r.status&&((n=Y[r.stage])==null?void 0:n.name)+"-"+((s=Y[r.status])==null?void 0:s.name))]}},{label:"操作",slot:"action",width:"200",fixed:"right"}]),K=N([{label:"序号",type:"index",width:"80"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"250",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:"100"},{label:"申报金额(万元)",key:"declareAmount",prop:"declareAmount",width:"120"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:"80"},{label:"创建时间",key:"createOn",prop:"createOn",showOverflowTooltip:!0,width:"180"},{label:"操作",slot:"action",width:"160",fixed:"right"}]),E=m([]),H=m(1),Q=r=>{f.push({name:"declarePage",query:{id:r.id,isDraft:1}})},X=r=>{d.value?f.push({name:"projectDeclareDetail",query:{id:r.id}}):f.push({name:"draftDetails",query:{id:r.id}})},Z=r=>{r.status===20005?f.push({name:"reDeclarationFinal",query:{id:r.id}}):f.push({name:"declarePage",query:{id:r.id}})},L=()=>{y()},k=()=>{l.status=void 0,l.projectName=void 0,l.createTiming_=void 0,l.projectType=void 0,l.projectYear=void 0,V.value.pageParams.pageNumber=1,V.value.pageParams.pageSize=10,y()},f=pe(),ee=()=>{if(h.userStore.userInfo.isFirstCreateProject===0){f.push({name:"declarePage"});return}fe.alert("您是第一次使用项目申报,请先观看教学视频",{showCancelButton:!1}).then(()=>{D.value=!0,ve(h.userStore.userInfo.userId),h.userStore.userInfo.isFirstCreateProject=0})},V=m(),{exportLoading:te,exportData:ae}=we(),le=()=>{ae(()=>{var r,t,i;return ye(1,{...l,createOnMin:((r=l.createTiming_)==null?void 0:r.length)&&l.createTiming_[0],createOnMax:((t=l.createTiming_)==null?void 0:t.length)&&l.createTiming_[1],projectYear:l.projectYear*1||void 0,status:(i=l.status)==null?void 0:i[l.status.length-1]})})},oe=m([]),re=r=>{U.$messageBox.confirm(`确定要删除${r.projectName}吗?`,"提示!",{type:"warning"}).then(async()=>{await je(r.projectCode),U.$message.success("删除成功"),y()})};return me(async()=>{d.value=m(!0),y()}),(r,t)=>{const i=u("el-input"),n=u("el-form-item"),s=u("el-col"),j=u("el-option"),S=u("el-select"),ne=u("el-cascader"),w=u("el-row"),T=u("el-date-picker"),_=u("el-button"),B=u("el-form"),F=u("el-card"),q=u("el-tab-pane"),se=u("el-tabs"),ue=u("table-list"),de=u("el-dialog");return c(),b(O,null,[e(w,null,{default:a(()=>[e(F,{class:"w-full search"},{default:a(()=>[C(e(B,{size:"small",model:l,"label-suffix":":"},{default:a(()=>[e(w,{gutter:16,class:"mb-16"},{default:a(()=>[e(s,{span:8},{default:a(()=>[e(n,{label:"项目名称",class:"w-full"},{default:a(()=>[e(i,{modelValue:l.projectName,"onUpdate:modelValue":t[0]||(t[0]=o=>l.projectName=o),maxlength:"50",placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(n,{label:"项目类型"},{default:a(()=>[e(S,{modelValue:l.projectType,"onUpdate:modelValue":t[1]||(t[1]=o=>l.projectType=o),placeholder:"全部",class:"w-full"},{default:a(()=>[(c(!0),b(O,null,I(P(W),(o,p)=>(c(),R(j,{key:p,label:o,value:p},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[C(e(n,{label:"项目状态"},{default:a(()=>[e(ne,{modelValue:l.status,"onUpdate:modelValue":t[2]||(t[2]=o=>l.status=o),class:"w-full",props:{label:"name",value:"code"},options:P(A)},null,8,["modelValue","options"])]),_:1},512),[[x,d.value]])]),_:1})]),_:1}),e(w,{gutter:16},{default:a(()=>[e(s,{span:8},{default:a(()=>[e(n,{label:"预算年度"},{default:a(()=>[e(T,{modelValue:l.projectYear,"onUpdate:modelValue":t[3]||(t[3]=o=>l.projectYear=o),class:"w-full",type:"year",format:"YYYY","value-format":"YYYY",placeholder:"请选择"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(n,{label:"创建时间",class:"w-full"},{default:a(()=>[e(T,{modelValue:l.createTiming_,"onUpdate:modelValue":t[4]||(t[4]=o=>l.createTiming_=o),type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间",format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:4},{default:a(()=>[e(n,{class:"btn"},{default:a(()=>[g("div",ke,[e(_,{type:"primary",onClick:L},{default:a(()=>t[11]||(t[11]=[v("查询")])),_:1}),e(_,{onClick:k},{default:a(()=>t[12]||(t[12]=[v("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),[[x,d.value]]),C(e(B,{"label-suffix":":",model:l,size:"small"},{default:a(()=>[e(w,{gutter:16,class:"mb-16"},{default:a(()=>[e(s,{span:8},{default:a(()=>[e(n,{label:"项目名称",class:"w-full"},{default:a(()=>[e(i,{modelValue:l.projectName,"onUpdate:modelValue":t[5]||(t[5]=o=>l.projectName=o),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(n,{label:"项目类型"},{default:a(()=>[e(S,{modelValue:l.projectType,"onUpdate:modelValue":t[6]||(t[6]=o=>l.projectType=o),placeholder:"全部",class:"w-full"},{default:a(()=>{var o;return[(c(!0),b(O,null,I((o=oe.value)==null?void 0:o.filter(p=>p.type==="PROJECT_TYPE"),(p,ie)=>(c(),R(j,{key:ie,label:p.label,value:p.value},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(n,{label:"预算年度"},{default:a(()=>[e(T,{modelValue:l.projectYear,"onUpdate:modelValue":t[7]||(t[7]=o=>l.projectYear=o),class:"w-full",type:"year","value-format":"YYYY",placeholder:"请选择"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(w,{gutter:16},{default:a(()=>[e(s,{span:10},{default:a(()=>[e(n,{label:"创建时间"},{default:a(()=>[e(T,{modelValue:l.createTiming_,"onUpdate:modelValue":t[8]||(t[8]=o=>l.createTiming_=o),type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间",format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:14},{default:a(()=>[e(n,{class:"btn"},{default:a(()=>[g("div",Ve,[e(_,{type:"primary",onClick:L},{default:a(()=>t[13]||(t[13]=[v("查询")])),_:1}),e(_,{onClick:k},{default:a(()=>t[14]||(t[14]=[v("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),[[x,!d.value]])]),_:1}),e(F,{class:"w-full mt-8 tab-card"},{header:a(()=>[g("div",Te,[e(se,{modelValue:$.value,"onUpdate:modelValue":t[9]||(t[9]=o=>$.value=o),onTabClick:G},{default:a(()=>[e(q,{label:"已申报",name:"已申报"}),e(q,{label:"草稿箱",name:"草稿箱"})]),_:1},8,["modelValue"]),g("div",null,[C(e(_,{type:"primary",size:"small",plain:"",loading:P(te),onClick:le},{default:a(()=>t[15]||(t[15]=[v("导出 ")])),_:1},8,["loading"]),[[x,d.value]]),e(_,{type:"primary",size:"small",icon:"plus",onClick:ee},{default:a(()=>t[16]||(t[16]=[v("项目申报 ")])),_:1})])])]),default:a(()=>[e(ue,{ref_key:"tableListRef",ref:V,column:d.value?J:K,data:E.value,total:H.value,onGetTableData:y},{action:a(({scope:o})=>[g("a",{onClick:p=>X(o.row)},"详情",8,he),d.value?M("",!0):(c(),b("a",{key:0,onClick:p=>Q(o.row)},"编辑",8,Ce)),d.value&&[10002,10005,10007,10013,20005].includes(o.row.status)?(c(),b("a",{key:1,onClick:p=>Z(o.row)},"重新申报",8,xe)):M("",!0),d.value&&[10007].includes(o.row.status)?(c(),b("a",{key:2,onClick:p=>re(o.row)},"删除",8,De)):M("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1}),e(de,{modelValue:D.value,"onUpdate:modelValue":t[10]||(t[10]=o=>D.value=o),title:"项目申报教学视频",width:"800"},{default:a(()=>t[17]||(t[17]=[g("video",{style:{width:"100%"},src:Ye,controls:""},null,-1)])),_:1},8,["modelValue"])],64)}}});export{$e as default};