Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2 lines
4.4KB

  1. import{d as q,C as z,B as L,y as F,b as A,r as p,o as H,c as n,e as E,G as V,i as a,g as d,h as e,u as c,k as J,j as g,q as K}from"./index.a2494fc2.js";import{E as Q}from"./index.108a55d4.js";import{l as W,a as X}from"./operationProjectRecord.64a9545f.js";import{g as v,a as Y}from"./getIsShowRegionTree.7b64ce60.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=q({name:"operationProjectRecord"}),me=Object.assign(ne,{setup(re){const h=z(L.userStore).userInfo,{proxy:N}=K(),x=F(),r=A({projectName:void 0,buildOrg:void 0}),u=p(),P=p(0),D=A([{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:"\u7533\u62A5\u91D1\u989D\uFF08\u4E07\u5143\uFF09",key:"baseProjDeclAmount",prop:"baseProjDeclAmount",width:"180"},{label:"\u64CD\u4F5C",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("\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),N.$message.success("\u5220\u9664\u6210\u529F\uFF01"),await i()})};return H(()=>{v(["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"),C=n("el-card"),k=n("el-tab-pane"),B=n("el-tabs"),S=n("table-list"),U=n("el-container");return E(),V(U,{class:"overflow-y-auto"},{default:a(()=>[d("div",Z,[e(j,null,{default:a(()=>[c(v)(["SUPER_ADMIN","REGION_MANAGER"])?(E(),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})):J("",!0),e(m,{span:c(v)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:a(()=>[e(C,{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:"\u9879\u76EE\u540D\u79F0"},{default:a(()=>[e(w,{modelValue:r.projectName,"onUpdate:modelValue":t[0]||(t[0]=l=>r.projectName=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(m,{span:8},{default:a(()=>[e(f,{label:"\u9879\u76EE\u5355\u4F4D"},{default:a(()=>[e(w,{modelValue:r.buildOrg,"onUpdate:modelValue":t[1]||(t[1]=l=>r.buildOrg=l),placeholder:"\u8BF7\u8F93\u5165"},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]=[g("\u67E5\u8BE2")])),_:1}),e(b,{onClick:I},{default:a(()=>t[5]||(t[5]=[g("\u91CD\u7F6E")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(C,{class:"w-full mt-8 tab-card"},{header:a(()=>[d("div",ae,[e(B,{modelValue:s.value,"onUpdate:modelValue":t[2]||(t[2]=l=>s.value=l),onTabChange:T},{default:a(()=>[e(k,{label:"\u9879\u76EE\u5217\u8868",name:"1"}),e(k,{label:"\u8349\u7A3F\u7BB1",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]=[g("\u5F55\u5165\u9879\u76EE")])),_:1})])])]),default:a(()=>[e(S,{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}})},"\u67E5\u770B",8,te),d("a",{onClick:R=>o.$router.push({name:"operationProjectEdit",query:{id:l.row.baseProjId,draftId:l.row.draftId,type:s.value}})},"\u7F16\u8F91",8,oe),d("a",{class:"text-danger",onClick:R=>O(l.row)},"\u5220\u9664",8,le)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1})])]),_:1})}}});export{me as default};