yh-pub 1.0.0 → 1.0.2

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 (55) hide show
  1. package/README.MD +19 -19
  2. package/layout/admin/adminIndex.vue +104 -104
  3. package/layout/admin/api/loginApi.js +24 -24
  4. package/layout/admin/api/routers.js +93 -93
  5. package/layout/admin/api/tenantApi.js +123 -123
  6. package/layout/admin/home/homeIndex.vue +25 -25
  7. package/layout/admin/login/login.vue +161 -161
  8. package/layout/admin/menu/MenuIndex.vue +648 -648
  9. package/layout/admin/menu/icon.vue +108 -108
  10. package/layout/admin/menu/iconList.js +934 -934
  11. package/layout/admin/saTenant/saTenant.vue +173 -173
  12. package/layout/admin/saTenant/saTenantForm.js +80 -80
  13. package/layout/admin/saTenant/saTenantForm.vue +61 -61
  14. package/layout/admin/saTenant/saTenantRoleManage.js +417 -417
  15. package/layout/admin/saTenant/saTenantRoleManage.vue +99 -99
  16. package/layout/admin/user/saUser.less +6 -6
  17. package/layout/admin/user/saUser.vue +72 -72
  18. package/layout/main/components/console/console.vue +205 -205
  19. package/layout/main/components/error-store/error-store.vue +72 -72
  20. package/layout/main/components/error-store/index.js +2 -2
  21. package/layout/main/components/fullscreen/fullscreen.vue +57 -57
  22. package/layout/main/components/fullscreen/index.js +2 -2
  23. package/layout/main/components/language/language.vue +71 -71
  24. package/layout/main/components/side-menu/side-menu.less +73 -73
  25. package/layout/main/components/side-menu/side-menu.vue +75 -75
  26. package/layout/main/components/tags-nav/tags-nav.less +44 -44
  27. package/layout/main/components/tags-nav/tags-nav.vue +144 -144
  28. package/layout/main/components/user/user.less +12 -12
  29. package/layout/main/components/user/user.vue +185 -185
  30. package/layout/main/home/home.vue +480 -480
  31. package/layout/main/home/index.js +2 -2
  32. package/layout/main/home/toDoList.vue +32 -32
  33. package/layout/main/login/login.less +93 -93
  34. package/layout/main/login/login.vue +151 -151
  35. package/layout/main/main.less +81 -81
  36. package/layout/main/main.vue +254 -202
  37. package/layout/main/system/dict.vue +64 -64
  38. package/layout/main/system/orgManage.vue +473 -473
  39. package/layout/main/system/roleManage.js +807 -755
  40. package/layout/main/system/roleManage.vue +424 -399
  41. package/package.json +11 -11
  42. package/view/basic/error-logger.vue +74 -74
  43. package/view/basic/error-page/401.vue +22 -22
  44. package/view/basic/error-page/404.vue +22 -22
  45. package/view/basic/error-page/500.vue +22 -22
  46. package/view/basic/error-page/back-btn-group.vue +48 -48
  47. package/view/basic/error-page/error-content.vue +28 -28
  48. package/view/basic/error-page/error.less +46 -46
  49. package/view/config/component/confFormItem.vue +49 -49
  50. package/view/config/config.scss +45 -45
  51. package/view/config/configIndex.vue +150 -150
  52. package/view/config/subPage/router-config.vue +4 -4
  53. package/view/config/subPage/sys-config.vue +249 -249
  54. package/view/window/IframeFReportView.vue +27 -27
  55. package/view/window/windowIndex.vue +22 -22
