No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
4.4KB

  1. import{d as L,C as Y,B as F,y as H,b as V,r as m,o as J,c as n,e as c,G as h,i as a,g as p,h as e,u as _,k as v,j as N,f as x,q as K}from"./index.88314652.js";import{E as Q}from"./index.095525b5.js";import{l as W,b as X}from"./projectCollectionEnter.d9dae6a5.js";import{g as y,a as Z}from"./getIsShowRegionTree.6f629642.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=L({name:"projectCollection"}),pe=Object.assign(re,{setup(se){const G=Y(F.userStore).userInfo,{proxy:C}=K(),O=H(),r=V({projectName:void 0,buildOrg:void 0}),d=m(),w=m(0),T=V([{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u9879\u76EE\u7F16\u53F7",key:"baseProjId",prop:"baseProjId"},{label:"\u9879\u76EE\u540D\u79F0",key:"baseProjName",prop:"baseProjName"},{label:"\u5EFA\u8BBE\u5355\u4F4D",key:"baseBuildDeprt",prop:"baseBuildDeprt"},{label:"\u884C\u653F\u533A\u5212",key:"baseAreaName",prop:"baseAreaName"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"baseProjSetYear",prop:"baseProjSetYear",width:"80"},{label:"\u64CD\u4F5C",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,w.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()},B=o=>{C.$messageBox.confirm("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\u5417?","\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await X(s.value,s.value==="1"?o.baseProjId:o.draftId),C.$message.success("\u5220\u9664\u6210\u529F\uFF01"),await u()})};return J(()=>{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"),g=n("el-button"),P=n("el-row"),$=n("el-form"),E=n("el-card"),R=n("el-tab-pane"),U=n("el-tabs"),q=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})):v("",!0),e(i,{span:_(y)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:a(()=>[e(E,{class:"w-full search"},{default:a(()=>[e($,{model:r,size:"small","label-suffix":":"},{default:a(()=>[e(P,{gutter:16},{default:a(()=>[e(i,{span:8},{default:a(()=>[e(b,{label:"\u9879\u76EE\u540D\u79F0"},{default:a(()=>[e(j,{modelValue:r.projectName,"onUpdate:modelValue":t[0]||(t[0]=l=>r.projectName=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:8},{default:a(()=>[e(b,{label:"\u9879\u76EE\u5355\u4F4D"},{default:a(()=>[e(j,{modelValue:r.buildOrg,"onUpdate:modelValue":t[1]||(t[1]=l=>r.buildOrg=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:8},{default:a(()=>[e(b,{class:"btn"},{default:a(()=>[p("div",ae,[e(g,{type:"primary",onClick:S},{default:a(()=>t[4]||(t[4]=[N("\u67E5\u8BE2")])),_:1}),e(g,{onClick:k},{default:a(()=>t[5]||(t[5]=[N("\u91CD\u7F6E")])),_: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:"\u5F52\u96C6\u5217\u8868",name:"1"}),e(R,{label:"\u8349\u7A3F\u7BB1",name:"2"})]),_:1},8,["modelValue"]),p("div",null,[e(g,{type:"primary",size:"small",icon:"Plus",onClick:t[3]||(t[3]=l=>_(O).push({name:"projectCollectionEnter"}))},{default:a(()=>t[6]||(t[6]=[N("\u5F55\u5165\u9879\u76EE")])),_:1})])])]),default:a(()=>[e(q,{ref_key:"tableListRef",ref:d,column:T,data:I.value,total:w.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}})},"\u67E5\u770B",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}})},"\u7F16\u8F91",8,oe)):v("",!0),l.row.canOperation?(c(),x("a",{key:1,class:"text-danger",onClick:A=>B(l.row)},"\u5220\u9664",8,ne)):v("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1})])]),_:1})}}});export{pe as default};