364 changed files with 9446 additions and 2610 deletions
@ -0,0 +1 @@ |
|||
{} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{_ as t,o,c as s,R as c}from"./CSjlBIfC.js";const r={},a={class:"min-h-screen","data-theme":"corporate"};function n(e,_){return o(),s("div",a,[c(e.$slots,"default")])}const l=t(r,[["render",n]]);export{l as default}; |
|||
import{_ as t,o,c as s,R as c}from"./AL6uUoB7.js";const r={},a={class:"min-h-screen","data-theme":"corporate"};function n(e,_){return o(),s("div",a,[c(e.$slots,"default")])}const l=t(r,[["render",n]]);export{l as default}; |
|||
@ -1 +1 @@ |
|||
import{L as y,l as x}from"./ChQPCk92.js";import{g as V,c as t,F as u,a as l,n as C,r,l as g,t as o,z as h,o as s,d as B,_ as N}from"./CSjlBIfC.js";const L={class:"lang-select"},O={class:"lang-chip-name"},S=["onClick"],j={key:0,class:"lang-empty"},z={key:0,class:"lang-dd"},F={class:"lang-dd-sum"},I={class:"lang-dd-panel"},T=["checked","onChange"],$={class:"lang-opt-code"},w={class:"lang-opt-name"},A=["value","disabled"],D=["value"],E=V({__name:"LangSelect",props:{modelValue:{},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},options:{default:void 0}},emits:["update:modelValue"],setup(c,{emit:f}){const d=c,m=f,p=h(()=>d.options&&d.options.length?d.options:y),i=h(()=>(d.modelValue||"").split(",").map(a=>a.trim()).filter(Boolean));function v(a){return x(a)}function _(a){if(d.disabled)return;const n=i.value.slice(),e=n.indexOf(a);e>=0?n.splice(e,1):n.push(a),m("update:modelValue",n.join(","))}function b(a){m("update:modelValue",a.target.value)}return(a,n)=>(s(),t("div",L,[c.multiple?(s(),t(u,{key:0},[l("div",{class:C(["lang-chips",{"lang-disabled":c.disabled}])},[(s(!0),t(u,null,r(i.value,e=>(s(),t("span",{key:e,class:"lang-chip"},[B(o(e),1),l("span",O,o(v(e)),1),l("button",{type:"button",class:"lang-x",onClick:k=>_(e)},"×",8,S)]))),128)),i.value.length?g("",!0):(s(),t("span",j,"未选择语言"))],2),c.disabled?g("",!0):(s(),t("details",z,[l("summary",F,"+ 选择语言(已选 "+o(i.value.length)+")",1),l("div",I,[(s(!0),t(u,null,r(p.value,e=>(s(),t("label",{key:e.code,class:"lang-opt"},[l("input",{type:"checkbox",class:"checkbox checkbox-xs checkbox-primary",checked:i.value.includes(e.code),onChange:k=>_(e.code)},null,40,T),l("span",$,o(e.code),1),l("span",w,o(e.name),1)]))),128))])]))],64)):(s(),t("select",{key:1,class:"select select-bordered select-sm w-full text-xs",value:c.modelValue,disabled:c.disabled,onChange:b},[n[0]||(n[0]=l("option",{value:""},"(未设置)",-1)),(s(!0),t(u,null,r(p.value,e=>(s(),t("option",{key:e.code,value:e.code},o(e.code)+" · "+o(e.name),9,D))),128))],40,A))]))}}),q=Object.assign(N(E,[["__scopeId","data-v-4903af59"]]),{__name:"LangSelect"});export{q as _}; |
|||
import{L as y,l as x}from"./DD3V9C6_.js";import{g as V,c as t,F as u,a as l,n as C,r,l as g,t as o,z as h,o as s,d as B,_ as N}from"./AL6uUoB7.js";const L={class:"lang-select"},O={class:"lang-chip-name"},S=["onClick"],j={key:0,class:"lang-empty"},z={key:0,class:"lang-dd"},F={class:"lang-dd-sum"},I={class:"lang-dd-panel"},T=["checked","onChange"],$={class:"lang-opt-code"},w={class:"lang-opt-name"},A=["value","disabled"],D=["value"],E=V({__name:"LangSelect",props:{modelValue:{},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},options:{default:void 0}},emits:["update:modelValue"],setup(c,{emit:f}){const d=c,m=f,p=h(()=>d.options&&d.options.length?d.options:y),i=h(()=>(d.modelValue||"").split(",").map(a=>a.trim()).filter(Boolean));function v(a){return x(a)}function _(a){if(d.disabled)return;const n=i.value.slice(),e=n.indexOf(a);e>=0?n.splice(e,1):n.push(a),m("update:modelValue",n.join(","))}function b(a){m("update:modelValue",a.target.value)}return(a,n)=>(s(),t("div",L,[c.multiple?(s(),t(u,{key:0},[l("div",{class:C(["lang-chips",{"lang-disabled":c.disabled}])},[(s(!0),t(u,null,r(i.value,e=>(s(),t("span",{key:e,class:"lang-chip"},[B(o(e),1),l("span",O,o(v(e)),1),l("button",{type:"button",class:"lang-x",onClick:k=>_(e)},"×",8,S)]))),128)),i.value.length?g("",!0):(s(),t("span",j,"未选择语言"))],2),c.disabled?g("",!0):(s(),t("details",z,[l("summary",F,"+ 选择语言(已选 "+o(i.value.length)+")",1),l("div",I,[(s(!0),t(u,null,r(p.value,e=>(s(),t("label",{key:e.code,class:"lang-opt"},[l("input",{type:"checkbox",class:"checkbox checkbox-xs checkbox-primary",checked:i.value.includes(e.code),onChange:k=>_(e.code)},null,40,T),l("span",$,o(e.code),1),l("span",w,o(e.name),1)]))),128))])]))],64)):(s(),t("select",{key:1,class:"select select-bordered select-sm w-full text-xs",value:c.modelValue,disabled:c.disabled,onChange:b},[n[0]||(n[0]=l("option",{value:""},"(未设置)",-1)),(s(!0),t(u,null,r(p.value,e=>(s(),t("option",{key:e.code,value:e.code},o(e.code)+" · "+o(e.name),9,D))),128))],40,A))]))}}),q=Object.assign(N(E,[["__scopeId","data-v-4903af59"]]),{__name:"LangSelect"});export{q as _}; |
|||
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{j as w,k as d}from"./CSjlBIfC.js";import{u as h}from"./CgE-6DOq.js";async function f(o,i,a){const e=w(),u=d(),s={"Content-Type":"application/json"};e.token&&(s.Authorization=e.token),a&&Object.assign(s,a);const t=await fetch(o,{method:"POST",headers:s,body:JSON.stringify(i)});if(!t.ok)throw new Error(`HTTP error: ${t.status}`);const n=await t.json();if(n.code===18)throw e.logout(),u.push("/"),new Error(n.msg||"Unauthorized");if(n.code!==0)throw new Error(n.msg||"Unknown error");return n.data}const y=/^(get|list|load|query|fetch|search|count|stat|export|check)/i;function g(o){return!y.test(o)}function A(){const o=w(),{begin:i,end:a}=h();async function e(t,n){const r={};if(o.currentAppId&&(r["X-App-Id"]=String(o.currentAppId)),!g(t))return f(`/web/api/api_${t}`,n??{},r);i();try{return await f(`/web/api/api_${t}`,n??{},r)}finally{a()}}async function u(t,n){return f(`/console/api/${t}`,n??{})}async function s(t,n){const r=t.type||"application/octet-stream",c=await e("getcostoken",{path:n,filename:t.name,content_type:r}),p=c.upload_url||c.url||"";if(!p)throw new Error("未获取到上传地址:请确认已在【第三方服务配置→存储】配置并启用「阿里云 OSS」");const l=await fetch(p,{method:"PUT",headers:{"Content-Type":r},body:t});if(!l.ok)throw new Error(`Upload failed: ${l.status}`);return c.url||p.split("?")[0]}return{webApi:e,consoleApi:u,uploadFile:s}}export{A as u}; |
|||
import{j as w,k as d}from"./AL6uUoB7.js";import{u as h}from"./mydnAiU4.js";async function f(o,i,a){const e=w(),u=d(),s={"Content-Type":"application/json"};e.token&&(s.Authorization=e.token),a&&Object.assign(s,a);const t=await fetch(o,{method:"POST",headers:s,body:JSON.stringify(i)});if(!t.ok)throw new Error(`HTTP error: ${t.status}`);const n=await t.json();if(n.code===18)throw e.logout(),u.push("/"),new Error(n.msg||"Unauthorized");if(n.code!==0)throw new Error(n.msg||"Unknown error");return n.data}const y=/^(get|list|load|query|fetch|search|count|stat|export|check)/i;function g(o){return!y.test(o)}function A(){const o=w(),{begin:i,end:a}=h();async function e(t,n){const r={};if(o.currentAppId&&(r["X-App-Id"]=String(o.currentAppId)),!g(t))return f(`/web/api/api_${t}`,n??{},r);i();try{return await f(`/web/api/api_${t}`,n??{},r)}finally{a()}}async function u(t,n){return f(`/console/api/${t}`,n??{})}async function s(t,n){const r=t.type||"application/octet-stream",c=await e("getcostoken",{path:n,filename:t.name,content_type:r}),p=c.upload_url||c.url||"";if(!p)throw new Error("未获取到上传地址:请确认已在【第三方服务配置→存储】配置并启用「阿里云 OSS」");const l=await fetch(p,{method:"PUT",headers:{"Content-Type":r},body:t});if(!l.ok)throw new Error(`Upload failed: ${l.status}`);return c.url||p.split("?")[0]}return{webApi:e,consoleApi:u,uploadFile:s}}export{A as u}; |
|||
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{g as h,j as x,k as w,B as y,c as r,a as e,t as d,l as b,m as _,p as v,v as g,n as k,y as B,x as u,o as p,_ as M}from"./CSjlBIfC.js";const A={class:"login-bg flex items-center justify-center px-4"},z={class:"login-card"},C={class:"text-center"},S={style:{"font-size":"22px","font-weight":"700",color:"#0F172A",margin:"0 0 4px"}},T={key:0,class:"login-error show"},V={style:{width:"16px",height:"16px","flex-shrink":"0"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},j={style:{"margin-bottom":"16px"}},D={style:{"margin-bottom":"24px"}},q=h({__name:"index",setup(L){const a=x(),c=w(),o=B({account:"",password:""}),l=u(!1),n=u(""),m=u("Admin");y(async()=>{if(a.restore(),a.token){c.push("/dashboard");return}try{const t=(await $fetch("/web/api/api_getsiteinfo",{method:"POST",body:{}}))?.data?.sitename;t&&(m.value=t+" Admin",a.setSiteTitle(t))}catch{}});async function f(){l.value=!0,n.value="";try{const s=await $fetch("/web/api/api_login",{method:"POST",body:{account:o.account,password:o.password}});s.code===0&&s.data?(a.setLoginData(s.data),c.push("/dashboard")):n.value=s.msg||"登录失败"}catch{n.value="网络错误,请检查连接"}finally{l.value=!1}}return(s,t)=>(p(),r("div",A,[e("div",z,[e("div",C,[t[2]||(t[2]=e("div",{class:"logo-icon"},[e("svg",{class:"h-7 w-7 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})])],-1)),e("h1",S,d(m.value),1),t[3]||(t[3]=e("p",{style:{"font-size":"13px",color:"#94A3B8",margin:"0 0 32px"}},"管理控制台",-1))]),n.value?(p(),r("div",T,[(p(),r("svg",V,[...t[4]||(t[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])),e("span",null,d(n.value),1)])):b("",!0),e("form",{onSubmit:_(f,["prevent"])},[e("div",j,[t[5]||(t[5]=e("label",{class:"login-label"},"账号",-1)),v(e("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>o.account=i),type:"text",class:"login-input",placeholder:"请输入管理员账号",autocomplete:"username",required:""},null,512),[[g,o.account]])]),e("div",D,[t[6]||(t[6]=e("label",{class:"login-label"},"密码",-1)),v(e("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>o.password=i),type:"password",class:"login-input",placeholder:"请输入密码",autocomplete:"current-password",required:""},null,512),[[g,o.password]])]),e("button",{type:"submit",class:k(["login-btn",{loading:l.value}])},d(l.value?"登录中...":"登 录"),3)],32),t[7]||(t[7]=e("p",{style:{"text-align":"center","font-size":"11px",color:"#94A3B8","margin-top":"24px"}}," © 2025 Admin Console · v1.0.1 ",-1))])]))}}),O=M(q,[["__scopeId","data-v-3a3bca03"]]);export{O as default}; |
|||
import{g as h,j as x,k as w,B as y,c as r,a as e,t as d,l as b,m as _,p as v,v as g,n as k,y as B,x as u,o as p,_ as M}from"./AL6uUoB7.js";const A={class:"login-bg flex items-center justify-center px-4"},z={class:"login-card"},C={class:"text-center"},S={style:{"font-size":"22px","font-weight":"700",color:"#0F172A",margin:"0 0 4px"}},T={key:0,class:"login-error show"},V={style:{width:"16px",height:"16px","flex-shrink":"0"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},j={style:{"margin-bottom":"16px"}},D={style:{"margin-bottom":"24px"}},q=h({__name:"index",setup(L){const a=x(),c=w(),o=B({account:"",password:""}),l=u(!1),n=u(""),m=u("Admin");y(async()=>{if(a.restore(),a.token){c.push("/dashboard");return}try{const t=(await $fetch("/web/api/api_getsiteinfo",{method:"POST",body:{}}))?.data?.sitename;t&&(m.value=t+" Admin",a.setSiteTitle(t))}catch{}});async function f(){l.value=!0,n.value="";try{const s=await $fetch("/web/api/api_login",{method:"POST",body:{account:o.account,password:o.password}});s.code===0&&s.data?(a.setLoginData(s.data),c.push("/dashboard")):n.value=s.msg||"登录失败"}catch{n.value="网络错误,请检查连接"}finally{l.value=!1}}return(s,t)=>(p(),r("div",A,[e("div",z,[e("div",C,[t[2]||(t[2]=e("div",{class:"logo-icon"},[e("svg",{class:"h-7 w-7 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})])],-1)),e("h1",S,d(m.value),1),t[3]||(t[3]=e("p",{style:{"font-size":"13px",color:"#94A3B8",margin:"0 0 32px"}},"管理控制台",-1))]),n.value?(p(),r("div",T,[(p(),r("svg",V,[...t[4]||(t[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])),e("span",null,d(n.value),1)])):b("",!0),e("form",{onSubmit:_(f,["prevent"])},[e("div",j,[t[5]||(t[5]=e("label",{class:"login-label"},"账号",-1)),v(e("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>o.account=i),type:"text",class:"login-input",placeholder:"请输入管理员账号",autocomplete:"username",required:""},null,512),[[g,o.account]])]),e("div",D,[t[6]||(t[6]=e("label",{class:"login-label"},"密码",-1)),v(e("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>o.password=i),type:"password",class:"login-input",placeholder:"请输入密码",autocomplete:"current-password",required:""},null,512),[[g,o.password]])]),e("button",{type:"submit",class:k(["login-btn",{loading:l.value}])},d(l.value?"登录中...":"登 录"),3)],32),t[7]||(t[7]=e("p",{style:{"text-align":"center","font-size":"11px",color:"#94A3B8","margin-top":"24px"}}," © 2025 Admin Console · v1.0.1 ",-1))])]))}}),O=M(q,[["__scopeId","data-v-3a3bca03"]]);export{O as default}; |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +0,0 @@ |
|||
import{g as G,B as K,Q as P,c as a,a as e,d as u,p as x,q as M,F as f,r as U,v as Q,s as Y,t as n,x as i,z as E,o,n as F,l as I,_ as Z}from"./CSjlBIfC.js";import{u as J}from"./CX31_Ko0.js";import{u as W}from"./QmZ_XupB.js";import"./CgE-6DOq.js";const X=globalThis.setInterval,$={class:"flex items-center justify-between mb-4 flex-wrap gap-3"},tt={class:"flex items-center gap-2 flex-wrap"},et=["value"],st={class:"flex items-center gap-1 text-xs text-slate-500 cursor-pointer"},lt={class:"flex items-center gap-4 mb-3 text-xs text-slate-500"},nt={class:"text-slate-700"},at={class:"text-slate-700"},ot={class:"text-slate-700"},rt={class:"muted"},ut={class:"panel overflow-hidden"},it={id:"logBody",style:{"max-height":"calc(100vh - 230px)","overflow-y":"auto"}},ct={key:0,class:"text-center text-slate-400 py-10"},dt={key:1,class:"text-center text-red-400 py-10"},vt={key:2,class:"text-center text-slate-400 py-10"},pt={class:"t"},mt={class:"app-name"},ft={key:0,class:"unreg",title:"该应用名未在 console 注册,快照已收到但不会写入统计库"},gt={key:1,class:"muted"},xt={class:"muted"},_t={class:"muted"},yt={class:"muted"},bt={key:0,class:"muted"},ht={class:"t"},wt={key:0,class:"late"},kt=G({__name:"statlog",setup(Ct){const{webApi:A}=J(),{success:O,error:R}=W(),z={cn:"中国",us:"美国",ea:"东亚",sea:"东南亚",sa:"南亚",me:"中东",eu:"欧洲",ru:"俄罗斯",af:"非洲",sam:"南美",nam:"北美",oc:"大洋洲",br:"巴西",in:"印度"};function D(l){return l?z[l]||l:"-"}const c=i([]),_=i(!1),g=i(""),L=i("-"),N=i("-"),y=i(""),v=i(0),b=i(""),h=i(""),w=i(!1);let d=null;function p(l=0){const s=new Date(Date.now()+l*864e5),t=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit"}).format(s);return parseInt(t.replace(/-/g,""),10)}function k(l){const s=""+l;return s.length===8?s.slice(0,4)+"-"+s.slice(4,6)+"-"+s.slice(6,8):s}function C(l){if(!l)return"--";const s=new Date(l*1e3),t=r=>r<10?"0"+r:""+r;return t(s.getHours())+":"+t(s.getMinutes())+":"+t(s.getSeconds())}function S(l){return l?"0x"+(l>>>0).toString(16).toUpperCase():"全部"}const V=E(()=>[{value:p(0),label:"今天 "+k(p(0))},{value:p(-1),label:"昨天 "+k(p(-1))}]);function B(l){return l==="error"?{cls:"lv-error",txt:"解析失败"}:l==="warn"?{cls:"lv-warn",txt:"未落库"}:{cls:"lv-info",txt:"已落库"}}function H(l){return!!(l.snap_ts&&l.ts&&l.ts-l.snap_ts>120)}const T=E(()=>{const l=b.value,s=h.value.trim().toLowerCase();return c.value.filter(t=>!(l&&t.level!==l||s&&((t.app||"")+" "+(t.region||"")+" "+D(t.region)+" "+(t.product_id||"")+" "+S(t.product_id)+" "+(t.stat_day||"")).toLowerCase().indexOf(s)<0))});async function m(){_.value=!0,g.value="";try{const l=await A("getstatlogs",{day:v.value||0});c.value=l?.entries||[],L.value=l?.total!=null?l.total:c.value.length,N.value=c.value.length?C(c.value[0].ts):"--"}catch(l){g.value=l?.message||"网络异常"}finally{_.value=!1}}async function j(){const l=v.value||0,s=V.value.find(r=>r.value===l),t=s?s.label:""+l;if(window.confirm("确定清空「"+t+`」的接收流水吗?
|
|||
|
|||
只清除本核对面板的记录,不影响已落库的统计数据。 |
|||
清空后可重新触发埋点,观察是否正常进来。`))try{const r=await A("clearstatlogs",{day:l});O("已清空 "+(r&&r.cleared!=null?r.cleared:0)+" 条"),m()}catch(r){R("清空失败:"+(r?.message||"网络异常"))}}function q(){w.value?(d=X(m,15e3),y.value="· 每 15 秒自动刷新"):(d&&clearInterval(d),d=null,y.value="")}return K(()=>{v.value=p(0),m()}),P(()=>{d&&clearInterval(d)}),(l,s)=>(o(),a("div",null,[e("div",$,[s[6]||(s[6]=e("div",null,[e("h2",{class:"text-lg font-bold text-slate-700"},"统计日志"),e("p",{class:"text-xs text-slate-400 mt-0.5"},[u("console 从 NATS 收到的「当日统计快照」接收流水(最新在前,按接收时间分天存 Redis)。各业务部署每个同步周期/启动时/0点 推送一次当日绝对快照,console 收到后覆盖落库。用于核对每个部署是否在正常汇报;带 "),e("span",{class:"unreg"},"未注册"),u(" 的应用快照已收到但"),e("b",null,"不会落库"),u("(应用名需与 console 注册表完全一致)。")])],-1)),e("div",tt,[x(e("select",{"onUpdate:modelValue":s[0]||(s[0]=t=>v.value=t),class:"select select-bordered select-sm",onChange:m},[(o(!0),a(f,null,U(V.value,t=>(o(),a("option",{key:t.value,value:t.value},n(t.label),9,et))),128))],544),[[M,v.value,void 0,{number:!0}]]),x(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>b.value=t),class:"select select-bordered select-sm"},[...s[4]||(s[4]=[e("option",{value:""},"全部级别",-1),e("option",{value:"info"},"已落库",-1),e("option",{value:"warn"},"未落库",-1),e("option",{value:"error"},"解析失败",-1)])],512),[[M,b.value]]),x(e("input",{"onUpdate:modelValue":s[2]||(s[2]=t=>h.value=t),class:"input input-bordered input-sm w-44",placeholder:"筛选 应用/区域/产品"},null,512),[[Q,h.value]]),e("label",st,[x(e("input",{"onUpdate:modelValue":s[3]||(s[3]=t=>w.value=t),type:"checkbox",class:"checkbox checkbox-xs",onChange:q},null,544),[[Y,w.value]]),s[5]||(s[5]=u(" 自动刷新 ",-1))]),e("button",{class:"btn btn-primary btn-sm text-white",onClick:m},"刷新"),e("button",{class:"btn btn-outline btn-error btn-sm",title:"清空本日核对流水(不影响已落库的统计数据),清空后可重新观察埋点是否正常进来",onClick:j},"清空本日")])]),e("div",lt,[e("span",null,[s[7]||(s[7]=u("该日保留 ",-1)),e("b",nt,n(L.value),1),s[8]||(s[8]=u(" 条",-1))]),e("span",null,[s[9]||(s[9]=u("当前显示 ",-1)),e("b",at,n(T.value.length),1),s[10]||(s[10]=u(" 条",-1))]),e("span",null,[s[11]||(s[11]=u("最近接收 ",-1)),e("b",ot,n(N.value),1)]),e("span",rt,n(y.value),1)]),e("div",ut,[s[12]||(s[12]=e("div",{id:"logHead"},[e("div",null,"接收时间"),e("div",null,"级别"),e("div",null,"应用 · 区域 · 产品"),e("div",null,"统计日"),e("div",null,"指标摘要 / 说明"),e("div",null,"快照时间")],-1)),e("div",it,[_.value?(o(),a("div",ct,"加载中...")):g.value?(o(),a("div",dt,"加载失败:"+n(g.value),1)):T.value.length?(o(!0),a(f,{key:3},U(T.value,(t,r)=>(o(),a("div",{key:r,class:"logrow"},[e("div",pt,n(C(t.ts)),1),e("div",null,[e("span",{class:F(["lv",B(t.level).cls])},n(B(t.level).txt),3)]),e("div",null,[t.app?(o(),a(f,{key:0},[e("span",mt,n(t.app),1),t.registered?I("",!0):(o(),a("span",ft,"未注册"))],64)):(o(),a("span",gt,"(无应用名)")),e("span",xt," · "+n(D(t.region)),1),e("span",_t," · "+n(S(t.product_id)),1)]),e("div",yt,n(t.stat_day?k(t.stat_day):"-"),1),e("div",null,[t.msg?(o(),a(f,{key:0},[e("span",{class:F(t.level==="error"?"text-red-600":"text-amber-600")},n(t.msg),3),t.summary?(o(),a("span",bt," · "+n(t.summary),1)):I("",!0)],64)):(o(),a(f,{key:1},[u(n(t.summary||"无增量"),1)],64))]),e("div",ht,[u(n(C(t.snap_ts)),1),H(t)?(o(),a("span",wt,"迟到"+n(t.ts-t.snap_ts)+"s",1)):I("",!0)])]))),128)):(o(),a("div",vt,n(c.value.length?"无匹配记录":"该日暂无接收记录"),1))])])]))}}),Lt=Z(kt,[["__scopeId","data-v-742ee359"]]);export{Lt as default};
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{_ as s}from"./D1rGIbQk.js";import{_ as a,o as i,c as u,a as t,t as n,b as c,w as l,d}from"./CSjlBIfC.js";import{u as f}from"./CDbX0LeJ.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,_)=>{const o=s;return i(),u("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},z=a(y,[["__scopeId","data-v-52418c85"]]);export{z as default}; |
|||
import{_ as s}from"./CCixCNzH.js";import{_ as a,o as i,c as u,a as t,t as n,b as c,w as l,d}from"./AL6uUoB7.js";import{u as f}from"./eNlViwMf.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,_)=>{const o=s;return i(),u("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},z=a(y,[["__scopeId","data-v-52418c85"]]);export{z as default}; |
|||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||
const o=[{code:"zh-CN",name:"中文(简体)"},{code:"zh-TW",name:"中文(繁体)"},{code:"zh-HK",name:"中文(香港)"},{code:"yue-HK",name:"粤语"},{code:"en-US",name:"英语(美国)"},{code:"en-GB",name:"英语(英国)"},{code:"ja-JP",name:"日语"},{code:"ko-KR",name:"韩语"},{code:"id-ID",name:"印尼语"},{code:"es-ES",name:"西班牙语(西)"},{code:"es-MX",name:"西班牙语(墨)"},{code:"pt-BR",name:"葡萄牙语(巴西)"},{code:"pt-PT",name:"葡萄牙语(葡)"},{code:"de-DE",name:"德语"},{code:"fr-FR",name:"法语"},{code:"it-IT",name:"意大利语"},{code:"nl-NL",name:"荷兰语"},{code:"pl-PL",name:"波兰语"},{code:"ru-RU",name:"俄语"},{code:"uk-UA",name:"乌克兰语"},{code:"tr-TR",name:"土耳其语"},{code:"vi-VN",name:"越南语"},{code:"th-TH",name:"泰语"},{code:"ms-MY",name:"马来语"},{code:"fil-PH",name:"菲律宾语"},{code:"ar-SA",name:"阿拉伯语"}];function c(e){const n=o.find(a=>a.code===e);return n?n.name:e}export{o as L,c as l}; |
|||
@ -0,0 +1,4 @@ |
|||
import{g as G,B as K,Q as P,c as a,a as e,d as u,p as g,q as M,F as f,r as U,v as Q,s as Y,t as n,x as i,z as E,o,n as F,l as I,_ as Z}from"./AL6uUoB7.js";import{u as J}from"./BgfmgSoF.js";import{u as W}from"./D_urMdl7.js";import"./mydnAiU4.js";const X=globalThis.setInterval,$={class:"flex items-center justify-between mb-4 flex-wrap gap-3"},tt={class:"flex items-center gap-2 flex-wrap"},et=["value"],st={class:"flex items-center gap-1 text-xs text-slate-500 cursor-pointer"},lt={class:"flex items-center gap-4 mb-3 text-xs text-slate-500"},nt={class:"text-slate-700"},at={class:"text-slate-700"},ot={class:"text-slate-700"},rt={class:"muted"},ut={class:"panel overflow-hidden"},it={id:"logBody",style:{"max-height":"calc(100vh - 230px)","overflow-y":"auto"}},ct={key:0,class:"text-center text-slate-400 py-10"},dt={key:1,class:"text-center text-red-400 py-10"},vt={key:2,class:"text-center text-slate-400 py-10"},pt={class:"t"},mt={class:"app-name"},ft={key:0,class:"unreg",title:"该应用名未在 console 注册,快照已收到但不会写入统计库"},_t={key:1,class:"muted"},gt={class:"muted"},xt={class:"muted"},yt={class:"muted"},bt={class:"muted"},ht={key:0,class:"muted"},wt={class:"t"},kt={key:0,class:"late"},Ct=G({__name:"statlog",setup(Tt){const{webApi:A}=J(),{success:O,error:R}=W(),z={cn:"中国",us:"美国",ea:"东亚",sea:"东南亚",sa:"南亚",me:"中东",eu:"欧洲",ru:"俄罗斯",af:"非洲",sam:"南美",nam:"北美",oc:"大洋洲",br:"巴西",in:"印度"};function D(l){return l?z[l]||l:"-"}const c=i([]),x=i(!1),_=i(""),L=i("-"),N=i("-"),y=i(""),v=i(0),b=i(""),h=i(""),w=i(!1);let d=null;function p(l=0){const s=new Date(Date.now()+l*864e5),t=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit"}).format(s);return parseInt(t.replace(/-/g,""),10)}function k(l){const s=""+l;return s.length===8?s.slice(0,4)+"-"+s.slice(4,6)+"-"+s.slice(6,8):s}function C(l){if(!l)return"--";const s=new Date(l*1e3),t=r=>r<10?"0"+r:""+r;return t(s.getHours())+":"+t(s.getMinutes())+":"+t(s.getSeconds())}function S(l){return l?"0x"+(l>>>0).toString(16).toUpperCase():"全部"}const V=E(()=>[{value:p(0),label:"今天 "+k(p(0))},{value:p(-1),label:"昨天 "+k(p(-1))}]);function B(l){return l==="error"?{cls:"lv-error",txt:"解析失败"}:l==="warn"?{cls:"lv-warn",txt:"未落库"}:{cls:"lv-info",txt:"已落库"}}function H(l){return!!(l.snap_ts&&l.ts&&l.ts-l.snap_ts>120)}const T=E(()=>{const l=b.value,s=h.value.trim().toLowerCase();return c.value.filter(t=>!(l&&t.level!==l||s&&((t.app||"")+" "+(t.region||"")+" "+D(t.region)+" "+(t.product_id||"")+" "+S(t.product_id)+" "+(t.channel_id||"")+" "+(t.stat_day||"")).toLowerCase().indexOf(s)<0))});async function m(){x.value=!0,_.value="";try{const l=await A("getstatlogs",{day:v.value||0});c.value=l?.entries||[],L.value=l?.total!=null?l.total:c.value.length,N.value=c.value.length?C(c.value[0].ts):"--"}catch(l){_.value=l?.message||"网络异常"}finally{x.value=!1}}async function j(){const l=v.value||0,s=V.value.find(r=>r.value===l),t=s?s.label:""+l;if(window.confirm("确定清空「"+t+`」的接收流水吗?
|
|||
|
|||
只清除本核对面板的记录,不影响已落库的统计数据。 |
|||
清空后可重新触发埋点,观察是否正常进来。`))try{const r=await A("clearstatlogs",{day:l});O("已清空 "+(r&&r.cleared!=null?r.cleared:0)+" 条"),m()}catch(r){R("清空失败:"+(r?.message||"网络异常"))}}function q(){w.value?(d=X(m,15e3),y.value="· 每 15 秒自动刷新"):(d&&clearInterval(d),d=null,y.value="")}return K(()=>{v.value=p(0),m()}),P(()=>{d&&clearInterval(d)}),(l,s)=>(o(),a("div",null,[e("div",$,[s[6]||(s[6]=e("div",null,[e("h2",{class:"text-lg font-bold text-slate-700"},"统计日志"),e("p",{class:"text-xs text-slate-400 mt-0.5"},[u("console 从 NATS 收到的「当日统计快照」接收流水(最新在前,按接收时间分天存 Redis)。各业务部署每个同步周期/启动时/0点 推送一次当日绝对快照,console 收到后覆盖落库。用于核对每个部署是否在正常汇报;带 "),e("span",{class:"unreg"},"未注册"),u(" 的应用快照已收到但"),e("b",null,"不会落库"),u("(应用名需与 console 注册表完全一致)。")])],-1)),e("div",tt,[g(e("select",{"onUpdate:modelValue":s[0]||(s[0]=t=>v.value=t),class:"select select-bordered select-sm",onChange:m},[(o(!0),a(f,null,U(V.value,t=>(o(),a("option",{key:t.value,value:t.value},n(t.label),9,et))),128))],544),[[M,v.value,void 0,{number:!0}]]),g(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>b.value=t),class:"select select-bordered select-sm"},[...s[4]||(s[4]=[e("option",{value:""},"全部级别",-1),e("option",{value:"info"},"已落库",-1),e("option",{value:"warn"},"未落库",-1),e("option",{value:"error"},"解析失败",-1)])],512),[[M,b.value]]),g(e("input",{"onUpdate:modelValue":s[2]||(s[2]=t=>h.value=t),class:"input input-bordered input-sm w-44",placeholder:"筛选 应用/区域/产品/渠道商"},null,512),[[Q,h.value]]),e("label",st,[g(e("input",{"onUpdate:modelValue":s[3]||(s[3]=t=>w.value=t),type:"checkbox",class:"checkbox checkbox-xs",onChange:q},null,544),[[Y,w.value]]),s[5]||(s[5]=u(" 自动刷新 ",-1))]),e("button",{class:"btn btn-primary btn-sm text-white",onClick:m},"刷新"),e("button",{class:"btn btn-outline btn-error btn-sm",title:"清空本日核对流水(不影响已落库的统计数据),清空后可重新观察埋点是否正常进来",onClick:j},"清空本日")])]),e("div",lt,[e("span",null,[s[7]||(s[7]=u("该日保留 ",-1)),e("b",nt,n(L.value),1),s[8]||(s[8]=u(" 条",-1))]),e("span",null,[s[9]||(s[9]=u("当前显示 ",-1)),e("b",at,n(T.value.length),1),s[10]||(s[10]=u(" 条",-1))]),e("span",null,[s[11]||(s[11]=u("最近接收 ",-1)),e("b",ot,n(N.value),1)]),e("span",rt,n(y.value),1)]),e("div",ut,[s[12]||(s[12]=e("div",{id:"logHead"},[e("div",null,"接收时间"),e("div",null,"级别"),e("div",null,"应用 · 区域 · 产品 · 渠道商"),e("div",null,"统计日"),e("div",null,"指标摘要 / 说明"),e("div",null,"快照时间")],-1)),e("div",it,[x.value?(o(),a("div",ct,"加载中...")):_.value?(o(),a("div",dt,"加载失败:"+n(_.value),1)):T.value.length?(o(!0),a(f,{key:3},U(T.value,(t,r)=>(o(),a("div",{key:r,class:"logrow"},[e("div",pt,n(C(t.ts)),1),e("div",null,[e("span",{class:F(["lv",B(t.level).cls])},n(B(t.level).txt),3)]),e("div",null,[t.app?(o(),a(f,{key:0},[e("span",mt,n(t.app),1),t.registered?I("",!0):(o(),a("span",ft,"未注册"))],64)):(o(),a("span",_t,"(无应用名)")),e("span",gt," · "+n(D(t.region)),1),e("span",xt," · "+n(S(t.product_id)),1),e("span",yt," · "+n(t.channel_id||"未分配渠道"),1)]),e("div",bt,n(t.stat_day?k(t.stat_day):"-"),1),e("div",null,[t.msg?(o(),a(f,{key:0},[e("span",{class:F(t.level==="error"?"text-red-600":"text-amber-600")},n(t.msg),3),t.summary?(o(),a("span",ht," · "+n(t.summary),1)):I("",!0)],64)):(o(),a(f,{key:1},[u(n(t.summary||"无增量"),1)],64))]),e("div",wt,[u(n(C(t.snap_ts)),1),H(t)?(o(),a("span",kt,"迟到"+n(t.ts-t.snap_ts)+"s",1)):I("",!0)])]))),128)):(o(),a("div",vt,n(c.value.length?"无匹配记录":"该日暂无接收记录"),1))])])]))}}),Nt=Z(Ct,[["__scopeId","data-v-e7a3debc"]]);export{Nt as default};
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||
const a=[{code:"zh-CN",name:"中文(简体)"},{code:"zh-TW",name:"中文(繁体)"},{code:"zh-HK",name:"中文(香港)"},{code:"yue-HK",name:"粤语"},{code:"en-US",name:"英语(美国)"},{code:"en-GB",name:"英语(英国)"},{code:"ja-JP",name:"日语"},{code:"ko-KR",name:"韩语"},{code:"id-ID",name:"印尼语"},{code:"es-ES",name:"西班牙语(西)"},{code:"es-MX",name:"西班牙语(墨)"},{code:"pt-BR",name:"葡萄牙语(巴西)"},{code:"pt-PT",name:"葡萄牙语(葡)"},{code:"de-DE",name:"德语"},{code:"fr-FR",name:"法语"},{code:"it-IT",name:"意大利语"},{code:"nl-NL",name:"荷兰语"},{code:"pl-PL",name:"波兰语"},{code:"ru-RU",name:"俄语"},{code:"uk-UA",name:"乌克兰语"},{code:"tr-TR",name:"土耳其语"},{code:"vi-VN",name:"越南语"},{code:"th-TH",name:"泰语"},{code:"ms-MY",name:"马来语"},{code:"fil-PH",name:"菲律宾语"},{code:"ar-SA",name:"阿拉伯语"}],o={"bg-BG":"保加利亚语","cs-CZ":"捷克语","da-DK":"丹麦语","el-GR":"希腊语","et-EE":"爱沙尼亚语","fa-IR":"波斯语","fi-FI":"芬兰语","hi-IN":"印地语","hr-HR":"克罗地亚语","hu-HU":"匈牙利语","is-IS":"冰岛语","lt-LT":"立陶宛语","lv-LV":"拉脱维亚语","nb-NO":"挪威语","ro-RO":"罗马尼亚语","sk-SK":"斯洛伐克语","sl-SI":"斯洛文尼亚语","sr-RS":"塞尔维亚语","sv-SE":"瑞典语","tl-PH":"菲律宾语","he-IL":"希伯来语","bn-BD":"孟加拉语","ta-IN":"泰米尔语","ur-PK":"乌尔都语","ca-ES":"加泰罗尼亚语","sw-KE":"斯瓦希里语","af-ZA":"南非荷兰语","mk-MK":"马其顿语"};function d(e){const n=a.find(c=>c.code===e);return n?n.name:o[e]||e}const m=[...a,...Object.entries(o).map(([e,n])=>({code:e,name:n}))].sort((e,n)=>e.code<n.code?-1:1);export{m as A,a as L,d as l}; |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{a as u}from"./CgE-6DOq.js";let i=0;function f(){const o=u("app:toasts",()=>[]);function e(s,t="info",r=3e3){const a=++i;o.value.push({id:a,type:t,msg:s}),r>0&&setTimeout(()=>{o.value=o.value.filter(n=>n.id!==a)},r)}return{toasts:o,toast:e,success:(s,t)=>e(s,"success",t),error:(s,t)=>e(s,"error",t),info:(s,t)=>e(s,"info",t),warn:(s,t)=>e(s,"warning",t)}}export{f as u}; |
|||
import{a as u}from"./mydnAiU4.js";let i=0;function f(){const o=u("app:toasts",()=>[]);function e(s,t="info",r=3e3){const a=++i;o.value.push({id:a,type:t,msg:s}),r>0&&setTimeout(()=>{o.value=o.value.filter(n=>n.id!==a)},r)}return{toasts:o,toast:e,success:(s,t)=>e(s,"success",t),error:(s,t)=>e(s,"error",t),info:(s,t)=>e(s,"info",t),warn:(s,t)=>e(s,"warning",t)}}export{f as u}; |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{g as t,B as n,P as a,c as o,a as s,o as c}from"./CSjlBIfC.js";const i={class:"py-16 text-center text-slate-400"},m=t({__name:"mcpconfig",setup(l){return n(()=>{a("/serviceconfig")}),(r,e)=>(c(),o("div",i,[...e[0]||(e[0]=[s("span",{class:"loading loading-spinner loading-sm"},null,-1),s("p",{class:"text-sm mt-3"},"MCP 配置已并入「第三方服务配置」,正在跳转…",-1)])]))}});export{m as default}; |
|||
import{g as t,B as n,P as a,c as o,a as s,o as c}from"./AL6uUoB7.js";const i={class:"py-16 text-center text-slate-400"},m=t({__name:"mcpconfig",setup(l){return n(()=>{a("/serviceconfig")}),(r,e)=>(c(),o("div",i,[...e[0]||(e[0]=[s("span",{class:"loading loading-spinner loading-sm"},null,-1),s("p",{class:"text-sm mt-3"},"MCP 配置已并入「第三方服务配置」,正在跳转…",-1)])]))}});export{m as default}; |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||
.chk[data-v-11e40be5]{display:flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid #e2e8f0;border-radius:8px;font-size:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chk[data-v-11e40be5]:hover{background:#f8fafc}.chk input[data-v-11e40be5]{width:14px;height:14px} |
|||
@ -1 +0,0 @@ |
|||
.chk[data-v-06dca20b]{display:flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid #e2e8f0;border-radius:8px;font-size:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chk[data-v-06dca20b]:hover{background:#f8fafc}.chk input[data-v-06dca20b]{width:14px;height:14px} |
|||
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
{"id":"24e01d06-12c5-401a-ad62-3d0500cb591f","timestamp":1786013273786} |
|||
{"id":"195ddb9e-078c-4238-82de-ba95840a71bc","timestamp":1786331664123} |
|||
@ -0,0 +1 @@ |
|||
{"id":"195ddb9e-078c-4238-82de-ba95840a71bc","timestamp":1786331664123,"prerendered":[]} |
|||
@ -1 +0,0 @@ |
|||
{"id":"24e01d06-12c5-401a-ad62-3d0500cb591f","timestamp":1786013273786,"prerendered":[]} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{u as a,e as s,h as u,i as r,f as h}from"./CSjlBIfC.js";function i(t){const e=t||s();return e.ssrContext?.head||e.runWithContext(()=>{if(u()){const n=r(h);if(!n)throw new Error("[nuxt] [unhead] Missing Unhead instance.");return n}})}function d(t,e={}){const n=e.head||i(e.nuxt);return a(t,{head:n,...e})}export{d as u}; |
|||
import{u as a,e as s,h as u,i as r,f as h}from"./AL6uUoB7.js";function i(t){const e=t||s();return e.ssrContext?.head||e.runWithContext(()=>{if(u()){const n=r(h);if(!n)throw new Error("[nuxt] [unhead] Missing Unhead instance.");return n}})}function d(t,e={}){const n=e.head||i(e.nuxt);return a(t,{head:n,...e})}export{d as u}; |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||
.panel[data-v-5eb39361]{background:#fff;border:1px solid #f1f5f9;border-radius:16px;box-shadow:0 1px 2px #0000000a}.tpl-grid[data-v-5eb39361]{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.tpl-card[data-v-5eb39361]{background:#fff;border:1px solid #eef2f7;border-radius:16px;padding:16px;cursor:pointer;transition:all .15s;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px #0000000a}.tpl-card[data-v-5eb39361]:hover{border-color:#c7d2fe;box-shadow:0 6px 18px #0f172a14;transform:translateY(-1px)}.tc-top[data-v-5eb39361]{display:flex;align-items:flex-start;gap:11px}.tc-ico[data-v-5eb39361]{width:40px;height:40px;border-radius:11px;flex-shrink:0;overflow:hidden;background:linear-gradient(135deg,#eef2ff,#e0e7ff);color:#4338ca;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px}.tc-ico img[data-v-5eb39361]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.tc-title[data-v-5eb39361]{font-weight:600;font-size:14.5px;color:#1e293b;line-height:1.35}.tc-tid[data-v-5eb39361],.tc-title[data-v-5eb39361]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tc-tid[data-v-5eb39361]{font-size:11px;color:#94a3b8;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;margin-top:2px}.tc-desc[data-v-5eb39361]{font-size:12.5px;color:#64748b;line-height:1.55;min-height:39px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tc-tags[data-v-5eb39361]{gap:4px;min-height:20px}.tc-foot[data-v-5eb39361],.tc-tags[data-v-5eb39361]{display:flex;flex-wrap:wrap}.tc-foot[data-v-5eb39361]{align-items:center;gap:6px;padding-top:9px;border-top:1px solid #f8fafc}.tc-go[data-v-5eb39361]{font-size:11.5px;color:#6366f1;font-weight:600}.chip[data-v-5eb39361]{display:inline-block;font-size:11px;padding:1px 7px;border-radius:999px;background:#f1f5f9;color:#64748b;white-space:nowrap}.chip-type[data-v-5eb39361]{background:#e0e7ff;color:#4338ca}.chip-lang[data-v-5eb39361]{background:#cffafe;color:#0e7490}.chip-warn[data-v-5eb39361]{background:#fef3c7;color:#b45309}.chip-primary[data-v-5eb39361]{background:#d1fae5;color:#047857}.lang-pill[data-v-5eb39361]{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;padding:3px 9px;border-radius:999px;border:1px solid #e2e8f0;background:#f8fafc;color:#64748b;cursor:pointer;transition:all .12s;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.lang-pill[data-v-5eb39361]:hover{border-color:#c7d2fe;color:#4338ca}.lang-pill.on[data-v-5eb39361]{background:#4338ca;border-color:#4338ca;color:#fff}.lang-pill.primary[data-v-5eb39361]:not(.on){background:#ecfdf5;border-color:#a7f3d0;color:#047857}.lp-name[data-v-5eb39361]{font-family:inherit;opacity:.75;font-size:11px}.lang-pill.on .lp-name[data-v-5eb39361]{opacity:.9}.lang-picker[data-v-5eb39361]{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:3px;max-height:260px;overflow-y:auto;border:1px solid #eef2f7;border-radius:10px;padding:8px}.lang-opt[data-v-5eb39361]{display:flex;align-items:center;gap:6px;padding:3px 5px;border-radius:6px;cursor:pointer;font-size:12px}.lang-opt[data-v-5eb39361]:hover{background:#f8fafc}.lo-code[data-v-5eb39361]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#475569}.lo-name[data-v-5eb39361]{color:#94a3b8;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} |
|||
@ -1 +1 @@ |
|||
import{e as f,a9 as p,aa as c,z as r}from"./CSjlBIfC.js";const l="$s";function y(...t){const a=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(a);const[n,e]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(e!==void 0&&typeof e!="function")throw new Error("[nuxt] [useState] init must be a function: "+e);const i=l+n,u=f(),s=p(u.payload.state,i);if(e&&(u._state[i]??={_default:e}),s.value===void 0&&e){const o=e();if(c(o))return u.payload.state[i]=o,o;s.value=o}return s}function v(){const t=y("app:loading",()=>0),a=r(()=>t.value>0);function n(){t.value++}function e(){t.value=Math.max(0,t.value-1)}return{count:t,loading:a,begin:n,end:e}}export{y as a,v as u}; |
|||
import{e as f,a9 as p,aa as c,z as r}from"./AL6uUoB7.js";const l="$s";function y(...t){const a=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(a);const[n,e]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(e!==void 0&&typeof e!="function")throw new Error("[nuxt] [useState] init must be a function: "+e);const i=l+n,u=f(),s=p(u.payload.state,i);if(e&&(u._state[i]??={_default:e}),s.value===void 0&&e){const o=e();if(c(o))return u.payload.state[i]=o,o;s.value=o}return s}function v(){const t=y("app:loading",()=>0),a=r(()=>t.value>0);function n(){t.value++}function e(){t.value=Math.max(0,t.value-1)}return{count:t,loading:a,begin:n,end:e}}export{y as a,v as u}; |
|||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||
.panel[data-v-742ee359]{background:#fff;border:1px solid #f1f5f9;border-radius:16px;box-shadow:0 1px 2px #0000000a}.logrow[data-v-742ee359]{display:grid;grid-template-columns:80px 64px 210px 92px 1fr 104px;gap:10px;align-items:start;padding:6px 12px;border-bottom:1px solid #f1f5f9;font-size:12px}.logrow[data-v-742ee359]:hover{background:#f8fafc}.logrow .t[data-v-742ee359]{font-family:ui-monospace,Menlo,monospace;color:#64748b}.lv[data-v-742ee359]{font-size:10px;font-weight:700;padding:1px 6px;border-radius:6px;white-space:nowrap}.lv-info[data-v-742ee359]{background:#dcfce7;color:#15803d}.lv-warn[data-v-742ee359]{background:#fef9c3;color:#a16207}.lv-error[data-v-742ee359]{background:#fee2e2;color:#b91c1c}.late[data-v-742ee359]{font-size:10px;color:#a16207;background:#fef3c7;border-radius:5px;padding:0 4px;margin-left:4px}.muted[data-v-742ee359]{color:#94a3b8}.app-name[data-v-742ee359]{font-weight:600;color:#0f172a}.unreg[data-v-742ee359]{font-size:10px;color:#b45309;background:#fef3c7;border-radius:5px;padding:0 5px;margin-left:5px;white-space:nowrap}#logHead[data-v-742ee359]{display:grid;grid-template-columns:80px 64px 210px 92px 1fr 104px;gap:10px;padding:7px 12px;font-size:11px;color:#94a3b8;border-bottom:1px solid #e2e8f0;background:#f8fafc} |
|||
@ -0,0 +1 @@ |
|||
.panel[data-v-e7a3debc]{background:#fff;border:1px solid #f1f5f9;border-radius:16px;box-shadow:0 1px 2px #0000000a}.logrow[data-v-e7a3debc]{display:grid;grid-template-columns:80px 64px 210px 92px 1fr 104px;gap:10px;align-items:start;padding:6px 12px;border-bottom:1px solid #f1f5f9;font-size:12px}.logrow[data-v-e7a3debc]:hover{background:#f8fafc}.logrow .t[data-v-e7a3debc]{font-family:ui-monospace,Menlo,monospace;color:#64748b}.lv[data-v-e7a3debc]{font-size:10px;font-weight:700;padding:1px 6px;border-radius:6px;white-space:nowrap}.lv-info[data-v-e7a3debc]{background:#dcfce7;color:#15803d}.lv-warn[data-v-e7a3debc]{background:#fef9c3;color:#a16207}.lv-error[data-v-e7a3debc]{background:#fee2e2;color:#b91c1c}.late[data-v-e7a3debc]{font-size:10px;color:#a16207;background:#fef3c7;border-radius:5px;padding:0 4px;margin-left:4px}.muted[data-v-e7a3debc]{color:#94a3b8}.app-name[data-v-e7a3debc]{font-weight:600;color:#0f172a}.unreg[data-v-e7a3debc]{font-size:10px;color:#b45309;background:#fef3c7;border-radius:5px;padding:0 5px;margin-left:5px;white-space:nowrap}#logHead[data-v-e7a3debc]{display:grid;grid-template-columns:80px 64px 210px 92px 1fr 104px;gap:10px;padding:7px 12px;font-size:11px;color:#94a3b8;border-bottom:1px solid #e2e8f0;background:#f8fafc} |
|||
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
import{_ as o,o as s,c as a,a as t,t as r}from"./CSjlBIfC.js";import{u as i}from"./CDbX0LeJ.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},c={class:"max-w-520px text-center"},l=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:500},statusText:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return i({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(h,m)=>(s(),a("div",u,[t("div",c,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,l),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusText)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-2c2ce9e3"]]);export{x as default}; |
|||
import{_ as o,o as s,c as a,a as t,t as r}from"./AL6uUoB7.js";import{u as i}from"./eNlViwMf.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},c={class:"max-w-520px text-center"},l=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:500},statusText:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return i({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(h,m)=>(s(),a("div",u,[t("div",c,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,l),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusText)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-2c2ce9e3"]]);export{x as default}; |
|||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||
{"version":3,"file":"LangSelect-Bvw-e1Cn.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/LangSelect-Bvw-e1Cn.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"LangSelect-C_QPlcDf.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/LangSelect-C_QPlcDf.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -0,0 +1,199 @@ |
|||
import { defineComponent, ref, reactive, computed, watch, unref, useSSRContext } from 'vue'; |
|||
import { ssrRenderAttrs, ssrRenderStyle, ssrRenderList, ssrInterpolate, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual } from 'vue/server-renderer'; |
|||
import { u as useApi } from './useApi-B-E5eLsI.mjs'; |
|||
import { u as useToast } from './useToast-CS21XT61.mjs'; |
|||
import { _ as _export_sfc, D as DEFAULT_ADMIN_ACCESS, M as MENU_GROUPS } from './server.mjs'; |
|||
import './useLoading-D4zrSa2m.mjs'; |
|||
import '../nitro/nitro.mjs'; |
|||
import 'node:http'; |
|||
import 'node:https'; |
|||
import 'node:events'; |
|||
import 'node:buffer'; |
|||
import 'node:fs'; |
|||
import 'node:path'; |
|||
import 'node:crypto'; |
|||
import 'node:url'; |
|||
import '../routes/renderer.mjs'; |
|||
import 'vue-bundle-renderer/runtime'; |
|||
import 'unhead/server'; |
|||
import 'devalue'; |
|||
import 'unhead/utils'; |
|||
import 'pinia'; |
|||
import 'perfect-debounce'; |
|||
|
|||
const _sfc_main = /* @__PURE__ */ defineComponent({ |
|||
__name: "accounts", |
|||
__ssrInlineRender: true, |
|||
setup(__props) { |
|||
useApi(); |
|||
useToast(); |
|||
const ROLE = { 1: "超管", 2: "管理员", 3: "品牌商", 4: "运营", 5: "渠道商" }; |
|||
const ROLE_CLS = { 1: "badge-error", 2: "badge-primary", 3: "badge-warning", 4: "badge-info", 5: "badge-accent" }; |
|||
const REGIONS = [["cn", "中国"], ["us", "美国"], ["ea", "东亚"], ["sea", "东南亚"], ["sa", "南亚"], ["me", "中东"], ["eu", "欧洲"], ["ru", "俄罗斯"], ["af", "非洲"], ["sam", "南美"], ["nam", "北美"], ["oc", "大洋洲"], ["br", "巴西"], ["in", "印度"]]; |
|||
const view = ref("list"); |
|||
const rows = ref([]); |
|||
const apps = ref([]); |
|||
const loading = ref(false); |
|||
const submitting = ref(false); |
|||
const editId = ref(0); |
|||
const form = reactive({ |
|||
username: "", |
|||
password: "", |
|||
identity: 2, |
|||
enabled: "1", |
|||
remark: "", |
|||
brandid: 0, |
|||
channelid: "" |
|||
}); |
|||
const channels = ref([]); |
|||
const accountChannelOptions = computed( |
|||
() => form.brandid ? channels.value.filter((ch) => ch.brandid === form.brandid) : [] |
|||
); |
|||
const sel = reactive({ |
|||
access: [], |
|||
apps: [], |
|||
regions: [], |
|||
products: [] |
|||
}); |
|||
const brands = ref([]); |
|||
const productGroups = ref([]); |
|||
const prodLoading = ref(false); |
|||
function fromCsv(s) { |
|||
return (s || "").split(",").map((x) => x.trim()).filter((x) => x); |
|||
} |
|||
function scopeParts(a) { |
|||
const parts = []; |
|||
if (a.apps) parts.push("应用:" + fromCsv(a.apps).length); |
|||
if (a.regions) parts.push("区域:" + fromCsv(a.regions).length); |
|||
if (a.products) parts.push("产品:" + fromCsv(a.products).length); |
|||
if (a.access) parts.push("页面:" + fromCsv(a.access).length); |
|||
return parts; |
|||
} |
|||
watch(() => form.identity, (idt) => { |
|||
if (idt === 2 && sel.access.length === 0) sel.access = DEFAULT_ADMIN_ACCESS.slice(); |
|||
}); |
|||
ref(null); |
|||
ref(0); |
|||
const topup = reactive({ |
|||
name: "", |
|||
cur: "", |
|||
vipday: 0, |
|||
trademin: 0, |
|||
meetmin: 0 |
|||
}); |
|||
return (_ctx, _push, _parent, _attrs) => { |
|||
_push(`<div${ssrRenderAttrs(_attrs)} data-v-11e40be5><div style="${ssrRenderStyle(view.value === "list" ? null : { display: "none" })}" data-v-11e40be5><div class="flex items-center justify-between mb-4" data-v-11e40be5><div data-v-11e40be5><h2 class="text-lg font-bold text-slate-700" data-v-11e40be5>后台账号</h2><p class="text-xs text-slate-400 mt-0.5" data-v-11e40be5>超管 / 管理员 / 代理 / 运营。代理·运营可绑定应用·区域·产品,登录后仪表盘按绑定限制。</p></div><button class="btn btn-primary btn-sm text-white" data-v-11e40be5>+ 新建账号</button></div><div class="bg-white rounded-xl shadow-sm border border-slate-100 overflow-hidden" data-v-11e40be5><table class="table table-sm" data-v-11e40be5><thead data-v-11e40be5><tr class="text-slate-500" data-v-11e40be5><th data-v-11e40be5>ID</th><th data-v-11e40be5>用户名</th><th data-v-11e40be5>角色</th><th data-v-11e40be5>状态</th><th data-v-11e40be5>绑定作用域</th><th data-v-11e40be5>备注</th><th class="text-right" data-v-11e40be5>操作</th></tr></thead><tbody data-v-11e40be5>`); |
|||
if (loading.value) { |
|||
_push(`<tr data-v-11e40be5><td colspan="7" class="text-center text-slate-400 py-8" data-v-11e40be5>加载中...</td></tr>`); |
|||
} else if (!rows.value.length) { |
|||
_push(`<tr data-v-11e40be5><td colspan="7" class="text-center text-slate-400 py-8" data-v-11e40be5>暂无账号(引导超管不在此列)</td></tr>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(rows.value, (a) => { |
|||
_push(`<tr data-v-11e40be5><td class="font-mono" data-v-11e40be5>${ssrInterpolate(a.id)}</td><td class="font-medium" data-v-11e40be5>${ssrInterpolate(a.username || "")}</td><td data-v-11e40be5><span class="${ssrRenderClass([ROLE_CLS[a.identity] || "", "badge badge-sm"])}" data-v-11e40be5>${ssrInterpolate(ROLE[a.identity] || a.identity)}</span></td><td data-v-11e40be5>`); |
|||
if (a.enabled) { |
|||
_push(`<span class="text-green-600 text-xs" data-v-11e40be5>启用</span>`); |
|||
} else { |
|||
_push(`<span class="text-slate-400 text-xs" data-v-11e40be5>停用</span>`); |
|||
} |
|||
_push(`</td><td data-v-11e40be5>`); |
|||
if (a.identity === 3 || a.identity === 4) { |
|||
_push(`<!--[-->`); |
|||
if (scopeParts(a).length) { |
|||
_push(`<span class="text-xs text-slate-500" data-v-11e40be5>${ssrInterpolate(scopeParts(a).join(" · "))}</span>`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-11e40be5>未绑定(不限)</span>`); |
|||
} |
|||
_push(`<!--]-->`); |
|||
} else if (a.identity === 2) { |
|||
_push(`<!--[-->`); |
|||
if (a.access) { |
|||
_push(`<span class="text-xs text-slate-500" data-v-11e40be5>菜单:${ssrInterpolate(fromCsv(a.access).length)}</span>`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-11e40be5>默认(除SaaS/系统管理)</span>`); |
|||
} |
|||
_push(`<!--]-->`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-11e40be5>全部权限</span>`); |
|||
} |
|||
if (a.identity === 3) { |
|||
_push(`<div class="text-[11px] text-emerald-600 mt-0.5" data-v-11e40be5> 余额 VIP${ssrInterpolate(a.balance_vipday || 0)}天 · 翻译${ssrInterpolate(a.balance_trademin || 0)}分 · 会议${ssrInterpolate(a.balance_meetmin || 0)}分 </div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</td><td class="text-xs text-slate-500" data-v-11e40be5>${ssrInterpolate(a.remark || "")}</td><td data-v-11e40be5><div class="flex gap-1 justify-end" data-v-11e40be5>`); |
|||
if (a.identity === 3) { |
|||
_push(`<button class="btn btn-ghost btn-xs text-emerald-600" data-v-11e40be5>充值</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<button class="btn btn-ghost btn-xs" data-v-11e40be5>编辑</button><button class="btn btn-ghost btn-xs text-amber-600" data-v-11e40be5>改密</button><button class="btn btn-ghost btn-xs text-red-500" data-v-11e40be5>删除</button></div></td></tr>`); |
|||
}); |
|||
_push(`<!--]--></tbody></table></div></div><div style="${ssrRenderStyle(view.value === "form" ? null : { display: "none" })}" data-v-11e40be5><div class="flex items-center gap-3 mb-5" data-v-11e40be5><button class="btn btn-ghost btn-sm" data-v-11e40be5>← 返回列表</button><h2 class="text-lg font-semibold text-slate-800" data-v-11e40be5>${ssrInterpolate(editId.value ? "编辑账号 #" + editId.value : "新建账号")}</h2></div><div class="bg-white rounded-xl shadow-sm border border-slate-100 p-6 max-w-2xl" data-v-11e40be5><div class="grid grid-cols-2 gap-3" data-v-11e40be5><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>用户名</label><input${ssrRenderAttr("value", form.username)}${ssrIncludeBooleanAttr(!!editId.value) ? " disabled" : ""} class="input input-bordered input-sm w-full" placeholder="登录用户名" data-v-11e40be5></div><div style="${ssrRenderStyle(!editId.value ? null : { display: "none" })}" data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>密码</label><input${ssrRenderAttr("value", form.password)} type="password" class="input input-bordered input-sm w-full" placeholder="登录密码" data-v-11e40be5></div><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>角色</label><select class="select select-bordered select-sm w-full" data-v-11e40be5><option${ssrRenderAttr("value", 2)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 2) : ssrLooseEqual(form.identity, 2)) ? " selected" : ""}>管理员(默认除 SaaS/系统管理外全部)</option><option${ssrRenderAttr("value", 3)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 3) : ssrLooseEqual(form.identity, 3)) ? " selected" : ""}>品牌商(绑定品牌商,见名下全部渠道商)</option><option${ssrRenderAttr("value", 5)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 5) : ssrLooseEqual(form.identity, 5)) ? " selected" : ""}>渠道商(绑定单个渠道商,只见自己数据)</option><option${ssrRenderAttr("value", 4)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 4) : ssrLooseEqual(form.identity, 4)) ? " selected" : ""}>运营(内部,按绑定限制)</option><option${ssrRenderAttr("value", 1)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 1) : ssrLooseEqual(form.identity, 1)) ? " selected" : ""}>超管(全部权限)</option></select></div><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>状态</label><select class="select select-bordered select-sm w-full" data-v-11e40be5><option value="1" data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.enabled) ? ssrLooseContain(form.enabled, "1") : ssrLooseEqual(form.enabled, "1")) ? " selected" : ""}>启用</option><option value="0" data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.enabled) ? ssrLooseContain(form.enabled, "0") : ssrLooseEqual(form.enabled, "0")) ? " selected" : ""}>停用</option></select></div><div class="col-span-2" data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>备注</label><input${ssrRenderAttr("value", form.remark)} class="input input-bordered input-sm w-full" placeholder="可选" data-v-11e40be5></div></div><div class="mt-4 border-t border-slate-100 pt-4" style="${ssrRenderStyle(form.identity !== 1 ? null : { display: "none" })}" data-v-11e40be5><div class="flex items-center justify-between mb-1" data-v-11e40be5><div class="text-sm font-semibold text-slate-600" data-v-11e40be5>菜单权限</div><div class="flex gap-1" data-v-11e40be5><button type="button" class="btn btn-ghost btn-xs" data-v-11e40be5>管理员默认</button><button type="button" class="btn btn-ghost btn-xs" data-v-11e40be5>全选</button><button type="button" class="btn btn-ghost btn-xs" data-v-11e40be5>清空</button></div></div><p class="text-xs text-slate-400 mb-3" data-v-11e40be5>管理员默认开放除「SaaS 管理 / 系统管理」以外的全部菜单(权限留空时按默认生效);代理/运营需显式勾选。</p><!--[-->`); |
|||
ssrRenderList(unref(MENU_GROUPS), (g) => { |
|||
_push(`<div class="mb-2.5" data-v-11e40be5><div class="text-xs text-slate-500 mb-1.5" data-v-11e40be5>${ssrInterpolate(g.label)}`); |
|||
if (g.restricted) { |
|||
_push(`<span class="text-amber-500 ml-1" data-v-11e40be5>(管理员默认不开放)</span>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</div><div class="flex flex-wrap gap-2" data-v-11e40be5><!--[-->`); |
|||
ssrRenderList(g.items, (m) => { |
|||
_push(`<label class="chk" data-v-11e40be5><input${ssrIncludeBooleanAttr(Array.isArray(sel.access) ? ssrLooseContain(sel.access, m.id) : sel.access) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", m.id)} data-v-11e40be5>${ssrInterpolate(m.label)}</label>`); |
|||
}); |
|||
_push(`<!--]--></div></div>`); |
|||
}); |
|||
_push(`<!--]--></div><div class="mt-4 border-t border-slate-100 pt-4" style="${ssrRenderStyle(form.identity === 3 || form.identity === 5 ? null : { display: "none" })}" data-v-11e40be5><div class="text-sm font-semibold text-slate-600 mb-2" data-v-11e40be5> 归属绑定 <span class="text-xs text-slate-400 font-normal" data-v-11e40be5>(品牌商账号只绑品牌商;渠道商账号两者都要绑)</span></div><div class="grid grid-cols-2 gap-3" data-v-11e40be5><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>所属品牌商 *</label><select class="select select-bordered select-sm w-full" data-v-11e40be5><option${ssrRenderAttr("value", 0)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.brandid) ? ssrLooseContain(form.brandid, 0) : ssrLooseEqual(form.brandid, 0)) ? " selected" : ""}>请选择品牌商</option><!--[-->`); |
|||
ssrRenderList(brands.value, (b) => { |
|||
_push(`<option${ssrRenderAttr("value", b.id)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.brandid) ? ssrLooseContain(form.brandid, b.id) : ssrLooseEqual(form.brandid, b.id)) ? " selected" : ""}>${ssrInterpolate(b.brand)}</option>`); |
|||
}); |
|||
_push(`<!--]--></select></div><div style="${ssrRenderStyle(form.identity === 5 ? null : { display: "none" })}" data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>所属渠道商 *</label><select class="select select-bordered select-sm w-full"${ssrIncludeBooleanAttr(!accountChannelOptions.value.length) ? " disabled" : ""} data-v-11e40be5><option value="" data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.channelid) ? ssrLooseContain(form.channelid, "") : ssrLooseEqual(form.channelid, "")) ? " selected" : ""}>${ssrInterpolate(form.brandid ? accountChannelOptions.value.length ? "请选择渠道商" : "该品牌商暂无渠道商" : "请先选择品牌商")}</option><!--[-->`); |
|||
ssrRenderList(accountChannelOptions.value, (ch) => { |
|||
_push(`<option${ssrRenderAttr("value", ch.id)} data-v-11e40be5${ssrIncludeBooleanAttr(Array.isArray(form.channelid) ? ssrLooseContain(form.channelid, ch.id) : ssrLooseEqual(form.channelid, ch.id)) ? " selected" : ""}>${ssrInterpolate(ch.name)} (${ssrInterpolate(ch.id)})</option>`); |
|||
}); |
|||
_push(`<!--]--></select></div></div><p class="text-xs text-slate-400 mt-2" data-v-11e40be5> 数据隔离由后端强制:品牌商账号只能看到本品牌商及其名下渠道商的数据,渠道商账号只能看到自己渠道的数据。 </p></div><div class="mt-4 border-t border-slate-100 pt-4" style="${ssrRenderStyle(form.identity === 3 || form.identity === 4 ? null : { display: "none" })}" data-v-11e40be5><div class="text-sm font-semibold text-slate-600 mb-2" data-v-11e40be5>作用域绑定 <span class="text-xs text-slate-400 font-normal" data-v-11e40be5>(代理/运营生效;限制仪表盘数据范围)</span></div><div class="mb-3" data-v-11e40be5><div class="text-xs text-slate-500 mb-1.5" data-v-11e40be5>绑定应用 <span class="text-slate-300" data-v-11e40be5>(仪表盘只显示这些应用数据;不勾=不限)</span></div><div class="flex flex-wrap gap-2" data-v-11e40be5>`); |
|||
if (apps.value.length) { |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(apps.value, (a) => { |
|||
_push(`<label class="chk" data-v-11e40be5><input${ssrIncludeBooleanAttr(Array.isArray(sel.apps) ? ssrLooseContain(sel.apps, a.name) : sel.apps) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", a.name)} data-v-11e40be5>${ssrInterpolate(a.name || "应用#" + a.id)}</label>`); |
|||
}); |
|||
_push(`<!--]-->`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-11e40be5>无注册应用</span>`); |
|||
} |
|||
_push(`</div></div><div class="mb-3" data-v-11e40be5><div class="text-xs text-slate-500 mb-1.5" data-v-11e40be5>绑定区域 <span class="text-slate-300" data-v-11e40be5>(不勾=不限)</span></div><div class="flex flex-wrap gap-2" data-v-11e40be5><!--[-->`); |
|||
ssrRenderList(REGIONS, (r) => { |
|||
_push(`<label class="chk" data-v-11e40be5><input${ssrIncludeBooleanAttr(Array.isArray(sel.regions) ? ssrLooseContain(sel.regions, r[0]) : sel.regions) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", r[0])} data-v-11e40be5>${ssrInterpolate(r[1])}</label>`); |
|||
}); |
|||
_push(`<!--]--></div></div><div data-v-11e40be5><div class="text-xs text-slate-500 mb-1.5" data-v-11e40be5>绑定产品 <span class="text-slate-300" data-v-11e40be5>(按厂家分组;仪表盘只显示这些产品数据;不勾=不限)</span></div><div class="max-h-56 overflow-y-auto pr-1 border border-slate-100 rounded-lg p-2" data-v-11e40be5>`); |
|||
if (prodLoading.value) { |
|||
_push(`<span class="text-xs text-slate-300" data-v-11e40be5>加载产品中...</span>`); |
|||
} else if (!productGroups.value.length) { |
|||
_push(`<span class="text-xs text-slate-300" data-v-11e40be5>无产品</span>`); |
|||
} else { |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(productGroups.value, (g) => { |
|||
_push(`<div class="mb-2 last:mb-0" data-v-11e40be5><div class="text-[11px] font-semibold text-slate-500 mb-1 sticky top-0 bg-white py-0.5" data-v-11e40be5>🏭 ${ssrInterpolate(g.label)}</div><div class="flex flex-wrap gap-2" data-v-11e40be5><!--[-->`); |
|||
ssrRenderList(g.products, (p) => { |
|||
_push(`<label class="chk" data-v-11e40be5><input${ssrIncludeBooleanAttr(Array.isArray(sel.products) ? ssrLooseContain(sel.products, String(p.id)) : sel.products) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", String(p.id))} data-v-11e40be5>${ssrInterpolate((p.devicename || "产品") + " #" + p.id)}</label>`); |
|||
}); |
|||
_push(`<!--]--></div></div>`); |
|||
}); |
|||
_push(`<!--]-->`); |
|||
} |
|||
_push(`</div></div></div><div class="flex gap-3 justify-end mt-6" data-v-11e40be5><button class="btn btn-ghost btn-sm" data-v-11e40be5>取消</button><button class="btn btn-primary btn-sm text-white"${ssrIncludeBooleanAttr(submitting.value) ? " disabled" : ""} data-v-11e40be5>保存</button></div></div></div><dialog class="modal" data-v-11e40be5><div class="modal-box max-w-md" data-v-11e40be5><h3 class="font-bold text-lg mb-1" data-v-11e40be5>充值 / 调整资源点</h3><p class="text-xs text-slate-400 mb-3" data-v-11e40be5>代理:<span class="font-medium text-slate-600" data-v-11e40be5>${ssrInterpolate(topup.name)}</span>。填增量(可填负数下调),当前余额:<span class="text-emerald-600" data-v-11e40be5>${ssrInterpolate(topup.cur)}</span></p><div class="grid grid-cols-3 gap-3" data-v-11e40be5><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>VIP天数</label><input${ssrRenderAttr("value", topup.vipday)} type="number" class="input input-bordered input-sm w-full" data-v-11e40be5></div><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>翻译分钟</label><input${ssrRenderAttr("value", topup.trademin)} type="number" class="input input-bordered input-sm w-full" data-v-11e40be5></div><div data-v-11e40be5><label class="text-xs text-slate-500" data-v-11e40be5>会议分钟</label><input${ssrRenderAttr("value", topup.meetmin)} type="number" class="input input-bordered input-sm w-full" data-v-11e40be5></div></div><div class="modal-action" data-v-11e40be5><button class="btn btn-ghost btn-sm" data-v-11e40be5>取消</button><button class="btn btn-primary btn-sm text-white" data-v-11e40be5>确认</button></div></div><form method="dialog" class="modal-backdrop" data-v-11e40be5><button data-v-11e40be5>close</button></form></dialog></div>`); |
|||
}; |
|||
} |
|||
}); |
|||
const _sfc_setup = _sfc_main.setup; |
|||
_sfc_main.setup = (props, ctx) => { |
|||
const ssrContext = useSSRContext(); |
|||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/accounts.vue"); |
|||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0; |
|||
}; |
|||
const accounts = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-11e40be5"]]); |
|||
|
|||
export { accounts as default }; |
|||
//# sourceMappingURL=accounts-C1hb7WMW.mjs.map
|
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"accounts-C1hb7WMW.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/accounts-C1hb7WMW.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -1,184 +0,0 @@ |
|||
import { defineComponent, ref, reactive, watch, unref, useSSRContext } from 'vue'; |
|||
import { ssrRenderAttrs, ssrRenderStyle, ssrRenderList, ssrInterpolate, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual } from 'vue/server-renderer'; |
|||
import { u as useApi } from './useApi-B-E5eLsI.mjs'; |
|||
import { u as useToast } from './useToast-CS21XT61.mjs'; |
|||
import { _ as _export_sfc, D as DEFAULT_ADMIN_ACCESS, M as MENU_GROUPS } from './server.mjs'; |
|||
import './useLoading-D4zrSa2m.mjs'; |
|||
import '../nitro/nitro.mjs'; |
|||
import 'node:http'; |
|||
import 'node:https'; |
|||
import 'node:events'; |
|||
import 'node:buffer'; |
|||
import 'node:fs'; |
|||
import 'node:path'; |
|||
import 'node:crypto'; |
|||
import 'node:url'; |
|||
import '../routes/renderer.mjs'; |
|||
import 'vue-bundle-renderer/runtime'; |
|||
import 'unhead/server'; |
|||
import 'devalue'; |
|||
import 'unhead/utils'; |
|||
import 'pinia'; |
|||
import 'perfect-debounce'; |
|||
|
|||
const _sfc_main = /* @__PURE__ */ defineComponent({ |
|||
__name: "accounts", |
|||
__ssrInlineRender: true, |
|||
setup(__props) { |
|||
useApi(); |
|||
useToast(); |
|||
const ROLE = { 1: "超管", 2: "管理员", 3: "代理", 4: "运营" }; |
|||
const ROLE_CLS = { 1: "badge-error", 2: "badge-primary", 3: "badge-warning", 4: "badge-info" }; |
|||
const REGIONS = [["cn", "中国"], ["us", "美国"], ["ea", "东亚"], ["sea", "东南亚"], ["sa", "南亚"], ["me", "中东"], ["eu", "欧洲"], ["ru", "俄罗斯"], ["af", "非洲"], ["sam", "南美"], ["nam", "北美"], ["oc", "大洋洲"], ["br", "巴西"], ["in", "印度"]]; |
|||
const view = ref("list"); |
|||
const rows = ref([]); |
|||
const apps = ref([]); |
|||
const loading = ref(false); |
|||
const submitting = ref(false); |
|||
const editId = ref(0); |
|||
const form = reactive({ |
|||
username: "", |
|||
password: "", |
|||
identity: 2, |
|||
enabled: "1", |
|||
remark: "" |
|||
}); |
|||
const sel = reactive({ |
|||
access: [], |
|||
apps: [], |
|||
regions: [], |
|||
products: [] |
|||
}); |
|||
const productGroups = ref([]); |
|||
const prodLoading = ref(false); |
|||
function fromCsv(s) { |
|||
return (s || "").split(",").map((x) => x.trim()).filter((x) => x); |
|||
} |
|||
function scopeParts(a) { |
|||
const parts = []; |
|||
if (a.apps) parts.push("应用:" + fromCsv(a.apps).length); |
|||
if (a.regions) parts.push("区域:" + fromCsv(a.regions).length); |
|||
if (a.products) parts.push("产品:" + fromCsv(a.products).length); |
|||
if (a.access) parts.push("页面:" + fromCsv(a.access).length); |
|||
return parts; |
|||
} |
|||
watch(() => form.identity, (idt) => { |
|||
if (idt === 2 && sel.access.length === 0) sel.access = DEFAULT_ADMIN_ACCESS.slice(); |
|||
}); |
|||
ref(null); |
|||
ref(0); |
|||
const topup = reactive({ |
|||
name: "", |
|||
cur: "", |
|||
vipday: 0, |
|||
trademin: 0, |
|||
meetmin: 0 |
|||
}); |
|||
return (_ctx, _push, _parent, _attrs) => { |
|||
_push(`<div${ssrRenderAttrs(_attrs)} data-v-06dca20b><div style="${ssrRenderStyle(view.value === "list" ? null : { display: "none" })}" data-v-06dca20b><div class="flex items-center justify-between mb-4" data-v-06dca20b><div data-v-06dca20b><h2 class="text-lg font-bold text-slate-700" data-v-06dca20b>后台账号</h2><p class="text-xs text-slate-400 mt-0.5" data-v-06dca20b>超管 / 管理员 / 代理 / 运营。代理·运营可绑定应用·区域·产品,登录后仪表盘按绑定限制。</p></div><button class="btn btn-primary btn-sm text-white" data-v-06dca20b>+ 新建账号</button></div><div class="bg-white rounded-xl shadow-sm border border-slate-100 overflow-hidden" data-v-06dca20b><table class="table table-sm" data-v-06dca20b><thead data-v-06dca20b><tr class="text-slate-500" data-v-06dca20b><th data-v-06dca20b>ID</th><th data-v-06dca20b>用户名</th><th data-v-06dca20b>角色</th><th data-v-06dca20b>状态</th><th data-v-06dca20b>绑定作用域</th><th data-v-06dca20b>备注</th><th class="text-right" data-v-06dca20b>操作</th></tr></thead><tbody data-v-06dca20b>`); |
|||
if (loading.value) { |
|||
_push(`<tr data-v-06dca20b><td colspan="7" class="text-center text-slate-400 py-8" data-v-06dca20b>加载中...</td></tr>`); |
|||
} else if (!rows.value.length) { |
|||
_push(`<tr data-v-06dca20b><td colspan="7" class="text-center text-slate-400 py-8" data-v-06dca20b>暂无账号(引导超管不在此列)</td></tr>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(rows.value, (a) => { |
|||
_push(`<tr data-v-06dca20b><td class="font-mono" data-v-06dca20b>${ssrInterpolate(a.id)}</td><td class="font-medium" data-v-06dca20b>${ssrInterpolate(a.username || "")}</td><td data-v-06dca20b><span class="${ssrRenderClass([ROLE_CLS[a.identity] || "", "badge badge-sm"])}" data-v-06dca20b>${ssrInterpolate(ROLE[a.identity] || a.identity)}</span></td><td data-v-06dca20b>`); |
|||
if (a.enabled) { |
|||
_push(`<span class="text-green-600 text-xs" data-v-06dca20b>启用</span>`); |
|||
} else { |
|||
_push(`<span class="text-slate-400 text-xs" data-v-06dca20b>停用</span>`); |
|||
} |
|||
_push(`</td><td data-v-06dca20b>`); |
|||
if (a.identity === 3 || a.identity === 4) { |
|||
_push(`<!--[-->`); |
|||
if (scopeParts(a).length) { |
|||
_push(`<span class="text-xs text-slate-500" data-v-06dca20b>${ssrInterpolate(scopeParts(a).join(" · "))}</span>`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-06dca20b>未绑定(不限)</span>`); |
|||
} |
|||
_push(`<!--]-->`); |
|||
} else if (a.identity === 2) { |
|||
_push(`<!--[-->`); |
|||
if (a.access) { |
|||
_push(`<span class="text-xs text-slate-500" data-v-06dca20b>菜单:${ssrInterpolate(fromCsv(a.access).length)}</span>`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-06dca20b>默认(除SaaS/系统管理)</span>`); |
|||
} |
|||
_push(`<!--]-->`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-06dca20b>全部权限</span>`); |
|||
} |
|||
if (a.identity === 3) { |
|||
_push(`<div class="text-[11px] text-emerald-600 mt-0.5" data-v-06dca20b> 余额 VIP${ssrInterpolate(a.balance_vipday || 0)}天 · 翻译${ssrInterpolate(a.balance_trademin || 0)}分 · 会议${ssrInterpolate(a.balance_meetmin || 0)}分 </div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</td><td class="text-xs text-slate-500" data-v-06dca20b>${ssrInterpolate(a.remark || "")}</td><td data-v-06dca20b><div class="flex gap-1 justify-end" data-v-06dca20b>`); |
|||
if (a.identity === 3) { |
|||
_push(`<button class="btn btn-ghost btn-xs text-emerald-600" data-v-06dca20b>充值</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<button class="btn btn-ghost btn-xs" data-v-06dca20b>编辑</button><button class="btn btn-ghost btn-xs text-amber-600" data-v-06dca20b>改密</button><button class="btn btn-ghost btn-xs text-red-500" data-v-06dca20b>删除</button></div></td></tr>`); |
|||
}); |
|||
_push(`<!--]--></tbody></table></div></div><div style="${ssrRenderStyle(view.value === "form" ? null : { display: "none" })}" data-v-06dca20b><div class="flex items-center gap-3 mb-5" data-v-06dca20b><button class="btn btn-ghost btn-sm" data-v-06dca20b>← 返回列表</button><h2 class="text-lg font-semibold text-slate-800" data-v-06dca20b>${ssrInterpolate(editId.value ? "编辑账号 #" + editId.value : "新建账号")}</h2></div><div class="bg-white rounded-xl shadow-sm border border-slate-100 p-6 max-w-2xl" data-v-06dca20b><div class="grid grid-cols-2 gap-3" data-v-06dca20b><div data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>用户名</label><input${ssrRenderAttr("value", form.username)}${ssrIncludeBooleanAttr(!!editId.value) ? " disabled" : ""} class="input input-bordered input-sm w-full" placeholder="登录用户名" data-v-06dca20b></div><div style="${ssrRenderStyle(!editId.value ? null : { display: "none" })}" data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>密码</label><input${ssrRenderAttr("value", form.password)} type="password" class="input input-bordered input-sm w-full" placeholder="登录密码" data-v-06dca20b></div><div data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>角色</label><select class="select select-bordered select-sm w-full" data-v-06dca20b><option${ssrRenderAttr("value", 2)} data-v-06dca20b${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 2) : ssrLooseEqual(form.identity, 2)) ? " selected" : ""}>管理员(默认除 SaaS/系统管理外全部)</option><option${ssrRenderAttr("value", 3)} data-v-06dca20b${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 3) : ssrLooseEqual(form.identity, 3)) ? " selected" : ""}>代理(外部,按绑定限制)</option><option${ssrRenderAttr("value", 4)} data-v-06dca20b${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 4) : ssrLooseEqual(form.identity, 4)) ? " selected" : ""}>运营(内部,按绑定限制)</option><option${ssrRenderAttr("value", 1)} data-v-06dca20b${ssrIncludeBooleanAttr(Array.isArray(form.identity) ? ssrLooseContain(form.identity, 1) : ssrLooseEqual(form.identity, 1)) ? " selected" : ""}>超管(全部权限)</option></select></div><div data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>状态</label><select class="select select-bordered select-sm w-full" data-v-06dca20b><option value="1" data-v-06dca20b${ssrIncludeBooleanAttr(Array.isArray(form.enabled) ? ssrLooseContain(form.enabled, "1") : ssrLooseEqual(form.enabled, "1")) ? " selected" : ""}>启用</option><option value="0" data-v-06dca20b${ssrIncludeBooleanAttr(Array.isArray(form.enabled) ? ssrLooseContain(form.enabled, "0") : ssrLooseEqual(form.enabled, "0")) ? " selected" : ""}>停用</option></select></div><div class="col-span-2" data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>备注</label><input${ssrRenderAttr("value", form.remark)} class="input input-bordered input-sm w-full" placeholder="可选" data-v-06dca20b></div></div><div class="mt-4 border-t border-slate-100 pt-4" style="${ssrRenderStyle(form.identity !== 1 ? null : { display: "none" })}" data-v-06dca20b><div class="flex items-center justify-between mb-1" data-v-06dca20b><div class="text-sm font-semibold text-slate-600" data-v-06dca20b>菜单权限</div><div class="flex gap-1" data-v-06dca20b><button type="button" class="btn btn-ghost btn-xs" data-v-06dca20b>管理员默认</button><button type="button" class="btn btn-ghost btn-xs" data-v-06dca20b>全选</button><button type="button" class="btn btn-ghost btn-xs" data-v-06dca20b>清空</button></div></div><p class="text-xs text-slate-400 mb-3" data-v-06dca20b>管理员默认开放除「SaaS 管理 / 系统管理」以外的全部菜单(权限留空时按默认生效);代理/运营需显式勾选。</p><!--[-->`); |
|||
ssrRenderList(unref(MENU_GROUPS), (g) => { |
|||
_push(`<div class="mb-2.5" data-v-06dca20b><div class="text-xs text-slate-500 mb-1.5" data-v-06dca20b>${ssrInterpolate(g.label)}`); |
|||
if (g.restricted) { |
|||
_push(`<span class="text-amber-500 ml-1" data-v-06dca20b>(管理员默认不开放)</span>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</div><div class="flex flex-wrap gap-2" data-v-06dca20b><!--[-->`); |
|||
ssrRenderList(g.items, (m) => { |
|||
_push(`<label class="chk" data-v-06dca20b><input${ssrIncludeBooleanAttr(Array.isArray(sel.access) ? ssrLooseContain(sel.access, m.id) : sel.access) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", m.id)} data-v-06dca20b>${ssrInterpolate(m.label)}</label>`); |
|||
}); |
|||
_push(`<!--]--></div></div>`); |
|||
}); |
|||
_push(`<!--]--></div><div class="mt-4 border-t border-slate-100 pt-4" style="${ssrRenderStyle(form.identity === 3 || form.identity === 4 ? null : { display: "none" })}" data-v-06dca20b><div class="text-sm font-semibold text-slate-600 mb-2" data-v-06dca20b>作用域绑定 <span class="text-xs text-slate-400 font-normal" data-v-06dca20b>(代理/运营生效;限制仪表盘数据范围)</span></div><div class="mb-3" data-v-06dca20b><div class="text-xs text-slate-500 mb-1.5" data-v-06dca20b>绑定应用 <span class="text-slate-300" data-v-06dca20b>(仪表盘只显示这些应用数据;不勾=不限)</span></div><div class="flex flex-wrap gap-2" data-v-06dca20b>`); |
|||
if (apps.value.length) { |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(apps.value, (a) => { |
|||
_push(`<label class="chk" data-v-06dca20b><input${ssrIncludeBooleanAttr(Array.isArray(sel.apps) ? ssrLooseContain(sel.apps, a.name) : sel.apps) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", a.name)} data-v-06dca20b>${ssrInterpolate(a.name || "应用#" + a.id)}</label>`); |
|||
}); |
|||
_push(`<!--]-->`); |
|||
} else { |
|||
_push(`<span class="text-xs text-slate-300" data-v-06dca20b>无注册应用</span>`); |
|||
} |
|||
_push(`</div></div><div class="mb-3" data-v-06dca20b><div class="text-xs text-slate-500 mb-1.5" data-v-06dca20b>绑定区域 <span class="text-slate-300" data-v-06dca20b>(不勾=不限)</span></div><div class="flex flex-wrap gap-2" data-v-06dca20b><!--[-->`); |
|||
ssrRenderList(REGIONS, (r) => { |
|||
_push(`<label class="chk" data-v-06dca20b><input${ssrIncludeBooleanAttr(Array.isArray(sel.regions) ? ssrLooseContain(sel.regions, r[0]) : sel.regions) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", r[0])} data-v-06dca20b>${ssrInterpolate(r[1])}</label>`); |
|||
}); |
|||
_push(`<!--]--></div></div><div data-v-06dca20b><div class="text-xs text-slate-500 mb-1.5" data-v-06dca20b>绑定产品 <span class="text-slate-300" data-v-06dca20b>(按厂家分组;仪表盘只显示这些产品数据;不勾=不限)</span></div><div class="max-h-56 overflow-y-auto pr-1 border border-slate-100 rounded-lg p-2" data-v-06dca20b>`); |
|||
if (prodLoading.value) { |
|||
_push(`<span class="text-xs text-slate-300" data-v-06dca20b>加载产品中...</span>`); |
|||
} else if (!productGroups.value.length) { |
|||
_push(`<span class="text-xs text-slate-300" data-v-06dca20b>无产品</span>`); |
|||
} else { |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(productGroups.value, (g) => { |
|||
_push(`<div class="mb-2 last:mb-0" data-v-06dca20b><div class="text-[11px] font-semibold text-slate-500 mb-1 sticky top-0 bg-white py-0.5" data-v-06dca20b>🏭 ${ssrInterpolate(g.label)}</div><div class="flex flex-wrap gap-2" data-v-06dca20b><!--[-->`); |
|||
ssrRenderList(g.products, (p) => { |
|||
_push(`<label class="chk" data-v-06dca20b><input${ssrIncludeBooleanAttr(Array.isArray(sel.products) ? ssrLooseContain(sel.products, String(p.id)) : sel.products) ? " checked" : ""} type="checkbox"${ssrRenderAttr("value", String(p.id))} data-v-06dca20b>${ssrInterpolate((p.devicename || "产品") + " #" + p.id)}</label>`); |
|||
}); |
|||
_push(`<!--]--></div></div>`); |
|||
}); |
|||
_push(`<!--]-->`); |
|||
} |
|||
_push(`</div></div></div><div class="flex gap-3 justify-end mt-6" data-v-06dca20b><button class="btn btn-ghost btn-sm" data-v-06dca20b>取消</button><button class="btn btn-primary btn-sm text-white"${ssrIncludeBooleanAttr(submitting.value) ? " disabled" : ""} data-v-06dca20b>保存</button></div></div></div><dialog class="modal" data-v-06dca20b><div class="modal-box max-w-md" data-v-06dca20b><h3 class="font-bold text-lg mb-1" data-v-06dca20b>充值 / 调整资源点</h3><p class="text-xs text-slate-400 mb-3" data-v-06dca20b>代理:<span class="font-medium text-slate-600" data-v-06dca20b>${ssrInterpolate(topup.name)}</span>。填增量(可填负数下调),当前余额:<span class="text-emerald-600" data-v-06dca20b>${ssrInterpolate(topup.cur)}</span></p><div class="grid grid-cols-3 gap-3" data-v-06dca20b><div data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>VIP天数</label><input${ssrRenderAttr("value", topup.vipday)} type="number" class="input input-bordered input-sm w-full" data-v-06dca20b></div><div data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>翻译分钟</label><input${ssrRenderAttr("value", topup.trademin)} type="number" class="input input-bordered input-sm w-full" data-v-06dca20b></div><div data-v-06dca20b><label class="text-xs text-slate-500" data-v-06dca20b>会议分钟</label><input${ssrRenderAttr("value", topup.meetmin)} type="number" class="input input-bordered input-sm w-full" data-v-06dca20b></div></div><div class="modal-action" data-v-06dca20b><button class="btn btn-ghost btn-sm" data-v-06dca20b>取消</button><button class="btn btn-primary btn-sm text-white" data-v-06dca20b>确认</button></div></div><form method="dialog" class="modal-backdrop" data-v-06dca20b><button data-v-06dca20b>close</button></form></dialog></div>`); |
|||
}; |
|||
} |
|||
}); |
|||
const _sfc_setup = _sfc_main.setup; |
|||
_sfc_main.setup = (props, ctx) => { |
|||
const ssrContext = useSSRContext(); |
|||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/accounts.vue"); |
|||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0; |
|||
}; |
|||
const accounts = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-06dca20b"]]); |
|||
|
|||
export { accounts as default }; |
|||
//# sourceMappingURL=accounts-Do2bLhnl.mjs.map
|
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"accounts-Do2bLhnl.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/accounts-Do2bLhnl.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -0,0 +1,8 @@ |
|||
const accounts_vue_vue_type_style_index_0_scoped_11e40be5_lang = ".chk[data-v-11e40be5]{display:flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid #e2e8f0;border-radius:8px;font-size:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chk[data-v-11e40be5]:hover{background:#f8fafc}.chk input[data-v-11e40be5]{width:14px;height:14px}"; |
|||
|
|||
const accountsStyles_BDB5hjDL = [ |
|||
accounts_vue_vue_type_style_index_0_scoped_11e40be5_lang |
|||
]; |
|||
|
|||
export { accountsStyles_BDB5hjDL as default }; |
|||
//# sourceMappingURL=accounts-styles.BDB5hjDL.mjs.map
|
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"accounts-styles.BDB5hjDL.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/accounts-styles-1.mjs-DycKxbeh.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/accounts-styles.BDB5hjDL.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0,1]} |
|||
@ -1,8 +0,0 @@ |
|||
const accounts_vue_vue_type_style_index_0_scoped_06dca20b_lang = ".chk[data-v-06dca20b]{display:flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid #e2e8f0;border-radius:8px;font-size:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chk[data-v-06dca20b]:hover{background:#f8fafc}.chk input[data-v-06dca20b]{width:14px;height:14px}"; |
|||
|
|||
const accountsStyles_E9MHodaB = [ |
|||
accounts_vue_vue_type_style_index_0_scoped_06dca20b_lang |
|||
]; |
|||
|
|||
export { accountsStyles_E9MHodaB as default }; |
|||
//# sourceMappingURL=accounts-styles.E9MHodaB.mjs.map
|
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"accounts-styles.E9MHodaB.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/accounts-styles-1.mjs-SXsKnpTk.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/accounts-styles.E9MHodaB.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0,1]} |
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"agents-C12ARvzr.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/agents-C12ARvzr.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"agents-CIlOwJNK.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/agents-CIlOwJNK.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"calltranslate-D-FgQw8P.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/calltranslate-D-FgQw8P.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"calltranslate-_E_BEUJD.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/calltranslate-_E_BEUJD.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||
{"version":3,"file":"dashboard-CXdhxG8p.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dashboard-CXdhxG8p.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"dashboard-DNJrSuH-.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dashboard-DNJrSuH-.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -1,11 +0,0 @@ |
|||
import { S as SvcAlertBanner_vue_vue_type_style_index_0_scoped_3dd2fb7c_lang } from './dashboard-styles-1.mjs-CFxtv9Pt.mjs'; |
|||
|
|||
const dashboard_vue_vue_type_style_index_0_scoped_0c034b8c_lang = ".panel[data-v-0c034b8c]{background:#fff;border:1px solid #f1f5f9;border-radius:16px;box-shadow:0 1px 2px #0000000a;overflow:hidden}.panel-head[data-v-0c034b8c]{padding:12px 18px;gap:10px;border-bottom:1px solid #f8fafc;flex-wrap:wrap}.panel-dot[data-v-0c034b8c],.panel-head[data-v-0c034b8c]{display:flex;align-items:center}.panel-dot[data-v-0c034b8c]{width:30px;height:30px;border-radius:9px;justify-content:center;flex-shrink:0}.stat-box[data-v-0c034b8c]{padding:10px 12px;border-radius:10px;background:#fafbfc}.stat-label[data-v-0c034b8c]{font-size:11px;color:#94a3b8;margin-bottom:3px}.stat-val[data-v-0c034b8c]{font-size:20px;font-weight:700;color:#1e293b;line-height:1.1;letter-spacing:-.02em}.sec-title[data-v-0c034b8c]{display:flex;align-items:center;gap:10px;margin:0 0 14px}.sec-title .bar[data-v-0c034b8c]{width:4px;height:18px;border-radius:3px}.sec-title h2[data-v-0c034b8c]{font-size:15px;font-weight:700;color:#0f172a;letter-spacing:-.01em}.sec-title .sub[data-v-0c034b8c]{font-size:12px;color:#94a3b8}.sec-title .tag[data-v-0c034b8c]{font-size:11px;font-weight:600;padding:2px 9px;border-radius:999px}.sec-title.muted .bar[data-v-0c034b8c]{height:14px;opacity:.6}.sec-title.muted h2[data-v-0c034b8c]{font-size:13px;font-weight:600;color:#94a3b8}.sec-title.hero .bar[data-v-0c034b8c]{width:5px;height:22px}.sec-title.hero h2[data-v-0c034b8c]{font-size:18px;font-weight:800;color:#0f172a}.cum-card[data-v-0c034b8c]{gap:11px;background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;padding:10px 13px}.cum-card[data-v-0c034b8c],.cum-card .ico[data-v-0c034b8c]{display:flex;align-items:center}.cum-card .ico[data-v-0c034b8c]{width:30px;height:30px;border-radius:9px;justify-content:center;flex-shrink:0;font-size:14px;filter:saturate(.65);opacity:.85}.cum-card .body[data-v-0c034b8c]{min-width:0}.cum-card .lbl[data-v-0c034b8c]{font-size:11.5px;color:#94a3b8;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cum-card .val[data-v-0c034b8c]{font-size:17px;font-weight:700;color:#64748b;line-height:1.3;letter-spacing:-.01em;margin-top:1px}.today-wrap[data-v-0c034b8c]{background:linear-gradient(180deg,#e8f1ff,#f5f9ff);border:1px solid #d6e4ff;border-radius:22px;padding:20px;box-shadow:0 1px 3px #0d6efd0d}.today-card[data-v-0c034b8c]{position:relative;background:#fff;border:1px solid #e6eefb;border-radius:18px;padding:17px 19px;box-shadow:0 6px 18px #0d6efd14;transition:transform .18s ease,box-shadow .18s ease;overflow:hidden}.today-card[data-v-0c034b8c]:hover{transform:translateY(-3px);box-shadow:0 14px 32px #0d6efd26}.today-card .accent[data-v-0c034b8c]{position:absolute;left:0;top:0;bottom:0;width:5px}.today-card-top[data-v-0c034b8c]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.today-card .lbl[data-v-0c034b8c]{font-size:13px;color:#475569;font-weight:600}.today-card .ico[data-v-0c034b8c]{width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:20px}.today-card .val[data-v-0c034b8c]{font-size:31px;font-weight:800;color:#0f172a;line-height:1.05;letter-spacing:-.02em}.today-card .foot[data-v-0c034b8c]{margin-top:9px;font-size:12px;color:#94a3b8;display:flex;align-items:center;gap:6px}.delta[data-v-0c034b8c]{display:inline-flex;align-items:center;gap:2px;font-weight:700;padding:2px 7px;border-radius:7px;font-size:11.5px}.delta.up[data-v-0c034b8c]{color:#059669;background:#ecfdf5}.delta.down[data-v-0c034b8c]{color:#dc2626;background:#fef2f2}.delta.flat[data-v-0c034b8c],.tbtn[data-v-0c034b8c]{color:#64748b;background:#f1f5f9}.tbtn[data-v-0c034b8c]{font-size:11px;padding:3px 9px;border-radius:7px;line-height:1.4}.tbtn[data-v-0c034b8c]:hover{background:#e2e8f0}.tbtn-on[data-v-0c034b8c]{background:#1e293b;color:#fff}"; |
|||
|
|||
const dashboardStyles_8BsG9zJ = [ |
|||
SvcAlertBanner_vue_vue_type_style_index_0_scoped_3dd2fb7c_lang, |
|||
dashboard_vue_vue_type_style_index_0_scoped_0c034b8c_lang |
|||
]; |
|||
|
|||
export { dashboardStyles_8BsG9zJ as default }; |
|||
//# sourceMappingURL=dashboard-styles.8Bs-G9zJ.mjs.map
|
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"dashboard-styles.8Bs-G9zJ.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dashboard-styles-2.mjs-CRINJjkO.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dashboard-styles.8Bs-G9zJ.mjs"],"names":["style_0","style_1"],"mappings":"","x_google_ignoreList":[0,1]} |
|||
@ -0,0 +1,11 @@ |
|||
import { S as SvcAlertBanner_vue_vue_type_style_index_0_scoped_3dd2fb7c_lang } from './dashboard-styles-1.mjs-CFxtv9Pt.mjs'; |
|||
|
|||
const dashboard_vue_vue_type_style_index_0_scoped_aff3efc7_lang = ".panel[data-v-aff3efc7]{background:#fff;border:1px solid #f1f5f9;border-radius:16px;box-shadow:0 1px 2px #0000000a;overflow:hidden}.panel-head[data-v-aff3efc7]{padding:12px 18px;gap:10px;border-bottom:1px solid #f8fafc;flex-wrap:wrap}.panel-dot[data-v-aff3efc7],.panel-head[data-v-aff3efc7]{display:flex;align-items:center}.panel-dot[data-v-aff3efc7]{width:30px;height:30px;border-radius:9px;justify-content:center;flex-shrink:0}.stat-box[data-v-aff3efc7]{padding:10px 12px;border-radius:10px;background:#fafbfc}.stat-label[data-v-aff3efc7]{font-size:11px;color:#94a3b8;margin-bottom:3px}.stat-val[data-v-aff3efc7]{font-size:20px;font-weight:700;color:#1e293b;line-height:1.1;letter-spacing:-.02em}.sec-title[data-v-aff3efc7]{display:flex;align-items:center;gap:10px;margin:0 0 14px}.sec-title .bar[data-v-aff3efc7]{width:4px;height:18px;border-radius:3px}.sec-title h2[data-v-aff3efc7]{font-size:15px;font-weight:700;color:#0f172a;letter-spacing:-.01em}.sec-title .sub[data-v-aff3efc7]{font-size:12px;color:#94a3b8}.sec-title .tag[data-v-aff3efc7]{font-size:11px;font-weight:600;padding:2px 9px;border-radius:999px}.sec-title.muted .bar[data-v-aff3efc7]{height:14px;opacity:.6}.sec-title.muted h2[data-v-aff3efc7]{font-size:13px;font-weight:600;color:#94a3b8}.sec-title.hero .bar[data-v-aff3efc7]{width:5px;height:22px}.sec-title.hero h2[data-v-aff3efc7]{font-size:18px;font-weight:800;color:#0f172a}.cum-card[data-v-aff3efc7]{gap:11px;background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;padding:10px 13px}.cum-card[data-v-aff3efc7],.cum-card .ico[data-v-aff3efc7]{display:flex;align-items:center}.cum-card .ico[data-v-aff3efc7]{width:30px;height:30px;border-radius:9px;justify-content:center;flex-shrink:0;font-size:14px;filter:saturate(.65);opacity:.85}.cum-card .body[data-v-aff3efc7]{min-width:0}.cum-card .lbl[data-v-aff3efc7]{font-size:11.5px;color:#94a3b8;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cum-card .val[data-v-aff3efc7]{font-size:17px;font-weight:700;color:#64748b;line-height:1.3;letter-spacing:-.01em;margin-top:1px}.today-wrap[data-v-aff3efc7]{background:linear-gradient(180deg,#e8f1ff,#f5f9ff);border:1px solid #d6e4ff;border-radius:22px;padding:20px;box-shadow:0 1px 3px #0d6efd0d}.today-card[data-v-aff3efc7]{position:relative;background:#fff;border:1px solid #e6eefb;border-radius:18px;padding:17px 19px;box-shadow:0 6px 18px #0d6efd14;transition:transform .18s ease,box-shadow .18s ease;overflow:hidden}.today-card[data-v-aff3efc7]:hover{transform:translateY(-3px);box-shadow:0 14px 32px #0d6efd26}.today-card .accent[data-v-aff3efc7]{position:absolute;left:0;top:0;bottom:0;width:5px}.today-card-top[data-v-aff3efc7]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.today-card .lbl[data-v-aff3efc7]{font-size:13px;color:#475569;font-weight:600}.today-card .ico[data-v-aff3efc7]{width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:20px}.today-card .val[data-v-aff3efc7]{font-size:31px;font-weight:800;color:#0f172a;line-height:1.05;letter-spacing:-.02em}.today-card .foot[data-v-aff3efc7]{margin-top:9px;font-size:12px;color:#94a3b8;display:flex;align-items:center;gap:6px}.delta[data-v-aff3efc7]{display:inline-flex;align-items:center;gap:2px;font-weight:700;padding:2px 7px;border-radius:7px;font-size:11.5px}.delta.up[data-v-aff3efc7]{color:#059669;background:#ecfdf5}.delta.down[data-v-aff3efc7]{color:#dc2626;background:#fef2f2}.delta.flat[data-v-aff3efc7],.tbtn[data-v-aff3efc7]{color:#64748b;background:#f1f5f9}.tbtn[data-v-aff3efc7]{font-size:11px;padding:3px 9px;border-radius:7px;line-height:1.4}.tbtn[data-v-aff3efc7]:hover{background:#e2e8f0}.tbtn-on[data-v-aff3efc7]{background:#1e293b;color:#fff}"; |
|||
|
|||
const dashboardStyles_CHktdCkV = [ |
|||
SvcAlertBanner_vue_vue_type_style_index_0_scoped_3dd2fb7c_lang, |
|||
dashboard_vue_vue_type_style_index_0_scoped_aff3efc7_lang |
|||
]; |
|||
|
|||
export { dashboardStyles_CHktdCkV as default }; |
|||
//# sourceMappingURL=dashboard-styles.CHktdCkV.mjs.map
|
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"dashboard-styles.CHktdCkV.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dashboard-styles-2.mjs-4amXMnA0.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dashboard-styles.CHktdCkV.mjs"],"names":["style_0","style_1"],"mappings":"","x_google_ignoreList":[0,1]} |
|||
@ -0,0 +1,190 @@ |
|||
import { defineComponent, computed, ref, reactive, unref, useSSRContext } from 'vue'; |
|||
import { ssrRenderAttrs, ssrRenderStyle, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrInterpolate, ssrRenderClass } from 'vue/server-renderer'; |
|||
import { u as useApi } from './useApi-B-E5eLsI.mjs'; |
|||
import { u as useToast } from './useToast-CS21XT61.mjs'; |
|||
import { a as useAuthStore } from './server.mjs'; |
|||
import './useLoading-D4zrSa2m.mjs'; |
|||
import '../nitro/nitro.mjs'; |
|||
import 'node:http'; |
|||
import 'node:https'; |
|||
import 'node:events'; |
|||
import 'node:buffer'; |
|||
import 'node:fs'; |
|||
import 'node:path'; |
|||
import 'node:crypto'; |
|||
import 'node:url'; |
|||
import '../routes/renderer.mjs'; |
|||
import 'vue-bundle-renderer/runtime'; |
|||
import 'unhead/server'; |
|||
import 'devalue'; |
|||
import 'unhead/utils'; |
|||
import 'pinia'; |
|||
import 'perfect-debounce'; |
|||
|
|||
const _sfc_main = /* @__PURE__ */ defineComponent({ |
|||
__name: "dealers", |
|||
__ssrInlineRender: true, |
|||
setup(__props) { |
|||
useApi(); |
|||
useToast(); |
|||
const auth = useAuthStore(); |
|||
const canAudit = computed(() => auth.isAdmin); |
|||
const view = ref("list"); |
|||
const rows = ref([]); |
|||
const brands = ref([]); |
|||
const loading = ref(false); |
|||
const submitting = ref(false); |
|||
const isEditing = ref(false); |
|||
const filters = reactive({ brandid: 0, status: -1, keyword: "" }); |
|||
const form = reactive({ id: "", name: "", brandid: 0, sharepct: 0, contact: "", contactmails: "", remark: "" }); |
|||
const STATUS_LABELS = { 0: "待审核", 1: "启用", 2: "停用", 3: "驳回" }; |
|||
const STATUS_CLASS = { |
|||
0: "badge-warning", |
|||
1: "badge-success", |
|||
2: "badge-ghost", |
|||
3: "badge-error" |
|||
}; |
|||
function statusLabel(s) { |
|||
return STATUS_LABELS[s] ?? String(s); |
|||
} |
|||
function statusClass(s) { |
|||
return STATUS_CLASS[s] ?? "badge-ghost"; |
|||
} |
|||
function ratePct(rate) { |
|||
return ((Number(rate) || 0) / 100).toFixed(2) + "%"; |
|||
} |
|||
function brandName(id) { |
|||
const b = brands.value.find((x) => x.id === id); |
|||
return b ? b.brand : id ? "品牌商#" + Number(id).toString(16).toUpperCase() : "-"; |
|||
} |
|||
function fmtTime(ts) { |
|||
if (!ts) return "-"; |
|||
const d = new Date(ts * 1e3); |
|||
const p = (n) => ("0" + n).slice(-2); |
|||
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`; |
|||
} |
|||
return (_ctx, _push, _parent, _attrs) => { |
|||
_push(`<div${ssrRenderAttrs(_attrs)}><div style="${ssrRenderStyle(view.value === "list" ? null : { display: "none" })}"><div class="flex items-center justify-between mb-5"><h2 class="text-lg font-semibold text-slate-800">渠道商列表</h2>`); |
|||
if (!unref(auth).isDealer) { |
|||
_push(`<button class="btn btn-primary btn-sm text-white">+ 新增渠道商</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</div><div class="bg-white rounded-xl shadow-sm border border-slate-100 p-4 mb-4"><div class="flex flex-wrap items-end gap-3">`); |
|||
if (!unref(auth).isBrandAccount && !unref(auth).isDealer) { |
|||
_push(`<div class="form-control"><label class="label py-1"><span class="label-text text-xs text-slate-500">品牌商</span></label><select class="select select-bordered select-sm w-48"><option${ssrRenderAttr("value", 0)}${ssrIncludeBooleanAttr(Array.isArray(filters.brandid) ? ssrLooseContain(filters.brandid, 0) : ssrLooseEqual(filters.brandid, 0)) ? " selected" : ""}>全部品牌商</option><!--[-->`); |
|||
ssrRenderList(brands.value, (b) => { |
|||
_push(`<option${ssrRenderAttr("value", b.id)}${ssrIncludeBooleanAttr(Array.isArray(filters.brandid) ? ssrLooseContain(filters.brandid, b.id) : ssrLooseEqual(filters.brandid, b.id)) ? " selected" : ""}>${ssrInterpolate(b.brand)}</option>`); |
|||
}); |
|||
_push(`<!--]--></select></div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<div class="form-control"><label class="label py-1"><span class="label-text text-xs text-slate-500">状态</span></label><select class="select select-bordered select-sm w-36"><option${ssrRenderAttr("value", -1)}${ssrIncludeBooleanAttr(Array.isArray(filters.status) ? ssrLooseContain(filters.status, -1) : ssrLooseEqual(filters.status, -1)) ? " selected" : ""}>全部状态</option><option${ssrRenderAttr("value", 0)}${ssrIncludeBooleanAttr(Array.isArray(filters.status) ? ssrLooseContain(filters.status, 0) : ssrLooseEqual(filters.status, 0)) ? " selected" : ""}>待审核</option><option${ssrRenderAttr("value", 1)}${ssrIncludeBooleanAttr(Array.isArray(filters.status) ? ssrLooseContain(filters.status, 1) : ssrLooseEqual(filters.status, 1)) ? " selected" : ""}>启用</option><option${ssrRenderAttr("value", 2)}${ssrIncludeBooleanAttr(Array.isArray(filters.status) ? ssrLooseContain(filters.status, 2) : ssrLooseEqual(filters.status, 2)) ? " selected" : ""}>停用</option><option${ssrRenderAttr("value", 3)}${ssrIncludeBooleanAttr(Array.isArray(filters.status) ? ssrLooseContain(filters.status, 3) : ssrLooseEqual(filters.status, 3)) ? " selected" : ""}>驳回</option></select></div><div class="form-control"><label class="label py-1"><span class="label-text text-xs text-slate-500">搜索</span></label><input${ssrRenderAttr("value", filters.keyword)} type="text" class="input input-bordered input-sm w-52" placeholder="名称 / 渠道商ID"></div><button class="btn btn-sm btn-primary text-white">查询</button><button class="btn btn-sm btn-ghost">重置</button></div></div><div class="bg-white rounded-xl shadow-sm border border-slate-100"><div class="overflow-x-auto"><table class="table table-zebra"><thead><tr><th>渠道商ID</th><th>名称</th><th>所属品牌商</th><th>分成比例</th><th>联系方式</th><th>状态</th><th>创建时间</th><th>操作</th></tr></thead><tbody>`); |
|||
if (loading.value) { |
|||
_push(`<tr><td colspan="8" class="text-center py-8"><span class="loading loading-spinner loading-sm"></span></td></tr>`); |
|||
} else if (!rows.value.length) { |
|||
_push(`<tr><td colspan="8" class="text-center text-slate-400 py-8">暂无数据</td></tr>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<!--[-->`); |
|||
ssrRenderList(rows.value, (ch) => { |
|||
_push(`<tr><td class="font-mono text-sm font-semibold">${ssrInterpolate(ch.id)}</td><td class="font-medium">${ssrInterpolate(ch.name)}</td><td><span class="badge badge-ghost badge-sm">${ssrInterpolate(brandName(ch.brandid))}</span></td><td class="text-sm">${ssrInterpolate(ratePct(ch.sharerate))}</td><td class="text-sm text-slate-500">`); |
|||
if (ch.contact) { |
|||
_push(`<div>${ssrInterpolate(ch.contact)}</div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
if (ch.contactmails) { |
|||
_push(`<div class="text-xs text-slate-400">${ssrInterpolate(ch.contactmails)}</div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
if (!ch.contact && !ch.contactmails) { |
|||
_push(`<span class="text-slate-300">-</span>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</td><td><span class="${ssrRenderClass([statusClass(ch.status), "badge badge-sm"])}">${ssrInterpolate(statusLabel(ch.status))}</span>`); |
|||
if (ch.status === 3 && ch.auditremark) { |
|||
_push(`<div class="text-xs text-slate-400 mt-1">${ssrInterpolate(ch.auditremark)}</div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</td><td class="text-sm text-slate-500">${ssrInterpolate(fmtTime(ch.createtime))}</td><td><div class="flex flex-wrap gap-1"><button class="btn btn-ghost btn-xs">编辑</button>`); |
|||
if (canAudit.value) { |
|||
_push(`<!--[-->`); |
|||
if (ch.status !== 1) { |
|||
_push(`<button class="btn btn-ghost btn-xs text-emerald-600">${ssrInterpolate(ch.status === 0 ? "通过" : "启用")}</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
if (ch.status === 1) { |
|||
_push(`<button class="btn btn-ghost btn-xs text-amber-600">停用</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
if (ch.status === 0) { |
|||
_push(`<button class="btn btn-ghost btn-xs text-red-500">驳回</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<!--]-->`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
if (!unref(auth).isDealer) { |
|||
_push(`<button class="btn btn-ghost btn-xs text-red-500">删除</button>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</div></td></tr>`); |
|||
}); |
|||
_push(`<!--]--></tbody></table></div></div><p class="text-xs text-slate-400 mt-3">`); |
|||
if (unref(auth).isBrandAccount) { |
|||
_push(`<!--[--> 这里只显示贵品牌商名下的渠道商。新增后为「待审核」,需平台审核通过(状态=启用)才能用于生产授权码;分成比例由平台设置。 <!--]-->`); |
|||
} else { |
|||
_push(`<!--[--> 渠道商新增后需超管/管理员审核通过(状态=启用)才能用于生产授权码;已有生产批次的渠道商不能删除,只能停用。 <!--]-->`); |
|||
} |
|||
_push(`</p></div><div style="${ssrRenderStyle(view.value === "form" ? null : { display: "none" })}"><div class="flex items-center gap-3 mb-5"><button class="btn btn-ghost btn-sm">← 返回列表</button><h2 class="text-lg font-semibold text-slate-800">${ssrInterpolate(isEditing.value ? "编辑渠道商" : "新增渠道商")}</h2></div><div class="bg-white rounded-xl shadow-sm border border-slate-100 p-6 max-w-2xl"><form>`); |
|||
if (isEditing.value) { |
|||
_push(`<div class="form-control mb-4"><label class="label"><span class="label-text font-medium">渠道商ID</span></label><input${ssrRenderAttr("value", form.id)} type="text" class="input input-bordered w-full font-mono" disabled><span class="label-text-alt text-slate-400 mt-1">短码由系统生成,创建后不可修改</span></div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<div class="form-control mb-4"><label class="label"><span class="label-text font-medium">渠道商名称 *</span></label><input${ssrRenderAttr("value", form.name)} type="text" class="input input-bordered w-full" required></div>`); |
|||
if (!unref(auth).isBrandAccount) { |
|||
_push(`<div class="form-control mb-4"><label class="label"><span class="label-text font-medium">所属品牌商 *</span></label><select class="select select-bordered w-full"${ssrIncludeBooleanAttr(isEditing.value) ? " disabled" : ""} required><option${ssrRenderAttr("value", 0)}${ssrIncludeBooleanAttr(Array.isArray(form.brandid) ? ssrLooseContain(form.brandid, 0) : ssrLooseEqual(form.brandid, 0)) ? " selected" : ""}>请选择品牌商</option><!--[-->`); |
|||
ssrRenderList(brands.value, (b) => { |
|||
_push(`<option${ssrRenderAttr("value", b.id)}${ssrIncludeBooleanAttr(Array.isArray(form.brandid) ? ssrLooseContain(form.brandid, b.id) : ssrLooseEqual(form.brandid, b.id)) ? " selected" : ""}>${ssrInterpolate(b.brand)}</option>`); |
|||
}); |
|||
_push(`<!--]--></select>`); |
|||
if (isEditing.value) { |
|||
_push(`<span class="label-text-alt text-slate-400 mt-1">归属品牌商创建后不可修改</span>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</div>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`<div class="form-control mb-4"><label class="label"><span class="label-text font-medium">分成比例(%)</span></label><input${ssrRenderAttr("value", form.sharepct)} type="number" step="0.01" min="0" max="100" class="input input-bordered w-full"${ssrIncludeBooleanAttr(!canAudit.value) ? " disabled" : ""}><span class="label-text-alt text-slate-400 mt-1"> 从所属品牌商的分成里再切;仅超管/管理员可设置。 </span></div><div class="form-control mb-4"><label class="label"><span class="label-text font-medium">联系人 / 电话</span></label><input${ssrRenderAttr("value", form.contact)} type="text" class="input input-bordered w-full"></div><div class="form-control mb-4"><label class="label"><span class="label-text font-medium">联系邮箱</span></label><input${ssrRenderAttr("value", form.contactmails)} type="text" class="input input-bordered w-full" placeholder="多个邮箱用逗号分隔"></div><div class="form-control mb-6"><label class="label"><span class="label-text font-medium">备注</span></label><textarea class="textarea textarea-bordered w-full" rows="3">${ssrInterpolate(form.remark)}</textarea></div><div class="flex gap-3"><button type="button" class="btn btn-ghost">取消</button><button type="submit" class="btn btn-primary text-white"${ssrIncludeBooleanAttr(submitting.value) ? " disabled" : ""}>保存</button></div>`); |
|||
if (!isEditing.value && !canAudit.value) { |
|||
_push(`<p class="text-xs text-amber-600 mt-3"> 提交后为「待审核」状态,须超管/管理员通过后才能用于生产。 </p>`); |
|||
} else { |
|||
_push(`<!---->`); |
|||
} |
|||
_push(`</form></div></div></div>`); |
|||
}; |
|||
} |
|||
}); |
|||
const _sfc_setup = _sfc_main.setup; |
|||
_sfc_main.setup = (props, ctx) => { |
|||
const ssrContext = useSSRContext(); |
|||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/dealers.vue"); |
|||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0; |
|||
}; |
|||
|
|||
export { _sfc_main as default }; |
|||
//# sourceMappingURL=dealers-D0gf3N66.mjs.map
|
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"dealers-D0gf3N66.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/dealers-D0gf3N66.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"device-B1tPcS6i.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/device-B1tPcS6i.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -0,0 +1 @@ |
|||
{"version":3,"file":"device-C1RxH3sw.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/device-C1RxH3sw.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
@ -1 +0,0 @@ |
|||
{"version":3,"file":"factory-BCjt3r8_.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/factory-BCjt3r8_.js"],"names":[],"mappings":"","x_google_ignoreList":[0]} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue