upload project source code

This commit is contained in:
2026-04-30 18:49:43 +08:00
commit 9b394ba682
2277 changed files with 660945 additions and 0 deletions

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

View File

@@ -0,0 +1 @@
import{S as s,g as e}from"./element-plus.DhcJM-BD.js";import{o as r,e9 as t,v as a,J as o,u as m,t as n,I as i,Y as p,Z as l,K as u,dY as _}from"./.pnpm.DGfAnZKL.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(r({name:"Page401",__name:"401",setup(r){const c=_(),d=()=>c.push("/"),g=t().t;return(r,t)=>{const _=e,c=s;return n(),a(c,{title:m(g)("error.noPermission"),"sub-title":"请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"},{icon:o(()=>[...t[0]||(t[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/401.RqeqO19C.svg",alt:"401"},null,-1)])]),extra:o(()=>[i(_,{round:"",type:"primary",onClick:d},{default:o(()=>[p(l(m(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d73e3983"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,h as a}from"./element-plus.BfMFfVUv.js";import{J as e,e9 as r,T as t,a0 as o,o as m,S as n,$ as i,a9 as p,aa as l,a1 as u,dY as _}from"./.pnpm.BudmgPu7.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(e({name:"Page401",__name:"401",setup(e){const c=_(),d=()=>c.push("/"),f=r().t;return(e,r)=>{const _=a,c=s;return n(),t(c,{title:m(f)("error.noPermission"),"sub-title":"请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"},{icon:o(()=>[...r[0]||(r[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/web/img/401.RqeqO19C.svg",alt:"401"},null,-1)])]),extra:o(()=>[i(_,{round:"",type:"primary",onClick:d},{default:o(()=>[p(l(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-344964a1"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,h as a}from"./element-plus.BfMFfVUv.js";import{J as e,e9 as r,T as t,a0 as o,o as m,S as n,$ as i,a9 as p,aa as l,a1 as u,dY as _}from"./.pnpm.BudmgPu7.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(e({name:"Page401",__name:"401",setup(e){const c=_(),d=()=>c.push("/"),f=r().t;return(e,r)=>{const _=a,c=s;return n(),t(c,{title:m(f)("error.noPermission"),"sub-title":"请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"},{icon:o(()=>[...r[0]||(r[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/401.RqeqO19C.svg",alt:"401"},null,-1)])]),extra:o(()=>[i(_,{round:"",type:"primary",onClick:d},{default:o(()=>[p(l(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-344964a1"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,h as a}from"./element-plus.sfqR2v8u.js";import{J as e,e9 as r,T as t,a0 as o,o as m,S as n,$ as i,a9 as p,aa as l,a1 as u,dY as _}from"./.pnpm.BudmgPu7.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(e({name:"Page401",__name:"401",setup(e){const c=_(),d=()=>c.push("/"),f=r().t;return(e,r)=>{const _=a,c=s;return n(),t(c,{title:m(f)("error.noPermission"),"sub-title":"请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"},{icon:o(()=>[...r[0]||(r[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/401.RqeqO19C.svg",alt:"401"},null,-1)])]),extra:o(()=>[i(_,{round:"",type:"primary",onClick:d},{default:o(()=>[p(l(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-344964a1"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,h as a}from"./element-plus.C1XeB8_q.js";import{J as e,e9 as r,T as t,a0 as o,o as m,S as n,$ as i,a9 as p,aa as l,a1 as u,dY as _}from"./.pnpm.BudmgPu7.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(e({name:"Page401",__name:"401",setup(e){const c=_(),d=()=>c.push("/"),f=r().t;return(e,r)=>{const _=a,c=s;return n(),t(c,{title:m(f)("error.noPermission"),"sub-title":"请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"},{icon:o(()=>[...r[0]||(r[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/401.RqeqO19C.svg",alt:"401"},null,-1)])]),extra:o(()=>[i(_,{round:"",type:"primary",onClick:d},{default:o(()=>[p(l(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-344964a1"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,h as a}from"./element-plus.BQf8a6uP.js";import{J as e,e9 as r,T as t,a0 as o,o as m,S as n,$ as i,a9 as p,aa as l,a1 as u,dY as _}from"./.pnpm.BudmgPu7.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(e({name:"Page401",__name:"401",setup(e){const c=_(),d=()=>c.push("/"),f=r().t;return(e,r)=>{const _=a,c=s;return n(),t(c,{title:m(f)("error.noPermission"),"sub-title":"请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"},{icon:o(()=>[...r[0]||(r[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/401.RqeqO19C.svg",alt:"401"},null,-1)])]),extra:o(()=>[i(_,{round:"",type:"primary",onClick:d},{default:o(()=>[p(l(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-344964a1"]]);export{d as default};

View File

@@ -0,0 +1,46 @@
import { S as ElResult, h as ElButton } from "./element-plus.CkEW9frc.js";
import { J as defineComponent, e9 as useI18n, T as createBlock, a0 as withCtx, o as unref, S as openBlock, $ as createVNode, a9 as createTextVNode, aa as toDisplayString, a1 as createBaseVNode, dY as useRouter } from "./.pnpm.BW3P1y8f.js";
import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js";
const _imports_0 = "/web/img/401.RqeqO19C.svg";
const _sfc_main = /* @__PURE__ */ defineComponent({
...{ name: "Page401" },
__name: "401",
setup(__props) {
const router = useRouter();
const back = () => router.push("/");
const t = useI18n().t;
return (_ctx, _cache) => {
const _component_el_button = ElButton;
const _component_el_result = ElResult;
return openBlock(), createBlock(_component_el_result, {
title: unref(t)("error.noPermission"),
"sub-title": "请确认您的权限是否满足操作要求,或者点击下方按钮返回首页。"
}, {
icon: withCtx(() => [..._cache[0] || (_cache[0] = [
createBaseVNode("img", {
class: "min-w-[23.4375rem] sm:w-120",
src: _imports_0,
alt: "401"
}, null, -1)
])]),
extra: withCtx(() => [
createVNode(_component_el_button, {
round: "",
type: "primary",
onClick: back
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("error.returnToHome")), 1)
]),
_: 1
})
]),
_: 1
}, 8, ["title"]);
};
}
});
const _401 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-344964a1"]]);
export {
_401 as default
};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.sfqR2v8u.js";import{J as r,e9 as e,T as t,a0 as o,o as m,S as n,$ as p,a9 as l,aa as i,a1 as u,dY as c}from"./.pnpm.BudmgPu7.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=_(r({name:"Page404",__name:"404",setup(r){const _=c(),d=()=>_.push("/"),f=e().t;return(r,e)=>{const c=s,_=a;return n(),t(_,{title:m(f)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(c,{round:"",type:"primary",onClick:d},{default:o(()=>[l(i(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d9aac4a9"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.BfMFfVUv.js";import{J as r,e9 as e,T as t,a0 as o,o as m,S as n,$ as p,a9 as l,aa as i,a1 as u,dY as c}from"./.pnpm.BudmgPu7.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=_(r({name:"Page404",__name:"404",setup(r){const _=c(),d=()=>_.push("/"),f=e().t;return(r,e)=>{const c=s,_=a;return n(),t(_,{title:m(f)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(c,{round:"",type:"primary",onClick:d},{default:o(()=>[l(i(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d9aac4a9"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.C1XeB8_q.js";import{J as r,e9 as e,T as t,a0 as o,o as m,S as n,$ as p,a9 as l,aa as i,a1 as u,dY as _}from"./.pnpm.BudmgPu7.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=c(r({name:"Page404",__name:"404",setup(r){const c=_(),d=()=>c.push("/"),f=e().t;return(r,e)=>{const _=s,c=a;return n(),t(c,{title:m(f)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(_,{round:"",type:"primary",onClick:d},{default:o(()=>[l(i(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d9aac4a9"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,g as r}from"./element-plus.DhcJM-BD.js";import{o as a,e9 as e,v as t,J as o,u as m,t as n,I as p,Y as l,Z as u,K as i,dY as _}from"./.pnpm.DGfAnZKL.js";import{_ as c}from"./_plugin-vue_export-helper.BCo6x5W8.js";const f=c(a({name:"Page404",__name:"404",setup(a){const c=_(),f=()=>c.push("/"),g=e().t;return(a,e)=>{const _=r,c=s;return n(),t(c,{title:m(g)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[i("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(_,{round:"",type:"primary",onClick:f},{default:o(()=>[l(u(m(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-7af73292"]]);export{f as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.BfMFfVUv.js";import{J as e,e9 as r,T as t,a0 as o,o as m,S as n,$ as p,a9 as l,aa as i,a1 as u,dY as c}from"./.pnpm.BudmgPu7.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=_(e({name:"Page404",__name:"404",setup(e){const _=c(),d=()=>_.push("/"),f=r().t;return(e,r)=>{const c=s,_=a;return n(),t(_,{title:m(f)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...r[0]||(r[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/web/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(c,{round:"",type:"primary",onClick:d},{default:o(()=>[l(i(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d9aac4a9"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.C1XeB8_q.js";import{J as r,e9 as e,T as t,a0 as o,o as m,S as n,$ as p,a9 as l,aa as i,a1 as u,dY as c}from"./.pnpm.BudmgPu7.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=_(r({name:"Page404",__name:"404",setup(r){const _=c(),d=()=>_.push("/"),f=e().t;return(r,e)=>{const c=s,_=a;return n(),t(_,{title:m(f)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(c,{round:"",type:"primary",onClick:d},{default:o(()=>[l(i(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d9aac4a9"]]);export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.BQf8a6uP.js";import{J as r,e9 as e,T as t,a0 as o,o as m,S as n,$ as p,a9 as l,aa as i,a1 as u,dY as c}from"./.pnpm.BudmgPu7.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const d=_(r({name:"Page404",__name:"404",setup(r){const _=c(),d=()=>_.push("/"),f=e().t;return(r,e)=>{const c=s,_=a;return n(),t(_,{title:m(f)("error.pageError"),"sub-title":"请确认页面网址是否正确,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[u("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/404.B3JyPfEa.svg",alt:"404"},null,-1)])]),extra:o(()=>[p(c,{round:"",type:"primary",onClick:d},{default:o(()=>[l(i(m(f)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d9aac4a9"]]);export{d as default};

View File

@@ -0,0 +1,46 @@
import { S as ElResult, h as ElButton } from "./element-plus.CkEW9frc.js";
import { J as defineComponent, e9 as useI18n, T as createBlock, a0 as withCtx, o as unref, S as openBlock, $ as createVNode, a9 as createTextVNode, aa as toDisplayString, a1 as createBaseVNode, dY as useRouter } from "./.pnpm.BW3P1y8f.js";
import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js";
const _imports_0 = "/web/img/404.B3JyPfEa.svg";
const _sfc_main = /* @__PURE__ */ defineComponent({
...{ name: "Page404" },
__name: "404",
setup(__props) {
const router = useRouter();
const back = () => router.push("/");
const t = useI18n().t;
return (_ctx, _cache) => {
const _component_el_button = ElButton;
const _component_el_result = ElResult;
return openBlock(), createBlock(_component_el_result, {
title: unref(t)("error.pageError"),
"sub-title": "请确认页面网址是否正确,或者点击下方按钮返回首页。"
}, {
icon: withCtx(() => [..._cache[0] || (_cache[0] = [
createBaseVNode("img", {
class: "min-w-[23.4375rem] sm:w-120",
src: _imports_0,
alt: "404"
}, null, -1)
])]),
extra: withCtx(() => [
createVNode(_component_el_button, {
round: "",
type: "primary",
onClick: back
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("error.returnToHome")), 1)
]),
_: 1
})
]),
_: 1
}, 8, ["title"]);
};
}
});
const _404 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d9aac4a9"]]);
export {
_404 as default
};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.C1XeB8_q.js";import{J as r,e9 as e,T as t,a0 as o,o as n,S as m,$ as l,a9 as u,aa as i,a1 as p,dY as c}from"./.pnpm.BudmgPu7.js";const d=r({name:"Page500",__name:"500",setup(r){const d=c(),f=()=>d.push("/"),g=e().t;return(r,e)=>{const c=s,d=a;return m(),t(d,{title:n(g)("error.networkError"),"sub-title":"请确认您的网络是否正常,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[p("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/500.BGu8fdSB.svg",alt:"500"},null,-1)])]),extra:o(()=>[l(c,{round:"",type:"primary",onClick:f},{default:o(()=>[u(i(n(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}});export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.BQf8a6uP.js";import{J as r,e9 as e,T as t,a0 as o,o as n,S as m,$ as l,a9 as u,aa as i,a1 as p,dY as c}from"./.pnpm.BudmgPu7.js";const d=r({name:"Page500",__name:"500",setup(r){const d=c(),f=()=>d.push("/"),g=e().t;return(r,e)=>{const c=s,d=a;return m(),t(d,{title:n(g)("error.networkError"),"sub-title":"请确认您的网络是否正常,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[p("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/500.BGu8fdSB.svg",alt:"500"},null,-1)])]),extra:o(()=>[l(c,{round:"",type:"primary",onClick:f},{default:o(()=>[u(i(n(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}});export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.BfMFfVUv.js";import{J as r,e9 as e,T as t,a0 as o,o as n,S as m,$ as l,a9 as u,aa as i,a1 as p,dY as c}from"./.pnpm.BudmgPu7.js";const d=r({name:"Page500",__name:"500",setup(r){const d=c(),f=()=>d.push("/"),g=e().t;return(r,e)=>{const c=s,d=a;return m(),t(d,{title:n(g)("error.networkError"),"sub-title":"请确认您的网络是否正常,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[p("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/500.BGu8fdSB.svg",alt:"500"},null,-1)])]),extra:o(()=>[l(c,{round:"",type:"primary",onClick:f},{default:o(()=>[u(i(n(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}});export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.BfMFfVUv.js";import{J as r,e9 as e,T as t,a0 as o,o as n,S as m,$ as l,a9 as u,aa as i,a1 as p,dY as c}from"./.pnpm.BudmgPu7.js";const d=r({name:"Page500",__name:"500",setup(r){const d=c(),f=()=>d.push("/"),g=e().t;return(r,e)=>{const c=s,d=a;return m(),t(d,{title:n(g)("error.networkError"),"sub-title":"请确认您的网络是否正常,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[p("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/web/img/500.BGu8fdSB.svg",alt:"500"},null,-1)])]),extra:o(()=>[l(c,{round:"",type:"primary",onClick:f},{default:o(()=>[u(i(n(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}});export{d as default};

View File

@@ -0,0 +1 @@
import{S as a,h as s}from"./element-plus.sfqR2v8u.js";import{J as r,e9 as e,T as t,a0 as o,o as n,S as m,$ as l,a9 as u,aa as i,a1 as p,dY as c}from"./.pnpm.BudmgPu7.js";const d=r({name:"Page500",__name:"500",setup(r){const d=c(),f=()=>d.push("/"),g=e().t;return(r,e)=>{const c=s,d=a;return m(),t(d,{title:n(g)("error.networkError"),"sub-title":"请确认您的网络是否正常,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[p("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/500.BGu8fdSB.svg",alt:"500"},null,-1)])]),extra:o(()=>[l(c,{round:"",type:"primary",onClick:f},{default:o(()=>[u(i(n(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}});export{d as default};

View File

@@ -0,0 +1 @@
import{S as s,g as r}from"./element-plus.DhcJM-BD.js";import{o as t,e9 as e,v as a,J as o,u as n,t as m,I as u,Y as l,Z as i,K as p,dY as c}from"./.pnpm.DGfAnZKL.js";const d=t({name:"Page500",__name:"500",setup(t){const d=c(),f=()=>d.push("/"),g=e().t;return(t,e)=>{const c=r,d=s;return m(),a(d,{title:n(g)("error.networkError"),"sub-title":"请确认您的网络是否正常,或者点击下方按钮返回首页。"},{icon:o(()=>[...e[0]||(e[0]=[p("img",{class:"min-w-[23.4375rem] sm:w-120",src:"/img/500.BGu8fdSB.svg",alt:"500"},null,-1)])]),extra:o(()=>[u(c,{round:"",type:"primary",onClick:f},{default:o(()=>[l(i(n(g)("error.returnToHome")),1)]),_:1})]),_:1},8,["title"])}}});export{d as default};

View File

@@ -0,0 +1,44 @@
import { S as ElResult, h as ElButton } from "./element-plus.CkEW9frc.js";
import { J as defineComponent, e9 as useI18n, T as createBlock, a0 as withCtx, o as unref, S as openBlock, $ as createVNode, a9 as createTextVNode, aa as toDisplayString, a1 as createBaseVNode, dY as useRouter } from "./.pnpm.BW3P1y8f.js";
const _imports_0 = "/web/img/500.BGu8fdSB.svg";
const _sfc_main = /* @__PURE__ */ defineComponent({
...{ name: "Page500" },
__name: "500",
setup(__props) {
const router = useRouter();
const back = () => router.push("/");
const t = useI18n().t;
return (_ctx, _cache) => {
const _component_el_button = ElButton;
const _component_el_result = ElResult;
return openBlock(), createBlock(_component_el_result, {
title: unref(t)("error.networkError"),
"sub-title": "请确认您的网络是否正常,或者点击下方按钮返回首页。"
}, {
icon: withCtx(() => [..._cache[0] || (_cache[0] = [
createBaseVNode("img", {
class: "min-w-[23.4375rem] sm:w-120",
src: _imports_0,
alt: "500"
}, null, -1)
])]),
extra: withCtx(() => [
createVNode(_component_el_button, {
round: "",
type: "primary",
onClick: back
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("error.returnToHome")), 1)
]),
_: 1
})
]),
_: 1
}, 8, ["title"]);
};
}
});
export {
_sfc_main as default
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,748 @@
import { a5 as ElTabs, a6 as ElTabPane, w as ElForm, s as ElDivider, x as ElFormItem, y as ElInput, E as ElMessage, h as ElButton, M as ElSwitch, L as ElDrawer, D as ElMessageBox } from "./element-plus.CkEW9frc.js";
import { u as useAppStore, c as useConfigStore, P as ParamsAPI, D as DeviceEnum } from "./index.CMd5bD1r.js";
import { J as defineComponent, e9 as useI18n, t as onMounted, aP as resolveDirective, S as openBlock, T as createBlock, a0 as withCtx, $ as createVNode, a9 as createTextVNode, _ as createElementBlock, H as Fragment, ay as renderList, a1 as createBaseVNode, o as unref, a6 as withDirectives, j as computed, r as ref, ak as reactive } from "./.pnpm.BW3P1y8f.js";
import { S as SingleImageUpload } from "./SingleImageUpload.CngBsWfh.js";
import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js";
import "./codemirror.CvJAcn2d.js";
const _hoisted_1 = { class: "flex items-center gap-2 w-full" };
const _hoisted_2 = { class: "flex items-center gap-2 w-full" };
const _hoisted_3 = { class: "flex items-center gap-2 w-full" };
const _hoisted_4 = { class: "flex items-center gap-2 w-full" };
const _hoisted_5 = { class: "space-y-2" };
const _hoisted_6 = { class: "space-y-2" };
const _hoisted_7 = {
key: 1,
class: "space-y-2"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ConfigInfoDrawer",
props: {
modelValue: { type: Boolean }
},
emits: ["update:modelValue"],
setup(__props, { emit: __emit }) {
const generateId = () => {
return Math.random().toString(36).substr(2, 9);
};
const isValidIp = (ip) => {
const ipRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
return ipRegex.test(ip);
};
const isValidApiPath = (path) => {
const pathRegex = /^\/[\w\-/]+$/;
return pathRegex.test(path);
};
const appStore = useAppStore();
const drawerSize = computed(() => appStore.device === DeviceEnum.DESKTOP ? "60%" : "60%");
const t = useI18n().t;
const configStore = useConfigStore();
const activeTabRef = ref("website");
const props = __props;
const emit = __emit;
const drawerVisible = computed({
get: () => props.modelValue,
set: (val) => emit("update:modelValue", val)
});
const configState = reactive({
id: void 0,
config_name: "",
config_key: "",
config_value: "",
config_type: void 0,
description: ""
});
const modifiedFields = reactive({});
const markModified = (key) => {
modifiedFields[key] = true;
};
const hasChanges = computed(() => Object.keys(modifiedFields).length > 0);
const submitChanges = async () => {
var _a, _b, _c;
const keysToSubmit = Object.keys(modifiedFields);
if (keysToSubmit.length === 0) return;
try {
if ("white_api_list_path" in modifiedFields && ((_a = apiWhitelistConfigs.value.white_api_list_path) == null ? void 0 : _a.id)) {
const apiWhitelistArray = apiWhitelistItems.value.map((item) => item.value.trim()).filter(Boolean);
const apiWhitelistJson = JSON.stringify(apiWhitelistArray);
await ParamsAPI.updateParams(apiWhitelistConfigs.value.white_api_list_path.id, {
...apiWhitelistConfigs.value.white_api_list_path,
config_value: apiWhitelistJson
});
}
if ("ip_black_list" in modifiedFields && ((_b = ipBlacklistConfigs.value.ip_black_list) == null ? void 0 : _b.id)) {
const ipBlacklistArray = ipBlacklistItems.value.map((item) => item.value.trim()).filter(Boolean);
const ipBlacklistJson = JSON.stringify(ipBlacklistArray);
await ParamsAPI.updateParams(ipBlacklistConfigs.value.ip_black_list.id, {
...ipBlacklistConfigs.value.ip_black_list,
config_value: ipBlacklistJson
});
}
if ("ip_white_list" in modifiedFields && ((_c = demoConfigs.value.ip_white_list) == null ? void 0 : _c.id)) {
const demoIpWhitelistArray = demoIpWhitelistItems.value.map((item) => item.value.trim()).filter(Boolean);
const demoIpWhitelistJson = JSON.stringify(demoIpWhitelistArray);
await ParamsAPI.updateParams(demoConfigs.value.ip_white_list.id, {
...demoConfigs.value.ip_white_list,
config_value: demoIpWhitelistJson
});
}
const otherKeys = keysToSubmit.filter(
(key) => !["white_api_list_path", "ip_black_list", "ip_white_list"].includes(key)
);
const otherUpdatePromises = otherKeys.map((key) => {
const item = systemConfigs.value[key] || logoConfigs.value[key] || securityPrivacyConfigs.value[key] || userAgreementConfigs.value[key] || demoConfigs.value[key];
return item && item.id ? ParamsAPI.updateParams(item.id, { ...item }) : Promise.resolve();
});
await Promise.all(otherUpdatePromises);
keysToSubmit.forEach((key) => {
delete modifiedFields[key];
});
await configStore.getConfig();
initializeLists();
} catch (error) {
console.error("保存失败:", error);
}
};
const resetForm = () => {
var _a, _b, _c, _d, _e;
initializeLists();
const keysToReset = Object.keys(modifiedFields);
for (const key of keysToReset) {
if (systemConfigs.value[key]) {
systemConfigs.value[key].config_value = ((_a = configStore.configData[key]) == null ? void 0 : _a.config_value) || "";
} else if (logoConfigs.value[key]) {
logoConfigs.value[key].config_value = ((_b = configStore.configData[key]) == null ? void 0 : _b.config_value) || "";
} else if (securityPrivacyConfigs.value[key]) {
securityPrivacyConfigs.value[key].config_value = ((_c = configStore.configData[key]) == null ? void 0 : _c.config_value) || "";
} else if (userAgreementConfigs.value[key]) {
userAgreementConfigs.value[key].config_value = ((_d = configStore.configData[key]) == null ? void 0 : _d.config_value) || "";
} else if (demoConfigs.value[key]) {
if (key !== "ip_white_list") {
demoConfigs.value[key].config_value = ((_e = configStore.configData[key]) == null ? void 0 : _e.config_value) || "";
}
}
delete modifiedFields[key];
}
ElMessageBox.close();
};
async function handleCloseDialog() {
drawerVisible.value = false;
}
function onDrawerClosed() {
resetForm();
}
const systemConfigs = computed(() => ({
sys_web_title: configStore.configData.sys_web_title,
sys_web_version: configStore.configData.sys_web_version,
sys_web_description: configStore.configData.sys_web_description
}));
const securityPrivacyConfigs = computed(() => ({
sys_help_doc: configStore.configData.sys_help_doc,
sys_git_code: configStore.configData.sys_git_code,
sys_keep_record: configStore.configData.sys_keep_record,
sys_web_copyright: configStore.configData.sys_web_copyright,
sys_web_privacy: configStore.configData.sys_web_privacy
}));
const userAgreementConfigs = computed(() => ({
sys_web_clause: configStore.configData.sys_web_clause
}));
const apiWhitelistItems = ref([]);
const ipBlacklistItems = ref([]);
const demoIpWhitelistItems = ref([]);
const initializeLists = () => {
var _a, _b, _c;
const apiWhitelistStr = ((_a = configStore.configData.white_api_list_path) == null ? void 0 : _a.config_value) || "";
try {
const apiWhitelistArray = JSON.parse(apiWhitelistStr);
if (Array.isArray(apiWhitelistArray)) {
apiWhitelistItems.value = apiWhitelistArray.filter((item) => typeof item === "string" && item.trim()).map((item) => ({ id: generateId(), value: item.trim() }));
} else {
apiWhitelistItems.value = apiWhitelistStr ? apiWhitelistStr.split("\n").filter((item) => item.trim()).map((item) => ({ id: generateId(), value: item.trim() })) : [{ id: generateId(), value: "" }];
}
} catch {
apiWhitelistItems.value = apiWhitelistStr ? apiWhitelistStr.split("\n").filter((item) => item.trim()).map((item) => ({ id: generateId(), value: item.trim() })) : [{ id: generateId(), value: "" }];
}
const ipBlacklistStr = ((_b = configStore.configData.ip_black_list) == null ? void 0 : _b.config_value) || "";
try {
const ipBlacklistArray = JSON.parse(ipBlacklistStr);
if (Array.isArray(ipBlacklistArray)) {
ipBlacklistItems.value = ipBlacklistArray.filter((item) => typeof item === "string" && item.trim()).map((item) => ({ id: generateId(), value: item.trim() }));
} else {
ipBlacklistItems.value = ipBlacklistStr ? ipBlacklistStr.split("\n").filter((item) => item.trim()).map((item) => ({ id: generateId(), value: item.trim() })) : [{ id: generateId(), value: "" }];
}
} catch {
ipBlacklistItems.value = ipBlacklistStr ? ipBlacklistStr.split("\n").filter((item) => item.trim()).map((item) => ({ id: generateId(), value: item.trim() })) : [{ id: generateId(), value: "" }];
}
const demoIpWhitelistStr = ((_c = configStore.configData.ip_white_list) == null ? void 0 : _c.config_value) || "";
try {
const demoIpWhitelistArray = JSON.parse(demoIpWhitelistStr);
if (Array.isArray(demoIpWhitelistArray)) {
demoIpWhitelistItems.value = demoIpWhitelistArray.filter((item) => typeof item === "string" && item.trim()).map((item) => ({ id: generateId(), value: item.trim() }));
} else {
demoIpWhitelistItems.value = demoIpWhitelistStr ? demoIpWhitelistStr.split("\n").filter((item) => item.trim()).map((item) => ({ id: generateId(), value: item.trim() })) : [{ id: generateId(), value: "" }];
}
} catch {
demoIpWhitelistItems.value = demoIpWhitelistStr ? demoIpWhitelistStr.split("\n").filter((item) => item.trim()).map((item) => ({ id: generateId(), value: item.trim() })) : [{ id: generateId(), value: "" }];
}
};
const addApiWhitelistItem = () => {
apiWhitelistItems.value.push({ id: generateId(), value: "" });
markModified("white_api_list_path");
};
const removeApiWhitelistItem = (id) => {
if (apiWhitelistItems.value.length <= 1) {
ElMessage.warning("至少需要保留一个接口白名单配置");
return;
}
apiWhitelistItems.value = apiWhitelistItems.value.filter((item) => item.id !== id);
markModified("white_api_list_path");
};
const addIpBlacklistItem = () => {
ipBlacklistItems.value.push({ id: generateId(), value: "" });
markModified("ip_black_list");
};
const removeIpBlacklistItem = (id) => {
if (ipBlacklistItems.value.length <= 1) {
ElMessage.warning("至少需要保留一个IP黑名单配置");
return;
}
ipBlacklistItems.value = ipBlacklistItems.value.filter((item) => item.id !== id);
markModified("ip_black_list");
};
const addDemoIpWhitelistItem = () => {
demoIpWhitelistItems.value.push({ id: generateId(), value: "" });
markModified("ip_white_list");
};
const removeDemoIpWhitelistItem = (id) => {
if (demoIpWhitelistItems.value.length <= 1) {
ElMessage.warning("至少需要保留一个IP白名单配置");
return;
}
demoIpWhitelistItems.value = demoIpWhitelistItems.value.filter((item) => item.id !== id);
markModified("ip_white_list");
};
const apiWhitelistConfigs = computed(() => ({
white_api_list_path: configStore.configData.white_api_list_path
}));
const ipBlacklistConfigs = computed(() => ({
ip_black_list: configStore.configData.ip_black_list
}));
const demoConfigs = computed(() => ({
demo_enable: configStore.configData.demo_enable,
ip_white_list: configStore.configData.ip_white_list
}));
onMounted(() => {
initializeLists();
});
const logoConfigs = computed(() => ({
sys_web_logo: {
...configStore.configData.sys_web_logo,
maxFileSize: 5
},
sys_web_favicon: {
...configStore.configData.sys_web_favicon,
maxFileSize: 5
},
sys_login_background: {
...configStore.configData.sys_login_background,
maxFileSize: 10
}
}));
const handleUploadSuccess = (fileInfo, type) => {
const fileUrl = fileInfo.file_url;
if (type in configStore.configData) {
configStore.configData[type].config_value = fileUrl;
}
if (type in systemConfigs.value) {
systemConfigs.value[type].config_value = fileUrl;
} else if (type in logoConfigs.value) {
logoConfigs.value[type].config_value = fileUrl;
}
markModified(type);
};
const handleUploadError = (error) => {
console.error("上传失败:", error.message || "未知错误");
ElMessage.error(`上传失败:${error.message || "请稍后重试"}`);
};
onMounted(() => {
configStore.getConfig();
});
return (_ctx, _cache) => {
const _component_el_divider = ElDivider;
const _component_el_input = ElInput;
const _component_el_form_item = ElFormItem;
const _component_el_form = ElForm;
const _component_el_tab_pane = ElTabPane;
const _component_el_button = ElButton;
const _component_el_switch = ElSwitch;
const _component_el_tabs = ElTabs;
const _component_el_drawer = ElDrawer;
const _directive_hasPerm = resolveDirective("hasPerm");
return openBlock(), createBlock(_component_el_drawer, {
modelValue: drawerVisible.value,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => drawerVisible.value = $event),
title: "配置中心",
size: drawerSize.value,
"destroy-on-close": "",
onClosed: onDrawerClosed
}, {
footer: withCtx(() => [
createVNode(_component_el_button, { onClick: handleCloseDialog }, {
default: withCtx(() => [..._cache[16] || (_cache[16] = [
createTextVNode("取消", -1)
])]),
_: 1
}),
withDirectives((openBlock(), createBlock(_component_el_button, {
type: "primary",
disabled: !hasChanges.value,
onClick: submitChanges
}, {
default: withCtx(() => [..._cache[17] || (_cache[17] = [
createTextVNode(" 保存 ", -1)
])]),
_: 1
}, 8, ["disabled"])), [
[_directive_hasPerm, ["module_system:config:update"]]
])
]),
default: withCtx(() => [
createVNode(_component_el_tabs, {
modelValue: activeTabRef.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabRef.value = $event),
type: "border-card"
}, {
default: withCtx(() => [
createVNode(_component_el_tab_pane, {
label: "网站配置",
name: "website"
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
model: configState,
"label-suffix": ":",
"label-width": "auto",
"label-position": "right"
}, {
default: withCtx(() => [
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[2] || (_cache[2] = [
createTextVNode("网站配置", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(systemConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
createBaseVNode("span", _hoisted_1, [
createVNode(_component_el_input, {
modelValue: item.config_value,
"onUpdate:modelValue": ($event) => item.config_value = $event,
placeholder: unref(t)("common.inputText"),
clearable: "",
style: { "width": "100%" },
onInput: ($event) => markModified(key)
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onInput"])
])
]),
_: 2
}, 1032, ["label"])
]);
}), 128)),
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[3] || (_cache[3] = [
createTextVNode("网站图标", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(logoConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
createBaseVNode("div", _hoisted_2, [
createVNode(SingleImageUpload, {
modelValue: item.config_value,
"onUpdate:modelValue": ($event) => item.config_value = $event,
data: { type: key },
name: "file",
"max-file-size": item.maxFileSize,
"show-tip": true,
"enable-preview": true,
onSuccess: (fileInfo) => handleUploadSuccess(fileInfo, key),
onError: handleUploadError
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "max-file-size", "onSuccess"])
])
]),
_: 2
}, 1032, ["label"])
]);
}), 128))
]),
_: 1
}, 8, ["model"])
]),
_: 1
}),
createVNode(_component_el_tab_pane, {
label: "安全隐私",
name: "securityPrivacy"
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
model: configState,
"label-suffix": ":",
"label-width": "auto",
"label-position": "right"
}, {
default: withCtx(() => [
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[4] || (_cache[4] = [
createTextVNode("安全隐私", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(securityPrivacyConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
createBaseVNode("span", _hoisted_3, [
createVNode(_component_el_input, {
modelValue: item.config_value,
"onUpdate:modelValue": ($event) => item.config_value = $event,
placeholder: unref(t)("common.inputText"),
clearable: "",
style: { "width": "100%" },
onInput: ($event) => markModified(key)
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onInput"])
])
]),
_: 2
}, 1032, ["label"])
]);
}), 128))
]),
_: 1
}, 8, ["model"])
]),
_: 1
}),
createVNode(_component_el_tab_pane, {
label: "用户协议",
name: "userAgreement"
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
model: configState,
"label-suffix": ":",
"label-width": "auto",
"label-position": "right"
}, {
default: withCtx(() => [
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[5] || (_cache[5] = [
createTextVNode("用户协议", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(userAgreementConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
createBaseVNode("span", _hoisted_4, [
createVNode(_component_el_input, {
modelValue: item.config_value,
"onUpdate:modelValue": ($event) => item.config_value = $event,
placeholder: unref(t)("common.inputText"),
clearable: "",
style: { "width": "100%" },
onInput: ($event) => markModified(key)
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onInput"])
])
]),
_: 2
}, 1032, ["label"])
]);
}), 128))
]),
_: 1
}, 8, ["model"])
]),
_: 1
}),
createVNode(_component_el_tab_pane, {
label: "接口白名单",
name: "apiWhitelist"
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
model: configState,
"label-suffix": ":",
"label-width": "auto",
"label-position": "right"
}, {
default: withCtx(() => [
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[6] || (_cache[6] = [
createTextVNode("接口白名单", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(apiWhitelistConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
createBaseVNode("div", _hoisted_5, [
(openBlock(true), createElementBlock(Fragment, null, renderList(apiWhitelistItems.value, (listItem) => {
return openBlock(), createElementBlock("div", {
key: listItem.id,
class: "flex items-center gap-2"
}, [
createVNode(_component_el_input, {
modelValue: listItem.value,
"onUpdate:modelValue": ($event) => listItem.value = $event,
placeholder: "/api/v1/users/get",
clearable: "",
onInput: ($event) => markModified(key),
onBlur: ($event) => {
{
if (!isValidApiPath(listItem.value) && listItem.value.trim()) {
unref(ElMessage).warning("请输入有效的接口路径格式(以/开头)");
}
}
}
}, null, 8, ["modelValue", "onUpdate:modelValue", "onInput", "onBlur"]),
createVNode(_component_el_button, {
type: "danger",
icon: "minus",
circle: "",
size: "small",
onClick: ($event) => removeApiWhitelistItem(listItem.id)
}, null, 8, ["onClick"])
]);
}), 128)),
createVNode(_component_el_button, {
type: "primary",
icon: "plus",
size: "small",
style: { "margin-top": "10px" },
onClick: addApiWhitelistItem
}, {
default: withCtx(() => [..._cache[7] || (_cache[7] = [
createTextVNode(" 添加接口路径 ", -1)
])]),
_: 1
}),
_cache[8] || (_cache[8] = createBaseVNode("div", { class: "text-xs text-gray-500 mt-2" }, " 配置说明:添加到白名单的接口路径无需登录即可访问,支持完整路径配置。 ", -1))
])
]),
_: 2
}, 1032, ["label"])
]);
}), 128))
]),
_: 1
}, 8, ["model"])
]),
_: 1
}),
createVNode(_component_el_tab_pane, {
label: "IP黑名单",
name: "ipBlacklist"
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
model: configState,
"label-suffix": ":",
"label-width": "auto",
"label-position": "right"
}, {
default: withCtx(() => [
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[9] || (_cache[9] = [
createTextVNode("IP黑名单", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(ipBlacklistConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
createBaseVNode("div", _hoisted_6, [
(openBlock(true), createElementBlock(Fragment, null, renderList(ipBlacklistItems.value, (listItem) => {
return openBlock(), createElementBlock("div", {
key: listItem.id,
class: "flex items-center gap-2"
}, [
createVNode(_component_el_input, {
modelValue: listItem.value,
"onUpdate:modelValue": ($event) => listItem.value = $event,
placeholder: "192.168.1.1",
clearable: "",
style: { "flex": "1" },
onInput: ($event) => markModified(key),
onBlur: ($event) => {
{
if (!isValidIp(listItem.value) && listItem.value.trim()) {
unref(ElMessage).warning("请输入有效的IP地址格式");
}
}
}
}, null, 8, ["modelValue", "onUpdate:modelValue", "onInput", "onBlur"]),
createVNode(_component_el_button, {
type: "danger",
icon: "minus",
circle: "",
size: "small",
onClick: ($event) => removeIpBlacklistItem(listItem.id)
}, null, 8, ["onClick"])
]);
}), 128)),
createVNode(_component_el_button, {
type: "primary",
icon: "plus",
size: "small",
style: { "margin-top": "10px" },
onClick: addIpBlacklistItem
}, {
default: withCtx(() => [..._cache[10] || (_cache[10] = [
createTextVNode(" 添加IP地址 ", -1)
])]),
_: 1
}),
_cache[11] || (_cache[11] = createBaseVNode("div", { class: "text-xs text-gray-500 mt-2" }, " 配置说明添加到黑名单的IP地址将无法访问系统支持单个IP配置。 ", -1))
])
]),
_: 2
}, 1032, ["label"])
]);
}), 128))
]),
_: 1
}, 8, ["model"])
]),
_: 1
}),
createVNode(_component_el_tab_pane, {
label: "演示环境配置",
name: "demo"
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
model: configState,
"label-suffix": ":",
"label-width": "auto",
"label-position": "right"
}, {
default: withCtx(() => [
createVNode(_component_el_divider, null, {
default: withCtx(() => [..._cache[12] || (_cache[12] = [
createTextVNode("演示环境配置", -1)
])]),
_: 1
}),
(openBlock(true), createElementBlock(Fragment, null, renderList(demoConfigs.value, (item, key) => {
return openBlock(), createElementBlock("div", { key }, [
createVNode(_component_el_form_item, {
label: item.config_name
}, {
default: withCtx(() => [
key === "demo_enable" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createVNode(_component_el_switch, {
"inline-prompt": "",
"active-text": "启用",
"inactive-text": "禁用",
"model-value": item.config_value === "true",
"onUpdate:modelValue": (value) => {
item.config_value = value ? "true" : "false";
markModified(key);
}
}, null, 8, ["model-value", "onUpdate:modelValue"]),
_cache[13] || (_cache[13] = createBaseVNode("div", { class: "text-xs text-gray-500 mt-1" }, " 配置说明:启用后系统将进入演示模式,部分功能可能受限。 ", -1))
], 64)) : key === "ip_white_list" ? (openBlock(), createElementBlock("div", _hoisted_7, [
(openBlock(true), createElementBlock(Fragment, null, renderList(demoIpWhitelistItems.value, (listItem) => {
return openBlock(), createElementBlock("div", {
key: listItem.id,
class: "flex items-center gap-2"
}, [
createVNode(_component_el_input, {
modelValue: listItem.value,
"onUpdate:modelValue": ($event) => listItem.value = $event,
placeholder: "192.168.1.1",
clearable: "",
style: { "flex": "1" },
onInput: ($event) => markModified(key),
onBlur: ($event) => {
{
if (!isValidIp(listItem.value) && listItem.value.trim()) {
unref(ElMessage).warning("请输入有效的IP地址格式");
}
}
}
}, null, 8, ["modelValue", "onUpdate:modelValue", "onInput", "onBlur"]),
createVNode(_component_el_button, {
type: "danger",
icon: "minus",
circle: "",
size: "small",
onClick: ($event) => removeDemoIpWhitelistItem(listItem.id)
}, null, 8, ["onClick"])
]);
}), 128)),
createVNode(_component_el_button, {
type: "primary",
icon: "plus",
size: "small",
style: { "margin-top": "10px" },
onClick: addDemoIpWhitelistItem
}, {
default: withCtx(() => [..._cache[14] || (_cache[14] = [
createTextVNode(" 添加IP地址 ", -1)
])]),
_: 1
}),
_cache[15] || (_cache[15] = createBaseVNode("div", { class: "text-xs text-gray-500 mt-2" }, " 配置说明演示模式下只有白名单中的IP地址可以访问系统支持单个IP配置。 ", -1))
])) : (openBlock(), createBlock(_component_el_input, {
key: 2,
modelValue: item.config_value,
"onUpdate:modelValue": ($event) => item.config_value = $event,
placeholder: unref(t)("common.inputText"),
clearable: "",
style: { "width": "100%" },
onInput: ($event) => markModified(key)
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onInput"]))
]),
_: 2
}, 1032, ["label"])
]);
}), 128))
]),
_: 1
}, 8, ["model"])
]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"])
]),
_: 1
}, 8, ["modelValue", "size"]);
};
}
});
const ConfigInfoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2de5db6a"]]);
export {
ConfigInfoDrawer 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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{S as o,_ as t,a1 as s,aa as a,$ as e,o as i,et as d}from"./.pnpm.BudmgPu7.js";import{_ as p}from"./_plugin-vue_export-helper.BCo6x5W8.js";const l={class:"custom-node"},r={class:"node-header"},n=p({__name:"CustomNode",props:{id:String,data:Object},setup:p=>(n,u)=>(o(),t("div",l,[s("div",r,a(p.data.label),1),e(i(d),{id:"top-"+p.id,type:"source",position:"top",style:{background:"#4a5568"}},null,8,["id"]),e(i(d),{id:"left-"+p.id,type:"source",position:"left",style:{background:"#4a5568"}},null,8,["id"]),e(i(d),{id:"right-"+p.id,type:"source",position:"right",style:{background:"#4a5568"}},null,8,["id"]),e(i(d),{id:"bottom-"+p.id,type:"source",position:"bottom",style:{background:"#4a5568"}},null,8,["id"])]))},[["__scopeId","data-v-2960f973"]]);export{n as default};

View File

@@ -0,0 +1 @@
import{t,H as o,K as s,Z as a,I as e,u as i,et as d}from"./.pnpm.DGfAnZKL.js";import{_ as p}from"./_plugin-vue_export-helper.BCo6x5W8.js";const l={class:"custom-node"},r={class:"node-header"},n=p({__name:"CustomNode",props:{id:String,data:Object},setup:p=>(n,u)=>(t(),o("div",l,[s("div",r,a(p.data.label),1),e(i(d),{id:"top-"+p.id,type:"source",position:"top",style:{background:"#4a5568"}},null,8,["id"]),e(i(d),{id:"left-"+p.id,type:"source",position:"left",style:{background:"#4a5568"}},null,8,["id"]),e(i(d),{id:"right-"+p.id,type:"source",position:"right",style:{background:"#4a5568"}},null,8,["id"]),e(i(d),{id:"bottom-"+p.id,type:"source",position:"bottom",style:{background:"#4a5568"}},null,8,["id"])]))},[["__scopeId","data-v-a7aa491c"]]);export{n as default};

View File

@@ -0,0 +1,46 @@
import { S as openBlock, _ as createElementBlock, a1 as createBaseVNode, aa as toDisplayString, $ as createVNode, o as unref, et as _sfc_main$f } from "./.pnpm.BW3P1y8f.js";
import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js";
const _hoisted_1 = { class: "custom-node" };
const _hoisted_2 = { class: "node-header" };
const _sfc_main = {
__name: "CustomNode",
props: {
id: String,
data: Object
},
setup(__props) {
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1, [
createBaseVNode("div", _hoisted_2, toDisplayString(__props.data.label), 1),
createVNode(unref(_sfc_main$f), {
id: "top-" + __props.id,
type: "source",
position: "top",
style: { background: "#4a5568" }
}, null, 8, ["id"]),
createVNode(unref(_sfc_main$f), {
id: "left-" + __props.id,
type: "source",
position: "left",
style: { background: "#4a5568" }
}, null, 8, ["id"]),
createVNode(unref(_sfc_main$f), {
id: "right-" + __props.id,
type: "source",
position: "right",
style: { background: "#4a5568" }
}, null, 8, ["id"]),
createVNode(unref(_sfc_main$f), {
id: "bottom-" + __props.id,
type: "source",
position: "bottom",
style: { background: "#4a5568" }
}, null, 8, ["id"])
]);
};
}
};
const CustomNode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2960f973"]]);
export {
CustomNode as default
};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.C5Py53Vs.js";import"./element-plus.DhcJM-BD.js";import"./.pnpm.DGfAnZKL.js";import"./index.XAb1m6gg.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.B-NAZOEd.js";import"./index.D0FKZcEF.js";import"./codemirror.CR5zRbyM.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.DUKty3kU.js";import"./exceljs.DPqPZvAA.js";import"./dateUtil.BP-B7AtB.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.jtzj0cG4.js";import"./element-plus.BQf8a6uP.js";import"./.pnpm.BudmgPu7.js";import"./index.DxVG6e-B.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.BSn6WxSg.js";import"./index.DW5SWAAE.js";import"./codemirror.BdleaLZh.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.BUmwBCnv.js";import"./exceljs.Be_qVvLB.js";import"./dateUtil.f5zninan.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.B3qjhDj4.js";import"./element-plus.DhcJM-BD.js";import"./.pnpm.DGfAnZKL.js";import"./index.XAb1m6gg.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.B-NAZOEd.js";import"./index.BPA2kTd2.js";import"./codemirror.CR5zRbyM.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.DUKty3kU.js";import"./exceljs.DPqPZvAA.js";import"./dateUtil.BP-B7AtB.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.BR3ZErDe.js";import"./element-plus.BfMFfVUv.js";import"./.pnpm.BudmgPu7.js";import"./index.VE_2SVnZ.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.CJ2Onnne.js";import"./index.CCGY9CCJ.js";import"./codemirror.BdleaLZh.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.lzJ1IF0O.js";import"./exceljs.Be_qVvLB.js";import"./dateUtil.f5zninan.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.ChwBpjnN.js";import"./element-plus.DhcJM-BD.js";import"./.pnpm.DGfAnZKL.js";import"./index.XAb1m6gg.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.B-NAZOEd.js";import"./index.Ch_NPM5t.js";import"./codemirror.CR5zRbyM.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.DUKty3kU.js";import"./exceljs.DPqPZvAA.js";import"./dateUtil.BP-B7AtB.js";export{e as default};

View File

@@ -0,0 +1,14 @@
import { _ as _sfc_main } from "./DataDrawer.vue_vue_type_script_setup_true_lang.hRKiSPvC.js";
import "./element-plus.CkEW9frc.js";
import "./.pnpm.BW3P1y8f.js";
import "./index.fgd49PES.js";
import "./_plugin-vue_export-helper.1tPrXgE0.js";
import "./index.Cu5O_6Z1.js";
import "./index.CMd5bD1r.js";
import "./codemirror.CvJAcn2d.js";
import "./ExportModal.vue_vue_type_script_setup_true_lang.Bok1HJuH.js";
import "./exceljs.CkFT-P7Q.js";
import "./dateUtil.SHphbRyf.js";
export {
_sfc_main as default
};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.V3PXOzdt.js";import"./element-plus.C1XeB8_q.js";import"./.pnpm.BudmgPu7.js";import"./index.DSbwPKqQ.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.CEi5IP3a.js";import"./index.Cvigsp8N.js";import"./codemirror.BdleaLZh.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.CZ8E9_Y6.js";import"./exceljs.Be_qVvLB.js";import"./dateUtil.f5zninan.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.C3qLaiTf.js";import"./element-plus.sfqR2v8u.js";import"./.pnpm.BudmgPu7.js";import"./index.B67ecEEq.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.BMky5QRZ.js";import"./index.BY9tP75-.js";import"./codemirror.BdleaLZh.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.BJj9Wkrn.js";import"./exceljs.Be_qVvLB.js";import"./dateUtil.f5zninan.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.a6IcC1ER.js";import"./element-plus.BfMFfVUv.js";import"./.pnpm.BudmgPu7.js";import"./index.VE_2SVnZ.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.CJ2Onnne.js";import"./index.CjKO7M_A.js";import"./codemirror.BdleaLZh.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.lzJ1IF0O.js";import"./exceljs.Be_qVvLB.js";import"./dateUtil.f5zninan.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DataDrawer.vue_vue_type_script_setup_true_lang.B7e8ceZC.js";import"./element-plus.C1XeB8_q.js";import"./.pnpm.BudmgPu7.js";import"./index.DSbwPKqQ.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.CEi5IP3a.js";import"./index.DvZY56Zp.js";import"./codemirror.BdleaLZh.js";import"./ExportModal.vue_vue_type_script_setup_true_lang.CZ8E9_Y6.js";import"./exceljs.Be_qVvLB.js";import"./dateUtil.f5zninan.js";export{e 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

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

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.BjZ9MK85.js";import"./element-plus.DhcJM-BD.js";import"./.pnpm.DGfAnZKL.js";import"./dept.BMy3HUMX.js";import"./index.D0FKZcEF.js";import"./codemirror.CR5zRbyM.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.BL9yOh-C.js";import"./element-plus.sfqR2v8u.js";import"./.pnpm.BudmgPu7.js";import"./dept.CiXcR9MG.js";import"./index.BY9tP75-.js";import"./codemirror.BdleaLZh.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1,10 @@
import { _ as _sfc_main } from "./DeptTree.vue_vue_type_script_setup_true_lang.DJ6-tBs5.js";
import "./element-plus.CkEW9frc.js";
import "./.pnpm.BW3P1y8f.js";
import "./dept.BQxPXXgN.js";
import "./index.CMd5bD1r.js";
import "./codemirror.CvJAcn2d.js";
import "./common.ySZAMJjg.js";
export {
_sfc_main as default
};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.BbYUJsfH.js";import"./element-plus.BQf8a6uP.js";import"./.pnpm.BudmgPu7.js";import"./dept.D7EKbcvI.js";import"./index.DW5SWAAE.js";import"./codemirror.BdleaLZh.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.DNnmPhbK.js";import"./element-plus.BfMFfVUv.js";import"./.pnpm.BudmgPu7.js";import"./dept.Bt5RpYFI.js";import"./index.CjKO7M_A.js";import"./codemirror.BdleaLZh.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.DwVFrqdy.js";import"./element-plus.BfMFfVUv.js";import"./.pnpm.BudmgPu7.js";import"./dept.CbkxXe5Q.js";import"./index.CCGY9CCJ.js";import"./codemirror.BdleaLZh.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.V9vpvjYC.js";import"./element-plus.C1XeB8_q.js";import"./.pnpm.BudmgPu7.js";import"./dept.DTclm3Og.js";import"./index.DvZY56Zp.js";import"./codemirror.BdleaLZh.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.BSfp_3sS.js";import"./element-plus.C1XeB8_q.js";import"./.pnpm.BudmgPu7.js";import"./dept.CSfT8k2g.js";import"./index.Cvigsp8N.js";import"./codemirror.BdleaLZh.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.rnoRCPMw.js";import"./element-plus.DhcJM-BD.js";import"./.pnpm.DGfAnZKL.js";import"./dept.BlLZxDQg.js";import"./index.Ch_NPM5t.js";import"./codemirror.CR5zRbyM.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{_ as e}from"./DeptTree.vue_vue_type_script_setup_true_lang.BvHcBGpY.js";import"./element-plus.DhcJM-BD.js";import"./.pnpm.DGfAnZKL.js";import"./dept.aw8cnM4N.js";import"./index.BPA2kTd2.js";import"./codemirror.CR5zRbyM.js";import"./common.BWIReEgr.js";export{e as default};

View File

@@ -0,0 +1 @@
import{y as e,i as a,aM as l,u as s,T as t}from"./element-plus.sfqR2v8u.js";import{D as o}from"./dept.CiXcR9MG.js";import{f as d}from"./common.BWIReEgr.js";import{J as i,m as n,E as r,aO as m,S as u,T as p,a0 as c,$ as f,z as v,o as _,r as h,ak as b,eD as k}from"./.pnpm.BudmgPu7.js";const V=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:V}){const y=i,j=h([]),x=h(),D=h(),T=V,S=k(y,"modelValue",T);n(D,e=>{x.value.filter(e)});const g=(e,a)=>!e||a.label.includes(e);function z(e){S.value=e.value,T("node-click")}const N=b({name:void 0,status:void 0,created_time:void 0}),w=h(!0);return r(()=>{w.value=!0,o.listDept(N).then(e=>{j.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=m("Search"),n=a,r=e,h=s,b=l,k=t;return u(),p(k,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:_(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:_(j),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":g,"default-expand-all":"",onNodeClick:z},{empty:c(()=>[f(h,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{V as _};

View File

@@ -0,0 +1 @@
import{y as e,i as a,aL as l,u as s,T as t}from"./element-plus.C1XeB8_q.js";import{D as o}from"./dept.CSfT8k2g.js";import{f as d}from"./common.BWIReEgr.js";import{J as i,m as n,E as r,aO as m,S as u,T as p,a0 as c,$ as f,z as v,o as _,r as h,ak as b,eD as k}from"./.pnpm.BudmgPu7.js";const V=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:V}){const y=i,j=h([]),x=h(),D=h(),T=V,S=k(y,"modelValue",T);n(D,e=>{x.value.filter(e)});const g=(e,a)=>!e||a.label.includes(e);function z(e){S.value=e.value,T("node-click")}const N=b({name:void 0,status:void 0,created_time:void 0}),w=h(!0);return r(()=>{w.value=!0,o.listDept(N).then(e=>{j.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=m("Search"),n=a,r=e,h=s,b=l,k=t;return u(),p(k,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:_(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:_(j),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":g,"default-expand-all":"",onNodeClick:z},{empty:c(()=>[f(h,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{V as _};

View File

@@ -0,0 +1 @@
import{y as e,i as a,aM as l,u as s,T as t}from"./element-plus.BQf8a6uP.js";import{D as o}from"./dept.D7EKbcvI.js";import{f as d}from"./common.BWIReEgr.js";import{J as i,m as n,E as r,aO as m,S as u,T as p,a0 as c,$ as f,z as v,o as _,r as h,ak as b,eD as k}from"./.pnpm.BudmgPu7.js";const V=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:V}){const y=i,j=h([]),x=h(),D=h(),T=V,S=k(y,"modelValue",T);n(D,e=>{x.value.filter(e)});const g=(e,a)=>!e||a.label.includes(e);function z(e){S.value=e.value,T("node-click")}const N=b({name:void 0,status:void 0,created_time:void 0}),w=h(!0);return r(()=>{w.value=!0,o.listDept(N).then(e=>{j.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=m("Search"),n=a,r=e,h=s,b=l,k=t;return u(),p(k,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:_(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:_(j),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":g,"default-expand-all":"",onNodeClick:z},{empty:c(()=>[f(h,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{V as _};

View File

@@ -0,0 +1 @@
import{y as e,h as a,aL as l,u as s,T as t}from"./element-plus.DhcJM-BD.js";import{D as o}from"./dept.BMy3HUMX.js";import{f as d}from"./common.BWIReEgr.js";import{o as i,A as n,ai as r,aC as u,t as m,v as p,J as c,I as f,a as v,u as h,r as _,ac as b,eD as V}from"./.pnpm.DGfAnZKL.js";const j=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:j}){const k=i,y=_([]),x=_(),D=_(),T=j,g=V(k,"modelValue",T);n(D,e=>{x.value.filter(e)});const C=(e,a)=>!e||a.label.includes(e);function N(e){g.value=e.value,T("node-click")}const S=b({name:void 0,status:void 0,created_time:void 0}),w=_(!0);return r(()=>{w.value=!0,o.listDept(S).then(e=>{y.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=u("Search"),n=a,r=e,_=s,b=l,V=t;return m(),p(V,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:h(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:h(y),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":C,"default-expand-all":"",onNodeClick:N},{empty:c(()=>[f(_,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{j as _};

View File

@@ -0,0 +1 @@
import{y as e,h as a,aL as l,u as s,T as t}from"./element-plus.DhcJM-BD.js";import{D as o}from"./dept.aw8cnM4N.js";import{f as d}from"./common.BWIReEgr.js";import{o as i,A as n,ai as r,aC as u,t as m,v as p,J as c,I as f,a as v,u as h,r as _,ac as b,eD as V}from"./.pnpm.DGfAnZKL.js";const j=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:j}){const k=i,y=_([]),x=_(),D=_(),T=j,g=V(k,"modelValue",T);n(D,e=>{x.value.filter(e)});const C=(e,a)=>!e||a.label.includes(e);function N(e){g.value=e.value,T("node-click")}const S=b({name:void 0,status:void 0,created_time:void 0}),w=_(!0);return r(()=>{w.value=!0,o.listDept(S).then(e=>{y.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=u("Search"),n=a,r=e,_=s,b=l,V=t;return m(),p(V,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:h(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:h(y),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":C,"default-expand-all":"",onNodeClick:N},{empty:c(()=>[f(_,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{j as _};

View File

@@ -0,0 +1,97 @@
import { y as ElInput, i as ElIcon, aL as ElTree, u as ElEmpty, T as ElCard } from "./element-plus.CkEW9frc.js";
import { D as DeptAPI } from "./dept.BQxPXXgN.js";
import { f as formatTree } from "./common.ySZAMJjg.js";
import { J as defineComponent, m as watch, E as onBeforeMount, aO as resolveComponent, S as openBlock, T as createBlock, a0 as withCtx, $ as createVNode, z as isRef, o as unref, r as ref, ak as reactive, eD as useVModel } from "./.pnpm.BW3P1y8f.js";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "DeptTree",
props: {
modelValue: {
type: [String, Number],
default: void 0
}
},
emits: ["node-click", "update:modelValue"],
setup(__props, { emit: __emit }) {
const props = __props;
const deptOptions = ref([]);
const deptTreeRef = ref();
const deptName = ref();
const emits = __emit;
const deptId = useVModel(props, "modelValue", emits);
watch(deptName, (val) => {
deptTreeRef.value.filter(val);
});
const handleFilter = (value, data) => {
if (!value) return true;
return data.label.includes(value);
};
function handleNodeClick(data) {
deptId.value = data.value;
emits("node-click");
}
const queryFormData = reactive({
name: void 0,
status: void 0,
created_time: void 0
});
const loading = ref(true);
onBeforeMount(() => {
loading.value = true;
DeptAPI.listDept(queryFormData).then((response) => {
deptOptions.value = formatTree(response.data.data);
}).finally(() => {
loading.value = false;
});
});
return (_ctx, _cache) => {
const _component_Search = resolveComponent("Search");
const _component_el_icon = ElIcon;
const _component_el_input = ElInput;
const _component_el_empty = ElEmpty;
const _component_el_tree = ElTree;
const _component_el_card = ElCard;
return openBlock(), createBlock(_component_el_card, { shadow: "hover" }, {
default: withCtx(() => [
createVNode(_component_el_input, {
modelValue: unref(deptName),
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(deptName) ? deptName.value = $event : null),
placeholder: "部门名称"
}, {
prefix: withCtx(() => [
createVNode(_component_el_icon, null, {
default: withCtx(() => [
createVNode(_component_Search)
]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"]),
createVNode(_component_el_tree, {
ref_key: "deptTreeRef",
ref: deptTreeRef,
class: "mt-2",
data: unref(deptOptions),
props: { children: "children", label: "label", disabled: "disabled" },
"expand-on-click-node": false,
"filter-node-method": handleFilter,
"default-expand-all": "",
onNodeClick: handleNodeClick
}, {
empty: withCtx(() => [
createVNode(_component_el_empty, {
"image-size": 80,
description: "暂无数据"
})
]),
_: 1
}, 8, ["data"])
]),
_: 1
});
};
}
});
export {
_sfc_main as _
};

View File

@@ -0,0 +1 @@
import{y as e,i as a,aL as l,u as s,T as t}from"./element-plus.BfMFfVUv.js";import{D as o}from"./dept.Bt5RpYFI.js";import{f as d}from"./common.BWIReEgr.js";import{J as i,m as n,E as r,aO as m,S as u,T as p,a0 as c,$ as f,z as v,o as _,r as h,ak as b,eD as k}from"./.pnpm.BudmgPu7.js";const V=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:V}){const y=i,j=h([]),x=h(),D=h(),T=V,S=k(y,"modelValue",T);n(D,e=>{x.value.filter(e)});const g=(e,a)=>!e||a.label.includes(e);function z(e){S.value=e.value,T("node-click")}const N=b({name:void 0,status:void 0,created_time:void 0}),w=h(!0);return r(()=>{w.value=!0,o.listDept(N).then(e=>{j.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=m("Search"),n=a,r=e,h=s,b=l,k=t;return u(),p(k,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:_(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:_(j),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":g,"default-expand-all":"",onNodeClick:z},{empty:c(()=>[f(h,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{V as _};

View File

@@ -0,0 +1 @@
import{y as e,i as a,aL as l,u as s,T as t}from"./element-plus.BfMFfVUv.js";import{D as o}from"./dept.CbkxXe5Q.js";import{f as d}from"./common.BWIReEgr.js";import{J as i,m as n,E as r,aO as m,S as u,T as p,a0 as c,$ as f,z as v,o as _,r as h,ak as b,eD as k}from"./.pnpm.BudmgPu7.js";const V=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:V}){const y=i,j=h([]),x=h(),D=h(),T=V,S=k(y,"modelValue",T);n(D,e=>{x.value.filter(e)});const g=(e,a)=>!e||a.label.includes(e);function z(e){S.value=e.value,T("node-click")}const N=b({name:void 0,status:void 0,created_time:void 0}),w=h(!0);return r(()=>{w.value=!0,o.listDept(N).then(e=>{j.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=m("Search"),n=a,r=e,h=s,b=l,k=t;return u(),p(k,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:_(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:_(j),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":g,"default-expand-all":"",onNodeClick:z},{empty:c(()=>[f(h,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{V as _};

View File

@@ -0,0 +1 @@
import{y as e,i as a,aL as l,u as s,T as t}from"./element-plus.C1XeB8_q.js";import{D as o}from"./dept.DTclm3Og.js";import{f as d}from"./common.BWIReEgr.js";import{J as i,m as n,E as r,aO as m,S as u,T as p,a0 as c,$ as f,z as v,o as _,r as h,ak as b,eD as k}from"./.pnpm.BudmgPu7.js";const V=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:V}){const j=i,y=h([]),x=h(),D=h(),T=V,S=k(j,"modelValue",T);n(D,e=>{x.value.filter(e)});const g=(e,a)=>!e||a.label.includes(e);function z(e){S.value=e.value,T("node-click")}const N=b({name:void 0,status:void 0,created_time:void 0}),w=h(!0);return r(()=>{w.value=!0,o.listDept(N).then(e=>{y.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=m("Search"),n=a,r=e,h=s,b=l,k=t;return u(),p(k,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:_(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:_(y),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":g,"default-expand-all":"",onNodeClick:z},{empty:c(()=>[f(h,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{V as _};

View File

@@ -0,0 +1 @@
import{y as e,h as a,aL as l,u as s,T as t}from"./element-plus.DhcJM-BD.js";import{D as o}from"./dept.BlLZxDQg.js";import{f as d}from"./common.BWIReEgr.js";import{o as i,A as n,ai as r,aC as u,t as m,v as p,J as c,I as f,a as v,u as h,r as _,ac as b,eD as V}from"./.pnpm.DGfAnZKL.js";const j=i({__name:"DeptTree",props:{modelValue:{type:[String,Number],default:void 0}},emits:["node-click","update:modelValue"],setup(i,{emit:j}){const k=i,y=_([]),x=_(),D=_(),T=j,g=V(k,"modelValue",T);n(D,e=>{x.value.filter(e)});const C=(e,a)=>!e||a.label.includes(e);function N(e){g.value=e.value,T("node-click")}const S=b({name:void 0,status:void 0,created_time:void 0}),w=_(!0);return r(()=>{w.value=!0,o.listDept(S).then(e=>{y.value=d(e.data.data)}).finally(()=>{w.value=!1})}),(o,d)=>{const i=u("Search"),n=a,r=e,_=s,b=l,V=t;return m(),p(V,{shadow:"hover"},{default:c(()=>[f(r,{modelValue:h(D),"onUpdate:modelValue":d[0]||(d[0]=e=>v(D)?D.value=e:null),placeholder:"部门名称"},{prefix:c(()=>[f(n,null,{default:c(()=>[f(i)]),_:1})]),_:1},8,["modelValue"]),f(b,{ref_key:"deptTreeRef",ref:x,class:"mt-2",data:h(y),props:{children:"children",label:"label",disabled:"disabled"},"expand-on-click-node":!1,"filter-node-method":C,"default-expand-all":"",onNodeClick:N},{empty:c(()=>[f(_,{"image-size":80,description:"暂无数据"})]),_:1},8,["data"])]),_:1})}}});export{j as _};

View File

@@ -0,0 +1,2 @@
import{v as e,F as a,w as l,x as o,y as t,aq as r,ar as n,aK as s,aD as d,h as i,E as u}from"./element-plus.sfqR2v8u.js";import{E as p}from"./exceljs.Be_qVvLB.js";import{J as c,ev as m,S as f,_ as h,$ as v,a0 as g,H as b,ay as y,T as x,a8 as V,a1 as w,o as _,a9 as k,ez as C,r as U,ak as R,j,n as D,eA as E}from"./.pnpm.BudmgPu7.js";const q={style:{"padding-right":"var(--el-dialog-padding-primary)"}},A=c({__name:"ExportModal",props:C({contentConfig:{},queryParams:{},pageData:{},selectionData:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c,{expose:C}){const A=c,B=m(c,"modelValue"),F=U(),L=R({filename:"",sheetname:"",fields:[],origin:"current"
/* CURRENT */}),K={fields:[{required:!0,message:"请选择字段"}],origin:[{required:!0,message:"请选择数据源"}]},M=j(()=>A.contentConfig.cols.map(e=>(e.initFn&&e.initFn(e),void 0===e.show&&(e.show=!0),void 0!==e.prop&&void 0===e.columnKey&&void 0===e["column-key"]&&(e.columnKey=e.prop),"selection"===e.type&&void 0===e.reserveSelection&&void 0===e["reserve-selection"]&&(e.reserveSelection=!0),e)));function P(){var e;B.value=!1,null==(e=F.value)||e.resetFields(),D(()=>{var e;null==(e=F.value)||e.clearValidate()})}(()=>{const e=[];M.value.forEach(a=>{void 0!==a.prop&&e.push(a.prop)}),L.fields=e})();const S=E(()=>{var e;null==(e=F.value)||e.validate(e=>{e&&(!function(){try{const e=L.filename?L.filename:A.contentConfig.permPrefix||"export",a=L.sheetname?L.sheetname:"sheet",l=new p.Workbook,o=l.addWorksheet(a),t=[];if(M.value.forEach(e=>{e.label&&e.prop&&L.fields.includes(e.prop)&&t.push({header:e.label,key:e.prop})}),o.columns=t,"remote"===L.origin)if(A.contentConfig.exportsAction){const a=A.queryParams??{};A.contentConfig.exportsAction(a).then(a=>{o.addRows(a),l.xlsx.writeBuffer().then(a=>{O(a,e)}).catch(e=>{u.error("导出远程数据失败")})}).catch(e=>{u.error("获取远程数据失败")})}else u.error("未配置exportsAction");else if("selected"===L.origin){const a=A.selectionData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{O(a,e)}).catch(e=>{u.error("导出选中数据失败")})}else{const a=A.pageData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{O(a,e)}).catch(e=>{u.error("导出当前数据失败")})}}catch(e){u.error("导出失败")}}(),P())})},3e3);function O(e,a){try{const l=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),o=window.URL.createObjectURL(l),t=document.createElement("a");t.href=o,t.download=a,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(o)}catch(l){u.error("保存文件失败")}}return C({handleCloseExportsModal:P}),(u,p)=>{const m=t,C=o,U=n,R=r,j=d,D=s,E=l,O=a,W=i,z=e;return f(),h("div",null,[v(z,{modelValue:B.value,"onUpdate:modelValue":p[4]||(p[4]=e=>B.value=e),"align-center":!0,title:"导出数据",width:"600px",style:{"padding-right":"0"},onClose:P},{footer:g(()=>[w("div",q,[v(W,{type:"primary",onClick:_(S)},{default:g(()=>[...p[5]||(p[5]=[k("确 定",-1)])]),_:1},8,["onClick"]),v(W,{onClick:P},{default:g(()=>[...p[6]||(p[6]=[k("取 消",-1)])]),_:1})])]),default:g(()=>[v(O,{"max-height":"60vh"},{default:g(()=>[v(E,{ref_key:"exportsFormRef",ref:F,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:L,rules:K},{default:g(()=>[v(C,{label:"文件名",prop:"filename"},{default:g(()=>[v(m,{modelValue:L.filename,"onUpdate:modelValue":p[0]||(p[0]=e=>L.filename=e),placeholder:"请输入文件名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"工作表名",prop:"sheetname"},{default:g(()=>[v(m,{modelValue:L.sheetname,"onUpdate:modelValue":p[1]||(p[1]=e=>L.sheetname=e),placeholder:"请输入工作表名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"数据源",prop:"origin"},{default:g(()=>[v(R,{modelValue:L.origin,"onUpdate:modelValue":p[2]||(p[2]=e=>L.origin=e)},{default:g(()=>{var e,a;return[v(U,{label:"当前数据 (当前页的数据)",value:"current",disabled:!(null==(e=c.pageData)?void 0:e.length)},null,8,["value","disabled"]),v(U,{label:"选中数据 (所有选中的数据)",value:"selected",disabled:!(null==(a=c.selectionData)?void 0:a.length)},null,8,["value","disabled"]),v(U,{label:"全量数据 (所有分页的数据)",value:"remote",disabled:!A.contentConfig.exportsAction},null,8,["value","disabled"])]}),_:1},8,["modelValue"])]),_:1}),v(C,{label:"字段",prop:"fields"},{default:g(()=>[v(D,{modelValue:L.fields,"onUpdate:modelValue":p[3]||(p[3]=e=>L.fields=e)},{default:g(()=>[(f(!0),h(b,null,y(M.value,e=>(f(),h(b,{key:e.prop},[e.prop?(f(),x(j,{key:0,value:e.prop,label:e.label},null,8,["value","label"])):V("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])])}}});export{A as _};

View File

@@ -0,0 +1,2 @@
import{v as e,F as a,w as l,x as o,y as t,aq as r,ar as n,aK as s,aD as d,h as i,E as u}from"./element-plus.BQf8a6uP.js";import{E as p}from"./exceljs.Be_qVvLB.js";import{J as c,ev as m,S as f,_ as h,$ as v,a0 as g,H as b,ay as y,T as x,a8 as V,a1 as w,o as _,a9 as k,ez as C,r as U,ak as R,j,n as D,eA as E}from"./.pnpm.BudmgPu7.js";const q={style:{"padding-right":"var(--el-dialog-padding-primary)"}},A=c({__name:"ExportModal",props:C({contentConfig:{},queryParams:{},pageData:{},selectionData:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c,{expose:C}){const A=c,B=m(c,"modelValue"),F=U(),L=R({filename:"",sheetname:"",fields:[],origin:"current"
/* CURRENT */}),K={fields:[{required:!0,message:"请选择字段"}],origin:[{required:!0,message:"请选择数据源"}]},M=j(()=>A.contentConfig.cols.map(e=>(e.initFn&&e.initFn(e),void 0===e.show&&(e.show=!0),void 0!==e.prop&&void 0===e.columnKey&&void 0===e["column-key"]&&(e.columnKey=e.prop),"selection"===e.type&&void 0===e.reserveSelection&&void 0===e["reserve-selection"]&&(e.reserveSelection=!0),e)));function P(){var e;B.value=!1,null==(e=F.value)||e.resetFields(),D(()=>{var e;null==(e=F.value)||e.clearValidate()})}(()=>{const e=[];M.value.forEach(a=>{void 0!==a.prop&&e.push(a.prop)}),L.fields=e})();const S=E(()=>{var e;null==(e=F.value)||e.validate(e=>{e&&(!function(){try{const e=L.filename?L.filename:A.contentConfig.permPrefix||"export",a=L.sheetname?L.sheetname:"sheet",l=new p.Workbook,o=l.addWorksheet(a),t=[];if(M.value.forEach(e=>{e.label&&e.prop&&L.fields.includes(e.prop)&&t.push({header:e.label,key:e.prop})}),o.columns=t,"remote"===L.origin)if(A.contentConfig.exportsAction){const a=A.queryParams??{};A.contentConfig.exportsAction(a).then(a=>{o.addRows(a),l.xlsx.writeBuffer().then(a=>{O(a,e)}).catch(e=>{u.error("导出远程数据失败")})}).catch(e=>{u.error("获取远程数据失败")})}else u.error("未配置exportsAction");else if("selected"===L.origin){const a=A.selectionData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{O(a,e)}).catch(e=>{u.error("导出选中数据失败")})}else{const a=A.pageData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{O(a,e)}).catch(e=>{u.error("导出当前数据失败")})}}catch(e){u.error("导出失败")}}(),P())})},3e3);function O(e,a){try{const l=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),o=window.URL.createObjectURL(l),t=document.createElement("a");t.href=o,t.download=a,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(o)}catch(l){u.error("保存文件失败")}}return C({handleCloseExportsModal:P}),(u,p)=>{const m=t,C=o,U=n,R=r,j=d,D=s,E=l,O=a,W=i,z=e;return f(),h("div",null,[v(z,{modelValue:B.value,"onUpdate:modelValue":p[4]||(p[4]=e=>B.value=e),"align-center":!0,title:"导出数据",width:"600px",style:{"padding-right":"0"},onClose:P},{footer:g(()=>[w("div",q,[v(W,{type:"primary",onClick:_(S)},{default:g(()=>[...p[5]||(p[5]=[k("确 定",-1)])]),_:1},8,["onClick"]),v(W,{onClick:P},{default:g(()=>[...p[6]||(p[6]=[k("取 消",-1)])]),_:1})])]),default:g(()=>[v(O,{"max-height":"60vh"},{default:g(()=>[v(E,{ref_key:"exportsFormRef",ref:F,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:L,rules:K},{default:g(()=>[v(C,{label:"文件名",prop:"filename"},{default:g(()=>[v(m,{modelValue:L.filename,"onUpdate:modelValue":p[0]||(p[0]=e=>L.filename=e),placeholder:"请输入文件名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"工作表名",prop:"sheetname"},{default:g(()=>[v(m,{modelValue:L.sheetname,"onUpdate:modelValue":p[1]||(p[1]=e=>L.sheetname=e),placeholder:"请输入工作表名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"数据源",prop:"origin"},{default:g(()=>[v(R,{modelValue:L.origin,"onUpdate:modelValue":p[2]||(p[2]=e=>L.origin=e)},{default:g(()=>{var e,a;return[v(U,{label:"当前数据 (当前页的数据)",value:"current",disabled:!(null==(e=c.pageData)?void 0:e.length)},null,8,["value","disabled"]),v(U,{label:"选中数据 (所有选中的数据)",value:"selected",disabled:!(null==(a=c.selectionData)?void 0:a.length)},null,8,["value","disabled"]),v(U,{label:"全量数据 (所有分页的数据)",value:"remote",disabled:!A.contentConfig.exportsAction},null,8,["value","disabled"])]}),_:1},8,["modelValue"])]),_:1}),v(C,{label:"字段",prop:"fields"},{default:g(()=>[v(D,{modelValue:L.fields,"onUpdate:modelValue":p[3]||(p[3]=e=>L.fields=e)},{default:g(()=>[(f(!0),h(b,null,y(M.value,e=>(f(),h(b,{key:e.prop},[e.prop?(f(),x(j,{key:0,value:e.prop,label:e.label},null,8,["value","label"])):V("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])])}}});export{A as _};

View File

@@ -0,0 +1,310 @@
import { v as ElDialog, F as ElScrollbar, w as ElForm, x as ElFormItem, y as ElInput, aq as ElSelect, ar as ElOption, aJ as ElCheckboxGroup, aC as ElCheckbox, h as ElButton, E as ElMessage } from "./element-plus.CkEW9frc.js";
import { E as ExcelJS } from "./exceljs.CkFT-P7Q.js";
import { J as defineComponent, ev as useModel, S as openBlock, _ as createElementBlock, $ as createVNode, a0 as withCtx, H as Fragment, ay as renderList, T as createBlock, a8 as createCommentVNode, a1 as createBaseVNode, o as unref, a9 as createTextVNode, ez as mergeModels, r as ref, ak as reactive, j as computed, n as nextTick, eA as useThrottleFn } from "./.pnpm.BW3P1y8f.js";
const _hoisted_1 = { style: { "padding-right": "var(--el-dialog-padding-primary)" } };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ExportModal",
props: /* @__PURE__ */ mergeModels({
contentConfig: {},
queryParams: {},
pageData: {},
selectionData: {}
}, {
"modelValue": { type: Boolean, ...{
required: true,
default: false
} },
"modelModifiers": {}
}),
emits: ["update:modelValue"],
setup(__props, { expose: __expose }) {
const props = __props;
const exportsModalVisible = useModel(__props, "modelValue");
const exportsFormRef = ref();
const exportsFormData = reactive({
filename: "",
sheetname: "",
fields: [],
origin: "current"
/* CURRENT */
});
const exportsFormRules = {
fields: [{ required: true, message: "请选择字段" }],
origin: [{ required: true, message: "请选择数据源" }]
};
const cols = computed(
() => props.contentConfig.cols.map((col) => {
if (col.initFn) {
col.initFn(col);
}
if (col.show === void 0) {
col.show = true;
}
if (col.prop !== void 0 && col.columnKey === void 0 && col["column-key"] === void 0) {
col.columnKey = col.prop;
}
if (col.type === "selection" && col.reserveSelection === void 0 && col["reserve-selection"] === void 0) {
col.reserveSelection = true;
}
return col;
})
);
const initFields = () => {
const fields = [];
cols.value.forEach((item) => {
if (item.prop !== void 0) {
fields.push(item.prop);
}
});
exportsFormData.fields = fields;
};
initFields();
function handleCloseExportsModal() {
var _a;
exportsModalVisible.value = false;
(_a = exportsFormRef.value) == null ? void 0 : _a.resetFields();
nextTick(() => {
var _a2;
(_a2 = exportsFormRef.value) == null ? void 0 : _a2.clearValidate();
});
}
function handleExports() {
try {
const filename = exportsFormData.filename ? exportsFormData.filename : props.contentConfig.permPrefix || "export";
const sheetname = exportsFormData.sheetname ? exportsFormData.sheetname : "sheet";
const workbook = new ExcelJS.Workbook();
const worksheet = workbook.addWorksheet(sheetname);
const columns = [];
cols.value.forEach((col) => {
if (col.label && col.prop && exportsFormData.fields.includes(col.prop)) {
columns.push({ header: col.label, key: col.prop });
}
});
worksheet.columns = columns;
if (exportsFormData.origin === "remote") {
if (props.contentConfig.exportsAction) {
const lastFormData = props.queryParams ?? {};
props.contentConfig.exportsAction(lastFormData).then((res) => {
worksheet.addRows(res);
workbook.xlsx.writeBuffer().then((buffer) => {
saveXlsx(buffer, filename);
}).catch((error) => {
console.error("导出远程数据失败:", error);
ElMessage.error("导出远程数据失败");
});
}).catch((error) => {
console.error("获取远程数据失败:", error);
ElMessage.error("获取远程数据失败");
});
} else {
ElMessage.error("未配置exportsAction");
}
} else if (exportsFormData.origin === "selected") {
const rows = props.selectionData ?? [];
worksheet.addRows(rows);
workbook.xlsx.writeBuffer().then((buffer) => {
saveXlsx(buffer, filename);
}).catch((error) => {
console.error("导出选中数据失败:", error);
ElMessage.error("导出选中数据失败");
});
} else {
const rows = props.pageData ?? [];
worksheet.addRows(rows);
workbook.xlsx.writeBuffer().then((buffer) => {
saveXlsx(buffer, filename);
}).catch((error) => {
console.error("导出当前数据失败:", error);
ElMessage.error("导出当前数据失败");
});
}
} catch (error) {
console.error("导出失败:", error);
ElMessage.error("导出失败");
}
}
const handleExportsSubmit = useThrottleFn(() => {
var _a;
(_a = exportsFormRef.value) == null ? void 0 : _a.validate((valid) => {
if (valid) {
handleExports();
handleCloseExportsModal();
}
});
}, 3e3);
function saveXlsx(fileData, fileName) {
try {
const fileType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8";
const blob = new Blob([fileData], { type: fileType });
const downloadUrl = window.URL.createObjectURL(blob);
const downloadLink = document.createElement("a");
downloadLink.href = downloadUrl;
downloadLink.download = fileName;
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
window.URL.revokeObjectURL(downloadUrl);
} catch (error) {
console.error("保存文件失败:", error);
ElMessage.error("保存文件失败");
}
}
__expose({
handleCloseExportsModal
});
return (_ctx, _cache) => {
const _component_el_input = ElInput;
const _component_el_form_item = ElFormItem;
const _component_el_option = ElOption;
const _component_el_select = ElSelect;
const _component_el_checkbox = ElCheckbox;
const _component_el_checkbox_group = ElCheckboxGroup;
const _component_el_form = ElForm;
const _component_el_scrollbar = ElScrollbar;
const _component_el_button = ElButton;
const _component_el_dialog = ElDialog;
return openBlock(), createElementBlock("div", null, [
createVNode(_component_el_dialog, {
modelValue: exportsModalVisible.value,
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => exportsModalVisible.value = $event),
"align-center": true,
title: "导出数据",
width: "600px",
style: { "padding-right": "0" },
onClose: handleCloseExportsModal
}, {
footer: withCtx(() => [
createBaseVNode("div", _hoisted_1, [
createVNode(_component_el_button, {
type: "primary",
onClick: unref(handleExportsSubmit)
}, {
default: withCtx(() => [..._cache[5] || (_cache[5] = [
createTextVNode("确 定", -1)
])]),
_: 1
}, 8, ["onClick"]),
createVNode(_component_el_button, { onClick: handleCloseExportsModal }, {
default: withCtx(() => [..._cache[6] || (_cache[6] = [
createTextVNode("取 消", -1)
])]),
_: 1
})
])
]),
default: withCtx(() => [
createVNode(_component_el_scrollbar, { "max-height": "60vh" }, {
default: withCtx(() => [
createVNode(_component_el_form, {
ref_key: "exportsFormRef",
ref: exportsFormRef,
style: { "padding-right": "var(--el-dialog-padding-primary)" },
model: exportsFormData,
rules: exportsFormRules
}, {
default: withCtx(() => [
createVNode(_component_el_form_item, {
label: "文件名",
prop: "filename"
}, {
default: withCtx(() => [
createVNode(_component_el_input, {
modelValue: exportsFormData.filename,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => exportsFormData.filename = $event),
placeholder: "请输入文件名",
clearable: ""
}, null, 8, ["modelValue"])
]),
_: 1
}),
createVNode(_component_el_form_item, {
label: "工作表名",
prop: "sheetname"
}, {
default: withCtx(() => [
createVNode(_component_el_input, {
modelValue: exportsFormData.sheetname,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => exportsFormData.sheetname = $event),
placeholder: "请输入工作表名",
clearable: ""
}, null, 8, ["modelValue"])
]),
_: 1
}),
createVNode(_component_el_form_item, {
label: "数据源",
prop: "origin"
}, {
default: withCtx(() => [
createVNode(_component_el_select, {
modelValue: exportsFormData.origin,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => exportsFormData.origin = $event)
}, {
default: withCtx(() => {
var _a, _b;
return [
createVNode(_component_el_option, {
label: "当前数据 (当前页的数据)",
value: "current",
disabled: !((_a = __props.pageData) == null ? void 0 : _a.length)
}, null, 8, ["value", "disabled"]),
createVNode(_component_el_option, {
label: "选中数据 (所有选中的数据)",
value: "selected",
disabled: !((_b = __props.selectionData) == null ? void 0 : _b.length)
}, null, 8, ["value", "disabled"]),
createVNode(_component_el_option, {
label: "全量数据 (所有分页的数据)",
value: "remote",
disabled: !props.contentConfig.exportsAction
}, null, 8, ["value", "disabled"])
];
}),
_: 1
}, 8, ["modelValue"])
]),
_: 1
}),
createVNode(_component_el_form_item, {
label: "字段",
prop: "fields"
}, {
default: withCtx(() => [
createVNode(_component_el_checkbox_group, {
modelValue: exportsFormData.fields,
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => exportsFormData.fields = $event)
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(cols.value, (col) => {
return openBlock(), createElementBlock(Fragment, {
key: col.prop
}, [
col.prop ? (openBlock(), createBlock(_component_el_checkbox, {
key: 0,
value: col.prop,
label: col.label
}, null, 8, ["value", "label"])) : createCommentVNode("", true)
], 64);
}), 128))
]),
_: 1
}, 8, ["modelValue"])
]),
_: 1
})
]),
_: 1
}, 8, ["model"])
]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"])
]);
};
}
});
export {
_sfc_main as _
};

View File

@@ -0,0 +1,2 @@
import{v as e,F as a,w as l,x as o,y as t,aq as r,ar as n,aJ as s,aC as d,h as i,E as u}from"./element-plus.C1XeB8_q.js";import{E as p}from"./exceljs.Be_qVvLB.js";import{J as c,ev as m,S as f,_ as h,$ as v,a0 as g,H as b,ay as y,T as x,a8 as V,a1 as w,o as _,a9 as k,ez as C,r as U,ak as R,j,n as E,eA as q}from"./.pnpm.BudmgPu7.js";const D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},A=c({__name:"ExportModal",props:C({contentConfig:{},queryParams:{},pageData:{},selectionData:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c,{expose:C}){const A=c,B=m(c,"modelValue"),F=U(),L=R({filename:"",sheetname:"",fields:[],origin:"current"
/* CURRENT */}),M={fields:[{required:!0,message:"请选择字段"}],origin:[{required:!0,message:"请选择数据源"}]},P=j(()=>A.contentConfig.cols.map(e=>(e.initFn&&e.initFn(e),void 0===e.show&&(e.show=!0),void 0!==e.prop&&void 0===e.columnKey&&void 0===e["column-key"]&&(e.columnKey=e.prop),"selection"===e.type&&void 0===e.reserveSelection&&void 0===e["reserve-selection"]&&(e.reserveSelection=!0),e)));function S(){var e;B.value=!1,null==(e=F.value)||e.resetFields(),E(()=>{var e;null==(e=F.value)||e.clearValidate()})}(()=>{const e=[];P.value.forEach(a=>{void 0!==a.prop&&e.push(a.prop)}),L.fields=e})();const J=q(()=>{var e;null==(e=F.value)||e.validate(e=>{e&&(!function(){try{const e=L.filename?L.filename:A.contentConfig.permPrefix||"export",a=L.sheetname?L.sheetname:"sheet",l=new p.Workbook,o=l.addWorksheet(a),t=[];if(P.value.forEach(e=>{e.label&&e.prop&&L.fields.includes(e.prop)&&t.push({header:e.label,key:e.prop})}),o.columns=t,"remote"===L.origin)if(A.contentConfig.exportsAction){const a=A.queryParams??{};A.contentConfig.exportsAction(a).then(a=>{o.addRows(a),l.xlsx.writeBuffer().then(a=>{K(a,e)}).catch(e=>{u.error("导出远程数据失败")})}).catch(e=>{u.error("获取远程数据失败")})}else u.error("未配置exportsAction");else if("selected"===L.origin){const a=A.selectionData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{K(a,e)}).catch(e=>{u.error("导出选中数据失败")})}else{const a=A.pageData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{K(a,e)}).catch(e=>{u.error("导出当前数据失败")})}}catch(e){u.error("导出失败")}}(),S())})},3e3);function K(e,a){try{const l=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),o=window.URL.createObjectURL(l),t=document.createElement("a");t.href=o,t.download=a,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(o)}catch(l){u.error("保存文件失败")}}return C({handleCloseExportsModal:S}),(u,p)=>{const m=t,C=o,U=n,R=r,j=d,E=s,q=l,K=a,O=i,W=e;return f(),h("div",null,[v(W,{modelValue:B.value,"onUpdate:modelValue":p[4]||(p[4]=e=>B.value=e),"align-center":!0,title:"导出数据",width:"600px",style:{"padding-right":"0"},onClose:S},{footer:g(()=>[w("div",D,[v(O,{type:"primary",onClick:_(J)},{default:g(()=>[...p[5]||(p[5]=[k("确 定",-1)])]),_:1},8,["onClick"]),v(O,{onClick:S},{default:g(()=>[...p[6]||(p[6]=[k("取 消",-1)])]),_:1})])]),default:g(()=>[v(K,{"max-height":"60vh"},{default:g(()=>[v(q,{ref_key:"exportsFormRef",ref:F,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:L,rules:M},{default:g(()=>[v(C,{label:"文件名",prop:"filename"},{default:g(()=>[v(m,{modelValue:L.filename,"onUpdate:modelValue":p[0]||(p[0]=e=>L.filename=e),placeholder:"请输入文件名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"工作表名",prop:"sheetname"},{default:g(()=>[v(m,{modelValue:L.sheetname,"onUpdate:modelValue":p[1]||(p[1]=e=>L.sheetname=e),placeholder:"请输入工作表名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"数据源",prop:"origin"},{default:g(()=>[v(R,{modelValue:L.origin,"onUpdate:modelValue":p[2]||(p[2]=e=>L.origin=e)},{default:g(()=>{var e,a;return[v(U,{label:"当前数据 (当前页的数据)",value:"current",disabled:!(null==(e=c.pageData)?void 0:e.length)},null,8,["value","disabled"]),v(U,{label:"选中数据 (所有选中的数据)",value:"selected",disabled:!(null==(a=c.selectionData)?void 0:a.length)},null,8,["value","disabled"]),v(U,{label:"全量数据 (所有分页的数据)",value:"remote",disabled:!A.contentConfig.exportsAction},null,8,["value","disabled"])]}),_:1},8,["modelValue"])]),_:1}),v(C,{label:"字段",prop:"fields"},{default:g(()=>[v(E,{modelValue:L.fields,"onUpdate:modelValue":p[3]||(p[3]=e=>L.fields=e)},{default:g(()=>[(f(!0),h(b,null,y(P.value,e=>(f(),h(b,{key:e.prop},[e.prop?(f(),x(j,{key:0,value:e.prop,label:e.label},null,8,["value","label"])):V("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])])}}});export{A as _};

View File

@@ -0,0 +1,2 @@
import{v as e,F as l,w as a,x as o,y as t,aq as r,ar as n,aJ as s,aC as d,g as i,a as u}from"./element-plus.DhcJM-BD.js";import{E as p}from"./exceljs.DPqPZvAA.js";import{o as c,ev as m,t as f,H as v,I as h,J as g,R as b,am as y,v as x,X as V,K as w,u as _,Y as C,ez as k,r as R,ac as U,c as D,D as j,eA as q}from"./.pnpm.DGfAnZKL.js";const E={style:{"padding-right":"var(--el-dialog-padding-primary)"}},A=c({__name:"ExportModal",props:k({contentConfig:{},queryParams:{},pageData:{},selectionData:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c,{expose:k}){const A=c,B=m(c,"modelValue"),F=R(),L=U({filename:"",sheetname:"",fields:[],origin:"current"
/* CURRENT */}),K={fields:[{required:!0,message:"请选择字段"}],origin:[{required:!0,message:"请选择数据源"}]},M=D(()=>A.contentConfig.cols.map(e=>(e.initFn&&e.initFn(e),void 0===e.show&&(e.show=!0),void 0!==e.prop&&void 0===e.columnKey&&void 0===e["column-key"]&&(e.columnKey=e.prop),"selection"===e.type&&void 0===e.reserveSelection&&void 0===e["reserve-selection"]&&(e.reserveSelection=!0),e)));function P(){var e;B.value=!1,null==(e=F.value)||e.resetFields(),j(()=>{var e;null==(e=F.value)||e.clearValidate()})}(()=>{const e=[];M.value.forEach(l=>{void 0!==l.prop&&e.push(l.prop)}),L.fields=e})();const J=q(()=>{var e;null==(e=F.value)||e.validate(e=>{e&&(!function(){try{const e=L.filename?L.filename:A.contentConfig.permPrefix||"export",l=L.sheetname?L.sheetname:"sheet",a=new p.Workbook,o=a.addWorksheet(l),t=[];if(M.value.forEach(e=>{e.label&&e.prop&&L.fields.includes(e.prop)&&t.push({header:e.label,key:e.prop})}),o.columns=t,"remote"===L.origin)if(A.contentConfig.exportsAction){const l=A.queryParams??{};A.contentConfig.exportsAction(l).then(l=>{o.addRows(l),a.xlsx.writeBuffer().then(l=>{O(l,e)}).catch(e=>{u.error("导出远程数据失败")})}).catch(e=>{u.error("获取远程数据失败")})}else u.error("未配置exportsAction");else if("selected"===L.origin){const l=A.selectionData??[];o.addRows(l),a.xlsx.writeBuffer().then(l=>{O(l,e)}).catch(e=>{u.error("导出选中数据失败")})}else{const l=A.pageData??[];o.addRows(l),a.xlsx.writeBuffer().then(l=>{O(l,e)}).catch(e=>{u.error("导出当前数据失败")})}}catch(e){u.error("导出失败")}}(),P())})},3e3);function O(e,l){try{const a=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),o=window.URL.createObjectURL(a),t=document.createElement("a");t.href=o,t.download=l,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(o)}catch(a){u.error("保存文件失败")}}return k({handleCloseExportsModal:P}),(u,p)=>{const m=t,k=o,R=n,U=r,D=d,j=s,q=a,O=l,S=i,W=e;return f(),v("div",null,[h(W,{modelValue:B.value,"onUpdate:modelValue":p[4]||(p[4]=e=>B.value=e),"align-center":!0,title:"导出数据",width:"600px",style:{"padding-right":"0"},onClose:P},{footer:g(()=>[w("div",E,[h(S,{type:"primary",onClick:_(J)},{default:g(()=>[...p[5]||(p[5]=[C("确 定",-1)])]),_:1},8,["onClick"]),h(S,{onClick:P},{default:g(()=>[...p[6]||(p[6]=[C("取 消",-1)])]),_:1})])]),default:g(()=>[h(O,{"max-height":"60vh"},{default:g(()=>[h(q,{ref_key:"exportsFormRef",ref:F,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:L,rules:K},{default:g(()=>[h(k,{label:"文件名",prop:"filename"},{default:g(()=>[h(m,{modelValue:L.filename,"onUpdate:modelValue":p[0]||(p[0]=e=>L.filename=e),placeholder:"请输入文件名",clearable:""},null,8,["modelValue"])]),_:1}),h(k,{label:"工作表名",prop:"sheetname"},{default:g(()=>[h(m,{modelValue:L.sheetname,"onUpdate:modelValue":p[1]||(p[1]=e=>L.sheetname=e),placeholder:"请输入工作表名",clearable:""},null,8,["modelValue"])]),_:1}),h(k,{label:"数据源",prop:"origin"},{default:g(()=>[h(U,{modelValue:L.origin,"onUpdate:modelValue":p[2]||(p[2]=e=>L.origin=e)},{default:g(()=>{var e,l;return[h(R,{label:"当前数据 (当前页的数据)",value:"current",disabled:!(null==(e=c.pageData)?void 0:e.length)},null,8,["value","disabled"]),h(R,{label:"选中数据 (所有选中的数据)",value:"selected",disabled:!(null==(l=c.selectionData)?void 0:l.length)},null,8,["value","disabled"]),h(R,{label:"全量数据 (所有分页的数据)",value:"remote",disabled:!A.contentConfig.exportsAction},null,8,["value","disabled"])]}),_:1},8,["modelValue"])]),_:1}),h(k,{label:"字段",prop:"fields"},{default:g(()=>[h(j,{modelValue:L.fields,"onUpdate:modelValue":p[3]||(p[3]=e=>L.fields=e)},{default:g(()=>[(f(!0),v(b,null,y(M.value,e=>(f(),v(b,{key:e.prop},[e.prop?(f(),x(D,{key:0,value:e.prop,label:e.label},null,8,["value","label"])):V("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])])}}});export{A as _};

View File

@@ -0,0 +1,2 @@
import{v as e,F as a,w as l,x as o,y as t,aq as r,ar as n,aJ as s,aC as d,h as i,E as u}from"./element-plus.BfMFfVUv.js";import{E as p}from"./exceljs.Be_qVvLB.js";import{J as c,ev as m,S as f,_ as h,$ as v,a0 as g,H as b,ay as y,T as x,a8 as V,a1 as w,o as _,a9 as k,ez as C,r as U,ak as R,j,n as E,eA as q}from"./.pnpm.BudmgPu7.js";const D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},A=c({__name:"ExportModal",props:C({contentConfig:{},queryParams:{},pageData:{},selectionData:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c,{expose:C}){const A=c,B=m(c,"modelValue"),F=U(),L=R({filename:"",sheetname:"",fields:[],origin:"current"
/* CURRENT */}),M={fields:[{required:!0,message:"请选择字段"}],origin:[{required:!0,message:"请选择数据源"}]},P=j(()=>A.contentConfig.cols.map(e=>(e.initFn&&e.initFn(e),void 0===e.show&&(e.show=!0),void 0!==e.prop&&void 0===e.columnKey&&void 0===e["column-key"]&&(e.columnKey=e.prop),"selection"===e.type&&void 0===e.reserveSelection&&void 0===e["reserve-selection"]&&(e.reserveSelection=!0),e)));function S(){var e;B.value=!1,null==(e=F.value)||e.resetFields(),E(()=>{var e;null==(e=F.value)||e.clearValidate()})}(()=>{const e=[];P.value.forEach(a=>{void 0!==a.prop&&e.push(a.prop)}),L.fields=e})();const J=q(()=>{var e;null==(e=F.value)||e.validate(e=>{e&&(!function(){try{const e=L.filename?L.filename:A.contentConfig.permPrefix||"export",a=L.sheetname?L.sheetname:"sheet",l=new p.Workbook,o=l.addWorksheet(a),t=[];if(P.value.forEach(e=>{e.label&&e.prop&&L.fields.includes(e.prop)&&t.push({header:e.label,key:e.prop})}),o.columns=t,"remote"===L.origin)if(A.contentConfig.exportsAction){const a=A.queryParams??{};A.contentConfig.exportsAction(a).then(a=>{o.addRows(a),l.xlsx.writeBuffer().then(a=>{K(a,e)}).catch(e=>{u.error("导出远程数据失败")})}).catch(e=>{u.error("获取远程数据失败")})}else u.error("未配置exportsAction");else if("selected"===L.origin){const a=A.selectionData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{K(a,e)}).catch(e=>{u.error("导出选中数据失败")})}else{const a=A.pageData??[];o.addRows(a),l.xlsx.writeBuffer().then(a=>{K(a,e)}).catch(e=>{u.error("导出当前数据失败")})}}catch(e){u.error("导出失败")}}(),S())})},3e3);function K(e,a){try{const l=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),o=window.URL.createObjectURL(l),t=document.createElement("a");t.href=o,t.download=a,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(o)}catch(l){u.error("保存文件失败")}}return C({handleCloseExportsModal:S}),(u,p)=>{const m=t,C=o,U=n,R=r,j=d,E=s,q=l,K=a,O=i,W=e;return f(),h("div",null,[v(W,{modelValue:B.value,"onUpdate:modelValue":p[4]||(p[4]=e=>B.value=e),"align-center":!0,title:"导出数据",width:"600px",style:{"padding-right":"0"},onClose:S},{footer:g(()=>[w("div",D,[v(O,{type:"primary",onClick:_(J)},{default:g(()=>[...p[5]||(p[5]=[k("确 定",-1)])]),_:1},8,["onClick"]),v(O,{onClick:S},{default:g(()=>[...p[6]||(p[6]=[k("取 消",-1)])]),_:1})])]),default:g(()=>[v(K,{"max-height":"60vh"},{default:g(()=>[v(q,{ref_key:"exportsFormRef",ref:F,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:L,rules:M},{default:g(()=>[v(C,{label:"文件名",prop:"filename"},{default:g(()=>[v(m,{modelValue:L.filename,"onUpdate:modelValue":p[0]||(p[0]=e=>L.filename=e),placeholder:"请输入文件名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"工作表名",prop:"sheetname"},{default:g(()=>[v(m,{modelValue:L.sheetname,"onUpdate:modelValue":p[1]||(p[1]=e=>L.sheetname=e),placeholder:"请输入工作表名",clearable:""},null,8,["modelValue"])]),_:1}),v(C,{label:"数据源",prop:"origin"},{default:g(()=>[v(R,{modelValue:L.origin,"onUpdate:modelValue":p[2]||(p[2]=e=>L.origin=e)},{default:g(()=>{var e,a;return[v(U,{label:"当前数据 (当前页的数据)",value:"current",disabled:!(null==(e=c.pageData)?void 0:e.length)},null,8,["value","disabled"]),v(U,{label:"选中数据 (所有选中的数据)",value:"selected",disabled:!(null==(a=c.selectionData)?void 0:a.length)},null,8,["value","disabled"]),v(U,{label:"全量数据 (所有分页的数据)",value:"remote",disabled:!A.contentConfig.exportsAction},null,8,["value","disabled"])]}),_:1},8,["modelValue"])]),_:1}),v(C,{label:"字段",prop:"fields"},{default:g(()=>[v(E,{modelValue:L.fields,"onUpdate:modelValue":p[3]||(p[3]=e=>L.fields=e)},{default:g(()=>[(f(!0),h(b,null,y(P.value,e=>(f(),h(b,{key:e.prop},[e.prop?(f(),x(j,{key:0,value:e.prop,label:e.label},null,8,["value","label"])):V("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])])}}});export{A as _};

View File

@@ -0,0 +1 @@
import{v as e,F as a,w as t,x as l,a1 as o,i,r as d,t as n,h as s,E as p}from"./element-plus.C1XeB8_q.js";import{J as r,ev as u,aO as f,S as c,_ as m,$ as g,a0 as h,a1 as y,a9 as x,aa as w,T as v,a8 as _,ez as T,r as k,ak as b}from"./.pnpm.BudmgPu7.js";const C={class:"el-upload__text"},B={class:"el-upload__tip flex flex-wrap gap-2"},D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},R=r({__name:"ImportModal",props:T({title:{default:"导入数据"},width:{default:"600px"},maxHeight:{default:"60vh"},accept:{default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},limit:{default:1},showTemplateDownload:{type:Boolean,default:!0},dropText:{},browseText:{},templateDownloadText:{},cancelButtonText:{},confirmButtonText:{},note:{default:"注意事项:"},fileTypeWarning:{default:"格式为*.xlsx / *.xls文件不超过 5MB"},uploadFileName:{default:"file"},uploadData:{default:()=>({})},contentConfig:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:T(["import-success","import-fail","close","download-template","upload"],["update:modelValue"]),setup(r,{expose:T,emit:R}){const U=r,L=u(r,"modelValue"),V=R,j=k(null),F=k(null),O=k(!1),E=b({files:[]}),M={files:[{required:!0,message:"文件不能为空",trigger:"blur"}]},W=()=>{p.warning(`只能上传${U.limit}个文件`)};function q(){try{const e=U.contentConfig.importTemplate;"string"==typeof e?window.open(e):"function"==typeof e?e().then(e=>{!function(e,a){const t=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),l=window.URL.createObjectURL(t),o=document.createElement("a");o.href=l,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(l)}(e.data,decodeURI(e.headers["content-disposition"].split(";")[1].split("=")[1]))}):p.error("未配置importTemplate")}catch(e){p.error("下载模板失败")}}const H=async()=>{if(E.files.length)try{O.value=!0;const e=E.files[0].raw,a=new FormData;a.append(U.uploadFileName,e),Object.keys(U.uploadData).forEach(e=>{a.append(e,U.uploadData[e])}),V("upload",a,e)}catch(e){p.error("上传失败:"+e.message||e),V("import-fail",e)}finally{O.value=!1}else p.warning("请选择文件")},I=()=>{E.files.length=0,L.value=!1,V("close")};return T({handleClose:I}),(p,r)=>{const u=f("upload-filled"),T=i,k=d,b=n,R=o,V=l,N=t,$=a,z=s,J=f("Loading"),S=e;return c(),m("div",null,[g(S,{modelValue:L.value,"onUpdate:modelValue":r[1]||(r[1]=e=>L.value=e),"align-center":!0,title:U.title,width:U.width,style:{"padding-right":"0"},onClose:I},{footer:h(()=>[y("div",D,[g(z,{onClick:I},{default:h(()=>[x(w(U.cancelButtonText||"取 消"),1)]),_:1}),g(z,{type:"primary",disabled:0===E.files.length||O.value,onClick:H},{default:h(()=>[O.value?(c(),v(T,{key:0},{default:h(()=>[g(J)]),_:1})):_("",!0),x(" "+w(U.confirmButtonText||"确 定"),1)]),_:1},8,["disabled"])])]),default:h(()=>[g($,{"max-height":U.maxHeight},{default:h(()=>[g(N,{ref_key:"importFormRef",ref:j,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:E,rules:M},{default:h(()=>[g(V,{prop:"files"},{default:h(()=>[g(R,{ref_key:"uploadRef",ref:F,"file-list":E.files,"onUpdate:fileList":r[0]||(r[0]=e=>E.files=e),class:"w-full",accept:U.accept,drag:!0,limit:U.limit,"auto-upload":!1,"on-exceed":W},{tip:h(()=>[y("div",B,[U.note?(c(),v(k,{key:0,type:"warning",class:"mx-1"},{default:h(()=>[x(w(U.note),1)]),_:1})):_("",!0),U.fileTypeWarning?(c(),v(k,{key:1,type:"danger",class:"mx-1"},{default:h(()=>[x(w(U.fileTypeWarning),1)]),_:1})):_("",!0),U.showTemplateDownload?(c(),v(b,{key:2,class:"mx-1",type:"primary",icon:"download",underline:"never",onClick:q},{default:h(()=>[x(w(U.templateDownloadText||"下载模板"),1)]),_:1})):_("",!0)])]),default:h(()=>[g(T,{class:"el-icon--upload"},{default:h(()=>[g(u)]),_:1}),y("div",C,[x(w(U.dropText||"将文件拖到此处,或")+" ",1),y("em",null,w(U.browseText||"点击上传"),1)])]),_:1},8,["file-list","accept","limit"])]),_:1})]),_:1},8,["model"])]),_:1},8,["max-height"])]),_:1},8,["modelValue","title","width"])])}}});export{R as _};

View File

@@ -0,0 +1 @@
import{v as e,F as a,w as t,x as l,a1 as o,i,r as d,t as n,h as s,E as p}from"./element-plus.BQf8a6uP.js";import{J as r,ev as u,aO as f,S as c,_ as m,$ as g,a0 as h,a1 as y,a9 as x,aa as w,T as v,a8 as _,ez as T,r as k,ak as b}from"./.pnpm.BudmgPu7.js";const C={class:"el-upload__text"},B={class:"el-upload__tip flex flex-wrap gap-2"},D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},R=r({__name:"ImportModal",props:T({title:{default:"导入数据"},width:{default:"600px"},maxHeight:{default:"60vh"},accept:{default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},limit:{default:1},showTemplateDownload:{type:Boolean,default:!0},dropText:{},browseText:{},templateDownloadText:{},cancelButtonText:{},confirmButtonText:{},note:{default:"注意事项:"},fileTypeWarning:{default:"格式为*.xlsx / *.xls文件不超过 5MB"},uploadFileName:{default:"file"},uploadData:{default:()=>({})},contentConfig:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:T(["import-success","import-fail","close","download-template","upload"],["update:modelValue"]),setup(r,{expose:T,emit:R}){const U=r,L=u(r,"modelValue"),V=R,j=k(null),F=k(null),O=k(!1),E=b({files:[]}),M={files:[{required:!0,message:"文件不能为空",trigger:"blur"}]},W=()=>{p.warning(`只能上传${U.limit}个文件`)};function q(){try{const e=U.contentConfig.importTemplate;"string"==typeof e?window.open(e):"function"==typeof e?e().then(e=>{!function(e,a){const t=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),l=window.URL.createObjectURL(t),o=document.createElement("a");o.href=l,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(l)}(e.data,decodeURI(e.headers["content-disposition"].split(";")[1].split("=")[1]))}):p.error("未配置importTemplate")}catch(e){p.error("下载模板失败")}}const H=async()=>{if(E.files.length)try{O.value=!0;const e=E.files[0].raw,a=new FormData;a.append(U.uploadFileName,e),Object.keys(U.uploadData).forEach(e=>{a.append(e,U.uploadData[e])}),V("upload",a,e)}catch(e){p.error("上传失败:"+e.message||e),V("import-fail",e)}finally{O.value=!1}else p.warning("请选择文件")},I=()=>{E.files.length=0,L.value=!1,V("close")};return T({handleClose:I}),(p,r)=>{const u=f("upload-filled"),T=i,k=d,b=n,R=o,V=l,N=t,$=a,z=s,J=f("Loading"),S=e;return c(),m("div",null,[g(S,{modelValue:L.value,"onUpdate:modelValue":r[1]||(r[1]=e=>L.value=e),"align-center":!0,title:U.title,width:U.width,style:{"padding-right":"0"},onClose:I},{footer:h(()=>[y("div",D,[g(z,{onClick:I},{default:h(()=>[x(w(U.cancelButtonText||"取 消"),1)]),_:1}),g(z,{type:"primary",disabled:0===E.files.length||O.value,onClick:H},{default:h(()=>[O.value?(c(),v(T,{key:0},{default:h(()=>[g(J)]),_:1})):_("",!0),x(" "+w(U.confirmButtonText||"确 定"),1)]),_:1},8,["disabled"])])]),default:h(()=>[g($,{"max-height":U.maxHeight},{default:h(()=>[g(N,{ref_key:"importFormRef",ref:j,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:E,rules:M},{default:h(()=>[g(V,{prop:"files"},{default:h(()=>[g(R,{ref_key:"uploadRef",ref:F,"file-list":E.files,"onUpdate:fileList":r[0]||(r[0]=e=>E.files=e),class:"w-full",accept:U.accept,drag:!0,limit:U.limit,"auto-upload":!1,"on-exceed":W},{tip:h(()=>[y("div",B,[U.note?(c(),v(k,{key:0,type:"warning",class:"mx-1"},{default:h(()=>[x(w(U.note),1)]),_:1})):_("",!0),U.fileTypeWarning?(c(),v(k,{key:1,type:"danger",class:"mx-1"},{default:h(()=>[x(w(U.fileTypeWarning),1)]),_:1})):_("",!0),U.showTemplateDownload?(c(),v(b,{key:2,class:"mx-1",type:"primary",icon:"download",underline:"never",onClick:q},{default:h(()=>[x(w(U.templateDownloadText||"下载模板"),1)]),_:1})):_("",!0)])]),default:h(()=>[g(T,{class:"el-icon--upload"},{default:h(()=>[g(u)]),_:1}),y("div",C,[x(w(U.dropText||"将文件拖到此处,或")+" ",1),y("em",null,w(U.browseText||"点击上传"),1)])]),_:1},8,["file-list","accept","limit"])]),_:1})]),_:1},8,["model"])]),_:1},8,["max-height"])]),_:1},8,["modelValue","title","width"])])}}});export{R as _};

View File

@@ -0,0 +1 @@
import{v as e,F as a,w as t,x as l,a1 as o,h as i,r as d,t as n,g as s,a as p}from"./element-plus.DhcJM-BD.js";import{o as r,ev as u,aC as f,t as c,H as m,I as g,J as h,K as y,Y as x,Z as w,v,X as _,ez as T,r as k,ac as b}from"./.pnpm.DGfAnZKL.js";const C={class:"el-upload__text"},B={class:"el-upload__tip flex flex-wrap gap-2"},D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},R=r({__name:"ImportModal",props:T({title:{default:"导入数据"},width:{default:"600px"},maxHeight:{default:"60vh"},accept:{default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},limit:{default:1},showTemplateDownload:{type:Boolean,default:!0},dropText:{},browseText:{},templateDownloadText:{},cancelButtonText:{},confirmButtonText:{},note:{default:"注意事项:"},fileTypeWarning:{default:"格式为*.xlsx / *.xls文件不超过 5MB"},uploadFileName:{default:"file"},uploadData:{default:()=>({})},contentConfig:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:T(["import-success","import-fail","close","download-template","upload"],["update:modelValue"]),setup(r,{expose:T,emit:R}){const U=r,L=u(r,"modelValue"),V=R,j=k(null),F=k(null),H=k(!1),I=b({files:[]}),M={files:[{required:!0,message:"文件不能为空",trigger:"blur"}]},O=()=>{p.warning(`只能上传${U.limit}个文件`)};function W(){try{const e=U.contentConfig.importTemplate;"string"==typeof e?window.open(e):"function"==typeof e?e().then(e=>{!function(e,a){const t=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),l=window.URL.createObjectURL(t),o=document.createElement("a");o.href=l,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(l)}(e.data,decodeURI(e.headers["content-disposition"].split(";")[1].split("=")[1]))}):p.error("未配置importTemplate")}catch(e){p.error("下载模板失败")}}const q=async()=>{if(I.files.length)try{H.value=!0;const e=I.files[0].raw,a=new FormData;a.append(U.uploadFileName,e),Object.keys(U.uploadData).forEach(e=>{a.append(e,U.uploadData[e])}),V("upload",a,e)}catch(e){p.error("上传失败:"+e.message||e),V("import-fail",e)}finally{H.value=!1}else p.warning("请选择文件")},E=()=>{I.files.length=0,L.value=!1,V("close")};return T({handleClose:E}),(p,r)=>{const u=f("upload-filled"),T=i,k=d,b=n,R=o,V=l,N=t,z=a,J=s,K=f("Loading"),X=e;return c(),m("div",null,[g(X,{modelValue:L.value,"onUpdate:modelValue":r[1]||(r[1]=e=>L.value=e),"align-center":!0,title:U.title,width:U.width,style:{"padding-right":"0"},onClose:E},{footer:h(()=>[y("div",D,[g(J,{onClick:E},{default:h(()=>[x(w(U.cancelButtonText||"取 消"),1)]),_:1}),g(J,{type:"primary",disabled:0===I.files.length||H.value,onClick:q},{default:h(()=>[H.value?(c(),v(T,{key:0},{default:h(()=>[g(K)]),_:1})):_("",!0),x(" "+w(U.confirmButtonText||"确 定"),1)]),_:1},8,["disabled"])])]),default:h(()=>[g(z,{"max-height":U.maxHeight},{default:h(()=>[g(N,{ref_key:"importFormRef",ref:j,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:I,rules:M},{default:h(()=>[g(V,{prop:"files"},{default:h(()=>[g(R,{ref_key:"uploadRef",ref:F,"file-list":I.files,"onUpdate:fileList":r[0]||(r[0]=e=>I.files=e),class:"w-full",accept:U.accept,drag:!0,limit:U.limit,"auto-upload":!1,"on-exceed":O},{tip:h(()=>[y("div",B,[U.note?(c(),v(k,{key:0,type:"warning",class:"mx-1"},{default:h(()=>[x(w(U.note),1)]),_:1})):_("",!0),U.fileTypeWarning?(c(),v(k,{key:1,type:"danger",class:"mx-1"},{default:h(()=>[x(w(U.fileTypeWarning),1)]),_:1})):_("",!0),U.showTemplateDownload?(c(),v(b,{key:2,class:"mx-1",type:"primary",icon:"download",underline:"never",onClick:W},{default:h(()=>[x(w(U.templateDownloadText||"下载模板"),1)]),_:1})):_("",!0)])]),default:h(()=>[g(T,{class:"el-icon--upload"},{default:h(()=>[g(u)]),_:1}),y("div",C,[x(w(U.dropText||"将文件拖到此处,或")+" ",1),y("em",null,w(U.browseText||"点击上传"),1)])]),_:1},8,["file-list","accept","limit"])]),_:1})]),_:1},8,["model"])]),_:1},8,["max-height"])]),_:1},8,["modelValue","title","width"])])}}});export{R as _};

View File

@@ -0,0 +1 @@
import{v as e,F as a,w as t,x as l,a1 as o,i,r as d,t as n,h as s,E as p}from"./element-plus.BfMFfVUv.js";import{J as r,ev as u,aO as f,S as c,_ as m,$ as g,a0 as h,a1 as y,a9 as x,aa as w,T as v,a8 as _,ez as T,r as k,ak as b}from"./.pnpm.BudmgPu7.js";const C={class:"el-upload__text"},B={class:"el-upload__tip flex flex-wrap gap-2"},D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},R=r({__name:"ImportModal",props:T({title:{default:"导入数据"},width:{default:"600px"},maxHeight:{default:"60vh"},accept:{default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},limit:{default:1},showTemplateDownload:{type:Boolean,default:!0},dropText:{},browseText:{},templateDownloadText:{},cancelButtonText:{},confirmButtonText:{},note:{default:"注意事项:"},fileTypeWarning:{default:"格式为*.xlsx / *.xls文件不超过 5MB"},uploadFileName:{default:"file"},uploadData:{default:()=>({})},contentConfig:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:T(["import-success","import-fail","close","download-template","upload"],["update:modelValue"]),setup(r,{expose:T,emit:R}){const U=r,L=u(r,"modelValue"),V=R,j=k(null),F=k(null),O=k(!1),E=b({files:[]}),M={files:[{required:!0,message:"文件不能为空",trigger:"blur"}]},W=()=>{p.warning(`只能上传${U.limit}个文件`)};function q(){try{const e=U.contentConfig.importTemplate;"string"==typeof e?window.open(e):"function"==typeof e?e().then(e=>{!function(e,a){const t=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),l=window.URL.createObjectURL(t),o=document.createElement("a");o.href=l,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(l)}(e.data,decodeURI(e.headers["content-disposition"].split(";")[1].split("=")[1]))}):p.error("未配置importTemplate")}catch(e){p.error("下载模板失败")}}const H=async()=>{if(E.files.length)try{O.value=!0;const e=E.files[0].raw,a=new FormData;a.append(U.uploadFileName,e),Object.keys(U.uploadData).forEach(e=>{a.append(e,U.uploadData[e])}),V("upload",a,e)}catch(e){p.error("上传失败:"+e.message||e),V("import-fail",e)}finally{O.value=!1}else p.warning("请选择文件")},I=()=>{E.files.length=0,L.value=!1,V("close")};return T({handleClose:I}),(p,r)=>{const u=f("upload-filled"),T=i,k=d,b=n,R=o,V=l,N=t,$=a,z=s,J=f("Loading"),S=e;return c(),m("div",null,[g(S,{modelValue:L.value,"onUpdate:modelValue":r[1]||(r[1]=e=>L.value=e),"align-center":!0,title:U.title,width:U.width,style:{"padding-right":"0"},onClose:I},{footer:h(()=>[y("div",D,[g(z,{onClick:I},{default:h(()=>[x(w(U.cancelButtonText||"取 消"),1)]),_:1}),g(z,{type:"primary",disabled:0===E.files.length||O.value,onClick:H},{default:h(()=>[O.value?(c(),v(T,{key:0},{default:h(()=>[g(J)]),_:1})):_("",!0),x(" "+w(U.confirmButtonText||"确 定"),1)]),_:1},8,["disabled"])])]),default:h(()=>[g($,{"max-height":U.maxHeight},{default:h(()=>[g(N,{ref_key:"importFormRef",ref:j,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:E,rules:M},{default:h(()=>[g(V,{prop:"files"},{default:h(()=>[g(R,{ref_key:"uploadRef",ref:F,"file-list":E.files,"onUpdate:fileList":r[0]||(r[0]=e=>E.files=e),class:"w-full",accept:U.accept,drag:!0,limit:U.limit,"auto-upload":!1,"on-exceed":W},{tip:h(()=>[y("div",B,[U.note?(c(),v(k,{key:0,type:"warning",class:"mx-1"},{default:h(()=>[x(w(U.note),1)]),_:1})):_("",!0),U.fileTypeWarning?(c(),v(k,{key:1,type:"danger",class:"mx-1"},{default:h(()=>[x(w(U.fileTypeWarning),1)]),_:1})):_("",!0),U.showTemplateDownload?(c(),v(b,{key:2,class:"mx-1",type:"primary",icon:"download",underline:"never",onClick:q},{default:h(()=>[x(w(U.templateDownloadText||"下载模板"),1)]),_:1})):_("",!0)])]),default:h(()=>[g(T,{class:"el-icon--upload"},{default:h(()=>[g(u)]),_:1}),y("div",C,[x(w(U.dropText||"将文件拖到此处,或")+" ",1),y("em",null,w(U.browseText||"点击上传"),1)])]),_:1},8,["file-list","accept","limit"])]),_:1})]),_:1},8,["model"])]),_:1},8,["max-height"])]),_:1},8,["modelValue","title","width"])])}}});export{R as _};

View File

@@ -0,0 +1 @@
import{v as e,F as a,w as t,x as l,a1 as o,i,r as d,t as n,h as s,E as p}from"./element-plus.sfqR2v8u.js";import{J as r,ev as u,aO as f,S as c,_ as m,$ as g,a0 as h,a1 as y,a9 as x,aa as w,T as v,a8 as _,ez as T,r as k,ak as b}from"./.pnpm.BudmgPu7.js";const C={class:"el-upload__text"},B={class:"el-upload__tip flex flex-wrap gap-2"},D={style:{"padding-right":"var(--el-dialog-padding-primary)"}},R=r({__name:"ImportModal",props:T({title:{default:"导入数据"},width:{default:"600px"},maxHeight:{default:"60vh"},accept:{default:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},limit:{default:1},showTemplateDownload:{type:Boolean,default:!0},dropText:{},browseText:{},templateDownloadText:{},cancelButtonText:{},confirmButtonText:{},note:{default:"注意事项:"},fileTypeWarning:{default:"格式为*.xlsx / *.xls文件不超过 5MB"},uploadFileName:{default:"file"},uploadData:{default:()=>({})},contentConfig:{}},{modelValue:{type:Boolean,required:!0,default:!1},modelModifiers:{}}),emits:T(["import-success","import-fail","close","download-template","upload"],["update:modelValue"]),setup(r,{expose:T,emit:R}){const U=r,L=u(r,"modelValue"),V=R,j=k(null),F=k(null),O=k(!1),E=b({files:[]}),M={files:[{required:!0,message:"文件不能为空",trigger:"blur"}]},W=()=>{p.warning(`只能上传${U.limit}个文件`)};function q(){try{const e=U.contentConfig.importTemplate;"string"==typeof e?window.open(e):"function"==typeof e?e().then(e=>{!function(e,a){const t=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),l=window.URL.createObjectURL(t),o=document.createElement("a");o.href=l,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(l)}(e.data,decodeURI(e.headers["content-disposition"].split(";")[1].split("=")[1]))}):p.error("未配置importTemplate")}catch(e){p.error("下载模板失败")}}const H=async()=>{if(E.files.length)try{O.value=!0;const e=E.files[0].raw,a=new FormData;a.append(U.uploadFileName,e),Object.keys(U.uploadData).forEach(e=>{a.append(e,U.uploadData[e])}),V("upload",a,e)}catch(e){p.error("上传失败:"+e.message||e),V("import-fail",e)}finally{O.value=!1}else p.warning("请选择文件")},I=()=>{E.files.length=0,L.value=!1,V("close")};return T({handleClose:I}),(p,r)=>{const u=f("upload-filled"),T=i,k=d,b=n,R=o,V=l,N=t,$=a,z=s,J=f("Loading"),S=e;return c(),m("div",null,[g(S,{modelValue:L.value,"onUpdate:modelValue":r[1]||(r[1]=e=>L.value=e),"align-center":!0,title:U.title,width:U.width,style:{"padding-right":"0"},onClose:I},{footer:h(()=>[y("div",D,[g(z,{onClick:I},{default:h(()=>[x(w(U.cancelButtonText||"取 消"),1)]),_:1}),g(z,{type:"primary",disabled:0===E.files.length||O.value,onClick:H},{default:h(()=>[O.value?(c(),v(T,{key:0},{default:h(()=>[g(J)]),_:1})):_("",!0),x(" "+w(U.confirmButtonText||"确 定"),1)]),_:1},8,["disabled"])])]),default:h(()=>[g($,{"max-height":U.maxHeight},{default:h(()=>[g(N,{ref_key:"importFormRef",ref:j,style:{"padding-right":"var(--el-dialog-padding-primary)"},model:E,rules:M},{default:h(()=>[g(V,{prop:"files"},{default:h(()=>[g(R,{ref_key:"uploadRef",ref:F,"file-list":E.files,"onUpdate:fileList":r[0]||(r[0]=e=>E.files=e),class:"w-full",accept:U.accept,drag:!0,limit:U.limit,"auto-upload":!1,"on-exceed":W},{tip:h(()=>[y("div",B,[U.note?(c(),v(k,{key:0,type:"warning",class:"mx-1"},{default:h(()=>[x(w(U.note),1)]),_:1})):_("",!0),U.fileTypeWarning?(c(),v(k,{key:1,type:"danger",class:"mx-1"},{default:h(()=>[x(w(U.fileTypeWarning),1)]),_:1})):_("",!0),U.showTemplateDownload?(c(),v(b,{key:2,class:"mx-1",type:"primary",icon:"download",underline:"never",onClick:q},{default:h(()=>[x(w(U.templateDownloadText||"下载模板"),1)]),_:1})):_("",!0)])]),default:h(()=>[g(T,{class:"el-icon--upload"},{default:h(()=>[g(u)]),_:1}),y("div",C,[x(w(U.dropText||"将文件拖到此处,或")+" ",1),y("em",null,w(U.browseText||"点击上传"),1)])]),_:1},8,["file-list","accept","limit"])]),_:1})]),_:1},8,["model"])]),_:1},8,["max-height"])]),_:1},8,["modelValue","title","width"])])}}});export{R as _};

View File

@@ -0,0 +1,256 @@
import { v as ElDialog, F as ElScrollbar, w as ElForm, x as ElFormItem, a1 as ElUpload, i as ElIcon, r as ElText, t as ElLink, h as ElButton, E as ElMessage } from "./element-plus.CkEW9frc.js";
import { J as defineComponent, ev as useModel, aO as resolveComponent, S as openBlock, _ as createElementBlock, $ as createVNode, a0 as withCtx, a1 as createBaseVNode, a9 as createTextVNode, aa as toDisplayString, T as createBlock, a8 as createCommentVNode, ez as mergeModels, r as ref, ak as reactive } from "./.pnpm.BW3P1y8f.js";
const _hoisted_1 = { class: "el-upload__text" };
const _hoisted_2 = { class: "el-upload__tip flex flex-wrap gap-2" };
const _hoisted_3 = { style: { "padding-right": "var(--el-dialog-padding-primary)" } };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ImportModal",
props: /* @__PURE__ */ mergeModels({
title: { default: "导入数据" },
width: { default: "600px" },
maxHeight: { default: "60vh" },
accept: { default: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" },
limit: { default: 1 },
showTemplateDownload: { type: Boolean, default: true },
dropText: {},
browseText: {},
templateDownloadText: {},
cancelButtonText: {},
confirmButtonText: {},
note: { default: "注意事项:" },
fileTypeWarning: { default: "格式为*.xlsx / *.xls文件不超过 5MB" },
uploadFileName: { default: "file" },
uploadData: { default: () => ({}) },
contentConfig: {}
}, {
"modelValue": { type: Boolean, ...{
required: true,
default: false
} },
"modelModifiers": {}
}),
emits: /* @__PURE__ */ mergeModels(["import-success", "import-fail", "close", "download-template", "upload"], ["update:modelValue"]),
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const importModalVisible = useModel(__props, "modelValue");
const emit = __emit;
const importFormRef = ref(null);
const uploadRef = ref(null);
const loading = ref(false);
const importFormData = reactive({
files: []
});
const importFormRules = {
files: [{ required: true, message: "文件不能为空", trigger: "blur" }]
};
const handleFileExceed = () => {
ElMessage.warning(`只能上传${props.limit}个文件`);
};
function saveXlsx(fileData, fileName) {
const fileType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8";
const blob = new Blob([fileData], { type: fileType });
const downloadUrl = window.URL.createObjectURL(blob);
const downloadLink = document.createElement("a");
downloadLink.href = downloadUrl;
downloadLink.download = fileName;
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
window.URL.revokeObjectURL(downloadUrl);
}
function handleDownloadTemplate() {
try {
const importTemplate = props.contentConfig.importTemplate;
if (typeof importTemplate === "string") {
window.open(importTemplate);
} else if (typeof importTemplate === "function") {
importTemplate().then((response) => {
const fileData = response.data;
const fileName = decodeURI(
response.headers["content-disposition"].split(";")[1].split("=")[1]
);
saveXlsx(fileData, fileName);
});
} else {
ElMessage.error("未配置importTemplate");
}
} catch (error) {
console.error("下载模板失败:", error);
ElMessage.error("下载模板失败");
}
}
const handleUpload = async () => {
if (!importFormData.files.length) {
ElMessage.warning("请选择文件");
return;
}
try {
loading.value = true;
const file = importFormData.files[0].raw;
const formData = new FormData();
formData.append(props.uploadFileName, file);
Object.keys(props.uploadData).forEach((key) => {
formData.append(key, props.uploadData[key]);
});
emit("upload", formData, file);
} catch (error) {
console.error("上传失败:", error);
ElMessage.error("上传失败:" + error.message || error);
emit("import-fail", error);
} finally {
loading.value = false;
}
};
const handleClose = () => {
importFormData.files.length = 0;
importModalVisible.value = false;
emit("close");
};
__expose({
handleClose
});
return (_ctx, _cache) => {
const _component_upload_filled = resolveComponent("upload-filled");
const _component_el_icon = ElIcon;
const _component_el_text = ElText;
const _component_el_link = ElLink;
const _component_el_upload = ElUpload;
const _component_el_form_item = ElFormItem;
const _component_el_form = ElForm;
const _component_el_scrollbar = ElScrollbar;
const _component_el_button = ElButton;
const _component_Loading = resolveComponent("Loading");
const _component_el_dialog = ElDialog;
return openBlock(), createElementBlock("div", null, [
createVNode(_component_el_dialog, {
modelValue: importModalVisible.value,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => importModalVisible.value = $event),
"align-center": true,
title: props.title,
width: props.width,
style: { "padding-right": "0" },
onClose: handleClose
}, {
footer: withCtx(() => [
createBaseVNode("div", _hoisted_3, [
createVNode(_component_el_button, { onClick: handleClose }, {
default: withCtx(() => [
createTextVNode(toDisplayString(props.cancelButtonText || "取 消"), 1)
]),
_: 1
}),
createVNode(_component_el_button, {
type: "primary",
disabled: importFormData.files.length === 0 || loading.value,
onClick: handleUpload
}, {
default: withCtx(() => [
loading.value ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
default: withCtx(() => [
createVNode(_component_Loading)
]),
_: 1
})) : createCommentVNode("", true),
createTextVNode(" " + toDisplayString(props.confirmButtonText || "确 定"), 1)
]),
_: 1
}, 8, ["disabled"])
])
]),
default: withCtx(() => [
createVNode(_component_el_scrollbar, {
"max-height": props.maxHeight
}, {
default: withCtx(() => [
createVNode(_component_el_form, {
ref_key: "importFormRef",
ref: importFormRef,
style: { "padding-right": "var(--el-dialog-padding-primary)" },
model: importFormData,
rules: importFormRules
}, {
default: withCtx(() => [
createVNode(_component_el_form_item, { prop: "files" }, {
default: withCtx(() => [
createVNode(_component_el_upload, {
ref_key: "uploadRef",
ref: uploadRef,
"file-list": importFormData.files,
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => importFormData.files = $event),
class: "w-full",
accept: props.accept,
drag: true,
limit: props.limit,
"auto-upload": false,
"on-exceed": handleFileExceed
}, {
tip: withCtx(() => [
createBaseVNode("div", _hoisted_2, [
props.note ? (openBlock(), createBlock(_component_el_text, {
key: 0,
type: "warning",
class: "mx-1"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(props.note), 1)
]),
_: 1
})) : createCommentVNode("", true),
props.fileTypeWarning ? (openBlock(), createBlock(_component_el_text, {
key: 1,
type: "danger",
class: "mx-1"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(props.fileTypeWarning), 1)
]),
_: 1
})) : createCommentVNode("", true),
props.showTemplateDownload ? (openBlock(), createBlock(_component_el_link, {
key: 2,
class: "mx-1",
type: "primary",
icon: "download",
underline: "never",
onClick: handleDownloadTemplate
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(props.templateDownloadText || "下载模板"), 1)
]),
_: 1
})) : createCommentVNode("", true)
])
]),
default: withCtx(() => [
createVNode(_component_el_icon, { class: "el-icon--upload" }, {
default: withCtx(() => [
createVNode(_component_upload_filled)
]),
_: 1
}),
createBaseVNode("div", _hoisted_1, [
createTextVNode(toDisplayString(props.dropText || "将文件拖到此处,或") + " ", 1),
createBaseVNode("em", null, toDisplayString(props.browseText || "点击上传"), 1)
])
]),
_: 1
}, 8, ["file-list", "accept", "limit"])
]),
_: 1
})
]),
_: 1
}, 8, ["model"])
]),
_: 1
}, 8, ["max-height"])
]),
_: 1
}, 8, ["modelValue", "title", "width"])
]);
};
}
});
export {
_sfc_main as _
};

View File

@@ -0,0 +1 @@
import{i as a,a7 as e}from"./element-plus.BfMFfVUv.js";import{J as s,m as t,t as r,n as l,_ as i,a1 as n,o as u,$ as p,a0 as o,a8 as f,dZ as d,r as c,j as m,S as v}from"./.pnpm.BudmgPu7.js";import{g as h}from"./index.CjKO7M_A.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.BdleaLZh.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},j=["src"],V={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=d(),w=h(),g=c(),P=c(!0),x=m(()=>y.query.url),A=m(()=>y.query.appName);function I(){P.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(P.value=!0,g.value.src=a)}),r(()=>{A.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==A.value&&w.updateVisitedView({...a,title:A.value,fullPath:y.fullPath,query:y.query})})}),t(()=>A.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(x),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:I},null,40,j),u(P)?(v(),i("div",V,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):f("",!0)])])}}}),[["__scopeId","data-v-f92c86f7"]]);export{w as default};

View File

@@ -0,0 +1,99 @@
import { i as ElIcon, a7 as loading_default } from "./element-plus.CkEW9frc.js";
import { J as defineComponent, m as watch, t as onMounted, n as nextTick, _ as createElementBlock, a1 as createBaseVNode, o as unref, $ as createVNode, a0 as withCtx, a8 as createCommentVNode, dZ as useRoute, r as ref, j as computed, S as openBlock } from "./.pnpm.BW3P1y8f.js";
import { g as useTagsViewStore } from "./index.CMd5bD1r.js";
import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js";
import "./codemirror.CvJAcn2d.js";
const _hoisted_1 = { class: "internal-app-container" };
const _hoisted_2 = { class: "internal-app-content" };
const _hoisted_3 = ["src"];
const _hoisted_4 = {
key: 0,
class: "loading-overlay"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
...{
name: "InternalApp",
inheritAttrs: false
},
__name: "InternalApp",
setup(__props) {
const route = useRoute();
const tagsViewStore = useTagsViewStore();
const iframeRef = ref();
const loading = ref(true);
const appUrl = computed(() => route.query.url);
const appName = computed(() => route.query.appName);
function handleIframeLoad() {
loading.value = false;
}
watch(
() => route.query.url,
(newUrl) => {
if (newUrl && iframeRef.value) {
loading.value = true;
iframeRef.value.src = newUrl;
}
}
);
onMounted(() => {
if (appName.value) {
nextTick(() => {
const currentTag = tagsViewStore.visitedViews.find((tag) => tag.path === route.path);
if (currentTag && currentTag.title !== appName.value) {
tagsViewStore.updateVisitedView({
...currentTag,
title: appName.value,
fullPath: route.fullPath,
query: route.query
});
}
});
}
});
watch(
() => appName.value,
(newAppName) => {
if (newAppName) {
const currentTag = tagsViewStore.visitedViews.find((tag) => tag.path === route.path);
if (currentTag) {
tagsViewStore.updateVisitedView({
...currentTag,
title: newAppName,
fullPath: route.fullPath,
query: route.query
});
}
}
}
);
return (_ctx, _cache) => {
const _component_el_icon = ElIcon;
return openBlock(), createElementBlock("div", _hoisted_1, [
createBaseVNode("div", _hoisted_2, [
createBaseVNode("iframe", {
ref_key: "iframeRef",
ref: iframeRef,
src: unref(appUrl),
class: "internal-app-iframe",
frameborder: "0",
allowfullscreen: "",
onLoad: handleIframeLoad
}, null, 40, _hoisted_3),
unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_4, [
createVNode(_component_el_icon, { class: "loading-icon" }, {
default: withCtx(() => [
createVNode(unref(loading_default))
]),
_: 1
}),
_cache[0] || (_cache[0] = createBaseVNode("span", null, "加载中...", -1))
])) : createCommentVNode("", true)
])
]);
};
}
});
const InternalApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f92c86f7"]]);
export {
InternalApp as default
};

View File

@@ -0,0 +1 @@
import{h as a,a7 as e}from"./element-plus.DhcJM-BD.js";import{o as s,A as t,B as r,D as l,H as i,K as n,u,I as p,J as o,X as d,dZ as f,r as c,c as m,t as v}from"./.pnpm.DGfAnZKL.js";import{g as h}from"./index.BPA2kTd2.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.CR5zRbyM.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},V=["src"],j={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=f(),w=h(),g=c(),A=c(!0),I=m(()=>y.query.url),P=m(()=>y.query.appName);function b(){A.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(A.value=!0,g.value.src=a)}),r(()=>{P.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==P.value&&w.updateVisitedView({...a,title:P.value,fullPath:y.fullPath,query:y.query})})}),t(()=>P.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(I),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:b},null,40,V),u(A)?(v(),i("div",j,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):d("",!0)])])}}}),[["__scopeId","data-v-0b2eb54d"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{h as a,a7 as e}from"./element-plus.DhcJM-BD.js";import{o as s,A as t,B as r,D as l,H as i,K as n,u,I as p,J as o,X as d,dZ as f,r as c,c as m,t as v}from"./.pnpm.DGfAnZKL.js";import{g as h}from"./index.D0FKZcEF.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.CR5zRbyM.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},V=["src"],j={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=f(),w=h(),g=c(),A=c(!0),I=m(()=>y.query.url),P=m(()=>y.query.appName);function b(){A.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(A.value=!0,g.value.src=a)}),r(()=>{P.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==P.value&&w.updateVisitedView({...a,title:P.value,fullPath:y.fullPath,query:y.query})})}),t(()=>P.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(I),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:b},null,40,V),u(A)?(v(),i("div",j,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):d("",!0)])])}}}),[["__scopeId","data-v-0b2eb54d"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{h as a,a7 as e}from"./element-plus.DhcJM-BD.js";import{o as s,A as t,B as r,D as l,H as i,K as n,u,I as p,J as o,X as d,dZ as f,r as c,c as m,t as v}from"./.pnpm.DGfAnZKL.js";import{g as h}from"./index.Ch_NPM5t.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.CR5zRbyM.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},V=["src"],j={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=f(),w=h(),g=c(),A=c(!0),I=m(()=>y.query.url),P=m(()=>y.query.appName);function b(){A.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(A.value=!0,g.value.src=a)}),r(()=>{P.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==P.value&&w.updateVisitedView({...a,title:P.value,fullPath:y.fullPath,query:y.query})})}),t(()=>P.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(I),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:b},null,40,V),u(A)?(v(),i("div",j,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):d("",!0)])])}}}),[["__scopeId","data-v-0b2eb54d"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{i as a,a7 as e}from"./element-plus.BfMFfVUv.js";import{J as s,m as t,t as r,n as l,_ as i,a1 as n,o as u,$ as p,a0 as o,a8 as f,dZ as d,r as c,j as m,S as v}from"./.pnpm.BudmgPu7.js";import{g as h}from"./index.CCGY9CCJ.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.BdleaLZh.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},j=["src"],V={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=d(),w=h(),g=c(),P=c(!0),x=m(()=>y.query.url),A=m(()=>y.query.appName);function I(){P.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(P.value=!0,g.value.src=a)}),r(()=>{A.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==A.value&&w.updateVisitedView({...a,title:A.value,fullPath:y.fullPath,query:y.query})})}),t(()=>A.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(x),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:I},null,40,j),u(P)?(v(),i("div",V,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):f("",!0)])])}}}),[["__scopeId","data-v-f92c86f7"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{i as a,a7 as e}from"./element-plus.BQf8a6uP.js";import{J as s,m as t,t as r,n as l,_ as i,a1 as n,o as u,$ as p,a0 as o,a8 as f,dZ as d,r as c,j as m,S as v}from"./.pnpm.BudmgPu7.js";import{g as h}from"./index.DW5SWAAE.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.BdleaLZh.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},j=["src"],V={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=d(),w=h(),g=c(),P=c(!0),x=m(()=>y.query.url),A=m(()=>y.query.appName);function I(){P.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(P.value=!0,g.value.src=a)}),r(()=>{A.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==A.value&&w.updateVisitedView({...a,title:A.value,fullPath:y.fullPath,query:y.query})})}),t(()=>A.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(x),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:I},null,40,j),u(P)?(v(),i("div",V,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):f("",!0)])])}}}),[["__scopeId","data-v-f92c86f7"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{i as a,a7 as e}from"./element-plus.C1XeB8_q.js";import{J as s,m as t,t as r,n as l,_ as i,a1 as n,o as u,$ as p,a0 as o,a8 as f,dZ as d,r as c,j as m,S as v}from"./.pnpm.BudmgPu7.js";import{g as _}from"./index.DvZY56Zp.js";import{_ as h}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.BdleaLZh.js";const y={class:"internal-app-container"},q={class:"internal-app-content"},j=["src"],V={key:0,class:"loading-overlay"},w=h(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const h=d(),w=_(),g=c(),P=c(!0),x=m(()=>h.query.url),A=m(()=>h.query.appName);function I(){P.value=!1}return t(()=>h.query.url,a=>{a&&g.value&&(P.value=!0,g.value.src=a)}),r(()=>{A.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===h.path);a&&a.title!==A.value&&w.updateVisitedView({...a,title:A.value,fullPath:h.fullPath,query:h.query})})}),t(()=>A.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===h.path);e&&w.updateVisitedView({...e,title:a,fullPath:h.fullPath,query:h.query})}}),(s,t)=>{const r=a;return v(),i("div",y,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(x),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:I},null,40,j),u(P)?(v(),i("div",V,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):f("",!0)])])}}}),[["__scopeId","data-v-f92c86f7"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{i as a,a7 as e}from"./element-plus.sfqR2v8u.js";import{J as s,m as t,t as r,n as l,_ as i,a1 as n,o as u,$ as p,a0 as o,a8 as f,dZ as d,r as c,j as m,S as v}from"./.pnpm.BudmgPu7.js";import{g as h}from"./index.BY9tP75-.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.BdleaLZh.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},j=["src"],V={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=d(),w=h(),g=c(),P=c(!0),x=m(()=>y.query.url),A=m(()=>y.query.appName);function I(){P.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(P.value=!0,g.value.src=a)}),r(()=>{A.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==A.value&&w.updateVisitedView({...a,title:A.value,fullPath:y.fullPath,query:y.query})})}),t(()=>A.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(x),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:I},null,40,j),u(P)?(v(),i("div",V,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):f("",!0)])])}}}),[["__scopeId","data-v-f92c86f7"]]);export{w as default};

View File

@@ -0,0 +1 @@
import{i as a,a7 as e}from"./element-plus.C1XeB8_q.js";import{J as s,m as t,t as r,n as l,_ as i,a1 as n,o as u,$ as p,a0 as o,a8 as f,dZ as d,r as c,j as m,S as v}from"./.pnpm.BudmgPu7.js";import{g as h}from"./index.Cvigsp8N.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./codemirror.BdleaLZh.js";const _={class:"internal-app-container"},q={class:"internal-app-content"},j=["src"],V={key:0,class:"loading-overlay"},w=y(s({name:"InternalApp",inheritAttrs:!1,__name:"InternalApp",setup(s){const y=d(),w=h(),g=c(),P=c(!0),x=m(()=>y.query.url),A=m(()=>y.query.appName);function I(){P.value=!1}return t(()=>y.query.url,a=>{a&&g.value&&(P.value=!0,g.value.src=a)}),r(()=>{A.value&&l(()=>{const a=w.visitedViews.find(a=>a.path===y.path);a&&a.title!==A.value&&w.updateVisitedView({...a,title:A.value,fullPath:y.fullPath,query:y.query})})}),t(()=>A.value,a=>{if(a){const e=w.visitedViews.find(a=>a.path===y.path);e&&w.updateVisitedView({...e,title:a,fullPath:y.fullPath,query:y.query})}}),(s,t)=>{const r=a;return v(),i("div",_,[n("div",q,[n("iframe",{ref_key:"iframeRef",ref:g,src:u(x),class:"internal-app-iframe",frameborder:"0",allowfullscreen:"",onLoad:I},null,40,j),u(P)?(v(),i("div",V,[p(r,{class:"loading-icon"},{default:o(()=>[p(u(e))]),_:1}),t[0]||(t[0]=n("span",null,"加载中...",-1))])):f("",!0)])])}}}),[["__scopeId","data-v-f92c86f7"]]);export{w as default};

Some files were not shown because too many files have changed in this diff Show More