25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index-6186b7ff.js 6.0KB

1
  1. import{E as K}from"./index-29b4120c.js";import{y as Q,E as X,a as x,r as f,b as l,c as r,L as B,h as o,f as a,e as u,i as y,u as Y,d,n as I,t as C,j as m,M as V,F as E,k as Z,$ as ee,s as te}from"./index-dd5fae99.js";import{r as ae,u as oe,v as ne,w as le}from"./indicatorTemplate-ca1642c9.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"],pe=["onClick"],_e=["onClick"],ge=["onClick"];const we=Z({name:"projectTemp"}),ve=Object.assign(we,{setup(fe){const{proxy:_}=te(),D=Q(),{operationTypeOptions:F}=X.dictStore.globalDicts||{},s=x({planName:void 0}),g=f(),v=f(2),O=x([{label:"序号",type:"index",width:"80"},{label:"模板名称",key:"name",prop:"name"},{label:"审核状态",key:"auditStatusName",slot:"auditStatusName",width:100},{label:"状态",slot:"isEnable",width:"100"},{label:"创建时间",key:"createOn",prop:"createOn",width:"170"},{label:"操作",slot:"action",width:180,fixed:"right"}]),q=[{label:"序号",type:"index",width:"60"},{label:"指标模板名称",key:"name",prop:"name",minWidth:200,showOverflowTooltip:!0},{label:"提交审核时间",key:"createOn",prop:"createOn"},{label:"审核操作",key:"operationType",prop:"operationType",render:t=>ee("span",F[t.operationType]||"-")},{label:"审核状态",slot:"auditStatusName",prop:"auditStatusName"},{label:"操作",slot:"action",fixed:"right",width:180}],h=f([]),i=f("1"),c=async(t=g.value.pageParams)=>{const n=await ae(i.value,{...t,...s,auditType:i.value==="2"?1:void 0});h.value=n.data.records,v.value=n.data.total},z=()=>{c()},S=()=>{s.planName=void 0,g.value.pageParams.pageNumber=1,g.value.pageParams.pageSize=10,c()},P=t=>{const n=t.status?"禁用":"启用";_.$messageBox.confirm(`是否${n}该模板?`,"提示!",{type:"warning"}).then(async()=>{await oe(t.id,!t.status),_.$message.success(`${n}成功!`),c()})},j=t=>{s.regionCode=t.regionLevel===3?t.regionCode:void 0,g.value.pageParams.pageNumber=1,c()},ye=t=>{_.$messageBox.confirm(`是否删除${t.name}?`,"提示!",{type:"warning"}).then(async()=>{await ne(t.id),_.$message.success("删除成功!"),c()})},L=t=>{_.$messageBox.confirm(`是否复制${t.name}?`,"提示!",{type:"warning"}).then(async()=>{await le(t.id),_.$message.success("复制成功!"),c()})},R=t=>{i.value=t,S()};return(t,n)=>{const w=l("el-col"),W=l("el-input"),$=l("el-form-item"),b=l("el-button"),T=l("el-row"),G=l("el-form"),N=l("el-card"),k=l("el-tab-pane"),M=l("el-tabs"),U=l("Warning"),A=l("el-icon"),H=l("el-tooltip"),J=l("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(N,{class:"search mb-16"},{default:o(()=>[a(G,{"label-suffix":":",model:s,size:"small"},{default:o(()=>[a(T,{gutter:16},{default:o(()=>[a(w,{span:8},{default:o(()=>[a($,{label:"模板名称"},{default:o(()=>[a(W,{modelValue:s.planName,"onUpdate:modelValue":n[0]||(n[0]=e=>s.planName=e),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:16},{default:o(()=>[a($,{class:"btn"},{default:o(()=>[a(b,{type:"primary",onClick:z},{default:o(()=>n[3]||(n[3]=[y("查询")])),_:1}),a(b,{onClick:S},{default:o(()=>n[4]||(n[4]=[y("重置")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(N,{class:"tab-card"},{header:o(()=>[u("div",se,[a(M,{modelValue:i.value,"onUpdate:modelValue":n[1]||(n[1]=e=>i.value=e),onTabChange:R},{default:o(()=>[a(k,{label:"模板列表",name:"1"}),a(k,{label:"草稿箱",name:"3"}),a(k,{label:"审核列表",name:"2"})]),_:1},8,["modelValue"]),a(b,{type:"primary",icon:"Plus",size:"small",onClick:n[2]||(n[2]=e=>Y(D).push({name:"editTemplate",query:{regionCode:s.regionCode}}))},{default:o(()=>n[5]||(n[5]=[y(" 新增模板 ")])),_:1})])]),default:o(()=>[a(J,{ref_key:"tableListRef",ref:g,column:i.value==="2"?q:O,data:h.value,total:v.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(A,{class:"ml-4"},{default:o(()=>[a(U)]),_: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),n[6]||(n[6]=y("  ")),u("span",{style:V({color:e.row.status?"#4ECB74":"#FF3B30"})},C(e.row.status?"启用中":"禁用中"),5)]),action:o(({scope:e})=>[i.value==="1"?(r(),d(E,{key:0},[e.row.auditStatus===2?(r(),d(E,{key:0},[u("a",{onClick:p=>P(e.row)},C(e.row.status?"禁用":"启用"),9,ue),u("a",{onClick:p=>t.$router.push({name:"editTemplate",query:{id:e.row.id,regionCode:s.regionCode,auditId:e.row.auditId,auditStatus:e.row.auditStatus}})},"编辑",8,de),u("a",{onClick:p=>L(e.row)},"复制",8,me)],64)):m("",!0),e.row.auditStatus===3?(r(),d("a",{key:1,onClick:p=>t.$router.push({name:"editTemplate",query:{id:e.row.id,regionCode:s.regionCode,auditId:e.row.auditId,auditStatus:e.row.auditStatus}})},"重新提交",8,ce)):m("",!0)],64)):m("",!0),i.value==="3"?(r(),d("a",{key:1,onClick:p=>t.$router.push({name:"editTemplate",query:{draftId:e.row.draftId,regionCode:s.regionCode,auditId:e.row.auditId,auditStatus:e.row.auditStatus}})},"编辑",8,pe)):m("",!0),e.row.auditStatus===3&&i.value==="2"?(r(),d("a",{key:2,onClick:p=>t.$router.push({name:"editTemplate",query:{id:e.row.appraisalId,regionCode:s.regionCode,auditId:e.row.id,auditStatus:e.row.auditStatus}})},"重新提交",8,_e)):m("",!0),i.value!=="3"?(r(),d("a",{key:3,onClick:p=>t.$router.push({name:"templateDetail",query:{id:i.value==="2"?e.row.id:e.row.auditId}})},"查看",8,ge)):m("",!0),(e.row.status,m("",!0))]),_:1},8,["column","data","total"])]),_:1})])]),_:1})]),_:1})}}});export{ve as default};