@slice_cy/mint 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +697 -0
  2. package/app/common/base-response.js +10 -0
  3. package/app/common/business-error.js +10 -0
  4. package/app/common/error-code.js +22 -0
  5. package/app/common/return-utils.js +40 -0
  6. package/app/common/router-schema-validator.js +25 -0
  7. package/app/controller/base.js +24 -0
  8. package/app/controller/project.js +90 -0
  9. package/app/controller/view.js +13 -0
  10. package/app/docs/dsl-doc.js +148 -0
  11. package/app/extend/logger.js +30 -0
  12. package/app/extend/params-valid.js +6 -0
  13. package/app/extend/return-utils.js +9 -0
  14. package/app/middleware/api-sign-verify.js +25 -0
  15. package/app/middleware/err-handler.js +18 -0
  16. package/app/middleware/project-handler.js +25 -0
  17. package/app/pages/boot.js +34 -0
  18. package/app/pages/dashboard/complex-view/header-view/index.vue +108 -0
  19. package/app/pages/dashboard/complex-view/iframe-view/index.vue +37 -0
  20. package/app/pages/dashboard/complex-view/schema-view/complex-view/search-panel/index.vue +36 -0
  21. package/app/pages/dashboard/complex-view/schema-view/complex-view/table-panel/index.vue +123 -0
  22. package/app/pages/dashboard/complex-view/schema-view/components/component-config.js +14 -0
  23. package/app/pages/dashboard/complex-view/schema-view/components/createForm/index.vue +72 -0
  24. package/app/pages/dashboard/complex-view/schema-view/components/detailPanel/index.vue +52 -0
  25. package/app/pages/dashboard/complex-view/schema-view/components/editForm/index.vue +87 -0
  26. package/app/pages/dashboard/complex-view/schema-view/hook/use-schema.js +113 -0
  27. package/app/pages/dashboard/complex-view/schema-view/index.vue +114 -0
  28. package/app/pages/dashboard/complex-view/sider-view/index.vue +116 -0
  29. package/app/pages/dashboard/entry.dashboard.js +44 -0
  30. package/app/pages/dashboard/index.vue +60 -0
  31. package/app/pages/service/index.js +70 -0
  32. package/app/pages/store/index.js +4 -0
  33. package/app/pages/store/menu.js +86 -0
  34. package/app/pages/store/project.js +9 -0
  35. package/app/pages/utils/index.js +26 -0
  36. package/app/pages/widgets/header-container/assets/avatar.png +0 -0
  37. package/app/pages/widgets/header-container/assets/icon.png +0 -0
  38. package/app/pages/widgets/header-container/index.vue +108 -0
  39. package/app/pages/widgets/schema-form/components/input/index.vue +155 -0
  40. package/app/pages/widgets/schema-form/components/input-number/index.vue +148 -0
  41. package/app/pages/widgets/schema-form/components/select/index.vue +132 -0
  42. package/app/pages/widgets/schema-form/form-item-cofnig.js +18 -0
  43. package/app/pages/widgets/schema-form/index.vue +137 -0
  44. package/app/pages/widgets/schema-search-bar/component/date-range-picker/index.vue +55 -0
  45. package/app/pages/widgets/schema-search-bar/component/dynamic-select/index.vue +70 -0
  46. package/app/pages/widgets/schema-search-bar/component/input/index.vue +54 -0
  47. package/app/pages/widgets/schema-search-bar/component/select/index.vue +65 -0
  48. package/app/pages/widgets/schema-search-bar/index.vue +143 -0
  49. package/app/pages/widgets/schema-search-bar/search-item-config.js +20 -0
  50. package/app/pages/widgets/schema-table/index.vue +198 -0
  51. package/app/pages/widgets/sider-container/index.vue +30 -0
  52. package/app/post-router.js +9 -0
  53. package/app/pre-middleware.js +37 -0
  54. package/app/public/dist/entry.dashboard.tpl +2 -0
  55. package/app/public/dist/entry.project-list.tpl +2 -0
  56. package/app/public/dist/prod/css/async.609.bcbe5779.css +1 -0
  57. package/app/public/dist/prod/css/async.952.9bc7c180.css +1 -0
  58. package/app/public/dist/prod/css/common.1a98227b.css +1 -0
  59. package/app/public/dist/prod/css/entry.project-list.14f64dd9.css +1 -0
  60. package/app/public/dist/prod/js/142.56646c73.bundle.js +1 -0
  61. package/app/public/dist/prod/js/609.8270b20d.bundle.js +1 -0
  62. package/app/public/dist/prod/js/68.2813fafe.bundle.js +1 -0
  63. package/app/public/dist/prod/js/952.c76c04fb.bundle.js +1 -0
  64. package/app/public/dist/prod/js/common.9985f827.bundle.js +1 -0
  65. package/app/public/dist/prod/js/entry.dashboard.cd7591e4.bundle.js +1 -0
  66. package/app/public/dist/prod/js/entry.project-list.beb0fa9d.bundle.js +1 -0
  67. package/app/public/dist/prod/js/runtime.5602b906.bundle.js +1 -0
  68. package/app/public/dist/prod/js/vendor.709fbf32.bundle.js +53 -0
  69. package/app/public/dist/prod/static/images/avatar.78e68eaa.png +0 -0
  70. package/app/public/dist/static/logo.png +0 -0
  71. package/app/public/dist/static/normalize.css +1 -0
  72. package/app/public/static/logo.png +0 -0
  73. package/app/public/static/normalize.css +267 -0
  74. package/app/router/project.js +6 -0
  75. package/app/router/view.js +5 -0
  76. package/app/router-schema/project.js +14 -0
  77. package/app/service/base.js +22 -0
  78. package/app/service/project.js +49 -0
  79. package/app/view/entry.tpl +18 -0
  80. package/app/webpack/config/webpack.base.js +288 -0
  81. package/app/webpack/config/webpack.dev.js +53 -0
  82. package/app/webpack/config/webpack.prod.js +106 -0
  83. package/app/webpack/dev.js +34 -0
  84. package/app/webpack/libs/block.js +1 -0
  85. package/app/webpack/prod.js +21 -0
  86. package/config/config.default.js +5 -0
  87. package/index.js +37 -0
  88. package/mint-core/env.js +23 -0
  89. package/mint-core/index.js +101 -0
  90. package/mint-core/loader/config.js +59 -0
  91. package/mint-core/loader/controller.js +59 -0
  92. package/mint-core/loader/extend.js +42 -0
  93. package/mint-core/loader/middleware.js +54 -0
  94. package/mint-core/loader/router-schema.js +39 -0
  95. package/mint-core/loader/router.js +36 -0
  96. package/mint-core/loader/service.js +57 -0
  97. package/model/index.js +94 -0
  98. package/package.json +93 -0
