zsysview 0.0.35 → 0.0.37

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.
Files changed (28) hide show
  1. package/dist/{backup-DynLMXdm.js → backup-DYT6WOhb.js} +4 -4
  2. package/dist/{breadcrumb.vue_vue_type_script_setup_true_lang-TTLDMjMD.js → breadcrumb.vue_vue_type_script_setup_true_lang-nfrW6-5D.js} +1 -1
  3. package/dist/{change_password-BneyLtuI.js → change_password-C1TSXbkT.js} +4 -4
  4. package/dist/{department-CbHAuLje.js → department-Cy3bZi0Z.js} +15 -11
  5. package/dist/{desktop-eknEWppu.js → desktop-D8NO-31I.js} +1 -1
  6. package/dist/{http_api_v1-EUs_f9lQ.js → http_api_v1-BOkofMrH.js} +3 -16
  7. package/dist/{index-BO349G9H.js → index-D0WjiJFA.js} +86 -148
  8. package/dist/{log-YY2eN32S.js → log-BNz3HXTx.js} +5 -5
  9. package/dist/{login-DeeHxCNb.js → login-CRBF4af6.js} +19 -16
  10. package/dist/main-D1Qc1usP.js +447 -0
  11. package/dist/{message-CpFOrVMc.js → message-CxCkznRZ.js} +1 -1
  12. package/dist/notification-CFdEb99z.js +82 -0
  13. package/dist/{position-BsoCgmh_.js → position-BsXmxfyE.js} +6 -6
  14. package/dist/{role-CnLFQOSX.js → role-DfMFK4Sf.js} +6 -6
  15. package/dist/{self-6xdRjh6a.js → self-Twg1O-V2.js} +2 -2
  16. package/dist/systemsetting-DY_aaCMb.js +170 -0
  17. package/dist/{user-DPtBnZLN.js → user-BNfLS3hP.js} +7 -7
  18. package/dist/{zsys_delbutton.vue_vue_type_script_setup_true_lang-xh5_jCEI.js → zsys_delbutton.vue_vue_type_script_setup_true_lang-CdVC6Qlu.js} +2 -2
  19. package/dist/zsys_time-BE4ImI0m.js +22 -0
  20. package/dist/{zsyslist.vue_vue_type_script_setup_true_lang-Di1hHbqk.js → zsyslist.vue_vue_type_script_setup_true_lang-Bwtl9i35.js} +3 -3
  21. package/dist/zsysview.css +1 -1
  22. package/dist/zsysview.es.js +4 -2
  23. package/docs//345/205/250/345/261/200/345/217/230/351/207/217.md +5 -3
  24. package/package.json +1 -1
  25. package/dist/main-D9VmwlaL.js +0 -289
  26. package/dist/sys-BZgBUI3k.js +0 -30
  27. package/dist/zsys_time-4KclnYJN.js +0 -17
  28. /package/dist/{vite.svg → vite1.svg} +0 -0
@@ -1,2 +1,4 @@
1
- import "vue";
2
- import "./index-BO349G9H.js";
1
+ import { z } from "./index-D0WjiJFA.js";
2
+ export {
3
+ z as zsysapp
4
+ };
@@ -2,11 +2,13 @@
2
2
  ```
3
3
  import {inject} from 'vue'
4
4
  inject('变量名')
5
-
6
5
  ```
7
6
 
8
7
  名称 | 变量名 | 描述
9
8
  ---------|----------|---------
10
9
  系统名称 | appname | 管理员可以修改的系统名称
11
- 备案信息 | icp | C2
12
- A3 | B3 | C3
10
+ 备案信息 | icp | 系统的ICP备案描述
11
+
12
+ 名称 | 变量名 | 描述
13
+ ---------|----------|---------
14
+ 系统菜单 | app_menus | 左侧系统菜单
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zsysview",
3
3
  "private": false,
