@gonsin/gview 1.0.1-alpha.1 → 1.0.2-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 (71) hide show
  1. package/dist/fonts/element-icons.313f7dac.woff +0 -0
  2. package/dist/fonts/element-icons.45201881.ttf +0 -0
  3. package/dist/index.js +335 -0
  4. package/package.json +8 -2
  5. package/.browserslistrc +0 -2
  6. package/babel.config.js +0 -6
  7. package/postcss.config.js +0 -5
  8. package/public/css/theme/animate.min.css +0 -7
  9. package/public/css/theme/brownishTheme.css +0 -10
  10. package/public/css/theme/coffeeTheme.css +0 -10
  11. package/public/css/theme/cyanTheme.css +0 -10
  12. package/public/css/theme/defaultTheme.css +0 -10
  13. package/public/css/theme/greenTheme.css +0 -16
  14. package/public/css/theme/greyTheme.css +0 -10
  15. package/public/css/theme/orangeTheme.css +0 -10
  16. package/public/css/theme/purpleTheme.css +0 -10
  17. package/public/css/theme/skyblueTheme.css +0 -10
  18. package/public/favicon.ico +0 -0
  19. package/public/imgs/antOutline-border.png +0 -0
  20. package/public/imgs/bg.png +0 -0
  21. package/public/imgs/logo.png +0 -0
  22. package/public/imgs/menu.png +0 -0
  23. package/public/index.html +0 -17
  24. package/src/App.vue +0 -143
  25. package/src/api/api.js +0 -28
  26. package/src/api/index.js +0 -31
  27. package/src/api/request.js +0 -210
  28. package/src/assets/font/font.scss +0 -12
  29. package/src/assets/font/font_dev.scss +0 -12
  30. package/src/assets/font/icon.scss +0 -179
  31. package/src/assets/images/svg/color.svg +0 -1
  32. package/src/assets/logo.png +0 -0
  33. package/src/assets/scss/common.scss +0 -338
  34. package/src/assets/scss/themeColor.scss +0 -35
  35. package/src/components/MyDialog.vue +0 -251
  36. package/src/components/MyForm.vue +0 -324
  37. package/src/components/MyFormAutocomplete.vue +0 -135
  38. package/src/components/MyFormCascader.vue +0 -107
  39. package/src/components/MyFormCheckBox.vue +0 -67
  40. package/src/components/MyFormEditor.vue +0 -85
  41. package/src/components/MyFormInput.vue +0 -68
  42. package/src/components/MyFormLine.vue +0 -49
  43. package/src/components/MyFormRadio.vue +0 -92
  44. package/src/components/MyFormSelect.vue +0 -122
  45. package/src/components/MyFormSelectDate.vue +0 -72
  46. package/src/components/MyFormSelectDateTime.vue +0 -82
  47. package/src/components/MyFormSelectTime.vue +0 -84
  48. package/src/components/MyFormSwitch.vue +0 -60
  49. package/src/components/MyFormTag.vue +0 -67
  50. package/src/components/MyFormTree.vue +0 -137
  51. package/src/components/MyFormUploads.vue +0 -91
  52. package/src/components/MyHeader.vue +0 -176
  53. package/src/components/MyMenus.vue +0 -150
  54. package/src/components/MyPageHeader.vue +0 -344
  55. package/src/components/MyTab.vue +0 -69
  56. package/src/components/MyTable.vue +0 -245
  57. package/src/components/Templatess.vue +0 -630
  58. package/src/index.js +0 -23
  59. package/src/main.js +0 -86
  60. package/src/router.js +0 -52
  61. package/src/store/index.js +0 -71
  62. package/src/utils/common.js +0 -96
  63. package/src/utils/permission.js +0 -36
  64. package/src/views/GView.vue +0 -185
  65. package/src/views/Home.vue +0 -26
  66. package/src/views/Login.vue +0 -249
  67. package/src/websocket/test.js +0 -140
  68. package/src/websocket/websocket.js +0 -141
  69. package/src/websocket/websocket1.js +0 -117
  70. package/src/websocket/websocket2.js +0 -128
  71. package/vue.config.js +0 -50
@@ -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,50 +0,0 @@
1
- /*
2
- * @Author: your name
3
- * @Date: 2020-06-30 18:26:00
4
- * @LastEditTime: 2022-12-01 10:49:56
5
- * @LastEditors: lrm lrm@gonsin.cn
6
- * @Description: In User Settings Edit
7
- * @FilePath: \client\vue.config.js
8
- */
9
- const path = require('path')
10
-
11
- module.exports = {
12
- lintOnSave: false,
13
- // assetsDir: 'static', // 配置js、css静态资源二级目录的位置
14
- // publicPath:'./',
15
- productionSourceMap: false, // 生产环境不生成.map文件
16
- devServer:{
17
- port:8085, //端口
18
- // open:false, //编译完成后是否自动打开浏览器
19
- proxy:{ // 本地环境代理
20
- '/api':{
21
- target:'http://192.168.2.192:8088',
22
- // target:'http://192.168.2.153:8088',
23
- // target:'http://192.168.2.194:8888',
24
- // target:'http://192.168.2.162:8088'
25
- changeOrigin:true,
26
- disableHostCheck: false, // 新增该配置项
27
- // pathRewrite:{
28
- // '/api':''
29
- // }
30
- },
31
- '/restapi':{
32
- target:'http://192.168.2.192:8088',
33
- // target:'http://192.168.2.153:8088',
34
- // target:'http://192.168.2.194:8888',
35
- // target:'http://192.168.2.162:8088',
36
- changeOrigin:true,
37
- disableHostCheck: false, // 新增该配置项
38
- // pathRewrite:{
39
- // '/api':''
40
- // }
41
- }
42
- }
43
- },
44
- configureWebpack: config => {
45
- if (process.env.NODE_ENV === 'production') {
46
- config.entry = ['./src/index.js']
47
-
48
- }
49
- }
50
- }