yh-pub 1.0.2 → 2.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 (94) hide show
  1. package/AdminLogin-W5d0M-rz.js +137 -0
  2. package/AdminLogin-W5d0M-rz.js.map +1 -0
  3. package/Dict.vue_vue_type_script_setup_true_lang-CcfyhJln.js +54 -0
  4. package/Dict.vue_vue_type_script_setup_true_lang-CcfyhJln.js.map +1 -0
  5. package/Error-BZ9xAkuT.js +43 -0
  6. package/Error-BZ9xAkuT.js.map +1 -0
  7. package/Error401-DrA7Y9h3.js +30 -0
  8. package/Error401-DrA7Y9h3.js.map +1 -0
  9. package/Error404-C5K4o1R3.js +30 -0
  10. package/Error404-C5K4o1R3.js.map +1 -0
  11. package/Error500-D9nu1xhW.js +30 -0
  12. package/Error500-D9nu1xhW.js.map +1 -0
  13. package/HomeIndex-DnGu5xD0.js +438 -0
  14. package/HomeIndex-DnGu5xD0.js.map +1 -0
  15. package/IconExplorer-IvNeUIhq.js +66 -0
  16. package/IconExplorer-IvNeUIhq.js.map +1 -0
  17. package/Index-BMd4lEnI.js +5 -0
  18. package/Index-BMd4lEnI.js.map +1 -0
  19. package/MainLogin-CgJLift-.js +153 -0
  20. package/MainLogin-CgJLift-.js.map +1 -0
  21. package/MenuManage-BJkQPgpt.js +640 -0
  22. package/MenuManage-BJkQPgpt.js.map +1 -0
  23. package/OrgManage-jLpAnwf4.js +378 -0
  24. package/OrgManage-jLpAnwf4.js.map +1 -0
  25. package/RoleManage-D2RwwJoM.js +729 -0
  26. package/RoleManage-D2RwwJoM.js.map +1 -0
  27. package/SysConfig-CYcl0wCh.js +727 -0
  28. package/SysConfig-CYcl0wCh.js.map +1 -0
  29. package/TenantList-CNVwmoEt.js +693 -0
  30. package/TenantList-CNVwmoEt.js.map +1 -0
  31. package/index-C75ufNln.js +49816 -0
  32. package/index-C75ufNln.js.map +1 -0
  33. package/index-wVC41gTc.js +23955 -0
  34. package/index-wVC41gTc.js.map +1 -0
  35. package/index.d.ts +35 -0
  36. package/index.es.js +66 -0
  37. package/index.es.js.map +1 -0
  38. package/package.json +26 -6
  39. package/style.css +1 -0
  40. package/README.MD +0 -19
  41. package/layout/admin/adminIndex.vue +0 -104
  42. package/layout/admin/api/loginApi.js +0 -24
  43. package/layout/admin/api/routers.js +0 -93
  44. package/layout/admin/api/tenantApi.js +0 -123
  45. package/layout/admin/home/homeIndex.vue +0 -25
  46. package/layout/admin/login/login.vue +0 -161
  47. package/layout/admin/menu/MenuIndex.vue +0 -648
  48. package/layout/admin/menu/icon.vue +0 -108
  49. package/layout/admin/menu/iconList.js +0 -934
  50. package/layout/admin/saTenant/saTenant.js +0 -0
  51. package/layout/admin/saTenant/saTenant.vue +0 -173
  52. package/layout/admin/saTenant/saTenantForm.js +0 -80
  53. package/layout/admin/saTenant/saTenantForm.vue +0 -61
  54. package/layout/admin/saTenant/saTenantRoleManage.js +0 -417
  55. package/layout/admin/saTenant/saTenantRoleManage.vue +0 -99
  56. package/layout/admin/user/saUser.less +0 -6
  57. package/layout/admin/user/saUser.vue +0 -72
  58. package/layout/main/components/console/console.vue +0 -205
  59. package/layout/main/components/error-store/error-store.vue +0 -72
  60. package/layout/main/components/error-store/index.js +0 -2
  61. package/layout/main/components/fullscreen/fullscreen.vue +0 -57
  62. package/layout/main/components/fullscreen/index.js +0 -2
  63. package/layout/main/components/language/language.vue +0 -71
  64. package/layout/main/components/side-menu/side-menu.less +0 -74
  65. package/layout/main/components/side-menu/side-menu.vue +0 -75
  66. package/layout/main/components/tags-nav/tags-nav.less +0 -45
  67. package/layout/main/components/tags-nav/tags-nav.vue +0 -144
  68. package/layout/main/components/user/user.less +0 -12
  69. package/layout/main/components/user/user.vue +0 -185
  70. package/layout/main/home/home.vue +0 -480
  71. package/layout/main/home/index.js +0 -2
  72. package/layout/main/home/toDoList.vue +0 -32
  73. package/layout/main/login/login.less +0 -93
  74. package/layout/main/login/login.vue +0 -151
  75. package/layout/main/main.less +0 -81
  76. package/layout/main/main.vue +0 -254
  77. package/layout/main/system/dict.vue +0 -64
  78. package/layout/main/system/orgManage.vue +0 -473
  79. package/layout/main/system/roleManage.js +0 -807
  80. package/layout/main/system/roleManage.vue +0 -424
  81. package/view/basic/error-logger.vue +0 -74
  82. package/view/basic/error-page/401.vue +0 -22
  83. package/view/basic/error-page/404.vue +0 -22
  84. package/view/basic/error-page/500.vue +0 -22
  85. package/view/basic/error-page/back-btn-group.vue +0 -48
  86. package/view/basic/error-page/error-content.vue +0 -28
  87. package/view/basic/error-page/error.less +0 -46
  88. package/view/config/component/confFormItem.vue +0 -49
  89. package/view/config/config.scss +0 -45
  90. package/view/config/configIndex.vue +0 -150
  91. package/view/config/subPage/router-config.vue +0 -5
  92. package/view/config/subPage/sys-config.vue +0 -249
  93. package/view/window/IframeFReportView.vue +0 -28
  94. package/view/window/windowIndex.vue +0 -22
