@gonsin/gview 1.0.1 → 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 (73) hide show
  1. package/README.md +66 -13
  2. package/dist/fonts/element-icons.313f7dac.woff +0 -0
  3. package/dist/fonts/element-icons.45201881.ttf +0 -0
  4. package/dist/index.js +335 -0
  5. package/package.json +6 -2
  6. package/.browserslistrc +0 -2
  7. package/babel.config.js +0 -5
  8. package/gonsin-gview-1.0.1.tgz +0 -0
  9. package/postcss.config.js +0 -5
  10. package/public/css/theme/animate.min.css +0 -7
  11. package/public/css/theme/brownishTheme.css +0 -10
  12. package/public/css/theme/coffeeTheme.css +0 -10
  13. package/public/css/theme/cyanTheme.css +0 -10
  14. package/public/css/theme/defaultTheme.css +0 -10
  15. package/public/css/theme/greenTheme.css +0 -16
  16. package/public/css/theme/greyTheme.css +0 -10
  17. package/public/css/theme/orangeTheme.css +0 -10
  18. package/public/css/theme/purpleTheme.css +0 -10
  19. package/public/css/theme/skyblueTheme.css +0 -10
  20. package/public/favicon.ico +0 -0
  21. package/public/imgs/antOutline-border.png +0 -0
  22. package/public/imgs/bg.png +0 -0
  23. package/public/imgs/logo.png +0 -0
  24. package/public/imgs/menu.png +0 -0
  25. package/public/index.html +0 -17
  26. package/src/App.vue +0 -143
  27. package/src/api/api.js +0 -28
  28. package/src/api/index.js +0 -31
  29. package/src/api/request.js +0 -210
  30. package/src/assets/font/font.scss +0 -12
  31. package/src/assets/font/font_dev.scss +0 -12
  32. package/src/assets/font/icon.scss +0 -179
  33. package/src/assets/images/svg/color.svg +0 -1
  34. package/src/assets/logo.png +0 -0
  35. package/src/assets/scss/common.scss +0 -338
  36. package/src/assets/scss/themeColor.scss +0 -35
  37. package/src/components/MyDialog.vue +0 -251
  38. package/src/components/MyForm.vue +0 -324
  39. package/src/components/MyFormAutocomplete.vue +0 -135
  40. package/src/components/MyFormCascader.vue +0 -107
  41. package/src/components/MyFormCheckBox.vue +0 -67
  42. package/src/components/MyFormEditor.vue +0 -85
  43. package/src/components/MyFormInput.vue +0 -68
  44. package/src/components/MyFormLine.vue +0 -49
  45. package/src/components/MyFormRadio.vue +0 -92
  46. package/src/components/MyFormSelect.vue +0 -122
  47. package/src/components/MyFormSelectDate.vue +0 -72
  48. package/src/components/MyFormSelectDateTime.vue +0 -82
  49. package/src/components/MyFormSelectTime.vue +0 -84
  50. package/src/components/MyFormSwitch.vue +0 -60
  51. package/src/components/MyFormTag.vue +0 -67
  52. package/src/components/MyFormTree.vue +0 -137
  53. package/src/components/MyFormUploads.vue +0 -91
  54. package/src/components/MyHeader.vue +0 -176
  55. package/src/components/MyMenus.vue +0 -150
  56. package/src/components/MyPageHeader.vue +0 -344
  57. package/src/components/MyTab.vue +0 -69
  58. package/src/components/MyTable.vue +0 -244
  59. package/src/components/Templatess.vue +0 -630
  60. package/src/index.js +0 -23
  61. package/src/main.js +0 -86
  62. package/src/router.js +0 -52
  63. package/src/store/index.js +0 -71
  64. package/src/utils/common.js +0 -96
  65. package/src/utils/permission.js +0 -36
  66. package/src/views/GView.vue +0 -185
  67. package/src/views/Home.vue +0 -26
  68. package/src/views/Login.vue +0 -249
  69. package/src/websocket/test.js +0 -140
  70. package/src/websocket/websocket.js +0 -141
  71. package/src/websocket/websocket1.js +0 -117
  72. package/src/websocket/websocket2.js +0 -128
  73. package/vue.config.js +0 -42
