@yxhl/specter-pui-vtk 1.0.84 → 1.0.86
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 +2808 -2717
- 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/VtkImg.vue +13 -13
- package/src/components/assembly/VtkSearch.vue +62 -23
- package/src/components/assembly/VtkUpload.vue +261 -158
package/package.json
CHANGED
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
@click:outside="closePreview"
|
|
38
38
|
>
|
|
39
39
|
<VCard class="image-viewer-card">
|
|
40
|
-
<v-toolbar dark color="primary">
|
|
41
|
-
<v-toolbar-title>{{ currentImageTitle }}</v-toolbar-title>
|
|
42
|
-
<VSpacer></VSpacer>
|
|
43
|
-
<v-toolbar-items>
|
|
40
|
+
<v-toolbar dark color="primary">
|
|
41
|
+
<v-toolbar-title>{{ currentImageTitle }}</v-toolbar-title>
|
|
42
|
+
<VSpacer></VSpacer>
|
|
43
|
+
<v-toolbar-items>
|
|
44
44
|
<VBtn icon dark @click="zoomImage(-0.3)">
|
|
45
45
|
<VIcon>mdi-magnify-minus-outline</VIcon>
|
|
46
46
|
</VBtn>
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
<VBtn icon dark @click="rotateImage(90)">
|
|
54
54
|
<VIcon>mdi-rotate-right</VIcon>
|
|
55
55
|
</VBtn>
|
|
56
|
-
<VBtn icon dark @click="resetImageTransform">
|
|
57
|
-
<VIcon>mdi-refresh</VIcon>
|
|
58
|
-
</VBtn>
|
|
59
|
-
<VBtn icon dark @click="closePreview">
|
|
60
|
-
<VIcon>mdi-close</VIcon>
|
|
61
|
-
</VBtn>
|
|
62
|
-
</v-toolbar-items>
|
|
63
|
-
</v-toolbar>
|
|
56
|
+
<VBtn icon dark @click="resetImageTransform">
|
|
57
|
+
<VIcon>mdi-refresh</VIcon>
|
|
58
|
+
</VBtn>
|
|
59
|
+
<VBtn icon dark @click="closePreview">
|
|
60
|
+
<VIcon>mdi-close</VIcon>
|
|
61
|
+
</VBtn>
|
|
62
|
+
</v-toolbar-items>
|
|
63
|
+
</v-toolbar>
|
|
64
64
|
|
|
65
65
|
<div class="image-viewer-content">
|
|
66
66
|
<VBtn
|
|
@@ -379,7 +379,7 @@ const endImageDrag = (event) => {
|
|
|
379
379
|
|
|
380
380
|
/* 图片查看器样式 */
|
|
381
381
|
.image-viewer-card {
|
|
382
|
-
background-color: rgba(0, 0, 0, 0.
|
|
382
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
383
383
|
color: white;
|
|
384
384
|
}
|
|
385
385
|
|
|
@@ -93,23 +93,45 @@ const props = defineProps({
|
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
const emit = defineEmits(['update:value', 'search', 'reset']);
|
|
96
|
-
const instance = getCurrentInstance();
|
|
97
|
-
|
|
98
|
-
const user = ref({});
|
|
99
|
-
const menu = ref(false);
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
96
|
+
const instance = getCurrentInstance();
|
|
97
|
+
|
|
98
|
+
const user = ref({});
|
|
99
|
+
const menu = ref(false);
|
|
100
|
+
|
|
101
|
+
const cloneValue = (val) => {
|
|
102
|
+
if (Array.isArray(val)) return [...val];
|
|
103
|
+
if (val && typeof val === 'object') return { ...val };
|
|
104
|
+
return val;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const cloneQueryParam = (source = {}) => {
|
|
108
|
+
return Object.fromEntries(Object.entries(source || {}).map(([key, val]) => [key, cloneValue(val)]));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const isSameValue = (a, b) => {
|
|
112
|
+
if (
|
|
113
|
+
Array.isArray(a) ||
|
|
114
|
+
Array.isArray(b) ||
|
|
115
|
+
(a && typeof a === 'object') ||
|
|
116
|
+
(b && typeof b === 'object')
|
|
117
|
+
) {
|
|
118
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return a === b;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const queryParam = ref(cloneQueryParam(props.value));
|
|
125
|
+
const initialQueryParam = ref(cloneQueryParam(props.value));
|
|
126
|
+
const externalQueryParam = ref(cloneQueryParam(props.value));
|
|
127
|
+
|
|
128
|
+
const initialIndex = computed(() => {
|
|
129
|
+
return Object.entries(queryParam.value).filter(([key, val]) => {
|
|
130
|
+
if (key === 'condition') return false;
|
|
131
|
+
const initVal = initialQueryParam.value[key];
|
|
132
|
+
return !isSameValue(val, initVal);
|
|
133
|
+
}).length;
|
|
134
|
+
});
|
|
113
135
|
|
|
114
136
|
const contentStyle = computed(() => {
|
|
115
137
|
const minValue = props.contentMinHeight;
|
|
@@ -123,12 +145,29 @@ const contentStyle = computed(() => {
|
|
|
123
145
|
};
|
|
124
146
|
});
|
|
125
147
|
|
|
126
|
-
watch(
|
|
127
|
-
() => props.value,
|
|
128
|
-
(newVal) => {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
148
|
+
watch(
|
|
149
|
+
() => props.value,
|
|
150
|
+
(newVal = {}) => {
|
|
151
|
+
const nextExternalQueryParam = cloneQueryParam(newVal);
|
|
152
|
+
const nextQueryParam = { ...queryParam.value };
|
|
153
|
+
|
|
154
|
+
Object.entries(nextExternalQueryParam).forEach(([key, val]) => {
|
|
155
|
+
if (!isSameValue(val, externalQueryParam.value[key])) {
|
|
156
|
+
nextQueryParam[key] = cloneValue(val);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
Object.keys(externalQueryParam.value).forEach((key) => {
|
|
161
|
+
if (!(key in nextExternalQueryParam)) {
|
|
162
|
+
delete nextQueryParam[key];
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
queryParam.value = nextQueryParam;
|
|
167
|
+
externalQueryParam.value = nextExternalQueryParam;
|
|
168
|
+
},
|
|
169
|
+
{ deep: true }
|
|
170
|
+
);
|
|
132
171
|
|
|
133
172
|
onMounted(() => {
|
|
134
173
|
user.value = JSON.parse(localStorage.getItem("_mis_acis_users") || "{}");
|