import{d as e,X as a,k as s,p as t,r as l,K as r,o as u,c as n,e as o,a as i,w as d,b as c,J as _,a2 as g,f as v,Q as m,O as p,B as h,D as f,_ as x}from"./index-018fb6dd.js";import{h as b}from"./http-338d117f.js";/* empty css             *//* empty css                   */const y=e=>(h("data-v-9b6e0038"),e=e(),f(),e),w={class:"page"},C={class:"header"},V={class:"set-box"},j={class:"set-box-item"},D=y((()=>o("label",{style:{color:"red","margin-right":"10px"}},"*",-1))),R={class:"set-box-item"},I=y((()=>o("label",{style:{color:"red","margin-right":"10px"}},"*",-1))),k={class:"set-box-item"},J=x(e({__name:"index",setup(e){const h=a("rolesIdentify"),f=s({charge_user_duration:0,no_charge_user_duration:0}),x=s(0),y=s(0),J=s(0),U=s(!0),z=e=>{y.value=e},B=e=>{x.value=e},H=()=>{return x.value<1?(p.error("请填写充值用户染色时间"),!1):y.value<1?(p.error("请填写未充值用户染色时间"),!1):x.value<=y.value?(p.error("充值用户染色时间应大于非充值用户染色时间"),!1):f.value.charge_user_duration==x.value&&f.value.no_charge_user_duration==y.value?(p.success("操作成功"),!0):void(e={charge_user_duration:x.value,no_charge_user_duration:y.value},b.post("/tuiguang/ranseConfig/setRanseDuration",e)).then((e=>{1e4==e.code&&(p.success(e.message),K())}));var e},K=async()=>{h.value.includes("optimizer")&&await b.get("/tuiguang/ranseConfig/getRanseDuration").then((e=>{1e4==e.code&&(f.value.charge_user_duration=e.data.charge_user_duration,f.value.no_charge_user_duration=e.data.no_charge_user_duration,x.value=e.data.charge_user_duration,y.value=e.data.no_charge_user_duration,J.value=1),U.value=!1})),J.value=1};return t((async()=>{await K()})),(e,a)=>{const s=l("el-text"),t=l("el-input-number"),p=l("el-button"),h=r("action");return u(),n("div",w,[o("div",C,[i(s,{class:"text-notice"},{default:d((()=>[c("注意事项")])),_:1}),i(s,{class:"text-notice"},{default:d((()=>[c("1.充值用户 >=n 分钟连续未登录，如果点击新连接，会归属于新链接的优化师")])),_:1}),i(s,{class:"text-notice"},{default:d((()=>[c("2.未充值用户 >=n 分钟连续未登录，如果点击新连接，会归属于新链接的优化师")])),_:1})]),_(o("div",V,[o("view",j,[i(s,{class:"lab-txt"},{default:d((()=>[D,c("非充值用户：")])),_:1}),i(t,{modelValue:v(y),"onUpdate:modelValue":a[0]||(a[0]=e=>m(y)?y.value=e:null),min:0,onChange:z},null,8,["modelValue"]),i(s,{style:{"margin-left":"10px",color:"555"}},{default:d((()=>[c("分")])),_:1})]),o("view",R,[i(s,{class:"lab-txt"},{default:d((()=>[I,c("充值用户：")])),_:1}),i(t,{modelValue:v(x),"onUpdate:modelValue":a[1]||(a[1]=e=>m(x)?x.value=e:null),min:0,onChange:B},null,8,["modelValue"]),i(s,{style:{"margin-left":"10px",color:"555"}},{default:d((()=>[c("分")])),_:1})]),_((u(),n("view",k,[i(p,{disabled:v(U),style:{"margin-left":"140px","margin-top":"30px"},type:"primary",onClick:H},{default:d((()=>[c("确认")])),_:1},8,["disabled"])])),[[h,"tuiguang.RanseConfig.setRanseDuration"]])],512),[[g,v(J)]])])}}}),[["__scopeId","data-v-9b6e0038"]]);export{J as default};
