zsysview 0.0.36 → 0.0.38

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 (27) hide show
  1. package/dist/{backup-CzH2TVgw.js → backup-DYT6WOhb.js} +4 -4
  2. package/dist/{breadcrumb.vue_vue_type_script_setup_true_lang-zbXxuTgZ.js → breadcrumb.vue_vue_type_script_setup_true_lang-nfrW6-5D.js} +1 -1
  3. package/dist/{change_password-CGTsPVRW.js → change_password-C1TSXbkT.js} +4 -4
  4. package/dist/{department-QRdHgu4z.js → department-Cy3bZi0Z.js} +15 -11
  5. package/dist/{desktop-C_q7VUj9.js → desktop-D8NO-31I.js} +1 -1
  6. package/dist/{http_api_v1-D1Pu4P-8.js → http_api_v1-BOkofMrH.js} +3 -1
  7. package/dist/{index-B1Hskmci.js → index-D0WjiJFA.js} +45 -152
  8. package/dist/{log-ByJQPRKr.js → log-BNz3HXTx.js} +5 -5
  9. package/dist/{login-GunVpm8V.js → login-CRBF4af6.js} +9 -6
  10. package/dist/main-D1Qc1usP.js +447 -0
  11. package/dist/{message-2gz6_WO4.js → message-CxCkznRZ.js} +1 -1
  12. package/dist/notification-CFdEb99z.js +82 -0
  13. package/dist/{position-2aCnMhUk.js → position-BsXmxfyE.js} +6 -6
  14. package/dist/{role-BL8NWYb0.js → role-DfMFK4Sf.js} +6 -6
  15. package/dist/{self-CyVqGJto.js → self-Twg1O-V2.js} +2 -2
  16. package/dist/{systemsetting-BdHsAnqL.js → systemsetting-DY_aaCMb.js} +19 -7
  17. package/dist/{user-CpVX3F-F.js → user-BNfLS3hP.js} +7 -7
  18. package/dist/{zsys_delbutton.vue_vue_type_script_setup_true_lang-CFvu9b2e.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-B85TNTPZ.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 +1 -1
  23. package/docs//345/205/250/345/261/200/345/217/230/351/207/217.md +4 -1
  24. package/package.json +1 -1
  25. package/dist/default_avatar.png +0 -0
  26. package/dist/main-Xzv2gkG-.js +0 -290
  27. package/dist/zsys_time-4KclnYJN.js +0 -17
@@ -1,4 +1,4 @@
1
- import { z } from "./index-B1Hskmci.js";
1
+ import { z } from "./index-D0WjiJFA.js";
2
2
  export {
3
3
  z as zsysapp
4
4
  };
@@ -8,4 +8,7 @@ inject('变量名')
8
8
  ---------|----------|---------
9
9
  系统名称 | appname | 管理员可以修改的系统名称
10
10
  备案信息 | icp | 系统的ICP备案描述
11
- A3 | B3 | C3
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.36",
4
+ "version": "0.0.38",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist","docs"
Binary file
@@ -1,290 +0,0 @@
1
- import { defineComponent, resolveComponent, createBlock, createCommentVNode, openBlock, withCtx, createVNode, createElementVNode, resolveDynamicComponent, toDisplayString, createElementBlock, Fragment, renderList, markRaw, reactive, onMounted, inject, createTextVNode, unref, watch } from "vue";
2
- import { H as HttpApiV1 } from "./http_api_v1-D1Pu4P-8.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 operation_default, i as setting_default, _ as _export_sfc, j as useRouter, k as arrow_down_default, m as useTokenStore } from "./index-B1Hskmci.js";
4
- import { Z as ZSYSMessage } from "./message-2gz6_WO4.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
- { name: "高级设置", icon: markRaw(operation_default), url: "/systemsetting", show: !1 }
108
- ]
109
- }
110
- ]
111
- );
112
- function findMenuByName(menuList, name) {
113
- for (const menu of menuList) {
114
- if (menu.name === name)
115
- return menu;
116
- if (menu.children && menu.children.length > 0) {
117
- const found = findMenuByName(menu.children, name);
118
- if (found)
119
- return found;
120
- }
121
- }
122
- }
123
- const showIfHas = (name, needpermission, ps) => {
124
- let groups = needpermission.split("|"), show = !1;
125
- for (const g of groups) {
126
- let need = g.split(",");
127
- if (CommonHelper.StringArrayHasStringArray(ps, need)) {
128
- show = !0;
129
- break;
130
- }
131
- }
132
- if (show) {
133
- let menuItem = findMenuByName(menus, name);
134
- menuItem.show = show;
135
- }
136
- }, menuview = (ps) => {
137
- 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|zsys.systemsetting", 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), showIfHas("高级设置", "zsys.systemsetting", ps);
138
- }, getUerPermission = async () => {
139
- try {
140
- let res = await HttpApiV1.Post(HttpApiV1.url_user_permission, {});
141
- if (res.IsSuccess) {
142
- let ps = res.data;
143
- menuview(ps);
144
- }
145
- } catch (e) {
146
- console.log(e);
147
- }
148
- };
149
- return onMounted(() => {
150
- getUerPermission();
151
- }), (_ctx, _cache) => {
152
- const _component_el_menu = resolveComponent("el-menu"), _component_el_scrollbar = resolveComponent("el-scrollbar"), _component_el_aside = resolveComponent("el-aside");
153
- return openBlock(), createBlock(_component_el_aside, {
154
- width: "200px",
155
- style: { position: "fixed", top: "60px", left: "0px", bottom: "0px" }
156
- }, {
157
- default: withCtx(() => [
158
- createVNode(_component_el_scrollbar, { style: { "border-right": "1px solid #dcdfe6" } }, {
159
- default: withCtx(() => [
160
- createVNode(_component_el_menu, {
161
- "default-active": "2",
162
- router: "",
163
- style: { "margin-bottom": "20px" }
164
- }, {
165
- default: withCtx(() => [
166
- (openBlock(!0), createElementBlock(Fragment, null, renderList(menus, (v) => (openBlock(), createBlock(_sfc_main$3, {
167
- key: v.url,
168
- item: v
169
- }, null, 8, ["item"]))), 128))
170
- ]),
171
- _: 1
172
- })
173
- ]),
174
- _: 1
175
- })
176
- ]),
177
- _: 1
178
- });
179
- };
180
- }
181
- }), Usermenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c20ea8a2"]]), _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" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
182
- __name: "userHeader",
183
- setup(__props) {
184
- const r = useRouter(), user = reactive({
185
- uname: ""
186
- });
187
- HttpApiV1.Post(HttpApiV1.url_usercenter, {}).then((res) => {
188
- if (res.IsSuccess) {
189
- let d = res.data;
190
- user.uname = d.uname;
191
- }
192
- }).catch((err) => {
193
- console.log("er1111r"), console.log(err);
194
- });
195
- const loginout = () => {
196
- useTokenStore().saveToken(""), r.push("/login");
197
- }, changepassword = () => {
198
- r.push("/password");
199
- };
200
- return (_ctx, _cache) => {
201
- 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");
202
- return openBlock(), createElementBlock("div", _hoisted_1, [
203
- createElementVNode("div", _hoisted_2, [
204
- createVNode(_component_el_image, {
205
- style: { height: "40px" },
206
- src: "../../assets/default_logo_40.png"
207
- })
208
- ]),
209
- createElementVNode("div", _hoisted_3, toDisplayString(inject("appname")), 1),
210
- createVNode(_component_el_dropdown, {
211
- trigger: "click",
212
- class: "user_operate"
213
- }, {
214
- dropdown: withCtx(() => [
215
- createVNode(_component_el_dropdown_menu, null, {
216
- default: withCtx(() => [
217
- createVNode(_component_el_dropdown_item, { onClick: changepassword }, {
218
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
219
- createTextVNode("修改密码", -1)
220
- ])]),
221
- _: 1
222
- }),
223
- createVNode(_component_el_dropdown_item, { onClick: loginout }, {
224
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
225
- createTextVNode("退出", -1)
226
- ])]),
227
- _: 1
228
- })
229
- ]),
230
- _: 1
231
- })
232
- ]),
233
- default: withCtx(() => [
234
- createElementVNode("span", _hoisted_4, [
235
- createTextVNode(toDisplayString(user.uname) + " ", 1),
236
- createVNode(_component_el_icon, { class: "el-icon--right" }, {
237
- default: withCtx(() => [
238
- createVNode(unref(arrow_down_default))
239
- ]),
240
- _: 1
241
- })
242
- ])
243
- ]),
244
- _: 1
245
- })
246
- ]);
247
- };
248
- }
249
- }), Userheader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-8c1fb035"]]), _sfc_main = /* @__PURE__ */ defineComponent({
250
- __name: "main",
251
- setup(__props) {
252
- const store = useTokenStore(), r = useRouter();
253
- return watch(store, (newv) => {
254
- console.log("watch"), newv.token_data == "none" ? (console.log("newv.token_data==none"), r.push({
255
- path: "/login",
256
- query: {
257
- redirect: r.currentRoute.value.fullPath
258
- }
259
- }), ZSYSMessage.ShowInfo("系统要求您重新登录")) : console.log("newv.token_data!=none");
260
- }), (_ctx, _cache) => {
261
- 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");
262
- return openBlock(), createBlock(_component_el_container, null, {
263
- default: withCtx(() => [
264
- createVNode(_component_el_header, { class: "header" }, {
265
- default: withCtx(() => [
266
- createVNode(Userheader)
267
- ]),
268
- _: 1
269
- }),
270
- createVNode(_component_el_container, null, {
271
- default: withCtx(() => [
272
- createVNode(Usermenu),
273
- createVNode(_component_el_main, { style: { padding: "0", "background-color": "white", position: "fixed", left: "200px", top: "60px", right: "0px", bottom: "0px" } }, {
274
- default: withCtx(() => [
275
- createVNode(_component_router_view)
276
- ]),
277
- _: 1
278
- })
279
- ]),
280
- _: 1
281
- })
282
- ]),
283
- _: 1
284
- });
285
- };
286
- }
287
- }), main = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71477349"]]);
288
- export {
289
- main as default
290
- };
@@ -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
- };