inl-ui 0.1.155 → 0.1.157
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/components/index.cjs +59 -1
- package/dist/components/index.js +60 -2
- package/dist/index.cjs +60 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +61 -3
- package/package.json +1 -1
|
@@ -7160,7 +7160,65 @@ const PageContent = vue.defineComponent({
|
|
|
7160
7160
|
}
|
|
7161
7161
|
};
|
|
7162
7162
|
const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
|
|
7163
|
+
let interval = null;
|
|
7164
|
+
vue.onMounted(() => {
|
|
7165
|
+
interval = setInterval(() => {
|
|
7166
|
+
historyArr.forEach(item => {
|
|
7167
|
+
if (item.inUse) {
|
|
7168
|
+
item.sendTime += 1e3;
|
|
7169
|
+
if (item.sendTime >= 60 * 1e3) {
|
|
7170
|
+
sendRecord(item, "update");
|
|
7171
|
+
item.sendTime = 0;
|
|
7172
|
+
}
|
|
7173
|
+
}
|
|
7174
|
+
if (item.leaveTime > 0) {
|
|
7175
|
+
item.leaveTime += 1e3;
|
|
7176
|
+
}
|
|
7177
|
+
});
|
|
7178
|
+
historyArr = historyArr.filter(item => item.leaveTime <= 60 * 1e3);
|
|
7179
|
+
}, 1e3);
|
|
7180
|
+
});
|
|
7181
|
+
let historyArr = [];
|
|
7182
|
+
const sendRecord = async (obj, fun) => {
|
|
7183
|
+
const userInfo = JSON.parse(sessionStorage.getItem("userinfo") || "{}");
|
|
7184
|
+
obj.userId = userInfo.userId;
|
|
7185
|
+
obj.userName = userInfo.userName;
|
|
7186
|
+
obj.menuName = obj.name;
|
|
7187
|
+
obj.type = 1;
|
|
7188
|
+
await axios__default["default"].post(fun === "insert" ? "/api/common/v1/menu-usage/record" : "/api/common/v1/menu-usage/update-duration", obj, {
|
|
7189
|
+
headers: {
|
|
7190
|
+
token: sessionStorage.getItem("token") || ""
|
|
7191
|
+
}
|
|
7192
|
+
});
|
|
7193
|
+
};
|
|
7163
7194
|
vue.watch(activeMenu, (val, oldVal) => {
|
|
7195
|
+
if (oldVal) {
|
|
7196
|
+
const historyItem = historyArr.find(item => item.id === oldVal.id);
|
|
7197
|
+
if (historyItem) {
|
|
7198
|
+
historyItem.inUse = false;
|
|
7199
|
+
historyItem.sendTime = 0;
|
|
7200
|
+
historyItem.leaveTime = 1e3;
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
if (val) {
|
|
7204
|
+
const historyItem = historyArr.find(item => item.id === val.id);
|
|
7205
|
+
if (historyItem) {
|
|
7206
|
+
historyItem.leaveTime = 0;
|
|
7207
|
+
historyItem.sendTime = 0;
|
|
7208
|
+
historyItem.inUse = true;
|
|
7209
|
+
sendRecord({
|
|
7210
|
+
...val,
|
|
7211
|
+
uuid: historyItem.uuid
|
|
7212
|
+
}, "update");
|
|
7213
|
+
} else {
|
|
7214
|
+
val.leaveTime = 0;
|
|
7215
|
+
val.sendTime = 0;
|
|
7216
|
+
val.inUse = true;
|
|
7217
|
+
val.uuid = crypto.randomUUID();
|
|
7218
|
+
historyArr.push(val);
|
|
7219
|
+
sendRecord(val, "insert");
|
|
7220
|
+
}
|
|
7221
|
+
}
|
|
7164
7222
|
handleMenuChange(val);
|
|
7165
7223
|
function postIframeActive(id, active) {
|
|
7166
7224
|
const iframeEl = document.querySelector(`#iframe${id}`);
|
|
@@ -7252,6 +7310,7 @@ const PageContent = vue.defineComponent({
|
|
|
7252
7310
|
tabListRef.value?.closeTab(tab);
|
|
7253
7311
|
};
|
|
7254
7312
|
vue.onBeforeUnmount(() => {
|
|
7313
|
+
clearInterval(interval);
|
|
7255
7314
|
for (const app of loadAppList.value) {
|
|
7256
7315
|
app.app.unmount();
|
|
7257
7316
|
}
|
|
@@ -7481,7 +7540,6 @@ const Layout = vue.defineComponent({
|
|
|
7481
7540
|
const currMenu = vue.ref();
|
|
7482
7541
|
const handleMenuSelect = menu => {
|
|
7483
7542
|
currMenu.value = menu;
|
|
7484
|
-
console.log("currMenu.value", currMenu.value);
|
|
7485
7543
|
vue.nextTick(() => currMenu.value = void 0);
|
|
7486
7544
|
};
|
|
7487
7545
|
vue.onBeforeUnmount(() => {
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createVNode, ref, watch, resolveComponent, isVNode, computed, onBeforeUnmount, inject, onActivated, onDeactivated, nextTick, watchEffect, Fragment, withDirectives, vShow, toRaw, reactive, provide, createTextVNode,
|
|
1
|
+
import { defineComponent, createVNode, ref, watch, resolveComponent, isVNode, computed, onBeforeUnmount, inject, onActivated, onDeactivated, nextTick, watchEffect, Fragment, onMounted, withDirectives, vShow, toRaw, reactive, provide, createTextVNode, KeepAlive, toRefs, shallowRef, onBeforeMount, mergeProps, onBeforeUpdate, Teleport } from 'vue';
|
|
2
2
|
import { createFromIconfontCN, SearchOutlined, DownOutlined, PoweroffOutlined, MenuUnfoldOutlined, MenuFoldOutlined, SkinFilled, FullscreenOutlined, PauseCircleOutlined, PlayCircleFilled, FullscreenExitOutlined, CaretUpOutlined, CaretRightOutlined, CaretDownOutlined, FileExcelTwoTone, InboxOutlined, MessageOutlined } from '@ant-design/icons-vue';
|
|
3
3
|
import { useRoute, useRouter } from 'vue-router';
|
|
4
4
|
import { useMounted, resolveRef, useThrottleFn, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useEventListener, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
|
|
@@ -7131,7 +7131,65 @@ const PageContent = defineComponent({
|
|
|
7131
7131
|
}
|
|
7132
7132
|
};
|
|
7133
7133
|
const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
|
|
7134
|
+
let interval = null;
|
|
7135
|
+
onMounted(() => {
|
|
7136
|
+
interval = setInterval(() => {
|
|
7137
|
+
historyArr.forEach(item => {
|
|
7138
|
+
if (item.inUse) {
|
|
7139
|
+
item.sendTime += 1e3;
|
|
7140
|
+
if (item.sendTime >= 60 * 1e3) {
|
|
7141
|
+
sendRecord(item, "update");
|
|
7142
|
+
item.sendTime = 0;
|
|
7143
|
+
}
|
|
7144
|
+
}
|
|
7145
|
+
if (item.leaveTime > 0) {
|
|
7146
|
+
item.leaveTime += 1e3;
|
|
7147
|
+
}
|
|
7148
|
+
});
|
|
7149
|
+
historyArr = historyArr.filter(item => item.leaveTime <= 60 * 1e3);
|
|
7150
|
+
}, 1e3);
|
|
7151
|
+
});
|
|
7152
|
+
let historyArr = [];
|
|
7153
|
+
const sendRecord = async (obj, fun) => {
|
|
7154
|
+
const userInfo = JSON.parse(sessionStorage.getItem("userinfo") || "{}");
|
|
7155
|
+
obj.userId = userInfo.userId;
|
|
7156
|
+
obj.userName = userInfo.userName;
|
|
7157
|
+
obj.menuName = obj.name;
|
|
7158
|
+
obj.type = 1;
|
|
7159
|
+
await axios$3.post(fun === "insert" ? "/api/common/v1/menu-usage/record" : "/api/common/v1/menu-usage/update-duration", obj, {
|
|
7160
|
+
headers: {
|
|
7161
|
+
token: sessionStorage.getItem("token") || ""
|
|
7162
|
+
}
|
|
7163
|
+
});
|
|
7164
|
+
};
|
|
7134
7165
|
watch(activeMenu, (val, oldVal) => {
|
|
7166
|
+
if (oldVal) {
|
|
7167
|
+
const historyItem = historyArr.find(item => item.id === oldVal.id);
|
|
7168
|
+
if (historyItem) {
|
|
7169
|
+
historyItem.inUse = false;
|
|
7170
|
+
historyItem.sendTime = 0;
|
|
7171
|
+
historyItem.leaveTime = 1e3;
|
|
7172
|
+
}
|
|
7173
|
+
}
|
|
7174
|
+
if (val) {
|
|
7175
|
+
const historyItem = historyArr.find(item => item.id === val.id);
|
|
7176
|
+
if (historyItem) {
|
|
7177
|
+
historyItem.leaveTime = 0;
|
|
7178
|
+
historyItem.sendTime = 0;
|
|
7179
|
+
historyItem.inUse = true;
|
|
7180
|
+
sendRecord({
|
|
7181
|
+
...val,
|
|
7182
|
+
uuid: historyItem.uuid
|
|
7183
|
+
}, "update");
|
|
7184
|
+
} else {
|
|
7185
|
+
val.leaveTime = 0;
|
|
7186
|
+
val.sendTime = 0;
|
|
7187
|
+
val.inUse = true;
|
|
7188
|
+
val.uuid = crypto.randomUUID();
|
|
7189
|
+
historyArr.push(val);
|
|
7190
|
+
sendRecord(val, "insert");
|
|
7191
|
+
}
|
|
7192
|
+
}
|
|
7135
7193
|
handleMenuChange(val);
|
|
7136
7194
|
function postIframeActive(id, active) {
|
|
7137
7195
|
const iframeEl = document.querySelector(`#iframe${id}`);
|
|
@@ -7223,6 +7281,7 @@ const PageContent = defineComponent({
|
|
|
7223
7281
|
tabListRef.value?.closeTab(tab);
|
|
7224
7282
|
};
|
|
7225
7283
|
onBeforeUnmount(() => {
|
|
7284
|
+
clearInterval(interval);
|
|
7226
7285
|
for (const app of loadAppList.value) {
|
|
7227
7286
|
app.app.unmount();
|
|
7228
7287
|
}
|
|
@@ -7452,7 +7511,6 @@ const Layout = defineComponent({
|
|
|
7452
7511
|
const currMenu = ref();
|
|
7453
7512
|
const handleMenuSelect = menu => {
|
|
7454
7513
|
currMenu.value = menu;
|
|
7455
|
-
console.log("currMenu.value", currMenu.value);
|
|
7456
7514
|
nextTick(() => currMenu.value = void 0);
|
|
7457
7515
|
};
|
|
7458
7516
|
onBeforeUnmount(() => {
|
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
|
45
45
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
46
46
|
var mqtt__default = /*#__PURE__*/_interopDefaultLegacy(mqtt);
|
|
47
47
|
|
|
48
|
-
var version = "0.1.
|
|
48
|
+
var version = "0.1.156";
|
|
49
49
|
|
|
50
50
|
const setTheme = theme => {
|
|
51
51
|
if (theme === "dark") {
|
|
@@ -8315,7 +8315,65 @@ const PageContent = vue.defineComponent({
|
|
|
8315
8315
|
}
|
|
8316
8316
|
};
|
|
8317
8317
|
const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
|
|
8318
|
+
let interval = null;
|
|
8319
|
+
vue.onMounted(() => {
|
|
8320
|
+
interval = setInterval(() => {
|
|
8321
|
+
historyArr.forEach(item => {
|
|
8322
|
+
if (item.inUse) {
|
|
8323
|
+
item.sendTime += 1e3;
|
|
8324
|
+
if (item.sendTime >= 60 * 1e3) {
|
|
8325
|
+
sendRecord(item, "update");
|
|
8326
|
+
item.sendTime = 0;
|
|
8327
|
+
}
|
|
8328
|
+
}
|
|
8329
|
+
if (item.leaveTime > 0) {
|
|
8330
|
+
item.leaveTime += 1e3;
|
|
8331
|
+
}
|
|
8332
|
+
});
|
|
8333
|
+
historyArr = historyArr.filter(item => item.leaveTime <= 60 * 1e3);
|
|
8334
|
+
}, 1e3);
|
|
8335
|
+
});
|
|
8336
|
+
let historyArr = [];
|
|
8337
|
+
const sendRecord = async (obj, fun) => {
|
|
8338
|
+
const userInfo = JSON.parse(sessionStorage.getItem("userinfo") || "{}");
|
|
8339
|
+
obj.userId = userInfo.userId;
|
|
8340
|
+
obj.userName = userInfo.userName;
|
|
8341
|
+
obj.menuName = obj.name;
|
|
8342
|
+
obj.type = 1;
|
|
8343
|
+
await axios__default["default"].post(fun === "insert" ? "/api/common/v1/menu-usage/record" : "/api/common/v1/menu-usage/update-duration", obj, {
|
|
8344
|
+
headers: {
|
|
8345
|
+
token: sessionStorage.getItem("token") || ""
|
|
8346
|
+
}
|
|
8347
|
+
});
|
|
8348
|
+
};
|
|
8318
8349
|
vue.watch(activeMenu, (val, oldVal) => {
|
|
8350
|
+
if (oldVal) {
|
|
8351
|
+
const historyItem = historyArr.find(item => item.id === oldVal.id);
|
|
8352
|
+
if (historyItem) {
|
|
8353
|
+
historyItem.inUse = false;
|
|
8354
|
+
historyItem.sendTime = 0;
|
|
8355
|
+
historyItem.leaveTime = 1e3;
|
|
8356
|
+
}
|
|
8357
|
+
}
|
|
8358
|
+
if (val) {
|
|
8359
|
+
const historyItem = historyArr.find(item => item.id === val.id);
|
|
8360
|
+
if (historyItem) {
|
|
8361
|
+
historyItem.leaveTime = 0;
|
|
8362
|
+
historyItem.sendTime = 0;
|
|
8363
|
+
historyItem.inUse = true;
|
|
8364
|
+
sendRecord({
|
|
8365
|
+
...val,
|
|
8366
|
+
uuid: historyItem.uuid
|
|
8367
|
+
}, "update");
|
|
8368
|
+
} else {
|
|
8369
|
+
val.leaveTime = 0;
|
|
8370
|
+
val.sendTime = 0;
|
|
8371
|
+
val.inUse = true;
|
|
8372
|
+
val.uuid = crypto.randomUUID();
|
|
8373
|
+
historyArr.push(val);
|
|
8374
|
+
sendRecord(val, "insert");
|
|
8375
|
+
}
|
|
8376
|
+
}
|
|
8319
8377
|
handleMenuChange(val);
|
|
8320
8378
|
function postIframeActive(id, active) {
|
|
8321
8379
|
const iframeEl = document.querySelector(`#iframe${id}`);
|
|
@@ -8407,6 +8465,7 @@ const PageContent = vue.defineComponent({
|
|
|
8407
8465
|
tabListRef.value?.closeTab(tab);
|
|
8408
8466
|
};
|
|
8409
8467
|
vue.onBeforeUnmount(() => {
|
|
8468
|
+
clearInterval(interval);
|
|
8410
8469
|
for (const app of loadAppList.value) {
|
|
8411
8470
|
app.app.unmount();
|
|
8412
8471
|
}
|
|
@@ -8636,7 +8695,6 @@ const Layout = vue.defineComponent({
|
|
|
8636
8695
|
const currMenu = vue.ref();
|
|
8637
8696
|
const handleMenuSelect = menu => {
|
|
8638
8697
|
currMenu.value = menu;
|
|
8639
|
-
console.log("currMenu.value", currMenu.value);
|
|
8640
8698
|
vue.nextTick(() => currMenu.value = void 0);
|
|
8641
8699
|
};
|
|
8642
8700
|
vue.onBeforeUnmount(() => {
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Key } from 'ant-design-vue/lib/table/interface';
|
|
|
11
11
|
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
12
12
|
import * as _ant_design_icons_vue_lib_components_IconFont from '@ant-design/icons-vue/lib/components/IconFont';
|
|
13
13
|
|
|
14
|
-
var version = "0.1.
|
|
14
|
+
var version = "0.1.156";
|
|
15
15
|
|
|
16
16
|
declare const _default$p: {
|
|
17
17
|
set(theme: string): void;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import qiankun from 'vite-plugin-qiankun';
|
|
2
2
|
import renderWithQiankun, { qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
|
|
3
|
-
import { defineComponent, createVNode, createApp, ref, watch, reactive, computed, onBeforeUnmount, inject, watchEffect, onActivated, onDeactivated, resolveComponent, isVNode, nextTick, Fragment, withDirectives, vShow, toRaw, provide, createTextVNode,
|
|
3
|
+
import { defineComponent, createVNode, createApp, ref, watch, reactive, computed, onBeforeUnmount, inject, watchEffect, onActivated, onDeactivated, resolveComponent, isVNode, nextTick, Fragment, onMounted, withDirectives, vShow, toRaw, provide, createTextVNode, KeepAlive, toRefs, shallowRef, onBeforeMount, mergeProps, onBeforeUpdate, Teleport } from 'vue';
|
|
4
4
|
import axios$3 from 'axios';
|
|
5
5
|
import { message, Menu, MenuItem, Input as Input$1, Badge, Avatar as Avatar$1, MenuDivider, Modal, SubMenu, Dropdown, Tooltip, Select, LayoutHeader, LayoutSider, Layout as Layout$1, LayoutContent, Form, Row, Col, FormItem, SelectOption, Switch, InputNumber } from 'ant-design-vue';
|
|
6
6
|
import _, { isPlainObject as isPlainObject$2, omit, cloneDeep, differenceBy, isObject as isObject$3, concat } from 'lodash';
|
|
@@ -14,7 +14,7 @@ import { XPopup, CommentBlock, setAxiosOption } from '@sszj-temp/mobile';
|
|
|
14
14
|
import { marked } from 'marked';
|
|
15
15
|
import '@sszj-temp/mobile/style.css';
|
|
16
16
|
|
|
17
|
-
var version = "0.1.
|
|
17
|
+
var version = "0.1.156";
|
|
18
18
|
|
|
19
19
|
const setTheme = theme => {
|
|
20
20
|
if (theme === "dark") {
|
|
@@ -8284,7 +8284,65 @@ const PageContent = defineComponent({
|
|
|
8284
8284
|
}
|
|
8285
8285
|
};
|
|
8286
8286
|
const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
|
|
8287
|
+
let interval = null;
|
|
8288
|
+
onMounted(() => {
|
|
8289
|
+
interval = setInterval(() => {
|
|
8290
|
+
historyArr.forEach(item => {
|
|
8291
|
+
if (item.inUse) {
|
|
8292
|
+
item.sendTime += 1e3;
|
|
8293
|
+
if (item.sendTime >= 60 * 1e3) {
|
|
8294
|
+
sendRecord(item, "update");
|
|
8295
|
+
item.sendTime = 0;
|
|
8296
|
+
}
|
|
8297
|
+
}
|
|
8298
|
+
if (item.leaveTime > 0) {
|
|
8299
|
+
item.leaveTime += 1e3;
|
|
8300
|
+
}
|
|
8301
|
+
});
|
|
8302
|
+
historyArr = historyArr.filter(item => item.leaveTime <= 60 * 1e3);
|
|
8303
|
+
}, 1e3);
|
|
8304
|
+
});
|
|
8305
|
+
let historyArr = [];
|
|
8306
|
+
const sendRecord = async (obj, fun) => {
|
|
8307
|
+
const userInfo = JSON.parse(sessionStorage.getItem("userinfo") || "{}");
|
|
8308
|
+
obj.userId = userInfo.userId;
|
|
8309
|
+
obj.userName = userInfo.userName;
|
|
8310
|
+
obj.menuName = obj.name;
|
|
8311
|
+
obj.type = 1;
|
|
8312
|
+
await axios$3.post(fun === "insert" ? "/api/common/v1/menu-usage/record" : "/api/common/v1/menu-usage/update-duration", obj, {
|
|
8313
|
+
headers: {
|
|
8314
|
+
token: sessionStorage.getItem("token") || ""
|
|
8315
|
+
}
|
|
8316
|
+
});
|
|
8317
|
+
};
|
|
8287
8318
|
watch(activeMenu, (val, oldVal) => {
|
|
8319
|
+
if (oldVal) {
|
|
8320
|
+
const historyItem = historyArr.find(item => item.id === oldVal.id);
|
|
8321
|
+
if (historyItem) {
|
|
8322
|
+
historyItem.inUse = false;
|
|
8323
|
+
historyItem.sendTime = 0;
|
|
8324
|
+
historyItem.leaveTime = 1e3;
|
|
8325
|
+
}
|
|
8326
|
+
}
|
|
8327
|
+
if (val) {
|
|
8328
|
+
const historyItem = historyArr.find(item => item.id === val.id);
|
|
8329
|
+
if (historyItem) {
|
|
8330
|
+
historyItem.leaveTime = 0;
|
|
8331
|
+
historyItem.sendTime = 0;
|
|
8332
|
+
historyItem.inUse = true;
|
|
8333
|
+
sendRecord({
|
|
8334
|
+
...val,
|
|
8335
|
+
uuid: historyItem.uuid
|
|
8336
|
+
}, "update");
|
|
8337
|
+
} else {
|
|
8338
|
+
val.leaveTime = 0;
|
|
8339
|
+
val.sendTime = 0;
|
|
8340
|
+
val.inUse = true;
|
|
8341
|
+
val.uuid = crypto.randomUUID();
|
|
8342
|
+
historyArr.push(val);
|
|
8343
|
+
sendRecord(val, "insert");
|
|
8344
|
+
}
|
|
8345
|
+
}
|
|
8288
8346
|
handleMenuChange(val);
|
|
8289
8347
|
function postIframeActive(id, active) {
|
|
8290
8348
|
const iframeEl = document.querySelector(`#iframe${id}`);
|
|
@@ -8376,6 +8434,7 @@ const PageContent = defineComponent({
|
|
|
8376
8434
|
tabListRef.value?.closeTab(tab);
|
|
8377
8435
|
};
|
|
8378
8436
|
onBeforeUnmount(() => {
|
|
8437
|
+
clearInterval(interval);
|
|
8379
8438
|
for (const app of loadAppList.value) {
|
|
8380
8439
|
app.app.unmount();
|
|
8381
8440
|
}
|
|
@@ -8605,7 +8664,6 @@ const Layout = defineComponent({
|
|
|
8605
8664
|
const currMenu = ref();
|
|
8606
8665
|
const handleMenuSelect = menu => {
|
|
8607
8666
|
currMenu.value = menu;
|
|
8608
|
-
console.log("currMenu.value", currMenu.value);
|
|
8609
8667
|
nextTick(() => currMenu.value = void 0);
|
|
8610
8668
|
};
|
|
8611
8669
|
onBeforeUnmount(() => {
|