Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

2 Zeilen
10KB

  1. import{g as h,a as X}from"./getIsShowRegionTree-21a24141.js";import{E as Y}from"./index-29b4120c.js";import{d as Z,s as ee}from"./earlyWarningManage-6c2f9970.js";import{p as le}from"./flowConfiguration-e3261cd3.js";import{r as _,o as ae,b as p,c as v,d as y,f as e,h as t,u as E,L as b,j as C,F as te,H as oe,e as c,t as j,i as w,k as ue,s as ne}from"./index-dd5fae99.js";const re={class:"footerPage earlyWarningRule"},se={key:0,class:"flex items-center text-14"},me={class:"ml-4"},de={key:1,class:"flex items-center text-14"},pe={class:"footer"},ie=ue({name:"earlyWarningRule"}),Ve=Object.assign(ie,{setup(ve){const{proxy:D}=ne(),G=u=>{N.value=u.regionLevel===3?u.regionCode:void 0,U()},N=_(),O=_(),U=async()=>{const u=await Z(N.value);O.value=u.data,T.value.resetFields(),a.value={rule:[{}],noticeContent:n.value==="1"?"{projectName}的{flowType}在您的审核节点已超过{time}小时,请及时处理。":"请尽快处理{projectName}的{stepName},已停留{time}。",adventContent:n.value==="1"?"{projectName}的{flowType}在您的审核节点已超过{time}小时,请及时处理。":"请尽快处理{projectName}的{stepName},已停留{time},将在{time2}小时后超期。"},x(O.value.find(l=>l.ruleType===n.value*1)||{})},x=u=>{var l;a.value={...u,rule:u.rule?JSON.parse(u.rule).map(m=>({...m,notice:m.notice?m.notice.split(",").map(f=>f*1):[]})):[{}],noticeMethod:((l=u==null?void 0:u.noticeMethod)==null?void 0:l.split(",").map(m=>m*1))||void 0,noticeContent:u.noticeContent||a.value.noticeContent,adventContent:u.adventContent||a.value.adventContent,isOpen:u.isOpen||!1}},n=_("1"),z=u=>{n.value=u,U()},T=_(),a=_({rule:[{}],noticeContent:"{projectName}的{flowType}在您的审核节点已超过{time}小时,请及时处理。",adventContent:"{projectName}的{flowType}在您的审核节点已超过{time}小时,请及时处理。"}),P={noticeMethod:[{required:!0,message:"请选择"}],noticeContent:[{required:!0,message:"请输入"}],adventContent:[{required:!0,message:"请输入"}],isOpen:[{required:!0,type:Boolean}]},M=_(!1),S=async u=>{u&&await u.validate(async l=>{if(l){M.value=!0;const m=a.value.rule.map(g=>{var d;return{...g,notice:(d=g.notice)!=null&&d.length?g.notice.join(","):void 0}}),f={...a.value,ruleType:n.value*1,areaCode:N.value,rule:JSON.stringify(m),noticeMethod:a.value.noticeMethod.join(",")};await ee(f),U(),D.$message.success("保存成功!"),M.value=!1}})},B=()=>{a.value.rule.push({time:void 0,notice:[]})},L=u=>{a.value.rule.splice(u,1)},F=_(),J=async()=>{const u=await le({regionCode:N.value||331100});F.value=u.data.records};return ae(()=>{h(["SUPER_ADMIN","REGION_MANAGER"])||U(),J()}),(u,l)=>{const m=p("el-col"),f=p("el-tab-pane"),g=p("el-tabs"),d=p("el-form-item"),k=p("el-input-number"),r=p("el-option"),V=p("el-select"),R=p("el-button"),A=p("el-checkbox"),W=p("el-checkbox-group"),q=p("el-input"),H=p("el-switch"),I=p("el-row"),K=p("el-form"),Q=p("el-card");return v(),y("div",re,[e(I,null,{default:t(()=>[E(h)(["SUPER_ADMIN","REGION_MANAGER"])?(v(),b(m,{key:0,style:{"padding-right":"16px"},span:4},{default:t(()=>[e(Y,{params:E(X)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:G},null,8,["params"])]),_:1})):C("",!0),e(m,{span:E(h)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:t(()=>[e(Q,{class:"tab-card"},{header:t(()=>[e(g,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=i=>n.value=i),onTabChange:z},{default:t(()=>[e(f,{label:"流程预警规则",name:"1"}),e(f,{label:"填报预警规则",name:"2"}),e(f,{label:"实施监管",name:"3"}),e(f,{label:"续建项目资金审批",name:"4"}),e(f,{label:"绩效评价通知",name:"5"})]),_:1},8,["modelValue"])]),default:t(()=>[e(K,{ref_key:"formRef",ref:T,model:a.value,rules:P,"label-position":"right","label-suffix":":","scroll-to-error":""},{default:t(()=>[e(I,null,{default:t(()=>[e(m,null,{default:t(()=>[e(d,{label:"规则",style:{"margin-bottom":"0"}}),(v(!0),y(te,null,oe(a.value.rule,(i,o)=>{var $;return v(),y("div",{key:o,class:"mb-8 flex items-center justify-between ruleBox"},[n.value==="1"||n.value==="4"?(v(),y("div",se,[l[6]||(l[6]=c("span",{class:"mr-4"},"当流程达到审核人,到达",-1)),e(d,{prop:`rule[${o}].adventTime`,rules:[{required:!0,message:"请输入"}],"label-width":"0",style:{"margin-bottom":"0",width:"80px"}},{default:t(()=>[e(k,{modelValue:a.value.rule[o].adventTime,"onUpdate:modelValue":s=>a.value.rule[o].adventTime=s,min:1,max:99999,precision:0,placeholder:"请输入",controls:!1},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),l[7]||(l[7]=c("span",{class:"ml-4"},"小时未处理时自动发送临期提醒,",-1)),l[8]||(l[8]=c("span",null,"超过",-1)),e(d,{prop:`rule[${o}].time`,rules:[{required:!0,message:"请输入"}],"label-width":"0",style:{"margin-bottom":"0",width:"150px"}},{default:t(()=>[e(k,{modelValue:i.time,"onUpdate:modelValue":s=>i.time=s,min:1,max:99999,precision:0,placeholder:"请输入"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c("span",me,"小时内没有"+j(n.value==="1"?"提交":"处理")+"时发送超期提醒",1),n.value==="1"?(v(),b(d,{key:0,label:"提醒对象",prop:`rule[${o}].notice`,rules:[{required:!0,message:"请选择"}],style:{"margin-bottom":"0"},class:"ml-40"},{default:t(()=>[e(V,{modelValue:a.value.rule[o].notice,"onUpdate:modelValue":s=>a.value.rule[o].notice=s,multiple:""},{default:t(()=>[e(r,{label:"项目联系人",value:1}),e(r,{label:"项目负责人",value:2})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):C("",!0)])):(v(),y("div",de,[l[9]||(l[9]=c("span",{class:"mr-4"},"当",-1)),e(d,{prop:`rule[${o}].biz`,rules:[{required:!0,message:"请选择"}],"label-width":"0",style:{"margin-bottom":"0",width:"150px"},class:"mr-8"},{default:t(()=>[n.value==="2"?(v(),b(V,{key:0,modelValue:a.value.rule[o].biz,"onUpdate:modelValue":s=>a.value.rule[o].biz=s},{default:t(()=>[e(r,{label:"预审申报",value:1}),e(r,{label:"建设方案申报",value:2}),e(r,{label:"采购结果备案",value:3}),e(r,{label:"初验备案",value:4}),e(r,{label:"验收申报",value:5})]),_:2},1032,["modelValue","onUpdate:modelValue"])):n.value==="3"?(v(),b(V,{key:1,modelValue:a.value.rule[o].biz,"onUpdate:modelValue":s=>a.value.rule[o].biz=s},{default:t(()=>[e(r,{label:"项目初验",value:1}),e(r,{label:"项目终验",value:2})]),_:2},1032,["modelValue","onUpdate:modelValue"])):n.value==="5"?(v(),b(V,{key:2,modelValue:a.value.rule[o].biz,"onUpdate:modelValue":s=>a.value.rule[o].biz=s},{default:t(()=>[e(r,{label:"单位自评",value:1}),e(r,{label:"自评确认",value:2}),e(r,{label:"项目复评",value:3}),e(r,{label:"上传回复单",value:4}),e(r,{label:"回复单审核",value:5}),e(r,{label:"专家核查",value:6}),e(r,{label:"项目整改",value:7}),e(r,{label:"整改核查",value:8})]),_:2},1032,["modelValue","onUpdate:modelValue"])):C("",!0)]),_:2},1032,["prop"]),e(d,{prop:`rule[${o}].adventTime`,rules:[{required:!0,message:"请输入"}],"label-width":"0",style:{"margin-bottom":"0",width:"80px"}},{default:t(()=>[e(k,{modelValue:a.value.rule[o].adventTime,"onUpdate:modelValue":s=>a.value.rule[o].adventTime=s,min:1,max:99999,precision:0,placeholder:"请输入",controls:!1},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),l[10]||(l[10]=c("span",{class:"ml-4"},"小时未处理时自动发送临期提醒,",-1)),l[11]||(l[11]=c("span",null,"超过",-1)),e(d,{prop:`rule[${o}].time`,rules:[{required:!0,message:"请输入"}],"label-width":"0",style:{"margin-bottom":"0",width:"80px"}},{default:t(()=>[e(k,{modelValue:a.value.rule[o].time,"onUpdate:modelValue":s=>a.value.rule[o].time=s,min:1,max:99999,precision:0,placeholder:"请输入",controls:!1},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),l[12]||(l[12]=c("span",{class:"ml-4"},"小时未处理时自动发送超期提醒",-1)),n.value==="2"||n.value==="3"?(v(),b(d,{key:0,label:"提醒对象",prop:`rule[${o}].notice`,rules:[{required:!0,message:"请选择"}],style:{"margin-bottom":"0"},class:"ml-40"},{default:t(()=>[e(V,{modelValue:a.value.rule[o].notice,"onUpdate:modelValue":s=>a.value.rule[o].notice=s,multiple:""},{default:t(()=>[e(r,{label:"项目联系人",value:1}),e(r,{label:"项目负责人",value:2})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):C("",!0)])),(($=a.value.rule)==null?void 0:$.length)>1?(v(),b(R,{key:2,type:"danger",link:"",onClick:s=>L(o)},{default:t(()=>l[13]||(l[13]=[w("删除")])),_:2},1032,["onClick"])):C("",!0)])}),128)),e(R,{icon:"Plus",type:"primary",plain:"",size:"small",class:"mb-16",onClick:B},{default:t(()=>l[14]||(l[14]=[w("添加规则")])),_:1})]),_:1}),e(m,null,{default:t(()=>[e(d,{label:"提醒方式",prop:"noticeMethod"},{default:t(()=>[e(W,{modelValue:a.value.noticeMethod,"onUpdate:modelValue":l[1]||(l[1]=i=>a.value.noticeMethod=i)},{default:t(()=>[e(A,{label:0},{default:t(()=>l[15]||(l[15]=[w("浙政钉工作通知")])),_:1}),e(A,{label:1},{default:t(()=>l[16]||(l[16]=[w("手机短信")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(m,null,{default:t(()=>[e(d,{label:"临期提醒文案",prop:"adventContent"},{default:t(()=>[e(q,{modelValue:a.value.adventContent,"onUpdate:modelValue":l[2]||(l[2]=i=>a.value.adventContent=i),type:"textarea",placeholder:"请输入",maxlength:100,"show-word-limit":""},null,8,["modelValue"]),c("p",null,"项目名称:{projectName},"+j(n.value==="1"?"流程类型:{flowType},":n.value==="4"?"":"环节名称:{stepName},")+"停留时间:{time},剩余时间:{time2}。",1)]),_:1})]),_:1}),e(m,null,{default:t(()=>[e(d,{label:"超期提醒文案",prop:"noticeContent"},{default:t(()=>[e(q,{modelValue:a.value.noticeContent,"onUpdate:modelValue":l[3]||(l[3]=i=>a.value.noticeContent=i),type:"textarea",placeholder:"请输入",maxlength:100,"show-word-limit":""},null,8,["modelValue"]),c("p",null,"项目名称:{projectName},"+j(n.value==="1"?"流程类型:{flowType},":n.value==="4"?"":"环节名称:{stepName},")+"停留时间:{time}。",1)]),_:1})]),_:1}),e(m,null,{default:t(()=>[e(d,{label:"是否启用",prop:"isOpen"},{default:t(()=>[e(H,{modelValue:a.value.isOpen,"onUpdate:modelValue":l[4]||(l[4]=i=>a.value.isOpen=i)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["span"])]),_:1}),c("div",pe,[e(R,{type:"primary",loading:M.value,onClick:l[5]||(l[5]=i=>S(T.value))},{default:t(()=>l[17]||(l[17]=[w("保存")])),_:1},8,["loading"])])])}}});export{Ve as default};