@liujitcn/kratos-admin-bi 0.0.0-stage → 0.1.11
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.
- package/README.md +43 -2
- package/dist/package/declarations/index.d.ts +1 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_card.d.ts +18 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_card.js +46 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_dashboard.d.ts +17 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_dashboard.js +30 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_query.d.ts +11 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_query.js +41 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_query_record.d.ts +10 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_query_record.js +14 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_source.d.ts +26 -0
- package/dist/package/declarations/src/api/bi/admin/v1/bi_source.js +46 -0
- package/dist/package/declarations/src/bi-core.d.ts +17 -0
- package/dist/package/declarations/src/bi-core.js +22 -0
- package/dist/package/declarations/src/bi-dashboard-schema.d.ts +31 -0
- package/dist/package/declarations/src/bi-dashboard-schema.js +39 -0
- package/dist/package/declarations/src/bi-messages.d.ts +247 -0
- package/dist/package/declarations/src/bi-messages.js +247 -0
- package/dist/package/declarations/src/bi-response.d.ts +10 -0
- package/dist/package/declarations/src/bi-response.js +33 -0
- package/dist/package/declarations/src/bi-vue.d.ts +10 -0
- package/dist/package/declarations/src/bi-vue.js +10 -0
- package/dist/package/declarations/src/card-schema.d.ts +30 -0
- package/dist/package/declarations/src/card-schema.js +87 -0
- package/dist/package/declarations/src/components/BiCardChartEditor.vue.d.ts +17 -0
- package/dist/package/declarations/src/components/BiCardChartEditor.vue.js +527 -0
- package/dist/package/declarations/src/components/BiCardFormDialog.vue.d.ts +20 -0
- package/dist/package/declarations/src/components/BiCardFormDialog.vue.js +495 -0
- package/dist/package/declarations/src/components/BiCardLibrary.vue.d.ts +3 -0
- package/dist/package/declarations/src/components/BiCardLibrary.vue.js +807 -0
- package/dist/package/declarations/src/components/BiCardVisualization.vue.d.ts +10 -0
- package/dist/package/declarations/src/components/BiCardVisualization.vue.js +97 -0
- package/dist/package/declarations/src/components/BiChart.vue.d.ts +20 -0
- package/dist/package/declarations/src/components/BiChart.vue.js +112 -0
- package/dist/package/declarations/src/components/BiDashboard.vue.d.ts +9 -0
- package/dist/package/declarations/src/components/BiDashboard.vue.js +81 -0
- package/dist/package/declarations/src/components/BiDashboardMenuDialog.vue.d.ts +12 -0
- package/dist/package/declarations/src/components/BiDashboardMenuDialog.vue.js +252 -0
- package/dist/package/declarations/src/components/BiDataCard.vue.d.ts +36 -0
- package/dist/package/declarations/src/components/BiDataCard.vue.js +372 -0
- package/dist/package/declarations/src/components/BiDesigner.vue.d.ts +17 -0
- package/dist/package/declarations/src/components/BiDesigner.vue.js +666 -0
- package/dist/package/declarations/src/components/BiSourceModelDialog.vue.d.ts +17 -0
- package/dist/package/declarations/src/components/BiSourceModelDialog.vue.js +2118 -0
- package/dist/package/declarations/src/components/BiWorkbenchPreview.vue.d.ts +7 -0
- package/dist/package/declarations/src/components/BiWorkbenchPreview.vue.js +176 -0
- package/dist/package/declarations/src/components/source-model-layout.d.ts +3 -0
- package/dist/package/declarations/src/components/source-model-layout.js +66 -0
- package/dist/package/declarations/src/dataset/index.d.ts +7 -0
- package/dist/package/declarations/src/dataset/index.js +25 -0
- package/dist/package/declarations/src/dataset/labels.d.ts +2 -0
- package/dist/package/declarations/src/dataset/labels.js +21 -0
- package/dist/package/declarations/src/dataset/transform.d.ts +20 -0
- package/dist/package/declarations/src/dataset/transform.js +173 -0
- package/dist/package/declarations/src/engine/chart-types.d.ts +14 -0
- package/dist/package/declarations/src/engine/chart-types.js +37 -0
- package/dist/package/declarations/src/engine/echarts.d.ts +16 -0
- package/dist/package/declarations/src/engine/echarts.js +491 -0
- package/dist/package/declarations/src/engine/types.d.ts +36 -0
- package/dist/package/declarations/src/engine/types.js +20 -0
- package/dist/package/declarations/src/env.d.ts +17 -0
- package/dist/package/declarations/src/env.js +67 -0
- package/dist/package/declarations/src/index.d.ts +1 -0
- package/dist/package/declarations/src/index.js +1 -0
- package/dist/package/declarations/src/locales/en-US.json +254 -0
- package/dist/package/declarations/src/locales/generated.d.ts +1021 -0
- package/dist/package/declarations/src/locales/generated.js +13 -0
- package/dist/package/declarations/src/locales/ja-JP.json +254 -0
- package/dist/package/declarations/src/locales/zh-CN.json +254 -0
- package/dist/package/declarations/src/locales/zh-TW.json +254 -0
- package/dist/package/declarations/src/module.d.ts +2 -0
- package/dist/package/declarations/src/module.js +9 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_card.d.ts +145 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_card.js +6 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_dashboard.d.ts +107 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_dashboard.js +6 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query.d.ts +157 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query.js +6 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query_record.d.ts +83 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query_record.js +15 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_source.d.ts +301 -0
- package/dist/package/declarations/src/rpc/bi/admin/v1/bi_source.js +6 -0
- package/dist/package/declarations/src/rpc/common/v1/types.d.ts +60 -0
- package/dist/package/declarations/src/rpc/common/v1/types.js +6 -0
- package/dist/package/declarations/src/schema/layout.d.ts +7 -0
- package/dist/package/declarations/src/schema/layout.js +52 -0
- package/dist/package/declarations/src/schema/types.d.ts +83 -0
- package/dist/package/declarations/src/schema/types.js +1 -0
- package/dist/package/declarations/src/theme/index.d.ts +29 -0
- package/dist/package/declarations/src/theme/index.js +83 -0
- package/dist/package/declarations/src/theme/palettes.d.ts +7 -0
- package/dist/package/declarations/src/theme/palettes.js +28 -0
- package/dist/package/declarations/src/theme/presets.d.ts +73 -0
- package/dist/package/declarations/src/theme/presets.js +235 -0
- package/dist/package/declarations/src/views/card/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/card/index.vue.js +18 -0
- package/dist/package/declarations/src/views/dashboard/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/dashboard/index.vue.js +107 -0
- package/dist/package/declarations/src/views/designer/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/designer/index.vue.js +332 -0
- package/dist/package/declarations/src/views/manage/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/manage/index.vue.js +325 -0
- package/dist/package/declarations/src/views/query/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/query/index.vue.js +876 -0
- package/dist/package/declarations/src/views/source/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/source/index.vue.js +343 -0
- package/dist/package/declarations/src/views/workbench/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/workbench/index.vue.js +362 -0
- package/dist/package/src/api/bi/admin/v1/bi_card.ts +67 -0
- package/dist/package/src/api/bi/admin/v1/bi_dashboard.ts +51 -0
- package/dist/package/src/api/bi/admin/v1/bi_query.ts +55 -0
- package/dist/package/src/api/bi/admin/v1/bi_query_record.ts +25 -0
- package/dist/package/src/api/bi/admin/v1/bi_source.ts +80 -0
- package/dist/package/src/bi-core.ts +43 -0
- package/dist/package/src/bi-dashboard-schema.ts +69 -0
- package/dist/package/src/bi-messages.ts +249 -0
- package/dist/package/src/bi-response.ts +39 -0
- package/dist/package/src/bi-vue.ts +13 -0
- package/dist/package/src/card-schema.ts +111 -0
- package/dist/package/src/components/BiCardChartEditor.vue +139 -0
- package/dist/package/src/components/BiCardFormDialog.vue +289 -0
- package/dist/package/src/components/BiCardLibrary.vue +310 -0
- package/dist/package/src/components/BiCardVisualization.vue +95 -0
- package/dist/package/src/components/BiChart.vue +134 -0
- package/dist/package/src/components/BiDashboard.vue +53 -0
- package/dist/package/src/components/BiDashboardMenuDialog.vue +177 -0
- package/dist/package/src/components/BiDataCard.vue +231 -0
- package/dist/package/src/components/BiDesigner.vue +287 -0
- package/dist/package/src/components/BiSourceModelDialog.vue +846 -0
- package/dist/package/src/components/BiWorkbenchPreview.vue +131 -0
- package/dist/package/src/components/source-model-layout.ts +62 -0
- package/dist/package/src/dataset/index.ts +28 -0
- package/dist/package/src/dataset/labels.ts +19 -0
- package/dist/package/src/dataset/transform.ts +189 -0
- package/dist/package/src/engine/chart-types.ts +44 -0
- package/dist/package/src/engine/echarts.ts +568 -0
- package/dist/package/src/engine/types.ts +60 -0
- package/dist/package/src/env.ts +82 -0
- package/dist/package/src/index.ts +1 -0
- package/dist/package/src/locales/en-US.json +254 -0
- package/dist/package/src/locales/generated.ts +16 -0
- package/dist/package/src/locales/ja-JP.json +254 -0
- package/dist/package/src/locales/zh-CN.json +254 -0
- package/dist/package/src/locales/zh-TW.json +254 -0
- package/dist/package/src/module.ts +12 -0
- package/dist/package/src/rpc/bi/admin/v1/bi_card.ts +169 -0
- package/dist/package/src/rpc/bi/admin/v1/bi_dashboard.ts +126 -0
- package/dist/package/src/rpc/bi/admin/v1/bi_query.ts +187 -0
- package/dist/package/src/rpc/bi/admin/v1/bi_query_record.ts +98 -0
- package/dist/package/src/rpc/bi/admin/v1/bi_source.ts +338 -0
- package/dist/package/src/rpc/common/v1/types.ts +77 -0
- package/dist/package/src/schema/layout.ts +54 -0
- package/dist/package/src/schema/types.ts +103 -0
- package/dist/package/src/styles.scss +1 -0
- package/dist/package/src/theme/index.ts +108 -0
- package/dist/package/src/theme/palettes.ts +34 -0
- package/dist/package/src/theme/presets.ts +278 -0
- package/dist/package/src/views/card/index.vue +5 -0
- package/dist/package/src/views/dashboard/index.vue +58 -0
- package/dist/package/src/views/designer/index.vue +164 -0
- package/dist/package/src/views/manage/index.vue +276 -0
- package/dist/package/src/views/query/index.vue +593 -0
- package/dist/package/src/views/source/index.vue +214 -0
- package/dist/package/src/views/workbench/index.vue +208 -0
- package/package.json +67 -3
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
/// <reference types="../../../../../node_modules/.pnpm/@vue+language-core@3.3.13/node_modules/@vue/language-core/types/template-helpers.d.ts" />
|
|
2
|
+
/// <reference types="../../../../../node_modules/.pnpm/@vue+language-core@3.3.13/node_modules/@vue/language-core/types/props-fallback.d.ts" />
|
|
3
|
+
import { computed, onMounted, onActivated, reactive, ref } from "vue";
|
|
4
|
+
import { useRouter } from "vue-router";
|
|
5
|
+
import { t } from "@liujitcn/kratos-admin-core";
|
|
6
|
+
import FormDialog from "@liujitcn/kratos-admin-core/components/Dialog/FormDialog.vue";
|
|
7
|
+
import { defBiCardService } from "../api/bi/admin/v1/bi_card";
|
|
8
|
+
import { defBiQueryService } from "../api/bi/admin/v1/bi_query";
|
|
9
|
+
import { defBiDashboardService } from "../api/bi/admin/v1/bi_dashboard";
|
|
10
|
+
import { parseDashboardLayout, reflowDashboardCards } from "../bi-dashboard-schema";
|
|
11
|
+
import BiDataCard from "./BiDataCard.vue";
|
|
12
|
+
import BiCardFormDialog from "./BiCardFormDialog.vue";
|
|
13
|
+
const icons = { Star, StarFilled, Search };
|
|
14
|
+
const router = useRouter(), cards = ref([]), sources = ref([]), name = ref(""), sourceCode = ref(""), category = ref(""), page = ref(1), total = ref(0), loading = ref(false), saving = ref(false), editorOpen = ref(false), dashboardOpen = ref(false), editingCard = ref(), previewCard = ref(), addingCard = ref(), dashboards = ref([]);
|
|
15
|
+
const categories = ["", "mine", "favorite", "shared", "system"];
|
|
16
|
+
const counts = ref({ all: 0, system: 0, mine: 0, favorite: 0, shared: 0 });
|
|
17
|
+
const workbench = ref({ dashboard_ids: [], favorite_ids: [], dashboards: [] });
|
|
18
|
+
const target = reactive({ id: undefined });
|
|
19
|
+
let request = 0, loaded = false;
|
|
20
|
+
const dashboardFields = computed(() => [
|
|
21
|
+
{
|
|
22
|
+
prop: "id",
|
|
23
|
+
label: t("bi.dashboard.title"),
|
|
24
|
+
component: "select",
|
|
25
|
+
options: dashboards.value.map(item => ({ label: item.name, value: item.id })),
|
|
26
|
+
props: { filterable: true }
|
|
27
|
+
}
|
|
28
|
+
]);
|
|
29
|
+
/** 按同一过滤条件查询当前可见卡片,丢弃迟到请求。 */
|
|
30
|
+
async function loadCards() {
|
|
31
|
+
const current = ++request;
|
|
32
|
+
loading.value = true;
|
|
33
|
+
try {
|
|
34
|
+
const data = await defBiCardService.PageBiCard({
|
|
35
|
+
name: name.value,
|
|
36
|
+
source_code: sourceCode.value,
|
|
37
|
+
category: category.value,
|
|
38
|
+
search_source_codes: sources.value.filter(item => item.name.includes(name.value)).map(item => item.code),
|
|
39
|
+
page_num: page.value,
|
|
40
|
+
page_size: 100
|
|
41
|
+
});
|
|
42
|
+
if (current !== request)
|
|
43
|
+
return;
|
|
44
|
+
cards.value = data.cards;
|
|
45
|
+
total.value = data.total;
|
|
46
|
+
counts.value = data.counts;
|
|
47
|
+
loaded = true;
|
|
48
|
+
}
|
|
49
|
+
catch (cause) {
|
|
50
|
+
ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
if (current === request)
|
|
54
|
+
loading.value = false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** 搜索或切换分类时从第一页开始。 */
|
|
58
|
+
function search() {
|
|
59
|
+
page.value = 1;
|
|
60
|
+
void loadCards();
|
|
61
|
+
}
|
|
62
|
+
/** 预加载查询目录和收藏后刷新列表。 */
|
|
63
|
+
async function reload() {
|
|
64
|
+
try {
|
|
65
|
+
const [dictionary, config] = await Promise.all([defBiQueryService.ListBiSources({}), defBiCardService.GetBiWorkbench({})]);
|
|
66
|
+
sources.value = dictionary.sources;
|
|
67
|
+
workbench.value = config;
|
|
68
|
+
await loadCards();
|
|
69
|
+
}
|
|
70
|
+
catch (cause) {
|
|
71
|
+
ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** 打开已有卡片的编辑表单。 */
|
|
75
|
+
function openEditor(card) {
|
|
76
|
+
editingCard.value = card;
|
|
77
|
+
editorOpen.value = true;
|
|
78
|
+
}
|
|
79
|
+
/** 保存收藏后只更新星标选中状态,保持当前列表和图表实例。 */
|
|
80
|
+
async function toggleFavorite(card) {
|
|
81
|
+
try {
|
|
82
|
+
const latest = await defBiCardService.GetBiWorkbench({});
|
|
83
|
+
const ids = latest.favorite_ids.includes(card.id)
|
|
84
|
+
? latest.favorite_ids.filter(id => id !== card.id)
|
|
85
|
+
: [...latest.favorite_ids, card.id];
|
|
86
|
+
const saved = await defBiCardService.SaveBiWorkbench({ dashboard_ids: latest.dashboard_ids, favorite_ids: ids });
|
|
87
|
+
workbench.value.favorite_ids = saved.favorite_ids;
|
|
88
|
+
}
|
|
89
|
+
catch (cause) {
|
|
90
|
+
ElMessage.error(cause instanceof Error ? cause.message : t("bi.card.save_failed"));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/** 删除当前用户自己的卡片,确认时展示卡片名称。 */
|
|
94
|
+
async function remove(card) {
|
|
95
|
+
try {
|
|
96
|
+
await ElMessageBox.confirm(t("bi.card.delete_confirm", { name: card.name }), t("common.action.delete"), { type: "warning" });
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
await defBiCardService.DeleteBiCard({ id: card.id });
|
|
103
|
+
await reload();
|
|
104
|
+
}
|
|
105
|
+
catch (cause) {
|
|
106
|
+
ElMessage.error(cause instanceof Error ? cause.message : t("bi.card.delete_failed"));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/** 选择当前用户可编辑的仪表盘草稿。 */
|
|
110
|
+
async function pickDashboard(card) {
|
|
111
|
+
try {
|
|
112
|
+
const result = [];
|
|
113
|
+
let current = 1;
|
|
114
|
+
while (true) {
|
|
115
|
+
const data = await defBiDashboardService.PageBiDashboard({ name: "", page_num: current, page_size: 100 });
|
|
116
|
+
result.push(...data.dashboards.filter(item => item.can_edit));
|
|
117
|
+
if (current * 100 >= data.total || !data.dashboards.length)
|
|
118
|
+
break;
|
|
119
|
+
current++;
|
|
120
|
+
}
|
|
121
|
+
if (!result.length) {
|
|
122
|
+
ElMessage.info(t("bi.card.create_dashboard_first"));
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
dashboards.value = result;
|
|
126
|
+
addingCard.value = card;
|
|
127
|
+
target.id = undefined;
|
|
128
|
+
dashboardOpen.value = true;
|
|
129
|
+
}
|
|
130
|
+
catch (cause) {
|
|
131
|
+
ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/** 只追加卡片引用,发布之前不改变正式仪表盘。 */
|
|
135
|
+
async function addToDashboard() {
|
|
136
|
+
if (!target.id || !addingCard.value || saving.value)
|
|
137
|
+
return;
|
|
138
|
+
saving.value = true;
|
|
139
|
+
try {
|
|
140
|
+
const item = await defBiDashboardService.GetBiDashboard({ id: target.id });
|
|
141
|
+
const layout = parseDashboardLayout(item.schema_json);
|
|
142
|
+
if (layout.cards.some(item => item.card_id === addingCard.value.id)) {
|
|
143
|
+
ElMessage.info(t("bi.card.already_in_dashboard"));
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
layout.cards = reflowDashboardCards([
|
|
147
|
+
...layout.cards,
|
|
148
|
+
{ id: `card_${addingCard.value.id}`, card_id: addingCard.value.id, w: 6, h: 4 }
|
|
149
|
+
]);
|
|
150
|
+
await defBiDashboardService.SaveBiDashboard({ dashboard: { ...item, schema_json: JSON.stringify(layout) } });
|
|
151
|
+
dashboardOpen.value = false;
|
|
152
|
+
ElMessage.success(t("bi.card.add_dashboard_success"));
|
|
153
|
+
}
|
|
154
|
+
catch (cause) {
|
|
155
|
+
ElMessage.error(cause instanceof Error ? cause.message : t("bi.card.save_failed"));
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
saving.value = false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
onMounted(() => void reload());
|
|
162
|
+
onActivated(() => {
|
|
163
|
+
if (loaded)
|
|
164
|
+
void reload();
|
|
165
|
+
});
|
|
166
|
+
const __VLS_ctx = {};
|
|
167
|
+
let __VLS_components;
|
|
168
|
+
let __VLS_intrinsics;
|
|
169
|
+
let __VLS_directives;
|
|
170
|
+
void __VLS_ctx, __VLS_components, __VLS_intrinsics, __VLS_directives;
|
|
171
|
+
// @ts-ignore
|
|
172
|
+
__VLS_withDotValue(counts, {});
|
|
173
|
+
// @ts-ignore
|
|
174
|
+
__VLS_withDotValue(icons, {});
|
|
175
|
+
// @ts-ignore
|
|
176
|
+
__VLS_withDotValue(loading, {});
|
|
177
|
+
// @ts-ignore
|
|
178
|
+
__VLS_withDotValue(cards, {});
|
|
179
|
+
// @ts-ignore
|
|
180
|
+
__VLS_withDotValue(sources, {});
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
__VLS_withDotValue(workbench, {});
|
|
183
|
+
// @ts-ignore
|
|
184
|
+
__VLS_withDotValue(previewCard, {});
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
__VLS_withDotValue(router, {});
|
|
187
|
+
// @ts-ignore
|
|
188
|
+
__VLS_withDotValue(target, {});
|
|
189
|
+
void {};
|
|
190
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__filters']} */ ;
|
|
191
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__filters']} */ ;
|
|
192
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__filters']} */ ;
|
|
193
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library']} */ ;
|
|
194
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__grid']} */ ;
|
|
195
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__grid']} */ ;
|
|
196
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__filters']} */ ;
|
|
197
|
+
/** @type {__VLS_StyleScopedClasses['el-input']} */ ;
|
|
198
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__filters']} */ ;
|
|
199
|
+
/** @type {__VLS_StyleScopedClasses['el-select']} */ ;
|
|
200
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.main, __VLS_intrinsics.main)({
|
|
201
|
+
...{ class: "bi-card-library" },
|
|
202
|
+
});
|
|
203
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library']} */ ;
|
|
204
|
+
let __VLS_0;
|
|
205
|
+
/** @ts-ignore @type { | typeof __VLS_components.elCard | typeof __VLS_components.ElCard | typeof __VLS_components['el-card'] | typeof __VLS_components.elCard | typeof __VLS_components.ElCard | typeof __VLS_components['el-card']} */
|
|
206
|
+
elCard;
|
|
207
|
+
// @ts-ignore
|
|
208
|
+
const __VLS_1 = __VLS_asFunctionalComponent1(__VLS_0, new __VLS_0({
|
|
209
|
+
// @ts-ignore
|
|
210
|
+
...{ class: "admin-page-card" }, shadow: "never",
|
|
211
|
+
}));
|
|
212
|
+
const __VLS_2 = __VLS_1({
|
|
213
|
+
...{ class: "admin-page-card" },
|
|
214
|
+
shadow: "never",
|
|
215
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
216
|
+
/** @type {__VLS_StyleScopedClasses['admin-page-card']} */ ;
|
|
217
|
+
const { default: __VLS_5 } = __VLS_nonNull(__VLS_3.slots);
|
|
218
|
+
let __VLS_6;
|
|
219
|
+
/** @ts-ignore @type { | typeof __VLS_components.elTabs | typeof __VLS_components.ElTabs | typeof __VLS_components['el-tabs'] | typeof __VLS_components.elTabs | typeof __VLS_components.ElTabs | typeof __VLS_components['el-tabs']} */
|
|
220
|
+
elTabs;
|
|
221
|
+
// @ts-ignore
|
|
222
|
+
const __VLS_7 = __VLS_asFunctionalComponent1(__VLS_6, new __VLS_6({
|
|
223
|
+
// @ts-ignore
|
|
224
|
+
...{ 'onTabChange': {} }, modelValue: (__VLS_unwrap(category, {})),
|
|
225
|
+
}));
|
|
226
|
+
const __VLS_8 = __VLS_7({
|
|
227
|
+
...{ 'onTabChange': {} },
|
|
228
|
+
modelValue: (__VLS_unwrap(category, {})),
|
|
229
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
230
|
+
let __VLS_11;
|
|
231
|
+
const __VLS_12 = {
|
|
232
|
+
/** @type {typeof __VLS_11.tabChange} */
|
|
233
|
+
onTabChange: (search),
|
|
234
|
+
};
|
|
235
|
+
void __VLS_12;
|
|
236
|
+
const { default: __VLS_13 } = __VLS_nonNull(__VLS_9.slots);
|
|
237
|
+
const __VLS_14 = __VLS_tryAsConstant((__VLS_unwrap(categories, {})));
|
|
238
|
+
for (const [item] of __VLS_vFor(__VLS_nonNull(__VLS_14))) {
|
|
239
|
+
let __VLS_15;
|
|
240
|
+
/** @ts-ignore @type { | typeof __VLS_components.elTabPane | typeof __VLS_components.ElTabPane | typeof __VLS_components['el-tab-pane'] | typeof __VLS_components.elTabPane | typeof __VLS_components.ElTabPane | typeof __VLS_components['el-tab-pane']} */
|
|
241
|
+
elTabPane;
|
|
242
|
+
// @ts-ignore
|
|
243
|
+
const __VLS_16 = __VLS_asFunctionalComponent1(__VLS_15, new __VLS_15({
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
key: (item), name: (item),
|
|
246
|
+
}));
|
|
247
|
+
const __VLS_17 = __VLS_16({
|
|
248
|
+
key: (item),
|
|
249
|
+
name: (item),
|
|
250
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_16));
|
|
251
|
+
const { default: __VLS_20 } = __VLS_nonNull(__VLS_18.slots);
|
|
252
|
+
{
|
|
253
|
+
const { label: __VLS_21 } = __VLS_nonNull(__VLS_18.slots);
|
|
254
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
|
|
255
|
+
(__VLS_unwrap(t, {})(`bi.card.category.${item || "all"}`));
|
|
256
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.small, __VLS_intrinsics.small)({
|
|
257
|
+
...{ class: "bi-card-library__count" },
|
|
258
|
+
});
|
|
259
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__count']} */ ;
|
|
260
|
+
(counts.value[item || "all"]);
|
|
261
|
+
// @ts-ignore
|
|
262
|
+
[category, categories, t, counts,];
|
|
263
|
+
}
|
|
264
|
+
// @ts-ignore
|
|
265
|
+
[];
|
|
266
|
+
var __VLS_18;
|
|
267
|
+
// @ts-ignore
|
|
268
|
+
[];
|
|
269
|
+
}
|
|
270
|
+
// @ts-ignore
|
|
271
|
+
[];
|
|
272
|
+
var __VLS_9;
|
|
273
|
+
var __VLS_10;
|
|
274
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
|
|
275
|
+
...{ class: "bi-card-library__filters" },
|
|
276
|
+
});
|
|
277
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__filters']} */ ;
|
|
278
|
+
let __VLS_22;
|
|
279
|
+
/** @ts-ignore @type { | typeof __VLS_components.elInput | typeof __VLS_components.ElInput | typeof __VLS_components['el-input']} */
|
|
280
|
+
elInput;
|
|
281
|
+
// @ts-ignore
|
|
282
|
+
const __VLS_23 = __VLS_asFunctionalComponent1(__VLS_22, new __VLS_22({
|
|
283
|
+
// @ts-ignore
|
|
284
|
+
...{ 'onKeyup': {} }, ...{ 'onClear': {} }, modelValue: (__VLS_unwrap(name, {})), placeholder: (__VLS_unwrap(t, {})('bi.card.search')), clearable: true,
|
|
285
|
+
}));
|
|
286
|
+
const __VLS_24 = __VLS_23({
|
|
287
|
+
...{ 'onKeyup': {} },
|
|
288
|
+
...{ 'onClear': {} },
|
|
289
|
+
modelValue: (__VLS_unwrap(name, {})),
|
|
290
|
+
placeholder: (__VLS_unwrap(t, {})('bi.card.search')),
|
|
291
|
+
clearable: true,
|
|
292
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_23));
|
|
293
|
+
let __VLS_27;
|
|
294
|
+
const __VLS_28 = {
|
|
295
|
+
/** @type {typeof __VLS_27.keyup} */
|
|
296
|
+
onKeyup: (search),
|
|
297
|
+
};
|
|
298
|
+
void __VLS_28;
|
|
299
|
+
const __VLS_29 = {
|
|
300
|
+
/** @type {typeof __VLS_27.clear} */
|
|
301
|
+
onClear: (search),
|
|
302
|
+
};
|
|
303
|
+
void __VLS_29;
|
|
304
|
+
var __VLS_25;
|
|
305
|
+
var __VLS_26;
|
|
306
|
+
let __VLS_30;
|
|
307
|
+
/** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
|
|
308
|
+
elSelect;
|
|
309
|
+
// @ts-ignore
|
|
310
|
+
const __VLS_31 = __VLS_asFunctionalComponent1(__VLS_30, new __VLS_30({
|
|
311
|
+
// @ts-ignore
|
|
312
|
+
...{ 'onChange': {} }, modelValue: (__VLS_unwrap(sourceCode, {})), placeholder: (__VLS_unwrap(t, {})('bi.card.all_sources')), clearable: true,
|
|
313
|
+
}));
|
|
314
|
+
const __VLS_32 = __VLS_31({
|
|
315
|
+
...{ 'onChange': {} },
|
|
316
|
+
modelValue: (__VLS_unwrap(sourceCode, {})),
|
|
317
|
+
placeholder: (__VLS_unwrap(t, {})('bi.card.all_sources')),
|
|
318
|
+
clearable: true,
|
|
319
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_31));
|
|
320
|
+
let __VLS_35;
|
|
321
|
+
const __VLS_36 = {
|
|
322
|
+
/** @type {typeof __VLS_35.change} */
|
|
323
|
+
onChange: (search),
|
|
324
|
+
};
|
|
325
|
+
void __VLS_36;
|
|
326
|
+
const { default: __VLS_37 } = __VLS_nonNull(__VLS_33.slots);
|
|
327
|
+
const __VLS_38 = __VLS_tryAsConstant((sources.value));
|
|
328
|
+
for (const [item] of __VLS_vFor(__VLS_nonNull(__VLS_38))) {
|
|
329
|
+
let __VLS_39;
|
|
330
|
+
/** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
|
|
331
|
+
elOption;
|
|
332
|
+
// @ts-ignore
|
|
333
|
+
const __VLS_40 = __VLS_asFunctionalComponent1(__VLS_39, new __VLS_39({
|
|
334
|
+
// @ts-ignore
|
|
335
|
+
key: (item.code), label: (item.name), value: (item.code),
|
|
336
|
+
}));
|
|
337
|
+
const __VLS_41 = __VLS_40({
|
|
338
|
+
key: (item.code),
|
|
339
|
+
label: (item.name),
|
|
340
|
+
value: (item.code),
|
|
341
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_40));
|
|
342
|
+
// @ts-ignore
|
|
343
|
+
[t, t, name, sourceCode, sources,];
|
|
344
|
+
}
|
|
345
|
+
// @ts-ignore
|
|
346
|
+
[];
|
|
347
|
+
var __VLS_33;
|
|
348
|
+
var __VLS_34;
|
|
349
|
+
let __VLS_44;
|
|
350
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
351
|
+
elButton;
|
|
352
|
+
// @ts-ignore
|
|
353
|
+
const __VLS_45 = __VLS_asFunctionalComponent1(__VLS_44, new __VLS_44({
|
|
354
|
+
// @ts-ignore
|
|
355
|
+
...{ 'onClick': {} }, type: "primary", icon: (icons.value.Search), loading: (loading.value),
|
|
356
|
+
}));
|
|
357
|
+
const __VLS_46 = __VLS_45({
|
|
358
|
+
...{ 'onClick': {} },
|
|
359
|
+
type: "primary",
|
|
360
|
+
icon: (icons.value.Search),
|
|
361
|
+
loading: (loading.value),
|
|
362
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_45));
|
|
363
|
+
let __VLS_49;
|
|
364
|
+
const __VLS_50 = {
|
|
365
|
+
/** @type {typeof __VLS_49.click} */
|
|
366
|
+
onClick: (search),
|
|
367
|
+
};
|
|
368
|
+
void __VLS_50;
|
|
369
|
+
const { default: __VLS_51 } = __VLS_nonNull(__VLS_47.slots);
|
|
370
|
+
(__VLS_unwrap(t, {})("common.action.search"));
|
|
371
|
+
// @ts-ignore
|
|
372
|
+
[t, icons, loading,];
|
|
373
|
+
var __VLS_47;
|
|
374
|
+
var __VLS_48;
|
|
375
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
|
|
376
|
+
(__VLS_unwrap(t, {})("bi.card.total", { count: __VLS_unwrap(total, {}) }));
|
|
377
|
+
// @ts-ignore
|
|
378
|
+
[t, total,];
|
|
379
|
+
var __VLS_3;
|
|
380
|
+
if (loading.value) {
|
|
381
|
+
let __VLS_52;
|
|
382
|
+
/** @ts-ignore @type { | typeof __VLS_components.elSkeleton | typeof __VLS_components.ElSkeleton | typeof __VLS_components['el-skeleton']} */
|
|
383
|
+
elSkeleton;
|
|
384
|
+
// @ts-ignore
|
|
385
|
+
const __VLS_53 = __VLS_asFunctionalComponent1(__VLS_52, new __VLS_52({
|
|
386
|
+
// @ts-ignore
|
|
387
|
+
rows: (6), animated: true,
|
|
388
|
+
}));
|
|
389
|
+
const __VLS_54 = __VLS_53({
|
|
390
|
+
rows: (6),
|
|
391
|
+
animated: true,
|
|
392
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_53));
|
|
393
|
+
}
|
|
394
|
+
else if (!cards.value.length) {
|
|
395
|
+
let __VLS_57;
|
|
396
|
+
/** @ts-ignore @type { | typeof __VLS_components.elEmpty | typeof __VLS_components.ElEmpty | typeof __VLS_components['el-empty']} */
|
|
397
|
+
elEmpty;
|
|
398
|
+
// @ts-ignore
|
|
399
|
+
const __VLS_58 = __VLS_asFunctionalComponent1(__VLS_57, new __VLS_57({
|
|
400
|
+
// @ts-ignore
|
|
401
|
+
description: (__VLS_unwrap(t, {})('bi.card.empty')),
|
|
402
|
+
}));
|
|
403
|
+
const __VLS_59 = __VLS_58({
|
|
404
|
+
description: (__VLS_unwrap(t, {})('bi.card.empty')),
|
|
405
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_58));
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
|
|
409
|
+
...{ class: "bi-card-library__grid" },
|
|
410
|
+
});
|
|
411
|
+
/** @type {__VLS_StyleScopedClasses['bi-card-library__grid']} */ ;
|
|
412
|
+
const __VLS_62 = __VLS_tryAsConstant((cards.value));
|
|
413
|
+
for (const [card] of __VLS_vFor(__VLS_nonNull(__VLS_62))) {
|
|
414
|
+
const __VLS_63 = BiDataCard || BiDataCard;
|
|
415
|
+
// @ts-ignore
|
|
416
|
+
const __VLS_64 = __VLS_asFunctionalComponent1(__VLS_63, new __VLS_63({
|
|
417
|
+
// @ts-ignore
|
|
418
|
+
key: (card.id), card: (card), sourceName: (sources.value.find(item => item.code === card.source_code)?.name || card.source_code),
|
|
419
|
+
}));
|
|
420
|
+
const __VLS_65 = __VLS_64({
|
|
421
|
+
key: (card.id),
|
|
422
|
+
card: (card),
|
|
423
|
+
sourceName: (sources.value.find(item => item.code === card.source_code)?.name || card.source_code),
|
|
424
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_64));
|
|
425
|
+
const { default: __VLS_68 } = __VLS_nonNull(__VLS_66.slots);
|
|
426
|
+
{
|
|
427
|
+
const { actions: __VLS_69 } = __VLS_nonNull(__VLS_66.slots);
|
|
428
|
+
let __VLS_70;
|
|
429
|
+
/** @ts-ignore @type { | typeof __VLS_components.elTooltip | typeof __VLS_components.ElTooltip | typeof __VLS_components['el-tooltip'] | typeof __VLS_components.elTooltip | typeof __VLS_components.ElTooltip | typeof __VLS_components['el-tooltip']} */
|
|
430
|
+
elTooltip;
|
|
431
|
+
// @ts-ignore
|
|
432
|
+
const __VLS_71 = __VLS_asFunctionalComponent1(__VLS_70, new __VLS_70({
|
|
433
|
+
// @ts-ignore
|
|
434
|
+
content: (__VLS_unwrap(t, {})(workbench.value.favorite_ids.includes(card.id) ? 'bi.card.unfavorite' : 'bi.card.favorite', { name: card.name })),
|
|
435
|
+
}));
|
|
436
|
+
const __VLS_72 = __VLS_71({
|
|
437
|
+
content: (__VLS_unwrap(t, {})(workbench.value.favorite_ids.includes(card.id) ? 'bi.card.unfavorite' : 'bi.card.favorite', { name: card.name })),
|
|
438
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_71));
|
|
439
|
+
const { default: __VLS_75 } = __VLS_nonNull(__VLS_73.slots);
|
|
440
|
+
let __VLS_76;
|
|
441
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
442
|
+
elButton;
|
|
443
|
+
// @ts-ignore
|
|
444
|
+
const __VLS_77 = __VLS_asFunctionalComponent1(__VLS_76, new __VLS_76({
|
|
445
|
+
// @ts-ignore
|
|
446
|
+
...{ 'onClick': {} }, text: true, circle: true, type: (workbench.value.favorite_ids.includes(card.id) ? 'warning' : 'default'), icon: (workbench.value.favorite_ids.includes(card.id) ? icons.value.StarFilled : icons.value.Star), 'aria-label': (__VLS_unwrap(t, {})(workbench.value.favorite_ids.includes(card.id) ? 'bi.card.unfavorite' : 'bi.card.favorite', { name: card.name })), 'aria-pressed': (workbench.value.favorite_ids.includes(card.id)),
|
|
447
|
+
}));
|
|
448
|
+
const __VLS_78 = __VLS_77({
|
|
449
|
+
...{ 'onClick': {} },
|
|
450
|
+
text: true,
|
|
451
|
+
circle: true,
|
|
452
|
+
type: (workbench.value.favorite_ids.includes(card.id) ? 'warning' : 'default'),
|
|
453
|
+
icon: (workbench.value.favorite_ids.includes(card.id) ? icons.value.StarFilled : icons.value.Star),
|
|
454
|
+
'aria-label': (__VLS_unwrap(t, {})(workbench.value.favorite_ids.includes(card.id) ? 'bi.card.unfavorite' : 'bi.card.favorite', { name: card.name })),
|
|
455
|
+
'aria-pressed': (workbench.value.favorite_ids.includes(card.id)),
|
|
456
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_77));
|
|
457
|
+
let __VLS_81;
|
|
458
|
+
const __VLS_82 = {
|
|
459
|
+
/** @type {typeof __VLS_81.click} */
|
|
460
|
+
onClick: // @ts-ignore
|
|
461
|
+
(...[$event]) => {
|
|
462
|
+
void $event;
|
|
463
|
+
if (!!(loading.value))
|
|
464
|
+
throw 0;
|
|
465
|
+
if (!!(!cards.value.length))
|
|
466
|
+
throw 0;
|
|
467
|
+
return (toggleFavorite(card));
|
|
468
|
+
// @ts-ignore
|
|
469
|
+
[t, t, t, sources, icons, icons, loading, cards, cards, workbench, workbench, workbench, workbench, workbench,];
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
void __VLS_82;
|
|
473
|
+
var __VLS_79;
|
|
474
|
+
var __VLS_80;
|
|
475
|
+
// @ts-ignore
|
|
476
|
+
[];
|
|
477
|
+
var __VLS_73;
|
|
478
|
+
// @ts-ignore
|
|
479
|
+
[];
|
|
480
|
+
}
|
|
481
|
+
{
|
|
482
|
+
const { footer: __VLS_83 } = __VLS_nonNull(__VLS_66.slots);
|
|
483
|
+
__VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({});
|
|
484
|
+
let __VLS_84;
|
|
485
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
486
|
+
elButton;
|
|
487
|
+
// @ts-ignore
|
|
488
|
+
const __VLS_85 = __VLS_asFunctionalComponent1(__VLS_84, new __VLS_84({
|
|
489
|
+
// @ts-ignore
|
|
490
|
+
...{ 'onClick': {} }, link: true, type: "primary",
|
|
491
|
+
}));
|
|
492
|
+
const __VLS_86 = __VLS_85({
|
|
493
|
+
...{ 'onClick': {} },
|
|
494
|
+
link: true,
|
|
495
|
+
type: "primary",
|
|
496
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_85));
|
|
497
|
+
let __VLS_89;
|
|
498
|
+
const __VLS_90 = {
|
|
499
|
+
/** @type {typeof __VLS_89.click} */
|
|
500
|
+
onClick: // @ts-ignore
|
|
501
|
+
(...[$event]) => {
|
|
502
|
+
void $event;
|
|
503
|
+
if (!!(loading.value))
|
|
504
|
+
throw 0;
|
|
505
|
+
if (!!(!cards.value.length))
|
|
506
|
+
throw 0;
|
|
507
|
+
return (previewCard.value = card);
|
|
508
|
+
// @ts-ignore
|
|
509
|
+
[previewCard,];
|
|
510
|
+
},
|
|
511
|
+
};
|
|
512
|
+
void __VLS_90;
|
|
513
|
+
const { default: __VLS_91 } = __VLS_nonNull(__VLS_87.slots);
|
|
514
|
+
(__VLS_unwrap(t, {})("bi.card.preview"));
|
|
515
|
+
// @ts-ignore
|
|
516
|
+
[t,];
|
|
517
|
+
var __VLS_87;
|
|
518
|
+
var __VLS_88;
|
|
519
|
+
if (card.can_edit) {
|
|
520
|
+
let __VLS_92;
|
|
521
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
522
|
+
elButton;
|
|
523
|
+
// @ts-ignore
|
|
524
|
+
const __VLS_93 = __VLS_asFunctionalComponent1(__VLS_92, new __VLS_92({
|
|
525
|
+
// @ts-ignore
|
|
526
|
+
...{ 'onClick': {} }, link: true,
|
|
527
|
+
}));
|
|
528
|
+
const __VLS_94 = __VLS_93({
|
|
529
|
+
...{ 'onClick': {} },
|
|
530
|
+
link: true,
|
|
531
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_93));
|
|
532
|
+
let __VLS_97;
|
|
533
|
+
const __VLS_98 = {
|
|
534
|
+
/** @type {typeof __VLS_97.click} */
|
|
535
|
+
onClick: // @ts-ignore
|
|
536
|
+
(...[$event]) => {
|
|
537
|
+
void $event;
|
|
538
|
+
if (!!(loading.value))
|
|
539
|
+
throw 0;
|
|
540
|
+
if (!!(!cards.value.length))
|
|
541
|
+
throw 0;
|
|
542
|
+
if (!(card.can_edit))
|
|
543
|
+
throw 0;
|
|
544
|
+
return (openEditor(card));
|
|
545
|
+
// @ts-ignore
|
|
546
|
+
[];
|
|
547
|
+
},
|
|
548
|
+
};
|
|
549
|
+
void __VLS_98;
|
|
550
|
+
const { default: __VLS_99 } = __VLS_nonNull(__VLS_95.slots);
|
|
551
|
+
(__VLS_unwrap(t, {})("common.action.edit"));
|
|
552
|
+
// @ts-ignore
|
|
553
|
+
[t,];
|
|
554
|
+
var __VLS_95;
|
|
555
|
+
var __VLS_96;
|
|
556
|
+
}
|
|
557
|
+
if (card.can_edit) {
|
|
558
|
+
let __VLS_100;
|
|
559
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
560
|
+
elButton;
|
|
561
|
+
// @ts-ignore
|
|
562
|
+
const __VLS_101 = __VLS_asFunctionalComponent1(__VLS_100, new __VLS_100({
|
|
563
|
+
// @ts-ignore
|
|
564
|
+
...{ 'onClick': {} }, link: true, type: "danger",
|
|
565
|
+
}));
|
|
566
|
+
const __VLS_102 = __VLS_101({
|
|
567
|
+
...{ 'onClick': {} },
|
|
568
|
+
link: true,
|
|
569
|
+
type: "danger",
|
|
570
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_101));
|
|
571
|
+
let __VLS_105;
|
|
572
|
+
const __VLS_106 = {
|
|
573
|
+
/** @type {typeof __VLS_105.click} */
|
|
574
|
+
onClick: // @ts-ignore
|
|
575
|
+
(...[$event]) => {
|
|
576
|
+
void $event;
|
|
577
|
+
if (!!(loading.value))
|
|
578
|
+
throw 0;
|
|
579
|
+
if (!!(!cards.value.length))
|
|
580
|
+
throw 0;
|
|
581
|
+
if (!(card.can_edit))
|
|
582
|
+
throw 0;
|
|
583
|
+
return (remove(card));
|
|
584
|
+
// @ts-ignore
|
|
585
|
+
[];
|
|
586
|
+
},
|
|
587
|
+
};
|
|
588
|
+
void __VLS_106;
|
|
589
|
+
const { default: __VLS_107 } = __VLS_nonNull(__VLS_103.slots);
|
|
590
|
+
(__VLS_unwrap(t, {})("common.action.delete"));
|
|
591
|
+
// @ts-ignore
|
|
592
|
+
[t,];
|
|
593
|
+
var __VLS_103;
|
|
594
|
+
var __VLS_104;
|
|
595
|
+
}
|
|
596
|
+
let __VLS_108;
|
|
597
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
598
|
+
elButton;
|
|
599
|
+
// @ts-ignore
|
|
600
|
+
const __VLS_109 = __VLS_asFunctionalComponent1(__VLS_108, new __VLS_108({
|
|
601
|
+
// @ts-ignore
|
|
602
|
+
...{ 'onClick': {} }, size: "small", type: "primary",
|
|
603
|
+
}));
|
|
604
|
+
const __VLS_110 = __VLS_109({
|
|
605
|
+
...{ 'onClick': {} },
|
|
606
|
+
size: "small",
|
|
607
|
+
type: "primary",
|
|
608
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_109));
|
|
609
|
+
let __VLS_113;
|
|
610
|
+
const __VLS_114 = {
|
|
611
|
+
/** @type {typeof __VLS_113.click} */
|
|
612
|
+
onClick: // @ts-ignore
|
|
613
|
+
(...[$event]) => {
|
|
614
|
+
void $event;
|
|
615
|
+
if (!!(loading.value))
|
|
616
|
+
throw 0;
|
|
617
|
+
if (!!(!cards.value.length))
|
|
618
|
+
throw 0;
|
|
619
|
+
return (pickDashboard(card));
|
|
620
|
+
// @ts-ignore
|
|
621
|
+
[];
|
|
622
|
+
},
|
|
623
|
+
};
|
|
624
|
+
void __VLS_114;
|
|
625
|
+
const { default: __VLS_115 } = __VLS_nonNull(__VLS_111.slots);
|
|
626
|
+
(__VLS_unwrap(t, {})("bi.card.add_to_dashboard"));
|
|
627
|
+
// @ts-ignore
|
|
628
|
+
[t,];
|
|
629
|
+
var __VLS_111;
|
|
630
|
+
var __VLS_112;
|
|
631
|
+
if (card.query_record_id) {
|
|
632
|
+
let __VLS_116;
|
|
633
|
+
/** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
|
|
634
|
+
elButton;
|
|
635
|
+
// @ts-ignore
|
|
636
|
+
const __VLS_117 = __VLS_asFunctionalComponent1(__VLS_116, new __VLS_116({
|
|
637
|
+
// @ts-ignore
|
|
638
|
+
...{ 'onClick': {} }, link: true, disabled: (!card.can_edit),
|
|
639
|
+
}));
|
|
640
|
+
const __VLS_118 = __VLS_117({
|
|
641
|
+
...{ 'onClick': {} },
|
|
642
|
+
link: true,
|
|
643
|
+
disabled: (!card.can_edit),
|
|
644
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_117));
|
|
645
|
+
let __VLS_121;
|
|
646
|
+
const __VLS_122 = {
|
|
647
|
+
/** @type {typeof __VLS_121.click} */
|
|
648
|
+
onClick: // @ts-ignore
|
|
649
|
+
(...[$event]) => {
|
|
650
|
+
void $event;
|
|
651
|
+
if (!!(loading.value))
|
|
652
|
+
throw 0;
|
|
653
|
+
if (!!(!cards.value.length))
|
|
654
|
+
throw 0;
|
|
655
|
+
if (!(card.query_record_id))
|
|
656
|
+
throw 0;
|
|
657
|
+
return (router.value.push({ path: '/bi/query', query: { record_id: String(card.query_record_id) } }));
|
|
658
|
+
// @ts-ignore
|
|
659
|
+
[router,];
|
|
660
|
+
},
|
|
661
|
+
};
|
|
662
|
+
void __VLS_122;
|
|
663
|
+
const { default: __VLS_123 } = __VLS_nonNull(__VLS_119.slots);
|
|
664
|
+
(__VLS_unwrap(t, {})("bi.card.source_record", { id: card.query_record_id }));
|
|
665
|
+
// @ts-ignore
|
|
666
|
+
[t,];
|
|
667
|
+
var __VLS_119;
|
|
668
|
+
var __VLS_120;
|
|
669
|
+
}
|
|
670
|
+
// @ts-ignore
|
|
671
|
+
[];
|
|
672
|
+
}
|
|
673
|
+
// @ts-ignore
|
|
674
|
+
[];
|
|
675
|
+
var __VLS_66;
|
|
676
|
+
// @ts-ignore
|
|
677
|
+
[];
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
if (__VLS_unwrap(total, {}) > 100) {
|
|
681
|
+
let __VLS_124;
|
|
682
|
+
/** @ts-ignore @type { | typeof __VLS_components.elPagination | typeof __VLS_components.ElPagination | typeof __VLS_components['el-pagination']} */
|
|
683
|
+
elPagination;
|
|
684
|
+
// @ts-ignore
|
|
685
|
+
const __VLS_125 = __VLS_asFunctionalComponent1(__VLS_124, new __VLS_124({
|
|
686
|
+
// @ts-ignore
|
|
687
|
+
...{ 'onCurrentChange': {} }, currentPage: (__VLS_unwrap(page, {})), pageSize: (100), total: (__VLS_unwrap(total, {})), layout: "prev,pager,next",
|
|
688
|
+
}));
|
|
689
|
+
const __VLS_126 = __VLS_125({
|
|
690
|
+
...{ 'onCurrentChange': {} },
|
|
691
|
+
currentPage: (__VLS_unwrap(page, {})),
|
|
692
|
+
pageSize: (100),
|
|
693
|
+
total: (__VLS_unwrap(total, {})),
|
|
694
|
+
layout: "prev,pager,next",
|
|
695
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_125));
|
|
696
|
+
let __VLS_129;
|
|
697
|
+
const __VLS_130 = {
|
|
698
|
+
/** @type {typeof __VLS_129.currentChange} */
|
|
699
|
+
onCurrentChange: (loadCards),
|
|
700
|
+
};
|
|
701
|
+
void __VLS_130;
|
|
702
|
+
var __VLS_127;
|
|
703
|
+
var __VLS_128;
|
|
704
|
+
}
|
|
705
|
+
const __VLS_131 = BiCardFormDialog;
|
|
706
|
+
// @ts-ignore
|
|
707
|
+
const __VLS_132 = __VLS_asFunctionalComponent1(__VLS_131, new __VLS_131({
|
|
708
|
+
// @ts-ignore
|
|
709
|
+
...{ 'onSaved': {} }, modelValue: (__VLS_unwrap(editorOpen, {})), sources: (sources.value), card: (__VLS_unwrap(editingCard, {})),
|
|
710
|
+
}));
|
|
711
|
+
const __VLS_133 = __VLS_132({
|
|
712
|
+
...{ 'onSaved': {} },
|
|
713
|
+
modelValue: (__VLS_unwrap(editorOpen, {})),
|
|
714
|
+
sources: (sources.value),
|
|
715
|
+
card: (__VLS_unwrap(editingCard, {})),
|
|
716
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_132));
|
|
717
|
+
let __VLS_136;
|
|
718
|
+
const __VLS_137 = {
|
|
719
|
+
/** @type {typeof __VLS_136.saved} */
|
|
720
|
+
onSaved: (reload),
|
|
721
|
+
};
|
|
722
|
+
void __VLS_137;
|
|
723
|
+
var __VLS_134;
|
|
724
|
+
var __VLS_135;
|
|
725
|
+
let __VLS_138;
|
|
726
|
+
/** @ts-ignore @type { | typeof __VLS_components.elDialog | typeof __VLS_components.ElDialog | typeof __VLS_components['el-dialog'] | typeof __VLS_components.elDialog | typeof __VLS_components.ElDialog | typeof __VLS_components['el-dialog']} */
|
|
727
|
+
elDialog;
|
|
728
|
+
// @ts-ignore
|
|
729
|
+
const __VLS_139 = __VLS_asFunctionalComponent1(__VLS_138, new __VLS_138({
|
|
730
|
+
// @ts-ignore
|
|
731
|
+
...{ 'onClose': {} }, modelValue: (Boolean(previewCard.value)), title: (__VLS_unwrap(t, {})('bi.card.preview')), width: "min(760px,94vw)", destroyOnClose: true,
|
|
732
|
+
}));
|
|
733
|
+
const __VLS_140 = __VLS_139({
|
|
734
|
+
...{ 'onClose': {} },
|
|
735
|
+
modelValue: (Boolean(previewCard.value)),
|
|
736
|
+
title: (__VLS_unwrap(t, {})('bi.card.preview')),
|
|
737
|
+
width: "min(760px,94vw)",
|
|
738
|
+
destroyOnClose: true,
|
|
739
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_139));
|
|
740
|
+
let __VLS_143;
|
|
741
|
+
const __VLS_144 = {
|
|
742
|
+
/** @type {typeof __VLS_143.close} */
|
|
743
|
+
onClose: // @ts-ignore
|
|
744
|
+
(...[$event]) => {
|
|
745
|
+
void $event;
|
|
746
|
+
return (previewCard.value = undefined);
|
|
747
|
+
// @ts-ignore
|
|
748
|
+
[t, sources, total, total, previewCard, previewCard, page, editorOpen, editingCard,];
|
|
749
|
+
},
|
|
750
|
+
};
|
|
751
|
+
void __VLS_144;
|
|
752
|
+
const { default: __VLS_145 } = __VLS_nonNull(__VLS_141.slots);
|
|
753
|
+
if (previewCard.value) {
|
|
754
|
+
const __VLS_146 = BiDataCard;
|
|
755
|
+
// @ts-ignore
|
|
756
|
+
const __VLS_147 = __VLS_asFunctionalComponent1(__VLS_146, new __VLS_146({
|
|
757
|
+
// @ts-ignore
|
|
758
|
+
card: (previewCard.value), sourceName: (sources.value.find(item => item.code === previewCard.value?.source_code)?.name || previewCard.value.source_code),
|
|
759
|
+
}));
|
|
760
|
+
const __VLS_148 = __VLS_147({
|
|
761
|
+
card: (previewCard.value),
|
|
762
|
+
sourceName: (sources.value.find(item => item.code === previewCard.value?.source_code)?.name || previewCard.value.source_code),
|
|
763
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_147));
|
|
764
|
+
}
|
|
765
|
+
// @ts-ignore
|
|
766
|
+
[sources, previewCard, previewCard, previewCard, previewCard,];
|
|
767
|
+
var __VLS_141;
|
|
768
|
+
var __VLS_142;
|
|
769
|
+
const __VLS_151 = FormDialog;
|
|
770
|
+
// @ts-ignore
|
|
771
|
+
const __VLS_152 = __VLS_asFunctionalComponent1(__VLS_151, new __VLS_151({
|
|
772
|
+
// @ts-ignore
|
|
773
|
+
...{ 'onConfirm': {} }, ...{ 'onClosed': {} }, modelValue: (__VLS_unwrap(dashboardOpen, {})), model: (target.value), title: (__VLS_unwrap(t, {})('bi.card.add_to_dashboard')), fields: (__VLS_unwrap(dashboardFields, {})), rules: ({ id: [{ required: true, message: __VLS_unwrap(t, {})('bi.card.select_dashboard'), trigger: 'change' }] }), confirmLoading: (__VLS_unwrap(saving, {})),
|
|
774
|
+
}));
|
|
775
|
+
const __VLS_153 = __VLS_152({
|
|
776
|
+
...{ 'onConfirm': {} },
|
|
777
|
+
...{ 'onClosed': {} },
|
|
778
|
+
modelValue: (__VLS_unwrap(dashboardOpen, {})),
|
|
779
|
+
model: (target.value),
|
|
780
|
+
title: (__VLS_unwrap(t, {})('bi.card.add_to_dashboard')),
|
|
781
|
+
fields: (__VLS_unwrap(dashboardFields, {})),
|
|
782
|
+
rules: ({ id: [{ required: true, message: __VLS_unwrap(t, {})('bi.card.select_dashboard'), trigger: 'change' }] }),
|
|
783
|
+
confirmLoading: (__VLS_unwrap(saving, {})),
|
|
784
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_152));
|
|
785
|
+
let __VLS_156;
|
|
786
|
+
const __VLS_157 = {
|
|
787
|
+
/** @type {typeof __VLS_156.confirm} */
|
|
788
|
+
onConfirm: (addToDashboard),
|
|
789
|
+
};
|
|
790
|
+
void __VLS_157;
|
|
791
|
+
const __VLS_158 = {
|
|
792
|
+
/** @type {typeof __VLS_156.closed} */
|
|
793
|
+
onClosed: // @ts-ignore
|
|
794
|
+
(...[$event]) => {
|
|
795
|
+
void $event;
|
|
796
|
+
return (target.value.id = undefined);
|
|
797
|
+
// @ts-ignore
|
|
798
|
+
[t, t, dashboardOpen, target, target, dashboardFields, saving,];
|
|
799
|
+
},
|
|
800
|
+
};
|
|
801
|
+
void __VLS_158;
|
|
802
|
+
var __VLS_154;
|
|
803
|
+
var __VLS_155;
|
|
804
|
+
// @ts-ignore
|
|
805
|
+
[];
|
|
806
|
+
const __VLS_export = (await import('vue')).defineComponent({});
|
|
807
|
+
export default {};
|