wui-components-v2 1.2.20 → 1.2.21
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.
|
@@ -13,7 +13,7 @@ defineOptions({
|
|
|
13
13
|
const sourceId = ref('')
|
|
14
14
|
const id = ref('')
|
|
15
15
|
const title = ref('')
|
|
16
|
-
const pageConfig = ref<dtmplConfig>
|
|
16
|
+
const pageConfig = ref<dtmplConfig>({
|
|
17
17
|
id: '',
|
|
18
18
|
title: '',
|
|
19
19
|
groups: [],
|
|
@@ -27,7 +27,7 @@ const data = ref<Entities>({
|
|
|
27
27
|
})
|
|
28
28
|
const groups = ref<Groups>({
|
|
29
29
|
id: '',
|
|
30
|
-
buttons: [
|
|
30
|
+
buttons: [],
|
|
31
31
|
fields: [],
|
|
32
32
|
title: '',
|
|
33
33
|
type: '',
|
|
@@ -36,7 +36,6 @@ const groups = ref<Groups>({
|
|
|
36
36
|
relationNames: [],
|
|
37
37
|
readOnly: false,
|
|
38
38
|
displayConfig: [],
|
|
39
|
-
|
|
40
39
|
})
|
|
41
40
|
const loading = ref(false)
|
|
42
41
|
// 折叠面板
|
|
@@ -73,7 +72,7 @@ function getQueryParams(url: string) {
|
|
|
73
72
|
const result: { [key: string]: string } = {}
|
|
74
73
|
|
|
75
74
|
// 遍历键值对
|
|
76
|
-
pairs.forEach(
|
|
75
|
+
pairs.forEach(pair => {
|
|
77
76
|
const [key, value] = pair.split('=')
|
|
78
77
|
// 解码URI组件并添加到结果对象
|
|
79
78
|
result[decodeURIComponent(key)] = decodeURIComponent(value || '')
|
|
@@ -98,8 +97,7 @@ async function getPageConfig() {
|
|
|
98
97
|
})
|
|
99
98
|
getDetailData()
|
|
100
99
|
}
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
100
|
+
} catch (error) {
|
|
103
101
|
console.log(error)
|
|
104
102
|
loading.value = false
|
|
105
103
|
}
|
|
@@ -111,8 +109,7 @@ async function getDetailData() {
|
|
|
111
109
|
const res = await detailPageData(sourceId.value, id.value)
|
|
112
110
|
data.value = res.entity
|
|
113
111
|
loading.value = false
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
112
|
+
} catch (error) {
|
|
116
113
|
loading.value = false
|
|
117
114
|
console.log(error)
|
|
118
115
|
}
|
|
@@ -126,15 +123,36 @@ async function getDetailData() {
|
|
|
126
123
|
</view>
|
|
127
124
|
<view v-else>
|
|
128
125
|
<wd-collapse v-model="collapses">
|
|
129
|
-
<wd-collapse-item
|
|
126
|
+
<wd-collapse-item
|
|
127
|
+
v-for="(group, index) in pageConfig.groups"
|
|
128
|
+
:key="group.id"
|
|
129
|
+
:title="group.title"
|
|
130
|
+
:name="group.id"
|
|
131
|
+
>
|
|
130
132
|
<view v-if="group.type === 'fieldGroup'" class="text-sm space-y-3">
|
|
131
133
|
<LabelValue :index="index" :exhibit-data="group.fields" :data="data" />
|
|
132
134
|
</view>
|
|
133
135
|
<view v-if="group.type === 'relation'">
|
|
134
136
|
<view v-for="(field, subindex) in data.arrayMap[group.id]" :key="field.code">
|
|
135
|
-
<foldCard2
|
|
137
|
+
<foldCard2
|
|
138
|
+
:index="subindex"
|
|
139
|
+
:enum-column="{}"
|
|
140
|
+
:groups="group"
|
|
141
|
+
:source-id="sourceId"
|
|
142
|
+
:columns="group.fields"
|
|
143
|
+
model="complex"
|
|
144
|
+
:data="field"
|
|
145
|
+
>
|
|
136
146
|
<template #buttons>
|
|
137
|
-
<CardBotomButtons
|
|
147
|
+
<CardBotomButtons
|
|
148
|
+
:primary-column="
|
|
149
|
+
group.primaryColumn || { controlType: '', extControlType: '', sourceId: '', mstrucId: '' }
|
|
150
|
+
"
|
|
151
|
+
:source-id="group.id"
|
|
152
|
+
:item="groups"
|
|
153
|
+
:code="field.code"
|
|
154
|
+
:data="data"
|
|
155
|
+
/>
|
|
138
156
|
</template>
|
|
139
157
|
</foldCard2>
|
|
140
158
|
</view>
|