@yxhl/specter-pui-vtk 1.0.74 → 1.0.76
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 +2507 -2240
- 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/VtkDateSelector.vue +307 -166
- package/src/components/assembly/VtkDept.vue +0 -1
- package/src/components/assembly/VtkSearch.vue +231 -182
- package/src/components/assembly/VtkStepper.vue +1 -1
- package/src/components/message/toast.vue +3 -3
|
@@ -1,182 +1,231 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="search">
|
|
3
|
-
<VMenu
|
|
4
|
-
v-model="menu"
|
|
5
|
-
@update:model-value="obtain"
|
|
6
|
-
location="bottom end"
|
|
7
|
-
origin="top end"
|
|
8
|
-
offset="12"
|
|
9
|
-
:close-on-content-click="false"
|
|
10
|
-
>
|
|
11
|
-
<template v-slot:activator="{ props }">
|
|
12
|
-
<VTextField
|
|
13
|
-
v-model="queryParam.condition"
|
|
14
|
-
:placeholder="$attrs.placeholder || '请输入查询内容'"
|
|
15
|
-
:style="$attrs.styles"
|
|
16
|
-
class="box"
|
|
17
|
-
density="compact"
|
|
18
|
-
variant="outlined"
|
|
19
|
-
hide-details
|
|
20
|
-
@click:append="search"
|
|
21
|
-
@keyup.enter="search"
|
|
22
|
-
@click:clear="(queryParam.condition = ''), search()"
|
|
23
|
-
clearable
|
|
24
|
-
>
|
|
25
|
-
<template v-slot:append-inner>
|
|
26
|
-
<VBadge
|
|
27
|
-
dot
|
|
28
|
-
:content="initialIndex"
|
|
29
|
-
:model-value="initialIndex > 0"
|
|
30
|
-
color="error"
|
|
31
|
-
class="advanced-badge"
|
|
32
|
-
>
|
|
33
|
-
<span
|
|
34
|
-
v-bind="props"
|
|
35
|
-
class="text-blue vtk-cursor-pointer d-inline-flex align-center text-body-2"
|
|
36
|
-
>
|
|
37
|
-
高级
|
|
38
|
-
</span>
|
|
39
|
-
</VBadge>
|
|
40
|
-
</template>
|
|
41
|
-
</VTextField>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<VCard
|
|
45
|
-
<VCardTitle class="pr-3 d-flex justify-space-between align-center pb-5">
|
|
46
|
-
<span>高级搜索</span>
|
|
47
|
-
<VBtn class="mx-0" variant="text" icon @click="close" size="small">
|
|
48
|
-
<VIcon>mdi-close</VIcon>
|
|
49
|
-
</VBtn>
|
|
50
|
-
</VCardTitle>
|
|
51
|
-
|
|
52
|
-
<VCardText
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="search">
|
|
3
|
+
<VMenu
|
|
4
|
+
v-model="menu"
|
|
5
|
+
@update:model-value="obtain"
|
|
6
|
+
location="bottom end"
|
|
7
|
+
origin="top end"
|
|
8
|
+
offset="12"
|
|
9
|
+
:close-on-content-click="false"
|
|
10
|
+
>
|
|
11
|
+
<template v-slot:activator="{ props }">
|
|
12
|
+
<VTextField
|
|
13
|
+
v-model="queryParam.condition"
|
|
14
|
+
:placeholder="$attrs.placeholder || '请输入查询内容'"
|
|
15
|
+
:style="$attrs.styles"
|
|
16
|
+
class="box"
|
|
17
|
+
density="compact"
|
|
18
|
+
variant="outlined"
|
|
19
|
+
hide-details
|
|
20
|
+
@click:append="search"
|
|
21
|
+
@keyup.enter="search"
|
|
22
|
+
@click:clear="(queryParam.condition = ''), search()"
|
|
23
|
+
clearable
|
|
24
|
+
>
|
|
25
|
+
<template v-slot:append-inner>
|
|
26
|
+
<VBadge
|
|
27
|
+
dot
|
|
28
|
+
:content="initialIndex"
|
|
29
|
+
:model-value="initialIndex > 0"
|
|
30
|
+
color="error"
|
|
31
|
+
class="advanced-badge"
|
|
32
|
+
>
|
|
33
|
+
<span
|
|
34
|
+
v-bind="props"
|
|
35
|
+
class="text-blue vtk-cursor-pointer d-inline-flex align-center text-body-2"
|
|
36
|
+
>
|
|
37
|
+
高级
|
|
38
|
+
</span>
|
|
39
|
+
</VBadge>
|
|
40
|
+
</template>
|
|
41
|
+
</VTextField>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<VCard class="search-panel">
|
|
45
|
+
<VCardTitle class="pr-3 d-flex justify-space-between align-center pb-5">
|
|
46
|
+
<span>高级搜索</span>
|
|
47
|
+
<VBtn class="mx-0" variant="text" icon @click="close" size="small">
|
|
48
|
+
<VIcon>mdi-close</VIcon>
|
|
49
|
+
</VBtn>
|
|
50
|
+
</VCardTitle>
|
|
51
|
+
|
|
52
|
+
<VCardText class="search-panel__body">
|
|
53
|
+
<div class="search-panel__content" :style="contentStyle">
|
|
54
|
+
<slot :query-param="queryParam"></slot>
|
|
55
|
+
</div>
|
|
56
|
+
</VCardText>
|
|
57
|
+
|
|
58
|
+
<VCardActions class="pt-0 px-4 pb-3">
|
|
59
|
+
<slot name="actions"></slot>
|
|
60
|
+
<VSpacer />
|
|
61
|
+
<VBtn @click="search" variant="flat" color="primary">
|
|
62
|
+
<VIcon class="mr-1">mdi-magnify</VIcon>搜索
|
|
63
|
+
</VBtn>
|
|
64
|
+
<VBtn @click="handleResetClick" variant="flat" color="error">
|
|
65
|
+
<VIcon class="mr-1">mdi-sync</VIcon>重置
|
|
66
|
+
</VBtn>
|
|
67
|
+
</VCardActions>
|
|
68
|
+
</VCard>
|
|
69
|
+
</VMenu>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup>
|
|
74
|
+
import { computed, getCurrentInstance, onMounted, ref, watch } from 'vue';
|
|
75
|
+
|
|
76
|
+
defineOptions({
|
|
77
|
+
name: "VtkSearch"
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const props = defineProps({
|
|
81
|
+
value: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => ({})
|
|
84
|
+
},
|
|
85
|
+
contentMinHeight: {
|
|
86
|
+
type: [Number, String],
|
|
87
|
+
default: 0
|
|
88
|
+
},
|
|
89
|
+
contentMaxHeight: {
|
|
90
|
+
type: [Number, String],
|
|
91
|
+
default: 360
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
const emit = defineEmits(['update:value', 'search', 'reset']);
|
|
96
|
+
const instance = getCurrentInstance();
|
|
97
|
+
|
|
98
|
+
const user = ref({});
|
|
99
|
+
const menu = ref(false);
|
|
100
|
+
const queryParam = ref({ ...props.value });
|
|
101
|
+
const initialQueryParam = ref({ ...props.value });
|
|
102
|
+
|
|
103
|
+
const initialIndex = computed(() => {
|
|
104
|
+
return Object.entries(queryParam.value).filter(([key, val]) => {
|
|
105
|
+
if (key === 'condition') return false;
|
|
106
|
+
const initVal = initialQueryParam.value[key];
|
|
107
|
+
if (Array.isArray(val) && Array.isArray(initVal)) {
|
|
108
|
+
return JSON.stringify(val) !== JSON.stringify(initVal);
|
|
109
|
+
}
|
|
110
|
+
return val !== initVal;
|
|
111
|
+
}).length;
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const contentStyle = computed(() => {
|
|
115
|
+
const minValue = props.contentMinHeight;
|
|
116
|
+
const maxValue = props.contentMaxHeight;
|
|
117
|
+
const minHeight = typeof minValue === 'number' ? `${minValue}px` : minValue;
|
|
118
|
+
const maxHeight = typeof maxValue === 'number' ? `${maxValue}px` : maxValue;
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
...(minValue ? { minHeight } : {}),
|
|
122
|
+
maxHeight,
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
watch(
|
|
127
|
+
() => props.value,
|
|
128
|
+
(newVal) => {
|
|
129
|
+
queryParam.value = { ...newVal };
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
onMounted(() => {
|
|
134
|
+
user.value = JSON.parse(localStorage.getItem("_mis_acis_users") || "{}");
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const obtain = () => {};
|
|
138
|
+
|
|
139
|
+
const close = () => {
|
|
140
|
+
menu.value = false;
|
|
141
|
+
obtain();
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const filterNull = (obj) => {
|
|
145
|
+
return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== null && v !== undefined));
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const search = () => {
|
|
149
|
+
close();
|
|
150
|
+
emit('update:value', filterNull(queryParam.value));
|
|
151
|
+
emit("search");
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const reset = () => {
|
|
155
|
+
queryParam.value = {
|
|
156
|
+
...initialQueryParam.value,
|
|
157
|
+
condition: ''
|
|
158
|
+
};
|
|
159
|
+
emit('update:value', filterNull(queryParam.value));
|
|
160
|
+
emit("search");
|
|
161
|
+
menu.value = false;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const handleResetClick = () => {
|
|
165
|
+
const hasParentResetHandler = Boolean(instance?.vnode.props?.onReset);
|
|
166
|
+
|
|
167
|
+
if (hasParentResetHandler) {
|
|
168
|
+
emit('reset', { ...queryParam.value });
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
reset();
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
defineExpose({ search, reset });
|
|
176
|
+
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<style lang="scss" scoped>
|
|
180
|
+
.search {
|
|
181
|
+
position: relative;
|
|
182
|
+
min-width: 380px;
|
|
183
|
+
min-height: 40px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.box {
|
|
187
|
+
min-width: 380px;
|
|
188
|
+
min-height: 40px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.search-panel {
|
|
192
|
+
width: 380px;
|
|
193
|
+
margin-right: -16px;
|
|
194
|
+
overflow: visible;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.search-panel__body {
|
|
198
|
+
overflow: visible;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.search-panel__content {
|
|
202
|
+
overflow-x: hidden;
|
|
203
|
+
overflow-y: auto;
|
|
204
|
+
scrollbar-gutter: stable;
|
|
205
|
+
scrollbar-color: rgb(var(--v-theme-primary)) transparent;
|
|
206
|
+
scrollbar-width: thin;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
.search-panel__content::-webkit-scrollbar-track {
|
|
211
|
+
background: transparent;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.search-panel__content::-webkit-scrollbar-thumb {
|
|
215
|
+
background: rgb(var(--v-theme-primary));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:deep(.box .v-field__append-inner) {
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
padding-left: 16px !important;
|
|
221
|
+
padding-right: 4px !important;
|
|
222
|
+
border-left: 1px #cccccc88 solid;
|
|
223
|
+
min-width: 50px;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:deep(.advanced-badge .v-badge__badge) {
|
|
229
|
+
transform: translate(10px, -2px);
|
|
230
|
+
}
|
|
231
|
+
</style>
|