@@ -1,144 +1,144 @@
1
- <template>
2
- <div
3
- class="tags-nav"
4
- ref="tagsNav">
5
- <ul
6
- v-show="visible"
7
- :style="contextMenuStyle"
8
- class="contextmenu">
9
- <li
10
- v-for="(item, key) of menuList"
11
- @click="handleTagsOption"
12
- :data-key="key">
13
- {{ item }}
14
- </li>
15
- </ul>
16
- <el-tabs
17
- type="border-card"
18
- @tab-change="clickTab"
19
- @tab-remove="removeTab"
20
- :model-value="route?.fullPath"
21
- @contextmenu.prevent.native="contextMenu">
22
- <el-tab-pane
23
- label="首页"
24
- :name="homeFullPath"></el-tab-pane>
25
- <el-tab-pane
26
- closable
27
- v-for="item in tagNavList"
28
- :key="`tag-nav-${item.fullPath}`"
29
- :label="item.name"
30
- :name="item.fullPath"></el-tab-pane>
31
- </el-tabs>
32
- </div>
33
- </template>
34
-
35
- <script setup>
36
- import { ref, reactive, computed, watch, onMounted } from "vue";
37
- import { storeToRefs } from "pinia";
38
- import { useRoute, useRouter } from "vue-router";
39
- import { useAppStore } from "@/store/app";
40
- import { getCurrentInstance } from "vue";
41
-
42
- const emits = defineEmits(["close", "input"]);
43
- const tagInstance = getCurrentInstance();
44
- const route = useRoute();
45
- const router = useRouter();
46
- const appStore = useAppStore();
47
- const { tagNavList, tagPaths, homeFullPath } = storeToRefs(appStore);
48
-
49
- function clickTab(e) {
50
- if (e !== route.fullPath) {
51
- router.push(e);
52
- }
53
- }
54
-
55
- function removeTab(e) {
56
- let index = tagPaths.value.indexOf(e);
57
- tagNavList.value.splice(index, 1);
58
- tagInstance.parent.ctx._.refs.kpAliveRef._.__v_cache.delete(e);
59
- if (e === route.fullPath) {
60
- if (tagNavList.value.length > 0) {
61
- if (index - 1 > -1) {
62
- router.replace(tagNavList.value[index - 1].fullPath);
63
- } else {
64
- router.replace(tagNavList.value[index].fullPath);
65
- }
66
- } else {
67
- router.replace(homeFullPath.value);
68
- }
69
- }
70
- }
71
-
72
- const contextMenuLeft = ref(0);
73
- const contextMenuTop = ref(0);
74
- const visible = ref(false);
75
- const menuList = reactive({
76
- others: "关闭其他",
77
- all: "关闭所有",
78
- });
79
-
80
- const contextTagIndex = ref();
81
- const contextMenuStyle = computed(() => {
82
- return {
83
- left: `${contextMenuLeft.value}px`,
84
- top: `${contextMenuTop.value}px`,
85
- };
86
- });
87
-
88
- function handleTagsOption(e) {
89
- let type;
90
- if (e.type === "click") {
91
- type = e.target.dataset.key;
92
- tagsOptions(type);
93
- }
94
- }
95
-
96
- function tagsOptions(type) {
97
- if (type === "all") {
98
- tagNavList.value = [];
99
- router.replace(homeFullPath.value);
100
- } else if (type === "others") {
101
- let tagerNav = tagNavList.value[contextTagIndex.value];
102
- tagNavList.value = [tagerNav];
103
- router.replace(tagerNav.fullPath);
104
- }
105
- }
106
-
107
- function contextMenu(e) {
108
- let path = e.target.id.replace("tab-", "");
109
- let index = tagPaths.value.indexOf(path);
110
- contextTagIndex.value = index;
111
- visible.value = true;
112
- const offsetLeft = e.target.parentElement?.getBoundingClientRect().left;
113
- contextMenuLeft.value = e.clientX - offsetLeft + 10;
114
- contextMenuTop.value = e.clientY - 45;
115
- }
116
-
117
- function closeMenu() {
118
- visible.value = false;
119
- }
120
-
121
- watch(
122
- () => visible.value,
123
- (value) => {
124
- if (value) {
125
- document.addEventListener("click", closeMenu);
126
- } else {
127
- document.removeEventListener("click", closeMenu);
128
- }
129
- }
130
- );
131
- onMounted(() => {
132
- if (localStorage.tagNavList) {
133
- tagNavList.value = JSON.parse(localStorage.tagNavList);
134
- }
135
- window.addEventListener("beforeunload", (e) => {
136
- localStorage.tagNavList = JSON.stringify(tagNavList.value.filter((item) => !!item));
137
- });
138
- });
139
- </script>
140
-
141
- <style lang="less">
142
- @import "./tags-nav.less";
143
- </style>
144
- @/store/app
1
+ <template>
2
+ <div
3
+ class="tags-nav"
4
+ ref="tagsNav">
5
+ <ul
6
+ v-show="visible"
7
+ :style="contextMenuStyle"
8
+ class="contextmenu">
9
+ <li
10
+ v-for="(item, key) of menuList"
11
+ @click="handleTagsOption"
12
+ :data-key="key">
13
+ {{ item }}
14
+ </li>
15
+ </ul>
16
+ <el-tabs
17
+ type="border-card"
18
+ @tab-change="clickTab"
19
+ @tab-remove="removeTab"
20
+ :model-value="route?.fullPath"
21
+ @contextmenu.prevent.native="contextMenu">
22
+ <el-tab-pane
23
+ label="首页"
24
+ :name="homeFullPath"></el-tab-pane>
25
+ <el-tab-pane
26
+ closable
27
+ v-for="item in tagNavList"
28
+ :key="`tag-nav-${item.fullPath}`"
29
+ :label="item.name"
30
+ :name="item.fullPath"></el-tab-pane>
31
+ </el-tabs>
32
+ </div>
33
+ </template>
34
+
35
+ <script setup>
36
+ import { ref, reactive, computed, watch, onMounted } from "vue";
37
+ import { storeToRefs } from "pinia";
38
+ import { useRoute, useRouter } from "vue-router";
39
+ import { useAppStore } from "@/store/app";
40
+ import { getCurrentInstance } from "vue";
41
+
42
+ const emits = defineEmits(["close", "input"]);
43
+ const tagInstance = getCurrentInstance();
44
+ const route = useRoute();
45
+ const router = useRouter();
46
+ const appStore = useAppStore();
47
+ const { tagNavList, tagPaths, homeFullPath } = storeToRefs(appStore);
48
+
49
+ function clickTab(e) {
50
+ if (e !== route.fullPath) {
51
+ router.push(e);
52
+ }
53
+ }
54
+
55
+ function removeTab(e) {
56
+ let index = tagPaths.value.indexOf(e);
57
+ tagNavList.value.splice(index, 1);
58
+ tagInstance.parent.ctx._.refs.kpAliveRef._.__v_cache.delete(e);
59
+ if (e === route.fullPath) {
60
+ if (tagNavList.value.length > 0) {
61
+ if (index - 1 > -1) {
62
+ router.replace(tagNavList.value[index - 1].fullPath);
63
+ } else {
64
+ router.replace(tagNavList.value[index].fullPath);
65
+ }
66
+ } else {
67
+ router.replace(homeFullPath.value);
68
+ }
69
+ }
70
+ }
71
+
72
+ const contextMenuLeft = ref(0);
73
+ const contextMenuTop = ref(0);
74
+ const visible = ref(false);
75
+ const menuList = reactive({
76
+ others: "关闭其他",
77
+ all: "关闭所有",
78
+ });
79
+
80
+ const contextTagIndex = ref();
81
+ const contextMenuStyle = computed(() => {
82
+ return {
83
+ left: `${contextMenuLeft.value}px`,
84
+ top: `${contextMenuTop.value}px`,
85
+ };
86
+ });
87
+
88
+ function handleTagsOption(e) {
89
+ let type;
90
+ if (e.type === "click") {
91
+ type = e.target.dataset.key;
92
+ tagsOptions(type);
93
+ }
94
+ }
95
+
96
+ function tagsOptions(type) {
97
+ if (type === "all") {
98
+ tagNavList.value = [];
99
+ router.replace(homeFullPath.value);
100
+ } else if (type === "others") {
101
+ let tagerNav = tagNavList.value[contextTagIndex.value];
102
+ tagNavList.value = [tagerNav];
103
+ router.replace(tagerNav.fullPath);
104
+ }
105
+ }
106
+
107
+ function contextMenu(e) {
108
+ let path = e.target.id.replace("tab-", "");
109
+ let index = tagPaths.value.indexOf(path);
110
+ contextTagIndex.value = index;
111
+ visible.value = true;
112
+ const offsetLeft = e.target.parentElement?.getBoundingClientRect().left;
113
+ contextMenuLeft.value = e.clientX - offsetLeft + 10;
114
+ contextMenuTop.value = e.clientY - 45;
115
+ }
116
+
117
+ function closeMenu() {
118
+ visible.value = false;
119
+ }
120
+
121
+ watch(
122
+ () => visible.value,
123
+ (value) => {
124
+ if (value) {
125
+ document.addEventListener("click", closeMenu);
126
+ } else {
127
+ document.removeEventListener("click", closeMenu);
128
+ }
129
+ }
130
+ );
131
+ onMounted(() => {
132
+ if (localStorage.tagNavList) {
133
+ tagNavList.value = JSON.parse(localStorage.tagNavList);
134
+ }
135
+ window.addEventListener("beforeunload", (e) => {
136
+ localStorage.tagNavList = JSON.stringify(tagNavList.value.filter((item) => !!item));
137
+ });
138
+ });
139
+ </script>
140
+
141
+ <style lang="less">
142
+ @import "./tags-nav.less";
143
+ </style>
144
+ @/store/app
@@ -1,12 +1,12 @@
1
- .user{
2
- &-avatar-dropdown{
3
- cursor: pointer;
4
- display: inline-block;
5
- // height: 64px;
6
- vertical-align: middle;
7
- // line-height: 64px;
8
- .ivu-badge-dot{
9
- top: 16px;
10
- }
11
- }
12
- }
1
+ .user{
2
+ &-avatar-dropdown{
3
+ cursor: pointer;
4
+ display: inline-block;
5
+ // height: 64px;
6
+ vertical-align: middle;
7
+ // line-height: 64px;
8
+ .ivu-badge-dot{
9
+ top: 16px;
10
+ }
11
+ }
12
+ }
@@ -1,185 +1,185 @@
1
- <template>
2
- <el-dropdown
3
- split-button
4
- class="user-avatar-dropdown"
5
- @command="handleClick">
6
- {{ userName }}
7
- <template #dropdown>
8
- <el-dropdown-menu>
9
- <el-dropdown-item command="message">
10
- 消息中心
11
- <el-badge
12
- style="margin-left: 10px"
13
- :value="messageUnreadCount"></el-badge>
14
- </el-dropdown-item>
15
- <el-dropdown-item command="changePwd">修改密码</el-dropdown-item>
16
- <el-dropdown-item command="logout">退出登录</el-dropdown-item>
17
- </el-dropdown-menu>
18
- </template>
19
- </el-dropdown>
20
- <el-dialog
21
- ref="changePwd"
22
- class="yh-el-dialog"
23
- v-model="showChangePwd"
24
- title="修改密码"
25
- destroy-on-close>
26
- <el-form
27
- :model="formData"
28
- :rules="rules"
29
- ref="changePwdForm">
30
- <el-form-item label="原密码">
31
- <el-input
32
- v-model="formData.oldPwd"
33
- placeholder="请输入原密码"
34
- type="password"
35
- clearable></el-input>
36
- </el-form-item>
37
- <el-form-item label="新密码">
38
- <el-input
39
- v-model="formData.newPwd"
40
- placeholder="请输入新密码"
41
- type="password"
42
- clearable></el-input>
43
- </el-form-item>
44
- <el-form-item label="确认密码">
45
- <el-input
46
- v-model="formData.confirmPwd"
47
- placeholder="请输入确认密码"
48
- type="password"
49
- clearable></el-input>
50
- </el-form-item>
51
- </el-form>
52
- <template #footer>
53
- <el-button
54
- type="primary"
55
- @click="changePwd"
56
- :loading="btnLoading">
57
- 提交
58
- </el-button>
59
- <el-button @click="showChangePwd = false">取消</el-button>
60
- </template>
61
- </el-dialog>
62
- </template>
63
-
64
- <script>
65
- import "./user.less";
66
- import { mapActions } from "pinia";
67
- import { useUserStore } from "@/store/user";
68
- import headerPng from "@/assets/images/admin-header.png";
69
- import { clearStorage } from "@/libs/util";
70
-
71
- export default {
72
- name: "User",
73
- props: {
74
- userAvatar: {
75
- type: String,
76
- default: headerPng,
77
- },
78
- messageUnreadCount: {
79
- type: Number,
80
- default: 0,
81
- },
82
- userName: {
83
- type: String,
84
- default: "",
85
- },
86
- },
87
- data() {
88
- return {
89
- showChangePwd: false,
90
- formData: {},
91
- rules: {
92
- oldPwd: [{ required: true, message: "原密码不为空!" }],
93
- newPwd: [{ required: true, message: "新密码不为空!" }],
94
- confirmPwd: [
95
- {
96
- required: true,
97
- message: "确认密码不为空!",
98
- validator: function ({ itemValue, rule, rules, data, property }) {
99
- if (itemValue !== data.newPwd) {
100
- return new Error("确认密码与新密码不一致!");
101
- }
102
- },
103
- },
104
- ],
105
- },
106
- btnLoading: false,
107
- };
108
- },
109
- methods: {
110
- logout() {
111
- const userStore = useUserStore();
112
- userStore
113
- .handleLogOut()
114
- .then(() => {
115
- this.$router.push({
116
- name: "login",
117
- });
118
- })
119
- .catch((e) => {
120
- clearStorage();
121
- this.$router.push({
122
- name: "login",
123
- });
124
- });
125
- },
126
- message() {
127
- this.$router.push({
128
- name: "message_page",
129
- });
130
- },
131
- handleClick(e) {
132
- switch (e) {
133
- case "logout":
134
- this.logout();
135
- break;
136
- case "message":
137
- this.message();
138
- break;
139
- case "changePwd":
140
- this.showChangePwd = true;
141
- break;
142
- }
143
- },
144
- changePwd() {
145
- let that = this;
146
- let form = this.$refs["changePwdForm"];
147
- form.validate().then((result) => {
148
- if (typeof result === "undefined") {
149
- this.btnLoading = true;
150
- this.axios.post("user/modifyPassword", this.formData).then((res) => {
151
- if (res.data.result) {
152
- this.$message.success(res.data.msg);
153
- setTimeout(function () {
154
- that.btnLoading = false;
155
- that.logout();
156
- }, 1000);
157
- } else {
158
- this.$message.error(res.data.msg);
159
- this.btnLoading = false;
160
- }
161
- });
162
- }
163
- });
164
- },
165
- },
166
- };
167
- </script>
168
-
169
- <style lang="scss">
170
- .user-avatar-dropdown {
171
- .el-button {
172
- --el-button-text-color: var(--el-color-white);
173
- --el-button-active-text-color: var(--el-color-white);
174
- --el-button-hover-text-color: var(--el-color-white);
175
- --el-button-bg-color: transparent;
176
- --el-button-active-bg-color: transparent;
177
- --el-button-hover-bg-color: transparent;
178
- --el-button-outline-color: transparent;
179
- --el-button-active-border-color: var(--el-color-white);
180
- --el-button-hover-border-color: var(--el-color-white);
181
- --el-button-border-color: var(--el-color-white);
182
- }
183
- }
184
- </style>
185
- @/libs/util
1
+ <template>
2
+ <el-dropdown
3
+ split-button
4
+ class="user-avatar-dropdown"
5
+ @command="handleClick">
6
+ {{ userName }}
7
+ <template #dropdown>
8
+ <el-dropdown-menu>
9
+ <el-dropdown-item command="message">
10
+ 消息中心
11
+ <el-badge
12
+ style="margin-left: 10px"
13
+ :value="messageUnreadCount"></el-badge>
14
+ </el-dropdown-item>
15
+ <el-dropdown-item command="changePwd">修改密码</el-dropdown-item>
16
+ <el-dropdown-item command="logout">退出登录</el-dropdown-item>
17
+ </el-dropdown-menu>
18
+ </template>
19
+ </el-dropdown>
20
+ <el-dialog
21
+ ref="changePwd"
22
+ class="yh-el-dialog"
23
+ v-model="showChangePwd"
24
+ title="修改密码"
25
+ destroy-on-close>
26
+ <el-form
27
+ :model="formData"
28
+ :rules="rules"
29
+ ref="changePwdForm">
30
+ <el-form-item label="原密码">
31
+ <el-input
32
+ v-model="formData.oldPwd"
33
+ placeholder="请输入原密码"
34
+ type="password"
35
+ clearable></el-input>
36
+ </el-form-item>
37
+ <el-form-item label="新密码">
38
+ <el-input
39
+ v-model="formData.newPwd"
40
+ placeholder="请输入新密码"
41
+ type="password"
42
+ clearable></el-input>
43
+ </el-form-item>
44
+ <el-form-item label="确认密码">
45
+ <el-input
46
+ v-model="formData.confirmPwd"
47
+ placeholder="请输入确认密码"
48
+ type="password"
49
+ clearable></el-input>
50
+ </el-form-item>
51
+ </el-form>
52
+ <template #footer>
53
+ <el-button
54
+ type="primary"
55
+ @click="changePwd"
56
+ :loading="btnLoading">
57
+ 提交
58
+ </el-button>
59
+ <el-button @click="showChangePwd = false">取消</el-button>
60
+ </template>
61
+ </el-dialog>
62
+ </template>
63
+
64
+ <script>
65
+ import "./user.less";
66
+ import { mapActions } from "pinia";
67
+ import { useUserStore } from "@/store/user";
68
+ import headerPng from "@/assets/images/admin-header.png";
69
+ import { clearStorage } from "@/libs/util";
70
+
71
+ export default {
72
+ name: "User",
73
+ props: {
74
+ userAvatar: {
75
+ type: String,
76
+ default: headerPng,
77
+ },
78
+ messageUnreadCount: {
79
+ type: Number,
80
+ default: 0,
81
+ },
82
+ userName: {
83
+ type: String,
84
+ default: "",
85
+ },
86
+ },
87
+ data() {
88
+ return {
89
+ showChangePwd: false,
90
+ formData: {},
91
+ rules: {
92
+ oldPwd: [{ required: true, message: "原密码不为空!" }],
93
+ newPwd: [{ required: true, message: "新密码不为空!" }],
94
+ confirmPwd: [
95
+ {
96
+ required: true,
97
+ message: "确认密码不为空!",
98
+ validator: function ({ itemValue, rule, rules, data, property }) {
99
+ if (itemValue !== data.newPwd) {
100
+ return new Error("确认密码与新密码不一致!");
101
+ }
102
+ },
103
+ },
104
+ ],
105
+ },
106
+ btnLoading: false,
107
+ };
108
+ },
109
+ methods: {
110
+ logout() {
111
+ const userStore = useUserStore();
112
+ userStore
113
+ .handleLogOut()
114
+ .then(() => {
115
+ this.$router.push({
116
+ name: "login",
117
+ });
118
+ })
119
+ .catch((e) => {
120
+ clearStorage();
121
+ this.$router.push({
122
+ name: "login",
123
+ });
124
+ });
125
+ },
126
+ message() {
127
+ this.$router.push({
128
+ name: "message_page",
129
+ });
130
+ },
131
+ handleClick(e) {
132
+ switch (e) {
133
+ case "logout":
134
+ this.logout();
135
+ break;
136
+ case "message":
137
+ this.message();
138
+ break;
139
+ case "changePwd":
140
+ this.showChangePwd = true;
141
+ break;
142
+ }
143
+ },
144
+ changePwd() {
145
+ let that = this;
146
+ let form = this.$refs["changePwdForm"];
147
+ form.validate().then((result) => {
148
+ if (typeof result === "undefined") {
149
+ this.btnLoading = true;
150
+ this.axios.post("user/modifyPassword", this.formData).then((res) => {
151
+ if (res.data.result) {
152
+ this.$message.success(res.data.msg);
153
+ setTimeout(function () {
154
+ that.btnLoading = false;
155
+ that.logout();
156
+ }, 1000);
157
+ } else {
158
+ this.$message.error(res.data.msg);
159
+ this.btnLoading = false;
160
+ }
161
+ });
162
+ }
163
+ });
164
+ },
165
+ },
166
+ };
167
+ </script>
168
+
169
+ <style lang="scss">
170
+ .user-avatar-dropdown {
171
+ .el-button {
172
+ --el-button-text-color: var(--el-color-white);
173
+ --el-button-active-text-color: var(--el-color-white);
174
+ --el-button-hover-text-color: var(--el-color-white);
175
+ --el-button-bg-color: transparent;
176
+ --el-button-active-bg-color: transparent;
177
+ --el-button-hover-bg-color: transparent;
178
+ --el-button-outline-color: transparent;
179
+ --el-button-active-border-color: var(--el-color-white);
180
+ --el-button-hover-border-color: var(--el-color-white);
181
+ --el-button-border-color: var(--el-color-white);
182
+ }
183
+ }
184
+ </style>
185
+ @/libs/util