imatrix-ui 2.8.2-dw → 2.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.8.2-dw",
3
+ "version": "2.8.2",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
package/src/i18n/i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue'
2
- import locale from '@gcommon/gcommon-ui/lib/locale'
2
+ import locale from 'element-ui/lib/locale'
3
3
  import VueI18n from 'vue-i18n'
4
4
  import en from './langs/en'
5
5
  import cn from './langs/cn'
@@ -1,4 +1,4 @@
1
- import zhLocale from '@gcommon/gcommon-ui/lib/locale/lang/zh-CN'
1
+ import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
2
2
  const cn = {
3
3
  imatrixUIPublicModel: {
4
4
  sure: '确定',
@@ -46,7 +46,7 @@ const cn = {
46
46
  whetherToConfirmDeletion: '是否确认删除',
47
47
  tips: '提示',
48
48
  pleaseEnterContent: '请输入内容',
49
- internalServerError: '服务器出错了,请联系管理员',
49
+ internalServerError: '请求失败',
50
50
  pleaseSelectDepartment: '请选择部门',
51
51
  pleaseSelectPersonnel: '请选择人员',
52
52
  pleaseRemoveallpersonnelBeforeSelectingSpecificPersonnel: '请先移除所有人员,再选择具体人员',
@@ -71,7 +71,8 @@ const cn = {
71
71
  fileUpload: '文件上传',
72
72
  selectYear: '选择年',
73
73
  search: '查询',
74
- forbiddenException: '您没有权限访问该资源'
74
+ forbiddenException: '您没有权限访问该资源',
75
+ theButtonIsNotBoundToAResource: '该按钮未绑定资源,请先绑定资源'
75
76
  },
76
77
  // 列表组件
77
78
  superGrid: {
@@ -122,7 +123,9 @@ const cn = {
122
123
  pleaseEnterDepartmentName: '请输入部门名称',
123
124
  name: '部门名称',
124
125
  code: '部门编码',
125
- removeDepartment: '移除部门'
126
+ removeDepartment: '移除部门',
127
+ selectedDept: '已选部门',
128
+ namePath: '名称路径'
126
129
  },
127
130
  // 用户树
128
131
  departmentUserTree: {
@@ -1,4 +1,4 @@
1
- import enLocale from '@gcommon/gcommon-ui/lib/locale/lang/en'
1
+ import enLocale from 'element-ui/lib/locale/lang/en'
2
2
  const en = {
3
3
  imatrixUIPublicModel: {
4
4
  sure: 'Sure',
@@ -46,7 +46,7 @@ const en = {
46
46
  whetherToConfirmDeletion: 'Whether To Confirm Deletion',
47
47
  tips: 'Tips',
48
48
  pleaseEnterContent: 'Please Enter Content',
49
- internalServerError: 'Server error, please contact administrator',
49
+ internalServerError: 'Server error',
50
50
  pleaseSelectDepartment: 'Please Select Department',
51
51
  pleaseSelectPersonnel: 'Please Select Personnel',
52
52
  pleaseRemoveallpersonnelBeforeSelectingSpecificPersonnel: 'Please Remove All Personnel Before Selecting Specific Personnel',
@@ -71,7 +71,8 @@ const en = {
71
71
  fileUpload: 'File Upload',
72
72
  selectYear: 'Select Year',
73
73
  search: 'Search',
74
- forbiddenException: 'You do not have permission to access this resource'
74
+ forbiddenException: 'You do not have permission to access this resource',
75
+ theButtonIsNotBoundToAResource: 'The button is not bound to a resource, Bind the resource first'
75
76
  },
76
77
  superGrid: {
77
78
  columnConfig: 'Column Config',
@@ -119,7 +120,9 @@ const en = {
119
120
  pleaseEnterDepartmentName: 'Please Enter Department Name',
120
121
  name: 'Department Name',
121
122
  code: 'Department Code',
122
- removeDepartment: 'Remove Department'
123
+ removeDepartment: 'Remove Department',
124
+ selectedDept: 'Selected Departments',
125
+ namePath: 'Name Path'
123
126
  },
124
127
  // 用户树
125
128
  departmentUserTree: {
package/src/permission.js CHANGED
@@ -4,7 +4,7 @@ import { getToken, setToken } from './utils/auth' // 验权
4
4
  import store from './store'
5
5
  import router, { errorRouterMap } from './router'
6
6
  NProgress.configure({ showSpinner: false })// NProgress Configuration
7
- import { Message } from '@gcommon/gcommon-ui'
7
+ import { Message } from 'element-ui'
8
8
  import Vue from 'vue'
9
9
 
10
10
  const whiteList = ['/login', '/update-password', '/forget-password', '/reset-password', '/redirect'] // 不重定向白名单
@@ -30,7 +30,7 @@ router.beforeEach((to, from, next) => {
30
30
  }
31
31
  }
32
32
  // console.log('router.beforeEach-getToken()=', token)
33
- if (['/update-password', '/forget-password', '/reset-password', '/redirect'].indexOf(to.path) === -1 && token) {
33
+ if ((['/update-password', '/forget-password', '/reset-password', '/redirect'].indexOf(to.path) === -1 || store.getters.whiteList.indexOf(to.path) !== -1) && token) {
34
34
  if (to.path === '/login') {
35
35
  next({ path: '/', query: to.query })
36
36
  NProgress.done() // if current page is dashboard will not trigger afterEach hook, so manually handle it
@@ -84,7 +84,7 @@ router.beforeEach((to, from, next) => {
84
84
  }
85
85
  }
86
86
  } else {
87
- if (whiteList.indexOf(to.path) !== -1) {
87
+ if (whiteList.indexOf(to.path) !== -1 || store.getters.whiteList.indexOf(to.path) !== -1) {
88
88
  next()
89
89
  } else {
90
90
  // 必须使用to.fullPath,fullPath是带有参数的,to.path没有参数,会导致跳转到的页面参数丢失
package/src/plugins.js CHANGED
@@ -3,9 +3,9 @@ import Vue from 'vue'
3
3
  import 'normalize.css/normalize.css' // A modern alternative to CSS resets
4
4
  import './styles/index.scss' // global css
5
5
 
6
- import ElementUI from '@gcommon/gcommon-ui'
7
- import '@gcommon/gcommon-ui/lib/theme-chalk/index.css'
8
- import locale from '@gcommon/gcommon-ui/lib/locale/lang/zh-CN' // lang i18n
6
+ import ElementUI from 'element-ui'
7
+ import 'element-ui/lib/theme-chalk/index.css'
8
+ import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
9
9
 
10
10
  import SuperUI from 'imatrix-ui'
11
11
  import 'imatrix-ui/lib/super-ui.css'
@@ -79,6 +79,30 @@ export const errorRouterMap = [
79
79
  // 404的映射必须是最后一个
80
80
  { path: '*', redirect: '/404', hidden: true }
81
81
  ]
82
+
83
+ // 解决Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location问题
84
+ const originalPush = Router.prototype.push
85
+ const originReplace = Router.prototype.replace
86
+
87
+ // 第一个参数,告诉原来push方法,你往哪里跳转(传递哪些参数)
88
+ // 第二个参数是成功的回调
89
+ // 第三个参数是失败的回调
90
+ Router.prototype.push = function(location, resolve, reject) {
91
+ // 如果传了 resolve&&reject
92
+ if (resolve && reject) {
93
+ originalPush.call(this, location, resolve, reject)
94
+ } else {
95
+ originalPush.call(this, location, () => {}, () => {})
96
+ }
97
+ }
98
+ Router.prototype.replace = function(location, resolve, reject) {
99
+ if (resolve && reject) {
100
+ originReplace.call(this, location, resolve, reject)
101
+ } else {
102
+ originReplace.call(this, location, () => {}, () => {})
103
+ }
104
+ }
105
+
82
106
  export default new Router({
83
107
  // mode: 'history', //后端支持可开
84
108
  scrollBehavior: () => ({ y: 0 }),
@@ -9,6 +9,7 @@ const getters = {
9
9
  preventReclick: state => state.app.preventReclick,
10
10
  menus: state => state.user.menus,
11
11
  openTab: state => state.tabContent.openTab,
12
- activeIndex: state => state.tabContent.activeIndex
12
+ activeIndex: state => state.tabContent.activeIndex,
13
+ whiteList: state => state.app.whiteList
13
14
  }
14
15
  export default getters
@@ -6,7 +6,8 @@ const app = {
6
6
  withoutAnimation: false
7
7
  },
8
8
  device: 'desktop',
9
- preventReclick: false
9
+ preventReclick: false,
10
+ whiteList: []
10
11
  },
11
12
  mutations: {
12
13
  toggleSidebar: state => {
@@ -28,6 +29,11 @@ const app = {
28
29
  },
29
30
  togglePreventReclick: (state, preventReclick) => {
30
31
  state.preventReclick = preventReclick
32
+ },
33
+ setWhiteList: (state, whiteList) => {
34
+ if (whiteList instanceof Array) {
35
+ state.whiteList = whiteList
36
+ }
31
37
  }
32
38
  },
33
39
  actions: {
@@ -39,6 +45,9 @@ const app = {
39
45
  },
40
46
  toggelDevice({ commit }, device) {
41
47
  commit('toggleDevice', device)
48
+ },
49
+ addWhiteList({ commit }, whiteList) {
50
+ commit('setWhiteList', whiteList)
42
51
  }
43
52
  }
44
53
  }
@@ -1,7 +1,7 @@
1
1
  import ssoService from '../../api/sso-service'
2
- import { setToken, removeToken, setUsername, getUsername, removeUsername } from '../../utils/auth'
2
+ import { setToken, removeToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser } from '../../utils/auth'
3
3
 
4
- import { removePermissions, getPermissions, setPermissions } from '../../utils/permissionAuth'
4
+ import { removePermissions, getPermissions, setPermissions, getMenus, setMenus, removeMenus } from '../../utils/permissionAuth'
5
5
 
6
6
  const user = {
7
7
  state: {
@@ -42,6 +42,23 @@ const user = {
42
42
  })
43
43
  })
44
44
  },
45
+ // 登录。根据token登录系统
46
+ loginWithCookieToken({ commit }, loginName) {
47
+ return new Promise((resolve, reject) => {
48
+ if (loginName) {
49
+ // setToken(tokenInfo.jwt)
50
+ // commit('setToken', tokenInfo.jwt)
51
+ ssoService.getCurrentUserPermissionsBySystem(loginName).then(permissions => {
52
+ let currentPermissions = ['index']
53
+ currentPermissions = currentPermissions.concat(permissions)
54
+ setPermissions(currentPermissions)
55
+ resolve()
56
+ }).catch(error => {
57
+ reject(error)
58
+ })
59
+ }
60
+ })
61
+ },
45
62
 
46
63
  // 获取用户信息
47
64
  getCurrentUser({ commit, state }) {
@@ -51,9 +68,11 @@ const user = {
51
68
  ssoService.getCurrentUser().then(user => {
52
69
  if (user) {
53
70
  setUsername(user.loginName)
71
+ setCurrentUser(user)
54
72
  commit('setName', user.name)
55
73
  } else {
56
74
  removeUsername()
75
+ removeCurrentUser()
57
76
  commit('setName', '')
58
77
  }
59
78
  // commit('SET_AVATAR', data.avatar)
@@ -77,9 +96,12 @@ const user = {
77
96
 
78
97
  commit('setName', '')
79
98
  removeUsername()
99
+ removeCurrentUser()
80
100
 
81
101
  removePermissions()
82
102
 
103
+ removeMenus()
104
+
83
105
  resolve(data)
84
106
  }).catch(error => {
85
107
  reject(error)
@@ -95,9 +117,12 @@ const user = {
95
117
 
96
118
  commit('setName', '')
97
119
  removeUsername()
120
+ removeCurrentUser()
98
121
 
99
122
  removePermissions()
100
123
 
124
+ removeMenus()
125
+
101
126
  resolve()
102
127
  })
103
128
  },
@@ -107,18 +132,18 @@ const user = {
107
132
  return new Promise((resolve, reject) => {
108
133
  let storePermissions = getPermissions()
109
134
  // 这个判断会导致资源不会重新加载??
110
- // if (typeof (storePermissions) === 'undefined' || storePermissions === '' || storePermissions === null) {
111
- ssoService.getCurrentUserPermissionsBySystem(loginName, systemCode).then(permissions => {
112
- let currentPermissions = ['index']
113
- currentPermissions = currentPermissions.concat(permissions)
114
- storePermissions = setPermissions(currentPermissions)
135
+ if (typeof (storePermissions) === 'undefined' || storePermissions === '' || storePermissions === null) {
136
+ ssoService.getCurrentUserPermissionsBySystem(loginName, systemCode).then(permissions => {
137
+ let currentPermissions = ['index']
138
+ currentPermissions = currentPermissions.concat(permissions)
139
+ storePermissions = setPermissions(currentPermissions)
140
+ resolve(storePermissions)
141
+ }).catch(error => {
142
+ reject(error)
143
+ })
144
+ } else {
115
145
  resolve(storePermissions)
116
- }).catch(error => {
117
- reject(error)
118
- })
119
- // } else {
120
- // resolve(storePermissions)
121
- // }
146
+ }
122
147
  })
123
148
  },
124
149
 
@@ -156,12 +181,18 @@ const user = {
156
181
  // 获得有权限的菜单集合
157
182
  getPermissionMenus({ commit }, systemCode) {
158
183
  return new Promise((resolve, reject) => {
159
- ssoService.getUserPermissionMenusBySystemCode(systemCode).then(menus => {
160
- commit('setMenus', menus)
161
- resolve(menus)
162
- }).catch(error => {
163
- reject(error)
164
- })
184
+ const storePermissionMenus = getMenus(systemCode)
185
+ if (typeof (storePermissionMenus) === 'undefined' || storePermissionMenus === '' || storePermissionMenus === null) {
186
+ ssoService.getUserPermissionMenusBySystemCode(systemCode).then(menus => {
187
+ // commit('setMenus', menus)
188
+ setMenus(menus, systemCode)
189
+ resolve(menus)
190
+ }).catch(error => {
191
+ reject(error)
192
+ })
193
+ } else {
194
+ resolve(storePermissionMenus)
195
+ }
165
196
  })
166
197
  }
167
198
 
@@ -31,4 +31,29 @@ body .el-table th.gutter {
31
31
 
32
32
  body .el-table colgroup.gutter {
33
33
  display: table-cell !important;
34
+ }
35
+ // 日期控件宽度不自适应问题
36
+ .formContent .el-date-editor.el-input,.formContent .el-date-editor.el-input__input,.formContent .el-date-editor.el-input__inner,
37
+ .grid-search-form .el-date-editor.el-input,.grid-search-form .el-date-editor.el-input__input,.grid-search-form .el-date-editor.el-input__inner {
38
+ width: 100%;
39
+ }
40
+ .formContent .el-date-editor--daterange.el-input,.formContent .el-date-editor--daterange.el-input__inner,.formContent .el-date-editor--timerange.el-input,.formContent .el-date-editor--timerange.el-input__inner,
41
+ .grid-search-form .el-date-editor--daterange.el-input,.grid-search-form .el-date-editor--daterange.el-input__inner,.grid-search-form .el-date-editor--timerange.el-input,.grid-search-form .el-date-editor--timerange.el-input__inner {
42
+ width: 100%;
43
+ }
44
+ // 日期选择按钮太小问题(gcommon ui)
45
+ .el-picker-panel__footer .el-button--mini {
46
+ font-size: 16px;
47
+ }
48
+ // 显示必填标志
49
+ .is_req {
50
+ .required__label::before {
51
+ content: '*';
52
+ color: #f56c6c;
53
+ margin-right: 4px;
54
+ }
55
+ }
56
+
57
+ .formContent .el-form-item {
58
+ margin-bottom: 0;
34
59
  }
@@ -5,7 +5,7 @@
5
5
  background: rgb(255, 255, 255);
6
6
  line-height: 72px;
7
7
  height: 72px;
8
- position: fixed;
8
+ position: absolute;
9
9
  z-index: 100;
10
10
  top: 0px;
11
11
  left: 0px;
@@ -17,7 +17,7 @@
17
17
  background: rgb(255, 255, 255);
18
18
  line-height: 72px;
19
19
  height: 72px;
20
- position: fixed;
20
+ position: absolute;
21
21
  bottom: 0px;
22
22
  z-index: 100;
23
23
  left: 0px;
@@ -6,6 +6,14 @@
6
6
  height: 32px;
7
7
  line-height: 32px;
8
8
  }
9
+
10
+ .el-input.is-disabled .el-input__inner {
11
+ color: #606266;
12
+ }
13
+
14
+ .el-textarea.is-disabled .el-textarea__inner {
15
+ color: #606266;
16
+ }
9
17
  }
10
18
 
11
19
  }
package/src/utils/auth.js CHANGED
@@ -4,6 +4,7 @@ import Vue from 'vue'
4
4
 
5
5
  const jwtKey = 'JWT'
6
6
  const currentUserNameKey = 'USERNAME'
7
+ const currentUserInfoKey = 'CURRENT_USER'
7
8
 
8
9
  export function getToken() {
9
10
  let jwt = sessionStorage.getItem(jwtKey)
@@ -46,3 +47,23 @@ export function setUsername(username) {
46
47
  export function removeUsername() {
47
48
  sessionStorage.removeItem(currentUserNameKey)
48
49
  }
50
+
51
+ export function getCurrentUser() {
52
+ const userJson = sessionStorage.getItem(currentUserInfoKey)
53
+ if (userJson) {
54
+ return JSON.parse(userJson)
55
+ }
56
+ }
57
+
58
+ export function setCurrentUser(userInfo) {
59
+ if (userInfo) {
60
+ if (userInfo.password) {
61
+ userInfo.password = null
62
+ }
63
+ sessionStorage.setItem(currentUserInfoKey, JSON.stringify(userInfo))
64
+ }
65
+ }
66
+
67
+ export function removeCurrentUser() {
68
+ sessionStorage.removeItem(currentUserInfoKey)
69
+ }
@@ -189,3 +189,16 @@ export function getServerConfigUtil(http) {
189
189
  })
190
190
  })
191
191
  }
192
+ /**
193
+ * postmessage跨域传message时获得orign路径使用
194
+ * @returns orign路径
195
+ */
196
+ export function getOrignUrl() {
197
+ const url = window.location.href
198
+ let orignUrl
199
+ if (url && url.indexOf('/') > 0) {
200
+ const urls = url.split('/')
201
+ orignUrl = urls[0] + '//' + urls[2]
202
+ }
203
+ return orignUrl
204
+ }
@@ -421,6 +421,7 @@ function openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode
421
421
  popPageSetting.jumpPageHeight = jumpPageSetting.jumpPageHeight
422
422
  popPageSetting.valueMappings = jumpPageSetting.valueMappings
423
423
  popPageSetting.updateValueEvent = jumpPageSetting.updateValueEvent
424
+ popPageSetting.closeEvent = jumpPageSetting.closeEvent
424
425
  }
425
426
  // 是否是自定义系统
426
427
  let isDsc = false
@@ -0,0 +1,19 @@
1
+ import { getLanguageWithLocale } from './util'
2
+
3
+ export function getI18nName(menu) {
4
+ if (!menu) {
5
+ return
6
+ }
7
+ if (menu.i18Names) {
8
+ const language = getLanguageWithLocale()
9
+ const i18Names = JSON.parse(menu.i18Names)
10
+ if (i18Names[language]) {
11
+ return i18Names[language]
12
+ }
13
+ }
14
+ if (menu.i18nValue) {
15
+ return menu.i18nValue
16
+ } else {
17
+ return menu.name
18
+ }
19
+ }
@@ -24,3 +24,7 @@ export default function checkPermission(permission) {
24
24
  return false
25
25
  }
26
26
  }
27
+
28
+ export {
29
+ checkPermission
30
+ }
@@ -2,11 +2,18 @@ import sessionStorage from 'sessionstorage'
2
2
  import Vue from 'vue'
3
3
 
4
4
  const permissionKey = 'PERMISSION-'
5
+ const permissionMenuKey = 'PERMISSION_MENU-'
5
6
  export function getSystemCode() {
6
- let systemCode = Vue.prototype.systemCode
7
+ let systemCode
7
8
  if (Vue.prototype.customSystem) {
8
9
  systemCode = Vue.prototype.customSystem
10
+ } else {
11
+ systemCode = Vue.prototype.systemCode
9
12
  }
13
+ // let systemCode = Vue.prototype.systemCode
14
+ // if (Vue.prototype.customSystem) {
15
+ // systemCode = Vue.prototype.customSystem
16
+ // }
10
17
  return systemCode
11
18
  }
12
19
 
@@ -41,3 +48,37 @@ export function removePermissions() {
41
48
  }
42
49
  }
43
50
 
51
+ export function getMenus(systemCode) {
52
+ if (!systemCode) {
53
+ systemCode = getSystemCode()
54
+ }
55
+ const permissions = sessionStorage.getItem(permissionMenuKey + systemCode)
56
+ if (permissions) {
57
+ return JSON.parse(permissions)
58
+ }
59
+ return null
60
+ }
61
+
62
+ export function setMenus(menus, systemCode) {
63
+ if (menus) {
64
+ if (!systemCode) {
65
+ systemCode = getSystemCode()
66
+ }
67
+ sessionStorage.setItem(permissionMenuKey + systemCode, JSON.stringify(menus))
68
+ return menus
69
+ }
70
+ }
71
+
72
+ export function removeMenus(systemCode) {
73
+ if (!systemCode) {
74
+ systemCode = getSystemCode()
75
+ }
76
+ sessionStorage.removeItem(permissionMenuKey + systemCode)
77
+ for (var i = 0; i < sessionStorage.length; i++) {
78
+ var key = sessionStorage.key(i)
79
+ if (key.indexOf(permissionMenuKey) >= 0) {
80
+ sessionStorage.removeItem(key)
81
+ }
82
+ }
83
+ }
84
+
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios'
2
2
  import {
3
3
  Message
4
- } from '@gcommon/gcommon-ui'
4
+ } from 'element-ui'
5
5
  import {
6
6
  getToken,
7
7
  removeToken
package/src/utils/util.js CHANGED
@@ -393,7 +393,7 @@ export function analysisValue(conditionValue, entity, additionalParameter, conte
393
393
  }
394
394
 
395
395
  /**
396
- * 设置entity中某属性的值,处理子对象的情况
396
+ * 设置entity中某属性的值,处理子对象的情况。使用该方法,性能可能有问题
397
397
  * @param {*} entity
398
398
  * @param {*} prop
399
399
  * @param {*} value
@@ -403,10 +403,23 @@ export function setEntityFieldValue(entity, prop, value) {
403
403
  if (prop && prop.indexOf('.') > 0) {
404
404
  const parentObj = getParentObjectUtil(prop, entity)
405
405
  if (parentObj) {
406
- Vue.set(parentObj, prop.substring(prop.lastIndexOf('.') + 1), value)
406
+ const subProp = prop.substring(prop.lastIndexOf('.') + 1)
407
+ if (parentObj[subProp] === undefined) {
408
+ // 动态对象属性赋值,防止属性不存在,导致属性无法赋值问题
409
+ Vue.set(parentObj, prop.substring(prop.lastIndexOf('.') + 1), value)
410
+ } else {
411
+ // 静态对象属性赋值,提高性能
412
+ parentObj[subProp] = value
413
+ }
407
414
  }
408
415
  } else {
409
- Vue.set(entity, prop, value)
416
+ if (entity[prop] === undefined) {
417
+ // 动态对象属性赋值,防止属性不存在,导致属性无法赋值问题
418
+ Vue.set(entity, prop, value)
419
+ } else {
420
+ // 静态对象属性赋值,提高性能
421
+ entity[prop] = value
422
+ }
410
423
  }
411
424
  }
412
425
  }
package/src/views/404.vue CHANGED
@@ -2,26 +2,30 @@
2
2
  <div class="wscn-http404-container">
3
3
  <div class="wscn-http404">
4
4
  <div class="pic-404">
5
- <img class="pic-404__parent" src="@/assets/404/404.png" alt="404">
6
- <img class="pic-404__child left" src="@/assets/404/404-cloud.png" alt="404">
7
- <img class="pic-404__child mid" src="@/assets/404/404-cloud.png" alt="404">
8
- <img class="pic-404__child right" src="@/assets/404/404-cloud.png" alt="404">
5
+ <img class="pic-404__parent" src="../../assets/404/404.png" alt="404">
6
+ <img class="pic-404__child left" src="../../assets/404/404-cloud.png" alt="404">
7
+ <img class="pic-404__child mid" src="../../assets/404/404-cloud.png" alt="404">
8
+ <img class="pic-404__child right" src="../../assets/404/404-cloud.png" alt="404">
9
9
  </div>
10
10
  <div class="bullshit">
11
- <div class="bullshit__oops">
11
+ <!-- <div class="bullshit__oops">
12
12
  OOPS!
13
13
  </div>
14
14
  <div class="bullshit__info">
15
15
  版权所有
16
- <a class="link-type" href="https://wallstreetcn.com" target="_blank">华尔街见闻</a>
17
- </div>
16
+ <a class="link-type" href="https://wallstreetcn.com" target="_blank">
17
+ 华尔街见闻
18
+ </a>
19
+ </div> -->
18
20
  <div class="bullshit__headline">
19
21
  {{ message }}
20
22
  </div>
21
23
  <div class="bullshit__info">
22
- 请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
24
+ 请检查您输入的网址是否正确
23
25
  </div>
24
- <a href="" class="bullshit__return-home">返回首页</a>
26
+ <!-- <a href="" class="bullshit__return-home">
27
+ 返回首页
28
+ </a> -->
25
29
  </div>
26
30
  </div>
27
31
  </div>
@@ -33,7 +37,7 @@ export default {
33
37
  name: 'Page404',
34
38
  computed: {
35
39
  message() {
36
- return '网管说这个页面你不能进......'
40
+ return '页面不存在'
37
41
  }
38
42
  }
39
43
  }
@@ -6,9 +6,12 @@
6
6
  <slot />
7
7
  </a> -->
8
8
 
9
- <router-link :to="to">
9
+ <router-link v-if="!isOpenNewTab" :to="to">
10
10
  <slot />
11
11
  </router-link>
12
+ <div v-else>
13
+ <slot />
14
+ </div>
12
15
  </div>
13
16
  </template>
14
17
 
@@ -23,8 +26,14 @@ export default {
23
26
  },
24
27
  data() {
25
28
  const isExter = this.to.isExternal
29
+ const openWay = this.to.openWay
30
+ let isOpenNewTab = false
31
+ if (openWay && openWay === 'NEW_PAGE_OPEN') {
32
+ isOpenNewTab = true
33
+ }
26
34
  return {
27
- isExter
35
+ isExter,
36
+ isOpenNewTab
28
37
  }
29
38
  }
30
39
  }