index-68edf3f4.js 3.1 KB

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