zsysview 0.0.101 → 0.1.1

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 CHANGED
@@ -102,4 +102,60 @@ inject('变量名')
102
102
  名称 | 变量名 | 描述
103
103
  ---------|----------|---------
104
104
  系统名称 | appname | 管理员可以修改的系统名称
105
- 备案信息 | icp | 系统的ICP备案描述
105
+ 备案信息 | icp | 系统的ICP备案描述
106
+
107
+ ## 编译
108
+ 添加编译时间,新建以下make_build_time.ts
109
+ ```
110
+ import type { Plugin } from 'vite'
111
+ import fs from 'fs'
112
+ import path from 'path'
113
+
114
+ export default function make_build_time(): Plugin {
115
+ return {
116
+ name: 'make_build_time',
117
+
118
+ // 只在构建时应用
119
+ apply: 'build',
120
+
121
+ // 在构建完成后执行
122
+ closeBundle() {
123
+ const now = new Date()
124
+ const timestamp = [
125
+ now.getFullYear(),
126
+ String(now.getMonth() + 1).padStart(2, '0'),
127
+ String(now.getDate()).padStart(2, '0'),
128
+ '_',
129
+ String(now.getHours()).padStart(2, '0'),
130
+ String(now.getMinutes()).padStart(2, '0'),
131
+ String(now.getSeconds()).padStart(2, '0')
132
+ ].join('')
133
+
134
+ // 使用 process.cwd() 获取绝对路径
135
+ const outputDir = path.join(process.cwd(), 'dist/assets')
136
+ const outputFile = path.join(outputDir, 'build-time.txt')
137
+
138
+ // 确保目录存在
139
+ if (!fs.existsSync(outputDir)) {
140
+ fs.mkdirSync(outputDir, { recursive: true })
141
+ }
142
+
143
+ // 写入文件
144
+ fs.writeFileSync(outputFile, timestamp)
145
+
146
+ console.log(`🎉 Build timestamp generated: ${timestamp}`)
147
+ console.log(`📁 File saved to: ${outputFile}`)
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
153
+ 在vite.config.json中添加
154
+ ```
155
+ import { default as make_build_time } from './src/tool/make_build_time'
156
+
157
+ export default defineConfig({
158
+ plugins: [ vue(),
159
+ make_build_time()
160
+ ]})
161
+ ```
@@ -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, i as _sfc_main$1, k as _sfc_main$2, Z as ZSYSMessage } from "./index-DO9Zllux.js";
2
+ import { H as HttpApiV1, i as _sfc_main$1, k as _sfc_main$2, Z as ZSYSMessage } from "./index-BPBpONBz.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 { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx } from "vue";
2
- import { _ as _export_sfc } from "./index-DO9Zllux.js";
2
+ import { _ as _export_sfc } from "./index-BPBpONBz.js";
3
3
  const _sfc_main = {}, _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } };
4
4
  function _sfc_render(_ctx, _cache) {
5
5
  const _component_breadcrumb = resolveComponent("breadcrumb"), _component_el_result = resolveComponent("el-result");
@@ -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, i as _sfc_main$1, H as HttpApiV1, Z as ZSYSMessage } from "./index-DO9Zllux.js";
2
+ import { e as useRouter, i as _sfc_main$1, H as HttpApiV1, Z as ZSYSMessage } from "./index-BPBpONBz.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,5 +1,5 @@
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, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, n as refresh_default, m as _sfc_main$3 } from "./index-DO9Zllux.js";
2
+ import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, n as refresh_default, m as _sfc_main$3 } from "./index-BPBpONBz.js";
3
3
  const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
4
4
  __name: "department_edit_dialog",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, reactive, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import { i as _sfc_main$1 } from "./index-DO9Zllux.js";
2
+ import { i as _sfc_main$1 } from "./index-BPBpONBz.js";
3
3
  const _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "help",
5
5
  setup(__props) {
@@ -48817,7 +48817,7 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
48817
48817
  path: "/main",
48818
48818
  //"/main"
48819
48819
  name: "main",
48820
- component: () => import("./main-BIGJzcgS.js"),
48820
+ component: () => import("./main-xPk7pvbS.js"),
48821
48821
  meta: { requiresAuth: !0, title: "主界面" },
48822
48822
  children: [
48823
48823
  {
@@ -48829,13 +48829,13 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
48829
48829
  path: "/self",
48830
48830
  //个人中心
48831
48831
  meta: { title: "基本信息" },
48832
- component: () => import("./self-DtNwEaq9.js")
48832
+ component: () => import("./self-CselopgZ.js")
48833
48833
  },
48834
48834
  {
48835
48835
  path: "/notification",
48836
48836
  //个人中心
48837
48837
  meta: { title: "系统消息" },
48838
- component: () => import("./notification-DlWScLMH.js")
48838
+ component: () => import("./notification-BrGUk16r.js")
48839
48839
  }
48840
48840
  ]
48841
48841
  },
@@ -48843,7 +48843,7 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
48843
48843
  path: "/password",
48844
48844
  //修改密码
48845
48845
  meta: { title: "修改密码" },
48846
- component: () => import("./change_password-BgPF0W_9.js")
48846
+ component: () => import("./change_password-BkTeDacv.js")
48847
48847
  },
48848
48848
  {
48849
48849
  path: "/sys",
@@ -48854,56 +48854,56 @@ const useTokenStore = /* @__PURE__ */ defineStore("UseToken", () => {
48854
48854
  {
48855
48855
  path: "/user",
48856
48856
  meta: { title: "用户管理" },
48857
- component: () => import("./user-BhltKGTX.js")
48857
+ component: () => import("./user-Cv3iZcpQ.js")
48858
48858
  },
48859
48859
  {
48860
48860
  path: "/department",
48861
48861
  meta: { title: "组织架构" },
48862
- component: () => import("./department-PUPy38fg.js")
48862
+ component: () => import("./department-DNC-nbjQ.js")
48863
48863
  },
48864
48864
  {
48865
48865
  path: "/position",
48866
48866
  meta: { title: "职务" },
48867
- component: () => import("./position-Chy5TqeX.js")
48867
+ component: () => import("./position-DS2ciAAz.js")
48868
48868
  },
48869
48869
  {
48870
48870
  path: "/role",
48871
48871
  meta: { title: "角色权限" },
48872
- component: () => import("./role-Du4Fs9Za.js")
48872
+ component: () => import("./role-DhxOYWyz.js")
48873
48873
  },
48874
48874
  {
48875
48875
  path: "/log",
48876
48876
  meta: { title: "日志" },
48877
- component: () => import("./log-Z0L-nwMq.js")
48877
+ component: () => import("./log-3hBROo1h.js")
48878
48878
  },
48879
48879
  {
48880
48880
  path: "/backup",
48881
48881
  meta: { title: "备份" },
48882
- component: () => import("./backup-DUiINbJH.js")
48882
+ component: () => import("./backup-DoRDQrdf.js")
48883
48883
  },
48884
48884
  {
48885
48885
  path: "/systemsetting",
48886
48886
  meta: { title: "高级设置" },
48887
- component: () => import("./systemsetting-Cn1h39VX.js")
48887
+ component: () => import("./systemsetting-B62StKGy.js")
48888
48888
  }
48889
48889
  ]
48890
48890
  },
48891
48891
  {
48892
48892
  path: "/help",
48893
48893
  meta: { title: "使用帮助" },
48894
- component: () => import("./help-C8Q9DaIx.js")
48894
+ component: () => import("./help-BT29bibD.js")
48895
48895
  },
48896
48896
  {
48897
48897
  path: "/building",
48898
48898
  meta: { title: "开发中的功能" },
48899
- component: () => import("./building-tUd095SK.js")
48899
+ component: () => import("./building-CSwRdm4l.js")
48900
48900
  }
48901
48901
  ]
48902
48902
  },
48903
48903
  {
48904
48904
  path: "/login",
48905
48905
  name: "login",
48906
- component: () => import("./login-DYr90IRg.js")
48906
+ component: () => import("./login-CFrrcOhw.js")
48907
48907
  }
48908
48908
  ], router = createRouter({
48909
48909
  history: createWebHistory(),
@@ -1,5 +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, j as formatDateTime, i as _sfc_main$2, k as _sfc_main$3 } from "./index-DO9Zllux.js";
2
+ import { H as HttpApiV1, Z as ZSYSMessage, j as formatDateTime, i as _sfc_main$2, k as _sfc_main$3 } from "./index-BPBpONBz.js";
3
3
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4
4
  __name: "log_setting",
5
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, p as useRoute, H as HttpApiV1, Z as ZSYSMessage, _ as _export_sfc } from "./index-DO9Zllux.js";
2
+ import { e as useRouter, p as useRoute, H as HttpApiV1, Z as ZSYSMessage, _ as _export_sfc } from "./index-BPBpONBz.js";
3
3
  import { h } from "./index.es-DrN1BLo5.js";
4
4
  const _hoisted_1 = {
5
5
  class: "bg",
@@ -1,5 +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, q as question_filled_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-DO9Zllux.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, q as question_filled_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-BPBpONBz.js";
3
3
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4
4
  __name: "userMenuItem",
5
5
  props: {
@@ -296,7 +296,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
296
296
  }), _hoisted_1 = { style: { "padding-left": "20px", "padding-right": "20px" } }, _hoisted_2 = { style: { height: "60px", "margin-right": "10px", float: "left", display: "flex", "align-items": "center", "justify-content": "center" } }, _hoisted_3 = { style: { float: "left", "line-height": "60px" } }, _hoisted_4 = { class: "el-dropdown-link" }, _hoisted_5 = { style: { "text-align": "center" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
297
297
  __name: "userHeader",
298
298
  setup(__props) {
299
- const notification_open = ref(!1), r = useRouter(), user = reactive({
299
+ const view = reactive({
300
+ view_build_time: "未知",
301
+ server_build_time: "未知"
302
+ }), notification_open = ref(!1), r = useRouter(), user = reactive({
300
303
  uname: ""
301
304
  });
302
305
  HttpApiV1.Post(HttpApiV1.url_usercenter, {}).then((res) => {
@@ -312,15 +315,38 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
312
315
  }, changepassword = () => {
313
316
  r.push("/password");
314
317
  };
315
- return (_ctx, _cache) => {
316
- const _component_el_image = resolveComponent("el-image"), _component_el_button = resolveComponent("el-button"), _component_el_tooltip = resolveComponent("el-tooltip"), _component_el_icon = resolveComponent("el-icon"), _component_el_dropdown_item = resolveComponent("el-dropdown-item"), _component_el_dropdown_menu = resolveComponent("el-dropdown-menu"), _component_el_dropdown = resolveComponent("el-dropdown"), _component_el_space = resolveComponent("el-space"), _component_el_link = resolveComponent("el-link"), _component_el_drawer = resolveComponent("el-drawer");
318
+ async function getViewTime() {
319
+ try {
320
+ const response = await fetch(
321
+ "/assests/build_time.txt?" + Date.now().toString()
322
+ );
323
+ if (!response.ok)
324
+ return;
325
+ let str = await response.text();
326
+ str.length < 30 && (view.view_build_time = str);
327
+ } catch (e) {
328
+ console.log(e);
329
+ }
330
+ }
331
+ return onMounted(() => {
332
+ getViewTime();
333
+ }), (_ctx, _cache) => {
334
+ const _component_el_image = resolveComponent("el-image"), _component_el_tooltip = resolveComponent("el-tooltip"), _component_el_button = resolveComponent("el-button"), _component_el_icon = resolveComponent("el-icon"), _component_el_dropdown_item = resolveComponent("el-dropdown-item"), _component_el_dropdown_menu = resolveComponent("el-dropdown-menu"), _component_el_dropdown = resolveComponent("el-dropdown"), _component_el_space = resolveComponent("el-space"), _component_el_link = resolveComponent("el-link"), _component_el_drawer = resolveComponent("el-drawer");
317
335
  return openBlock(), createElementBlock(Fragment, null, [
318
336
  createElementVNode("div", _hoisted_1, [
319
337
  createElementVNode("div", _hoisted_2, [
320
- createVNode(_component_el_image, {
321
- style: { height: "40px" },
322
- src: "/public/img/logo_40.png"
323
- })
338
+ createVNode(_component_el_tooltip, {
339
+ content: "编译时间:前端(" + view.view_build_time + ") 后端(" + view.server_build_time + ")",
340
+ placement: "bottom"
341
+ }, {
342
+ default: withCtx(() => [
343
+ createVNode(_component_el_image, {
344
+ style: { height: "40px" },
345
+ src: "/public/img/logo_40.png"
346
+ })
347
+ ]),
348
+ _: 1
349
+ }, 8, ["content"])
324
350
  ]),
325
351
  createElementVNode("div", _hoisted_3, toDisplayString(inject("appname")), 1),
326
352
  createVNode(_component_el_space, {
@@ -409,7 +435,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
409
435
  ], 64);
410
436
  };
411
437
  }
412
- }), Userheader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-940b0179"]]), _sfc_main = /* @__PURE__ */ defineComponent({
438
+ }), Userheader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ed74c277"]]), _sfc_main = /* @__PURE__ */ defineComponent({
413
439
  __name: "main",
414
440
  setup(__props) {
415
441
  const store = useTokenStore(), r = useRouter();
@@ -1,5 +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, j as formatDateTime, i as _sfc_main$1, k as _sfc_main$2 } from "./index-DO9Zllux.js";
2
+ import { H as HttpApiV1, j as formatDateTime, i as _sfc_main$1, k as _sfc_main$2 } from "./index-BPBpONBz.js";
3
3
  const _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "notification",
5
5
  setup(__props) {
@@ -1,5 +1,5 @@
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, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, k as _sfc_main$3, m as _sfc_main$4 } from "./index-DO9Zllux.js";
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, m as _sfc_main$4 } from "./index-BPBpONBz.js";
3
3
  const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
4
4
  __name: "position_edit_dialog",
5
5
  props: {
@@ -1,5 +1,5 @@
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, 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, m as _sfc_main$4 } from "./index-DO9Zllux.js";
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, m as _sfc_main$4 } from "./index-BPBpONBz.js";
3
3
  const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
4
4
  __name: "role_edit_dialog",
5
5
  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, i as _sfc_main$1 } from "./index-DO9Zllux.js";
2
+ import { H as HttpApiV1, i as _sfc_main$1 } from "./index-BPBpONBz.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 { i as _sfc_main$1, H as HttpApiV1, Z as ZSYSMessage } from "./index-DO9Zllux.js";
2
+ import { i as _sfc_main$1, H as HttpApiV1, Z as ZSYSMessage } from "./index-BPBpONBz.js";
3
3
  const _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "systemsetting",
5
5
  setup(__props) {
@@ -1,5 +1,5 @@
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, 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, m as _sfc_main$5 } from "./index-DO9Zllux.js";
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, m as _sfc_main$5 } from "./index-BPBpONBz.js";
3
3
  import { h } from "./index.es-DrN1BLo5.js";
4
4
  const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
5
5
  key: 0,