@@ -0,0 +1,143 @@
1
+ <template>
2
+ <a-form v-if="schema?.properties">
3
+ <a-row :gutter="[16, 24]">
4
+ <template
5
+ v-for="(item, key) in renderSchema.properties"
6
+ :key="key"
7
+ >
8
+ <a-col
9
+ v-if="showComponent(item)"
10
+ v-bind="gridConfig"
11
+ >
12
+ <a-form-item :label="item.label">
13
+ <component
14
+ :is="loadedComponentMap[item.option?.comType]"
15
+ v-if="loadedComponentMap[item.option?.comType]"
16
+ ref="componentRefList"
17
+ :schema-key="key"
18
+ :schema="item"
19
+ @load="handleComponentLoad"
20
+ ></component>
21
+ <!-- 考虑到comType配置错误的兼容性处理 -->
22
+ <a-input
23
+ v-else
24
+ value="配置错误,无法使用"
25
+ :disabled="true"
26
+ ></a-input>
27
+ <!-- 考虑到comType配置错误的兼容性处理 -->
28
+ </a-form-item>
29
+ </a-col>
30
+ </template>
31
+ <a-form-item>
32
+ <a-space>
33
+ <a-button
34
+ type="primary"
35
+ @click="search"
36
+ >
37
+ 查询
38
+ </a-button>
39
+ <a-button @click="reset">重置</a-button>
40
+ </a-space>
41
+ </a-form-item>
42
+ </a-row>
43
+ </a-form>
44
+ </template>
45
+
46
+ <script setup>
47
+ import { ref, onMounted, watch } from "vue";
48
+ import { filterNotRenderData } from "$mintUtils";
49
+ import searchItemConfig from "./search-item-config";
50
+ const props = defineProps({
51
+ schema: {
52
+ type: Object,
53
+ default: () => ({}),
54
+ },
55
+ });
56
+
57
+ const emit = defineEmits(["load", "search", "reset"]);
58
+
59
+ const gridConfig = {
60
+ xs: 24,
61
+ sm: 12,
62
+ md: 8,
63
+ lg: 6,
64
+ xl: 6,
65
+ };
66
+
67
+ const componentRefList = ref([]);
68
+ const loadedComponentMap = ref({});
69
+ const showComponent = (schemaValue) => {
70
+ return !(
71
+ Object.hasOwnProperty.call(schemaValue.option, "visible") && !schemaValue.option.visible
72
+ );
73
+ };
74
+
75
+ const getValue = () => {
76
+ return componentRefList.value.reduce((pre, cur) => {
77
+ return { ...pre, ...cur?.getValue() };
78
+ }, {});
79
+ };
80
+
81
+ const reset = () => {
82
+ componentRefList.value.forEach((com) => com.reset());
83
+ emit("reset");
84
+ };
85
+
86
+ const search = () => {
87
+ emit("search", getValue());
88
+ };
89
+
90
+ let childComponentCount = 0;
91
+ const handleComponentLoad = () => {
92
+ childComponentCount++;
93
+ const renderChildrenTotal = Object.values(props.schema.properties).filter(showComponent).length;
94
+ if (childComponentCount === renderChildrenTotal) {
95
+ emit("load", getValue());
96
+ }
97
+ };
98
+
99
+ const renderSchema = ref({});
100
+
101
+ const loadSearchComponents = async () => {
102
+ const comTypeList = [
103
+ ...new Set(
104
+ Object.values(renderSchema.value.properties || {})
105
+ .filter(showComponent)
106
+ .map((item) => item.option?.comType)
107
+ .filter(Boolean),
108
+ ),
109
+ ];
110
+ const componentEntries = await Promise.all(
111
+ comTypeList.map(async (comType) => {
112
+ const config = searchItemConfig[comType];
113
+ if (!config) return null;
114
+ const loadedModule = config.loader ? await config.loader() : null;
115
+ const component = config.component || loadedModule?.default;
116
+ return component ? [comType, component] : null;
117
+ }),
118
+ );
119
+ loadedComponentMap.value = Object.fromEntries(componentEntries.filter(Boolean));
120
+ };
121
+
122
+ watch(
123
+ () => props.schema,
124
+ async () => {
125
+ childComponentCount = 0;
126
+ componentRefList.value = [];
127
+ renderSchema.value = filterNotRenderData(props.schema, "visible");
128
+ await loadSearchComponents();
129
+ },
130
+ { deep: true },
131
+ );
132
+
133
+ onMounted(async () => {
134
+ renderSchema.value = filterNotRenderData(props.schema, "visible");
135
+ await loadSearchComponents();
136
+ });
137
+
138
+ defineExpose({
139
+ getValue,
140
+ });
141
+ </script>
142
+
143
+ <style scoped lang="less"></style>
@@ -0,0 +1,20 @@
1
+ import businessSearchItemConfig from "$businessSearchItemConfig";
2
+ const SearchItemConfig = {
3
+ input: {
4
+ loader: () => import(/* webpackChunkName: "search-input" */ "./component/input"),
5
+ },
6
+ select: {
7
+ loader: () => import(/* webpackChunkName: "search-select" */ "./component/select"),
8
+ },
9
+ dynamicSelect: {
10
+ loader: () =>
11
+ import(/* webpackChunkName: "search-dynamic-select" */ "./component/dynamic-select"),
12
+ },
13
+ dateRangePicker: {
14
+ loader: () =>
15
+ import(/* webpackChunkName: "search-date-range-picker" */ "./component/date-range-picker"),
16
+ },
17
+ ...businessSearchItemConfig,
18
+ };
19
+
20
+ export default SearchItemConfig;
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <a-table
3
+ v-if="schema?.properties"
4
+ :columns="tableColumns"
5
+ :loading="loading"
6
+ :data-source="tableList"
7
+ :pagination="pagination"
8
+ @on-change="onTableChange"
9
+ >
10
+ <template #bodyCell="{ column, record }">
11
+ <template v-if="column.dataIndex === 'action'">
12
+ <a-button
13
+ v-for="(btnConfig, index) in buttons"
14
+ :key="index"
15
+ v-bind="getButtonConfig(btnConfig.uiButtonConfig)"
16
+ @click="onButtonClick({ buttonConfig: btnConfig, rowData: record })"
17
+ >
18
+ {{ btnConfig.label }}
19
+ </a-button>
20
+ </template>
21
+ </template>
22
+ </a-table>
23
+ </template>
24
+
25
+ <script setup>
26
+ import { ref, onMounted, computed, watch } from "vue";
27
+ import { httpGet } from "$mintService";
28
+ import { filterNotRenderData } from "$mintUtils";
29
+ import debounce from "lodash/debounce";
30
+ const props = defineProps({
31
+ api: {
32
+ type: String,
33
+ default: "",
34
+ },
35
+ schema: {
36
+ type: Object,
37
+ default: () => ({}),
38
+ },
39
+ buttons: {
40
+ type: Array,
41
+ default: () => [],
42
+ },
43
+ searchParams: {
44
+ type: Object,
45
+ default: () => ({}),
46
+ },
47
+ });
48
+
49
+ const emits = defineEmits(["operation"]);
50
+
51
+ const DEFAULT_PAGINATION = {
52
+ current: 1,
53
+ pageSize: 10,
54
+ total: 0,
55
+ };
56
+
57
+ const tableList = ref([]);
58
+ const loading = ref(false);
59
+ const pagination = ref({
60
+ ...DEFAULT_PAGINATION,
61
+ });
62
+
63
+ const tableColumns = computed(() => {
64
+ const canRenderSchema = filterNotRenderData(props.schema, "visible");
65
+ return [
66
+ ...Object.entries(canRenderSchema.properties || {}).map(([key, value]) => {
67
+ return {
68
+ title: value.label,
69
+ dataIndex: key,
70
+ ...(value.option.uiTableColumnConfig || {}),
71
+ };
72
+ }),
73
+ {
74
+ title: "操作",
75
+ dataIndex: "action",
76
+ fiexd: "right",
77
+ width: getActionColumnWidth(),
78
+ },
79
+ ];
80
+ });
81
+
82
+ /**
83
+ * 获取按钮配置(兼容性考虑:DSL中没有配置改选项,默认给空对象)
84
+ * @param {object} buttonConfig
85
+ */
86
+ const getButtonConfig = (buttonConfig) => {
87
+ return {
88
+ ...(buttonConfig || {}),
89
+ };
90
+ };
91
+
92
+ const getActionColumnWidth = () => {
93
+ return props.buttons.length > 0
94
+ ? props.buttons.reduce((pre, cur) => pre + cur.label.length * 30, 50)
95
+ : 50;
96
+ };
97
+
98
+ const initData = () => {
99
+ pagination.value = {
100
+ ...DEFAULT_PAGINATION,
101
+ };
102
+ loading.value = false;
103
+ loadList();
104
+ };
105
+
106
+ /**
107
+ * 列表请求
108
+ */
109
+ const fetchTableData = async () => {
110
+ if (!props.api) return;
111
+ try {
112
+ loading.value = true;
113
+ tableList.value = [];
114
+ const params = {
115
+ ...props.searchParams,
116
+ page_no: pagination.value.current,
117
+ page_size: pagination.value.pageSize,
118
+ };
119
+ const { data, metaData } = await httpGet(`${props.api}/list`, params);
120
+ tableList.value = buildTableData(data);
121
+ if (metaData) {
122
+ pagination.value = {
123
+ ...pagination.value,
124
+ current: metaData.page_no,
125
+ pageSize: metaData.page_size,
126
+ total: metaData.total,
127
+ };
128
+ }
129
+ } finally {
130
+ loading.value = false;
131
+ }
132
+ };
133
+
134
+ /**
135
+ * 防抖获取列表数据,防止多次触发请求,增加网络带宽开销
136
+ * 加loading拦截只能防止请求快速响应的频繁请求,如果请求响应时间长,loading等于无效拦截
137
+ */
138
+ const loadList = debounce(fetchTableData, 100);
139
+
140
+ /**
141
+ * schema拥有对一个字段数据的表格单列配置以及自身的行为配置,因此需要根据shcema的行为配置对字段的值进行处理
142
+ * @param {array} dataList
143
+ */
144
+ const buildTableData = (dataList) => {
145
+ return dataList.map((item) => {
146
+ const newItem = {};
147
+ for (const key in item) {
148
+ const schemaItem = props.schema.properties[key];
149
+ if (schemaItem?.option?.toFixed) {
150
+ newItem[key] = item[key].toFixed && item[key].toFixed(schemaItem.option.toFixed);
151
+ } else {
152
+ newItem[key] = item[key];
153
+ }
154
+ }
155
+ return newItem;
156
+ });
157
+ };
158
+
159
+ const onTableChange = (page) => {
160
+ const { current, pageSize } = page;
161
+ pagination.value = {
162
+ ...pagination.value,
163
+ current,
164
+ pageSize,
165
+ };
166
+ loadList();
167
+ };
168
+
169
+ const onButtonClick = ({ buttonConfig, rowData }) => {
170
+ emits("operation", { buttonConfig, rowData });
171
+ };
172
+
173
+ const getTableList = (type) => {
174
+ if (type === "resetPage") {
175
+ initData();
176
+ } else {
177
+ loadList();
178
+ }
179
+ };
180
+
181
+ watch(
182
+ [() => props.api, () => props.schema, () => props.searchParams],
183
+ () => {
184
+ initData();
185
+ },
186
+ { deep: true },
187
+ );
188
+
189
+ onMounted(() => {
190
+ initData();
191
+ });
192
+
193
+ defineExpose({
194
+ getTableList,
195
+ });
196
+ </script>
197
+
198
+ <style scoped lang="less"></style>
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <a-layout class="sider-container">
3
+ <a-layout-sider class="content">
4
+ <slot name="sider-content"></slot>
5
+ </a-layout-sider>
6
+ <a-layout>
7
+ <a-layout-content class="content">
8
+ <div class="main-content">
9
+ <slot name="main-content"></slot>
10
+ </div>
11
+ </a-layout-content>
12
+ </a-layout>
13
+ </a-layout>
14
+ </template>
15
+
16
+ <script setup></script>
17
+
18
+ <style lang="less" scoped>
19
+ .sider-container {
20
+ height: 100%;
21
+ }
22
+
23
+ .content {
24
+ background-color: #fff;
25
+ }
26
+
27
+ .main-content {
28
+ padding: 0 24px;
29
+ }
30
+ </style>
@@ -0,0 +1,9 @@
1
+ const ERROR_CODE = require("./common/error-code");
2
+
3
+ module.exports = (app, router) => {
4
+ router.all("(.*)", async (ctx) => {
5
+ // 所有前面路由没拦截的请求都会走到这里
6
+ ctx.status = 404;
7
+ ctx.body = app.returnUtils.businessError(ERROR_CODE.NOT_FOUND);
8
+ });
9
+ };
@@ -0,0 +1,37 @@
1
+ const path = require("path");
2
+ const { sep } = path;
3
+
4
+ module.exports = (app) => {
5
+ // 引入err-handler错误处理中间件
6
+ app.use(app.middlewares.errHandler);
7
+
8
+ // 配置静态根目录
9
+ app.use(require("koa-static")(path.join(app.baseDir, `${sep}app${sep}public`)));
10
+ // 模版渲染引擎,会给ctx上下文挂载一个render方法,返回页面给client
11
+ app.use(
12
+ require("koa-nunjucks-2")({
13
+ ext: "tpl",
14
+ path: path.join(app.baseDir, `${sep}app${sep}public`),
15
+ functionName: "render",
16
+ writeResponse: true,
17
+ nunjucksConfig: {
18
+ trimBlocks: true,
19
+ nocache: true,
20
+ },
21
+ }),
22
+ );
23
+
24
+ // 引入body参数解析器
25
+ app.use(
26
+ require("koa-bodyparser")({
27
+ enableTypes: ["json", "form", "text"],
28
+ formLimit: "1000mb",
29
+ }),
30
+ );
31
+
32
+ // 引入 api验签中间件
33
+ app.use(app.middlewares.apiSignVerify);
34
+
35
+ // 引入项目维度中间件
36
+ app.use(app.middlewares.projectHandler);
37
+ };
@@ -0,0 +1,2 @@
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="/static/normalize.css"><link type="image/x-icon" rel="icon" href="/static/logo.png"><title>Document</title><script defer="defer" src="/dist/prod/js/runtime.5602b906.bundle.js" crossorigin="anonymous"></script><script defer="defer" src="/dist/prod/js/vendor.709fbf32.bundle.js" crossorigin="anonymous"></script><script defer="defer" src="/dist/prod/js/common.9985f827.bundle.js" crossorigin="anonymous"></script><script defer="defer" src="/dist/prod/js/entry.dashboard.cd7591e4.bundle.js" crossorigin="anonymous"></script><link href="/dist/prod/css/common.1a98227b.css" rel="stylesheet" crossorigin="anonymous"></head><body><div id="app"></div><input id="project-key" style="display:none" value="{{project_key}}"><script>const projectKey = document.getElementById('project-key').value;
2
+ window.projectKey = projectKey;</script></body></html>
@@ -0,0 +1,2 @@
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="/static/normalize.css"><link type="image/x-icon" rel="icon" href="/static/logo.png"><title>Document</title><script defer="defer" src="/dist/prod/js/runtime.5602b906.bundle.js" crossorigin="anonymous"></script><script defer="defer" src="/dist/prod/js/vendor.709fbf32.bundle.js" crossorigin="anonymous"></script><script defer="defer" src="/dist/prod/js/common.9985f827.bundle.js" crossorigin="anonymous"></script><script defer="defer" src="/dist/prod/js/entry.project-list.beb0fa9d.bundle.js" crossorigin="anonymous"></script><link href="/dist/prod/css/common.1a98227b.css" rel="stylesheet" crossorigin="anonymous"><link href="/dist/prod/css/entry.project-list.14f64dd9.css" rel="stylesheet" crossorigin="anonymous"></head><body><div id="app"></div><input id="project-key" style="display:none" value="{{project_key}}"><script>const projectKey = document.getElementById('project-key').value;
2
+ window.projectKey = projectKey;</script></body></html>
@@ -0,0 +1 @@
1
+ .operation-panel[data-v-5b849b26]{margin-bottom:24px}.schema-from .form-item .item-label{margin-bottom:12px}.schema-from .form-item .required{color:red}.schema-from .form-item:not(:first-child){margin-top:12px}.schema-from .form-item .validate-border-error{border:1px solid red}.schema-from .form-item .validate-tip-error{color:red;margin-top:10px}.schema-view[data-v-4507ac6a]{padding:24px}
@@ -0,0 +1 @@
1
+ .sider-container[data-v-89c88fc2]{height:100%}.content[data-v-89c88fc2]{background-color:#fff}.main-content[data-v-89c88fc2]{padding:0 24px}.sider-view[data-v-06e6392a]{height:100%}
@@ -0,0 +1 @@
1
+ .header[data-v-2ad94885]{background:#fff;border-bottom:1px solid #eee}.content[data-v-2ad94885]{background:#fff;height:calc(100vh - 64px);overflow-y:auto}img[data-v-2ad94885]{height:32px;margin-right:16px;width:32px}.header-panel[data-v-2ad94885]{align-items:center;display:flex;height:64px}.header-panel .title-panel .title[data-v-2ad94885]{margin:0 20px 0 0}.header-panel .left-panel[data-v-2ad94885]{align-items:center;display:flex;min-width:120px}.header-panel .middle-panel[data-v-2ad94885]{flex:1}.header-panel .right-panel[data-v-2ad94885]{align-items:center;display:flex;gap:12px;min-width:120px}body,html{height:100%;width:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{font-weight:500;margin-bottom:.5em;margin-top:0}p{margin-bottom:1em;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-bottom:1em;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-bottom:1em;margin-top:0;overflow:auto}figure{margin:0 0 1em}img{border-style:none;vertical-align:middle}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;padding-bottom:.3em;padding-top:.75em;text-align:left}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5em;line-height:inherit;margin-bottom:.5em;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{background-color:#feffe6;padding:.2em}
@@ -0,0 +1 @@
1
+ .project-list-wrap[data-v-690b58c8]{padding:48px}.model-list[data-v-690b58c8]{margin-bottom:40px}.model-list h2[data-v-690b58c8]{margin-bottom:20px}.model-list .project-list[data-v-690b58c8]{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[142],{4142(e,s,u){u.r(s),u.d(s,{default:()=>l});var i=u(7582),r=u(2846),t=u(5621),c=u(2075);const n=["src"],l={__name:"index",setup(e){const s=(0,c.t)(),u=(0,t.c)(),l=(0,r.KR)(""),y=()=>{const e=u.findMenuItem({key:"key",value:s.query.sider_key||s.query.key});e&&(l.value=e?.iframeConfig?.path??"")};return(0,i.wB)([()=>s.query.key,()=>s.query.sider_key,()=>u.menuList],()=>{y()},{deep:!0}),(0,i.sV)(()=>{y()}),(e,s)=>((0,i.uX)(),(0,i.CE)("iframe",{width:"100%",height:"100%",src:l.value},null,8,n))}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[609],{1609(e,a,t){t.r(a),t.d(a,{default:()=>fe});var l=t(7582),n=t(2846),o=t(5303),s=t(1614),u=t(7896),i=t(6397),r=t(2380),c=t(4907),m=t(1159);const v=(e,a)=>e?.properties?Object.entries(e.properties).reduce((e,[t,l])=>(l?.option&&Object.hasOwnProperty.call(l.option,a)&&!l.option[a]||(e.properties[t]=l),e),{type:"object",properties:{}}):e,p={__name:"index",props:{schemaKey:{type:String,default:""},schema:{type:Object,default:()=>({})}},emits:["load"],setup(e,{expose:a,emit:t}){const o=e,s=t,u=(0,l.EW)(()=>({allowClear:!0,placeholder:`请输入${o.schema?.label}`,...o.schema?.option?.uiComponentConfig||{}})),i=(0,n.KR)(),r=()=>{i.value=o.schema?.option?.default||void 0};return(0,l.sV)(()=>{r(),s("load")}),a({getValue:()=>void 0!==i.value?{[o.schemaKey]:i.value}:{},reset:r}),(e,a)=>{const t=m.Ay;return(0,l.uX)(),(0,l.Wv)(t,(0,l.v6)({value:i.value,"onUpdate:value":a[0]||(a[0]=e=>i.value=e)},u.value),null,16,["value"])}}};var d=t(4666);const h={__name:"index",props:{schemaKey:{type:String,default:""},schema:{type:Object,default:()=>({})}},emits:["load"],setup(e,{expose:a,emit:t}){const o=e,s=t,u=(0,l.EW)(()=>({allowClear:!0,placeholder:`请选择${o.schema?.label}`,...o.schema?.option?.uiComponentConfig||{},options:o.schema?.option?.enumList||[]})),i=(0,n.KR)(),r=()=>{o.schema?.option?.default?i.value=o.schema?.option?.default:u.value?.mode&&"multiple"===u.value.mode?i.value=[]:i.value=void 0};return(0,l.sV)(()=>{r(),s("load")}),a({getValue:()=>void 0!==i.value?{[o.schemaKey]:i.value}:{},reset:r}),(e,a)=>{const t=d.Ay;return(0,l.uX)(),(0,l.Wv)(t,(0,l.v6)({value:i.value,"onUpdate:value":a[0]||(a[0]=e=>i.value=e)},u.value),null,16,["value"])}}};var f=t(8326);const y={__name:"index",props:{schemaKey:{type:String,default:""},schema:{type:Object,default:()=>({})}},emits:["load"],setup(e,{expose:a,emit:t}){const o=e,s=t,u=(0,l.EW)(()=>({allowClear:!0,placeholder:`请选择${o.schema?.label}`,...o.schema?.option?.uiComponentConfig||{}})),i=(0,n.KR)(),r=()=>{o.schema?.option?.default?i.value=o.schema?.option?.default:u.value?.mode&&"multiple"===u.value.mode?i.value=[]:i.value=void 0},c=(0,n.KR)([]);return(0,l.sV)(async()=>{r(),await(async()=>{const e=await(0,f.lx)(o.schema.option.api);c.value=e.data})(),s("load")}),a({getValue:()=>void 0!==i.value?{[o.schemaKey]:i.value}:{},reset:r}),(e,a)=>{const t=d.Ay;return(0,l.uX)(),(0,l.Wv)(t,(0,l.v6)({value:i.value,"onUpdate:value":a[0]||(a[0]=e=>i.value=e)},u.value,{options:c.value}),null,16,["value","options"])}}};var b=t(7252);const g={input:{component:p},select:{component:h},dynamicSelect:{component:y},dateRangePicker:{component:{__name:"index",props:{schemaKey:{type:String,default:""},schema:{type:Object,default:()=>({})}},emits:["load"],setup(e,{expose:a,emit:t}){const o=e,s=t,u=(0,l.EW)(()=>({allowClear:!0,...o.schema?.option?.uiComponentConfig||{}})),i=(0,n.KR)([]),r=()=>{i.value=o.schema?.option?.default??[]};return(0,l.sV)(()=>{r(),s("load")}),a({getValue:()=>void 0!==i.value?{[`${o.schemaKey}_start`]:i.value[0]||"",[`${o.schemaKey}_end`]:i.value[1]||""}:{},reset:r}),(e,a)=>{const t=b.cv;return(0,l.uX)(),(0,l.Wv)(t,(0,l.v6)({value:i.value,"onUpdate:value":a[0]||(a[0]=e=>i.value=e),style:{width:"100%"}},u.value),null,16,["value"])}}}}},k={__name:"index",props:{schema:{type:Object,default:()=>({})}},emits:["load","search","reset"],setup(e,{expose:a,emit:t}){const p=e,d=t,h={xs:24,sm:12,md:8,lg:6,xl:6},f=(0,n.KR)([]),y=e=>!(Object.hasOwnProperty.call(e.option,"visible")&&!e.option.visible),b=()=>f.value.reduce((e,a)=>({...e,...a?.getValue()}),{}),k=()=>{f.value.forEach(e=>e.reset()),d("reset")},_=()=>{d("search",b())};let C=0;const K=()=>{C++;const e=Object.values(p.schema.properties).filter(y).length;C===e&&d("load",b())},R=(0,n.KR)({});return(0,l.sV)(()=>{R.value=v(p.schema,"visible")}),a({getValue:b}),(a,t)=>{const v=m.Ay,p=c.A,d=r.A,b=i.A,C=u.Ay,w=s.A,x=o.Ay;return e.schema?.properties?((0,l.uX)(),(0,l.Wv)(x,{key:0},{default:(0,l.k6)(()=>[(0,l.bF)(w,{gutter:[16,24]},{default:(0,l.k6)(()=>[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(R.value.properties,(e,a)=>((0,l.uX)(),(0,l.CE)(l.FK,{key:a},[y(e)?((0,l.uX)(),(0,l.Wv)(d,(0,l.v6)({key:0,ref_for:!0},h),{default:(0,l.k6)(()=>[(0,l.bF)(p,{label:e.label},{default:(0,l.k6)(()=>[(0,n.R1)(g)[e.option?.comType]?((0,l.uX)(),(0,l.Wv)((0,l.$y)((0,n.R1)(g)[e.option?.comType]?.component),{key:0,ref_for:!0,ref_key:"componentRefList",ref:f,"schema-key":a,schema:e,onLoad:K},null,40,["schema-key","schema"])):((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.Q3)(" 考虑到comType配置错误的兼容性处理 "),(0,l.bF)(v,{value:"配置错误,无法使用",disabled:!0})],2112)),(0,l.Q3)(" 考虑到comType配置错误的兼容性处理 ")]),_:2},1032,["label"])]),_:2},1040)):(0,l.Q3)("v-if",!0)],64))),128)),(0,l.bF)(p,null,{default:(0,l.k6)(()=>[(0,l.bF)(C,null,{default:(0,l.k6)(()=>[(0,l.bF)(b,{type:"primary",onClick:_},{default:(0,l.k6)(()=>[...t[0]||(t[0]=[(0,l.eW)(" 查询 ",-1)])]),_:1}),(0,l.bF)(b,{onClick:k},{default:(0,l.k6)(()=>[...t[1]||(t[1]=[(0,l.eW)("重置",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):(0,l.Q3)("v-if",!0)}}},_={key:0,class:"search-panel"},C={__name:"index",emits:["search"],setup(e,{emit:a}){const t=a,{searchSchema:o}=(0,l.WQ)("schemaViewData"),s=e=>{t("search",e)},u=e=>{t("search",e)},i=()=>{t("search",{})};return(e,a)=>Object.keys((0,n.R1)(o)?.properties||{}).length?((0,l.uX)(),(0,l.CE)("div",_,[(0,l.bF)(k,{schema:(0,n.R1)(o),onSearch:s,onLoad:u,onReset:i},null,8,["schema"])])):(0,l.Q3)("v-if",!0)}};var K=t(136),R=t(319),w=t(86),x=t(6746);const F={__name:"index",props:{api:{type:String,default:""},schema:{type:Object,default:()=>({})},buttons:{type:Array,default:()=>[]},searchParams:{type:Object,default:()=>({})}},emits:["operation"],setup(e,{expose:a,emit:t}){const o=e,s=t,u={current:1,pageSize:10,total:0},r=(0,n.KR)([]),c=(0,n.KR)(!1),m=(0,n.KR)({...u}),p=(0,l.EW)(()=>{const e=v(o.schema,"visible");return[...Object.entries(e.properties||{}).map(([e,a])=>({title:a.label,dataIndex:e,...a.option.uiTableColumnConfig||{}})),{title:"操作",dataIndex:"action",fiexd:"right",width:d()}]}),d=()=>o.buttons.length>0?o.buttons.reduce((e,a)=>e+30*a.label.length,50):50,h=()=>{m.value={...u},c.value=!1,y()},y=(0,x.debounce)(async()=>{if(o.api)try{c.value=!0,r.value=[];const e={...o.searchParams,page_no:m.value.current,page_size:m.value.pageSize},{data:a,metaData:t}=await(0,f.lx)(`${o.api}/list`,e);r.value=b(a),t&&(m.value={...m.value,current:t.page_no,pageSize:t.page_size,total:t.total})}finally{c.value=!1}},100),b=e=>e.map(e=>{const a={};for(const t in e){const l=o.schema.properties[t];a[t]=l?.option?.toFixed?e[t].toFixed&&e[t].toFixed(l.option.toFixed):e[t]}return a}),g=e=>{const{current:a,pageSize:t}=e;m.value={...m.value,current:a,pageSize:t},y()};return(0,l.wB)([()=>o.api,()=>o.schema,()=>o.searchParams],()=>{h()},{deep:!0}),(0,l.sV)(()=>{h()}),a({getTableList:e=>{"resetPage"===e?h():y()}}),(a,t)=>{const n=i.A,o=w.Ay;return e.schema?.properties?((0,l.uX)(),(0,l.Wv)(o,{key:0,columns:p.value,loading:c.value,"data-source":r.value,pagination:m.value,onOnChange:g},{bodyCell:(0,l.k6)(({column:a,record:t})=>["action"===a.dataIndex?((0,l.uX)(!0),(0,l.CE)(l.FK,{key:0},(0,l.pI)(e.buttons,(e,a)=>((0,l.uX)(),(0,l.Wv)(n,(0,l.v6)({key:a},{ref_for:!0},{...e.uiButtonConfig||{}},{onClick:a=>(({buttonConfig:e,rowData:a})=>{s("operation",{buttonConfig:e,rowData:a})})({buttonConfig:e,rowData:t})}),{default:(0,l.k6)(()=>[(0,l.eW)((0,R.v_)(e.label),1)]),_:2},1040,["onClick"]))),128)):(0,l.Q3)("v-if",!0)]),_:1},8,["columns","loading","data-source","pagination"])):(0,l.Q3)("v-if",!0)}}};var A=t(771),$=t(8606);const O={class:"table-panel"},X={key:0,class:"operation-panel"},W={key:1,class:"schema-table-panel"},j={__name:"index",emits:["operation"],setup(e,{expose:a,emit:t}){const o=t,{api:s,tableSchema:u,tableConfig:r,searchParams:c}=(0,l.WQ)("schemaViewData"),m={remove:async function({buttonConfig:e,rowData:a}){const{eventOption:t}=e,{params:l}=t,n=function(e={},a={}){return Object.entries(e).reduce((e,[t,l])=>({...e,[t]:l.replace(/schema::(.*)/,(e,t)=>a[t])}),{})}(l,a);A.A.confirm({title:"确定要删除该数据吗?",okText:"确定",cancelText:"取消",onOk:async()=>{await(0,f.wu)(s.value,n),$.Ay.success("删除成功"),v.value?.getTableList("search")}})}},v=(0,n.KR)(),p=({buttonConfig:e,rowData:a})=>{const{eventKey:t}=e;m[t]?m[t]({buttonConfig:e,rowData:a}):o("operation",{buttonConfig:e,rowData:a})};return a({getTableList:(...e)=>{v.value?.getTableList(...e)}}),(e,a)=>{const t=i.A,o=K.A;return(0,l.uX)(),(0,l.CE)("div",O,[((0,n.R1)(r).headerButtons||[]).length?((0,l.uX)(),(0,l.CE)("div",X,[(0,l.bF)(o,{justify:"flex-end",gap:12,align:"center"},{default:(0,l.k6)(()=>[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)((0,n.R1)(r).headerButtons,(e,a)=>((0,l.uX)(),(0,l.Wv)(t,(0,l.v6)({key:a},{ref_for:!0},{...e.uiButtonConfig||{}},{onClick:a=>p({buttonConfig:e})}),{default:(0,l.k6)(()=>[(0,l.eW)((0,R.v_)(e.label),1)]),_:2},1040,["onClick"]))),128))]),_:1})])):(0,l.Q3)("v-if",!0),Object.keys((0,n.R1)(u)?.properties||{}).length?((0,l.uX)(),(0,l.CE)("div",W,[(0,l.bF)(F,{ref_key:"schemaTableRef",ref:v,api:(0,n.R1)(s),"search-params":(0,n.R1)(c),schema:(0,n.R1)(u),buttons:(0,n.R1)(r).rowButtons,onOperation:p},null,8,["api","search-params","schema","buttons"])])):(0,l.Q3)("v-if",!0)])}}};var E=t(3367);const V=(0,E.A)(j,[["__scopeId","data-v-5b849b26"]]);var L=t(2075),S=t(5621);const Q=()=>{const e=(0,L.t)(),a=(0,S.c)(),t=(0,n.KR)(""),o=(0,n.KR)({}),s=(0,n.KR)({}),u=(0,n.KR)({}),i=(0,n.KR)({}),r=(0,n.KR)({}),c=()=>{const{sider_key:l,key:n}=e.query,c=a.findMenuItem({key:"key",value:l||n});if(!c)return;if(!c.schemaConfig)return;m();const{schemaConfig:p}=c;t.value=p.api,o.value=v(p.schema,"table"),s.value=p.tableConfig,u.value=v(p.schema,"search");const d=e.query;Object.entries(d).forEach(([e,a])=>{u.value?.properties?.[e]&&void 0!==d[e]&&(u.value.properties[e].option.default=a)}),i.value=p.searchConfig,r.value=Object.entries(p.componentConfig||{}).reduce((e,a)=>{const[t,l]=a;return e[t]={schema:v(p.schema,t),config:l},e},{})},m=()=>{t.value="",o.value={},s.value={},u.value={},i.value={}},v=(e,a)=>{if(!e?.properties)return{};const t={type:"object",properties:{}},{properties:l,required:n}=e;for(let[e,o]of Object.entries(l))if(o[`${a}Option`]){const l={};for(let e in o)e.indexOf("Option")<=-1&&(l[e]=o[e]);Object.assign(l,{option:{...o[`${a}Option`]||{},required:!!n?.includes(e)}}),t.properties[e]=l}return t};return(0,l.wB)([()=>e.query.sider_key,()=>e.query.key,()=>a.menuList],()=>{c()},{deep:!0}),(0,l.sV)(()=>{c()}),{api:t,tableSchema:o,tableConfig:s,searchSchema:u,searchConfig:i,components:r}};var D=t(8016),T=t(2327),q=t(1481);const B={class:"form-item"},P={class:"item-label"},I={key:0,class:"required"},U={key:0,class:"validate-tip-error"},z={__name:"index",props:{schema:{type:Object,default:()=>({})},schemaKey:{type:String,default:""},model:{type:String,default:""}},setup(e,{expose:a}){const t=e,o=(0,l.EW)(()=>{const{minLength:e,maxLength:a,pattern:l}=t.schema,{placeholder:n}=t.schema.option?.uiComponentConfig||{},o=[];return e&&o.push(`最小长度:${e}`),a&&o.push(`最大长度:${a}`),l&&o.push(`格式要求:${l}`),o.push(n||"请输入"),{allowClear:!0,...t.schema.option?.uiComponentConfig||{},placeholder:o.join(" | "),disabled:t.schema.option?.disabled}});(0,l.wB)([()=>t.schema,()=>t.model,()=>t.schemaKey],()=>{p()},{deep:!0});const s=(0,n.KR)(),u=(0,l.WQ)("ajv"),i=(0,n.KR)(""),r=()=>{if(i.value="",t.schema.option?.required&&!s.value)return i.value=`${t.schema.label}必填`,!1;if(s.value){const e=u.compile(t.schema);if(!e(s.value)&&e.errors&&e.errors[0]){const{keyword:a,params:l}=e.errors[0];switch(a){case"type":i.value=`${t.schema.label}类型错误`;break;case"minLength":i.value=`${t.schema.label}长度不能小于${l.limit}`;break;case"maxLength":i.value=`${t.schema.label}长度不能大于${l.limit}`;break;case"pattern":i.value=`${t.schema.label}格式错误`;break;default:i.value=`${t.schema.label}不符合要求`}return!1}}return!0},c=()=>{i.value=""},v=()=>{r()};function p(){s.value=t.model||t.schema.option?.default||void 0,i.value=""}return(0,l.sV)(()=>{p()}),a({getValue:()=>s.value?{[t.schemaKey]:s.value}:{},validate:r,name:"input"}),(a,t)=>{const n=K.A,u=m.Ay;return(0,l.uX)(),(0,l.CE)("div",B,[(0,l.Lk)("div",P,[(0,l.bF)(n,{gap:5,"align-items":"center"},{default:(0,l.k6)(()=>[e.schema?.option?.required?((0,l.uX)(),(0,l.CE)("span",I," * ")):(0,l.Q3)("v-if",!0),(0,l.Lk)("span",null,(0,R.v_)(e.schema.label),1)]),_:1})]),(0,l.bF)(u,(0,l.v6)({value:s.value,"onUpdate:value":t[0]||(t[0]=e=>s.value=e),class:[i.value.length?"validate-border-error":""]},o.value,{onBlur:v,onFocus:c}),null,16,["value","class"]),i.value.length?((0,l.uX)(),(0,l.CE)("div",U,(0,R.v_)(i.value),1)):(0,l.Q3)("v-if",!0)])}}},N={class:"form-item"},G={class:"item-label"},M={key:0,class:"required"},H={key:0,class:"validate-tip-error"},J={__name:"index",props:{schema:{type:Object,default:()=>({})},schemaKey:{type:String,default:""},model:{type:Object,default:void 0}},setup(e,{expose:a}){const t=e,o=(0,l.EW)(()=>({allowClear:!0,placeholder:"请选择",...t.schema.option?.uiComponentConfig||{},options:t.schema.option?.enumList||[],disabled:t.schema.option?.disabled}));(0,l.wB)([()=>t.schema,()=>t.model],()=>{c()},{deep:!0});const s=(0,n.KR)(),u=(0,l.WQ)("ajv"),i=(0,n.KR)(""),r=()=>{i.value=""};function c(){s.value=t.model||t.schema.option?.default||void 0,i.value=""}return(0,l.sV)(()=>{c()}),a({getValue:()=>s.value?{[t.schemaKey]:s.value}:{},validate:()=>{if(i.value="",t.schema.option?.required&&!s.value)return i.value=`${t.schema.label}必填`,!1;if(s.value){const e=u.compile(t.schema,{enum:(t.schema?.option?.enumList||[]).map(e=>e.value)});if(!e(s.value)&&e.errors&&e.errors[0]){const{keyword:a}=e.errors[0];if("enum"===a)i.value=`${t.schema.label}取值超出枚举范围`;else i.value=`${t.schema.label}不符合要求`;return!1}}return!0},name:"select"}),(a,t)=>{const n=K.A,u=d.Ay;return(0,l.uX)(),(0,l.CE)("div",N,[(0,l.Lk)("div",G,[(0,l.bF)(n,{gap:5,"align-items":"center"},{default:(0,l.k6)(()=>[e.schema?.option?.required?((0,l.uX)(),(0,l.CE)("span",M," * ")):(0,l.Q3)("v-if",!0),(0,l.Lk)("span",null,(0,R.v_)(e.schema.label),1)]),_:1})]),(0,l.bF)(u,(0,l.v6)({value:s.value,"onUpdate:value":t[0]||(t[0]=e=>s.value=e),style:{width:"100%"},class:[i.value.length?"validate-border-error":""]},o.value,{onChange:r}),null,16,["value","class"]),i.value.length?((0,l.uX)(),(0,l.CE)("div",H,(0,R.v_)(i.value),1)):(0,l.Q3)("v-if",!0)])}}};var Y=t(8905);const Z={class:"form-item"},ee={class:"item-label"},ae={key:0,class:"required"},te={key:0,class:"validate-tip-error"},le={input:{component:z},select:{component:J},inputNumber:{component:{__name:"index",props:{schema:{type:Object,default:()=>({})},schemaKey:{type:String,default:""},model:{type:Number,default:void 0}},setup(e,{expose:a}){const t=e,o=(0,l.EW)(()=>{const{minimum:e,maximum:a}=t.schema,{placeholder:l}=t.schema.option.uiComponentConfig,n=[];return e&&n.push(`最小值:${e}`),a&&n.push(`最大值:${a}`),n.push(l||"请输入"),{allowClear:!0,...t.schema.option?.uiComponentConfig||{},placeholder:n.join(" | "),disabled:t.schema.option?.disabled}});(0,l.wB)([()=>t.schema,()=>t.model,()=>t.schemaKey],()=>{v()},{deep:!0});const s=(0,n.KR)(),u=(0,l.WQ)("ajv"),i=(0,n.KR)(""),r=()=>{if(i.value="",t.schema.option?.required&&!s.value)return i.value=`${t.schema.label}必填`,!1;if(s.value){const e=u.compile(t.schema);if(!e(s.value)&&e.errors&&e.errors[0]){const{keyword:a,params:l}=e.errors[0];switch(a){case"type":i.value=`${t.schema.label}类型错误`;break;case"minimum":i.value=`${t.schema.label}最小值不能小于${l.limit}`;break;case"maximum":i.value=`${t.schema.label}最大值不能大于${l.limit}`;break;default:i.value=`${t.schema.label}不符合要求`}return!1}}return!0},c=()=>{i.value=""},m=()=>{r()};function v(){s.value=t.model||t.schema.option?.default||void 0,i.value=""}return(0,l.sV)(()=>{v()}),a({getValue:()=>s.value?{[t.schemaKey]:s.value}:{},validate:r,name:"inputNumber"}),(a,t)=>{const n=K.A,u=Y.A;return(0,l.uX)(),(0,l.CE)("div",Z,[(0,l.Lk)("div",ee,[(0,l.bF)(n,{gap:5,"align-items":"center"},{default:(0,l.k6)(()=>[e.schema?.option?.required?((0,l.uX)(),(0,l.CE)("span",ae," * ")):(0,l.Q3)("v-if",!0),(0,l.Lk)("span",null,(0,R.v_)(e.schema.label),1)]),_:1})]),(0,l.bF)(u,(0,l.v6)({value:s.value,"onUpdate:value":t[0]||(t[0]=e=>s.value=e),class:[i.value.length?"validate-border-error":""]},o.value,{onBlur:m,onFocus:c}),null,16,["value","class"]),i.value.length?((0,l.uX)(),(0,l.CE)("div",te,(0,R.v_)(i.value),1)):(0,l.Q3)("v-if",!0)])}}}}};var ne=t(6632),oe=t.n(ne);const se={key:0,class:"schema-from"},ue={__name:"index",props:{schema:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup(e,{expose:a}){const t=new(oe());(0,l.Gt)("ajv",t);const o=(0,n.KR)([]);return a({validate:()=>o.value.every(e=>{const a=e.validate();return console.log(e,a),a}),getValue:()=>o.value.reduce((e,a)=>({...e,...a.getValue()}),{})}),(a,t)=>e.schema?.properties?((0,l.uX)(),(0,l.CE)("div",se,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.schema.properties,(a,t)=>(0,l.bo)(((0,l.uX)(),(0,l.Wv)((0,l.$y)((0,n.R1)(le)[a.option.comType]?.component),{key:t,ref_for:!0,ref_key:"componentRefList",ref:o,"schema-key":t,schema:a,model:e.model[t]},null,8,["schema-key","schema","model"])),[[q.aG,!1!==a.option?.visible]])),128))])):(0,l.Q3)("v-if",!0)}},ie={class:"create-form"},re="createForm",ce={class:"edit-form"},me="editForm",ve="detailPanel",pe={createForm:{component:{__name:"index",emits:["command"],setup(e,{expose:a,emit:t}){const o=t,{components:s,api:u}=(0,l.WQ)("schemaViewData"),{schema:r,config:c}=s.value[re],m=(0,n.KR)(!1),v=(0,n.KR)(),p=(0,n.KR)(""),d=(0,n.KR)(""),h=(0,n.KR)(!1),y=async()=>{try{if(h.value)return;h.value=!0;if(!v.value.validate())return;await(0,f.zA)(u.value,v.value.getValue()),$.Ay.success("保存成功"),m.value=!1,o("command",{eventKey:c.eventKey})}finally{h.value=!1}};return a({show:()=>{p.value=c.title,d.value=c.saveBtnText,m.value=!0},name:re}),(e,a)=>{const t=T.A,o=i.A,s=D.A;return(0,l.uX)(),(0,l.CE)("div",ie,[(0,l.bF)(s,{open:m.value,"onUpdate:open":a[0]||(a[0]=e=>m.value=e),title:p.value},{footer:(0,l.k6)(()=>[(0,l.bF)(o,{type:"primary",onClick:y},{default:(0,l.k6)(()=>[(0,l.eW)((0,R.v_)(d.value),1)]),_:1})]),default:(0,l.k6)(()=>[(0,l.bF)(t,{spinning:h.value},{default:(0,l.k6)(()=>[(0,l.bF)(ue,{ref_key:"schemaFormRef",ref:v,schema:(0,n.R1)(r)},null,8,["schema"])]),_:1},8,["spinning"])]),_:1},8,["open","title"])])}}}},editForm:{component:{__name:"index",emits:["command"],setup(e,{expose:a,emit:t}){const o=t,{components:s,api:u}=(0,l.WQ)("schemaViewData"),r=(0,n.KR)(!1),c=(0,n.KR)(),m=(0,n.KR)(""),v=(0,n.KR)(""),p=(0,n.KR)({}),d=(0,n.KR)(!1),h=(0,n.KR)({}),y=async()=>{try{if(d.value)return;const{config:e}=s.value[me];d.value=!0;if(!c.value.validate())return;await(0,f.yd)(`${u.value}/1`,{...c.value.getValue(),[e.mainKey]:h.value[e.mainKey]}),$.Ay.success("保存成功"),r.value=!1,o("command",{eventKey:e.eventKey})}finally{d.value=!1}};return a({show:async e=>{const{config:a}=s.value[me];m.value=a.title,v.value=a.saveBtnText,r.value=!0,e&&(h.value=e);try{d.value=!0;const t=e[a.mainKey],{data:l}=await(0,f.lx)(`${u.value}/${t}`,{});p.value={...l}}finally{d.value=!1}},name:me}),(e,a)=>{const t=T.A,o=i.A,u=D.A;return(0,l.uX)(),(0,l.CE)("div",ce,[(0,l.bF)(u,{open:r.value,"onUpdate:open":a[0]||(a[0]=e=>r.value=e),title:m.value},{footer:(0,l.k6)(()=>[(0,l.bF)(o,{type:"primary",onClick:y},{default:(0,l.k6)(()=>[(0,l.eW)((0,R.v_)(v.value),1)]),_:1})]),default:(0,l.k6)(()=>[(0,l.bF)(t,{spinning:d.value},{default:(0,l.k6)(()=>[(0,l.bF)(ue,{ref_key:"schemaFormRef",ref:c,schema:(0,n.R1)(s)[me].schema,model:p.value},null,8,["schema","model"])]),_:1},8,["spinning"])]),_:1},8,["open","title"])])}}}},detailPanel:{component:{__name:"index",setup(e,{expose:a}){const{api:t,components:o}=(0,l.WQ)("schemaViewData"),s=(0,n.KR)(!1),u=(0,n.KR)(!1),i=(0,n.KR)(""),r=(0,n.KR)({}),c=()=>{s.value=!1};return a({name:ve,show:async e=>{try{const{config:a}=o.value[ve];u.value=!0,i.value=a.title;const l=e[a.mainKey],{data:n}=await(0,f.lx)(`${t.value}/${l}`,{});r.value={...n}}finally{u.value=!1}s.value=!0}}),(e,a)=>{const t=T.A,m=D.A;return(0,l.uX)(),(0,l.Wv)(m,{title:i.value,visible:s.value,onClose:c},{default:(0,l.k6)(()=>[(0,l.bF)(t,{spinning:u.value},{default:(0,l.k6)(()=>[(0,l.bF)(ue,{schema:(0,n.R1)(o)[ve].schema,model:r.value},null,8,["schema","model"])]),_:1},8,["spinning"])]),_:1},8,["title","visible"])}}}}},de={class:"schema-view"},he={__name:"index",setup(e){const{api:a,tableConfig:t,tableSchema:o,searchSchema:s,searchConfig:u,components:i}=Q(),r=(0,n.KR)({}),c=e=>{r.value=e},m=(0,n.KR)([]),v=(0,n.KR)(),p=(0,n.KR)();(0,l.Gt)("schemaViewData",{api:a,tableConfig:t,tableSchema:o,searchSchema:s,searchConfig:u,searchParams:r,components:i});const d={showComponent:function({buttonConfig:e,rowData:a}){console.log("{ buttonConfig, rawData }",{buttonConfig:e,rowData:a});const{eventOption:t}=e,{comName:l}=t;if(!l)return void $.Ay.error("请配置comName");const n=m.value.find(e=>e.name===l);if(!n)return void $.Ay.error("无法找到组件");n?.show?.(a)}};const h=({buttonConfig:e,rowData:a})=>{const{eventKey:t}=e;d[t]?d[t]({buttonConfig:e,rowData:a}):$.Ay.error("暂不支持该操作")},f=({eventKey:e})=>{"loadTableList"===e&&v.value.getTableList("search")};return(e,a)=>((0,l.uX)(),(0,l.CE)("div",de,[(0,l.bF)(C,{ref_key:"searchPanelRef",ref:p,onSearch:c},null,512),(0,l.bF)(V,{ref_key:"tablePanelRef",ref:v,onOperation:h},null,512),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)((0,n.R1)(i),(e,a)=>((0,l.uX)(),(0,l.Wv)((0,l.$y)((0,n.R1)(pe)[a]?.component),{ref_for:!0,ref_key:"componentRefList",ref:m,key:a,onCommand:f},null,32))),128))]))}},fe=(0,E.A)(he,[["__scopeId","data-v-4507ac6a"]])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[68],{7068(e,s,c){c.r(s),c.d(s,{default:()=>n});var l=c(7582);const u={},n=(0,c(3367).A)(u,[["render",function(e,s){return(0,l.uX)(),(0,l.CE)("div",null,"待开发todo")}]])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[952],{6952(e,n,t){t.r(n),t.d(n,{default:()=>m});var s=t(4446),u=t(7582),i=t(2846),r=t(2066);const c={class:"main-content"};var a=t(3367);const o={},d=(0,a.A)(o,[["render",function(e,n){const t=r.kY,s=r.A1,i=r.Ay;return(0,u.uX)(),(0,u.Wv)(i,{class:"sider-container"},{default:(0,u.k6)(()=>[(0,u.bF)(t,{class:"content"},{default:(0,u.k6)(()=>[(0,u.RG)(e.$slots,"sider-content",{},void 0,!0)]),_:3}),(0,u.bF)(i,null,{default:(0,u.k6)(()=>[(0,u.bF)(s,{class:"content"},{default:(0,u.k6)(()=>[(0,u.Lk)("div",c,[(0,u.RG)(e.$slots,"main-content",{},void 0,!0)])]),_:3})]),_:3})]),_:3})}],["__scopeId","data-v-89c88fc2"]]);var l=t(2075),y=t(5621);const k={__name:"index",setup(e){const n=(0,l.t)(),t=(0,l.n)(),r=(0,y.c)(),c=(0,i.KR)(""),a=(0,i.KR)([]);(0,u.wB)([()=>r.menuList,()=>n.query.key],()=>{o(),f()},{deep:!0});const o=()=>{const e=r.findMenuItem({key:"key",value:n.query.key});e&&e?.siderConfig?.menu&&(a.value=r.transfomMenuList(e.siderConfig.menu))},k=({item:e})=>{m(e.originItemValue)},m=e=>{if(n.query.sider_key===e.key)return;const{key:s,moduleType:u,customConfig:i}=e,r={sider:"/sider",schema:"/schema",custom:i?.path,iframe:"/iframe"};t.push({path:`/view/dashboard/sider${r[u]}`,query:{project_key:n.query.project_key,key:n.query.key,sider_key:s}})},f=()=>{const e=r.findMenuItem({key:"key",value:n.query.key});if(!e)return;if(!e?.siderConfig?.menu)return;const t=e.siderConfig.menu,s=r.findMenuItem({key:"key",value:n.query.sider_key},t);if(s)return void(c.value=s?.key?[s.key]:[]);const u=r.findFirstMenuItem(t);c.value=u?.key?[u.key]:[],m(u)};return(0,u.sV)(()=>{o(),f()}),(e,n)=>{const t=s.Ay,i=(0,u.g2)("router-view");return(0,u.uX)(),(0,u.Wv)(d,null,{"sider-content":(0,u.k6)(()=>[(0,u.bF)(t,{"selected-keys":c.value,"onUpdate:selectedKeys":n[0]||(n[0]=e=>c.value=e),mode:"vertical",items:a.value,onClick:k},null,8,["selected-keys","items"])]),"main-content":(0,u.k6)(()=>[(0,u.bF)(i)]),_:1})}}},m=(0,a.A)(k,[["__scopeId","data-v-06e6392a"]])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[76],{203(e,t,s){s.d(t,{A:()=>l});var a=s(1481),n=s(8263);const r=(0,s(1911).Ey)();s(6156);const l=(e,t={},s)=>{const{routes:l=[]}=t,c=(0,a.Ef)(e);if(c.use(r),s&&s(c),l&&l.length){const e=(0,n.aE)({history:(0,n.LA)(),routes:l});c.use(e),e.isReady().then(()=>{c.mount("#app")})}else c.mount("#app")};s.dn(l)},8326(e,t,s){s.d(t,{lx:()=>o,wu:()=>p,yd:()=>i,zA:()=>u});var a=s(2667),n=s.n(a),r=s(8606);const l=s(5892),c=n().create({baseURL:"",timeout:15e3,headers:{"Content-Type":"application/json;charset=utf-8"}});function o(e,t,s={}){return c.get(e,{params:t,...s})}function u(e,t,s={}){return c.post(e,t,s)}function i(e,t){return c.put(e,t)}function p(e,t){return c.delete(e,{params:t})}c.interceptors.request.use(e=>{const t=(new Date).getTime(),s=l(`elpis_${t}`);return e.headers={...e.headers,s_sign:s,s_t:t},e.url.indexOf("/api/proj/")>-1&&window.projectKey&&(e.headers.project_key=window.projectKey),e},e=>Promise.reject(e)),c.interceptors.response.use(e=>{const{data:t}=e;return 200===t.code||0===t.code?t:(r.Ay.error(t.message),Promise.reject(t))},e=>(r.Ay.error(e.message||"请求失败,请稍后重试"),Promise.reject(e)))},3526(e,t,s){s.d(t,{A:()=>v});var a=s(2066),n=s(8548),r=s(4446),l=s(6770),c=s(9822),o=s(136),u=s(7582),i=s(319);const p=s.p+"static/images/avatar.78e68eaa.png",d={class:"header-panel"},k={class:"left-panel"},_={class:"title"},m={class:"middle-panel"},f={class:"right-panel"},y={class:"avatar-wrap"},h={__name:"index",props:{projectName:{type:String,default:""},username:{type:String,default:""}},setup:e=>(t,s)=>{const h=o.A,v=c.A,g=l.A,A=r.Ay,L=n.A,j=a.KL,b=a.A1,w=a.Ay;return(0,u.uX)(),(0,u.Wv)(w,null,{default:(0,u.k6)(()=>[(0,u.bF)(j,{class:"header"},{default:(0,u.k6)(()=>[(0,u.Q3)(" 头部容器 "),(0,u.Lk)("div",d,[(0,u.Q3)(" 左侧 "),(0,u.Lk)("div",k,[(0,u.bF)(h,{align:"center",class:"title-panel"},{default:(0,u.k6)(()=>[s[0]||(s[0]=(0,u.Lk)("img",{src:p},null,-1)),(0,u.Lk)("h2",_,(0,i.v_)(e.projectName),1)]),_:1})]),(0,u.Q3)(" 中间侧 "),(0,u.Lk)("div",m,[(0,u.RG)(t.$slots,"menu-content")]),(0,u.Q3)(" 右侧 "),(0,u.Lk)("div",f,[(0,u.RG)(t.$slots,"setting-content"),(0,u.Lk)("div",y,[s[2]||(s[2]=(0,u.Lk)("img",{src:p},null,-1)),(0,u.bF)(L,null,{overlay:(0,u.k6)(()=>[(0,u.bF)(A,null,{default:(0,u.k6)(()=>[(0,u.bF)(g,null,{default:(0,u.k6)(()=>[...s[1]||(s[1]=[(0,u.Lk)("a",{href:"javascript:;"},"退出登录",-1)])]),_:1})]),_:1})]),default:(0,u.k6)(()=>[(0,u.Lk)("a",null,[(0,u.eW)((0,i.v_)(e.username)+" ",1),(0,u.bF)(v)])]),_:1})])])])]),_:3}),(0,u.bF)(b,{class:"content"},{default:(0,u.k6)(()=>[(0,u.RG)(t.$slots,"main-content")]),_:3})]),_:3})}};const v=(0,s(3367).A)(h,[["__scopeId","data-v-2ad94885"]])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[515],{4409(e,n,t){var o=t(7582),s=t(8548),a=t(9822),r=t(4446),i=t(319),u=t(1481),c=t(2846),l=t(2075),m=t(3526);const d=(0,t(1911).nY)("project",()=>{const e=(0,c.KR)([]);return{projectList:e,setProjectList:n=>{e.value=n}}});var p=t(5621);const y={__name:"index",emits:["menu-select"],setup(e,{emit:n}){const t=n,y=(0,l.t)(),k=d(),h=(0,p.c)(),v=(0,c.KR)([]),b=(0,o.EW)(()=>k.projectList.map(e=>({key:e.key,label:e.name,disabled:e.key===y.query.project_key}))),f=(0,c.KR)([]),_=()=>{if(!y.query.key)return;const e=h.findMenuItem({key:"key",value:y.query.key});f.value=e?.key?[e.key]:[]},g=()=>{v.value=h.transfomMenuList()};(0,o.wB)([()=>h.menuList,()=>y.query.key],()=>{_(),g()},{deep:!0});const w=({key:e})=>{const n=h.findMenuItem({key:"key",value:e});n&&t("menu-select",n)},j=({key:e})=>{const n=k.projectList.find(n=>n.key===e);n&&n.homePage&&window.location.replace(`${location.origin}/view/dashboard${n.homePage}`)};return(0,o.sV)(()=>{_(),g()}),(e,n)=>{const t=r.Ay,c=a.A,l=s.A;return(0,o.uX)(),(0,o.Wv)(m.A,(0,i._B)((0,o.Ng)(e.$props)),{"menu-content":(0,o.k6)(()=>[(0,o.bF)(t,{"selected-keys":f.value,"onUpdate:selectedKeys":n[0]||(n[0]=e=>f.value=e),mode:"horizontal",items:v.value,onClick:w},null,8,["selected-keys","items"])]),"setting-content":(0,o.k6)(()=>[(0,o.bF)(l,null,{overlay:(0,o.k6)(()=>[(0,o.bF)(t,{items:b.value,onClick:j},null,8,["items"])]),default:(0,o.k6)(()=>[(0,o.Lk)("a",{class:"ant-dropdown-link",onClick:n[1]||(n[1]=(0,u.D$)(()=>{},["prevent"]))},[n[2]||(n[2]=(0,o.eW)(" 切换项目 ",-1)),(0,o.bF)(c)])]),_:1})]),"main-content":(0,o.k6)(()=>[(0,o.RG)(e.$slots,"main-content")]),_:3},16)}}};var k=t(8326);const h={__name:"index",setup(e){const n=(0,l.t)(),t=(0,l.n)(),s=d(),a=(0,p.c)(),r=n.query.project_key,i=(0,c.KR)(""),u=e=>{const{key:o,moduleType:s,customConfig:a}=e;if(o===n.query.key)return;const i={sider:"/sider",schema:"/schema",custom:a?.path,iframe:"/iframe"};t.push({path:`/view/dashboard${i[s]}`,query:{project_key:r,key:o}})};return(0,o.sV)(()=>{(async()=>{const{data:e}=await(0,k.lx)("/api/project",{project_key:r});i.value=e.name,a.setMenuList(e.menu)})(),(async()=>{const{data:e}=await(0,k.lx)("/api/project/list",{project_key:r});s.setProjectList(e)})()}),(e,n)=>{const t=(0,o.g2)("router-view");return(0,o.uX)(),(0,o.Wv)(y,{"project-name":i.value,username:"管理员",onMenuSelect:u},{"main-content":(0,o.k6)(()=>[(0,o.bF)(t)]),_:1},8,["project-name"])}}};var v=t(203);const b=[{path:"/view/dashboard/iframe",component:t.e(142).then(t.bind(t,4142))},{path:"/view/dashboard/schema",component:Promise.all([t.e(502),t.e(609)]).then(t.bind(t,1609))},{path:"/view/dashboard/todo",component:t.e(68).then(t.bind(t,7068))},{path:"/view/dashboard/sider",component:t.e(952).then(t.bind(t,6952)),children:[{path:"iframe",component:t.e(142).then(t.bind(t,4142))},{path:"schema",component:Promise.all([t.e(502),t.e(609)]).then(t.bind(t,1609))},{path:"todo",component:t.e(68).then(t.bind(t,7068))}]},{path:"/view/dashboard/sider/:chapter",component:t.e(952).then(t.bind(t,6952))}];(0,v.A)(h,{routes:b})},5621(e,n,t){var o=t(1911),s=t(2846),a=t(6746);const r=(0,o.nY)("menu",()=>{const e=(0,s.KR)([]),n=({key:t,value:o},s=e.value)=>{for(let e=0;e<s.length;e++){const r=(0,a.cloneDeep)(s[e]);if(!r)continue;if(r[t]===o)return r;const{menuType:i,moduleType:u,siderConfig:c}=r;if("group"===i){const e=n({key:t,value:o},r.subMenu);if(e)return e}if("module"===i&&"sider"===u&&c?.menu){const e=n({key:t,value:o},c.menu);if(e)return e}}return null},t=(n=e.value)=>{const o=(0,a.cloneDeep)(n[0]),{menuType:s,subMenu:r}=o;if("group"===s&&r){const e=t(r);if(e)return e}return o},o=(n=e.value,t={})=>(0,a.cloneDeep)(n).map(e=>{const{subMenu:n,menuType:s,moduleType:a,siderConfig:r}=e,i={...e,label:e.name,disabled:t?.disabledCallback&&t.disabledCallback(e)};return"group"===s&&n&&n.length&&(i.children=o(n,t)),"module"===s&&"sider"===a&&r?.menu&&r?.menu?.length&&(i.siderConfig.menu=o(r.menu,t)),i});return{menuList:e,setMenuList:n=>{e.value=n},findMenuItem:n,findFirstMenuItem:t,transfomMenuList:o}});t.d(n,["c",0,r])}},e=>{e.O(0,[502,76],()=>{return n=4409,e(e.s=n);var n});e.O()}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[]).push([[185],{9356(e,l,a){var t=a(4040),n=a(7582),s=a(319),c=a(3526),i=a(2846),o=a(8326);const u={class:"project-list-wrap"},r={class:"project-list"},k=["onClick"],p={__name:"index",setup(e){const l=(0,i.KR)(!1),a=(0,i.KR)([]);return(0,n.sV)(()=>{(async()=>{try{l.value=!0;const{data:e}=await(0,o.lx)("/api/project/modelList");a.value=e}finally{l.value=!1}})()}),(e,l)=>{const i=t.Ay;return(0,n.uX)(),(0,n.Wv)(c.A,null,{"main-content":(0,n.k6)(()=>[(0,n.Lk)("div",u,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(a.value,e=>((0,n.uX)(),(0,n.CE)("div",{key:e.key,class:"model-list"},[(0,n.Lk)("h2",null,(0,s.v_)(e.name),1),(0,n.Lk)("div",r,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.project,e=>((0,n.uX)(),(0,n.Wv)(i,{key:e.key,title:e.name},{extra:(0,n.k6)(()=>[(0,n.Lk)("a",{href:"#",onClick:l=>(e=>{window.open(`${window.location.origin}/view/dashboard${e.homePage}`)})(e)}," 进入 ",8,k)]),default:(0,n.k6)(()=>[(0,n.Lk)("p",null,(0,s.v_)(e.desc),1)]),_:2},1032,["title"]))),128))])]))),128))])]),_:1})}}};const d=(0,a(3367).A)(p,[["__scopeId","data-v-690b58c8"]]);(0,a(203).A)(d)}},e=>{e.O(0,[502,76],()=>{return l=9356,e(e.s=l);var l});e.O()}]);
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,(()=>{const e=[];r.O=(t,n,o,i)=>{if(n){i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];return void(e[a]=[n,o,i])}let l=1/0;for(a=0;a<e.length;a++){let[n,o,i]=e[a],c=!0;for(var s=0;s<n.length;s++)(!1&i||l>=i)&&Object.keys(r.O).every(e=>r.O[e](n[s]))?n.splice(s--,1):(c=!1,i<l&&(l=i));if(c){e.splice(a--,1);const r=o();void 0!==r&&(t=r)}}return t}})(),r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>"js/"+e+"."+{68:"2813fafe",142:"56646c73",609:"8270b20d",952:"c76c04fb"}[e]+".bundle.js",r.miniCssF=e=>"css/async."+e+"."+{609:"bcbe5779",952:"9bc7c180"}[e]+".css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="@slice_cy/elpis:";r.l=(n,o,i,a)=>{if(e[n])return void e[n].push(o);let l,s;if(void 0!==i){const e=document.getElementsByTagName("script");for(var c=0;c<e.length;c++){const r=e[c];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+i){l=r;break}}}l||(s=!0,l=document.createElement("script"),l.charset="utf-8",r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",t+i),l.src=n),e[n]=[o];const d=(t,r)=>{l.onerror=l.onload=null,clearTimeout(u);const o=e[n];if(delete e[n],l.parentNode?.removeChild(l),o?.forEach(e=>e(r)),t)return t(r)},u=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),s&&document.head.appendChild(l)}})(),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},r.p="/dist/prod/",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,n)=>{var o=r.miniCssF(e),i=r.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=(a=r[n]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(o===e||o===t))return a}var i=document.getElementsByTagName("style");for(n=0;n<i.length;n++){var a;if((o=(a=i[n]).getAttribute("data-href"))===e||o===t)return a}})(o,i))return t();((e,t,n,o,i)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",r.nc&&(a.nonce=r.nc),a.onerror=a.onload=r=>{if(a.onerror=a.onload=null,"load"===r.type)o();else{var n=r&&r.type,l=r&&r.target&&r.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+n+": "+l+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=n,s.request=l,a.parentNode&&a.parentNode.removeChild(a),i(s)}},a.href=t,n?n.parentNode.insertBefore(a,n.nextSibling):document.head.appendChild(a)})(e,i,null,t,n)}),t={121:0};r.f.miniCss=(r,n)=>{t[r]?n.push(t[r]):0!==t[r]&&{609:1,952:1}[r]&&n.push(t[r]=e(r).then(()=>{t[r]=0},e=>{throw delete t[r],e}))}}})(),(()=>{const e={121:0};r.f.j=(t,n)=>{let o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else if(121!=t){const i=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=i);const a=r.p+r.u(t),l=new Error,s=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",l.name="ChunkLoadError",l.type=e,l.request=r,o[1](l)}};r.l(a,s,"chunk-"+t,t)}else e[t]=0},r.O.j=t=>0===e[t];const t=(t,n)=>{let[o,i,a]=n;var l,s,c=0;if(o.some(t=>0!==e[t])){for(l in i)r.o(i,l)&&(r.m[l]=i[l]);if(a)var d=a(r)}for(t&&t(n);c<o.length;c++)s=o[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(d)},n=self.webpackChunk_slice_cy_elpis=self.webpackChunk_slice_cy_elpis||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})()})();