wui-components-v2 1.1.70 → 1.1.71
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/api/feishu.ts +20 -20
- package/api/index.ts +4 -4
- package/api/login.ts +51 -51
- package/api/tree.ts +28 -28
- package/components/action-popup/action-popup.vue +116 -116
- package/components/add-address-list/add-address-list.vue +187 -187
- package/components/add-address-page/config.ts +297 -297
- package/components/audio-play/audio-play.vue +220 -220
- package/components/batch-upload-file/batch-upload-file.vue +75 -75
- package/components/card-botom-buttons/card-botom-buttons.vue +279 -279
- package/components/demo-card/demo-card.vue +44 -44
- package/components/fold-card/fold-card.vue +2 -2
- package/components/global-loading/GlobalLoading.md +366 -366
- package/components/global-loading/global-loading.vue +55 -55
- package/components/global-message/GlobalMessage.md +570 -570
- package/components/global-toast/GlobalToast.md +261 -261
- package/components/global-toast/global-toast.vue +56 -56
- package/components/label-value/open-value-more.vue +56 -56
- package/components/loading/loading.vue +5 -5
- package/components/login-form-box/login-form-box.vue +65 -65
- package/components/phone-login-form/phone-login-form.vue +204 -204
- package/components/privacy-popup/privacy-popup.vue +191 -191
- package/components/scan-input/scan-input.vue +406 -406
- package/components/select-col-picker/select-col-picker.vue +168 -168
- package/components/tab-search/tab-search.vue +73 -73
- package/components/tree-select/components/TreeNode.vue +200 -200
- package/components/tree-select/components/index.vue +471 -471
- package/components/tree-select/components/tree-select.vue +56 -56
- package/components/tree-select/index.vue +93 -93
- package/components/user-choose/user-choose.vue +169 -151
- package/components/video-play/video-play.vue +56 -56
- package/components/wui-auto-update-component/wui-auto-update-component.vue +132 -132
- package/components/wui-default/wui-default.vue +49 -49
- package/components/wui-details-page/wui-details-page.vue +147 -147
- package/components/wui-edit-page/wui-edit-page-copy.vue +757 -757
- package/components/wui-edit-page/wui-edit-page.vue +793 -793
- package/components/wui-login/wui-login.vue +43 -43
- package/components/wui-login1/wui-login.vue +41 -41
- package/components/wui-menus/wui-menus-top.vue +137 -137
- package/components/wui-menus/wui-menus-top1.vue +8 -8
- package/components/wui-menus1/components/banner-carousel.vue +320 -320
- package/components/wui-menus1/components/quick-panel.vue +55 -55
- package/components/wui-menus1/components/search-bar.vue +49 -49
- package/components/wui-menus1/components/section-menus.vue +208 -208
- package/components/wui-menus1/wui-menus-top.vue +718 -718
- package/components/wui-menus1/wui-menus-top1.vue +398 -398
- package/components/wui-notify-info/notify-handle.vue +53 -53
- package/components/wui-scan-binding-sensor/wui-scan-binding-sensor.vue +75 -75
- package/components/wui-search-history-babbar/components/SearchBar.vue +70 -70
- package/components/wui-select-popup/wui-select-popup.vue +1 -0
- package/components/wui-tree-page/wui-tree-page.vue +297 -297
- package/components/wui-update-component/wui-update-component.vue +221 -221
- package/composables/types/theme.ts +65 -65
- package/composables/types/user.ts +5 -5
- package/composables/useColorGenerator.ts +221 -221
- package/composables/useEnumes.ts +43 -43
- package/composables/useEventBus.ts +37 -37
- package/composables/useGlobalLoading.ts +47 -47
- package/composables/useGlobalMessage.ts +53 -53
- package/composables/useGlobalToast.ts +63 -63
- package/composables/useLocale.ts +54 -54
- package/composables/useManualTheme.ts +179 -179
- package/composables/useSectionMenus.ts +120 -120
- package/composables/useTabbar.ts +50 -50
- package/composables/useTheme.ts +74 -74
- package/composables/useUser.ts +24 -24
- package/index.d.ts +90 -90
- package/package.json +24 -24
- package/store/manualThemeStore.ts +143 -143
- package/store/persist.ts +41 -41
- package/store/themeStore.ts +74 -74
- package/store/userStore.ts +22 -22
- package/styles/dark-mode.scss +498 -498
- package/type.ts +154 -154
- package/utils/control-tree.ts +353 -353
- package/utils/eventBus.ts +36 -36
- package/utils/idata-scan.ts +99 -99
- package/utils/index.ts +979 -979
- package/utils/rsaEncrypt.ts +10 -10
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { defineOptions, ref } from 'vue'
|
|
3
|
-
import { onLoad } from '@dcloudio/uni-app'
|
|
4
|
-
import { detailPageConfig, detailPageData } from '../../api/page'
|
|
5
|
-
import type { Entities, Groups, dtmplConfig } from '../../type'
|
|
6
|
-
import CardBotomButtons from '../card-botom-buttons/card-botom-buttons.vue'
|
|
7
|
-
import foldCard from '../fold-card/fold-card.vue'
|
|
8
|
-
import LabelValue from '../label-value/label-value.vue'
|
|
9
|
-
|
|
10
|
-
defineOptions({
|
|
11
|
-
name: 'WuiDetailsPage',
|
|
12
|
-
})
|
|
13
|
-
const sourceId = ref('')
|
|
14
|
-
const id = ref('')
|
|
15
|
-
const title = ref('')
|
|
16
|
-
const pageConfig = ref<dtmplConfig> ({
|
|
17
|
-
id: '',
|
|
18
|
-
title: '',
|
|
19
|
-
groups: [],
|
|
20
|
-
entity: {} as any,
|
|
21
|
-
buttons: [],
|
|
22
|
-
})
|
|
23
|
-
const data = ref<Entities>({
|
|
24
|
-
code: '',
|
|
25
|
-
fieldMap: {},
|
|
26
|
-
arrayMap: {},
|
|
27
|
-
})
|
|
28
|
-
const groups = ref<Groups>({
|
|
29
|
-
id: '',
|
|
30
|
-
buttons: ['detail'],
|
|
31
|
-
fields: [],
|
|
32
|
-
title: '',
|
|
33
|
-
type: '',
|
|
34
|
-
pointSourceId: '',
|
|
35
|
-
mstrucId: '',
|
|
36
|
-
relationNames: [],
|
|
37
|
-
readOnly: false,
|
|
38
|
-
displayConfig: [],
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
const loading = ref(false)
|
|
42
|
-
// 折叠面板
|
|
43
|
-
const collapses = ref()
|
|
44
|
-
onLoad((option: any) => {
|
|
45
|
-
sourceId.value = option.sourceId
|
|
46
|
-
id.value = option.id
|
|
47
|
-
// #ifdef MP-WEIXIN
|
|
48
|
-
const q = decodeURIComponent(option.q) // 获取到二维码原始链接内容
|
|
49
|
-
const sc: any = getQueryParams(q)
|
|
50
|
-
sourceId.value = sc.sourceId || option.sourceId
|
|
51
|
-
id.value = sc.id || option.id
|
|
52
|
-
// #endif
|
|
53
|
-
title.value = option.title
|
|
54
|
-
uni.setNavigationBarTitle({
|
|
55
|
-
title: `${option.title}`,
|
|
56
|
-
})
|
|
57
|
-
getPageConfig()
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
// 将 URL 中问号后面的参数转换为对象
|
|
61
|
-
function getQueryParams(url: string) {
|
|
62
|
-
// 获取问号后面的部分
|
|
63
|
-
const queryString = url.split('?')[1]
|
|
64
|
-
|
|
65
|
-
if (!queryString) {
|
|
66
|
-
return {}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// 将参数字符串分割成键值对数组
|
|
70
|
-
const pairs = queryString.split('&')
|
|
71
|
-
|
|
72
|
-
// 创建结果对象
|
|
73
|
-
const result: { [key: string]: string } = {}
|
|
74
|
-
|
|
75
|
-
// 遍历键值对
|
|
76
|
-
pairs.forEach((pair) => {
|
|
77
|
-
const [key, value] = pair.split('=')
|
|
78
|
-
// 解码URI组件并添加到结果对象
|
|
79
|
-
result[decodeURIComponent(key)] = decodeURIComponent(value || '')
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
return result
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// 获取页面配置
|
|
86
|
-
async function getPageConfig() {
|
|
87
|
-
try {
|
|
88
|
-
loading.value = true
|
|
89
|
-
const res = await detailPageConfig(sourceId.value)
|
|
90
|
-
// 初始化折叠面板
|
|
91
|
-
if (res.dtmplConfig) {
|
|
92
|
-
uni.setNavigationBarTitle({
|
|
93
|
-
title: `${res.dtmplConfig.title}`,
|
|
94
|
-
})
|
|
95
|
-
pageConfig.value = res.dtmplConfig
|
|
96
|
-
collapses.value = pageConfig.value.groups.map((item: Groups) => {
|
|
97
|
-
return item.id
|
|
98
|
-
})
|
|
99
|
-
getDetailData()
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
103
|
-
console.log(error)
|
|
104
|
-
loading.value = false
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// 获取详情数据
|
|
109
|
-
async function getDetailData() {
|
|
110
|
-
try {
|
|
111
|
-
const res = await detailPageData(sourceId.value, id.value)
|
|
112
|
-
data.value = res.entity
|
|
113
|
-
loading.value = false
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
loading.value = false
|
|
117
|
-
console.log(error)
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
</script>
|
|
121
|
-
|
|
122
|
-
<template>
|
|
123
|
-
<view>
|
|
124
|
-
<view v-if="loading" class="flex justify-center p-3">
|
|
125
|
-
<wd-loading />
|
|
126
|
-
</view>
|
|
127
|
-
<view v-else>
|
|
128
|
-
<wd-collapse v-model="collapses">
|
|
129
|
-
<wd-collapse-item v-for="(group, index) in pageConfig.groups" :key="group.id" :title="group.title" :name="group.id">
|
|
130
|
-
<view v-if="group.type === 'fieldGroup'" class="text-sm space-y-3">
|
|
131
|
-
<LabelValue :index="index" :exhibit-data="group.fields" :data="data" />
|
|
132
|
-
</view>
|
|
133
|
-
<view v-if="group.type === 'relation'">
|
|
134
|
-
<view v-for="(field, subindex) in data.arrayMap[group.id]" :key="field.code">
|
|
135
|
-
<foldCard :index="subindex" :enum-column="{}" :groups="group" :source-id="sourceId" :columns="group.fields" model="complex" :data="field">
|
|
136
|
-
<template #buttons>
|
|
137
|
-
<CardBotomButtons :primary-column="group.primaryColumn || { controlType: '', extControlType: '', sourceId: '', mstrucId: '' }" :source-id="group.id" :item="groups" :code="field.code" :data="data" />
|
|
138
|
-
</template>
|
|
139
|
-
</foldCard>
|
|
140
|
-
</view>
|
|
141
|
-
</view>
|
|
142
|
-
</wd-collapse-item>
|
|
143
|
-
</wd-collapse>
|
|
144
|
-
</view>
|
|
145
|
-
<slot name="botombuttons" />
|
|
146
|
-
</view>
|
|
147
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineOptions, ref } from 'vue'
|
|
3
|
+
import { onLoad } from '@dcloudio/uni-app'
|
|
4
|
+
import { detailPageConfig, detailPageData } from '../../api/page'
|
|
5
|
+
import type { Entities, Groups, dtmplConfig } from '../../type'
|
|
6
|
+
import CardBotomButtons from '../card-botom-buttons/card-botom-buttons.vue'
|
|
7
|
+
import foldCard from '../fold-card/fold-card.vue'
|
|
8
|
+
import LabelValue from '../label-value/label-value.vue'
|
|
9
|
+
|
|
10
|
+
defineOptions({
|
|
11
|
+
name: 'WuiDetailsPage',
|
|
12
|
+
})
|
|
13
|
+
const sourceId = ref('')
|
|
14
|
+
const id = ref('')
|
|
15
|
+
const title = ref('')
|
|
16
|
+
const pageConfig = ref<dtmplConfig> ({
|
|
17
|
+
id: '',
|
|
18
|
+
title: '',
|
|
19
|
+
groups: [],
|
|
20
|
+
entity: {} as any,
|
|
21
|
+
buttons: [],
|
|
22
|
+
})
|
|
23
|
+
const data = ref<Entities>({
|
|
24
|
+
code: '',
|
|
25
|
+
fieldMap: {},
|
|
26
|
+
arrayMap: {},
|
|
27
|
+
})
|
|
28
|
+
const groups = ref<Groups>({
|
|
29
|
+
id: '',
|
|
30
|
+
buttons: ['detail'],
|
|
31
|
+
fields: [],
|
|
32
|
+
title: '',
|
|
33
|
+
type: '',
|
|
34
|
+
pointSourceId: '',
|
|
35
|
+
mstrucId: '',
|
|
36
|
+
relationNames: [],
|
|
37
|
+
readOnly: false,
|
|
38
|
+
displayConfig: [],
|
|
39
|
+
|
|
40
|
+
})
|
|
41
|
+
const loading = ref(false)
|
|
42
|
+
// 折叠面板
|
|
43
|
+
const collapses = ref()
|
|
44
|
+
onLoad((option: any) => {
|
|
45
|
+
sourceId.value = option.sourceId
|
|
46
|
+
id.value = option.id
|
|
47
|
+
// #ifdef MP-WEIXIN
|
|
48
|
+
const q = decodeURIComponent(option.q) // 获取到二维码原始链接内容
|
|
49
|
+
const sc: any = getQueryParams(q)
|
|
50
|
+
sourceId.value = sc.sourceId || option.sourceId
|
|
51
|
+
id.value = sc.id || option.id
|
|
52
|
+
// #endif
|
|
53
|
+
title.value = option.title
|
|
54
|
+
uni.setNavigationBarTitle({
|
|
55
|
+
title: `${option.title}`,
|
|
56
|
+
})
|
|
57
|
+
getPageConfig()
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
// 将 URL 中问号后面的参数转换为对象
|
|
61
|
+
function getQueryParams(url: string) {
|
|
62
|
+
// 获取问号后面的部分
|
|
63
|
+
const queryString = url.split('?')[1]
|
|
64
|
+
|
|
65
|
+
if (!queryString) {
|
|
66
|
+
return {}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 将参数字符串分割成键值对数组
|
|
70
|
+
const pairs = queryString.split('&')
|
|
71
|
+
|
|
72
|
+
// 创建结果对象
|
|
73
|
+
const result: { [key: string]: string } = {}
|
|
74
|
+
|
|
75
|
+
// 遍历键值对
|
|
76
|
+
pairs.forEach((pair) => {
|
|
77
|
+
const [key, value] = pair.split('=')
|
|
78
|
+
// 解码URI组件并添加到结果对象
|
|
79
|
+
result[decodeURIComponent(key)] = decodeURIComponent(value || '')
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
return result
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 获取页面配置
|
|
86
|
+
async function getPageConfig() {
|
|
87
|
+
try {
|
|
88
|
+
loading.value = true
|
|
89
|
+
const res = await detailPageConfig(sourceId.value)
|
|
90
|
+
// 初始化折叠面板
|
|
91
|
+
if (res.dtmplConfig) {
|
|
92
|
+
uni.setNavigationBarTitle({
|
|
93
|
+
title: `${res.dtmplConfig.title}`,
|
|
94
|
+
})
|
|
95
|
+
pageConfig.value = res.dtmplConfig
|
|
96
|
+
collapses.value = pageConfig.value.groups.map((item: Groups) => {
|
|
97
|
+
return item.id
|
|
98
|
+
})
|
|
99
|
+
getDetailData()
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
console.log(error)
|
|
104
|
+
loading.value = false
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// 获取详情数据
|
|
109
|
+
async function getDetailData() {
|
|
110
|
+
try {
|
|
111
|
+
const res = await detailPageData(sourceId.value, id.value)
|
|
112
|
+
data.value = res.entity
|
|
113
|
+
loading.value = false
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
loading.value = false
|
|
117
|
+
console.log(error)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<template>
|
|
123
|
+
<view>
|
|
124
|
+
<view v-if="loading" class="flex justify-center p-3">
|
|
125
|
+
<wd-loading />
|
|
126
|
+
</view>
|
|
127
|
+
<view v-else>
|
|
128
|
+
<wd-collapse v-model="collapses">
|
|
129
|
+
<wd-collapse-item v-for="(group, index) in pageConfig.groups" :key="group.id" :title="group.title" :name="group.id">
|
|
130
|
+
<view v-if="group.type === 'fieldGroup'" class="text-sm space-y-3">
|
|
131
|
+
<LabelValue :index="index" :exhibit-data="group.fields" :data="data" />
|
|
132
|
+
</view>
|
|
133
|
+
<view v-if="group.type === 'relation'">
|
|
134
|
+
<view v-for="(field, subindex) in data.arrayMap[group.id]" :key="field.code">
|
|
135
|
+
<foldCard :index="subindex" :enum-column="{}" :groups="group" :source-id="sourceId" :columns="group.fields" model="complex" :data="field">
|
|
136
|
+
<template #buttons>
|
|
137
|
+
<CardBotomButtons :primary-column="group.primaryColumn || { controlType: '', extControlType: '', sourceId: '', mstrucId: '' }" :source-id="group.id" :item="groups" :code="field.code" :data="data" />
|
|
138
|
+
</template>
|
|
139
|
+
</foldCard>
|
|
140
|
+
</view>
|
|
141
|
+
</view>
|
|
142
|
+
</wd-collapse-item>
|
|
143
|
+
</wd-collapse>
|
|
144
|
+
</view>
|
|
145
|
+
<slot name="botombuttons" />
|
|
146
|
+
</view>
|
|
147
|
+
</template>
|