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