@@ -1,128 +0,0 @@
1
- /*
2
- * @Author: lzx lzx@gonsin.cn
3
- * @Date: 2022-06-27 13:55:43
4
- * @LastEditors: lzx lzx@gonsin.cn
5
- * @LastEditTime: 2022-06-28 14:03:34
6
- * @FilePath: \client\src\websocket\websocket.js
7
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
- */
9
- import { mapActions } from "vuex";
10
-
11
- export const data = {
12
- //websocket
13
- ip: process.env.NODE_ENV !== 'development' ? window.location.origin.replace(window.location.protocol, pre) + '/gview/websocket' : "http://192.168.2.192:8089/gview/websocket".replace('http', 'ws'),
14
- webSocket: null,
15
- lockReconnect: false,
16
- tt: false,
17
- sendParams: {
18
- head: "gonsin",
19
- cmd: {
20
- cmd: "client",
21
- subcmd: "heart",
22
- respone: 0,
23
- },
24
- args: {},
25
- },
26
- // 心跳发送指令,超过40s未发送则断开连接
27
- //心跳检测
28
- heartCheck: null,
29
- timeoutObj: null,
30
- serverTimeoutObj: null,
31
- }
32
- export const initWebSocket =()=> {
33
- try {
34
- if (typeof WebSocket === "undefined") {
35
- alert("您的浏览器不支持WebSocket,请尽快升级");
36
- } else {
37
- console.log(data.ip)
38
- data.webSocket = new WebSocket(data.ip);
39
- init(); // 封装有websocket监听方法
40
- }
41
- } catch (error) {
42
- console.log(error);
43
- }
44
- }
45
- export const init =()=> {
46
-
47
- data.webSocket.onopen = () => {
48
- // this.$notify.success('Websocket successfully connected')
49
- console.log("webSocket连接成功至:" + data.ip);
50
- clearInterval(data.timeoutObj);
51
- clearTimeout(data.serverTimeoutObj);
52
- let model = {
53
- head: "gonsin",
54
- cmd: {
55
- cmd: "client",
56
- subcmd: "heart",
57
- respone: 0,
58
- },
59
- args: {},
60
- };
61
- data.timeoutObj = setInterval(function () {
62
- //这里发送一个心跳,后端收到后,返回一个心跳消息,
63
- //onmessage拿到返回的心跳就说明连接正常
64
- data.webSocket.send(JSON.stringify(model));
65
- }, 40000);
66
- // // 连接成功,注册dataId
67
- // that.registerMessage();
68
- };
69
- data.webSocket.onmessage = (msg) => {
70
- console.log("onmessage....................");
71
- // console.log('on_message:',msg);
72
- let data = JSON.parse(msg.data);
73
-
74
- };
75
- data.webSocket.onerror = () => {
76
- console.log("websocket连接错误...");
77
- };
78
- data.webSocket.onclose = () => {
79
- console.log("websocket断开连接...");
80
- };
81
- }
82
- /**
83
- * 注册站内信指令
84
- */
85
- export const registerMessage=(dataId, fun)=> {
86
- console.log(this.$store)
87
- let params = {
88
- head: "gonsin",
89
- cmd: {
90
- cmd: "gview_client",
91
- subcmd: "register",
92
- },
93
- args: {
94
- dataId: dataId,
95
- },
96
- };
97
- // data.webSocket.send(JSON.stringify(params));
98
- // this.$store.dispatch('setUpdateFunction', dataId,fun);
99
- }
100
- /**
101
- * 注销站内信指令
102
- */
103
- export const unregisterMessage =(dataId)=> {
104
- let params = {
105
- head: "gonsin",
106
- cmd: {
107
- cmd: "gview_client",
108
- subcmd: "unregister",
109
- },
110
- args: {
111
- dataId: dataId,
112
- },
113
- };
114
- data.webSocket.send(JSON.stringify(params));
115
- }
116
- /**
117
- * 处理站内消息回调
118
- */
119
- export const handleMessageCallback =(data)=> {
120
- console.log(data);
121
- console.log("处理站内消息................");
122
- this.$notify({
123
- title: data.args.message,
124
- message: data.args.message,
125
- type: "success",
126
- offset: 100,
127
- });
128
- }
package/vue.config.js DELETED
@@ -1,42 +0,0 @@
1
- /*
2
- * @Author: your name
3
- * @Date: 2020-06-30 18:26:00
4
- * @LastEditTime: 2022-11-28 14:30:14
5
- * @LastEditors: lrm lrm@gonsin.cn
6
- * @Description: In User Settings Edit
7
- * @FilePath: \client\vue.config.js
8
- */
9
- module.exports = {
10
- lintOnSave: false,
11
- // assetsDir: 'static', // 配置js、css静态资源二级目录的位置
12
- // publicPath:'./',
13
- productionSourceMap: false, // 生产环境不生成.map文件
14
- devServer:{
15
- port:8085, //端口
16
- // open:false, //编译完成后是否自动打开浏览器
17
- proxy:{ // 本地环境代理
18
- '/api':{
19
- target:'http://192.168.2.192:8088',
20
- // target:'http://192.168.2.153:8088',
21
- // target:'http://192.168.2.194:8888',
22
- // target:'http://192.168.2.162:8088'
23
- changeOrigin:true,
24
- disableHostCheck: false, // 新增该配置项
25
- // pathRewrite:{
26
- // '/api':''
27
- // }
28
- },
29
- '/restapi':{
30
- target:'http://192.168.2.192:8088',
31
- // target:'http://192.168.2.153:8088',
32
- // target:'http://192.168.2.194:8888',
33
- // target:'http://192.168.2.162:8088',
34
- changeOrigin:true,
35
- disableHostCheck: false, // 新增该配置项
36
- // pathRewrite:{
37
- // '/api':''
38
- // }
39
- }
40
- }
41
- },
42
- }