4
- "version": "0.0.35",
4
+ "version": "0.0.37",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist","docs"
@@ -1,289 +0,0 @@
1
- import { defineComponent, resolveComponent, createBlock, createCommentVNode, openBlock, withCtx, createVNode, createElementVNode, resolveDynamicComponent, toDisplayString, createElementBlock, Fragment, renderList, markRaw, reactive, onMounted, createTextVNode, unref, watch } from "vue";
2
- import { H as HttpApiV1 } from "./http_api_v1-EUs_f9lQ.js";
3
- import { h as house_default, u as user_default, o as odometer_default, c as collection_default, s as set_up_default, v as video_camera_default, l as location_default, d as document_default, b as bell_default, a as office_building_default, e as avatar_default, r as reading_default, f as copy_document_default, g as setting_default, _ as _export_sfc, i as useRouter, j as arrow_down_default, k as useTokenStore } from "./index-BO349G9H.js";
4
- import { Z as ZSYSMessage } from "./message-CpFOrVMc.js";
5
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6
- __name: "userMenuItem",
7
- props: {
8
- item: {}
9
- },
10
- setup(__props) {
11
- const data = __props;
12
- return (_ctx, _cache) => {
13
- const _component_el_icon = resolveComponent("el-icon"), _component_el_menu_item = resolveComponent("el-menu-item"), _component_el_sub_menu = resolveComponent("el-sub-menu");
14
- return !data.item.children && data.item.show ? (openBlock(), createBlock(_component_el_menu_item, {
15
- key: 0,
16
- index: data.item.url
17
- }, {
18
- default: withCtx(() => [
19
- createVNode(_component_el_icon, null, {
20
- default: withCtx(() => [
21
- (openBlock(), createBlock(resolveDynamicComponent(data.item.icon)))
22
- ]),
23
- _: 1
24
- }),
25
- createElementVNode("span", null, toDisplayString(data.item.name), 1)
26
- ]),
27
- _: 1
28
- }, 8, ["index"])) : data.item.show ? (openBlock(), createBlock(_component_el_sub_menu, {
29
- key: 1,
30
- index: data.item.url
31
- }, {
32
- title: withCtx(() => [
33
- createVNode(_component_el_icon, null, {
34
- default: withCtx(() => [
35
- (openBlock(), createBlock(resolveDynamicComponent(markRaw(data.item.icon))))
36
- ]),
37
- _: 1
38
- }),
39
- createElementVNode("span", null, toDisplayString(data.item.name), 1)
40
- ]),
41
- default: withCtx(() => [
42
- (openBlock(!0), createElementBlock(Fragment, null, renderList(data.item.children, (v) => (openBlock(), createBlock(_sfc_main$3, {
43
- key: v.url,
44
- item: v
45
- }, null, 8, ["item"]))), 128))
46
- ]),
47
- _: 1
48
- }, 8, ["index"])) : createCommentVNode("", !0);
49
- };
50
- }
51
- });
52
- class CommonHelper {
53
- //数组中是否存在字符串
54
- static StringArrayHasString(array, str) {
55
- return array.indexOf(str) !== -1;
56
- }
57
- //数组中是否存在另一数组中的任意一个元素
58
- static StringArrayHasStringArrayOne(array, array2) {
59
- for (const s of array2)
60
- if (CommonHelper.StringArrayHasString(array, s))
61
- return !0;
62
- return !1;
63
- }
64
- //数组2是否包含在数组1中
65
- static StringArrayHasStringArray(array, array2) {
66
- if (array2.length == 0)
67
- return !1;
68
- for (const s of array2)
69
- if (!CommonHelper.StringArrayHasString(array, s))
70
- return !1;
71
- return !0;
72
- }
73
- }
74
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
75
- __name: "userMenu",
76
- setup(__props) {
77
- const menus = reactive(
78
- [
79
- { name: "首页", iconname: "House", icon: markRaw(house_default), url: "/desktop", show: !0 },
80
- { name: "个人中心", icon: markRaw(user_default), url: "/self", show: !0 },
81
- { name: "数据看板", icon: markRaw(odometer_default), url: "/chart", show: !1 },
82
- { name: "事件管理", icon: markRaw(collection_default), url: "/eventgroup/event", show: !1 },
83
- // {
84
- // name: '事件管理', icon: markRaw(Collection), url: '/111', show: false,
85
- // children: [
86
- // { name: '数据看板', icon: markRaw(Odometer), url: '/user', show: false },
87
- // { name: '事件', icon: markRaw(Collection), url: '/eventgroup/event', show: false },
88
- // ]
89
- // },
90
- { name: "行为分析引擎", icon: markRaw(set_up_default), url: "/engine", show: !1 },
91
- { name: "设备管理", icon: markRaw(video_camera_default), url: "/equipment", show: !1 },
92
- { name: "区域管理", icon: markRaw(location_default), url: "/area", show: !1 },
93
- { name: "报表与统计", icon: markRaw(document_default), url: "/building?1", show: !1 },
94
- { name: "报警与通知", icon: markRaw(bell_default), url: "/building?2", show: !1 },
95
- {
96
- name: "系统管理",
97
- icon: markRaw(setting_default),
98
- url: "/zsys",
99
- show: !1,
100
- children: [
101
- { name: "用户管理", icon: markRaw(user_default), url: "/user", show: !1 },
102
- { name: "组织架构", icon: markRaw(office_building_default), url: "/department", show: !1 },
103
- { name: "职务", icon: markRaw(avatar_default), url: "/position", show: !1 },
104
- { name: "角色权限", icon: markRaw(avatar_default), url: "/role", show: !1 },
105
- { name: "日志", icon: markRaw(reading_default), url: "/log", show: !1 },
106
- { name: "备份", icon: markRaw(copy_document_default), url: "/backup", show: !1 }
107
- ]
108
- }
109
- ]
110
- );
111
- function findMenuByName(menuList, name) {
112
- for (const menu of menuList) {
113
- if (menu.name === name)
114
- return menu;
115
- if (menu.children && menu.children.length > 0) {
116
- const found = findMenuByName(menu.children, name);
117
- if (found)
118
- return found;
119
- }
120
- }
121
- }
122
- const showIfHas = (name, needpermission, ps) => {
123
- let groups = needpermission.split("|"), show = !1;
124
- for (const g of groups) {
125
- let need = g.split(",");
126
- if (CommonHelper.StringArrayHasStringArray(ps, need)) {
127
- show = !0;
128
- break;
129
- }
130
- }
131
- if (show) {
132
- let menuItem = findMenuByName(menus, name);
133
- menuItem.show = show;
134
- }
135
- }, menuview = (ps) => {
136
- showIfHas("事件管理", "gwxw.event", ps), showIfHas("数据看板", "gwxw.event", ps), showIfHas("行为分析引擎", "gwxw.engine", ps), showIfHas("设备管理", "gwxw.equipment", ps), showIfHas("区域管理", "gwxw.area", ps), showIfHas("报表与统计", "gwxw.total", ps), showIfHas("报警与通知", "gwxw.notice", ps), showIfHas("系统管理", "zsys.user|zsys.department|zsys.position|zsys.role|zsys.log|zsys.backup", ps), showIfHas("用户管理", "zsys.user", ps), showIfHas("组织架构", "zsys.department", ps), showIfHas("职务", "zsys.position", ps), showIfHas("角色权限", "zsys.role", ps), showIfHas("日志", "zsys.log", ps), showIfHas("备份", "zsys.backup", ps);
137
- }, getUerPermission = async () => {
138
- try {
139
- let res = await HttpApiV1.Post(HttpApiV1.url_user_permission, {});
140
- if (res.IsSuccess) {
141
- let ps = res.data;
142
- menuview(ps);
143
- }
144
- } catch (e) {
145
- console.log(e);
146
- }
147
- };
148
- return onMounted(() => {
149
- getUerPermission();
150
- }), (_ctx, _cache) => {
151
- const _component_el_menu = resolveComponent("el-menu"), _component_el_scrollbar = resolveComponent("el-scrollbar"), _component_el_aside = resolveComponent("el-aside");
152
- return openBlock(), createBlock(_component_el_aside, {
153
- width: "200px",
154
- style: { position: "fixed", top: "60px", left: "0px", bottom: "0px" }
155
- }, {
156
- default: withCtx(() => [
157
- createVNode(_component_el_scrollbar, { style: { "border-right": "1px solid #dcdfe6" } }, {
158
- default: withCtx(() => [
159
- createVNode(_component_el_menu, {
160
- "default-active": "2",
161
- router: "",
162
- style: { "margin-bottom": "20px" }
163
- }, {
164
- default: withCtx(() => [
165
- (openBlock(!0), createElementBlock(Fragment, null, renderList(menus, (v) => (openBlock(), createBlock(_sfc_main$3, {
166
- key: v.url,
167
- item: v
168
- }, null, 8, ["item"]))), 128))
169
- ]),
170
- _: 1
171
- })
172
- ]),
173
- _: 1
174
- })
175
- ]),
176
- _: 1
177
- });
178
- };
179
- }
180
- }), Usermenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ca19dc62"]]), _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 = { class: "el-dropdown-link" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
181
- __name: "userHeader",
182
- setup(__props) {
183
- const r = useRouter(), user = reactive({
184
- uname: ""
185
- });
186
- HttpApiV1.Post(HttpApiV1.url_usercenter, {}).then((res) => {
187
- if (res.IsSuccess) {
188
- let d = res.data;
189
- user.uname = d.uname;
190
- }
191
- }).catch((err) => {
192
- console.log("er1111r"), console.log(err);
193
- });
194
- const loginout = () => {
195
- useTokenStore().saveToken(""), r.push("/login");
196
- }, changepassword = () => {
197
- r.push("/password");
198
- };
199
- return (_ctx, _cache) => {
200
- const _component_el_image = resolveComponent("el-image"), _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");
201
- return openBlock(), createElementBlock("div", _hoisted_1, [
202
- createElementVNode("div", _hoisted_2, [
203
- createVNode(_component_el_image, {
204
- style: { height: "40px" },
205
- src: "../../assets/default_logo_40.png"
206
- })
207
- ]),
208
- _cache[2] || (_cache[2] = createElementVNode("div", { style: { float: "left", "line-height": "60px" } }, "ZSystem", -1)),
209
- createVNode(_component_el_dropdown, {
210
- trigger: "click",
211
- class: "user_operate"
212
- }, {
213
- dropdown: withCtx(() => [
214
- createVNode(_component_el_dropdown_menu, null, {
215
- default: withCtx(() => [
216
- createVNode(_component_el_dropdown_item, { onClick: changepassword }, {
217
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
218
- createTextVNode("修改密码", -1)
219
- ])]),
220
- _: 1
221
- }),
222
- createVNode(_component_el_dropdown_item, { onClick: loginout }, {
223
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
224
- createTextVNode("退出", -1)
225
- ])]),
226
- _: 1
227
- })
228
- ]),
229
- _: 1
230
- })
231
- ]),
232
- default: withCtx(() => [
233
- createElementVNode("span", _hoisted_3, [
234
- createTextVNode(toDisplayString(user.uname) + " ", 1),
235
- createVNode(_component_el_icon, { class: "el-icon--right" }, {
236
- default: withCtx(() => [
237
- createVNode(unref(arrow_down_default))
238
- ]),
239
- _: 1
240
- })
241
- ])
242
- ]),
243
- _: 1
244
- })
245
- ]);
246
- };
247
- }
248
- }), Userheader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4b5e7f10"]]), _sfc_main = /* @__PURE__ */ defineComponent({
249
- __name: "main",
250
- setup(__props) {
251
- const store = useTokenStore(), r = useRouter();
252
- return watch(store, (newv) => {
253
- console.log("watch"), newv.token_data == "none" ? (console.log("newv.token_data==none"), r.push({
254
- path: "/login",
255
- query: {
256
- redirect: r.currentRoute.value.fullPath
257
- }
258
- }), ZSYSMessage.ShowInfo("系统要求您重新登录")) : console.log("newv.token_data!=none");
259
- }), (_ctx, _cache) => {
260
- const _component_el_header = resolveComponent("el-header"), _component_router_view = resolveComponent("router-view"), _component_el_main = resolveComponent("el-main"), _component_el_container = resolveComponent("el-container");
261
- return openBlock(), createBlock(_component_el_container, null, {
262
- default: withCtx(() => [
263
- createVNode(_component_el_header, { class: "header" }, {
264
- default: withCtx(() => [
265
- createVNode(Userheader)
266
- ]),
267
- _: 1
268
- }),
269
- createVNode(_component_el_container, null, {
270
- default: withCtx(() => [
271
- createVNode(Usermenu),
272
- createVNode(_component_el_main, { style: { padding: "0", "background-color": "white", position: "fixed", left: "200px", top: "60px", right: "0px", bottom: "0px" } }, {
273
- default: withCtx(() => [
274
- createVNode(_component_router_view)
275
- ]),
276
- _: 1
277
- })
278
- ]),
279
- _: 1
280
- })
281
- ]),
282
- _: 1
283
- });
284
- };
285
- }
286
- }), main = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71477349"]]);
287
- export {
288
- main as default
289
- };
@@ -1,30 +0,0 @@
1
- import { defineComponent, ref, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx } from "vue";
2
- const _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
3
- __name: "sys",
4
- setup(__props) {
5
- const tab = ref("base");
6
- return (_ctx, _cache) => {
7
- const _component_breadcrumb = resolveComponent("breadcrumb"), _component_el_tab_pane = resolveComponent("el-tab-pane"), _component_el_tabs = resolveComponent("el-tabs");
8
- return openBlock(), createElementBlock(Fragment, null, [
9
- createVNode(_component_breadcrumb),
10
- createElementVNode("div", _hoisted_1, [
11
- createVNode(_component_el_tabs, {
12
- modelValue: tab.value,
13
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tab.value = $event)
14
- }, {
15
- default: withCtx(() => [
16
- createVNode(_component_el_tab_pane, {
17
- label: "基础",
18
- name: "base"
19
- })
20
- ]),
21
- _: 1
22
- }, 8, ["modelValue"])
23
- ])
24
- ], 64);
25
- };
26
- }
27
- });
28
- export {
29
- _sfc_main as default
30
- };
@@ -1,17 +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
- export {
16
- formatDateTime as f
17
- };
File without changes