@@ -1,151 +0,0 @@
1
- <style lang="less">
2
- @import './login.less';
3
- </style>
4
-
5
- <template>
6
- <div class="login">
7
- <div class="login-logo">
8
- <img
9
- src="@/assets/images/logo-tm.png"
10
- width="334px"
11
- height="53px" />
12
- </div>
13
- <div class="login-con">
14
- <div class="login-title">
15
- <div class="login-title-cn">力控元海</div>
16
- <div class="login-title-en">Li Kong Yuan Hai</div>
17
- </div>
18
- <div class="form-con">
19
- <el-form
20
- ref="loginForm"
21
- :model="form"
22
- :rules="rules"
23
- size="large"
24
- layout="inline"
25
- @keydown.enter.native="handleSubmit">
26
- <el-form-item prop="userName">
27
- <el-input
28
- ref="username"
29
- v-model="form.username"
30
- size="large"
31
- placeholder="请输入用户名">
32
- <el-icon
33
- slot="prefix"
34
- class="user" />
35
- </el-input>
36
- </el-form-item>
37
- <el-form-item prop="password">
38
- <el-input
39
- ref="password"
40
- type="password"
41
- size="large"
42
- v-model="form.password"
43
- placeholder="请输入密码"
44
- style="line-height: 40px">
45
- <el-icon
46
- slot="prefix"
47
- class="lock" />
48
- </el-input>
49
- </el-form-item>
50
- <el-form-item>
51
- <el-button
52
- @click="handleSubmit"
53
- type="primary"
54
- style="width: 100%"
55
- size="large"
56
- :loading="loading">
57
- 登录
58
- </el-button>
59
- </el-form-item>
60
- </el-form>
61
- <p class="login-tip">{{ errorMsg }}</p>
62
- </div>
63
- </div>
64
- <!-- <div class="login-info">
65
- <div class="login-info-item">
66
- <div class="login-info-icon">
67
- <i class="iconfont icon-house" />
68
- </div>
69
- <div class="login-info-text">WMS</div>
70
- </div>
71
- <div class="login-info-item">
72
- <div class="login-info-icon">
73
- <i class="iconfont icon-notebook-" />
74
- </div>
75
- <div class="login-info-text">EAM</div>
76
- </div>
77
- <div class="login-info-item">
78
- <div class="login-info-icon">
79
- <i class="iconfont icon-appstore" />
80
- </div>
81
- <div class="login-info-text">WCS</div>
82
- </div>
83
- <div class="login-info-item">
84
- <div class="login-info-icon">
85
- <i class="iconfont icon-monitor1" />
86
- </div>
87
- <div class="login-info-text">TMS</div>
88
- </div>
89
- </div> -->
90
- </div>
91
- </template>
92
-
93
- <script>
94
- import {useUserStore} from '@/store/user';
95
- import {defineComponent} from 'vue';
96
-
97
- export default defineComponent({
98
- data() {
99
- return {
100
- errorMsg: '',
101
- form: {
102
- username: '',
103
- password: '',
104
- },
105
- loading: false,
106
- rules: {
107
- username: [{required: true, message: '账号不能为空', trigger: 'blur'}],
108
- password: [{required: true, message: '密码不能为空', trigger: 'blur'}],
109
- },
110
- };
111
- },
112
- methods: {
113
- handleSubmit() {
114
- this.loading = true;
115
- this.$refs.loginForm.validate((valid) => {
116
- if (valid) {
117
- const userStore = useUserStore();
118
- let data = {
119
- username: this.form.username,
120
- password: this.form.password,
121
- };
122
- userStore
123
- .handleLogin(data)
124
- .then(async (res) => {
125
- this.loading = false;
126
- if (res.data.result) {
127
- this.$message.success('登录成功');
128
- userStore.getUserInfo().then(() => {
129
- this.$router
130
- .replace({
131
- path: this.$config.homePath,
132
- })
133
- .then(() => {
134
- window.navigation.reload();
135
- });
136
- });
137
- } else {
138
- // this.$message.error(res.data.msg);
139
- }
140
- })
141
- .catch((e) => {
142
- console.error(e);
143
- this.loading = false;
144
- this.$message.error(e);
145
- });
146
- }
147
- });
148
- },
149
- },
150
- });
151
- </script>
@@ -1,81 +0,0 @@
1
- .main{
2
- height: 100%;
3
- display: flex;
4
- .logo-con{
5
- display: flex;
6
- justify-content: center;
7
- align-items: center;
8
- height: 50px;
9
- box-sizing: border-box;
10
- background-color: #0051C1;
11
- .max-logo{
12
- height: 44px;
13
- width: auto;
14
- display: block;
15
- margin: 0 auto;
16
- }
17
- .mini-logo{
18
- width: 44px;
19
- height: auto;
20
- display: block;
21
- margin: 0 auto;
22
- }
23
- }
24
- .header-con{
25
- --header-size: 50px;
26
- background: linear-gradient(90deg, #0051C1 0%, #3E93FE 100%);
27
- width: 100%;
28
- height: var(--header-size);
29
- line-height: var(--header-size);
30
- padding: 0 12px;
31
- box-sizing: border-box;
32
- display: flex;
33
- justify-content: flex-end;
34
- align-items: center;
35
- position: relative;
36
- .class-collapsed{
37
- position: absolute;
38
- left: 0;
39
- top: 9px;
40
- width: 32px;
41
- height: 32px;
42
- line-height: 32px;
43
- text-align: center;
44
- margin-right: 12px;
45
- color: var(--el-color-white);
46
- font-size: 26px;
47
- cursor: pointer;
48
- }
49
- }
50
- .main-layout-con{
51
- flex: 1;
52
- overflow: hidden;
53
- background-color:#F3F5FA;
54
- display: flex;
55
- flex-direction: column;
56
- }
57
- .main-container{
58
- flex: 1;
59
- overflow: auto;
60
- background-color: #fff;
61
- padding: 0 10px 10px 10px;
62
- box-sizing: border-box;
63
- }
64
- .left-sider{
65
- width: 220px;
66
- background-color: #21304C;
67
- --el-menu-bg-color: #21304C;
68
- --el-menu-text-color: var(--el-color-white);
69
- --el-menu-active-color: var(--el-color-white);
70
- --el-menu-hover-bg-color: transparent;
71
- &.is-collapse {
72
- width: 64px;
73
- }
74
- }
75
- .right-container {
76
- overflow: hidden;
77
- flex: 1;
78
- display: flex;
79
- flex-direction: column;
80
- }
81
- }
@@ -1,254 +0,0 @@
1
- <template>
2
- <section class="main">
3
- <aside
4
- class="left-sider"
5
- :class="{'is-collapse': collapse}">
6
- <!-- 需要放在菜单上面的内容,如Logo,写在side-menu标签内部,如下 -->
7
- <div class="logo-con">
8
- <template v-if="hasCustomLogo">
9
- <img
10
- v-show="!collapse"
11
- class="max-logo"
12
- :src="logo"
13
- key="max-logo" />
14
- <img
15
- v-show="collapse"
16
- class="mini-logo"
17
- :src="minLogo"
18
- key="min-logo" />
19
- </template>
20
- <template v-else>
21
- <img
22
- v-show="!collapse"
23
- class="max-logo"
24
- src="@/assets/images/logo.png"
25
- key="max-logo" />
26
- <img
27
- v-show="collapse"
28
- class="mini-logo"
29
- src="@/assets/images/logo-min.png"
30
- key="min-logo" />
31
- </template>
32
- </div>
33
- <side-menu
34
- :active-name="route?.name"
35
- :collapse="collapse"
36
- :menu-list="menuList"></side-menu>
37
- </aside>
38
- <section
39
- class="right-container"
40
- :class="{'is-collapse': collapse}">
41
- <header class="header-con">
42
- <i
43
- :class="`iconfont class-collapsed ${collapse ? 'icon-indent' : 'icon-outdent'}`"
44
- @click="handleCollapsedChange"></i>
45
- <user
46
- :message-unread-count="unreadCount"
47
- :user-name="userName" />
48
- <language v-if="config.useI18n" />
49
- <!-- <error-store
50
- v-if="config.plugin?.errorStore?.showInHeader"
51
- :count="errorCount"></error-store>
52
- <LogConsole></LogConsole> -->
53
- <fullscreen v-model="isFullScreen" />
54
- </header>
55
- <main class="main-layout-con">
56
- <tags-nav />
57
- <section
58
- class="main-container"
59
- :class="{'is-iframe': isIframe}">
60
- <router-view v-slot="{Component}">
61
- <KeepAlive
62
- :max="10"
63
- ref="kpAliveRef">
64
- <component
65
- v-show="!isIframe"
66
- :is="Component"
67
- :key="route.path" />
68
- </KeepAlive>
69
- <iframe
70
- v-show="item === route.params.url"
71
- v-for="item in iframeList"
72
- :src="item"
73
- :key="item"
74
- frameborder="0"
75
- scrolling="auto"
76
- style="background-color: #fff"></iframe>
77
- </router-view>
78
- </section>
79
- </main>
80
- </section>
81
- </section>
82
- </template>
83
-
84
- <script setup>
85
- import './main.less';
86
- import {ref, onMounted, onUnmounted, computed, watch} from 'vue';
87
- import {storeToRefs} from 'pinia';
88
- import {ElNotification} from 'element-plus';
89
- import {getToken, getStorage} from '@/libs/util';
90
- import {markRead} from '@/api/user';
91
- import {useRouter, useRoute, onBeforeRouteUpdate} from 'vue-router';
92
-
93
- import config from '@/config';
94
- import {useAppStore} from '@/store/app.js';
95
- import {useUserStore} from '@/store/user.js';
96
- import SideMenu from './components/side-menu/side-menu.vue';
97
- import TagsNav from './components/tags-nav/tags-nav.vue';
98
- import User from './components/user/user.vue';
99
- import Fullscreen from './components/fullscreen/fullscreen.vue';
100
- import {Language} from 'yh-i18n';
101
-
102
- const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev : config.baseUrl.pro;
103
-
104
- const userStore = useUserStore();
105
- const appStore = useAppStore();
106
- const router = useRouter();
107
- const route = useRoute();
108
- const kpAliveRef = ref();
109
-
110
- const {menuList, errorCount, tagPaths} = storeToRefs(appStore);
111
- const {unreadCount} = storeToRefs(userStore);
112
-
113
- const hasCustomLogo = computed(() => {
114
- return !!config.logo;
115
- });
116
-
117
- const logo = computed(() => {
118
- return config.logo;
119
- });
120
-
121
- const minLogo = computed(() => {
122
- return config.minLogo;
123
- });
124
-
125
- const isIframe = computed(() => {
126
- return route.meta.isIframe;
127
- });
128
-
129
- const iframeList = ref([]);
130
- function pushIframe(url) {
131
- if (!iframeList.value.includes(url)) {
132
- iframeList.value.push(url);
133
- }
134
- }
135
- onBeforeRouteUpdate((to, form, next) => {
136
- if (to.meta.isIframe) {
137
- pushIframe(to.params.url);
138
- }
139
- next();
140
- });
141
- watch(
142
- () => tagPaths.value,
143
- (newVal, oldVal) => {
144
- let delPath = oldVal.filter((path) => !newVal.includes(path));
145
- delPath.forEach((path) => {
146
- iframeList.value = iframeList.value.filter((item) => item !== path);
147
- });
148
- }
149
- );
150
-
151
- const userName = ref('');
152
- const collapse = ref(false);
153
- const unReadMessageMap = ref({});
154
- const websocketPath = baseUrl.replace('http', 'ws') + '/webSocket';
155
- const isFullScreen = ref(false);
156
- let websocket = null;
157
-
158
- function handleCollapsedChange() {
159
- collapse.value = !collapse.value;
160
- }
161
-
162
- function initWebsocket() {
163
- let token = getToken();
164
- if (typeof WebSocket === 'undefined') {
165
- ElMessage.info('您的浏览器不支持WebSocket');
166
- } else if (token) {
167
- try {
168
- // 实例化websocket
169
- websocket = new WebSocket(websocketPath + '?$_TOKEN=' + token);
170
- // 监听websocket的连接
171
- websocket.onopen = () => {
172
- console.log('(' + websocketPath + ') websocket连接成功');
173
- };
174
- // 监听websocket的错误信息
175
- websocket.onerror = () => {
176
- console.log('(' + websocketPath + ') websocket连接错误');
177
- };
178
- // 监听websocket的消息
179
- websocket.onmessage = (msg) => {
180
- websocketGetMessage(msg);
181
- };
182
- // 监听websocket关闭
183
- websocket.onclose = () => {
184
- websocketClose();
185
- };
186
- } catch (e) {}
187
- }
188
- }
189
-
190
- function websocketGetMessage(msg) {
191
- let msgData = eval(msg.data);
192
- if (msgData && msgData.length > 0) {
193
- msgData.forEach((msg) => {
194
- if (!unReadMessageMap.value[msg.ID]) {
195
- unReadMessageMap.value[msg.ID] = msg;
196
- }
197
- });
198
- Object.keys(unReadMessageMap.value).forEach((key) => {
199
- let msg = unReadMessageMap.value[key];
200
- if (!msg.hasOwnProperty('show')) {
201
- ElNotification.open({
202
- title: msg.TITLE,
203
- desc: msg.TEXT,
204
- duration: 0,
205
- name: msg.ID,
206
- onClose: () => {
207
- delete unReadMessageMap.value[msg.ID];
208
- markRead(msg.ID);
209
- },
210
- });
211
- msg['show'] = true;
212
- }
213
- });
214
- }
215
- }
216
-
217
- function websocketSendMessage(msg) {
218
- websocket.send(msg);
219
- }
220
-
221
- function websocketClose() {
222
- let that = this;
223
- console.log('websocket关闭,尝试重新连接websocket');
224
- window.setTimeout(() => {
225
- that.initWebsocket();
226
- }, 1000);
227
- }
228
-
229
- onMounted(async () => {
230
- try {
231
- userName.value = getStorage('userName');
232
- if (route.meta.isIframe) {
233
- pushIframe(route.params.url);
234
- }
235
- } catch (error) {
236
- console.error('菜单加载异常:', error);
237
- }
238
- });
239
- onUnmounted(() => {
240
- ElNotification.closeAll();
241
- });
242
- </script>
243
-
244
- <style lang="scss">
245
- .main-container.is-iframe {
246
- padding: 0 !important;
247
- box-sizing: border-box;
248
- overflow: hidden;
249
- > iframe {
250
- width: 100%;
251
- height: 100%;
252
- }
253
- }
254
- </style>
@@ -1,64 +0,0 @@
1
- <template>
2
- <el-select
3
- :modelValue="modelValue"
4
- @change="handleChange">
5
- <el-option
6
- v-for="(item, i) in dictData"
7
- :key="i"
8
- :value="item.VALUE"
9
- :label="item.NAME"></el-option>
10
- </el-select>
11
- </template>
12
-
13
- <script>
14
- export default {
15
- name: "dict",
16
- props: {
17
- modelValue: "",
18
- dict: String,
19
- _select_id: String,
20
- url: {
21
- type: String,
22
- default() {
23
- return "/sysSelector/list";
24
- },
25
- },
26
- },
27
- data() {
28
- return {
29
- dictData: [],
30
- loading: false,
31
- };
32
- },
33
- emits: ["update:modelValue", "change"],
34
- methods: {
35
- getData(v) {
36
- this.loading = true;
37
- this.axios
38
- .post(
39
- this.url,
40
- this.$qs.stringify({
41
- id: this._select_id,
42
- })
43
- )
44
- .then((response) => {
45
- this.loading = false;
46
- if (response.data.result) {
47
- this.dictData = response.data.data;
48
- }
49
- });
50
- },
51
- handleChange(v) {
52
- this.$emit("update:modelValue", v);
53
- },
54
- },
55
- watch: {
56
- dict(val) {
57
- this.getData(val);
58
- },
59
- },
60
- mounted() {
61
- this.getData(this.dict);
62
- },
63
- };
64
- </script>