@yxhl/specter-pui-vtk 1.0.110 → 1.0.112
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/specter-pui-vtk.css +1 -1
- package/dist/specter-pui.es.js +2448 -2447
- package/dist/specter-pui.es.js.map +1 -1
- package/dist/specter-pui.umd.js +1 -1
- package/dist/specter-pui.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/assembly/VtkDept.vue +13 -6
- package/src/components/assembly/VtkPage.vue +3 -2
- package/src/components/assembly/VtkSearch.vue +11 -4
package/package.json
CHANGED
|
@@ -10,6 +10,10 @@ console.log('window.VTK_CONFIG?.storageKeys?.user', window.VTK_CONFIG?.storageKe
|
|
|
10
10
|
console.log('user', user)
|
|
11
11
|
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
12
12
|
|
|
13
|
+
// 字段命名兼容:不同环境的用户信息 / 接口返回可能是 areacode 或 areaCode
|
|
14
|
+
const pickAreaCode = (obj) => obj?.areaCode || obj?.areacode || '';
|
|
15
|
+
const pickAreaName = (obj) => obj?.areaName || obj?.areaname || '';
|
|
16
|
+
|
|
13
17
|
// 定义 props - 控制是否支持多选
|
|
14
18
|
const props = defineProps({
|
|
15
19
|
multiple: {
|
|
@@ -46,13 +50,13 @@ watch(areaSelectedData, (newVal, oldVal) => {
|
|
|
46
50
|
|
|
47
51
|
// 获取地区列表
|
|
48
52
|
const getAreaList = () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
const userAreaCode = pickAreaCode(user);
|
|
54
|
+
if (userAreaCode) {
|
|
55
|
+
proxy.$vtk.request.getForm(`/dict/area/show/${userAreaCode}`).then((res) => {
|
|
52
56
|
if (res && res.data) {
|
|
53
57
|
areaData.value = [{
|
|
54
|
-
areaCode: res.data
|
|
55
|
-
areaName: res.data
|
|
58
|
+
areaCode: pickAreaCode(res.data),
|
|
59
|
+
areaName: pickAreaName(res.data),
|
|
56
60
|
children: []
|
|
57
61
|
}];
|
|
58
62
|
}
|
|
@@ -63,10 +67,13 @@ const getAreaList = () => {
|
|
|
63
67
|
// 获取下级地区列表
|
|
64
68
|
const getAreaNextList = async (item) => {
|
|
65
69
|
await pause(300);
|
|
66
|
-
const parentCode = item
|
|
70
|
+
const parentCode = pickAreaCode(item);
|
|
67
71
|
proxy.$vtk.request.getForm(`/dict/area/next/${parentCode}`).then((res) => {
|
|
68
72
|
if (res && res.data) {
|
|
69
73
|
res.data.forEach((it) => {
|
|
74
|
+
// 统一成 areaCode / areaName,避免后端返回 areacode 时树取值取不到
|
|
75
|
+
it.areaCode = pickAreaCode(it);
|
|
76
|
+
it.areaName = pickAreaName(it);
|
|
70
77
|
it.areaLeve < 12 && (it.children = []);
|
|
71
78
|
item.children.push(it);
|
|
72
79
|
});
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@update:model-value="pageChange()"
|
|
22
22
|
/>
|
|
23
23
|
</span>
|
|
24
|
-
<span class="page-total ml-
|
|
24
|
+
<span class="page-total ml-1 d-none d-md-flex align-center">到</span>
|
|
25
25
|
<VTextField
|
|
26
26
|
v-model="pagination.pageno"
|
|
27
27
|
variant="outlined"
|
|
@@ -140,7 +140,7 @@ const pageChange = () => {
|
|
|
140
140
|
}
|
|
141
141
|
.page-select {
|
|
142
142
|
padding-top: 4px;
|
|
143
|
-
max-width:
|
|
143
|
+
max-width: 120px;
|
|
144
144
|
:deep(.v-input__control) {
|
|
145
145
|
min-height: 36px !important;
|
|
146
146
|
height: 36px !important;
|
|
@@ -157,6 +157,7 @@ const pageChange = () => {
|
|
|
157
157
|
}
|
|
158
158
|
.page-go {
|
|
159
159
|
max-width: 75px;
|
|
160
|
+
padding-top: 4px;
|
|
160
161
|
:deep(.v-input__control) {
|
|
161
162
|
min-height: 36px !important;
|
|
162
163
|
height: 36px !important;
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
size="small"
|
|
29
29
|
@click.stop="search"
|
|
30
30
|
>mdi-magnify</VIcon>
|
|
31
|
-
<span class="search-
|
|
32
|
-
|
|
31
|
+
<span v-bind="props" class="search-advanced">
|
|
32
|
+
<span class="search-divider"></span>
|
|
33
33
|
<VBadge
|
|
34
34
|
dot
|
|
35
35
|
:content="initialIndex"
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
class="advanced-badge"
|
|
39
39
|
>
|
|
40
40
|
<span
|
|
41
|
-
v-bind="props"
|
|
42
41
|
class="pl-1 text-blue vtk-cursor-pointer d-inline-flex align-center text-body-2"
|
|
43
42
|
>
|
|
44
43
|
高级
|
|
@@ -271,12 +270,20 @@ defineExpose({ search, reset });
|
|
|
271
270
|
}
|
|
272
271
|
|
|
273
272
|
:deep(.advanced-badge .v-badge__badge) {
|
|
274
|
-
transform: translate(
|
|
273
|
+
transform: translate(8px, -2px);
|
|
275
274
|
}
|
|
276
275
|
|
|
277
276
|
.search-advanced {
|
|
278
277
|
flex-shrink: 0;
|
|
279
278
|
white-space: nowrap;
|
|
279
|
+
display: inline-flex;
|
|
280
|
+
align-items: center;
|
|
281
|
+
align-self: stretch;
|
|
282
|
+
/* 热区铺满「放大镜右侧 → 输入框右内缘」整段:左侧 4px 补图标外边距,右侧 12px 补
|
|
283
|
+
.v-field--appended 的 padding-inline-end;负外边距抵消 padding,视觉与布局保持原样 */
|
|
284
|
+
padding: 1px 12px 0 4px;
|
|
285
|
+
margin: 0 -12px 0 -4px;
|
|
286
|
+
cursor: pointer;
|
|
280
287
|
}
|
|
281
288
|
|
|
282
289
|
.search-divider {
|