n20-common-lib 2.3.14 → 2.3.16

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": "2.3.14",
3
+ "version": "2.3.16",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -2,13 +2,14 @@
2
2
  <el-input
3
3
  v-if="!select"
4
4
  class="n20-input-search-1"
5
- v-bind="$attrs"
5
+ v-bind="Object.assign($attrs, { disabled: disabled })"
6
6
  :value="value"
7
7
  :clearable="clearable"
8
8
  v-on="$listeners"
9
9
  @change="searchFn"
10
10
  >
11
11
  <i
12
+ v-if="!disabled"
12
13
  slot="suffix"
13
14
  class="is-search el-input__icon"
14
15
  :class="suffixIcon || 'el-icon-search'"
@@ -24,7 +25,7 @@
24
25
  >
25
26
  <el-select
26
27
  ref="input-search"
27
- v-bind="$attrs"
28
+ v-bind="Object.assign($attrs, { disabled: disabled })"
28
29
  :value="value"
29
30
  :filterable="select"
30
31
  :multiple="multiple"
@@ -35,7 +36,7 @@
35
36
  >
36
37
  <slot></slot>
37
38
  </el-select>
38
- <span class="el-input__suffix"
39
+ <span v-if="!disabled" class="el-input__suffix"
39
40
  ><span class="el-input__suffix-inner"
40
41
  ><i class="is-search el-input__icon" :class="suffixIcon || 'el-icon-zoom-in'" @click.stop="searchFn"></i
41
42
  ><i
@@ -75,6 +76,10 @@ export default {
75
76
  allowCreate: {
76
77
  type: Boolean,
77
78
  default: true
79
+ },
80
+ disabled: {
81
+ type: Boolean,
82
+ default: false
78
83
  }
79
84
  },
80
85
  data() {
@@ -514,6 +514,7 @@ export default {
514
514
  this.swiper.slideNext()
515
515
  },
516
516
  selSystem(item) {
517
+ localStorage.setItem('pageInSystemNo', item.NO)
517
518
  this.sltSys = item
518
519
  }
519
520
  }
@@ -1,15 +1,12 @@
1
1
  <template>
2
- <el-carousel height="50px" interval="3000" direction="vertical" indicator-position="none" :autoplay="true">
2
+ <el-carousel height="50px" interval="2000" direction="vertical" indicator-position="none" :autoplay="true">
3
3
  <el-carousel-item v-for="tip in tips" :key="tip.id">
4
4
  <div
5
- v-title="
6
- `${tip.createTime}${tip.busNname}${
7
- tip.busState === '1' ? '营业中' : tip.busState === '2' ? '暂停营业' : '异常'
8
- }${tip.currency}`
9
- "
5
+ v-if="tip.isShow === '1'"
6
+ v-title="`${tip.createTime}${enumData[tip.busState]}${tip.busCode !== 'D001' ? tip.currency || '' : ''}`"
10
7
  :class="`tip_color_${tip.busState}`"
11
8
  >
12
- {{ tip.busNname }}{{ tip.busState === '1' ? '营业中' : tip.busState === '2' ? '暂停营业' : '异常' }}
9
+ {{ tip.busCode | busType }}
13
10
  </div>
14
11
  </el-carousel-item>
15
12
  </el-carousel>
@@ -17,14 +14,53 @@
17
14
 
18
15
  <script>
19
16
  import axios from '../../utils/axios'
17
+ let filterData
18
+ let enumData = {
19
+ D001: '营业中',
20
+ D002: '日终处理',
21
+ D003: '业务截止',
22
+ D004: '营业结束',
23
+ D005: '暂停营业',
24
+ D006: '反关机',
25
+ D007: '系统有异常'
26
+ }
20
27
  export default {
21
28
  name: 'OperatingStatus',
29
+ filters: {
30
+ busType(code) {
31
+ let value = ''
32
+ let item
33
+ switch (code) {
34
+ case 'D001':
35
+ item = filterData.find((c) => c.busCode === 'D001')
36
+ value = `${item.busNname}${enumData[item.busState]}`
37
+ break
38
+ case 'D002':
39
+ item = filterData.find((c) => c.busCode === 'D002')
40
+ value = `${item.busNname}${enumData[item.busState]}`
41
+ break
42
+ case 'ce001':
43
+ item = filterData.find((c) => c.busCode === 'ce001')
44
+ value = `${item.busNname}${enumData[item.busState]}`
45
+ break
46
+ default:
47
+ break
48
+ }
49
+ return value
50
+ }
51
+ },
22
52
  data() {
23
53
  return {
54
+ enumData,
24
55
  tips: [],
25
56
  interval: ''
26
57
  }
27
58
  },
59
+ computed: {
60
+ filtersBusType() {
61
+ return this.$option.filters.busType(this)
62
+ }
63
+ },
28
64
  mounted() {
29
65
  this.getOperatingStatus()
30
66
  },
@@ -32,6 +68,7 @@ export default {
32
68
  async getOperatingStatus() {
33
69
  const { data } = await axios.get(`/bems/portal/portalTopShow/getShowTopAll`)
34
70
  this.tips = data
71
+ filterData = data
35
72
  }
36
73
  }
37
74
  }
@@ -50,13 +87,19 @@ export default {
50
87
  .el-carousel__item:nth-child(n) {
51
88
  background-color: #fff;
52
89
  }
53
- .tip_color_1 {
90
+ .tip_color_D001 {
54
91
  color: var(--color-success);
55
92
  }
56
- .tip_color_2 {
93
+ .tip_color_D002,
94
+ .tip_color_D003,
95
+ .tip_color_D004 {
96
+ color: var(--color-info);
97
+ }
98
+ .tip_color_D005,
99
+ .tip_color_D006 {
57
100
  color: var(--color-warning);
58
101
  }
59
- .tip_color_3 {
102
+ .tip_color_D007 {
60
103
  color: var(--color-danger);
61
104
  }
62
105
  </style>