gtsoft-snail-job-server/snail-job-server/snail-job-server-ui/src/main/resources/admin/assets/index-BTor3ZHN.js

2 lines
17 KiB
JavaScript
Raw Normal View History

import{a as be,N as _e,b as ve}from"./search-form.vue_vue_type_script_setup_true_lang-B9DCSIZj.js";import{d as ae,Z as ee,r as A,a0 as te,a4 as z,z as he,A as Se,a as Te,$ as a,i as Ne,ao as we,p as ke,q as Ce,o as N,c as R,w as n,f as t,g as I,t as U,h as e,aO as De,ai as K,b as le,a1 as re,aH as se,a3 as ie,ab as fe,E as Ie,aa as de,H as Ue,aG as Le,D as Re,I as $e,B as X,aP as ue,aQ as Ve,aR as Oe,ac as O,aS as me,aI as xe,aT as ce,aU as ye,Y as q,L as je,ag as Be,ah as H,aV as Fe,at as Ge,F as Me,aj as Ae}from"./index-D11HRvLC.js";import{f as ze,a as Pe,b as Ee,c as He,d as pe,e as qe}from"./notify-BogCsml_.js";import{_ as Ke,u as We,a as Je}from"./table-oGN68_Ra.js";import{f as Qe,_ as Ye}from"./select-scene.vue_vue_type_script_setup_true_lang-UmFWq9QR.js";import{f as Ze}from"./workflow-B_Ogzjxw.js";import{h as Xe}from"./job-DWJU1EVy.js";import{_ as ge}from"./select-group.vue_vue_type_script_setup_true_lang-BV1AXeAr.js";import{_ as et,d as tt,c as at,a as nt,b as ot}from"./Grid-BEQeOJ6_.js";import{_ as lt,a as st}from"./DescriptionsItem-QSQ4JSXU.js";import{_ as it}from"./status-switch.vue_vue_type_script_setup_true_lang-Cv5sP_Gc.js";import{u as rt}from"./auth-B9UptQv2.js";import"./group-DBuDE6uz.js";const ut=ae({name:"NotifyConfigOperateDrawer",__name:"notify-config-operate-drawer",props:ee({operateType:{},rowData:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{},retrySceneDisable:{type:Boolean,default:!0},retrySceneDisableModifiers:{}}),emits:ee(["update:value","submitted"],["update:visible","update:retrySceneDisable"]),setup(w,{emit:x}){const f=A([]),g=A([]),y=A([]),k=A([]),_=w,S=x,v=te(w,"visible"),c=te(w,"retrySceneDisable"),i=A(z(ue)),{formRef:d,validate:j,restoreValidation:$}=he(),{defaultRequiredRule:C}=Se(),ne=Te(()=>({add:a("page.notifyConfig.addNotifyConfig"),edit:a("page.notifyConfig.editNotifyConfig")})[_.operateType]);Ne(()=>{we(()=>{oe()})});async function oe(){const m=await ze();f.value=m.data}const o=ke(W());function W(){return{groupName:null,businessId:"",recipientIds:[],systemTaskType:null,notifyStatus:1,notifyScene:null,notifyThreshold:16,rateLimiterStatus:0,rateLimiterThreshold:100,description:""}}const B={groupName:C,businessId:C,systemTaskType:C,notifyStatus:C,notifyScene:C,recipientIds:C,rateLimiterStatus:C,notifyThreshold:C};function J(){if(_.operateType==="add"){Object.assign(o,W()),c.value=!0;return}_.operateType==="edit"&&_.rowData&&(Object.assign(o,_.rowData),r(o.systemTaskType),l(o.notifyScene))}function Q(){v.value=!1}async function Y(){var m;if(await j(),_.operateType==="add"){const{groupName:s,businessId:u,recipientIds:T,systemTaskType:V,notifyStatus:L,notifyScene:D,notifyThreshold:b,rateLimiterStatus:F,rateLimiterThreshold:G,description:P}=o,{error:E}=await Pe({groupName:s,businessId:u,recipientIds:T,systemTaskType:V,notifyStatus:L,notifyScene:D,notifyThreshold:b,rateLimiterStatus:F,rateLimiterThreshold:G,description:P});if(E)return}if(_.operateType==="edit"){const{id:s,groupName:u,businessId:T,recipientIds:V,notifyStatus:L,systemTaskType:D,notifyScene:b,notifyThreshold:F,rateLimiterStatus:G,rateLimiterThreshold:P,description:E}=o,{error:Z}=await Ee({id:s,groupName:u,businessId:T,recipientIds:V,systemTaskType:D,notifyStatus:L,notifyScene:b,notifyThreshold:F,rateLimiterStatus:G,rateLimiterThreshold:P,description:E});if(Z)return}(m=window.$message)==null||m.success(a("common.updateSuccess")),Q(),S("submitted")}async function r(m){var s,u,T,V,L;if(m===1){const D=await Qe({groupName:o.groupName});g.value=D.data,i.value=z(ue)}else if(m===3){const D=await Xe({groupName:o.groupName});y.value=(s=D.data)==null?void 0:s.map(b=>(b.id=String(b.id),b)),i.value=z(Ve)}else if(m===4){const D=await Ze({groupName:o.groupName});k.value=(u=D.data)==null?void 0:u.map(b=>(b.id=String(b.id),b)),i.value=z(Oe)}m!==((T=_.rowData)==null?void 0:T.systemTaskType)?(o.businessId=null,o.notifyScene=null):(o.businessId=(V=_.rowData)==null?void 0:V.businessId,o.notifyScene=(L=_.rowData)==null?void 0:L.notifyScene)}async function l(m){c.value=!(m===5||m===6)}function h(m){J(),o.groupName=m,r(1),l(1)}return C