@gonsin/gview 1.0.1-alpha.0

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 (69) hide show
  1. package/.browserslistrc +2 -0
  2. package/README.md +26 -0
  3. package/babel.config.js +5 -0
  4. package/package.json +29 -0
  5. package/postcss.config.js +5 -0
  6. package/public/css/theme/animate.min.css +7 -0
  7. package/public/css/theme/brownishTheme.css +10 -0
  8. package/public/css/theme/coffeeTheme.css +10 -0
  9. package/public/css/theme/cyanTheme.css +10 -0
  10. package/public/css/theme/defaultTheme.css +10 -0
  11. package/public/css/theme/greenTheme.css +16 -0
  12. package/public/css/theme/greyTheme.css +10 -0
  13. package/public/css/theme/orangeTheme.css +10 -0
  14. package/public/css/theme/purpleTheme.css +10 -0
  15. package/public/css/theme/skyblueTheme.css +10 -0
  16. package/public/favicon.ico +0 -0
  17. package/public/imgs/antOutline-border.png +0 -0
  18. package/public/imgs/bg.png +0 -0
  19. package/public/imgs/logo.png +0 -0
  20. package/public/imgs/menu.png +0 -0
  21. package/public/index.html +17 -0
  22. package/src/App.vue +143 -0
  23. package/src/api/api.js +28 -0
  24. package/src/api/index.js +31 -0
  25. package/src/api/request.js +210 -0
  26. package/src/assets/font/font.scss +12 -0
  27. package/src/assets/font/font_dev.scss +12 -0
  28. package/src/assets/font/icon.scss +179 -0
  29. package/src/assets/images/svg/color.svg +1 -0
  30. package/src/assets/logo.png +0 -0
  31. package/src/assets/scss/common.scss +338 -0
  32. package/src/assets/scss/themeColor.scss +35 -0
  33. package/src/components/MyDialog.vue +251 -0
  34. package/src/components/MyForm.vue +324 -0
  35. package/src/components/MyFormAutocomplete.vue +135 -0
  36. package/src/components/MyFormCascader.vue +107 -0
  37. package/src/components/MyFormCheckBox.vue +67 -0
  38. package/src/components/MyFormEditor.vue +85 -0
  39. package/src/components/MyFormInput.vue +68 -0
  40. package/src/components/MyFormLine.vue +49 -0
  41. package/src/components/MyFormRadio.vue +92 -0
  42. package/src/components/MyFormSelect.vue +122 -0
  43. package/src/components/MyFormSelectDate.vue +72 -0
  44. package/src/components/MyFormSelectDateTime.vue +82 -0
  45. package/src/components/MyFormSelectTime.vue +84 -0
  46. package/src/components/MyFormSwitch.vue +60 -0
  47. package/src/components/MyFormTag.vue +67 -0
  48. package/src/components/MyFormTree.vue +137 -0
  49. package/src/components/MyFormUploads.vue +91 -0
  50. package/src/components/MyHeader.vue +176 -0
  51. package/src/components/MyMenus.vue +150 -0
  52. package/src/components/MyPageHeader.vue +344 -0
  53. package/src/components/MyTab.vue +69 -0
  54. package/src/components/MyTable.vue +245 -0
  55. package/src/components/Templatess.vue +630 -0
  56. package/src/index.js +23 -0
  57. package/src/main.js +86 -0
  58. package/src/router.js +52 -0
  59. package/src/store/index.js +71 -0
  60. package/src/utils/common.js +96 -0
  61. package/src/utils/permission.js +36 -0
  62. package/src/views/GView.vue +185 -0
  63. package/src/views/Home.vue +26 -0
  64. package/src/views/Login.vue +249 -0
  65. package/src/websocket/test.js +140 -0
  66. package/src/websocket/websocket.js +141 -0
  67. package/src/websocket/websocket1.js +117 -0
  68. package/src/websocket/websocket2.js +128 -0
  69. package/vue.config.js +42 -0
