agilebuilder-ui 1.0.39 → 1.0.40-beta1

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": "agilebuilder-ui",
3
- "version": "1.0.39",
3
+ "version": "1.0.40-beta1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -15,7 +15,8 @@ import {
15
15
  getEntityFieldValue,
16
16
  getI18n,
17
17
  setEntityFieldValue,
18
- getPropValue,
18
+ getPropValue,
19
+ getPropValueNew
19
20
  } from '../../../src/utils/util'
20
21
  import eventBus from './eventBus'
21
22
  import { isPromise } from '../../../src/utils/common-util'
@@ -1425,6 +1425,7 @@ export default {
1425
1425
  return numberValue
1426
1426
  }
1427
1427
  }
1428
+ return e
1428
1429
  },
1429
1430
  refresData(data) {
1430
1431
  $emit(this, 'refresData', data)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-table-column width="150" :align="column.groupHeader ? 'center' : ''">
2
+ <el-table-column :width="column.width ? column.width : 150" :align="column.groupHeader ? 'center' : ''">
3
3
  <template v-slot:header>
4
4
  <span class="cell--span" :title="label" v-html="label" />
5
5
  </template>
@@ -79,6 +79,7 @@ export default {
79
79
  },
80
80
  created() {
81
81
  this.label = this.getHeader()
82
+ console.log('%c描述-181624','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',this.column);
82
83
  },
83
84
  methods: {
84
85
  getHeader() {
@@ -38,6 +38,7 @@ import tabJs from '../../../../api/tab'
38
38
  import {getI18nName} from '../../../../utils/menu'
39
39
  import Cookies from 'js-cookie'
40
40
  import {getMenus} from '../../../../utils/permissionAuth'
41
+ import authApi from "../../../../utils/auth-api"
41
42
 
42
43
  export default {
43
44
  name: 'Menubar',
@@ -63,12 +64,16 @@ export default {
63
64
  systemName = systemNameObj[language]
64
65
  }
65
66
  }
67
+ const isSelectFirst = window.$vueApp.config.globalProperties.showFirstMenu === undefined || window.$vueApp.config.globalProperties.showFirstMenu === null? true : window.$vueApp.config.globalProperties.showFirstMenu
68
+ let isDevp = authApi.isDevpSystem()
66
69
  const menus = getMenus()
67
70
  return {
68
71
  firstLeafMenu: null, // 第一个有权限的叶子菜单,用于默认展开第一个父菜单
69
72
  systemName,
70
73
  defaultActive: '',
71
74
  menus,
75
+ isSelectFirst,
76
+ isDevp
72
77
  }
73
78
  },
74
79
  computed: {
@@ -129,7 +134,11 @@ export default {
129
134
  }
130
135
  const path = this.firstLeafMenu.fullPath
131
136
  this.addTabs(query, this.$store.state.tabContent.openTab, path, path)
132
- this.$router.push({path: '/tab-content-index', query: query})
137
+ let routePath = '/tab-content-index'
138
+ if(this.isDevp){
139
+ routePath = '/devp-project/setting'
140
+ }
141
+ this.$router.push({path: routePath , query: query})
133
142
  // this.$router.push({ path: this.firstLeafMenu.fullPath })
134
143
  }
135
144
  }
@@ -144,67 +153,47 @@ export default {
144
153
  Cookies.set('selectMenu', index)
145
154
  },
146
155
  getFirstMenu(menus) {
147
- if (menus && menus.length > 0) {
156
+ const currentMenuCode = this.$route.query
157
+ ? this.$route.query._menuCode
158
+ : null
159
+ if(currentMenuCode){
160
+ // 表示需要选中指定的菜单
161
+ this.isSelectFirst = true
162
+ }
163
+ if (this.isSelectFirst && menus && menus.length > 0) {
148
164
  let shouldSelectMenu
149
165
  for (let i = 0; i < menus.length; i++) {
150
166
  const menu = menus[i]
151
- shouldSelectMenu = this.getShouldSelectMenu(menu)
167
+ shouldSelectMenu = this.getShouldSelectMenu(menu, currentMenuCode)
152
168
  if (shouldSelectMenu) {
153
169
  // 表示获得到了应该选中的菜单
154
170
  break
155
171
  }
156
172
  }
157
- // if (!shouldSelectMenu) {
158
- // // 如果没有获得默认选中的菜单,则默认选中第一个菜单
159
- // shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
160
- // }
161
173
  return shouldSelectMenu
162
174
  }
163
175
  },
164
- getShouldSelectMenu(menu) {
165
- const currentMenuCode = this.$route.query
166
- ? this.$route.query._menuCode
167
- : null
168
- if (menu && currentMenuCode) {
169
- let shouldSelectMenu
170
- const children = menu.children
171
- if (children && children.length > 0) {
172
- shouldSelectMenu = this.getFirstMenu(children)
173
- } else if (menu.code && menu.code === currentMenuCode) {
174
- shouldSelectMenu = menu
175
- }
176
- return shouldSelectMenu
177
- }
178
- // if (menu) {
179
- // const cookieMenu = Cookies.get('selectMenu')
180
- // let currentRoute = this.$route.path
181
- // if (cookieMenu && cookieMenu.indexOf('~~') > 0) {
182
- // // cookie中记录了选中的菜单路径
183
- // const path = cookieMenu.substring(0, cookieMenu.lastIndexOf('~~'))
184
- // currentRoute = path
185
- // }
186
- // let shouldSelectMenu
187
- // const children = menu.children
188
- // if (children && children.length > 0) {
189
- // shouldSelectMenu = this.getFirstMenu(children)
190
- // } else if (menu.fullPath && menu.fullPath === currentRoute) {
191
- // shouldSelectMenu = menu
192
- // }
193
- // return shouldSelectMenu
194
- // }
195
- },
196
- getSelectMenuWithFirstMenu(menu) {
176
+ getShouldSelectMenu(menu, currentMenuCode) {
197
177
  if (menu) {
198
178
  let shouldSelectMenu
199
- const children = menu.children
200
- if (children && children.length > 0) {
201
- shouldSelectMenu = this.getFirstMenu(children)
179
+ if(currentMenuCode){
180
+ const children = menu.children
181
+ if (children && children.length > 0) {
182
+ shouldSelectMenu = this.getFirstMenu(children)
183
+ } else if (menu.code && menu.code === currentMenuCode) {
184
+ shouldSelectMenu = menu
185
+ }
202
186
  } else {
203
- shouldSelectMenu = menu
187
+ const children = menu.children
188
+ if (children && children.length > 0) {
189
+ shouldSelectMenu = this.getFirstMenu(children)
190
+ } else {
191
+ shouldSelectMenu = menu
192
+ }
204
193
  }
205
194
  return shouldSelectMenu
206
195
  }
207
- },
196
+ }
208
197
  },
209
198
  }
210
199
  </script>