/* empty css             *//* empty css                  *//* empty css                        *//* empty css                 *//* empty css                */import{d as a,au as e,m as s,x as t,ao as l,o as r,c as u,e as o,a as n,w as i,b as d,Z as c,ay as _,f as g,a9 as m,a7 as v,cA as p,ad as h,W as x,R as f,S as b,_ as y}from"./index-41bf27b7.js";import{h as j}from"./http-e55ef919.js";/* empty css                   *//* empty css                   */const w=a=>(f("data-v-9b6e0038"),a=a(),b(),a),C={class:"page"},R={class:"header"},V={class:"set-box"},D={class:"set-box-item"},I=w((()=>o("label",{style:{color:"red","margin-right":"10px"}},"*",-1))),U={class:"set-box-item"},W=w((()=>o("label",{style:{color:"red","margin-right":"10px"}},"*",-1))),k={class:"set-box-item"},z=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),z=s(0),A=s(!0),P=a=>{w.value=a},Q=a=>{y.value=a},S=()=>{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),Z())}));var a},Z=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,z.value=1),A.value=!1})),z.value=1};return t((async()=>{await Z()})),(a,e)=>{const s=p,t=h,v=x,f=l("action");return r(),u("div",C,[o("div",R,[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",V,[o("view",D,[n(s,{class:"lab-txt"},{default:i((()=>[I,d("非充值用户：")])),_:1}),n(t,{modelValue:g(w),"onUpdate:modelValue":e[0]||(e[0]=a=>m(w)?w.value=a:null),min:0,onChange:P},null,8,["modelValue"]),n(s,{style:{"margin-left":"10px",color:"555"}},{default:i((()=>[d("分")])),_:1})]),o("view",U,[n(s,{class:"lab-txt"},{default:i((()=>[W,d("充值用户：")])),_:1}),n(t,{modelValue:g(y),"onUpdate:modelValue":e[1]||(e[1]=a=>m(y)?y.value=a:null),min:0,onChange:Q},null,8,["modelValue"]),n(s,{style:{"margin-left":"10px",color:"555"}},{default:i((()=>[d("分")])),_:1})]),c((r(),u("view",k,[n(v,{disabled:g(A),style:{"margin-left":"140px","margin-top":"30px"},type:"primary",onClick:S},{default:i((()=>[d("确认")])),_:1},8,["disabled"])])),[[f,"tuiguang.RanseConfig.setRanseDuration"]])],512),[[_,g(z)]])])}}}),[["__scopeId","data-v-9b6e0038"]]);export{z as default};
