@hbisty/qj-common 5.1.0 → 5.1.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": "@hbisty/qj-common",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "common files && template for qj-paas",
5
5
  "scripts": {
6
6
  "gulp": "gulp css"
@@ -128,7 +128,7 @@
128
128
  />
129
129
  </el-tooltip>
130
130
  </div>
131
- <div class="msg-content-text" v-html="renderContent(msg)" @click="handleLinkClick"></div>
131
+ <div class="msg-content-text" v-html="renderContent(msg)"></div>
132
132
  </div>
133
133
 
134
134
  <el-empty
@@ -204,6 +204,11 @@ export default {
204
204
  currentSubCategories() {
205
205
  return this.subCategoryMap[this.activeType] || []
206
206
  },
207
+ // 当前二级菜单下所有三级菜单code拼接值
208
+ activeSubCodes() {
209
+ const subNode = this.currentSubCategories.find(c => c.key === this.activeSub)
210
+ return subNode ? subNode.codes : ''
211
+ },
207
212
  filteredMessages() {
208
213
  return this.messages
209
214
  },
@@ -295,22 +300,24 @@ export default {
295
300
  this.treeLoading = true
296
301
  try {
297
302
  const res = await queryMailMnsblistPageTree({ mnslistBustype: 'smail', stateExt: '0' })
298
- const list = (res && res.mnsTabTreeNodeList) || []
303
+ const list = Array.isArray(res) ? res : (res && res.mnsTabTreeNodeList) || []
299
304
  this.messageTypes = list.map(n => ({
300
305
  key: n.code,
301
306
  name: n.message,
302
307
  badge: n.badge || 0,
303
- children: (n.children || []).map(c => ({
304
- key: c.code,
308
+ children: (n.children || []).map((c, idx) => ({
309
+ key: c.code || ('sub_' + idx),
305
310
  name: c.message,
306
- badge: c.badge || 0
311
+ badge: c.badge || 0,
312
+ // 三级菜单所有code用逗号拼接,作为接口入参mnslistBustypeExt的值
313
+ codes: (c.children || []).filter(g => g.code).map(g => g.code).join(',')
307
314
  }))
308
315
  }))
309
316
  this.subCategoryMap = {}
310
317
  this.messageTypes.forEach(t => {
311
318
  this.subCategoryMap[t.key] = t.children
312
319
  })
313
- this.totalUnread = (res && res.badge) || 0
320
+ this.totalUnread = Array.isArray(res) ? 0 : (res && res.badge) || 0
314
321
  this.treeLoaded = true
315
322
  // 设置默认选中项
316
323
  if (this.messageTypes.length > 0) {
@@ -348,8 +355,8 @@ export default {
348
355
  mnslistBustnameExt: this.activeType, // 一级菜单code
349
356
  // fuzzy: false
350
357
  }
351
- if (this.activeSub) {
352
- params.mnslistBustypeExt = this.activeSub // 二级菜单code
358
+ if (this.activeSubCodes) {
359
+ params.mnslistBustypeExt = this.activeSubCodes // 三级菜单code拼接
353
360
  }
354
361
  if (this.appliedKeyword) {
355
362
  params.mnslistContentLike = this.appliedKeyword // 模糊搜索关键词
@@ -473,7 +480,7 @@ export default {
473
480
  return
474
481
  }
475
482
  const params = {
476
- mnslistBustypeExt: this.activeSub, // 二级菜单code
483
+ mnslistBustypeExt: this.activeSubCodes, // 三级菜单code拼接
477
484
  }
478
485
  const subNode = this.currentSubCategories.find(c => c.key === this.activeSub)
479
486
  const typeNode = this.messageTypes.find(t => t.key === this.activeType)