n20-common-lib 3.0.46 → 3.0.47

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": "n20-common-lib",
3
- "version": "3.0.46",
3
+ "version": "3.0.47",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -65,7 +65,7 @@
65
65
  {{ '查询' | $lc }}</span
66
66
  >
67
67
  <span
68
- v-if="filterId"
68
+ v-if="bussId"
69
69
  class="m-l-s"
70
70
  style="
71
71
  display: inline-block;
@@ -233,6 +233,12 @@ export default {
233
233
  saveSt() {
234
234
  this.$refs.stform.validate(async (valid) => {
235
235
  if (valid) {
236
+ // 如果没有 bussId,不保存视图
237
+ if (!this.bussId) {
238
+ this.$message.warning('缺少业务ID,无法保存视图')
239
+ return
240
+ }
241
+
236
242
  // 保存筛选视图
237
243
  const obj = {
238
244
  viewName: this.form.viewName,
@@ -4,6 +4,7 @@
4
4
  <slot name="leftContent"></slot>
5
5
  <div class="flex-box flex-v">
6
6
  <el-popover
7
+ v-if="bussId"
7
8
  v-model="stVisible"
8
9
  popper-class="pro-filter-view-popover"
9
10
  placement="bottom-start"
@@ -51,7 +52,7 @@
51
52
  </div>
52
53
  </div>
53
54
  </el-popover>
54
- <el-button v-if="selectItem" class="activiti m-r" @click="edit(selectItem, true)">
55
+ <el-button v-if="bussId && selectItem" class="activiti m-r" @click="edit(selectItem, true)">
55
56
  <div class="flex-box flex-v">
56
57
  <!-- <img src="./find.svg" alt="" /> -->
57
58
  <i class="v3-icon-find"></i>
@@ -294,8 +295,10 @@ export default {
294
295
  },
295
296
  created() {},
296
297
  mounted() {
297
- // 默认勾选全部
298
- this.getFilterList()
298
+ // 只有在有 bussId 时才获取视图列表
299
+ if (this.bussId) {
300
+ this.getFilterList()
301
+ }
299
302
  // 合并初始筛选值:slot 字段使用默认值,其他字段使用 initialValue 传入的值
300
303
  this.searchValue = { ...this.getInitialSearchValue, ...this.initialValue }
301
304
  },
@@ -338,8 +341,13 @@ export default {
338
341
  }
339
342
  })
340
343
  },
341
- // 通过filterId拿取视图列表
344
+ // 通过bussId拿取视图列表
342
345
  getFilterList(viewId) {
346
+ // 如果没有 bussId,不获取视图列表
347
+ if (!this.bussId) {
348
+ return
349
+ }
350
+
343
351
  let list = []
344
352
  axios
345
353
  .get(`/bems/query/viewColumn/getViewInfo`, { bussId: this.bussId })
@@ -422,6 +430,12 @@ export default {
422
430
  },
423
431
  // 保存视图
424
432
  saveSt() {
433
+ // 如果没有 bussId,不保存视图
434
+ if (!this.bussId) {
435
+ this.$message.warning('缺少业务ID,无法保存视图')
436
+ return
437
+ }
438
+
425
439
  let viewConfig
426
440
  let keyIds
427
441
  if (this.form.viewType === '0') {
@@ -225,7 +225,7 @@
225
225
  <div slot="footer" class="flex-box flex-lr">
226
226
  <el-button plain @click="reset">{{ '恢复默认' | $lc }}</el-button>
227
227
  <div>
228
- <el-button type="primary" plain @click="setChange">{{ '取消' | $lc }}</el-button>
228
+ <el-button type="primary" plain @click="visible = false">{{ '取消' | $lc }}</el-button>
229
229
  <el-button type="primary" @click="setChange">{{ '确定' | $lc }}</el-button>
230
230
  </div>
231
231
  </div>