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

  1. import{E as K}from"./index.af6ebbed.js";import{d as Q,A as X,D as Y,b as N,r as f,c as n,e as r,I as B,i as o,h as a,g as u,j as y,u as Z,f as d,n as I,t as C,k as m,U as V,F as D,a0 as ee,x as te}from"./index.d340e473.js";import{r as ae,u as oe,v as ne,w as le}from"./indicatorTemplate.b913f726.js";const se={class:"flex justify-between items-center"},ie={key:0,class:"flex items-center"},re={key:1},ue=["onClick"],de=["onClick"],me=["onClick"],ce=["onClick"],_e=["onClick"],pe=["onClick"],ge=["onClick"];const we=Q({name:"projectTemp"}),he=Object.assign(we,{setup(fe){const{proxy:p}=te(),E=X(),{operationTypeOptions:F}=Y.dictStore.globalDicts||{},s=N({planName:void 0}),g=f(),h=f(2),O=N([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u6A21\u677F\u540D\u79F0",key:"name",prop:"name"},{label:"\u5BA1\u6838\u72B6\u6001",key:"auditStatusName",slot:"auditStatusName",width:100},{label:"\u72B6\u6001",slot:"isEnable",width:"100"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"170"},{label:"\u64CD\u4F5C",slot:"action",width:180,fixed:"right"}]),q=[{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u6307\u6807\u6A21\u677F\u540D\u79F0",key:"name",prop:"name",minWidth:200,showOverflowTooltip:!0},{label:"\u63D0\u4EA4\u5BA1\u6838\u65F6\u95F4",key:"createOn",prop:"createOn"},{label:"\u5BA1\u6838\u64CD\u4F5C",key:"operationType",prop:"operationType",render:t=>ee("span",F[t.operationType]||"-")},{label:"\u5BA1\u6838\u72B6\u6001",slot:"auditStatusName",prop:"auditStatusName"},{label:"\u64CD\u4F5C",slot:"action",fixed:"right",width:180}],v=f([]),i=f("1"),c=async(t=g.value.pageParams)=>{const l=await ae(i.value,{...t,...s,auditType:i.value==="2"?1:void 0});v.value=l.data.records,h.value=l.data.total},z=()=>{c()},S=()=>{s.planName=void 0,g.value.pageParams.pageNumber=1,g.value.pageParams.pageSize=10,c()},P=t=>{const l=t.status?"\u7981\u7528":"\u542F\u7528";p.$messageBox.confirm(`\u662F\u5426${l}\u8BE5\u6A21\u677F?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await oe(t.id,!t.status),p.$message.success(`${l}\u6210\u529F\uFF01`),c()})},j=t=>{s.regionCode=t.regionLevel===3?t.regionCode:void 0,g.value.pageParams.pageNumber=1,c()},ye=t=>{p.$messageBox.confirm(`\u662F\u5426\u5220\u9664${t.name}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await ne(t.id),p.$message.success("\u5220\u9664\u6210\u529F\uFF01"),c()})},L=t=>{p.$messageBox.confirm(`\u662F\u5426\u590D\u5236${t.name}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await le(t.id),p.$message.success("\u590D\u5236\u6210\u529F\uFF01"),c()})},R=t=>{i.value=t,S()};return(t,l)=>{const w=n("el-col"),U=n("el-input"),$=n("el-form-item"),b=n("el-button"),T=n("el-row"),W=n("el-form"),x=n("el-card"),k=n("el-tab-pane"),G=n("el-tabs"),A=n("Warning"),M=n("el-icon"),H=n("el-tooltip"),J=n("table-list");return r(),B(T,null,{default:o(()=>[a(w,{style:{"padding-right":"16px"},span:4},{default:o(()=>[a(K,{onGetTree:j})]),_:1}),a(w,{span:20},{default:o(()=>[u("div",null,[a(x,{class:"search mb-16"},{default:o(()=>[a(W,{"label-suffix":":",model:s,size:"small"},{default:o(()=>[a(T,{gutter:16},{default:o(()=>[a(w,{span:8},{default:o(()=>[a($,{label:"\u6A21\u677F\u540D\u79F0"},{default:o(()=>[a(U,{modelValue:s.planName,"onUpdate:modelValue":l[0]||(l[0]=e=>s.planName=e),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:16},{default:o(()=>[a($,{class:"btn"},{default:o(()=>[a(b,{type:"primary",onClick:z},{default:o(()=>[y("\u67E5\u8BE2")]),_:1}),a(b,{onClick:S},{default:o(()=>[y("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(x,{class:"tab-card"},{header:o(()=>[u("div",se,[a(G,{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=e=>i.value=e),onTabChange:R},{default:o(()=>[a(k,{label:"\u6A21\u677F\u5217\u8868",name:"1"}),a(k,{label:"\u8349\u7A3F\u7BB1",name:"3"}),a(k,{label:"\u5BA1\u6838\u5217\u8868",name:"2"})]),_:1},8,["modelValue"]),a(b,{type:"primary",icon:"Plus",size:"small",onClick:l[2]||(l[2]=e=>Z(E).push({name:"editTemplate",query:{regionCode:s.regionCode}}))},{default:o(()=>[y(" \u65B0\u589E\u6A21\u677F ")]),_:1})])]),default:o(()=>[a(J,{ref_key:"tableListRef",ref:g,column:i.value==="2"?q:O,data:v.value,total:h.value,onGetTableData:c},{auditStatusName:o(({scope:e})=>[e.row.auditStatus?(r(),d("div",ie,[u("span",{class:I(`dot mr-4 ${e.row.auditStatus===1?"bg-warning":e.row.auditStatus===2?"bg-success":"bg-danger"}`)},null,2),u("span",{class:I(`${e.row.auditStatus===1?"text-warning":e.row.auditStatus===2?"text-success":"text-danger"}`)},C(e.row.auditStatusName),3),e.row.auditStatus===3?(r(),B(H,{key:0,content:e.row.auditMessage,placement:"bottom",effect:"light"},{default:o(()=>[a(M,{class:"ml-4"},{default:o(()=>[a(A)]),_:1})]),_:2},1032,["content"])):m("",!0)])):(r(),d("span",re,"-"))]),isEnable:o(({scope:e})=>[u("div",{class:"dot",style:V({background:e.row.status?"#4ECB74":"#FF3B30"})},null,4),y(" \xA0"),u("span",{style:V({color:e.row.status?"#4ECB74":"#FF3B30"})},C(e.row.status?"\u542F\u7528\u4E2D":"\u7981\u7528\u4E2D"),5)]),action:o(({scope:e})=>[i.value==="1"?(r(),d(D,{key:0},[e.row.auditStatus===2?(r(),d(D,{key:0},[u("a",{onClick:_=>P(e.row)},C(e.row.status?"\u7981\u7528":"\u542F\u7528"),9,ue),u("a",{onClick:_=>t.$router.push({name:"editTemplate",query:{id:e.row.id,regionCode:s.regionCode,auditId:e.row.auditId,auditStatus:e.row.auditStatus}})},"\u7F16\u8F91",8,de),u("a",{onClick:_=>L(e.row)},"\u590D\u5236",8,me)],64)):m("",!0),e.row.auditStatus===3?(r(),d("a",{key:1,onClick:_=>t.$router.push({name:"editTemplate",query:{id:e.row.id,regionCode:s.regionCode,auditId:e.row.auditId,auditStatus:e.row.auditStatus}})},"\u91CD\u65B0\u63D0\u4EA4",8,ce)):m("",!0)],64)):m("",!0),i.value==="3"?(r(),d("a",{key:1,onClick:_=>t.$router.push({name:"editTemplate",query:{draftId:e.row.draftId,regionCode:s.regionCode,auditId:e.row.auditId,auditStatus:e.row.auditStatus}})},"\u7F16\u8F91",8,_e)):m("",!0),e.row.auditStatus===3&&i.value==="2"?(r(),d("a",{key:2,onClick:_=>t.$router.push({name:"editTemplate",query:{id:e.row.appraisalId,regionCode:s.regionCode,auditId:e.row.id,auditStatus:e.row.auditStatus}})},"\u91CD\u65B0\u63D0\u4EA4",8,pe)):m("",!0),i.value!=="3"?(r(),d("a",{key:3,onClick:_=>t.$router.push({name:"templateDetail",query:{id:i.value==="2"?e.row.id:e.row.auditId}})},"\u67E5\u770B",8,ge)):m("",!0),(e.row.status,m("",!0))]),_:1},8,["column","data","total"])]),_:1})])]),_:1})]),_:1})}}});export{he as default};