vome-core 0.3.6 → 0.3.7
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/dist/admin/components/ui/avatar/index.js +1 -1
- package/dist/admin/components/ui/checkbox/index.js +1 -1
- package/dist/admin/components/ui/dialog/index.js +1 -1
- package/dist/admin/components/ui/dropdown-menu/index.js +1 -1
- package/dist/admin/components/ui/input/index.js +1 -1
- package/dist/admin/components/ui/label/index.js +1 -1
- package/dist/admin/components/ui/scroll-area/index.js +1 -1
- package/dist/admin/components/ui/select/index.js +1 -1
- package/dist/admin/components/ui/separator/index.js +1 -1
- package/dist/admin/components/ui/sheet/index.js +1 -1
- package/dist/admin/components/ui/sonner/index.js +1 -1
- package/dist/admin/components/ui/table/index.js +1 -1
- package/dist/admin/components/ui/tabs/index.js +1 -1
- package/dist/admin/components/ui/tooltip/index.js +1 -1
- package/dist/admin/components/vm-dept-tree.vue +110 -172
- package/dist/admin/crud/auto-fields.js +1 -1
- package/dist/admin/crud/components/vm-richtext-extensions.js +1 -1
- package/dist/admin/crud/config.js +1 -1
- package/dist/admin/crud/confirm.js +1 -1
- package/dist/admin/crud/crud-page-request.js +1 -1
- package/dist/admin/crud/data-i18n.js +1 -1
- package/dist/admin/crud/dict.js +1 -1
- package/dist/admin/crud/export-fetch.js +1 -1
- package/dist/admin/crud/key.js +1 -1
- package/dist/admin/crud/plugins.js +1 -1
- package/dist/admin/crud/span.js +1 -1
- package/dist/admin/crud/style.js +1 -1
- package/dist/admin/crud/validate.js +1 -1
- package/dist/admin/directives/perm.js +1 -1
- package/dist/admin/hooks/useUpload.js +1 -1
- package/dist/admin/lib/browser.js +1 -1
- package/dist/admin/lib/cn.js +1 -1
- package/dist/admin/lib/dialog-float.js +1 -1
- package/dist/admin/lib/export-excel.js +1 -1
- package/dist/admin/lib/import-excel.js +1 -1
- package/dist/admin/lib/json.js +1 -1
- package/dist/admin/lib/menu.js +1 -1
- package/dist/admin/lib/micro-locale.js +1 -1
- package/dist/admin/lib/micro-theme.js +1 -1
- package/dist/admin/lib/shell.js +1 -1
- package/dist/admin/lib/theme-color-options.js +1 -1
- package/dist/admin/lib/tree.js +1 -1
- package/dist/admin/lib/upload.js +1 -1
- package/dist/admin/lib/video-frame.js +1 -1
- package/dist/admin/router/create.js +1 -1
- package/dist/admin/router/guards.js +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/client/ai-model-registry.js +1 -1
- package/dist/client/base.js +1 -1
- package/dist/client/configure.js +1 -1
- package/dist/client/dict.js +1 -1
- package/dist/client/eps-payload.js +1 -1
- package/dist/client/eps.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/locale-store.js +1 -1
- package/dist/client/service.js +1 -1
- package/dist/client/vite-admin.js +1 -1
- package/dist/client/vite-auto-import.js +1 -1
- package/dist/client/vite-micro-proxy.js +1 -1
- package/dist/client/vite-plugin-eps.js +1 -1
- package/dist/client/vite-resolve.js +1 -1
- package/dist/config/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shared/datetime-picker.js +1 -1
- package/dist/shared/excel.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/locale-json.js +1 -1
- package/dist/shared/tree.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:loading="loading"
|
|
6
6
|
:add="canAdd && !onlyTrashed"
|
|
7
7
|
add-title="新增顶级部门"
|
|
8
|
-
@refresh="
|
|
8
|
+
@refresh="emit('refresh')"
|
|
9
9
|
@add="openAdd(null)"
|
|
10
10
|
>
|
|
11
11
|
<button
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
</button>
|
|
57
57
|
</div>
|
|
58
58
|
<div v-else-if="!onlyTrashed && canManage" class="vm-dept-tree__ops" @click.stop>
|
|
59
|
-
<button type="button" title="新增子部门" @click="openAdd(row.id)">
|
|
59
|
+
<button v-if="canAdd" type="button" title="新增子部门" @click="openAdd(row.id)">
|
|
60
60
|
<i class="ri-add-line" />
|
|
61
61
|
</button>
|
|
62
|
-
<button type="button" title="编辑" @click="openEdit(row)">
|
|
62
|
+
<button v-if="canUpdate" type="button" title="编辑" @click="openEdit(row)">
|
|
63
63
|
<i class="ri-edit-line" />
|
|
64
64
|
</button>
|
|
65
|
-
<button type="button" title="删除" @click="remove(row)">
|
|
65
|
+
<button v-if="canDelete" type="button" title="删除" @click="remove(row)">
|
|
66
66
|
<i class="ri-delete-bin-line" />
|
|
67
67
|
</button>
|
|
68
68
|
</div>
|
|
@@ -101,20 +101,20 @@
|
|
|
101
101
|
</template>
|
|
102
102
|
|
|
103
103
|
<script setup lang="ts">
|
|
104
|
-
import {
|
|
105
|
-
import { ref, computed, watch, onMounted } from 'vue'
|
|
104
|
+
import { ref, computed, watch } from 'vue'
|
|
106
105
|
import { toast } from 'vue-sonner'
|
|
107
|
-
import {
|
|
106
|
+
import { flattenTree } from '../lib/tree'
|
|
108
107
|
import { vmConfirm } from '../crud/confirm'
|
|
109
108
|
|
|
110
109
|
defineOptions({ name: 'vm-dept-tree' })
|
|
111
110
|
|
|
112
|
-
|
|
111
|
+
/** 调用方须先组装好的树节点(含 children),组件不再做扁平→树转换 */
|
|
112
|
+
export type DeptTreeNode = {
|
|
113
113
|
id: number
|
|
114
114
|
parentId: number | null
|
|
115
115
|
orderNum: number
|
|
116
116
|
name: string
|
|
117
|
-
children?:
|
|
117
|
+
children?: DeptTreeNode[]
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
type FlatRow = {
|
|
@@ -129,64 +129,70 @@ type FlatRow = {
|
|
|
129
129
|
|
|
130
130
|
const props = withDefaults(
|
|
131
131
|
defineProps<{
|
|
132
|
+
/** 已是树形结构的部门数据 */
|
|
133
|
+
data?: DeptTreeNode[]
|
|
134
|
+
loading?: boolean
|
|
132
135
|
modelValue?: number | null
|
|
133
136
|
rootLabel?: string
|
|
134
|
-
/**
|
|
137
|
+
/** 回收站 UI:隐藏新增,显示恢复/彻底删除 */
|
|
135
138
|
onlyTrashed?: boolean
|
|
139
|
+
canAdd?: boolean
|
|
140
|
+
canUpdate?: boolean
|
|
141
|
+
canDelete?: boolean
|
|
142
|
+
canRestore?: boolean
|
|
136
143
|
}>(),
|
|
137
144
|
{
|
|
145
|
+
data: () => [],
|
|
146
|
+
loading: false,
|
|
138
147
|
modelValue: null,
|
|
139
148
|
rootLabel: '全部',
|
|
140
149
|
onlyTrashed: false,
|
|
150
|
+
canAdd: false,
|
|
151
|
+
canUpdate: false,
|
|
152
|
+
canDelete: false,
|
|
153
|
+
canRestore: false,
|
|
141
154
|
},
|
|
142
155
|
)
|
|
143
156
|
|
|
144
157
|
const emit = defineEmits<{
|
|
145
158
|
'update:modelValue': [v: number | null]
|
|
146
159
|
change: [v: number | null, meta: { name: string; ids: number[] }]
|
|
147
|
-
|
|
160
|
+
refresh: []
|
|
161
|
+
add: [payload: { name: string; orderNum: number; parentId: number | null }]
|
|
162
|
+
update: [payload: { id: number; name: string; orderNum: number; parentId: number | null }]
|
|
163
|
+
delete: [payload: { id: number }]
|
|
164
|
+
restore: [payload: { id: number }]
|
|
165
|
+
forceDelete: [payload: { id: number }]
|
|
148
166
|
}>()
|
|
149
167
|
|
|
150
|
-
const { service } = useVome()
|
|
151
|
-
|
|
152
|
-
const loading = ref(false)
|
|
153
168
|
const submitting = ref(false)
|
|
154
|
-
const rows = ref<DeptRow[]>([])
|
|
155
169
|
const expanded = ref(new Set<number>())
|
|
156
170
|
const formOpen = ref(false)
|
|
157
171
|
const formMode = ref<'add' | 'edit'>('add')
|
|
158
172
|
const form = ref({ id: 0, name: '', orderNum: '0', parentId: null as number | null })
|
|
159
173
|
const parentName = ref('顶级')
|
|
174
|
+
const trashBusyId = ref<number | null>(null)
|
|
160
175
|
|
|
161
|
-
const canAdd = computed(() => Boolean(service.base.department?._permission?.add))
|
|
162
176
|
const canManage = computed(
|
|
163
|
-
() =>
|
|
164
|
-
Boolean(service.base.department?._permission?.update) ||
|
|
165
|
-
Boolean(service.base.department?._permission?.delete) ||
|
|
166
|
-
canAdd.value,
|
|
167
|
-
)
|
|
168
|
-
const canTrashOps = computed(
|
|
169
|
-
() =>
|
|
170
|
-
Boolean(service.base.department?._permission?.restore) ||
|
|
171
|
-
Boolean(service.base.department?._permission?.delete),
|
|
177
|
+
() => props.canAdd || props.canUpdate || props.canDelete,
|
|
172
178
|
)
|
|
173
|
-
const
|
|
179
|
+
const canTrashOps = computed(() => props.canRestore || props.canDelete)
|
|
174
180
|
|
|
175
181
|
const idNameMap = computed(() => {
|
|
176
182
|
const map = new Map<number, string>()
|
|
177
|
-
const walk = (list:
|
|
183
|
+
const walk = (list: DeptTreeNode[]) => {
|
|
178
184
|
for (const n of list) {
|
|
179
185
|
map.set(n.id, n.name)
|
|
180
186
|
if (n.children?.length) walk(n.children)
|
|
181
187
|
}
|
|
182
188
|
}
|
|
183
|
-
walk(
|
|
189
|
+
walk(props.data)
|
|
184
190
|
return map
|
|
185
191
|
})
|
|
186
192
|
|
|
187
193
|
const descendantMap = computed(() => {
|
|
188
194
|
const map = new Map<number, number[]>()
|
|
189
|
-
const walk = (node:
|
|
195
|
+
const walk = (node: DeptTreeNode): number[] => {
|
|
190
196
|
let ids: number[] = []
|
|
191
197
|
for (const c of node.children || []) {
|
|
192
198
|
ids.push(c.id)
|
|
@@ -195,11 +201,11 @@ const descendantMap = computed(() => {
|
|
|
195
201
|
map.set(node.id, ids)
|
|
196
202
|
return ids
|
|
197
203
|
}
|
|
198
|
-
for (const n of
|
|
204
|
+
for (const n of props.data) walk(n)
|
|
199
205
|
return map
|
|
200
206
|
})
|
|
201
207
|
|
|
202
|
-
function collectExpandable(list:
|
|
208
|
+
function collectExpandable(list: DeptTreeNode[], into: Set<number>) {
|
|
203
209
|
for (const n of list) {
|
|
204
210
|
if (n.children?.length) {
|
|
205
211
|
into.add(n.id)
|
|
@@ -208,39 +214,21 @@ function collectExpandable(list: DeptRow[], into: Set<number>) {
|
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
216
|
|
|
211
|
-
|
|
212
|
-
const flat =
|
|
213
|
-
|
|
214
|
-
.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
function flatten(nodes: DeptRow[], depth = 0, out: FlatRow[] = []) {
|
|
224
|
-
for (const n of nodes) {
|
|
225
|
-
const kids = n.children || []
|
|
226
|
-
out.push({
|
|
227
|
-
id: n.id,
|
|
228
|
-
label: n.name,
|
|
229
|
-
depth,
|
|
230
|
-
hasChildren: kids.length > 0,
|
|
231
|
-
visible: true,
|
|
232
|
-
parentId: n.parentId,
|
|
233
|
-
orderNum: n.orderNum,
|
|
234
|
-
})
|
|
235
|
-
if (kids.length && expanded.value.has(n.id)) flatten(kids, depth + 1, out)
|
|
236
|
-
}
|
|
237
|
-
return out
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
const visibleRows = computed(() => flatten(rows.value))
|
|
217
|
+
const visibleRows = computed((): FlatRow[] => {
|
|
218
|
+
const flat = flattenTree(props.data, expanded.value)
|
|
219
|
+
return flat.map((n) => ({
|
|
220
|
+
id: n.id as number,
|
|
221
|
+
label: n.name,
|
|
222
|
+
depth: n.depth,
|
|
223
|
+
hasChildren: n.hasChildren,
|
|
224
|
+
visible: true,
|
|
225
|
+
parentId: n.parentId ?? null,
|
|
226
|
+
orderNum: n.orderNum ?? 0,
|
|
227
|
+
}))
|
|
228
|
+
})
|
|
241
229
|
|
|
242
230
|
const emptyText = computed(() => {
|
|
243
|
-
if (loading
|
|
231
|
+
if (props.loading || visibleRows.value.length) return ''
|
|
244
232
|
return props.onlyTrashed ? '回收站为空' : '暂无部门'
|
|
245
233
|
})
|
|
246
234
|
|
|
@@ -262,83 +250,25 @@ function toggleExpand(id: number) {
|
|
|
262
250
|
expanded.value = next
|
|
263
251
|
}
|
|
264
252
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
rows.value = toTree(Array.isArray(list) ? list : [])
|
|
272
|
-
const next = new Set<number>()
|
|
273
|
-
collectExpandable(rows.value, next)
|
|
274
|
-
expanded.value = next
|
|
275
|
-
if (props.modelValue != null && !idNameMap.value.has(props.modelValue)) {
|
|
276
|
-
select(null)
|
|
277
|
-
}
|
|
278
|
-
} catch (e) {
|
|
279
|
-
console.error('[dept-tree] load failed', e)
|
|
280
|
-
rows.value = []
|
|
281
|
-
toast.error('加载部门失败')
|
|
282
|
-
} finally {
|
|
283
|
-
loading.value = false
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
async function restoreDept(row: FlatRow) {
|
|
288
|
-
if (trashBusyId.value === row.id) return
|
|
289
|
-
const ok = await vmConfirm({
|
|
290
|
-
title: '恢复部门',
|
|
291
|
-
message: `确定恢复「${row.label}」?`,
|
|
292
|
-
confirmText: '恢复',
|
|
293
|
-
cancelText: '取消',
|
|
294
|
-
})
|
|
295
|
-
if (!ok) return
|
|
296
|
-
trashBusyId.value = row.id
|
|
297
|
-
try {
|
|
298
|
-
await service.base.department.restore({ ids: [row.id] })
|
|
299
|
-
toast.success('已恢复')
|
|
300
|
-
if (props.modelValue === row.id) select(null)
|
|
301
|
-
await load()
|
|
302
|
-
emit('updated')
|
|
303
|
-
} catch (e) {
|
|
304
|
-
console.error(e)
|
|
305
|
-
const err = e as Error & { toasted?: boolean }
|
|
306
|
-
if (!err.toasted) toast.error(e instanceof Error ? e.message : '恢复失败')
|
|
307
|
-
} finally {
|
|
308
|
-
trashBusyId.value = null
|
|
253
|
+
function syncExpandedFromData() {
|
|
254
|
+
const next = new Set<number>()
|
|
255
|
+
collectExpandable(props.data, next)
|
|
256
|
+
expanded.value = next
|
|
257
|
+
if (props.modelValue != null && !idNameMap.value.has(props.modelValue)) {
|
|
258
|
+
select(null)
|
|
309
259
|
}
|
|
310
260
|
}
|
|
311
261
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
confirmText: '彻底删除',
|
|
318
|
-
cancelText: '取消',
|
|
319
|
-
})
|
|
320
|
-
if (!ok) return
|
|
321
|
-
trashBusyId.value = row.id
|
|
322
|
-
try {
|
|
323
|
-
await service.base.department.delete({ ids: [row.id], force: true })
|
|
324
|
-
toast.success('已彻底删除')
|
|
325
|
-
if (props.modelValue === row.id) select(null)
|
|
326
|
-
await load()
|
|
327
|
-
emit('updated')
|
|
328
|
-
} catch (e) {
|
|
329
|
-
console.error(e)
|
|
330
|
-
const err = e as Error & { toasted?: boolean }
|
|
331
|
-
if (!err.toasted) toast.error(e instanceof Error ? e.message : '删除失败')
|
|
332
|
-
} finally {
|
|
333
|
-
trashBusyId.value = null
|
|
334
|
-
}
|
|
335
|
-
}
|
|
262
|
+
watch(
|
|
263
|
+
() => props.data,
|
|
264
|
+
() => syncExpandedFromData(),
|
|
265
|
+
{ deep: true, immediate: true },
|
|
266
|
+
)
|
|
336
267
|
|
|
337
268
|
watch(
|
|
338
269
|
() => props.onlyTrashed,
|
|
339
270
|
() => {
|
|
340
271
|
select(null)
|
|
341
|
-
void load()
|
|
342
272
|
},
|
|
343
273
|
)
|
|
344
274
|
|
|
@@ -363,36 +293,25 @@ function openEdit(row: FlatRow) {
|
|
|
363
293
|
formOpen.value = true
|
|
364
294
|
}
|
|
365
295
|
|
|
366
|
-
|
|
296
|
+
function submitForm() {
|
|
367
297
|
const name = form.value.name.trim()
|
|
368
298
|
if (!name) {
|
|
369
299
|
toast.error('请填写部门名称')
|
|
370
300
|
return
|
|
371
301
|
}
|
|
372
302
|
submitting.value = true
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
} else {
|
|
383
|
-
await service.base.department.update({ ...payload, id: form.value.id })
|
|
384
|
-
toast.success('已保存部门')
|
|
385
|
-
}
|
|
386
|
-
formOpen.value = false
|
|
387
|
-
await load()
|
|
388
|
-
emit('updated')
|
|
389
|
-
} catch (e) {
|
|
390
|
-
console.error(e)
|
|
391
|
-
const err = e as Error & { toasted?: boolean }
|
|
392
|
-
if (!err.toasted) toast.error(e instanceof Error ? e.message : '保存失败')
|
|
393
|
-
} finally {
|
|
394
|
-
submitting.value = false
|
|
303
|
+
const payload = {
|
|
304
|
+
name,
|
|
305
|
+
orderNum: Number(form.value.orderNum || 0),
|
|
306
|
+
parentId: form.value.parentId,
|
|
307
|
+
}
|
|
308
|
+
if (formMode.value === 'add') {
|
|
309
|
+
emit('add', payload)
|
|
310
|
+
} else {
|
|
311
|
+
emit('update', { ...payload, id: form.value.id })
|
|
395
312
|
}
|
|
313
|
+
formOpen.value = false
|
|
314
|
+
submitting.value = false
|
|
396
315
|
}
|
|
397
316
|
|
|
398
317
|
async function remove(row: FlatRow) {
|
|
@@ -403,27 +322,41 @@ async function remove(row: FlatRow) {
|
|
|
403
322
|
cancelText: '取消',
|
|
404
323
|
})
|
|
405
324
|
if (!ok) return
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
await service.base.department.delete({ ids: [row.id] })
|
|
409
|
-
toast.success('已删除')
|
|
410
|
-
if (props.modelValue === row.id) select(null)
|
|
411
|
-
await load()
|
|
412
|
-
emit('updated')
|
|
413
|
-
} catch (e) {
|
|
414
|
-
console.error(e)
|
|
415
|
-
const err = e as Error & { toasted?: boolean }
|
|
416
|
-
if (!err.toasted) toast.error(e instanceof Error ? e.message : '删除失败')
|
|
417
|
-
} finally {
|
|
418
|
-
submitting.value = false
|
|
419
|
-
}
|
|
325
|
+
if (props.modelValue === row.id) select(null)
|
|
326
|
+
emit('delete', { id: row.id })
|
|
420
327
|
}
|
|
421
328
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
329
|
+
async function restoreDept(row: FlatRow) {
|
|
330
|
+
if (trashBusyId.value === row.id) return
|
|
331
|
+
const ok = await vmConfirm({
|
|
332
|
+
title: '恢复部门',
|
|
333
|
+
message: `确定恢复「${row.label}」?`,
|
|
334
|
+
confirmText: '恢复',
|
|
335
|
+
cancelText: '取消',
|
|
336
|
+
})
|
|
337
|
+
if (!ok) return
|
|
338
|
+
trashBusyId.value = row.id
|
|
339
|
+
if (props.modelValue === row.id) select(null)
|
|
340
|
+
emit('restore', { id: row.id })
|
|
341
|
+
trashBusyId.value = null
|
|
342
|
+
}
|
|
425
343
|
|
|
426
|
-
|
|
344
|
+
async function forceDeleteDept(row: FlatRow) {
|
|
345
|
+
if (trashBusyId.value === row.id) return
|
|
346
|
+
const ok = await vmConfirm({
|
|
347
|
+
title: '彻底删除',
|
|
348
|
+
message: `确定彻底删除「${row.label}」?此操作不可恢复。`,
|
|
349
|
+
confirmText: '彻底删除',
|
|
350
|
+
cancelText: '取消',
|
|
351
|
+
})
|
|
352
|
+
if (!ok) return
|
|
353
|
+
trashBusyId.value = row.id
|
|
354
|
+
if (props.modelValue === row.id) select(null)
|
|
355
|
+
emit('forceDelete', { id: row.id })
|
|
356
|
+
trashBusyId.value = null
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
defineExpose({ idNameMap })
|
|
427
360
|
</script>
|
|
428
361
|
|
|
429
362
|
<style lang="scss" scoped>
|
|
@@ -529,6 +462,11 @@ defineExpose({ load, idNameMap })
|
|
|
529
462
|
background: var(--card);
|
|
530
463
|
color: var(--brand);
|
|
531
464
|
}
|
|
465
|
+
|
|
466
|
+
&:disabled {
|
|
467
|
+
opacity: 0.5;
|
|
468
|
+
cursor: not-allowed;
|
|
469
|
+
}
|
|
532
470
|
}
|
|
533
471
|
}
|
|
534
472
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1ddfcd=_0x23b8;(function(_0x160406,_0xe6a9a3){const _0x23cdb4=_0x23b8,_0x593bf5=_0x160406();while(!![]){try{const _0x634313=-parseInt(_0x23cdb4(0xb8))/0x1+parseInt(_0x23cdb4(0xdf))/0x2*(-parseInt(_0x23cdb4(0xb5))/0x3)+parseInt(_0x23cdb4(0xc4))/0x4*(-parseInt(_0x23cdb4(0xd1))/0x5)+parseInt(_0x23cdb4(0xa6))/0x6+-parseInt(_0x23cdb4(0xa4))/0x7*(-parseInt(_0x23cdb4(0xa9))/0x8)+-parseInt(_0x23cdb4(0xad))/0x9*(parseInt(_0x23cdb4(0xa0))/0xa)+-parseInt(_0x23cdb4(0xb6))/0xb*(-parseInt(_0x23cdb4(0xba))/0xc);if(_0x634313===_0xe6a9a3)break;else _0x593bf5['push'](_0x593bf5['shift']());}catch(_0x20d1be){_0x593bf5['push'](_0x593bf5['shift']());}}}(_0x4f1a,0xf2e91));import{findEpsEntity}from'../lib/eps';import{getDictOptions}from'../../client';export const UPSERT_BUILTIN_IGNORE=['id',_0x1ddfcd(0xd8),_0x1ddfcd(0xd5),_0x1ddfcd(0xbf),_0x1ddfcd(0xc0)];export const TABLE_BUILTIN_IGNORE=[_0x1ddfcd(0xc0),_0x1ddfcd(0xbf)];function dictKeyOf(_0x2e0194){const _0x602a2a=_0x1ddfcd;if(typeof _0x2e0194['dict']==='string'&&_0x2e0194[_0x602a2a(0xda)])return _0x2e0194[_0x602a2a(0xda)];if(Array[_0x602a2a(0xa2)](_0x2e0194[_0x602a2a(0xda)])&&_0x2e0194['dict'][0x0])return _0x2e0194[_0x602a2a(0xda)][0x0];return;}function isSwitchDict(_0x217273){const _0x5a7ac2=_0x1ddfcd;return _0x217273===_0x5a7ac2(0xb2)||_0x217273===_0x5a7ac2(0xb1);}function switchFormItem(_0x1fd436,_0x3290ba,_0x13b57a){const _0x4a4953=_0x1ddfcd;return{..._0x1fd436,'type':_0x4a4953(0xdd),'value':_0x13b57a,'dict':_0x3290ba,'component':{'props':()=>mapDictOptions(_0x3290ba)}};}function _0x4f1a(){const _0x4c4a0a=['zwrPDa','DgvUyw50swq','BMfTzxnWywnL','zgLJDa','Aw5WDxq','CMvXDwLYzwq','C3DPDgnO','ugDcB29SzwfU','mtrRsNPxAg8','BgfIzwW','mJa2mde0mhPXDfjUEG','ywrK','AxnbCNjHEq','DM0TC3DPDgnO','mZvyBKLHz0W','C2vSzwn0','ndGWmdC2oeT1q1bjzq','y29SDw1UCW','C2vSzwn0Aw9U','mta5nty2ng9NreDRCW','BNvTyMvY','DgvZDa','zNvUy3rPB24','owzuzLD1tW','y29SB3i','yM9VBgvHBG','C2nHBgu','EwvZx25V','C3rHDhvZ','C3rHCNrZv2L0Aa','ugDcAwDjBNq','mZeYndu2BfDYt3ju','nJm4D1PLBwDo','y29TBwvUDa','odKWodK0sM1YuwfO','ugDeB3vIBgvqCMvJAxnPB24','mZG4mJm2u0znt1zx','Dg9mB3DLCKnHC2u','C291CMnL','ugDjBNrLz2vY','BNvSBgfIBgu','DxbKyxrLvgLTzq','zgvSzxrLvgLTzq','ChjVCa','ugDcAwDtzxjPywW','C3rYAw5N','mtjVsw9RAeO','ugDoDw1LCMLJ','ChjVCgvYDhLoyw1L','ugDuzxH0','ugDtzxjPywW','DhLWzq','ChvZAa','ugDtBwfSBfnLCMLHBa','zMLSDgvY','ugDszwfS','CMLNAhq','y29SDw1UvhLWzq','AgfZ','otaWnZy1wgrns3vA','CgfNzunVBhvTBNm','DMfSDwu','BwfW','y3jLyxrLvgLTzq','C3fSvhLWzq'];_0x4f1a=function(){return _0x4c4a0a;};return _0x4f1a();}export function mapDictOptions(_0x333551){const _0x3e6db3=_0x1ddfcd;return getDictOptions(_0x333551)[_0x3e6db3(0xd4)](_0x3098a2=>{const _0x51bfbe=_0x3e6db3;let _0x7f9cb0=_0x3098a2[_0x51bfbe(0xd3)];return typeof _0x3098a2['value']===_0x51bfbe(0xc3)&&/^-?\d+(\.\d+)?$/['test'](_0x3098a2[_0x51bfbe(0xd3)])&&(_0x7f9cb0=Number(_0x3098a2[_0x51bfbe(0xd3)])),{'label':String(_0x3098a2[_0x51bfbe(0xe0)]??''),'value':_0x7f9cb0,'color':_0x3098a2[_0x51bfbe(0xae)]};});}function isMainTableCol(_0xaf5259){const _0x277059=_0x1ddfcd;return!_0xaf5259[_0x277059(0xbc)]||_0xaf5259[_0x277059(0xbc)][_0x277059(0xb3)]('a.');}function epsColumns(_0x36d76f){const _0x30a14e=_0x1ddfcd,_0x2d050d=_0x36d76f[_0x30a14e(0xd9)]?findEpsEntity('/'+_0x36d76f[_0x30a14e(0xd9)]):undefined;if(!_0x2d050d)return[];const _0x43df18=[..._0x2d050d[_0x30a14e(0xa7)]||[],..._0x2d050d[_0x30a14e(0xd2)]||[]],_0x168e08=new Set(),_0x5f2763=[];for(const _0x3a59d1 of _0x43df18){if(!_0x3a59d1[_0x30a14e(0xc6)]||!isMainTableCol(_0x3a59d1))continue;if(_0x168e08[_0x30a14e(0xd0)](_0x3a59d1[_0x30a14e(0xc6)]))continue;_0x168e08[_0x30a14e(0xa1)](_0x3a59d1[_0x30a14e(0xc6)]),_0x5f2763[_0x30a14e(0xca)](_0x3a59d1);}return _0x5f2763;}function columnTypeOf(_0x5bf33e){const _0x17089c=_0x1ddfcd;return String(_0x5bf33e[_0x17089c(0xcf)]||'');}function sqlTypeOf(_0x348f7b){const _0x523433=_0x1ddfcd;return String(_0x348f7b[_0x523433(0xd6)]||'')[_0x523433(0xbb)]();}function isTextCol(_0x562a80){const _0x5412f2=_0x1ddfcd,_0x331d93=columnTypeOf(_0x562a80);if(_0x331d93===_0x5412f2(0xc7))return!![];return sqlTypeOf(_0x562a80)==='text';}function isIntegerCol(_0x4a992b){const _0x4cdf4e=_0x1ddfcd,_0x5a69e2=columnTypeOf(_0x4a992b);if(_0x5a69e2===_0x4cdf4e(0xbd)||_0x5a69e2===_0x4cdf4e(0xc8)||_0x5a69e2==='PgSmallInt'||_0x5a69e2===_0x4cdf4e(0xb4)||_0x5a69e2===_0x4cdf4e(0xcb)||_0x5a69e2===_0x4cdf4e(0xc2))return!![];if(_0x4a992b[_0x4cdf4e(0xc9)]===_0x4cdf4e(0xaa)&&!isNumericCol(_0x4a992b))return!![];return/^(integer|serial|smallint|bigint|smallserial|bigserial)\b/[_0x4cdf4e(0xab)](sqlTypeOf(_0x4a992b));}function _0x23b8(_0xd6b6bd,_0x4dbac1){_0xd6b6bd=_0xd6b6bd-0xa0;const _0x4f1a66=_0x4f1a();let _0x23b831=_0x4f1a66[_0xd6b6bd];if(_0x23b8['NTlCPZ']===undefined){var _0x25ef93=function(_0x23861e){const _0x578689='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e0194='',_0x217273='';for(let _0x1fd436=0x0,_0x3290ba,_0x13b57a,_0x333551=0x0;_0x13b57a=_0x23861e['charAt'](_0x333551++);~_0x13b57a&&(_0x3290ba=_0x1fd436%0x4?_0x3290ba*0x40+_0x13b57a:_0x13b57a,_0x1fd436++%0x4)?_0x2e0194+=String['fromCharCode'](0xff&_0x3290ba>>(-0x2*_0x1fd436&0x6)):0x0){_0x13b57a=_0x578689['indexOf'](_0x13b57a);}for(let _0x3098a2=0x0,_0x7f9cb0=_0x2e0194['length'];_0x3098a2<_0x7f9cb0;_0x3098a2++){_0x217273+='%'+('00'+_0x2e0194['charCodeAt'](_0x3098a2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x217273);};_0x23b8['EOJJdq']=_0x25ef93,_0x23b8['dvtDfs']={},_0x23b8['NTlCPZ']=!![];}const _0x1c27f4=_0x4f1a66[0x0],_0x399a0f=_0xd6b6bd+_0x1c27f4,_0x34cb19=_0x23b8['dvtDfs'][_0x399a0f];return!_0x34cb19?(_0x23b831=_0x23b8['EOJJdq'](_0x23b831),_0x23b8['dvtDfs'][_0x399a0f]=_0x23b831):_0x23b831=_0x34cb19,_0x23b831;}function isNumericCol(_0x441db3){const _0x2369db=_0x1ddfcd,_0x19b7f2=columnTypeOf(_0x441db3);if(_0x19b7f2===_0x2369db(0xc5)||_0x19b7f2===_0x2369db(0xb9)||_0x19b7f2===_0x2369db(0xcd))return!![];return/^(numeric|decimal|double|real)\b/[_0x2369db(0xab)](sqlTypeOf(_0x441db3));}function isBooleanCol(_0x420913){const _0x2c865d=_0x1ddfcd;return columnTypeOf(_0x420913)===_0x2c865d(0xde)||_0x420913[_0x2c865d(0xc9)]===_0x2c865d(0xaf)||sqlTypeOf(_0x420913)[_0x2c865d(0xb3)]('boolean');}function numberPrecision(_0x49e1ec){const _0x23aa96=_0x1ddfcd;if(isIntegerCol(_0x49e1ec))return 0x0;if(typeof _0x49e1ec['scale']===_0x23aa96(0xaa))return _0x49e1ec[_0x23aa96(0xb0)];return 0x2;}export function mergeByProp(_0x1fcaaa,_0x35befa){const _0x45ace7=_0x1ddfcd,_0x57892e=_0x35befa[_0x45ace7(0xcc)](_0xe90cb9=>Boolean(_0xe90cb9[_0x45ace7(0xc1)])),_0x5f00af=_0x35befa['filter'](_0x49b830=>!_0x49b830[_0x45ace7(0xc1)]&&_0x49b830[_0x45ace7(0xc9)]),_0x390926=new Map(_0x57892e[_0x45ace7(0xd4)](_0x153282=>[String(_0x153282['prop']),_0x153282])),_0x3b8976=new Set(_0x5f00af['map'](_0x302648=>String(_0x302648[_0x45ace7(0xc9)]))),_0x2acdf2=new Set(),_0x7df672=[];for(const _0x321a5d of _0x1fcaaa){if(!_0x321a5d[_0x45ace7(0xc1)]&&_0x321a5d[_0x45ace7(0xc9)]){if(_0x3b8976[_0x45ace7(0xd0)](String(_0x321a5d[_0x45ace7(0xc9)])))continue;_0x7df672[_0x45ace7(0xca)](_0x321a5d);continue;}if(!_0x321a5d[_0x45ace7(0xc1)])continue;const _0x1a3b78=String(_0x321a5d[_0x45ace7(0xc1)]),_0x39449d=_0x390926['get'](_0x1a3b78);_0x39449d?(_0x7df672[_0x45ace7(0xca)]({..._0x321a5d,..._0x39449d}),_0x2acdf2['add'](_0x1a3b78)):_0x7df672[_0x45ace7(0xca)](_0x321a5d);}for(const _0x5871ca of _0x57892e){const _0x3863ea=String(_0x5871ca[_0x45ace7(0xc1)]);if(!_0x2acdf2[_0x45ace7(0xd0)](_0x3863ea))_0x7df672['push'](_0x5871ca);}return _0x7df672[_0x45ace7(0xca)](..._0x5f00af),_0x7df672;}export function sortRequiredFirst(_0x5d0fe0){const _0x5ef6ea=_0x1ddfcd,_0x230f56=[],_0xef2043=[];for(const _0x3a4389 of _0x5d0fe0){_0x3a4389[_0x5ef6ea(0xdc)]===!![]||typeof _0x3a4389[_0x5ef6ea(0xdc)]===_0x5ef6ea(0xac)?_0x230f56[_0x5ef6ea(0xca)](_0x3a4389):_0xef2043[_0x5ef6ea(0xca)](_0x3a4389);}return[..._0x230f56,..._0xef2043];}export function buildAutoUpsertItems(_0x48f1aa,_0x6c4eff={}){const _0x384d90=_0x1ddfcd,_0x110ade=new Set([...UPSERT_BUILTIN_IGNORE,..._0x6c4eff['ignoreFields']||[]]),_0x4a54d5=[];for(const _0x1db4e2 of epsColumns(_0x48f1aa)){const _0x4a7096=_0x1db4e2[_0x384d90(0xc6)];if(_0x110ade[_0x384d90(0xd0)](_0x4a7096))continue;const _0x25c1f8=_0x1db4e2['comment']||_0x4a7096,_0x194613=dictKeyOf(_0x1db4e2),_0x5c7f1b=_0x1db4e2[_0x384d90(0xbe)]===![]&&_0x1db4e2['hasDefault']!==!![],_0x5b7792={'prop':_0x4a7096,'label':_0x25c1f8,'span':0xc,..._0x5c7f1b?{'required':!![]}:{}};if(_0x4a7096===_0x384d90(0xb2)){const _0x328374=_0x194613||_0x384d90(0xb2);isSwitchDict(_0x328374)?_0x4a54d5[_0x384d90(0xca)](switchFormItem(_0x5b7792,_0x328374,0x1)):_0x4a54d5[_0x384d90(0xca)]({..._0x5b7792,'type':'select','dict':_0x328374,'value':0x1});continue;}if(_0x194613){isSwitchDict(_0x194613)?_0x4a54d5[_0x384d90(0xca)](switchFormItem(_0x5b7792,_0x194613,_0x194613==='yes_no'?![]:0x1)):_0x4a54d5['push']({..._0x5b7792,'type':_0x384d90(0xa5),'dict':_0x194613,'value':0x0});continue;}if(isTextCol(_0x1db4e2)){_0x4a54d5[_0x384d90(0xca)]({..._0x5b7792,'type':'textarea','span':0xc});continue;}if(isBooleanCol(_0x1db4e2)){_0x4a54d5[_0x384d90(0xca)]({..._0x5b7792,'type':_0x384d90(0xdd),'value':![],'component':{'props':()=>mapDictOptions(_0x384d90(0xb1))},'dict':_0x384d90(0xb1)});continue;}if(isIntegerCol(_0x1db4e2)||isNumericCol(_0x1db4e2)){const _0x241345=numberPrecision(_0x1db4e2);_0x4a54d5['push']({..._0x5b7792,'type':_0x384d90(0xaa),'component':{'props':{'type':_0x384d90(0xaa),'precision':_0x241345,'controls':![]}}});continue;}_0x4a54d5[_0x384d90(0xca)]({..._0x5b7792,'type':_0x384d90(0xdb)});}return _0x4a54d5;}export function buildAutoTableColumns(_0xa1719b,_0x322c2b={}){const _0x2be430=_0x1ddfcd,_0x24f302=new Set([...TABLE_BUILTIN_IGNORE,..._0x322c2b['ignoreFields']||[]]),_0x56df9a=[];!_0x24f302[_0x2be430(0xd0)](_0x2be430(0xa8))&&_0x56df9a[_0x2be430(0xca)]({'type':'selection','width':0x32});for(const _0x4c14ae of epsColumns(_0xa1719b)){const _0xe77f6=_0x4c14ae[_0x2be430(0xc6)];if(_0x24f302['has'](_0xe77f6))continue;const _0x680972=_0x4c14ae[_0x2be430(0xb7)]||_0xe77f6,_0x176fd9=dictKeyOf(_0x4c14ae);if(_0xe77f6===_0x2be430(0xb2)){const _0x55783e=_0x176fd9||_0x2be430(0xb2);isSwitchDict(_0x55783e)?_0x56df9a[_0x2be430(0xca)]({'prop':_0xe77f6,'label':_0x680972,'width':0x50,'fixed':_0x2be430(0xce),'component':{'name':_0x2be430(0xa3),'props':()=>mapDictOptions(_0x55783e)}}):_0x56df9a[_0x2be430(0xca)]({'prop':_0xe77f6,'label':_0x680972,'width':0x64,'fixed':_0x2be430(0xce),'dict':()=>mapDictOptions(_0x55783e)});continue;}if(_0x176fd9&&isSwitchDict(_0x176fd9)){_0x56df9a[_0x2be430(0xca)]({'prop':_0xe77f6,'label':_0x680972,'width':0x50,'component':{'name':_0x2be430(0xa3),'props':()=>mapDictOptions(_0x176fd9)}});continue;}if(_0xe77f6==='id'){_0x56df9a['push']({'prop':_0xe77f6,'label':_0x680972,'width':0x50});continue;}if(_0xe77f6===_0x2be430(0xd5)){_0x56df9a[_0x2be430(0xca)]({'prop':_0xe77f6,'label':_0x680972,'width':0xa0});continue;}if(_0x176fd9){_0x56df9a['push']({'prop':_0xe77f6,'label':_0x680972,'minWidth':0x78,'dict':()=>mapDictOptions(_0x176fd9)});continue;}if(isTextCol(_0x4c14ae)){_0x56df9a[_0x2be430(0xca)]({'prop':_0xe77f6,'label':_0x680972,'minWidth':0xa0,'showOverflowTooltip':!![]});continue;}_0x56df9a[_0x2be430(0xca)]({'prop':_0xe77f6,'label':_0x680972,'minWidth':0x78});}return!_0x24f302[_0x2be430(0xd0)]('op')&&_0x56df9a[_0x2be430(0xca)]({'type':'op','buttons':[_0x2be430(0xd7),'delete']}),_0x56df9a;}
|
|
1
|
+
const _0x45a85d=_0x4372;(function(_0x55faf8,_0x5e7d3f){const _0x3b3cec=_0x4372,_0x3ecbaa=_0x55faf8();while(!![]){try{const _0x5bed51=-parseInt(_0x3b3cec(0x230))/0x1+parseInt(_0x3b3cec(0x215))/0x2*(-parseInt(_0x3b3cec(0x202))/0x3)+parseInt(_0x3b3cec(0x22f))/0x4*(parseInt(_0x3b3cec(0x207))/0x5)+-parseInt(_0x3b3cec(0x226))/0x6*(parseInt(_0x3b3cec(0x20c))/0x7)+-parseInt(_0x3b3cec(0x1f7))/0x8*(parseInt(_0x3b3cec(0x206))/0x9)+parseInt(_0x3b3cec(0x1f8))/0xa*(parseInt(_0x3b3cec(0x221))/0xb)+-parseInt(_0x3b3cec(0x1fb))/0xc*(-parseInt(_0x3b3cec(0x1f2))/0xd);if(_0x5bed51===_0x5e7d3f)break;else _0x3ecbaa['push'](_0x3ecbaa['shift']());}catch(_0x1a8d6b){_0x3ecbaa['push'](_0x3ecbaa['shift']());}}}(_0x163e,0xd6b99));import{findEpsEntity}from'../lib/eps';import{getDictOptions}from'../../client';export const UPSERT_BUILTIN_IGNORE=['id',_0x45a85d(0x225),_0x45a85d(0x231),_0x45a85d(0x21d),_0x45a85d(0x209)];export const TABLE_BUILTIN_IGNORE=[_0x45a85d(0x209),_0x45a85d(0x21d)];function dictKeyOf(_0x3117d9){const _0x2ff6e7=_0x45a85d;if(typeof _0x3117d9[_0x2ff6e7(0x22c)]===_0x2ff6e7(0x229)&&_0x3117d9['dict'])return _0x3117d9[_0x2ff6e7(0x22c)];if(Array['isArray'](_0x3117d9[_0x2ff6e7(0x22c)])&&_0x3117d9[_0x2ff6e7(0x22c)][0x0])return _0x3117d9[_0x2ff6e7(0x22c)][0x0];return;}function isSwitchDict(_0x44670c){const _0x2560bf=_0x45a85d;return _0x44670c===_0x2560bf(0x1f0)||_0x44670c===_0x2560bf(0x21e);}function switchFormItem(_0x2f5d28,_0x36cbaf,_0x1c8a00){const _0x247c18=_0x45a85d;return{..._0x2f5d28,'type':_0x247c18(0x201),'value':_0x1c8a00,'dict':_0x36cbaf,'component':{'props':()=>mapDictOptions(_0x36cbaf)}};}export function mapDictOptions(_0xa10124){const _0x411bc8=_0x45a85d;return getDictOptions(_0xa10124)[_0x411bc8(0x21b)](_0x1f5748=>{const _0x2f22a9=_0x411bc8;let _0x1b38b6=_0x1f5748[_0x2f22a9(0x1f4)];return typeof _0x1f5748[_0x2f22a9(0x1f4)]===_0x2f22a9(0x229)&&/^-?\d+(\.\d+)?$/[_0x2f22a9(0x1f3)](_0x1f5748['value'])&&(_0x1b38b6=Number(_0x1f5748['value'])),{'label':String(_0x1f5748[_0x2f22a9(0x214)]??''),'value':_0x1b38b6,'color':_0x1f5748[_0x2f22a9(0x204)]};});}function isMainTableCol(_0xbe0e78){const _0x418137=_0x45a85d;return!_0xbe0e78[_0x418137(0x21a)]||_0xbe0e78[_0x418137(0x21a)][_0x418137(0x227)]('a.');}function epsColumns(_0x97fa14){const _0x20371d=_0x45a85d,_0x538bc2=_0x97fa14[_0x20371d(0x22e)]?findEpsEntity('/'+_0x97fa14[_0x20371d(0x22e)]):undefined;if(!_0x538bc2)return[];const _0x39864d=[..._0x538bc2[_0x20371d(0x21f)]||[],..._0x538bc2[_0x20371d(0x1f1)]||[]],_0x4e37f5=new Set(),_0x1a35b7=[];for(const _0x4d387b of _0x39864d){if(!_0x4d387b[_0x20371d(0x223)]||!isMainTableCol(_0x4d387b))continue;if(_0x4e37f5['has'](_0x4d387b['propertyName']))continue;_0x4e37f5[_0x20371d(0x211)](_0x4d387b[_0x20371d(0x223)]),_0x1a35b7[_0x20371d(0x208)](_0x4d387b);}return _0x1a35b7;}function columnTypeOf(_0x154806){const _0x3c6b51=_0x45a85d;return String(_0x154806[_0x3c6b51(0x1ff)]||'');}function sqlTypeOf(_0x504020){const _0x4f800c=_0x45a85d;return String(_0x504020[_0x4f800c(0x200)]||'')[_0x4f800c(0x1fa)]();}function _0x4372(_0x57b19b,_0xe6c90){_0x57b19b=_0x57b19b-0x1f0;const _0x163e33=_0x163e();let _0x4372e2=_0x163e33[_0x57b19b];if(_0x4372['msEkHe']===undefined){var _0x7ffeea=function(_0x48a8e6){const _0x462c38='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3117d9='',_0x44670c='';for(let _0x2f5d28=0x0,_0x36cbaf,_0x1c8a00,_0xa10124=0x0;_0x1c8a00=_0x48a8e6['charAt'](_0xa10124++);~_0x1c8a00&&(_0x36cbaf=_0x2f5d28%0x4?_0x36cbaf*0x40+_0x1c8a00:_0x1c8a00,_0x2f5d28++%0x4)?_0x3117d9+=String['fromCharCode'](0xff&_0x36cbaf>>(-0x2*_0x2f5d28&0x6)):0x0){_0x1c8a00=_0x462c38['indexOf'](_0x1c8a00);}for(let _0x1f5748=0x0,_0x1b38b6=_0x3117d9['length'];_0x1f5748<_0x1b38b6;_0x1f5748++){_0x44670c+='%'+('00'+_0x3117d9['charCodeAt'](_0x1f5748)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44670c);};_0x4372['QxcDCU']=_0x7ffeea,_0x4372['klwhNr']={},_0x4372['msEkHe']=!![];}const _0x433be3=_0x163e33[0x0],_0x47afe0=_0x57b19b+_0x433be3,_0x366602=_0x4372['klwhNr'][_0x47afe0];return!_0x366602?(_0x4372e2=_0x4372['QxcDCU'](_0x4372e2),_0x4372['klwhNr'][_0x47afe0]=_0x4372e2):_0x4372e2=_0x366602,_0x4372e2;}function _0x163e(){const _0x3b7c46=['C3fSvhLWzq','C3DPDgnO','mtuWnK5kyM1ewa','ugDuzxH0','y29SB3i','BNvTyMvY','ouHgC3r3CG','mZu1otbbt0H4vwm','ChvZAa','zgvSzxrLvgLTzq','DhLWzq','ugDeB3vIBgvqCMvJAxnPB24','mJi4mZr4rKn0ugy','ugDszwfS','CMvXDwLYzwq','ChjVCa','ugDtzxjPywW','ywrK','CMLNAhq','AwDUB3jLrMLLBgrZ','BgfIzwW','ntK2t3PKqxDt','ugDcAwDtzxjPywW','C2vSzwn0Aw9U','BNvSBgfIBgu','AgfZ','C291CMnL','BwfW','zMLSDgvY','DxbKyxrLvgLTzq','EwvZx25V','y29SDw1UCW','y29TBwvUDa','nJe5odyXzgrJsg9U','ugDcAwDjBNq','ChjVCgvYDhLoyw1L','C2vSzwn0','DgvUyw50swq','mtKWmK5ereXgCq','C3rHCNrZv2L0Aa','ugDjBNrLz2vY','C3rYAw5N','AgfZrgvMyxvSDa','zgvSzxrL','zgLJDa','ugDtBwfSBeLUDa','BMfTzxnWywnL','nZjhDxb3vue','ndCYotq3CM9wDw1W','y3jLyxrLvgLTzq','Aw5WDxq','C3rHDhvZ','CgfNzunVBhvTBNm','mJzVCvzUuvG','DgvZDa','DMfSDwu','C2nHBgu','ugDcB29SzwfU','nJy5mteYmhPhr3PTvG','mtGWBwT4BgvZ','z2v0','Dg9mB3DLCKnHC2u','mtmZodaZndHizwrWvhi','ugDtBwfSBfnLCMLHBa','zwrPDa','yM9VBgvHBG','y29SDw1UvhLWzq'];_0x163e=function(){return _0x3b7c46;};return _0x163e();}function isTextCol(_0x3716f4){const _0x226e88=_0x45a85d,_0x2e2f4d=columnTypeOf(_0x3716f4);if(_0x2e2f4d===_0x226e88(0x203))return!![];return sqlTypeOf(_0x3716f4)==='text';}function isIntegerCol(_0xce6bf3){const _0x46cedf=_0x45a85d,_0x3b7ab0=columnTypeOf(_0xce6bf3);if(_0x3b7ab0===_0x46cedf(0x228)||_0x3b7ab0===_0x46cedf(0x210)||_0x3b7ab0===_0x46cedf(0x22d)||_0x3b7ab0===_0x46cedf(0x222)||_0x3b7ab0===_0x46cedf(0x1fc)||_0x3b7ab0===_0x46cedf(0x216))return!![];if(_0xce6bf3[_0x46cedf(0x20a)]===_0x46cedf(0x205)&&!isNumericCol(_0xce6bf3))return!![];return/^(integer|serial|smallint|bigint|smallserial|bigserial)\b/[_0x46cedf(0x1f3)](sqlTypeOf(_0xce6bf3));}function isNumericCol(_0x5ced6f){const _0x3ffb45=_0x45a85d,_0x484c29=columnTypeOf(_0x5ced6f);if(_0x484c29==='PgNumeric'||_0x484c29===_0x3ffb45(0x20b)||_0x484c29===_0x3ffb45(0x20d))return!![];return/^(numeric|decimal|double|real)\b/[_0x3ffb45(0x1f3)](sqlTypeOf(_0x5ced6f));}function isBooleanCol(_0x5b5b93){const _0xe98cd2=_0x45a85d;return columnTypeOf(_0x5b5b93)===_0xe98cd2(0x1f6)||_0x5b5b93[_0xe98cd2(0x20a)]===_0xe98cd2(0x1fe)||sqlTypeOf(_0x5b5b93)[_0xe98cd2(0x227)](_0xe98cd2(0x1fe));}function numberPrecision(_0x4376e2){const _0x4e9e36=_0x45a85d;if(isIntegerCol(_0x4376e2))return 0x0;if(typeof _0x4376e2['scale']===_0x4e9e36(0x205))return _0x4376e2[_0x4e9e36(0x1f5)];return 0x2;}export function mergeByProp(_0x132dea,_0x4ab602){const _0x27f0b9=_0x45a85d,_0x4a96be=_0x4ab602[_0x27f0b9(0x21c)](_0x53bc29=>Boolean(_0x53bc29[_0x27f0b9(0x20f)])),_0xf3b508=_0x4ab602['filter'](_0x8fd91d=>!_0x8fd91d[_0x27f0b9(0x20f)]&&_0x8fd91d[_0x27f0b9(0x20a)]),_0x4532a3=new Map(_0x4a96be[_0x27f0b9(0x21b)](_0x303d6b=>[String(_0x303d6b[_0x27f0b9(0x20f)]),_0x303d6b])),_0x559c0b=new Set(_0xf3b508[_0x27f0b9(0x21b)](_0x46c927=>String(_0x46c927['type']))),_0x34b2b2=new Set(),_0x5c00f9=[];for(const _0x302aec of _0x132dea){if(!_0x302aec[_0x27f0b9(0x20f)]&&_0x302aec[_0x27f0b9(0x20a)]){if(_0x559c0b[_0x27f0b9(0x219)](String(_0x302aec[_0x27f0b9(0x20a)])))continue;_0x5c00f9[_0x27f0b9(0x208)](_0x302aec);continue;}if(!_0x302aec['prop'])continue;const _0x48c74d=String(_0x302aec[_0x27f0b9(0x20f)]),_0x1bd969=_0x4532a3[_0x27f0b9(0x1f9)](_0x48c74d);_0x1bd969?(_0x5c00f9[_0x27f0b9(0x208)]({..._0x302aec,..._0x1bd969}),_0x34b2b2[_0x27f0b9(0x211)](_0x48c74d)):_0x5c00f9[_0x27f0b9(0x208)](_0x302aec);}for(const _0x438068 of _0x4a96be){const _0x626905=String(_0x438068[_0x27f0b9(0x20f)]);if(!_0x34b2b2['has'](_0x626905))_0x5c00f9[_0x27f0b9(0x208)](_0x438068);}return _0x5c00f9[_0x27f0b9(0x208)](..._0xf3b508),_0x5c00f9;}export function sortRequiredFirst(_0x33e69e){const _0x56e7d8=_0x45a85d,_0x472bfd=[],_0x393ade=[];for(const _0xb270af of _0x33e69e){_0xb270af['required']===!![]||typeof _0xb270af[_0x56e7d8(0x20e)]==='function'?_0x472bfd[_0x56e7d8(0x208)](_0xb270af):_0x393ade['push'](_0xb270af);}return[..._0x472bfd,..._0x393ade];}export function buildAutoUpsertItems(_0x45687a,_0x3d0982={}){const _0x42420e=_0x45a85d,_0x4420d9=new Set([...UPSERT_BUILTIN_IGNORE,..._0x3d0982['ignoreFields']||[]]),_0x4c96e7=[];for(const _0x442dd5 of epsColumns(_0x45687a)){const _0x38372a=_0x442dd5[_0x42420e(0x223)];if(_0x4420d9[_0x42420e(0x219)](_0x38372a))continue;const _0xe76714=_0x442dd5[_0x42420e(0x220)]||_0x38372a,_0x81464b=dictKeyOf(_0x442dd5),_0x118ff9=_0x442dd5[_0x42420e(0x218)]===![]&&_0x442dd5[_0x42420e(0x22a)]!==!![],_0x374f0a={'prop':_0x38372a,'label':_0xe76714,'span':0xc,..._0x118ff9?{'required':!![]}:{}};if(_0x38372a===_0x42420e(0x1f0)){const _0xfa076c=_0x81464b||_0x42420e(0x1f0);isSwitchDict(_0xfa076c)?_0x4c96e7[_0x42420e(0x208)](switchFormItem(_0x374f0a,_0xfa076c,0x1)):_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x224),'dict':_0xfa076c,'value':0x1});continue;}if(_0x81464b){isSwitchDict(_0x81464b)?_0x4c96e7[_0x42420e(0x208)](switchFormItem(_0x374f0a,_0x81464b,_0x81464b===_0x42420e(0x21e)?![]:0x1)):_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x224),'dict':_0x81464b,'value':0x0});continue;}if(isTextCol(_0x442dd5)){_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':'textarea','span':0xc});continue;}if(isBooleanCol(_0x442dd5)){_0x4c96e7['push']({..._0x374f0a,'type':_0x42420e(0x201),'value':![],'component':{'props':()=>mapDictOptions(_0x42420e(0x21e))},'dict':_0x42420e(0x21e)});continue;}if(isIntegerCol(_0x442dd5)||isNumericCol(_0x442dd5)){const _0x19fb66=numberPrecision(_0x442dd5);_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x205),'component':{'props':{'type':_0x42420e(0x205),'precision':_0x19fb66,'controls':![]}}});continue;}_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x232)});}return _0x4c96e7;}export function buildAutoTableColumns(_0x377816,_0x3ba924={}){const _0x26dfac=_0x45a85d,_0x328ff3=new Set([...TABLE_BUILTIN_IGNORE,..._0x3ba924[_0x26dfac(0x213)]||[]]),_0x2f8180=[];!_0x328ff3[_0x26dfac(0x219)]('selection')&&_0x2f8180[_0x26dfac(0x208)]({'type':_0x26dfac(0x217),'width':0x32});for(const _0x2a7643 of epsColumns(_0x377816)){const _0x56dff9=_0x2a7643[_0x26dfac(0x223)];if(_0x328ff3['has'](_0x56dff9))continue;const _0xbb354d=_0x2a7643[_0x26dfac(0x220)]||_0x56dff9,_0x32e796=dictKeyOf(_0x2a7643);if(_0x56dff9===_0x26dfac(0x1f0)){const _0x4493b2=_0x32e796||'status';isSwitchDict(_0x4493b2)?_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x50,'fixed':_0x26dfac(0x212),'component':{'name':'vm-switch','props':()=>mapDictOptions(_0x4493b2)}}):_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x64,'fixed':_0x26dfac(0x212),'dict':()=>mapDictOptions(_0x4493b2)});continue;}if(_0x32e796&&isSwitchDict(_0x32e796)){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x50,'component':{'name':'vm-switch','props':()=>mapDictOptions(_0x32e796)}});continue;}if(_0x56dff9==='id'){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x50});continue;}if(_0x56dff9===_0x26dfac(0x231)){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0xa0});continue;}if(_0x32e796){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'minWidth':0x78,'dict':()=>mapDictOptions(_0x32e796)});continue;}if(isTextCol(_0x2a7643)){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'minWidth':0xa0,'showOverflowTooltip':!![]});continue;}_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'minWidth':0x78});}return!_0x328ff3[_0x26dfac(0x219)]('op')&&_0x2f8180['push']({'type':'op','buttons':[_0x26dfac(0x1fd),_0x26dfac(0x22b)]}),_0x2f8180;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3b92bd=_0x2977;(function(_0xe063c2,_0x9aa984){const _0x40dc6f=_0x2977,_0x565b74=_0xe063c2();while(!![]){try{const _0x2d03d8=-parseInt(_0x40dc6f(0x1ef))/0x1*(-parseInt(_0x40dc6f(0x1f4))/0x2)+parseInt(_0x40dc6f(0x1ec))/0x3+parseInt(_0x40dc6f(0x1fc))/0x4*(-parseInt(_0x40dc6f(0x1fa))/0x5)+-parseInt(_0x40dc6f(0x1f5))/0x6+-parseInt(_0x40dc6f(0x1f7))/0x7*(-parseInt(_0x40dc6f(0x1f3))/0x8)+-parseInt(_0x40dc6f(0x1f8))/0x9*(parseInt(_0x40dc6f(0x1ee))/0xa)+-parseInt(_0x40dc6f(0x1ed))/0xb*(-parseInt(_0x40dc6f(0x1f9))/0xc);if(_0x2d03d8===_0x9aa984)break;else _0x565b74['push'](_0x565b74['shift']());}catch(_0x19f7db){_0x565b74['push'](_0x565b74['shift']());}}}(_0x57ec,0x87814));import{Node,mergeAttributes}from'@tiptap/core';function _0x57ec(){const _0x1d2148=['mJm5mZu4me9jEK5Rsa','mvfdyM1wAG','yMXVy2S','DMLKzw8','Aw5Zzxj0q29UDgvUDa','ntCWngjyvMrttW','mti3mJC0zLrize9Y','mtKYodm0mhjnuNnpqG','BMfTzq','mZuWn0jHuw9Jta','mZzvuxPqseS','mJu2mZq3nLH5A25KyG','nwnfzeDiqG','y3jLyxrL','mJeZntGYogLjthjnrq','DMLKzw9BC3jJxq','nZmWntb0vM9IvuK','otLNAvL6weu'];_0x57ec=function(){return _0x1d2148;};return _0x57ec();}export const VmRichtextVideo=Node[_0x3b92bd(0x1fb)]({'name':_0x3b92bd(0x1f1),'group':_0x3b92bd(0x1f0),'atom':!![],'selectable':!![],'draggable':!![],'addAttributes'(){return{'src':{'default':null},'controls':{'default':!![]}};},'parseHTML'(){const _0x153efc=_0x3b92bd;return[{'tag':_0x153efc(0x1eb)}];},'renderHTML'({HTMLAttributes:_0x4fd04f}){return['video',mergeAttributes(_0x4fd04f,{'controls':!![],'style':'max-width:100%;border-radius:8px'})];},'addCommands'(){const _0x270911=_0x3b92bd;return{'setVideo':_0x1b662d=>({commands:_0x572d4b})=>_0x572d4b[_0x270911(0x1f2)]({'type':this[_0x270911(0x1f6)],'attrs':_0x1b662d})};}});function _0x2977(_0x5844c3,_0x3b59ca){_0x5844c3=_0x5844c3-0x1eb;const _0x57ec7c=_0x57ec();let _0x297729=_0x57ec7c[_0x5844c3];if(_0x2977['RpzHZg']===undefined){var _0x18eab5=function(_0x2e26d9){const _0x36443d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4fd04f='',_0x1b662d='';for(let _0x572d4b=0x0,_0x3038a4,_0x326bfa,_0x30bbfe=0x0;_0x326bfa=_0x2e26d9['charAt'](_0x30bbfe++);~_0x326bfa&&(_0x3038a4=_0x572d4b%0x4?_0x3038a4*0x40+_0x326bfa:_0x326bfa,_0x572d4b++%0x4)?_0x4fd04f+=String['fromCharCode'](0xff&_0x3038a4>>(-0x2*_0x572d4b&0x6)):0x0){_0x326bfa=_0x36443d['indexOf'](_0x326bfa);}for(let _0x18c10a=0x0,_0x21e25b=_0x4fd04f['length'];_0x18c10a<_0x21e25b;_0x18c10a++){_0x1b662d+='%'+('00'+_0x4fd04f['charCodeAt'](_0x18c10a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1b662d);};_0x2977['fQJxNg']=_0x18eab5,_0x2977['HYbVbJ']={},_0x2977['RpzHZg']=!![];}const _0x556ef4=_0x57ec7c[0x0],_0x192f7f=_0x5844c3+_0x556ef4,_0x54b664=_0x2977['HYbVbJ'][_0x192f7f];return!_0x54b664?(_0x297729=_0x2977['fQJxNg'](_0x297729),_0x2977['HYbVbJ'][_0x192f7f]=_0x297729):_0x297729=_0x54b664,_0x297729;}export const VM_RICHTEXT_EMOJIS=['\uD83D\uDE00','\uD83D\uDE03','\uD83D\uDE04','\uD83D\uDE01','\uD83D\uDE06','\uD83D\uDE05','\uD83E\uDD23','\uD83D\uDE02','\uD83D\uDE42','\uD83D\uDE43','\uD83D\uDE09','\uD83D\uDE0A','\uD83D\uDE07','\uD83E\uDD70','\uD83D\uDE0D','\uD83E\uDD29','\uD83D\uDE18','\uD83D\uDE17','\uD83D\uDE1A','\uD83D\uDE19','\uD83D\uDE0B','\uD83D\uDE1B','\uD83D\uDE1C','\uD83E\uDD2A','\uD83D\uDE1D','\uD83E\uDD11','\uD83E\uDD17','\uD83E\uDD2D','\uD83E\uDD2B','\uD83E\uDD14','\uD83E\uDD10','\uD83E\uDD28','\uD83D\uDE10','\uD83D\uDE11','\uD83D\uDE36','\uD83D\uDE0F','\uD83D\uDE12','\uD83D\uDE44','\uD83D\uDE2C','\uD83E\uDD25','\uD83D\uDE0C','\uD83D\uDE14','\uD83D\uDE2A','\uD83E\uDD24','\uD83D\uDE34','\uD83D\uDE37','\uD83E\uDD12','\uD83E\uDD15','\uD83E\uDD22','\uD83E\uDD2E','\uD83E\uDD75','\uD83E\uDD76','\uD83E\uDD74','\uD83D\uDE35','\uD83E\uDD2F','\uD83E\uDD20','\uD83E\uDD73','\uD83D\uDE0E','\uD83E\uDD13','\uD83E\uDDD0','\uD83D\uDE15','\uD83D\uDE1F','\uD83D\uDE41','☹️','\uD83D\uDE2E','\uD83D\uDE2F','\uD83D\uDE32','\uD83D\uDE33','\uD83E\uDD7A','\uD83D\uDE26','\uD83D\uDE27','\uD83D\uDE28','\uD83D\uDE30','\uD83D\uDE25','\uD83D\uDE22','\uD83D\uDE2D','\uD83D\uDE31','\uD83D\uDE16','\uD83D\uDE23','\uD83D\uDE1E','\uD83D\uDE13','\uD83D\uDE29','\uD83D\uDE2B','\uD83E\uDD71','\uD83D\uDE24','\uD83D\uDE21','\uD83D\uDE20','\uD83E\uDD2C','\uD83D\uDE08','\uD83D\uDC7F','\uD83D\uDC4B','\uD83E\uDD1A','\uD83D\uDD90','✋','\uD83D\uDD96','\uD83D\uDC4C','\uD83E\uDD0C','\uD83E\uDD0F','✌️','\uD83E\uDD1E','\uD83E\uDD1F','\uD83E\uDD18','\uD83E\uDD19','\uD83D\uDC48','\uD83D\uDC49','\uD83D\uDC46','\uD83D\uDD95','\uD83D\uDC47','☝️','\uD83D\uDC4D','\uD83D\uDC4E','✊','\uD83D\uDC4A','\uD83E\uDD1B','\uD83E\uDD1C','\uD83D\uDC4F','\uD83D\uDE4C','\uD83D\uDC50','\uD83E\uDD32','\uD83E\uDD1D','\uD83D\uDE4F','\uD83D\uDCAA','\uD83E\uDDBE','✍️','\uD83D\uDC85','\uD83E\uDD33','❤️','\uD83E\uDDE1','\uD83D\uDC9B','\uD83D\uDC9A','\uD83D\uDC99','\uD83D\uDC9C','\uD83D\uDDA4','\uD83E\uDD0D','\uD83E\uDD0E','\uD83D\uDC94','❣️','\uD83D\uDC95','\uD83D\uDC9E','\uD83D\uDC93','\uD83D\uDC97','\uD83D\uDC96','\uD83D\uDC98','\uD83D\uDC9D','\uD83D\uDC9F','☮️','✝️','☪️','\uD83D\uDD49','☸️','✡️','\uD83D\uDD2F','\uD83D\uDD4E','☯️','☦️','\uD83D\uDED0','⭐','\uD83C\uDF1F','✨','⚡','\uD83D\uDD25','\uD83D\uDCA5','☀️','\uD83C\uDF19','⭐️','\uD83C\uDF08','✅','❌','⭕','❗','❓','‼️','⁉️','\uD83D\uDCAF','\uD83D\uDD14','\uD83D\uDD15','\uD83D\uDCCC','\uD83D\uDCCD','\uD83D\uDCCE','\uD83D\uDD17','\uD83D\uDD12','\uD83D\uDD13','\uD83D\uDD11','\uD83D\uDDDD','\uD83D\uDCA1','\uD83D\uDD26','\uD83D\uDCDD','✏️','✒️','\uD83D\uDD8A','\uD83D\uDD8B','\uD83D\uDD8C','\uD83D\uDD8D','\uD83D\uDCBC','\uD83D\uDCC1','\uD83D\uDCC2','\uD83D\uDCC5','\uD83D\uDCC6','\uD83D\uDDD3','\uD83D\uDCC7','\uD83D\uDCC8','\uD83D\uDCC9','\uD83D\uDCCA','\uD83D\uDCCB','\uD83D\uDCE4','\uD83D\uDCE5','\uD83D\uDCE6','\uD83D\uDCEB','\uD83D\uDCEC','\uD83D\uDCED','\uD83D\uDCEE','\uD83D\uDCEF','\uD83D\uDCDC','\uD83D\uDCC3','\uD83D\uDCC4','\uD83D\uDCD1','☕','\uD83C\uDF75','\uD83E\uDDC3','\uD83E\uDD64','\uD83E\uDDCB','\uD83C\uDF7A','\uD83C\uDF7B','\uD83E\uDD42','\uD83C\uDF77','\uD83C\uDF78','\uD83C\uDF55','\uD83C\uDF54','\uD83C\uDF5F','\uD83C\uDF2D','\uD83C\uDF7F','\uD83C\uDF69','\uD83C\uDF6A','\uD83C\uDF82','\uD83C\uDF70','\uD83E\uDDC1','\uD83C\uDF4E','\uD83C\uDF4A','\uD83C\uDF4B','\uD83C\uDF4C','\uD83C\uDF49','\uD83C\uDF47','\uD83C\uDF53','\uD83E\uDED0','\uD83C\uDF52','\uD83C\uDF51','⚽','\uD83C\uDFC0','\uD83C\uDFC8','⚾','\uD83C\uDFBE','\uD83C\uDFD0','\uD83C\uDFC9','\uD83C\uDFB1','\uD83C\uDFD3','\uD83C\uDFF8','\uD83C\uDFAE','\uD83D\uDD79','\uD83C\uDFB2','\uD83E\uDDE9','\uD83C\uDFAF','\uD83C\uDFB3','\uD83C\uDFB0','\uD83C\uDFB8','\uD83C\uDFB9','\uD83E\uDD41','\uD83C\uDFA4','\uD83C\uDFA7','\uD83C\uDFAC','\uD83C\uDFA5','\uD83D\uDCF7','\uD83D\uDCF8','\uD83D\uDCF9','\uD83D\uDCFA','\uD83D\uDCFB','\uD83C\uDF99','\uD83D\uDE80','✈️','\uD83D\uDEE9','\uD83D\uDEEB','\uD83D\uDEEC','\uD83D\uDEF0','\uD83D\uDCBA','\uD83D\uDEF8','\uD83D\uDE81','\uD83D\uDEF6','\uD83D\uDE97','\uD83D\uDE95','\uD83D\uDE99','\uD83D\uDE8C','\uD83D\uDE8E','\uD83C\uDFCE','\uD83D\uDE93','\uD83D\uDE91','\uD83D\uDE92','\uD83D\uDE90','\uD83C\uDFE0','\uD83C\uDFE1','\uD83C\uDFE2','\uD83C\uDFE3','\uD83C\uDFE4','\uD83C\uDFE5','\uD83C\uDFE6','\uD83C\uDFE8','\uD83C\uDFE9','\uD83C\uDFEA','\uD83D\uDC36','\uD83D\uDC31','\uD83D\uDC2D','\uD83D\uDC39','\uD83D\uDC30','\uD83E\uDD8A','\uD83D\uDC3B','\uD83D\uDC3C','\uD83D\uDC3B❄️','\uD83D\uDC28','\uD83D\uDC2F','\uD83E\uDD81','\uD83D\uDC2E','\uD83D\uDC37','\uD83D\uDC38','\uD83D\uDC35','\uD83D\uDE48','\uD83D\uDE49','\uD83D\uDE4A','\uD83D\uDC12','\uD83D\uDC14','\uD83D\uDC27','\uD83D\uDC26','\uD83D\uDC24','\uD83D\uDC23','\uD83D\uDC25','\uD83E\uDD86','\uD83E\uDD85','\uD83E\uDD89','\uD83E\uDD87','\uD83C\uDF89','\uD83C\uDF8A','\uD83C\uDF88','\uD83C\uDF81','\uD83C\uDF80','\uD83C\uDF97','\uD83C\uDFAB','\uD83C\uDF9F','\uD83C\uDFC6','\uD83C\uDFC5'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2e39ab,_0x1c109d){const _0xd8d7a1=_0x8705,_0xe18058=_0x2e39ab();while(!![]){try{const _0x30f4fb=parseInt(_0xd8d7a1(0xd6))/0x1*(parseInt(_0xd8d7a1(0xd4))/0x2)+parseInt(_0xd8d7a1(0xd5))/0x3*(-parseInt(_0xd8d7a1(0xd2))/0x4)+-parseInt(_0xd8d7a1(0xd8))/0x5*(parseInt(_0xd8d7a1(0xdb))/0x6)+-parseInt(_0xd8d7a1(0xd9))/0x7*(-parseInt(_0xd8d7a1(0xce))/0x8)+-parseInt(_0xd8d7a1(0xda))/0x9+-parseInt(_0xd8d7a1(0xcf))/0xa*(parseInt(_0xd8d7a1(0xcc))/0xb)+parseInt(_0xd8d7a1(0xd0))/0xc*(parseInt(_0xd8d7a1(0xca))/0xd);if(_0x30f4fb===_0x1c109d)break;else _0xe18058['push'](_0xe18058['shift']());}catch(_0x497c9a){_0xe18058['push'](_0xe18058['shift']());}}}(_0x314a,0x98de8));import{getCrudConfig}from'./style';import{CRUD_LABELS,DEFAULT_CRUD_DICT}from'./dict';export{CRUD_LABELS,DEFAULT_CRUD_DICT};const DEFAULT_CRUD_PERMISSION={'page':!![],'list':!![],'info':!![],'add':![],'delete':![],'update':![],'restore':![]};function _0x8705(_0x24a5f5,_0x2ec673){_0x24a5f5=_0x24a5f5-0xca;const _0x314af6=_0x314a();let _0x87058b=_0x314af6[_0x24a5f5];if(_0x8705['xwndRY']===undefined){var _0x232f8d=function(_0x4eb886){const _0x201137='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4a6978='',_0x3668e0='';for(let _0x220bb2=0x0,_0x117772,_0x37c1cd,_0x4318ba=0x0;_0x37c1cd=_0x4eb886['charAt'](_0x4318ba++);~_0x37c1cd&&(_0x117772=_0x220bb2%0x4?_0x117772*0x40+_0x37c1cd:_0x37c1cd,_0x220bb2++%0x4)?_0x4a6978+=String['fromCharCode'](0xff&_0x117772>>(-0x2*_0x220bb2&0x6)):0x0){_0x37c1cd=_0x201137['indexOf'](_0x37c1cd);}for(let _0x1e86fe=0x0,_0x107a73=_0x4a6978['length'];_0x1e86fe<_0x107a73;_0x1e86fe++){_0x3668e0+='%'+('00'+_0x4a6978['charCodeAt'](_0x1e86fe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3668e0);};_0x8705['ICEIpm']=_0x232f8d,_0x8705['siQZQU']={},_0x8705['xwndRY']=!![];}const _0x1e1654=_0x314af6[0x0],_0x4b18e3=_0x24a5f5+_0x1e1654,_0x33c10a=_0x8705['siQZQU'][_0x4b18e3];return!_0x33c10a?(_0x87058b=_0x8705['ICEIpm'](_0x87058b),_0x8705['siQZQU'][_0x4b18e3]=_0x87058b):_0x87058b=_0x33c10a,_0x87058b;}export function mergeDict(_0x4a6978){const _0x2cd8b7=_0x8705,_0x3668e0=getCrudConfig()['dict'];if(!_0x4a6978)return{..._0x3668e0,'label':{..._0x3668e0[_0x2cd8b7(0xd1)]}};return{..._0x3668e0,..._0x4a6978,'api':{..._0x3668e0['api'],..._0x4a6978[_0x2cd8b7(0xd3)]},'pagination':{..._0x3668e0[_0x2cd8b7(0xd7)],..._0x4a6978[_0x2cd8b7(0xd7)]},'search':{..._0x3668e0['search'],..._0x4a6978[_0x2cd8b7(0xcd)]},'sort':{..._0x3668e0[_0x2cd8b7(0xcb)],..._0x4a6978[_0x2cd8b7(0xcb)]},'label':{..._0x3668e0[_0x2cd8b7(0xd1)],..._0x4a6978['label']}};}function _0x314a(){const _0x501b84=['C2vHCMnO','ndbLB0Dlu0u','ndGWt0nby3v3','mtyWmJi0EvbzCwnN','BgfIzwW','mty4rg5uAhj3','yxbP','mK1myLLRtW','mZiXotzhwwvbB3e','nta5nZyXwLDeDvzd','CgfNAw5HDgLVBG','mJK1z1vWt0Pe','mte5ndu1n1zzzuPwrW','ndGXndeXohLlChLRAW','odmZnJr4z2Ljt3e','mJaYohz6zMnSqG','C29YDa','mJmYndyZs1HIrwn1'];_0x314a=function(){return _0x501b84;};return _0x314a();}export function mergePermission(_0x220bb2,_0x117772){return{...DEFAULT_CRUD_PERMISSION,..._0x117772,..._0x220bb2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3a137a=_0x37c3;function _0x1d3a(){const _0x21d98b=['mtu2mZyXmgDWzxfRDW','y3jLyxrLrwXLBwvUDa','Dgv4DenVBNrLBNq','mKzszLrJvW','nteYmxDkBhj3BG','mti2mdq2mfHAu3byqG','Dw5TB3vUDa','mtyZndm0mhPhyu9kzG','mJCXmJa4uxnZB3LP','CMvTB3zL','yM9KEq','mtb6s25Kwxi','cI52Bs1JB25MAxjTw2rHDgeTC2XVDd0NzgLHBg9NlwnVBNrLBNqNxsb7cIaGD2LKDgG6ig1PBIG0mdbWEcWGy2fSyYGXmdb2DYaTidmYChGPksaHAw1WB3j0yw50oWOGig1HEc13Awr0AdOGBwLUkdqWmhb4lcbJywXJkdeWmhz3ic0GmZjWEcKPicfPBxbVCNrHBNq7cIaGz2fWoIaWicfPBxbVCNrHBNq7cIaGCgfKzgLUzZOGmcaHAw1WB3j0yw50oWOGigjVCMrLCJOGBM9UzsaHAw1WB3j0yw50oWOGigjVCMrLCI1YywrPDxm6idi0ChGGiwLTCg9YDgfUDdSkicbIB3GTC2HHzg93oIb2yxiOls1ZAgfKB3CTC29MDcKGiwLTCg9YDgfUDdSkFqOUDM0Ty29UzMLYBv9FAgvHzcb7ihbHzgrPBMC6ide4ChGGmJjWEcaWoYbIB3jKzxiTyM90Dg9ToIbUB25LoYb9cI52Bs1JB25MAxjTx190AxrSzsb7igzVBNqTC2L6ztOGmtzWEdSGzM9UDc13zwLNAhq6idy1mdSGFqOUDM0Ty29UzMLYBv9FyM9KEsb7cIaGCgfKzgLUzZOGmtjWEcaYmNb4idHWEdSkicbJB2XVCJOGDMfYkc0TzM9YzwDYB3vUzcK7cIaGzM9UDc1ZAxPLoIaXnhb4oWOGigXPBMuTAgvPz2H0oIaXlJy7cN0klNzTlwnVBMzPCM1Fx2zVB3qGEWOGigrPC3bSyxK6igzSzxG7cIaGANvZDgLMEs1JB250zw50oIbMBgv4lwvUzdSkicbNyxa6idHWEdSkicbWywrKAw5NoIaXnhb4idiYChG7cN0klNzTlwnVBMzPCM1Fx2j0BIb7cIaGAgvPz2H0oIaZnNb4oWOGihbHzgrPBMC6idaGmtzWEdSkicbIB3jKzxi6ig5VBMu7cIaGyM9YzgvYlxjHzgL1CZOGmtjWEdSkicbMB250lxnPEMu6ideZChG7cIaGzM9UDc13zwLNAhq6idyWmdSkicbJDxjZB3i6ihbVAw50zxi7cN0klNzTlwnVBMzPCM1Fx2j0BI5PCY1WCMLTyxj5ihSGyMfJA2DYB3vUzdOGDMfYkc0TyNjHBMqPoYbJB2XVCJOGi2zMzJSGFqOUDM0Ty29UzMLYBv9FyNrUlMLZlxbYAw1HCNK6Ag92zxiGEYbIywnRz3jVDw5KoIb2yxiOls1ICMfUzc1KzwvWktSGFqOUDM0Ty29UzMLYBv9FyNrUlMLZlwDOB3n0ihSGyMfJA2DYB3vUzdOGDMfYkc0TBxv0zwqPoYbJB2XVCJOGDMfYkc0TzM9YzwDYB3vUzcK7ih0k','DM0Ty29UzMLYBv9FzM9VDa','mte4nePxC3vpzW','DM0Ty29UzMLYBs1ZDhLSzq','zgL2','Dw5KzwzPBMvK','AgvHza','mty1otuXmg9jzNj6vW','DM0Ty29UzMLYBv9FDgL0Bgu','z2v0rwXLBwvUDej5swq','C3r5Bgu','mtu0ntaXDvrptvH6','yNv0Dg9U','DMfSDwu','y29UzMLYBvrLEhq','DM0Ty29UzMLYBv9FyNrUigLZlxbYAw1HCNK','DM0Ty29UzMLYBv9FAgvHza','BwvZC2fNzq','DM0Ty29UzMLYBv9FyM9KEq'];_0x1d3a=function(){return _0x21d98b;};return _0x1d3a();}(function(_0x402913,_0x2f852a){const _0x356cce=_0x37c3,_0x17223b=_0x402913();while(!![]){try{const _0x2d18d6=-parseInt(_0x356cce(0xb7))/0x1+-parseInt(_0x356cce(0xc2))/0x2*(-parseInt(_0x356cce(0xc6))/0x3)+parseInt(_0x356cce(0xc4))/0x4+-parseInt(_0x356cce(0xca))/0x5*(parseInt(_0x356cce(0xb3))/0x6)+-parseInt(_0x356cce(0xc7))/0x7+-parseInt(_0x356cce(0xae))/0x8*(-parseInt(_0x356cce(0xc3))/0x9)+parseInt(_0x356cce(0xbf))/0xa;if(_0x2d18d6===_0x2f852a)break;else _0x17223b['push'](_0x17223b['shift']());}catch(_0x3563b1){_0x17223b['push'](_0x17223b['shift']());}}}(_0x1d3a,0x56705));function _0x37c3(_0x5a9907,_0x5b8e20){_0x5a9907=_0x5a9907-0xac;const _0x1d3ad3=_0x1d3a();let _0x37c3ed=_0x1d3ad3[_0x5a9907];if(_0x37c3['BgPSEG']===undefined){var _0x358aba=function(_0x39ca0b){const _0x36f212='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ab3c1='',_0x49aee2='';for(let _0x38d7b1=0x0,_0x2ec3b0,_0x48a786,_0x617470=0x0;_0x48a786=_0x39ca0b['charAt'](_0x617470++);~_0x48a786&&(_0x2ec3b0=_0x38d7b1%0x4?_0x2ec3b0*0x40+_0x48a786:_0x48a786,_0x38d7b1++%0x4)?_0x2ab3c1+=String['fromCharCode'](0xff&_0x2ec3b0>>(-0x2*_0x38d7b1&0x6)):0x0){_0x48a786=_0x36f212['indexOf'](_0x48a786);}for(let _0x36665d=0x0,_0x33a4df=_0x2ab3c1['length'];_0x36665d<_0x33a4df;_0x36665d++){_0x49aee2+='%'+('00'+_0x2ab3c1['charCodeAt'](_0x36665d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x49aee2);};_0x37c3['riJHRF']=_0x358aba,_0x37c3['wVTzkD']={},_0x37c3['BgPSEG']=!![];}const _0x29c303=_0x1d3ad3[0x0],_0x189e37=_0x5a9907+_0x29c303,_0x237469=_0x37c3['wVTzkD'][_0x189e37];return!_0x237469?(_0x37c3ed=_0x37c3['riJHRF'](_0x37c3ed),_0x37c3['wVTzkD'][_0x189e37]=_0x37c3ed):_0x37c3ed=_0x237469,_0x37c3ed;}import{createApp,h,ref}from'vue';import{Dialog,DialogContent,DialogFooter,DialogHeader,DialogTitle}from'../components/ui/dialog';import{getCrudConfig}from'./style';function getConfirmDialog(){const _0x2ab3c1=getCrudConfig()['confirmDialog'];if(_0x2ab3c1)return _0x2ab3c1;return{'Dialog':Dialog,'DialogContent':DialogContent,'DialogFooter':DialogFooter,'DialogHeader':DialogHeader,'DialogTitle':DialogTitle};}export function vmConfirm(_0x49aee2){const _0x38d7b1=typeof _0x49aee2==='string'?{'message':_0x49aee2}:_0x49aee2;return new Promise(_0x2ec3b0=>{const _0xb49e7a=_0x37c3,{Dialog:_0x48a786,DialogContent:_0x617470,DialogFooter:_0x36665d,DialogHeader:_0x33a4df,DialogTitle:_0x560c9e}=getConfirmDialog(),_0x544538=ref(!![]),_0x4892d7=document[_0xb49e7a(0xc0)](_0xb49e7a(0xb0));document[_0xb49e7a(0xc9)]['appendChild'](_0x4892d7);const _0x380e94=createApp({'setup'(){const _0x3a846a=_0xb49e7a;function _0x532b2e(_0x5e83ef){const _0x3d892a=_0x37c3;_0x544538[_0x3d892a(0xb9)]=![],_0x2ec3b0(_0x5e83ef),setTimeout(()=>{const _0x4946e5=_0x3d892a;_0x380e94[_0x4946e5(0xc5)](),_0x4892d7[_0x4946e5(0xc8)]();},0xc8);}return()=>h(_0x48a786,{'open':_0x544538[_0x3a846a(0xb9)],'onUpdate:open':_0x3eee8c=>{if(!_0x3eee8c)_0x532b2e(![]);}},{'default':()=>h(_0x617470,{'class':'vm-confirm','showCloseButton':![]},{'default':()=>[h(_0x33a4df,{'class':_0x3a846a(0xbc)},()=>h(_0x560c9e,{'class':_0x3a846a(0xb4)},()=>_0x38d7b1['title']||'提示')),h(_0x3a846a(0xb0),{'class':_0x3a846a(0xbe)},_0x38d7b1[_0x3a846a(0xbd)]),h(_0x36665d,{'class':_0x3a846a(0xad)},()=>[h(_0x3a846a(0xb8),{'type':_0x3a846a(0xb8),'class':'vm-confirm__btn\x20is-ghost','onClick':()=>_0x532b2e(![])},_0x38d7b1['cancelText']||'取消'),h(_0x3a846a(0xb8),{'type':_0x3a846a(0xb8),'class':_0x3a846a(0xbb),'onClick':()=>_0x532b2e(!![])},_0x38d7b1[_0x3a846a(0xba)]||'确定')])]})});}});_0x380e94['mount'](_0x4892d7);});}if(typeof document!==_0x3a137a(0xb1)&&!document[_0x3a137a(0xb5)](_0x3a137a(0xaf))){const style=document[_0x3a137a(0xc0)](_0x3a137a(0xb6));style['id']=_0x3a137a(0xaf),style[_0x3a137a(0xc1)]=_0x3a137a(0xac),document[_0x3a137a(0xb2)]['appendChild'](style);}
|