zsysview 0.0.26 → 0.0.28
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/backup-BKq6sQjF.js +519 -0
- package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-Ca489fLF.js +43 -0
- package/dist/change_password-DHURkzza.js +135 -0
- package/dist/department-nsjoJXue.js +410 -0
- package/dist/desktop-CcKDaeCI.js +9 -0
- package/dist/http_api_v1-CkjqXdob.js +1008 -0
- package/dist/index-BGMV_V_g.js +6688 -0
- package/dist/{index-BaFHeDAF.js → index-DG0x9mYD.js} +105 -105
- package/dist/index.es-DrN1BLo5.js +170 -0
- package/dist/log-4jRKPEKy.js +163 -0
- package/dist/login-Df4BMtP8.js +111 -0
- package/dist/main-CaR_6gzq.js +293 -0
- package/dist/message-CVTa4Hb1.js +26 -0
- package/dist/position-UV9V8NKa.js +311 -0
- package/dist/role-Co7zqJq3.js +405 -0
- package/dist/self-CZaIzR2G.js +102 -0
- package/dist/sys-BZgBUI3k.js +30 -0
- package/dist/user-D8k4kb-7.js +650 -0
- package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-JGPGvAqL.js +72 -0
- package/dist/zsys_eventBus-CZOk9fTb.js +178 -0
- package/dist/zsys_time-4KclnYJN.js +17 -0
- package/dist/zsyslist.vue_vue_type_script_setup_true_lang-C714Dj9O.js +465 -0
- package/dist/zsysview.es.js +1 -1
- package/package.json +1 -1
- package/dist/backup-BrCAKHW5.js +0 -519
- package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-DxqktuR5.js +0 -43
- package/dist/change_password-CY87a5gc.js +0 -135
- package/dist/department-BDW7DB5F.js +0 -410
- package/dist/desktop-DgyBqclt.js +0 -9
- package/dist/http_api_v1-BQLGtV9G.js +0 -1008
- package/dist/index-DXGp4B8l.js +0 -6688
- package/dist/index.es-BcGc183Q.js +0 -170
- package/dist/log-2ZY0HGuh.js +0 -163
- package/dist/login-BAuvM04T.js +0 -111
- package/dist/main-CxdkVN-C.js +0 -293
- package/dist/message-CdVUOGzt.js +0 -26
- package/dist/position-D7wr1m96.js +0 -311
- package/dist/role-M_ZYR2ta.js +0 -405
- package/dist/self-DAB-5Co8.js +0 -102
- package/dist/sys-BjlP52cg.js +0 -30
- package/dist/user-CEaf7VIW.js +0 -650
- package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-BYahBvHu.js +0 -72
- package/dist/zsys_eventBus-DDrk0Aw8.js +0 -178
- package/dist/zsys_time-DHEMuVgo.js +0 -17
- package/dist/zsyslist.vue_vue_type_script_setup_true_lang-Bl1QXOML.js +0 -466
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineComponent, ref, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, reactive, computed, createElementVNode, toDisplayString } from "vue";
|
|
2
|
+
import { _ as _sfc_main$2 } from "./breadcrumb.vue_vue_type_script_setup_true_lang-Ca489fLF.js";
|
|
3
|
+
import { _ as _sfc_main$3 } from "./zsyslist.vue_vue_type_script_setup_true_lang-C714Dj9O.js";
|
|
4
|
+
import { H as HttpApiV1 } from "./http_api_v1-CkjqXdob.js";
|
|
5
|
+
import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
|
|
6
|
+
import { f as formatDateTime } from "./zsys_time-4KclnYJN.js";
|
|
7
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "log_setting",
|
|
9
|
+
setup(__props, { expose: __expose }) {
|
|
10
|
+
const num = ref(365);
|
|
11
|
+
async function saveConfig() {
|
|
12
|
+
(await HttpApiV1.Post(HttpApiV1.url_syslog_config_save, { keep_days: num.value })).IsSuccess ? ZSYSMessage.ShowSuccess("应用成功") : ZSYSMessage.ShowError("应用失败");
|
|
13
|
+
}
|
|
14
|
+
async function getConfig() {
|
|
15
|
+
let res = await HttpApiV1.Post(HttpApiV1.url_syslog_config_detail, {});
|
|
16
|
+
if (res.IsSuccess) {
|
|
17
|
+
let data = res.data;
|
|
18
|
+
num.value = data.keep_days;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return __expose({
|
|
22
|
+
saveConfig,
|
|
23
|
+
getConfig,
|
|
24
|
+
num
|
|
25
|
+
}), onMounted(getConfig), (_ctx, _cache) => {
|
|
26
|
+
const _component_el_alert = resolveComponent("el-alert"), _component_el_input_number = resolveComponent("el-input-number"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_button = resolveComponent("el-button"), _component_el_form = resolveComponent("el-form");
|
|
27
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
28
|
+
createVNode(_component_el_alert, {
|
|
29
|
+
title: "过久的日志将自动清理,请选择日志保留时长",
|
|
30
|
+
type: "info",
|
|
31
|
+
"show-icon": "",
|
|
32
|
+
closable: !1
|
|
33
|
+
}),
|
|
34
|
+
createVNode(_component_el_form, {
|
|
35
|
+
"label-width": "auto",
|
|
36
|
+
style: { "max-width": "600px", "margin-top": "10px" }
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx(() => [
|
|
39
|
+
createVNode(_component_el_form_item, { label: "保留天数" }, {
|
|
40
|
+
default: withCtx(() => [
|
|
41
|
+
createVNode(_component_el_input_number, {
|
|
42
|
+
modelValue: num.value,
|
|
43
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => num.value = $event),
|
|
44
|
+
step: 30,
|
|
45
|
+
min: 90
|
|
46
|
+
}, null, 8, ["modelValue"])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}),
|
|
50
|
+
createVNode(_component_el_form_item, null, {
|
|
51
|
+
default: withCtx(() => [
|
|
52
|
+
createVNode(_component_el_button, {
|
|
53
|
+
type: "primary",
|
|
54
|
+
onClick: saveConfig
|
|
55
|
+
}, {
|
|
56
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
57
|
+
createTextVNode("应用设置", -1)
|
|
58
|
+
])]),
|
|
59
|
+
_: 1
|
|
60
|
+
})
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
})
|
|
67
|
+
], 64);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}), _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
71
|
+
__name: "log",
|
|
72
|
+
setup(__props, { expose: __expose }) {
|
|
73
|
+
const activeName = ref("first"), handleClick = (tab, event) => {
|
|
74
|
+
console.log(tab, event);
|
|
75
|
+
}, listconfig = reactive({
|
|
76
|
+
ApiUrl: HttpApiV1.url_syslog_list,
|
|
77
|
+
KeywordTip: "操作人、日志内容",
|
|
78
|
+
QuickConditionsGroups: [
|
|
79
|
+
{ Label: "类别:", Select: 0, QuickConditions: [
|
|
80
|
+
{ label: "全部", column: null },
|
|
81
|
+
{ label: "登录日志", column: "log_type", condition: "=", value: 1 },
|
|
82
|
+
{ label: "操作日志", column: "log_type", condition: "=", value: 2 }
|
|
83
|
+
] }
|
|
84
|
+
]
|
|
85
|
+
}), dataformat = computed(() => (item) => formatDateTime(new Date(item)));
|
|
86
|
+
return __expose({
|
|
87
|
+
activeName,
|
|
88
|
+
handleClick
|
|
89
|
+
}), (_ctx, _cache) => {
|
|
90
|
+
const _component_el_table_column = resolveComponent("el-table-column"), _component_el_tab_pane = resolveComponent("el-tab-pane"), _component_el_tabs = resolveComponent("el-tabs");
|
|
91
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
92
|
+
createVNode(_sfc_main$2),
|
|
93
|
+
createElementVNode("div", _hoisted_1, [
|
|
94
|
+
createVNode(_component_el_tabs, {
|
|
95
|
+
modelValue: activeName.value,
|
|
96
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeName.value = $event),
|
|
97
|
+
class: "demo-tabs",
|
|
98
|
+
onTabClick: handleClick
|
|
99
|
+
}, {
|
|
100
|
+
default: withCtx(() => [
|
|
101
|
+
createVNode(_component_el_tab_pane, {
|
|
102
|
+
label: "日志查询",
|
|
103
|
+
name: "first"
|
|
104
|
+
}, {
|
|
105
|
+
default: withCtx(() => [
|
|
106
|
+
createVNode(_sfc_main$3, { config: listconfig }, {
|
|
107
|
+
content: withCtx(() => [
|
|
108
|
+
createVNode(_component_el_table_column, {
|
|
109
|
+
prop: "log_id",
|
|
110
|
+
label: "日志ID",
|
|
111
|
+
width: "180"
|
|
112
|
+
}),
|
|
113
|
+
createVNode(_component_el_table_column, {
|
|
114
|
+
prop: "from_ip",
|
|
115
|
+
label: "IP",
|
|
116
|
+
width: "160"
|
|
117
|
+
}),
|
|
118
|
+
createVNode(_component_el_table_column, {
|
|
119
|
+
prop: "c_time",
|
|
120
|
+
label: "时间",
|
|
121
|
+
width: "180"
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(({ row }) => [
|
|
124
|
+
createTextVNode(toDisplayString(dataformat.value(row.c_time)), 1)
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}),
|
|
128
|
+
createVNode(_component_el_table_column, {
|
|
129
|
+
prop: "uname",
|
|
130
|
+
label: "操作人",
|
|
131
|
+
width: "100"
|
|
132
|
+
}),
|
|
133
|
+
createVNode(_component_el_table_column, {
|
|
134
|
+
prop: "description",
|
|
135
|
+
label: "日志内容",
|
|
136
|
+
"min-width": "180"
|
|
137
|
+
})
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["config"])
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}),
|
|
144
|
+
createVNode(_component_el_tab_pane, {
|
|
145
|
+
label: "设置",
|
|
146
|
+
name: "second"
|
|
147
|
+
}, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createVNode(_sfc_main$1)
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 8, ["modelValue"])
|
|
156
|
+
])
|
|
157
|
+
], 64);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
export {
|
|
162
|
+
_sfc_main as default
|
|
163
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent, reactive, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, withKeys, createTextVNode, createElementVNode } from "vue";
|
|
2
|
+
import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
|
|
3
|
+
import { u as useRouter, b as useRoute, _ as _export_sfc } from "./index-BGMV_V_g.js";
|
|
4
|
+
import { h } from "./index.es-DrN1BLo5.js";
|
|
5
|
+
import { H as HttpApiV1 } from "./http_api_v1-CkjqXdob.js";
|
|
6
|
+
const _hoisted_1 = { class: "bg" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "login",
|
|
8
|
+
setup(__props) {
|
|
9
|
+
const r = useRouter(), route = useRoute(), d = reactive({
|
|
10
|
+
u: "admin",
|
|
11
|
+
p: "123"
|
|
12
|
+
}), view = reactive({
|
|
13
|
+
loading: !1
|
|
14
|
+
}), ToPasswordInput = () => {
|
|
15
|
+
}, login2 = () => {
|
|
16
|
+
view.loading = !0;
|
|
17
|
+
let data = {
|
|
18
|
+
u: d.u,
|
|
19
|
+
p: h.hashStr(d.p)
|
|
20
|
+
};
|
|
21
|
+
HttpApiV1.Post(HttpApiV1.url_login, data).then((res) => {
|
|
22
|
+
res.IsSuccess ? (ZSYSMessage.ShowSuccess("登录成功"), r.push(route.query.redirect || "/desktop")) : ZSYSMessage.ShowError(res.message);
|
|
23
|
+
}).catch(() => {
|
|
24
|
+
console.log("请求失败"), ZSYSMessage.ShowError("登录服务器失败");
|
|
25
|
+
}).finally(() => {
|
|
26
|
+
view.loading = !1;
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
const _component_el_image = resolveComponent("el-image"), _component_el_input = resolveComponent("el-input"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_button = resolveComponent("el-button"), _component_el_form = resolveComponent("el-form"), _component_el_card = resolveComponent("el-card");
|
|
31
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
32
|
+
createVNode(_component_el_card, {
|
|
33
|
+
style: { width: "300px", "text-align": "center" },
|
|
34
|
+
shadow: "always",
|
|
35
|
+
class: "align-center"
|
|
36
|
+
}, {
|
|
37
|
+
header: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
38
|
+
createElementVNode("div", {
|
|
39
|
+
class: "card-header",
|
|
40
|
+
style: {}
|
|
41
|
+
}, [
|
|
42
|
+
createElementVNode("span", null, "岗位行为识别系统")
|
|
43
|
+
], -1)
|
|
44
|
+
])]),
|
|
45
|
+
default: withCtx(() => [
|
|
46
|
+
createVNode(_component_el_image, {
|
|
47
|
+
style: { height: "100px" },
|
|
48
|
+
src: "../assets/default_avatar.png"
|
|
49
|
+
}),
|
|
50
|
+
createVNode(_component_el_form, {
|
|
51
|
+
"label-width": "auto",
|
|
52
|
+
"label-position": "top"
|
|
53
|
+
}, {
|
|
54
|
+
default: withCtx(() => [
|
|
55
|
+
createVNode(_component_el_form_item, { label: "用户名" }, {
|
|
56
|
+
default: withCtx(() => [
|
|
57
|
+
createVNode(_component_el_input, {
|
|
58
|
+
size: "large",
|
|
59
|
+
autofocus: !0,
|
|
60
|
+
modelValue: d.u,
|
|
61
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => d.u = $event),
|
|
62
|
+
clearable: "",
|
|
63
|
+
onKeyup: withKeys(ToPasswordInput, ["enter", "native"])
|
|
64
|
+
}, null, 8, ["modelValue"])
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}),
|
|
68
|
+
createVNode(_component_el_form_item, { label: "密码" }, {
|
|
69
|
+
default: withCtx(() => [
|
|
70
|
+
createVNode(_component_el_input, {
|
|
71
|
+
ref: "PasswordInput",
|
|
72
|
+
size: "large",
|
|
73
|
+
modelValue: d.p,
|
|
74
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => d.p = $event),
|
|
75
|
+
clearable: "",
|
|
76
|
+
"show-password": "",
|
|
77
|
+
onKeyup: withKeys(login2, ["enter", "native"])
|
|
78
|
+
}, null, 8, ["modelValue"])
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}),
|
|
82
|
+
createVNode(_component_el_form_item, null, {
|
|
83
|
+
default: withCtx(() => [
|
|
84
|
+
createVNode(_component_el_button, {
|
|
85
|
+
type: "primary",
|
|
86
|
+
size: "large",
|
|
87
|
+
loading: view.loading,
|
|
88
|
+
onClick: login2,
|
|
89
|
+
style: { width: "100%" }
|
|
90
|
+
}, {
|
|
91
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
92
|
+
createTextVNode("登录", -1)
|
|
93
|
+
])]),
|
|
94
|
+
_: 1
|
|
95
|
+
}, 8, ["loading"])
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
})
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
})
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})
|
|
105
|
+
]);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}), login = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-472621d6"]]);
|
|
109
|
+
export {
|
|
110
|
+
login as default
|
|
111
|
+
};
|
|
@@ -0,0 +1,293 @@
|
|
|
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-CkjqXdob.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, i as arrow_down_default } from "./index-DG0x9mYD.js";
|
|
4
|
+
import { _ as _export_sfc, u as useRouter, a as useTokenStore } from "./index-BGMV_V_g.js";
|
|
5
|
+
import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
|
|
6
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "userMenuItem",
|
|
8
|
+
props: {
|
|
9
|
+
item: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const data = __props;
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
const _component_el_icon = resolveComponent("el-icon"), _component_el_menu_item = resolveComponent("el-menu-item"), _component_el_sub_menu = resolveComponent("el-sub-menu");
|
|
15
|
+
return !data.item.children && data.item.show ? (openBlock(), createBlock(_component_el_menu_item, {
|
|
16
|
+
key: 0,
|
|
17
|
+
index: data.item.url
|
|
18
|
+
}, {
|
|
19
|
+
default: withCtx(() => [
|
|
20
|
+
createVNode(_component_el_icon, null, {
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
(openBlock(), createBlock(resolveDynamicComponent(data.item.icon)))
|
|
23
|
+
]),
|
|
24
|
+
_: 1
|
|
25
|
+
}),
|
|
26
|
+
createElementVNode("span", null, toDisplayString(data.item.name), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
}, 8, ["index"])) : data.item.show ? (openBlock(), createBlock(_component_el_sub_menu, {
|
|
30
|
+
key: 1,
|
|
31
|
+
index: data.item.url
|
|
32
|
+
}, {
|
|
33
|
+
title: withCtx(() => [
|
|
34
|
+
createVNode(_component_el_icon, null, {
|
|
35
|
+
default: withCtx(() => [
|
|
36
|
+
(openBlock(), createBlock(resolveDynamicComponent(markRaw(data.item.icon))))
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}),
|
|
40
|
+
createElementVNode("span", null, toDisplayString(data.item.name), 1)
|
|
41
|
+
]),
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(data.item.children, (v) => (openBlock(), createBlock(_sfc_main$3, {
|
|
44
|
+
key: v.url,
|
|
45
|
+
item: v
|
|
46
|
+
}, null, 8, ["item"]))), 128))
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}, 8, ["index"])) : createCommentVNode("", !0);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
class CommonHelper {
|
|
54
|
+
//数组中是否存在字符串
|
|
55
|
+
static StringArrayHasString(array, str) {
|
|
56
|
+
return array.indexOf(str) !== -1;
|
|
57
|
+
}
|
|
58
|
+
//数组中是否存在另一数组中的任意一个元素
|
|
59
|
+
static StringArrayHasStringArrayOne(array, array2) {
|
|
60
|
+
for (const s of array2)
|
|
61
|
+
if (CommonHelper.StringArrayHasString(array, s))
|
|
62
|
+
return !0;
|
|
63
|
+
return !1;
|
|
64
|
+
}
|
|
65
|
+
//数组2是否包含在数组1中
|
|
66
|
+
static StringArrayHasStringArray(array, array2) {
|
|
67
|
+
if (array2.length == 0)
|
|
68
|
+
return !1;
|
|
69
|
+
for (const s of array2)
|
|
70
|
+
if (!CommonHelper.StringArrayHasString(array, s))
|
|
71
|
+
return !1;
|
|
72
|
+
return !0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
76
|
+
__name: "userMenu",
|
|
77
|
+
setup(__props) {
|
|
78
|
+
const menus = reactive(
|
|
79
|
+
[
|
|
80
|
+
{ name: "首页", iconname: "House", icon: markRaw(house_default), url: "/desktop", show: !0 },
|
|
81
|
+
{ name: "个人中心", icon: markRaw(user_default), url: "/self", show: !0 },
|
|
82
|
+
{ name: "数据看板", icon: markRaw(odometer_default), url: "/chart", show: !1 },
|
|
83
|
+
{ name: "事件管理", icon: markRaw(collection_default), url: "/eventgroup/event", show: !1 },
|
|
84
|
+
// {
|
|
85
|
+
// name: '事件管理', icon: markRaw(Collection), url: '/111', show: false,
|
|
86
|
+
// children: [
|
|
87
|
+
// { name: '数据看板', icon: markRaw(Odometer), url: '/user', show: false },
|
|
88
|
+
// { name: '事件', icon: markRaw(Collection), url: '/eventgroup/event', show: false },
|
|
89
|
+
// ]
|
|
90
|
+
// },
|
|
91
|
+
{ name: "行为分析引擎", icon: markRaw(set_up_default), url: "/engine", show: !1 },
|
|
92
|
+
{ name: "设备管理", icon: markRaw(video_camera_default), url: "/equipment", show: !1 },
|
|
93
|
+
{ name: "区域管理", icon: markRaw(location_default), url: "/area", show: !1 },
|
|
94
|
+
{ name: "报表与统计", icon: markRaw(document_default), url: "/building?1", show: !1 },
|
|
95
|
+
{ name: "报警与通知", icon: markRaw(bell_default), url: "/building?2", show: !1 },
|
|
96
|
+
{
|
|
97
|
+
name: "系统管理",
|
|
98
|
+
icon: markRaw(setting_default),
|
|
99
|
+
url: "/zsys",
|
|
100
|
+
show: !1,
|
|
101
|
+
children: [
|
|
102
|
+
{ name: "用户管理", icon: markRaw(user_default), url: "/user", show: !1 },
|
|
103
|
+
{ name: "组织架构", icon: markRaw(office_building_default), url: "/department", show: !1 },
|
|
104
|
+
{ name: "职务", icon: markRaw(avatar_default), url: "/position", show: !1 },
|
|
105
|
+
{ name: "角色权限", icon: markRaw(avatar_default), url: "/role", show: !1 },
|
|
106
|
+
{ name: "日志", icon: markRaw(reading_default), url: "/log", show: !1 },
|
|
107
|
+
{ name: "备份", icon: markRaw(copy_document_default), url: "/backup", 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", 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);
|
|
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: { "background-color": "#252423" } }, {
|
|
159
|
+
default: withCtx(() => [
|
|
160
|
+
createVNode(_component_el_menu, {
|
|
161
|
+
"default-active": "2",
|
|
162
|
+
router: "",
|
|
163
|
+
style: { "margin-bottom": "20px" },
|
|
164
|
+
"background-color": "#252423",
|
|
165
|
+
"text-color": "#fff",
|
|
166
|
+
"active-text-color": "#409EFF"
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [
|
|
169
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(menus, (v) => (openBlock(), createBlock(_sfc_main$3, {
|
|
170
|
+
key: v.url,
|
|
171
|
+
item: v
|
|
172
|
+
}, null, 8, ["item"]))), 128))
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
})
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
})
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}), Usermenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-33c36378"]]), _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({
|
|
185
|
+
__name: "userHeader",
|
|
186
|
+
setup(__props) {
|
|
187
|
+
const r = useRouter(), user = reactive({
|
|
188
|
+
uname: ""
|
|
189
|
+
});
|
|
190
|
+
HttpApiV1.Post(HttpApiV1.url_usercenter, {}).then((res) => {
|
|
191
|
+
if (res.IsSuccess) {
|
|
192
|
+
let d = res.data;
|
|
193
|
+
user.uname = d.uname;
|
|
194
|
+
}
|
|
195
|
+
}).catch((err) => {
|
|
196
|
+
console.log("er1111r"), console.log(err);
|
|
197
|
+
});
|
|
198
|
+
const loginout = () => {
|
|
199
|
+
useTokenStore().saveToken(""), r.push("/login");
|
|
200
|
+
}, changepassword = () => {
|
|
201
|
+
r.push("/password");
|
|
202
|
+
};
|
|
203
|
+
return (_ctx, _cache) => {
|
|
204
|
+
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");
|
|
205
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
206
|
+
createElementVNode("div", _hoisted_2, [
|
|
207
|
+
createVNode(_component_el_image, {
|
|
208
|
+
style: { height: "40px" },
|
|
209
|
+
src: "../../assets/default_logo_40.png"
|
|
210
|
+
})
|
|
211
|
+
]),
|
|
212
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { style: { float: "left", "line-height": "60px" } }, "岗位行为识别系统", -1)),
|
|
213
|
+
createVNode(_component_el_dropdown, {
|
|
214
|
+
trigger: "click",
|
|
215
|
+
class: "user_operate"
|
|
216
|
+
}, {
|
|
217
|
+
dropdown: withCtx(() => [
|
|
218
|
+
createVNode(_component_el_dropdown_menu, null, {
|
|
219
|
+
default: withCtx(() => [
|
|
220
|
+
createVNode(_component_el_dropdown_item, { onClick: changepassword }, {
|
|
221
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
222
|
+
createTextVNode("修改密码", -1)
|
|
223
|
+
])]),
|
|
224
|
+
_: 1
|
|
225
|
+
}),
|
|
226
|
+
createVNode(_component_el_dropdown_item, { onClick: loginout }, {
|
|
227
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
228
|
+
createTextVNode("退出", -1)
|
|
229
|
+
])]),
|
|
230
|
+
_: 1
|
|
231
|
+
})
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
})
|
|
235
|
+
]),
|
|
236
|
+
default: withCtx(() => [
|
|
237
|
+
createElementVNode("span", _hoisted_3, [
|
|
238
|
+
createTextVNode(toDisplayString(user.uname) + " ", 1),
|
|
239
|
+
createVNode(_component_el_icon, { class: "el-icon--right" }, {
|
|
240
|
+
default: withCtx(() => [
|
|
241
|
+
createVNode(unref(arrow_down_default))
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
})
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
})
|
|
249
|
+
]);
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}), Userheader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-11555c6e"]]), _sfc_main = /* @__PURE__ */ defineComponent({
|
|
253
|
+
__name: "main",
|
|
254
|
+
setup(__props) {
|
|
255
|
+
const store = useTokenStore(), r = useRouter();
|
|
256
|
+
return watch(store, (newv) => {
|
|
257
|
+
console.log("watch"), newv.token_data == "none" ? (console.log("newv.token_data==none"), r.push({
|
|
258
|
+
path: "/login",
|
|
259
|
+
query: {
|
|
260
|
+
redirect: r.currentRoute.value.fullPath
|
|
261
|
+
}
|
|
262
|
+
}), ZSYSMessage.ShowInfo("系统要求您重新登录")) : console.log("newv.token_data!=none");
|
|
263
|
+
}), (_ctx, _cache) => {
|
|
264
|
+
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");
|
|
265
|
+
return openBlock(), createBlock(_component_el_container, null, {
|
|
266
|
+
default: withCtx(() => [
|
|
267
|
+
createVNode(_component_el_header, { class: "header" }, {
|
|
268
|
+
default: withCtx(() => [
|
|
269
|
+
createVNode(Userheader)
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
}),
|
|
273
|
+
createVNode(_component_el_container, null, {
|
|
274
|
+
default: withCtx(() => [
|
|
275
|
+
createVNode(Usermenu),
|
|
276
|
+
createVNode(_component_el_main, { style: { padding: "0", "background-color": "white", position: "fixed", left: "200px", top: "60px", right: "0px", bottom: "0px" } }, {
|
|
277
|
+
default: withCtx(() => [
|
|
278
|
+
createVNode(_component_router_view)
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
})
|
|
282
|
+
]),
|
|
283
|
+
_: 1
|
|
284
|
+
})
|
|
285
|
+
]),
|
|
286
|
+
_: 1
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}), main = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71477349"]]);
|
|
291
|
+
export {
|
|
292
|
+
main as default
|
|
293
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ElMessage } from "element-plus";
|
|
2
|
+
class ZSYSMessage {
|
|
3
|
+
static show(msgType = "info", msg) {
|
|
4
|
+
ElMessage({
|
|
5
|
+
message: msg,
|
|
6
|
+
type: msgType,
|
|
7
|
+
plain: !0,
|
|
8
|
+
duration: 3e3,
|
|
9
|
+
// 3秒后消失
|
|
10
|
+
showClose: !1
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
static ShowInfo(msg) {
|
|
14
|
+
ZSYSMessage.show("info", msg);
|
|
15
|
+
}
|
|
16
|
+
static ShowSuccess(msg) {
|
|
17
|
+
ZSYSMessage.show("success", msg);
|
|
18
|
+
}
|
|
19
|
+
static ShowError(msg) {
|
|
20
|
+
ZSYSMessage.show("error", msg);
|
|
21
|
+
}
|
|
22
|
+
install = (app) => (app.component(ZSYSMessage.name, ZSYSMessage), app);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
ZSYSMessage as Z
|
|
26
|
+
};
|