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 J}from"./index.095525b5.js";import{d as K,y as Q,B as X,b as x,r as f,c as l,e as r,G as B,i as o,h as a,g as u,j as y,u as Y,f as d,n as I,t as C,k as m,R as V,F as D,Z as ee,q as te}from"./index.88314652.js";import{r as ae,u as oe,v as ne,w as le}from"./indicatorTemplate.d39a8306.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=K({name:"projectTemp"}),ve=Object.assign(we,{setup(fe){const{proxy:_}=te(),E=Q(),{operationTypeOptions:q}=X.dictStore.globalDicts||{},s=x({planName:void 0}),g=f(),v=f(2),F=x([{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"}]),O=[{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",q[t.operationType]||"-")},{label:"\u5BA1\u6838\u72B6\u6001",slot:"auditStatusName",prop:"auditStatusName"},{label:"\u64CD\u4F5C",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?"\u7981\u7528":"\u542F\u7528";_.$messageBox.confirm(`\u662F\u5426${n}\u8BE5\u6A21\u677F?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await oe(t.id,!t.status),_.$message.success(`${n}\u6210\u529F\uFF01`),c()})},j=t=>{s.regionCode=t.regionLevel===3?t.regionCode:void 0,g.value.pageParams.pageNumber=1,c()},ye=t=>{_.$messageBox.confirm(`\u662F\u5426\u5220\u9664${t.name}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await ne(t.id),_.$message.success("\u5220\u9664\u6210\u529F\uFF01"),c()})},R=t=>{_.$messageBox.confirm(`\u662F\u5426\u590D\u5236${t.name}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await le(t.id),_.$message.success("\u590D\u5236\u6210\u529F\uFF01"),c()})},G=t=>{i.value=t,S()};return(t,n)=>{const w=l("el-col"),L=l("el-input"),$=l("el-form-item"),b=l("el-button"),T=l("el-row"),W=l("el-form"),N=l("el-card"),k=l("el-tab-pane"),U=l("el-tabs"),M=l("Warning"),Z=l("el-icon"),A=l("el-tooltip"),H=l("table-list");return r(),B(T,null,{default:o(()=>[a(w,{style:{"padding-right":"16px"},span:4},{default:o(()=>[a(J,{onGetTree:j})]),_:1}),a(w,{span:20},{default:o(()=>[u("div",null,[a(N,{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(L,{modelValue:s.planName,"onUpdate:modelValue":n[0]||(n[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(()=>n[3]||(n[3]=[y("\u67E5\u8BE2")])),_:1}),a(b,{onClick:S},{default:o(()=>n[4]||(n[4]=[y("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(N,{class:"tab-card"},{header:o(()=>[u("div",se,[a(U,{modelValue:i.value,"onUpdate:modelValue":n[1]||(n[1]=e=>i.value=e),onTabChange:G},{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:n[2]||(n[2]=e=>Y(E).push({name:"editTemplate",query:{regionCode:s.regionCode}}))},{default:o(()=>n[5]||(n[5]=[y(" \u65B0\u589E\u6A21\u677F ")])),_:1})])]),default:o(()=>[a(H,{ref_key:"tableListRef",ref:g,column:i.value==="2"?O:F,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(A,{key:0,content:e.row.auditMessage,placement:"bottom",effect:"light"},{default:o(()=>[a(Z,{class:"ml-4"},{default:o(()=>[a(M)]),_: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(" \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=>P(e.row)},C(e.row.status?"\u7981\u7528":"\u542F\u7528"),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}})},"\u7F16\u8F91",8,de),u("a",{onClick:p=>R(e.row)},"\u590D\u5236",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}})},"\u91CD\u65B0\u63D0\u4EA4",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}})},"\u7F16\u8F91",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}})},"\u91CD\u65B0\u63D0\u4EA4",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}})},"\u67E5\u770B",8,ge)):m("",!0),(e.row.status,m("",!0))]),_:1},8,["column","data","total"])]),_:1})])]),_:1})]),_:1})}}});export{ve as default};