@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.
- package/dist/fonts/element-icons.313f7dac.woff +0 -0
- package/dist/fonts/element-icons.45201881.ttf +0 -0
- package/dist/index.js +335 -0
- package/package.json +8 -2
- package/.browserslistrc +0 -2
- package/babel.config.js +0 -6
- package/postcss.config.js +0 -5
- package/public/css/theme/animate.min.css +0 -7
- package/public/css/theme/brownishTheme.css +0 -10
- package/public/css/theme/coffeeTheme.css +0 -10
- package/public/css/theme/cyanTheme.css +0 -10
- package/public/css/theme/defaultTheme.css +0 -10
- package/public/css/theme/greenTheme.css +0 -16
- package/public/css/theme/greyTheme.css +0 -10
- package/public/css/theme/orangeTheme.css +0 -10
- package/public/css/theme/purpleTheme.css +0 -10
- package/public/css/theme/skyblueTheme.css +0 -10
- package/public/favicon.ico +0 -0
- package/public/imgs/antOutline-border.png +0 -0
- package/public/imgs/bg.png +0 -0
- package/public/imgs/logo.png +0 -0
- package/public/imgs/menu.png +0 -0
- package/public/index.html +0 -17
- package/src/App.vue +0 -143
- package/src/api/api.js +0 -28
- package/src/api/index.js +0 -31
- package/src/api/request.js +0 -210
- package/src/assets/font/font.scss +0 -12
- package/src/assets/font/font_dev.scss +0 -12
- package/src/assets/font/icon.scss +0 -179
- package/src/assets/images/svg/color.svg +0 -1
- package/src/assets/logo.png +0 -0
- package/src/assets/scss/common.scss +0 -338
- package/src/assets/scss/themeColor.scss +0 -35
- package/src/components/MyDialog.vue +0 -251
- package/src/components/MyForm.vue +0 -324
- package/src/components/MyFormAutocomplete.vue +0 -135
- package/src/components/MyFormCascader.vue +0 -107
- package/src/components/MyFormCheckBox.vue +0 -67
- package/src/components/MyFormEditor.vue +0 -85
- package/src/components/MyFormInput.vue +0 -68
- package/src/components/MyFormLine.vue +0 -49
- package/src/components/MyFormRadio.vue +0 -92
- package/src/components/MyFormSelect.vue +0 -122
- package/src/components/MyFormSelectDate.vue +0 -72
- package/src/components/MyFormSelectDateTime.vue +0 -82
- package/src/components/MyFormSelectTime.vue +0 -84
- package/src/components/MyFormSwitch.vue +0 -60
- package/src/components/MyFormTag.vue +0 -67
- package/src/components/MyFormTree.vue +0 -137
- package/src/components/MyFormUploads.vue +0 -91
- package/src/components/MyHeader.vue +0 -176
- package/src/components/MyMenus.vue +0 -150
- package/src/components/MyPageHeader.vue +0 -344
- package/src/components/MyTab.vue +0 -69
- package/src/components/MyTable.vue +0 -245
- package/src/components/Templatess.vue +0 -630
- package/src/index.js +0 -23
- package/src/main.js +0 -86
- package/src/router.js +0 -52
- package/src/store/index.js +0 -71
- package/src/utils/common.js +0 -96
- package/src/utils/permission.js +0 -36
- package/src/views/GView.vue +0 -185
- package/src/views/Home.vue +0 -26
- package/src/views/Login.vue +0 -249
- package/src/websocket/test.js +0 -140
- package/src/websocket/websocket.js +0 -141
- package/src/websocket/websocket1.js +0 -117
- package/src/websocket/websocket2.js +0 -128
- package/vue.config.js +0 -50
package/src/main.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-22 09:02:09
|
|
4
|
-
* @LastEditTime: 2022-09-22 09:47:21
|
|
5
|
-
* @LastEditors: lzx lzx@gonsin.cn
|
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
-
* @FilePath: \gview\src\main.js
|
|
8
|
-
*/
|
|
9
|
-
import Vue from 'vue'
|
|
10
|
-
import App from './App.vue'
|
|
11
|
-
import router from './router'
|
|
12
|
-
import store from './store'
|
|
13
|
-
import ElementUI from 'element-ui';
|
|
14
|
-
import 'element-ui/lib/theme-chalk/index.css';
|
|
15
|
-
import * as Api from './api/index'
|
|
16
|
-
Vue.use(ElementUI);
|
|
17
|
-
import jq from "jquery";
|
|
18
|
-
Vue.prototype.$ = jq;
|
|
19
|
-
Vue.prototype.$api = Api
|
|
20
|
-
Vue.config.productionTip = false
|
|
21
|
-
|
|
22
|
-
// 全局的权限列表过滤器,根据返回的列表权限
|
|
23
|
-
Vue.filter('permissionFilter', function (permission) {
|
|
24
|
-
if (!permission) {
|
|
25
|
-
return true
|
|
26
|
-
}
|
|
27
|
-
let bool = false;
|
|
28
|
-
if (sessionStorage.getItem('user') != null) {
|
|
29
|
-
// 验证许可权限,传入的权限可能不止一个,所以需要以逗号分隔
|
|
30
|
-
let verificationPermission = permission.split(',')
|
|
31
|
-
// 登录成功后返回给该用户的权限列表,将传入的权限在此权限列表中挨个查抄,能找到则返回true,否则false
|
|
32
|
-
let permissionList = JSON.parse(sessionStorage.getItem('user')).permissions
|
|
33
|
-
verificationPermission.forEach(item => {
|
|
34
|
-
if (permissionList.indexOf(item) != -1) {
|
|
35
|
-
bool = true // 说明当前权限在权限列表是存在的,即有该权限列表
|
|
36
|
-
} else {
|
|
37
|
-
bool = false
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
return bool
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
if (process.env.NODE_ENV !== 'development') {
|
|
45
|
-
let pre = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
|
|
46
|
-
// Vue.prototype.baseIP = window.location.origin
|
|
47
|
-
Vue.prototype.baseIP = ""
|
|
48
|
-
Vue.prototype.websocketIp = window.location.origin.replace(window.location.protocol, pre) + '/gview/websocket'
|
|
49
|
-
// Vue.prototype.assetsIP = window.location.origin
|
|
50
|
-
Vue.prototype.assetsIP = ""
|
|
51
|
-
require("@/assets/font/font.scss");
|
|
52
|
-
require("@/assets/scss/common.scss");
|
|
53
|
-
// require ("@/assets/sass/smart-lift/index.scss");
|
|
54
|
-
} else {
|
|
55
|
-
// 开发环境
|
|
56
|
-
// http 8080 , websocket 8989:/websocket2
|
|
57
|
-
// Vue.prototype.baseIP = 'http://192.168.2.192:8089'
|
|
58
|
-
// Vue.prototype.websocketIp = "http://192.168.2.192:8089/gview/websocket".replace('http', 'ws')
|
|
59
|
-
// Vue.prototype.baseIP = 'http://192.168.2.194:8888'
|
|
60
|
-
// Vue.prototype.websocketIp = "http://192.168.2.194:8888/gview/websocket".replace('http', 'ws')
|
|
61
|
-
Vue.prototype.baseIP = 'http://192.168.2.162:8088'
|
|
62
|
-
Vue.prototype.websocketIp = "http://192.168.2.162:8088/gview/websocket".replace('http', 'ws')
|
|
63
|
-
Vue.prototype.assetsIP = "http://update.gonsincloud.com"
|
|
64
|
-
require("@/assets/font/font_dev.scss");
|
|
65
|
-
require("@/assets/scss/common.scss");
|
|
66
|
-
// Vue.prototype.baseIP = 'http://dev.gonsincloud.com:80'
|
|
67
|
-
// Vue.prototype.websocketIp = "http://dev.gonsincloud.com:80/websocket2".replace('http','ws')
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// 路由拦截
|
|
71
|
-
router.beforeEach((to, from, next) => {
|
|
72
|
-
// next()
|
|
73
|
-
if (!sessionStorage.getItem('isTimeout') && to.name !== 'login') {
|
|
74
|
-
console.log(!sessionStorage.getItem('isTimeout'))
|
|
75
|
-
console.log(to.name)
|
|
76
|
-
console.log('拦截了')
|
|
77
|
-
next({ path: '/login' })
|
|
78
|
-
} else {
|
|
79
|
-
next()
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
new Vue({
|
|
83
|
-
router,
|
|
84
|
-
store,
|
|
85
|
-
render: h => h(App)
|
|
86
|
-
}).$mount('#app')
|
package/src/router.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-22 09:02:09
|
|
4
|
-
* @LastEditTime: 2022-05-06 16:29:00
|
|
5
|
-
* @LastEditors: lzx lzx@gonsin.cn
|
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
-
* @FilePath: \gview\src\router.js
|
|
8
|
-
*/
|
|
9
|
-
import Vue from 'vue'
|
|
10
|
-
import Router from 'vue-router'
|
|
11
|
-
import Home from './views/Home.vue'
|
|
12
|
-
import Login from './views/Login.vue'
|
|
13
|
-
Vue.use(Router)
|
|
14
|
-
// 解决重复点击navmenu导航栏报错问题
|
|
15
|
-
const originalPush = Router.prototype.push
|
|
16
|
-
Router.prototype.push = function (location) {
|
|
17
|
-
return originalPush.call(this, location).catch(err => err)
|
|
18
|
-
}
|
|
19
|
-
const router = new Router({
|
|
20
|
-
mode: 'history',
|
|
21
|
-
base: process.env.BASE_URL,
|
|
22
|
-
routes: [
|
|
23
|
-
{
|
|
24
|
-
path: '/login',
|
|
25
|
-
name: 'login',
|
|
26
|
-
component: Login
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
path: '/view',
|
|
30
|
-
name: 'home',
|
|
31
|
-
component: Home
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
})
|
|
35
|
-
// router.beforeEach((to, from, next) => {
|
|
36
|
-
// // console.log(from, to)
|
|
37
|
-
// console.log(123);
|
|
38
|
-
// console.log(to);
|
|
39
|
-
// // 开启进度条
|
|
40
|
-
// // NProgress.start()
|
|
41
|
-
// if (sessionStorage.getItem('user') && to.path == '/login') {
|
|
42
|
-
// router.push(from.path)
|
|
43
|
-
// next()
|
|
44
|
-
// } else {
|
|
45
|
-
// // console.log(to, from, Vue.prototype.baseIP)
|
|
46
|
-
// // LogUtils.setLog(`离开${from.name}页面`, Vue.prototype.baseIP, 1)
|
|
47
|
-
// // LogUtils.setLog(`进入${to.name}页面`, Vue.prototype.baseIP, 1)
|
|
48
|
-
// next()
|
|
49
|
-
// }
|
|
50
|
-
// })
|
|
51
|
-
|
|
52
|
-
export default router
|
package/src/store/index.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2020-06-30 18:26:00
|
|
4
|
-
* @LastEditTime: 2022-06-30 11:02:15
|
|
5
|
-
* @LastEditors: lzx lzx@gonsin.cn
|
|
6
|
-
* @Description: In User Settings Edit
|
|
7
|
-
* @FilePath: \new-vue-web\src\store\index.js
|
|
8
|
-
*/
|
|
9
|
-
import Vue from "vue"
|
|
10
|
-
import Vuex from "vuex"
|
|
11
|
-
|
|
12
|
-
Vue.use(Vuex)
|
|
13
|
-
|
|
14
|
-
export default new Vuex.Store({
|
|
15
|
-
state:{
|
|
16
|
-
isCollapse:false,
|
|
17
|
-
websocket:null,
|
|
18
|
-
unreadMessageTotal:0, // 未读消息
|
|
19
|
-
currentMenu:{
|
|
20
|
-
path:'/',
|
|
21
|
-
label:'首页',
|
|
22
|
-
isSelected:true
|
|
23
|
-
},
|
|
24
|
-
isAdmin:false, // 是否是管理员权限
|
|
25
|
-
floorList:[], // 楼层列表
|
|
26
|
-
conferenceList:[], //对应楼层会议室列表
|
|
27
|
-
allConferenceRooms:[], // 全部的会议室列表
|
|
28
|
-
roomId:0, // 当前楼层id,当刷新页面时,app中的获取会议列表方法会从vuex中获取roomId来获取对应楼层对应列表
|
|
29
|
-
departmentList:[], // 部门列表
|
|
30
|
-
conferenceCenterName:'',
|
|
31
|
-
globalSystem:{}, // 全局设置
|
|
32
|
-
equipmentList:[], //会议设备
|
|
33
|
-
conferenceType:[], //会议类型
|
|
34
|
-
updateData:null,//更新页面数据
|
|
35
|
-
isUpdate:false,//监听websocket是否提示要更新
|
|
36
|
-
isDropLogin:false,//是否退出登录
|
|
37
|
-
},
|
|
38
|
-
mutations:{
|
|
39
|
-
Collapse(state){
|
|
40
|
-
state.isCollapse = !state.isCollapse
|
|
41
|
-
},
|
|
42
|
-
UpdateFunction(state,model){
|
|
43
|
-
state.updateData = model
|
|
44
|
-
},
|
|
45
|
-
SetWebsocket(state,target){
|
|
46
|
-
state.websocket = target
|
|
47
|
-
},
|
|
48
|
-
SetisUpdate(state,bool){
|
|
49
|
-
state.isUpdate = bool?bool:false
|
|
50
|
-
},
|
|
51
|
-
SetisDropLogin(state,bool){
|
|
52
|
-
state.isDropLogin = bool?bool:false
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
actions:{
|
|
56
|
-
setUpdateFunction(context,model){
|
|
57
|
-
// console.log('fun:',model)
|
|
58
|
-
context.commit('UpdateFunction',model)
|
|
59
|
-
}
|
|
60
|
-
// getAsyncGlobalSystem(context,obj){
|
|
61
|
-
// context.commit('getGlobalSystem',obj)
|
|
62
|
-
// },
|
|
63
|
-
// // 异步存储会议设备
|
|
64
|
-
// saveAsyncEquipment(context,array){
|
|
65
|
-
// context.commit('saveEquipment',array)
|
|
66
|
-
// },
|
|
67
|
-
// saveAsyncConferenceTypeList(context,array){
|
|
68
|
-
// context.commit('saveConferenceType',array)
|
|
69
|
-
// }
|
|
70
|
-
}
|
|
71
|
-
})
|
package/src/utils/common.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: lrm lrm@gonsin.cn
|
|
3
|
-
* @Date: 2022-11-04 14:59:40
|
|
4
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
5
|
-
* @LastEditTime: 2022-11-22 14:09:09
|
|
6
|
-
* @FilePath: \client\src\utils\common.js
|
|
7
|
-
* @Description:
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2022 by lrm lrm@gonsin.cn, All Rights Reserved.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @description: 生成唯一标识uuid
|
|
13
|
-
* @param {*} len
|
|
14
|
-
* @param {*} radix
|
|
15
|
-
* @return {*}
|
|
16
|
-
*/
|
|
17
|
-
export function uuid (len, radix) {
|
|
18
|
-
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(
|
|
19
|
-
""
|
|
20
|
-
);
|
|
21
|
-
var uuid = [],
|
|
22
|
-
i;
|
|
23
|
-
radix = radix || chars.length;
|
|
24
|
-
if (len) {
|
|
25
|
-
for (i = 0; i <= len; i++) {
|
|
26
|
-
uuid[i] = chars[0 | (Math.random() * radix)];
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
var r;
|
|
30
|
-
uuid[8] = uuid[23] = uuid[18] = uuid[23] = "-";
|
|
31
|
-
uuid[14] = "4";
|
|
32
|
-
for (i = 0; i < 36; i++) {
|
|
33
|
-
if (!uuid[i]) {
|
|
34
|
-
r = 0 | (Math.random() * 16);
|
|
35
|
-
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return uuid.join("");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function evalThis(exp) {
|
|
43
|
-
return eval(exp)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function initSelectorTreeData(config) {
|
|
47
|
-
const { list, keyName, titleName, prentKey, parentKeyName } = config
|
|
48
|
-
|
|
49
|
-
const selector = (parentKey, arr) => {
|
|
50
|
-
const res = []
|
|
51
|
-
|
|
52
|
-
arr.forEach(item => {
|
|
53
|
-
if (item[parentKeyName] == parentKey) {
|
|
54
|
-
const children = selector(item[keyName], list)
|
|
55
|
-
const parentObj = {
|
|
56
|
-
label: item[titleName],
|
|
57
|
-
value: item[keyName]
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (children.length) {
|
|
61
|
-
parentObj.children = children
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
res.push(parentObj)
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
return res
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return selector(prentKey, list)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @description: 处理showIf数据
|
|
76
|
-
* @param {*} value
|
|
77
|
-
* @return {*}
|
|
78
|
-
*/
|
|
79
|
-
export function vFun(value) {
|
|
80
|
-
if(value === undefined){
|
|
81
|
-
return "";
|
|
82
|
-
}
|
|
83
|
-
if(value === null){
|
|
84
|
-
return "";
|
|
85
|
-
}
|
|
86
|
-
if(value === ""){
|
|
87
|
-
return "";
|
|
88
|
-
}
|
|
89
|
-
if(value === 0){
|
|
90
|
-
return 0;
|
|
91
|
-
}
|
|
92
|
-
if(value === "0"){
|
|
93
|
-
return "0";
|
|
94
|
-
}
|
|
95
|
-
return value;
|
|
96
|
-
}
|
package/src/utils/permission.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: lzx
|
|
3
|
-
* @Date: 2022-11-07 15:36:45
|
|
4
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
5
|
-
* @LastEditTime: 2022-11-07 16:03:14
|
|
6
|
-
* @FilePath: \client\src\utils\permission.js
|
|
7
|
-
* @Description:
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2022 by lrm lrm@gonsin.cn, All Rights Reserved.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description: 权限列表过滤器方法(兼容高版本Vue不再使用过滤器的问题,将原来的过滤器提取为一个方法)
|
|
14
|
-
* @param {*} permission
|
|
15
|
-
* @return {*}
|
|
16
|
-
*/
|
|
17
|
-
export function permissionFilter(permission) {
|
|
18
|
-
if (!permission) {
|
|
19
|
-
return true
|
|
20
|
-
}
|
|
21
|
-
let bool = false;
|
|
22
|
-
if (sessionStorage.getItem('user') != null) {
|
|
23
|
-
// 验证许可权限,传入的权限可能不止一个,所以需要以逗号分隔
|
|
24
|
-
let verificationPermission = permission.split(',')
|
|
25
|
-
// 登录成功后返回给该用户的权限列表,将传入的权限在此权限列表中挨个查抄,能找到则返回true,否则false
|
|
26
|
-
let permissionList = JSON.parse(sessionStorage.getItem('user')).permissions
|
|
27
|
-
verificationPermission.forEach(item => {
|
|
28
|
-
if (permissionList.indexOf(item) != -1) {
|
|
29
|
-
bool = true // 说明当前权限在权限列表是存在的,即有该权限列表
|
|
30
|
-
} else {
|
|
31
|
-
bool = false
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
return bool
|
|
36
|
-
}
|
package/src/views/GView.vue
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: lrm lrm@gonsin.cn
|
|
3
|
-
* @Date: 2022-11-04 15:43:17
|
|
4
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
5
|
-
* @LastEditTime: 2022-11-22 16:55:53
|
|
6
|
-
* @FilePath: \client\src\views\GView.vue
|
|
7
|
-
* @Description: gview 组件
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2022 by lrm lrm@gonsin.cn, All Rights Reserved.
|
|
10
|
-
-->
|
|
11
|
-
<template>
|
|
12
|
-
<div id="home" class="wrapper" ref="wrapper">
|
|
13
|
-
<pageHeader></pageHeader>
|
|
14
|
-
<div class="wrapper_body">
|
|
15
|
-
<div :class="['wrapper_body_left', Collapse ? '' : 'w_200']">
|
|
16
|
-
<pageMenu :menuList="menuList"></pageMenu>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="wrapper_body_right" :style="'width:' + returnWidth()">
|
|
19
|
-
<div class="title">{{ data.title }}</div>
|
|
20
|
-
<div v-if="isShowTemplate" class="wrapper_body_right_flex">
|
|
21
|
-
<templatess
|
|
22
|
-
v-for="(item, index) in data.boards"
|
|
23
|
-
:key="index"
|
|
24
|
-
:board="item"
|
|
25
|
-
:viewName="data.viewName"
|
|
26
|
-
@changeView="changeOtherView"
|
|
27
|
-
@refreshPage="refresh"
|
|
28
|
-
></templatess>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
import templatess from "../components/Templatess.vue";
|
|
37
|
-
import pageHeader from "../components/MyPageHeader.vue";
|
|
38
|
-
import pageMenu from "../components/MyMenus.vue";
|
|
39
|
-
|
|
40
|
-
import { mapState } from 'vuex'
|
|
41
|
-
import { createSocket, onsendunregisterWs } from "../websocket/test";
|
|
42
|
-
import * as api from '../api'
|
|
43
|
-
export default {
|
|
44
|
-
name: "GView",
|
|
45
|
-
components: {
|
|
46
|
-
templatess,
|
|
47
|
-
pageHeader,
|
|
48
|
-
pageMenu,
|
|
49
|
-
},
|
|
50
|
-
computed: {
|
|
51
|
-
...mapState({
|
|
52
|
-
Collapse: (state) => state.isCollapse,
|
|
53
|
-
})
|
|
54
|
-
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
isShowTemplate: false,
|
|
58
|
-
data: {},
|
|
59
|
-
menuList: [],
|
|
60
|
-
wrapperRightWidth: 1920
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
mounted() {
|
|
64
|
-
let model = {};
|
|
65
|
-
let that = this;
|
|
66
|
-
|
|
67
|
-
that.menuList = JSON.parse(sessionStorage.getItem("menu"));
|
|
68
|
-
if(that.$route.query.props) {
|
|
69
|
-
model = JSON.parse(that.$route.query.props)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
this.getView(that.$route.query.viewName,model);
|
|
73
|
-
createSocket();
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
setNoticeData(data) {
|
|
77
|
-
this.$store.commit("SetisUpdate", true);
|
|
78
|
-
},
|
|
79
|
-
returnWidth() {
|
|
80
|
-
if (this.Collapse) {
|
|
81
|
-
return this.wrapperRightWidth - 64 + "px";
|
|
82
|
-
} else {
|
|
83
|
-
return this.wrapperRightWidth - 200 + "px";
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* @description: 获取视图内容
|
|
88
|
-
* @param {*} viewName
|
|
89
|
-
* @param {*} props
|
|
90
|
-
* @return {*}
|
|
91
|
-
*/
|
|
92
|
-
getView(viewName, props) {
|
|
93
|
-
this.isShowTemplate = false;
|
|
94
|
-
props.viewName = viewName;
|
|
95
|
-
api
|
|
96
|
-
.getOneView(props)
|
|
97
|
-
.then((res) => {
|
|
98
|
-
if (res.data.state == 200) {
|
|
99
|
-
if (res.data.data != null) {
|
|
100
|
-
this.data = res.data.data;
|
|
101
|
-
this.isShowTemplate = true;
|
|
102
|
-
}
|
|
103
|
-
} else {
|
|
104
|
-
console.log("获取不到视图内容");
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
//重新加载另外的view
|
|
110
|
-
changeOtherView(name){
|
|
111
|
-
this.getView(name);
|
|
112
|
-
},
|
|
113
|
-
refresh() {
|
|
114
|
-
// this.data = {};
|
|
115
|
-
// // let view = this.$route.query.view;
|
|
116
|
-
let model = {};
|
|
117
|
-
if(this.$route.query.props){
|
|
118
|
-
model = JSON.parse(this.$route.query.props)
|
|
119
|
-
}
|
|
120
|
-
this.getView(this.$route.query.viewName, model);
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
watch: {
|
|
124
|
-
$route() {
|
|
125
|
-
// let view = this.$route.query.viewName;
|
|
126
|
-
// console.log('watch');
|
|
127
|
-
// onsendunregisterWs(this.$store.state.updateData.dataId)
|
|
128
|
-
let model = {};
|
|
129
|
-
if(this.$route.query.props){
|
|
130
|
-
model = JSON.parse(this.$route.query.props)
|
|
131
|
-
}
|
|
132
|
-
this.getView(this.$route.query.viewName,model);
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
}
|
|
136
|
-
</script>
|
|
137
|
-
|
|
138
|
-
<style lang="scss" scoped>
|
|
139
|
-
#home {
|
|
140
|
-
// width:100%;
|
|
141
|
-
height: 100%;
|
|
142
|
-
position: relative;
|
|
143
|
-
overflow: hidden;
|
|
144
|
-
// background:red;
|
|
145
|
-
display: flex;
|
|
146
|
-
flex-direction: column;
|
|
147
|
-
// padding:0 15px 0px;
|
|
148
|
-
// background:red;
|
|
149
|
-
.title {
|
|
150
|
-
text-align: left;
|
|
151
|
-
font-size: 20px;
|
|
152
|
-
font-weight: 700;
|
|
153
|
-
color: #333333;
|
|
154
|
-
// background:#ffffff;
|
|
155
|
-
padding: 15px 15px 0;
|
|
156
|
-
}
|
|
157
|
-
.wrapper_body {
|
|
158
|
-
flex: 1;
|
|
159
|
-
// background-color: burlywood;
|
|
160
|
-
display: flex;
|
|
161
|
-
overflow: hidden;
|
|
162
|
-
.wrapper_body_left {
|
|
163
|
-
height: 100%;
|
|
164
|
-
overflow-y: scroll;
|
|
165
|
-
background-color: #ffffff;
|
|
166
|
-
&::-webkit-scrollbar {
|
|
167
|
-
width: 0;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
.w_200 {
|
|
171
|
-
width: 200px;
|
|
172
|
-
}
|
|
173
|
-
.wrapper_body_right {
|
|
174
|
-
background-color: #f5f7f9;
|
|
175
|
-
flex: 1;
|
|
176
|
-
padding: 0 15px 0px;
|
|
177
|
-
display: flex;
|
|
178
|
-
flex-direction: column;
|
|
179
|
-
.wrapper_body_right_flex {
|
|
180
|
-
flex: 1;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
</style>
|
package/src/views/Home.vue
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-22 09:02:09
|
|
4
|
-
* @LastEditTime: 2022-11-07 17:31:15
|
|
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\views\Home.vue
|
|
8
|
-
-->
|
|
9
|
-
<template>
|
|
10
|
-
<div id="home">
|
|
11
|
-
<GView></GView>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
<script>
|
|
15
|
-
import GView from "./GView.vue";
|
|
16
|
-
export default {
|
|
17
|
-
name: "home",
|
|
18
|
-
components: {
|
|
19
|
-
GView,
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
23
|
-
<style lang="scss" scoped>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</style>
|