var v=Object.defineProperty;var c=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var d=(a,e,t)=>e in a?v(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,f=(a,e)=>{for(var t in e||(e={}))C.call(e,t)&&d(a,t,e[t]);if(c)for(var t of c(e))K.call(e,t)&&d(a,t,e[t]);return a};var m=(a,e,t)=>new Promise((s,r)=>{var i=n=>{try{o(t.next(n))}catch(l){r(l)}},u=n=>{try{o(t.throw(n))}catch(l){r(l)}},o=n=>n.done?s(n.value):Promise.resolve(n.value).then(i,u);o((t=t.apply(a,e)).next())});import{ab as b,d as N,a as _,r as y,u as P,B as h,i as p,q as L,ac as T,_ as w,H as V,p as j,k as q,aj as B,bC as S,e as k,d7 as D,bi as g,d8 as F,bn as E}from"./index.1121c4e8.js";import{g as M,s as O}from"./use-async.d0b957f3.js";import{C as U}from"./constant.b4bfe346.js";import{s as x}from"./api.66c2b040.js";import{N as G}from"./FormItemGridItem.9227cd2b.js";import"./searchs.b637f0d6.js";const I=a=>b({url:"/cbs-app/sysParamConfig/queryByParamName?paramName="+a,method:"get",requestType:"form"}),R=a=>b({url:"/cbs-app/sysParamConfig/update",method:"post",data:a}),z=N({name:"project-param-setting",props:{appKey:{type:String,default:"KT"}},setup(a){const e=_({id:null,paramValue:null,group:null}),t=y(),s=y(!1),r=P(),i=()=>a.appKey.toLowerCase()+"_frequency";h(()=>m(this,null,function*(){const{data:o}=yield I(i());o?(e.id=o.id,e.paramValue=o.paramValue,e.group=o.group):r.error("\u52A0\u8F7D\u914D\u7F6E\u53C2\u6570\u5931\u8D25")}));const u=()=>m(this,null,function*(){const o={group:e.group,configs:[f({},e)]};s.value=!0;try{const n=yield R(o);n&&n.code=="200"&&r.success("\u4FDD\u5B58\u6210\u529F")}catch(n){}s.value=!1});return()=>p(B,null,[p(L,{labelPlacement:"left",model:e,requireMarkPlacement:"left",ref:t},{default:()=>[p(T,{cols:1},{default:()=>[p(G,{label:"\u8BC4\u6D4B\u9891\u7387",path:"scope_of_attendance",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u9891\u7387",trigger:["blur","input"]}]},{default:()=>[p(w,{value:e.paramValue,"onUpdate:value":o=>e.paramValue=o,placeholder:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u9891\u7387",clearable:!0,style:"width:200px"},null)]})]})]}),V(p(j,{type:"primary",onClick:u,loading:s.value},{default:()=>[q("\u4FDD\u5B58\u8BBE\u7F6E")]}),[[S("auth"),"sysParamConfig/update1750838255892299777"]])])}});function A(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!E(a)}const $=N({name:"param-settings",setup(){const a=_({tabName:"KT",appKeyList:[],appNameList:[]}),e=k();M(s=>{s.form.tabName&&(a.tabName=s.form.tabName)});const t=s=>{O(s,"tabName",e)};return h(()=>m(this,null,function*(){{const s=Object.keys(U),{data:r}=yield x({page:1,rows:99,parentId:0});(r.rows||[]).forEach(u=>{s.includes(u.appKey)&&(a.appKeyList.push(u.appKey),a.appNameList.push(u.appName))})}})),()=>{let s;return p("div",{class:"system-menu-container"},[p("div",{class:["section-container"],style:"padding-top: 0"},[p(D,{type:"line",size:"large",value:a.tabName,"onUpdate:value":[r=>a.tabName=r,r=>t(r)]},A(s=a.appKeyList.map((r,i)=>g(F,{name:r,tab:a.appNameList[i]},{default:()=>g(z,{appKey:r})})))?s:{default:()=>[s]})])])}}});export{$ as default};