lw-cdp-ui 1.1.43 → 1.1.45

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.
@@ -6,7 +6,7 @@
6
6
  :class="[isActive(tag)?'active':'',tag.meta.affix?'affix':'' ]"
7
7
  @contextmenu.prevent="openContextMenu($event, tag)">
8
8
  <router-link :to="tag">
9
- <span>{{ tag.meta.title }}</span>
9
+ <span>{{ getIdName(tag) }}</span>
10
10
  <el-icon v-if="!tag.meta.affix"
11
11
  @click.prevent.stop='closeSelectedTag(tag)'><el-icon-close /></el-icon>
12
12
  </router-link>
@@ -54,7 +54,13 @@ export default {
54
54
  menu: this.$router.sc_getMenu()
55
55
  }
56
56
  },
57
- props: {},
57
+ props: {
58
+ // 标签是否显示ID
59
+ tagShowID: {
60
+ type: Boolean,
61
+ default: false
62
+ }
63
+ },
58
64
  computed: {
59
65
  tagList() {
60
66
  return this.$store.state.viewTags.viewTags
@@ -292,6 +298,21 @@ export default {
292
298
  this.$store.commit('removeKeepLive', keep)
293
299
  this.closeSelectedTag(this.$route, false)
294
300
  this.$router.push(path)
301
+ },
302
+ // 显示ID
303
+ getIdName(tag) {
304
+ if (tag.query?.id && this.tagShowID) {
305
+ let str = tag.meta.title
306
+ if (str.includes(':') || str.includes(':')) {
307
+ return tag.meta.title
308
+ } else {
309
+ return `${tag.meta.title}:${tag.query.id}`
310
+ }
311
+
312
+ } else {
313
+ return tag.meta.title
314
+ }
315
+
295
316
  }
296
317
  }
297
318
  }
@@ -56,7 +56,7 @@
56
56
  <Side-m v-if="ismobile"></Side-m>
57
57
  <div class="aminui-body el-container">
58
58
  <Topbar v-if="!ismobile"></Topbar>
59
- <Tags v-if="!ismobile && layoutTags"></Tags>
59
+ <Tags v-if="!ismobile && layoutTags" :tagShowID="tagShowID"></Tags>
60
60
  <div class="adminui-main"
61
61
  id="adminui-main">
62
62
  <slot name="routerView">
@@ -117,7 +117,7 @@
117
117
  </template>
118
118
  </userbar>
119
119
  </div>
120
- <Tags v-if="!ismobile && layoutTags"></Tags>
120
+ <Tags v-if="!ismobile && layoutTags" :tagShowID="tagShowID"></Tags>
121
121
  <div class="adminui-main"
122
122
  id="adminui-main">
123
123
  <slot name="routerView">
@@ -170,7 +170,7 @@
170
170
  </header>
171
171
  <section class="aminui-wrapper">
172
172
  <div class="aminui-body el-container">
173
- <Tags v-if="!ismobile && layoutTags"></Tags>
173
+ <Tags v-if="!ismobile && layoutTags" :tagShowID="tagShowID"></Tags>
174
174
  <div class="adminui-main"
175
175
  id="adminui-main">
176
176
  <slot name="routerView">
@@ -245,7 +245,7 @@
245
245
  </template>
246
246
  </userbar>
247
247
  </Topbar>
248
- <Tags v-if="!ismobile && layoutTags"></Tags>
248
+ <Tags v-if="!ismobile && layoutTags" :tagShowID="tagShowID"></Tags>
249
249
  <div class="adminui-main"
250
250
  id="adminui-main">
251
251
  <slot name="routerView">
@@ -299,6 +299,11 @@ export default {
299
299
  type: Boolean,
300
300
  default: true
301
301
  },
302
+ // 标签是否显示ID
303
+ tagShowID: {
304
+ type: Boolean,
305
+ default: false
306
+ }
302
307
  },
303
308
  components: {
304
309
  Aside,
@@ -128,10 +128,14 @@ export default {
128
128
  [this.defaultProps.pageSize]: this.pageSize,
129
129
  [this.defaultProps.keyword]: this.keyword
130
130
  }
131
- console.log(this.formData)
132
- this.formData.expression = this.$expression(this.formData)
131
+ let expression = this.$expression(this.formData)
132
+ if (expression) {
133
+ this.formData.expression = ` ${this.params.expression} AND ${expression}`
134
+ } else {
135
+ this.formData.expression = this.params.expression
136
+ }
133
137
  Object.assign(reqData, this.params, this.formData)
134
-
138
+
135
139
  var res = await this.apiObj(reqData);
136
140
  var parseData = config.parseData(res)
137
141
  this.tableData = parseData.rows;