@yxhl/specter-pui-vtk 1.0.38 → 1.0.39
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 +194 -194
- 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/commons/request.js +2 -2
- package/src/components/assembly/VtkArea.vue +1 -1
- package/src/components/assembly/VtkAreaTabs.vue +1 -1
- package/src/components/assembly/VtkDept.vue +1 -1
- package/src/components/assembly/VtkImg.vue +4 -4
- package/src/components/assembly/VtkPdf.vue +2 -2
- package/src/components/assembly/VtkProj.vue +1 -1
- package/src/components/assembly/VtkSearch.vue +1 -1
- package/src/composables/usePage.js +1 -1
package/package.json
CHANGED
package/src/commons/request.js
CHANGED
|
@@ -15,9 +15,9 @@ const service = axios.create({
|
|
|
15
15
|
// request interceptor
|
|
16
16
|
service.interceptors.request.use(
|
|
17
17
|
(config) => {
|
|
18
|
-
if (Storage.get("
|
|
18
|
+
if (Storage.get("_mis_acis_token")) {
|
|
19
19
|
config.headers["X-Token"] = "1b0679be72ad976ad5d491ad57a5eec0";
|
|
20
|
-
config.headers["Authorization"] = "Bearer " + Storage.get("
|
|
20
|
+
config.headers["Authorization"] = "Bearer " + Storage.get("_mis_acis_token");
|
|
21
21
|
}
|
|
22
22
|
return config;
|
|
23
23
|
},
|
|
@@ -156,7 +156,7 @@ const getVtk = () => {
|
|
|
156
156
|
|
|
157
157
|
// 组件挂载时执行
|
|
158
158
|
onMounted(() => {
|
|
159
|
-
user.value = typeof(proxy.$vtk.storage.get("
|
|
159
|
+
user.value = typeof(proxy.$vtk.storage.get("_mis_acis_users")) != 'object' ? JSON.parse(proxy.$vtk.storage.get("_mis_acis_users")) : proxy.$vtk.storage.get("_mis_acis_users") || '';
|
|
160
160
|
area();
|
|
161
161
|
});
|
|
162
162
|
|
|
@@ -198,7 +198,7 @@ watch(() => props.modelValue, (newVal, oldVal) => {
|
|
|
198
198
|
|
|
199
199
|
// 组件挂载时执行
|
|
200
200
|
onMounted(() => {
|
|
201
|
-
user.value = proxy.$vtk.storage.get("
|
|
201
|
+
user.value = proxy.$vtk.storage.get("_mis_acis_users") && JSON.parse(proxy.$vtk.storage.get("_mis_acis_users"));
|
|
202
202
|
getAreaName(user.value.areacode);
|
|
203
203
|
if (props.modelValue) {
|
|
204
204
|
view(props.modelValue);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed, reactive, onMounted, getCurrentInstance, watch, nextTick } from "vue";
|
|
3
3
|
const { proxy } = getCurrentInstance();
|
|
4
|
-
const user = JSON.parse(proxy.$vtk.storage.get("
|
|
4
|
+
const user = JSON.parse(proxy.$vtk.storage.get("_mis_acis_users"));
|
|
5
5
|
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
6
|
|
|
7
7
|
// 定义 props - 控制是否支持多选
|
|
@@ -160,12 +160,12 @@ const srcWithToken = computed(() => {
|
|
|
160
160
|
try {
|
|
161
161
|
// 首先尝试使用 $vtk.storage
|
|
162
162
|
if (window.$vtk && typeof window.$vtk.storage?.get === 'function') {
|
|
163
|
-
const token = window.$vtk.storage.get('
|
|
163
|
+
const token = window.$vtk.storage.get('_mis_acis_token');
|
|
164
164
|
return token ? `${props.src}?stoken=${token}` : props.src;
|
|
165
165
|
}
|
|
166
166
|
// 如果 $vtk 不存在,尝试从 localStorage 获取 token
|
|
167
167
|
else {
|
|
168
|
-
const token = localStorage.getItem('
|
|
168
|
+
const token = localStorage.getItem('_mis_acis_token');
|
|
169
169
|
return token ? `${props.src}?stoken=${token}` : props.src;
|
|
170
170
|
}
|
|
171
171
|
} catch (error) {
|
|
@@ -183,10 +183,10 @@ const currentImageUrl = computed(() => {
|
|
|
183
183
|
try {
|
|
184
184
|
// 为图片列表中的图片也添加token
|
|
185
185
|
if (window.$vtk && typeof window.$vtk.storage?.get === 'function') {
|
|
186
|
-
const token = window.$vtk.storage.get('
|
|
186
|
+
const token = window.$vtk.storage.get('_mis_acis_token');
|
|
187
187
|
return token ? `${currentImage.url}?stoken=${token}` : currentImage.url;
|
|
188
188
|
} else {
|
|
189
|
-
const token = localStorage.getItem('
|
|
189
|
+
const token = localStorage.getItem('_mis_acis_token');
|
|
190
190
|
return token ? `${currentImage.url}?stoken=${token}` : currentImage.url;
|
|
191
191
|
}
|
|
192
192
|
} catch (error) {
|
|
@@ -148,12 +148,12 @@ const srcWithToken = computed(() => {
|
|
|
148
148
|
try {
|
|
149
149
|
// 首先尝试使用 $vtk.storage
|
|
150
150
|
if (window.$vtk && typeof window.$vtk.storage?.get === 'function') {
|
|
151
|
-
const token = window.$vtk.storage.get('
|
|
151
|
+
const token = window.$vtk.storage.get('_mis_acis_token');
|
|
152
152
|
return token ? `${props.src}?stoken=${token}` : props.src;
|
|
153
153
|
}
|
|
154
154
|
// 如果 $vtk 不存在,尝试从 localStorage 获取 token
|
|
155
155
|
else {
|
|
156
|
-
const token = localStorage.getItem('
|
|
156
|
+
const token = localStorage.getItem('_mis_acis_token');
|
|
157
157
|
return token ? `${props.src}?stoken=${token}` : props.src;
|
|
158
158
|
}
|
|
159
159
|
} catch (error) {
|
|
@@ -299,7 +299,7 @@ const list = () => {
|
|
|
299
299
|
const getUserInfo = () => {
|
|
300
300
|
try {
|
|
301
301
|
// 实际项目中从存储或状态管理获取
|
|
302
|
-
return window.$vtk?.storage?.get('
|
|
302
|
+
return window.$vtk?.storage?.get('_mis_acis_users') || {};
|
|
303
303
|
} catch (error) {
|
|
304
304
|
console.warn('获取用户信息失败:', error);
|
|
305
305
|
return {};
|
|
@@ -33,7 +33,7 @@ export function useMixins(urlConfig = {}) {
|
|
|
33
33
|
* @returns {Object} 查询参数对象
|
|
34
34
|
*/
|
|
35
35
|
const getQueryParams = () => {
|
|
36
|
-
user.value = storage.get('
|
|
36
|
+
user.value = storage.get('_mis_acis_users')
|
|
37
37
|
if (!queryParam.areaCode) {
|
|
38
38
|
queryParam.areaCode = user.value?.areacode
|
|
39
39
|
}
|