@@ -0,0 +1,210 @@
1
+ /*
2
+ * @Author: your name
3
+ * @Date: 2022-04-25 09:23:44
4
+ * @LastEditTime: 2022-11-07 17:34:19
5
+ * @LastEditors: lrm lrm@gonsin.cn
6
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
7
+ * @FilePath: \client\src\api\request.js
8
+ */
9
+ import axios from 'axios'
10
+ // 在此可判断当前是什么环境 开发环境、生产环境
11
+ // const isDev = process.env.NODE_ENV;
12
+ // 基础配置
13
+ const ins = axios.create({
14
+ // 根路径 根据上方判断的环境 切换不能请求根地址
15
+ // baseURL: isDev ? 'http://192.168.2.192:8080' : 'http://192.168.2.192:8080',
16
+ // 设置请求超时的时长
17
+ timeout: 6000
18
+ })
19
+
20
+ // 请求拦截
21
+ ins.interceptors.request.use((config) => {
22
+ // 在请求头中设置新属性token,参数为我们的token ,实现每次请求都会在请求头中携带token
23
+ // config.headers.common.token = localStorage.getItem('token') || ''
24
+ return config
25
+ }, error => {
26
+ return Promise.reject(error)
27
+ })
28
+
29
+ // 响应拦截
30
+ ins.interceptors.response.use(response => {
31
+ // 根据后端返回的数据,错误时的统一操作
32
+ // if (response.data.code === '10119') {
33
+ // window.location.href = window.location.href.split('#')[0] + '#' + '/login'
34
+ // window.location.reload()
35
+ // }
36
+ // // console.log(response)
37
+ // if(response.status != 200){
38
+ // console.log('status非200')
39
+ // }else{
40
+ // return response
41
+ // }
42
+ if (response.data.state === 200) {
43
+ if (!sessionStorage.getItem('isTimeout')) {
44
+ sessionStorage.setItem('isTimeout', false)
45
+ }
46
+ } else
47
+ if (response.data.state === 302 && context.prototype.router.currentRoute.path !== '/login') {
48
+ // messageOnce.warning({
49
+ // message: '操作超时',
50
+ // type: 'warning'
51
+ // })
52
+ sessionStorage.removeItem('isTimeout')
53
+ context.prototype.router.push({ path: '/login' })
54
+ }
55
+ return response
56
+
57
+ }, error => {
58
+ return Promise.reject(error)
59
+ })
60
+
61
+
62
+
63
+ // 根据请求方式,发起请求的参数形式不同,使用以下函数配置好后,后续在页面中调用此函数进行请求,将请求方式,地址,数据等当做参数的形式传入。这样使我们的请求结构清晰统一格式。例如:
64
+ // import request from '../utils/request'
65
+ //export function getAdminList(params) {
66
+ //return request({
67
+ //url: '/admin/list',
68
+ //data:params,
69
+ //method: 'GET'
70
+ //})
71
+ //}
72
+ function uuid(len, radix) {
73
+ var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
74
+ var uuid = [],
75
+ i;
76
+ radix = radix || chars.length;
77
+
78
+ if (len) {
79
+ // Compact form
80
+ for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
81
+ } else {
82
+ // rfc4122, version 4 form
83
+ var r;
84
+
85
+ // rfc4122 requires these characters
86
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
87
+ uuid[14] = '4';
88
+
89
+ // Fill in random data. At i==19 set the high bits of clock sequence as
90
+ // per rfc4122, sec. 4.1.5
91
+ for (i = 0; i < 36; i++) {
92
+ if (!uuid[i]) {
93
+ r = 0 | Math.random() * 16;
94
+ uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
95
+ }
96
+ }
97
+ }
98
+
99
+ return uuid.join('');
100
+ }
101
+ export const login = (config)=> {
102
+ let {
103
+ url,
104
+ data,
105
+ method,
106
+ headers,
107
+ } = config
108
+ url = url || ''
109
+ data = data || {}
110
+ method = method || 'GET'
111
+ if(typeof sessionStorage.getItem('sessionId') == 'undefined'){
112
+ let sessionId = uuid(16,66);
113
+ sessionStorage.setItem('sessionId',sessionId)
114
+ url = url+ '?sessionId=RYNJ0NnJeSzOw41bFxyx1tdgoYJ5l2ve';//sessionId;
115
+ }else{
116
+ url = url+ '?sessionId=RYNJ0NnJeSzOw41bFxyx1tdgoYJ5l2ve';//sessionStorage.getItem('sessionId');
117
+ }
118
+ // restful api GET / POST /PUT/PATCH/DELETE
119
+ switch (method.toUpperCase()) {
120
+ case 'GET':
121
+ return ins.get(url, {
122
+ params: data
123
+ })
124
+ case 'POST':
125
+ // 表单提交 application/x-www-form-url-encoded
126
+ const p = new URLSearchParams()
127
+ for (let key in data) {
128
+ p.append(key, data[key])
129
+ }
130
+ return ins.post(url, p, {
131
+ headers
132
+ })
133
+
134
+ // 默认 application/json
135
+ // return ins.post(url, data)
136
+ case 'PUT': // 全部更新
137
+ return ins.put(url, data)
138
+ case 'PATCH': // 局部更新
139
+ return ins.patch(url, data)
140
+ case 'DELETE': // 删除
141
+ return ins.delete(url, {
142
+ data
143
+ })
144
+ default:
145
+ return ins(config)
146
+ }
147
+ }
148
+ export const requests = (config)=> {
149
+ let {
150
+ url,
151
+ data,
152
+ method,
153
+ headers,
154
+ type
155
+ } = config
156
+ url = url || ''
157
+ data = data || {}
158
+ method = method || 'GET'
159
+ type = type || ''
160
+ if(typeof sessionStorage.getItem('sessionId') == 'undefined'){
161
+ let sessionId = uuid(16,66);
162
+ sessionStorage.setItem('sessionId',sessionId)
163
+ url = url+ '?sessionId=RYNJ0NnJeSzOw41bFxyx1tdgoYJ5l2ve';//sessionId;
164
+ }else{
165
+ url = url+ '?sessionId=RYNJ0NnJeSzOw41bFxyx1tdgoYJ5l2ve';//sessionStorage.getItem('sessionId');
166
+ }
167
+ // restful api GET / POST /PUT/PATCH/DELETE
168
+ switch (method.toUpperCase()) {
169
+ case 'GET':
170
+ return ins.get(url, {
171
+ params: data
172
+ })
173
+ case 'POST':
174
+ // 表单提交 application/x-www-form-url-encoded
175
+ if (type==1 && headers['Content-type'] === 'application/x-www-form-url-encoded') {
176
+ // 转参数 URLSearchParams/第三方库qs
177
+ const p = new URLSearchParams()
178
+ for (let key in data) {
179
+ p.append(key, data[key])
180
+ }
181
+ return ins.post(url, p, {
182
+ headers
183
+ })
184
+ }
185
+ // 文件提交 multipart/form-data
186
+ if (type==1 && headers['Content-type'] === 'multipart/form-data') {
187
+ const p = new FormData()
188
+ for (let key in data) {
189
+ p.append(key, data[key])
190
+ }
191
+ return ins.post(url, p, {
192
+ headers
193
+ })
194
+ }
195
+ // 默认 application/json
196
+ return ins.post(url, data)
197
+ case 'PUT': // 全部更新
198
+ return ins.put(url, data)
199
+ case 'PATCH': // 局部更新
200
+ return ins.patch(url, data)
201
+ case 'DELETE': // 删除
202
+ return ins.delete(url, {
203
+ data
204
+ })
205
+ default:
206
+ return ins(config)
207
+ }
208
+ }
209
+
210
+ // export default request
@@ -0,0 +1,12 @@
1
+ @font-face {
2
+ font-family: 'PingFangSCRegular';
3
+ src: url('/thirdpart/fonts/PingFangRegular.otf');
4
+ }
5
+ @font-face {
6
+ font-family: 'PingFangHeavy';
7
+ src: url('/thirdpart/fonts/PingFangHeavy.otf');
8
+ }
9
+ @font-face {
10
+ font-family: "PingFangBold";
11
+ src: url('/thirdpart/fonts/PingFangBold.otf');
12
+ }
@@ -0,0 +1,12 @@
1
+ @font-face {
2
+ font-family: 'PingFangSCRegular';
3
+ src: url('http://dev.gonsincloud.com:80/thirdpart/fonts/PingFangRegular.otf');
4
+ }
5
+ @font-face {
6
+ font-family: 'PingFangHeavy';
7
+ src: url('http://dev.gonsincloud.com:80/thirdpart/fonts/PingFangHeavy.otf');
8
+ }
9
+ @font-face {
10
+ font-family: "PingFangBold";
11
+ src: url('http://dev.gonsincloud.com:80/thirdpart/fonts/PingFangBold.otf');
12
+ }
@@ -0,0 +1,179 @@
1
+ @font-face {
2
+ font-family: "iconfont"; /* Project id 2068109 */
3
+ src: url('//at.alicdn.com/t/font_2068109_o6yge2iv0lk.woff2?t=1638436872993') format('woff2'),
4
+ url('//at.alicdn.com/t/font_2068109_o6yge2iv0lk.woff?t=1638436872993') format('woff'),
5
+ url('//at.alicdn.com/t/font_2068109_o6yge2iv0lk.ttf?t=1638436872993') format('truetype');
6
+ }
7
+
8
+ .iconfont {
9
+ font-family: "iconfont" !important;
10
+ font-size: 16px;
11
+ font-style: normal;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ .icon-colorSelector:before {
17
+ content: "\e63c";
18
+ }
19
+
20
+ .icon-a-zu2006:before {
21
+ content: "\e601";
22
+ }
23
+
24
+ .icon-a-zu1409:before {
25
+ content: "\e602";
26
+ }
27
+
28
+ .icon-a-zu20231:before {
29
+ content: "\e603";
30
+ }
31
+
32
+ .icon-sort-asc:before {
33
+ content: "\e605";
34
+ }
35
+
36
+ .icon-a-zu2024:before {
37
+ content: "\e606";
38
+ }
39
+
40
+ .icon-a-zu1961:before {
41
+ content: "\e609";
42
+ }
43
+
44
+ .icon-a-zu1341:before {
45
+ content: "\e60a";
46
+ }
47
+
48
+ .icon-xiaoxizhuangtai-fasongshibai:before {
49
+ content: "\e608";
50
+ }
51
+
52
+ .icon-fasongshibai:before {
53
+ content: "\e61a";
54
+ }
55
+
56
+ .icon-fasongshibai1:before {
57
+ content: "\e604";
58
+ }
59
+
60
+ .icon-benyue1:before {
61
+ content: "\e600";
62
+ }
63
+
64
+ .icon-xiaoshoutongji-benyuexiaoshou:before {
65
+ content: "\e60d";
66
+ }
67
+
68
+ .icon-benyueshengrihuiyuan:before {
69
+ content: "\e6bb";
70
+ }
71
+
72
+ .icon-benzhoushengrihuiyuan:before {
73
+ content: "\e6bc";
74
+ }
75
+
76
+ .icon-zongji:before {
77
+ content: "\e616";
78
+ }
79
+
80
+ .icon-benzhou:before {
81
+ content: "\e658";
82
+ }
83
+
84
+ .icon-zongji1:before {
85
+ content: "\e626";
86
+ }
87
+
88
+ .icon-duanxin:before {
89
+ content: "\e647";
90
+ }
91
+
92
+ .icon-duanxin1:before {
93
+ content: "\e62d";
94
+ }
95
+
96
+ .icon-gongzhonghao:before {
97
+ content: "\e63e";
98
+ }
99
+
100
+ .icon-weixin:before {
101
+ content: "\e64f";
102
+ }
103
+
104
+ .icon-dingdan:before {
105
+ content: "\e635";
106
+ }
107
+
108
+ .icon-dingdan1:before {
109
+ content: "\e607";
110
+ }
111
+
112
+ .icon-zuyong:before {
113
+ content: "\e6ae";
114
+ }
115
+
116
+ .icon-duanxin2:before {
117
+ content: "\e6e7";
118
+ }
119
+
120
+ .icon-menjin:before {
121
+ content: "\e62e";
122
+ }
123
+
124
+ .icon-menjin-guan:before {
125
+ content: "\e63f";
126
+ }
127
+
128
+ .icon-huiyiguanli01:before {
129
+ content: "\e617";
130
+ }
131
+
132
+ .icon-xinxifabu:before {
133
+ content: "\e60c";
134
+ }
135
+
136
+ .icon-accountnum:before {
137
+ content: "\e666";
138
+ }
139
+
140
+ .icon-zhanghaoguanli:before {
141
+ content: "\e61c";
142
+ }
143
+
144
+ .icon-shebeiguanli:before {
145
+ content: "\ebb7";
146
+ }
147
+
148
+ .icon-rizhiguanli:before {
149
+ content: "\e65e";
150
+ }
151
+
152
+ .icon-shejiaodingding:before {
153
+ content: "\e677";
154
+ }
155
+
156
+ .icon-qiyeguanli_yuangongguanli:before {
157
+ content: "\e62c";
158
+ }
159
+
160
+ .icon-fenzuguanli:before {
161
+ content: "\ec23";
162
+ }
163
+
164
+ .icon-zhanghaoguanli1:before {
165
+ content: "\e71b";
166
+ }
167
+
168
+ .icon-rizhiguanli1:before {
169
+ content: "\e61d";
170
+ }
171
+
172
+ .icon-qiyeguanli:before {
173
+ content: "\e629";
174
+ }
175
+
176
+ .icon-rizhiguanli2:before {
177
+ content: "\e690";
178
+ }
179
+
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1638437312215" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7627" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M480.67 959.56L99.94 578.83 480.67 198.1 861.4 578.83 480.67 959.56z m279.2-380.73l-279.2-279.2-279.2 279.2 279.2 279.2 279.2-279.2z" p-id="7628" fill="#ffffff"></path><path d="M211.45 524.98h495.2l94.52 51.28-333.32 307.68-307.68-307.68zM349.504 63.865l193.731 193.731-50.762 50.763L298.74 114.628z" p-id="7629" fill="#ffffff"></path><path d="M857.57 812.15m-71.79 0a71.79 71.79 0 1 0 143.58 0 71.79 71.79 0 1 0-143.58 0Z" p-id="7630" fill="#ffffff"></path><path d="M795.97 775.95l61.1-95.67 61.09 91.65" p-id="7631" fill="#ffffff"></path></svg>
Binary file