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{d as K,D as Q,A as X,b as Z,r as b,o as ee,c as o,e as d,I as P,i as t,h as a,g as m,j as y,t as k,f as u,n as Y,k as p,F as B,u as h,a0 as x,x as ae}from"./index.d340e473.js";import{E as te}from"./index.af6ebbed.js";import{l as le,g as ne}from"./evaluationPlan.8a546679.js";const oe={class:"flex"},se={class:"flex justify-between"},re={key:0,class:"flex items-center"},ie={key:1},de=["onClick"],ue=["onClick"],me=["onClick"],pe=["onClick"],ce=["onClick"];const _e=K({name:"evaluationPlan"}),ke=Object.assign(_e,{setup(fe){const{proxy:T}=ae(),{operationTypeOptions:j}=Q.dictStore.globalDicts||{},c=X(),s=Z({name:void 0,times:void 0}),D={1:"\u9879\u76EE",2:"\u5E94\u7528"},q=[{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u8BA1\u5212\u540D\u79F0",key:"name",prop:"name",minWidth:200,showOverflowTooltip:!0},{label:"\u81EA\u8BC4\u65F6\u95F4",key:"seltTime",slot:"seltTime",width:200},{label:"\u8BC4\u4EF7\u5BF9\u8C61",key:"target",prop:"target",render:l=>x("span",l.target.split(",").map(n=>D[n]).join("\uFF0C")),width:100},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u5BA1\u6838\u72B6\u6001",key:"auditStatusName",slot:"auditStatusName",width:100},{label:"\u64CD\u4F5C",slot:"action",fixed:"right",width:190}],M=[{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u8BA1\u5212\u540D\u79F0",key:"name",prop:"name",minWidth:200,showOverflowTooltip:!0},{label:"\u8BC4\u4EF7\u5BF9\u8C61",key:"target",prop:"target",render:l=>{var n;return x("span",(n=l.target)==null?void 0:n.split(",").map(i=>D[i]).join("\uFF0C"))},width:100},{label:"\u63D0\u4EA4\u5BA1\u6838\u65F6\u95F4",key:"createOn",prop:"createOn"},{label:"\u5BA1\u6838\u64CD\u4F5C",key:"operationType",prop:"operationType",render:l=>x("span",j[l.operationType]||"-")},{label:"\u5BA1\u6838\u72B6\u6001",slot:"auditStatusName",prop:"auditStatusName"},{label:"\u64CD\u4F5C",slot:"action",fixed:"right",width:190}],N=b(0),v=b([]),E=l=>{s.regionCode=l.regionLevel===3?l.regionCode:void 0,_.value.pageParams.pageNumber=1,f()},_=b(),r=b("1"),f=async(l=_.value.pageParams)=>{var i,w;v.value=[];const n=await le(r.value,{...l,...s,start:((i=s.times)==null?void 0:i[0])||void 0,end:((w=s.times)==null?void 0:w[1])||void 0,times:void 0,auditType:2});v.value=n.data.records,N.value=n.data.total},W=()=>{_.value.pageParams.pageNumber=1,f()},V=()=>{_.value.pageParams.pageNumber=1,s.name=void 0,s.times=void 0,f()},z=()=>{c.push({name:"addPlan",query:{regionId:s.regionId}})},ge=l=>{T.$messageBox.confirm(`\u662F\u5426\u5220\u9664${l.name}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await ne(l.id),T.$message.success("\u5220\u9664\u6210\u529F\uFF01"),f()})},F=l=>{r.value=l,V()};return ee(()=>{}),(l,n)=>{const i=o("el-col"),w=o("el-input"),C=o("el-form-item"),G=o("el-date-picker"),S=o("el-button"),$=o("el-row"),L=o("el-form"),I=o("el-card"),O=o("el-tab-pane"),R=o("el-tabs"),U=o("Warning"),A=o("el-icon"),H=o("el-tooltip"),J=o("table-list");return d(),P($,null,{default:t(()=>[a(i,{style:{"padding-right":"16px"},span:4},{default:t(()=>[a(te,{onGetTree:E})]),_:1}),a(i,{span:20},{default:t(()=>[a(I,{class:"w-full search"},{default:t(()=>[a(L,{model:s,size:"small","label-suffix":":"},{default:t(()=>[a($,{gutter:16},{default:t(()=>[a(i,{span:8},{default:t(()=>[a(C,{label:"\u8BA1\u5212\u540D\u79F0"},{default:t(()=>[a(w,{modelValue:s.name,"onUpdate:modelValue":n[0]||(n[0]=e=>s.name=e),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(i,{span:9},{default:t(()=>[a(C,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:t(()=>[a(G,{modelValue:s.times,"onUpdate:modelValue":n[1]||(n[1]=e=>s.times=e),type:"daterange",editable:!1,format:"YYYY-MM-DD","value-format":"YYYY-MM-DD","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4"},null,8,["modelValue"])]),_:1})]),_:1}),a(i,{span:7},{default:t(()=>[a(C,{class:"btn"},{default:t(()=>[m("div",oe,[a(S,{type:"primary",onClick:W},{default:t(()=>[y("\u67E5\u8BE2")]),_:1}),a(S,{onClick:V},{default:t(()=>[y("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(I,{class:"w-full mt-8 tab-card"},{header:t(()=>[m("div",se,[a(R,{modelValue:r.value,"onUpdate:modelValue":n[2]||(n[2]=e=>r.value=e),onTabChange:F},{default:t(()=>[a(O,{label:"\u8BA1\u5212\u5217\u8868",name:"1"}),a(O,{label:"\u5BA1\u6838\u5217\u8868",name:"2"})]),_:1},8,["modelValue"]),m("div",null,[a(S,{type:"primary",size:"small",icon:"plus",onClick:z},{default:t(()=>[y("\u65B0\u5EFA\u8BA1\u5212")]),_:1})])])]),default:t(()=>[a(J,{ref_key:"tableListRef",ref:_,column:r.value==="1"?q:M,data:v.value,total:N.value,onGetTableData:f},{seltTime:t(({scope:e})=>[y(" \u9879\u76EE\u7EC8\u9A8C"+k(e.row.startSelfDays)+"\u5929\u540E\u5F00\u59CB\u81EA\u8BC4\uFF0C\u5E76\u4E14\u5728"+k(e.row.completeSelfDays)+"\u5929\u5B8C\u6210\u81EA\u8BC4 ",1)]),auditStatusName:t(({scope:e})=>[e.row.auditStatus?(d(),u("div",re,[m("span",{class:Y(`dot mr-4 ${e.row.auditStatus===1?"bg-warning":e.row.auditStatus===2?"bg-success":"bg-danger"}`)},null,2),m("span",{class:Y(`${e.row.auditStatus===1?"text-warning":e.row.auditStatus===2?"text-success":"text-danger"}`)},k(e.row.auditStatusName),3),e.row.auditStatus===3?(d(),P(H,{key:0,content:e.row.auditMessage,placement:"bottom",effect:"light"},{default:t(()=>[a(A,{class:"ml-4"},{default:t(()=>[a(U)]),_:1})]),_:2},1032,["content"])):p("",!0)])):(d(),u("span",ie,"-"))]),action:t(({scope:e})=>[r.value==="1"?(d(),u(B,{key:0},[e.row.auditStatus===2||e.row.auditStatus===3?(d(),u("a",{key:0,onClick:g=>h(c).push({name:"addPlan",query:{id:r.value==="1"?e.row.id:e.row.appraisalId,auditId:r.value==="2"?e.row.id:""}})},k(e.row.auditStatus===2?"\u7F16\u8F91":"\u91CD\u65B0\u63D0\u4EA4"),9,de)):p("",!0),e.row.auditStatus===2?(d(),u("a",{key:1,onClick:g=>h(c).push({name:"projectGroup",query:{appraisalId:e.row.id}})},"\u9879\u76EE\u5206\u7EC4",8,ue)):p("",!0),r.value==="1"?(d(),u("a",{key:2,onClick:g=>h(c).push({name:"planDetail",query:{id:e.row.id}})},"\u8BE6\u60C5",8,me)):p("",!0)],64)):(d(),u(B,{key:1},[e.row.auditStatus===3?(d(),u("a",{key:0,onClick:g=>h(c).push({name:"addPlan",query:{id:r.value==="1"?e.row.id:e.row.appraisalId,auditId:r.value==="2"?e.row.id:""}})},"\u91CD\u65B0\u63D0\u4EA4",8,pe)):p("",!0),m("a",{onClick:g=>l.$router.push({name:"planDetail",query:{id:e.row.appraisalId,auditId:e.row.id}})},"\u8BE6\u60C5",8,ce)],64)),p("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1})]),_:1})}}});export{ke as default};