zsysview 0.0.62 → 0.0.63
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/README.md +18 -1
- package/dist/{backup-CaeAf22v.js → backup-DfEg5onQ.js} +1 -1
- package/dist/{change_password-CnoYoVdU.js → change_password-Djv3Ael-.js} +1 -1
- package/dist/{department-BhZvPRa9.js → department-DsE0EWNX.js} +2 -2
- package/dist/{desktop-CykCWBhM.js → desktop-B93Apgt_.js} +1 -1
- package/dist/{index-BBvcUJWk.js → index-korOXB5N.js} +43 -23
- package/dist/{log-C2H9MMfx.js → log-HsE6h04n.js} +1 -2
- package/dist/{login-CmMX5HK-.js → login-Bd_yHS07.js} +1 -1
- package/dist/{main-Cq2ppjjC.js → main-CaTBGIkL.js} +1 -2
- package/dist/{notification-BMYDnYTO.js → notification-TgOhyv0G.js} +1 -2
- package/dist/{position-DgjpT4ts.js → position-CBUw7i67.js} +2 -2
- package/dist/{role-6zVft76K.js → role-Ba5-ZWjw.js} +2 -2
- package/dist/{self-D9TdUmfv.js → self-BDa5EziL.js} +1 -1
- package/dist/{systemsetting-DSmN5oTw.js → systemsetting-XBy-fAcF.js} +1 -1
- package/dist/{user-pGdrK-Jl.js → user-C4gRkCcU.js} +2 -3
- package/dist/{zsys_delbutton.vue_vue_type_script_setup_true_lang-DyvEaPZx.js → zsys_delbutton.vue_vue_type_script_setup_true_lang-DZHlbqBl.js} +1 -1
- package/dist/zsysview.es.d.ts +9 -0
- package/dist/zsysview.es.js +8 -6
- package/package.json +1 -1
- package/dist/zsys_time-BE4ImI0m.js +0 -22
package/README.md
CHANGED
|
@@ -56,4 +56,21 @@ addFrameRouter({
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
#### 系统组件
|
|
59
|
-
breadcrumb zsyslist
|
|
59
|
+
breadcrumb zsyslist
|
|
60
|
+
|
|
61
|
+
#### 公共方法
|
|
62
|
+
分类 | 变量名 | 描述
|
|
63
|
+
---------|----------|---------
|
|
64
|
+
时间 | formatPreciseOralTime | 口语化时间
|
|
65
|
+
时间 | formatDateTime | 格式化时间
|
|
66
|
+
|
|
67
|
+
#### 全局变量
|
|
68
|
+
```
|
|
69
|
+
import {inject} from 'vue'
|
|
70
|
+
inject('变量名')
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
名称 | 变量名 | 描述
|
|
74
|
+
---------|----------|---------
|
|
75
|
+
系统名称 | appname | 管理员可以修改的系统名称
|
|
76
|
+
备案信息 | icp | 系统的ICP备案描述
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode, createCommentVNode } from "vue";
|
|
2
|
-
import { H as HttpApiV1,
|
|
2
|
+
import { H as HttpApiV1, i as _sfc_main$1, k as _sfc_main$2, Z as ZSYSMessage } from "./index-korOXB5N.js";
|
|
3
3
|
const _hoisted_1 = { style: { padding: "0px 20px" } }, _hoisted_2 = { key: 0 }, _hoisted_3 = { key: 0 }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "backup",
|
|
5
5
|
setup(__props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import { e as useRouter,
|
|
2
|
+
import { e as useRouter, i as _sfc_main$1, H as HttpApiV1, Z as ZSYSMessage } from "./index-korOXB5N.js";
|
|
3
3
|
import { h } from "./index.es-DrN1BLo5.js";
|
|
4
4
|
const _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "change_password",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createElementVNode, createCommentVNode, createTextVNode, onMounted, onUnmounted, createElementBlock, Fragment, unref } from "vue";
|
|
2
|
-
import { z as zsysEventBus,
|
|
3
|
-
import { _ as _sfc_main$3 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, m as refresh_default } from "./index-korOXB5N.js";
|
|
3
|
+
import { _ as _sfc_main$3 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-DZHlbqBl.js";
|
|
4
4
|
const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "department_edit_dialog",
|
|
6
6
|
props: {
|
|
@@ -48816,13 +48816,13 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
|
|
|
48816
48816
|
{
|
|
48817
48817
|
path: "/main",
|
|
48818
48818
|
//"/main"
|
|
48819
|
-
component: () => import("./main-
|
|
48819
|
+
component: () => import("./main-CaTBGIkL.js"),
|
|
48820
48820
|
meta: { requiresAuth: !0, title: "主界面" },
|
|
48821
48821
|
children: [
|
|
48822
48822
|
{
|
|
48823
48823
|
path: "/desktop",
|
|
48824
48824
|
meta: { title: "首页" },
|
|
48825
|
-
component: () => import("./desktop-
|
|
48825
|
+
component: () => import("./desktop-B93Apgt_.js")
|
|
48826
48826
|
},
|
|
48827
48827
|
{
|
|
48828
48828
|
path: "/self",
|
|
@@ -48833,13 +48833,13 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
|
|
|
48833
48833
|
path: "/self",
|
|
48834
48834
|
//个人中心
|
|
48835
48835
|
meta: { title: "基本信息" },
|
|
48836
|
-
component: () => import("./self-
|
|
48836
|
+
component: () => import("./self-BDa5EziL.js")
|
|
48837
48837
|
},
|
|
48838
48838
|
{
|
|
48839
48839
|
path: "/notification",
|
|
48840
48840
|
//个人中心
|
|
48841
48841
|
meta: { title: "系统消息" },
|
|
48842
|
-
component: () => import("./notification-
|
|
48842
|
+
component: () => import("./notification-TgOhyv0G.js")
|
|
48843
48843
|
}
|
|
48844
48844
|
]
|
|
48845
48845
|
},
|
|
@@ -48847,7 +48847,7 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
|
|
|
48847
48847
|
path: "/password",
|
|
48848
48848
|
//修改密码
|
|
48849
48849
|
meta: { title: "修改密码" },
|
|
48850
|
-
component: () => import("./change_password-
|
|
48850
|
+
component: () => import("./change_password-Djv3Ael-.js")
|
|
48851
48851
|
},
|
|
48852
48852
|
{
|
|
48853
48853
|
path: "/sys",
|
|
@@ -48858,37 +48858,37 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
|
|
|
48858
48858
|
{
|
|
48859
48859
|
path: "/user",
|
|
48860
48860
|
meta: { title: "用户管理" },
|
|
48861
|
-
component: () => import("./user-
|
|
48861
|
+
component: () => import("./user-C4gRkCcU.js")
|
|
48862
48862
|
},
|
|
48863
48863
|
{
|
|
48864
48864
|
path: "/department",
|
|
48865
48865
|
meta: { title: "组织架构" },
|
|
48866
|
-
component: () => import("./department-
|
|
48866
|
+
component: () => import("./department-DsE0EWNX.js")
|
|
48867
48867
|
},
|
|
48868
48868
|
{
|
|
48869
48869
|
path: "/position",
|
|
48870
48870
|
meta: { title: "职务" },
|
|
48871
|
-
component: () => import("./position-
|
|
48871
|
+
component: () => import("./position-CBUw7i67.js")
|
|
48872
48872
|
},
|
|
48873
48873
|
{
|
|
48874
48874
|
path: "/role",
|
|
48875
48875
|
meta: { title: "角色权限" },
|
|
48876
|
-
component: () => import("./role-
|
|
48876
|
+
component: () => import("./role-Ba5-ZWjw.js")
|
|
48877
48877
|
},
|
|
48878
48878
|
{
|
|
48879
48879
|
path: "/log",
|
|
48880
48880
|
meta: { title: "日志" },
|
|
48881
|
-
component: () => import("./log-
|
|
48881
|
+
component: () => import("./log-HsE6h04n.js")
|
|
48882
48882
|
},
|
|
48883
48883
|
{
|
|
48884
48884
|
path: "/backup",
|
|
48885
48885
|
meta: { title: "备份" },
|
|
48886
|
-
component: () => import("./backup-
|
|
48886
|
+
component: () => import("./backup-DfEg5onQ.js")
|
|
48887
48887
|
},
|
|
48888
48888
|
{
|
|
48889
48889
|
path: "/systemsetting",
|
|
48890
48890
|
meta: { title: "高级设置" },
|
|
48891
|
-
component: () => import("./systemsetting-
|
|
48891
|
+
component: () => import("./systemsetting-XBy-fAcF.js")
|
|
48892
48892
|
}
|
|
48893
48893
|
]
|
|
48894
48894
|
}
|
|
@@ -48897,7 +48897,7 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
|
|
|
48897
48897
|
{
|
|
48898
48898
|
path: "/login",
|
|
48899
48899
|
name: "login",
|
|
48900
|
-
component: () => import("./login-
|
|
48900
|
+
component: () => import("./login-Bd_yHS07.js")
|
|
48901
48901
|
}
|
|
48902
48902
|
], router = createRouter({
|
|
48903
48903
|
history: createWebHistory(),
|
|
@@ -52250,6 +52250,24 @@ const emitter = mitt(), zsysEventBus = () => ({
|
|
|
52250
52250
|
};
|
|
52251
52251
|
}
|
|
52252
52252
|
});
|
|
52253
|
+
function formatDateTime(date4) {
|
|
52254
|
+
if (date4 == "0001-01-01T00:00:00Z")
|
|
52255
|
+
return "";
|
|
52256
|
+
const d2 = new Date(date4);
|
|
52257
|
+
return isNaN(d2.getTime()) ? "" : [
|
|
52258
|
+
d2.getFullYear(),
|
|
52259
|
+
(d2.getMonth() + 1).toString().padStart(2, "0"),
|
|
52260
|
+
d2.getDate().toString().padStart(2, "0")
|
|
52261
|
+
].join("-") + " " + [
|
|
52262
|
+
d2.getHours().toString().padStart(2, "0"),
|
|
52263
|
+
d2.getMinutes().toString().padStart(2, "0"),
|
|
52264
|
+
d2.getSeconds().toString().padStart(2, "0")
|
|
52265
|
+
].join(":");
|
|
52266
|
+
}
|
|
52267
|
+
const formatPreciseOralTime = (timestamp) => {
|
|
52268
|
+
const date4 = new Date(timestamp), diffInMs = (/* @__PURE__ */ new Date()).getTime() - date4.getTime(), seconds = Math.floor(diffInMs / 1e3), minutes = Math.floor(seconds / 60), hours = Math.floor(minutes / 60), days = Math.floor(hours / 24);
|
|
52269
|
+
return days > 0 ? days === 1 ? "昨天" : days === 2 ? "前天" : days < 7 ? `${days}天前` : days < 30 ? `${Math.floor(days / 7)}周前` : days < 365 ? `${Math.floor(days / 30)}个月前` : `${Math.floor(days / 365)}年前` : hours > 0 ? `${hours}小时前` : minutes > 0 ? `${minutes}分钟前` : "刚刚";
|
|
52270
|
+
};
|
|
52253
52271
|
export {
|
|
52254
52272
|
HttpApiV1 as H,
|
|
52255
52273
|
ZSYSMessage as Z,
|
|
@@ -52259,19 +52277,21 @@ export {
|
|
|
52259
52277
|
copy_document_default as c,
|
|
52260
52278
|
operation_default as d,
|
|
52261
52279
|
useRouter as e,
|
|
52262
|
-
|
|
52263
|
-
|
|
52264
|
-
|
|
52265
|
-
_sfc_main as i,
|
|
52266
|
-
|
|
52267
|
-
|
|
52268
|
-
|
|
52269
|
-
|
|
52270
|
-
|
|
52280
|
+
formatPreciseOralTime as f,
|
|
52281
|
+
arrow_down_default as g,
|
|
52282
|
+
useTokenStore as h,
|
|
52283
|
+
_sfc_main$4 as i,
|
|
52284
|
+
formatDateTime as j,
|
|
52285
|
+
_sfc_main as k,
|
|
52286
|
+
useMagicKeys as l,
|
|
52287
|
+
refresh_default as m,
|
|
52288
|
+
useRoute as n,
|
|
52271
52289
|
office_building_default as o,
|
|
52272
|
-
|
|
52290
|
+
zsysapp as p,
|
|
52291
|
+
router as q,
|
|
52273
52292
|
reading_default as r,
|
|
52274
52293
|
setting_default as s,
|
|
52294
|
+
addFrameRouter as t,
|
|
52275
52295
|
user_default as u,
|
|
52276
52296
|
whenever as w,
|
|
52277
52297
|
zsysEventBus as z
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, reactive, computed, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { H as HttpApiV1, Z as ZSYSMessage,
|
|
3
|
-
import { a as formatDateTime } from "./zsys_time-BE4ImI0m.js";
|
|
2
|
+
import { H as HttpApiV1, Z as ZSYSMessage, j as formatDateTime, i as _sfc_main$2, k as _sfc_main$3 } from "./index-korOXB5N.js";
|
|
4
3
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5
4
|
__name: "log_setting",
|
|
6
5
|
setup(__props, { expose: __expose }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, reactive, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, withKeys, createTextVNode, createElementVNode, toDisplayString, inject } from "vue";
|
|
2
|
-
import { e as useRouter,
|
|
2
|
+
import { e as useRouter, n as useRoute, H as HttpApiV1, Z as ZSYSMessage, _ as _export_sfc } from "./index-korOXB5N.js";
|
|
3
3
|
import { h } from "./index.es-DrN1BLo5.js";
|
|
4
4
|
const _hoisted_1 = {
|
|
5
5
|
class: "bg",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, resolveDynamicComponent, toDisplayString, createElementBlock, Fragment, renderList, markRaw, inject, reactive, onMounted, ref, unref, createTextVNode, watch } from "vue";
|
|
2
|
-
import { b as bell_default, u as user_default, o as office_building_default, a as avatar_default, r as reading_default, c as copy_document_default, d as operation_default, s as setting_default, H as HttpApiV1, _ as _export_sfc, e as useRouter, f as
|
|
3
|
-
import { f as formatPreciseOralTime } from "./zsys_time-BE4ImI0m.js";
|
|
2
|
+
import { b as bell_default, u as user_default, o as office_building_default, a as avatar_default, r as reading_default, c as copy_document_default, d as operation_default, s as setting_default, H as HttpApiV1, _ as _export_sfc, e as useRouter, f as formatPreciseOralTime, g as arrow_down_default, h as useTokenStore, Z as ZSYSMessage } from "./index-korOXB5N.js";
|
|
4
3
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
5
4
|
__name: "userMenuItem",
|
|
6
5
|
props: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, computed, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { H as HttpApiV1,
|
|
3
|
-
import { a as formatDateTime } from "./zsys_time-BE4ImI0m.js";
|
|
2
|
+
import { H as HttpApiV1, j as formatDateTime, i as _sfc_main$1, k as _sfc_main$2 } from "./index-korOXB5N.js";
|
|
4
3
|
const _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
4
|
__name: "notification",
|
|
6
5
|
setup(__props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createElementVNode, createCommentVNode, createTextVNode, createElementBlock, Fragment, unref } from "vue";
|
|
2
|
-
import { z as zsysEventBus,
|
|
3
|
-
import { _ as _sfc_main$4 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, k as _sfc_main$3 } from "./index-korOXB5N.js";
|
|
3
|
+
import { _ as _sfc_main$4 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-DZHlbqBl.js";
|
|
4
4
|
const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "position_edit_dialog",
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createElementVNode, createCommentVNode, createTextVNode, createElementBlock, Fragment, unref } from "vue";
|
|
2
|
-
import { z as zsysEventBus,
|
|
3
|
-
import { _ as _sfc_main$4 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, _ as _export_sfc, i as _sfc_main$2, k as _sfc_main$3 } from "./index-korOXB5N.js";
|
|
3
|
+
import { _ as _sfc_main$4 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-DZHlbqBl.js";
|
|
4
4
|
const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "role_edit_dialog",
|
|
6
6
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { H as HttpApiV1,
|
|
2
|
+
import { H as HttpApiV1, i as _sfc_main$1 } from "./index-korOXB5N.js";
|
|
3
3
|
const _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "self",
|
|
5
5
|
setup(__props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { i as _sfc_main$1, H as HttpApiV1, Z as ZSYSMessage } from "./index-korOXB5N.js";
|
|
3
3
|
const _hoisted_1 = { style: { padding: "0px 20px" } }, _hoisted_2 = ["src"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "systemsetting",
|
|
5
5
|
setup(__props) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createCommentVNode, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createTextVNode, computed, unref } from "vue";
|
|
2
|
-
import { z as zsysEventBus,
|
|
2
|
+
import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, j as formatDateTime, i as _sfc_main$3, k as _sfc_main$4 } from "./index-korOXB5N.js";
|
|
3
3
|
import { h } from "./index.es-DrN1BLo5.js";
|
|
4
|
-
import { _ as _sfc_main$5 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { a as formatDateTime } from "./zsys_time-BE4ImI0m.js";
|
|
4
|
+
import { _ as _sfc_main$5 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-DZHlbqBl.js";
|
|
6
5
|
const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
|
|
7
6
|
key: 0,
|
|
8
7
|
style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, reactive, resolveComponent, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode } from "vue";
|
|
2
|
-
import { z as zsysEventBus, H as HttpApiV1, Z as ZSYSMessage } from "./index-
|
|
2
|
+
import { z as zsysEventBus, H as HttpApiV1, Z as ZSYSMessage } from "./index-korOXB5N.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "zsys_delbutton",
|
|
5
5
|
props: {
|
package/dist/zsysview.es.d.ts
CHANGED
|
@@ -56,6 +56,15 @@ declare interface ExportColumn {
|
|
|
56
56
|
ColumnName: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* 格式化日期为 YYYY-MM-DD HH:mm:ss 格式
|
|
61
|
+
* @param date 可被Date解析的任何值
|
|
62
|
+
* @returns 格式化后的日期字符串
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatDateTime(date: Date | string | number): string;
|
|
65
|
+
|
|
66
|
+
export declare const formatPreciseOralTime: (timestamp: string | Date) => string;
|
|
67
|
+
|
|
59
68
|
export declare interface ListConfig {
|
|
60
69
|
ApiUrl: string;
|
|
61
70
|
QuickConditionsGroups?: QuickConditionsGroup[];
|
package/dist/zsysview.es.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t, i, j, f, q, p, k } from "./index-korOXB5N.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
t as addFrameRouter,
|
|
4
|
+
i as breadcrumb,
|
|
5
|
+
j as formatDateTime,
|
|
6
|
+
f as formatPreciseOralTime,
|
|
7
|
+
q as router,
|
|
8
|
+
p as zsysapp,
|
|
9
|
+
k as zsyslist
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function formatDateTime(date) {
|
|
2
|
-
if (date == "0001-01-01T00:00:00Z")
|
|
3
|
-
return "";
|
|
4
|
-
const d = new Date(date);
|
|
5
|
-
return isNaN(d.getTime()) ? "" : [
|
|
6
|
-
d.getFullYear(),
|
|
7
|
-
(d.getMonth() + 1).toString().padStart(2, "0"),
|
|
8
|
-
d.getDate().toString().padStart(2, "0")
|
|
9
|
-
].join("-") + " " + [
|
|
10
|
-
d.getHours().toString().padStart(2, "0"),
|
|
11
|
-
d.getMinutes().toString().padStart(2, "0"),
|
|
12
|
-
d.getSeconds().toString().padStart(2, "0")
|
|
13
|
-
].join(":");
|
|
14
|
-
}
|
|
15
|
-
const formatPreciseOralTime = (timestamp) => {
|
|
16
|
-
const date = new Date(timestamp), diffInMs = (/* @__PURE__ */ new Date()).getTime() - date.getTime(), seconds = Math.floor(diffInMs / 1e3), minutes = Math.floor(seconds / 60), hours = Math.floor(minutes / 60), days = Math.floor(hours / 24);
|
|
17
|
-
return days > 0 ? days === 1 ? "昨天" : days === 2 ? "前天" : days < 7 ? `${days}天前` : days < 30 ? `${Math.floor(days / 7)}周前` : days < 365 ? `${Math.floor(days / 30)}个月前` : `${Math.floor(days / 365)}年前` : hours > 0 ? `${hours}小时前` : minutes > 0 ? `${minutes}分钟前` : "刚刚";
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
formatDateTime as a,
|
|
21
|
-
formatPreciseOralTime as f
|
|
22
|
-
};
|