openatc-components 0.3.95 → 0.3.97

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.
@@ -222,6 +222,10 @@ export default {
222
222
  type: Boolean,
223
223
  devault: true
224
224
  },
225
+ isShowMessage: {
226
+ type: Boolean,
227
+ default: true
228
+ },
225
229
  roadDirection: {
226
230
  type: String
227
231
  },
@@ -718,7 +722,7 @@ export default {
718
722
  }
719
723
  }
720
724
  msg = msg + ' - ' + commomMsg
721
- this.$message.error(msg)
725
+ this.isShowMessage && this.$message.error(msg)
722
726
  return
723
727
  }
724
728
  this.isLoaded = true
@@ -1040,10 +1044,10 @@ export default {
1040
1044
  let res = data.data
1041
1045
  if (!res.success) {
1042
1046
  if (res.code === '4003') {
1043
- this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
1047
+ this.isShowMessage && this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
1044
1048
  return
1045
1049
  }
1046
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
1050
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
1047
1051
  return
1048
1052
  }
1049
1053
  let channelList = res.data.data.channelList.filter(ele => ele.type !== undefined)
@@ -41,6 +41,7 @@
41
41
  :clickMode="clickMode"
42
42
  :isThirdSignal="isThirdSignal"
43
43
  :channelType="channelType"
44
+ :isShowMessage ="isShowMessage"
44
45
  @handleClickCrossIcon="handleClickCrossIcon" />
45
46
  </div>
46
47
  </div>
@@ -84,6 +85,10 @@ export default {
84
85
  type: Boolean,
85
86
  default: true
86
87
  },
88
+ isShowMessage: {
89
+ type: Boolean,
90
+ default: true
91
+ },
87
92
  roadDirection: {
88
93
  type: String,
89
94
  default: 'right'
@@ -23,6 +23,7 @@
23
23
  :stateName="stateName"
24
24
  :isShowMode="isShowMode"
25
25
  :isShowState="isShowState"
26
+ :isShowMessage ="isShowMessage"
26
27
  :isShowInterval="isShowInterval"
27
28
  @onSelectStages="onSelectStages"/>
28
29
  </div>
@@ -73,6 +74,10 @@ export default {
73
74
  type: Boolean,
74
75
  default: true
75
76
  },
77
+ isShowMessage: {
78
+ type: Boolean,
79
+ default: true
80
+ },
76
81
  isShowState: {
77
82
  type: Boolean,
78
83
  devault: false
@@ -140,7 +145,7 @@ export default {
140
145
  }
141
146
  }
142
147
  msg = msg + ' - ' + commomMsg
143
- this.$message.error(msg)
148
+ this.isShowMessage && this.$message.error(msg)
144
149
  if (this.isResend) {
145
150
  this.reSend()
146
151
  }
@@ -192,7 +197,7 @@ export default {
192
197
  // this.devStatus = 2
193
198
  this.clearPatternInterval() // 清除其他定时器
194
199
  this.clearVolumeInterval()
195
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale) + ' - ' + commomMsg)
200
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale) + ' - ' + commomMsg)
196
201
  if (this.isResend) {
197
202
  this.reSend()
198
203
  }
@@ -208,7 +213,7 @@ export default {
208
213
  }
209
214
  }
210
215
  msg = msg + ' - ' + commomMsg
211
- this.$message.error(msg)
216
+ this.isShowMessage && this.$message.error(msg)
212
217
  this.clearPatternInterval() // 清除其他定时器
213
218
  if (this.isResend) {
214
219
  this.reSend()
@@ -222,7 +227,7 @@ export default {
222
227
  this.controlData = this.controlFormat.handleGetData(param)
223
228
  this.$emit('getTscControl', data)
224
229
  }).catch(error => {
225
- this.$message.error(error)
230
+ this.isShowMessage && this.$message.error(error)
226
231
  console.log(error)
227
232
  })
228
233
  },
@@ -235,7 +240,7 @@ export default {
235
240
  if (!res.data.success) {
236
241
  let commomMsg = this.$t('openatccomponents.overview.signalID') + ': ' + this.AgentId
237
242
  let msg = getMessageByCode(res.data.code, this.$i18n.locale) + ', ' + commomMsg
238
- this.$message.error(msg)
243
+ this.isShowMessage && this.$message.error(msg)
239
244
  return
240
245
  }
241
246
  let devParams = res.data.data.jsonparam
@@ -295,7 +300,7 @@ export default {
295
300
  let success = data.data.data.content.success
296
301
  if (success !== 0) {
297
302
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
298
- this.$message.error(this.$t(errormsg))
303
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
299
304
  return
300
305
  }
301
306
  }
@@ -330,7 +335,7 @@ export default {
330
335
  }
331
336
  if (!data.data.success) {
332
337
  if (data.data.code === '4003') {
333
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
338
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
334
339
  return
335
340
  }
336
341
  let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
@@ -339,10 +344,10 @@ export default {
339
344
  let childErrorCode = data.data.data.errorCode
340
345
  if (childErrorCode) {
341
346
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
342
- this.$message.error(parrenterror + ',' + childerror)
347
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
343
348
  }
344
349
  } else {
345
- this.$message.error(parrenterror)
350
+ this.isShowMessage && this.$message.error(parrenterror)
346
351
  }
347
352
  return
348
353
  }
@@ -359,7 +364,7 @@ export default {
359
364
  controlData: controlData
360
365
  }
361
366
  }).catch(error => {
362
- this.$message.error(error)
367
+ this.isShowMessage && this.$message.error(error)
363
368
  console.log(error)
364
369
  })
365
370
  },
@@ -368,10 +373,10 @@ export default {
368
373
  let res = data.data
369
374
  if (!res.success) {
370
375
  if (res.code === '4003') {
371
- this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
376
+ this.isShowMessage && this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
372
377
  return
373
378
  }
374
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
379
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
375
380
  return
376
381
  }
377
382
  this.phaseList = res.data.data.phaseList
@@ -0,0 +1,2 @@
1
+ import OptimizeKanban from './OptimizeKanban.vue'
2
+ export default OptimizeKanban
@@ -0,0 +1,369 @@
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ <template>
13
+ <div class="kanbanOptimize">
14
+ <div v-if="this.nowNumber === 1" class="optimizetype">
15
+ <span>{{$t('openatccomponents.pattern.optimizetype')}}</span>
16
+ <el-select v-model="value" clearable :placeholder="$t('openatccomponents.common.select')">
17
+ <el-option
18
+ v-for="item in typeOptions"
19
+ :key="item.value"
20
+ :label="$t('openatccomponents.overview.type' + item.value)"
21
+ :value="item.value"
22
+ >
23
+ </el-option>
24
+ </el-select>
25
+ <span class="optimiNum">{{$t('openatccomponents.pattern.optimizecycle')}}</span>
26
+ <el-input v-model="optimizecycle" clearable :placeholder="$t('openatccomponents.common.enter')"></el-input>
27
+ <!-- <el-button type="primary" @click="onOptimizeClick()">{{$t('openatccomponents.pattern.inoptimize')}}</el-button> -->
28
+ </div>
29
+ <div class="common-board-column" :style="{marginTop:this.nowNumber === 1 ? 0 : '50px',marginLeft:this.nowNumber === 1 ? 0 : 0}">
30
+ <div class="common-board-column-header">
31
+ {{headerText}}
32
+ </div>
33
+ <div class="openatccomponents-board-table-header">
34
+ <el-row :gutter="13">
35
+ <el-col :span="4">{{this.$t('openatccomponents.overview.phase')}}
36
+ </el-col>
37
+ <el-col :span="10">{{this.$t('openatccomponents.overview.flow')}}
38
+ </el-col>
39
+ <el-col :span="10">{{this.$t('openatccomponents.overview.saturationflow')}}
40
+ </el-col>
41
+ </el-row>
42
+ </div>
43
+ <draggable
44
+ class="common-board-column-content"
45
+ :list="list"
46
+ :options="options">
47
+ <div class="common-board-item" v-for="element in list" :key="element.id">
48
+ <el-row :gutter="13">
49
+ <el-col :span="4">
50
+ <el-tooltip class="item" effect="dark" placement="left">
51
+ <div slot="content">{{element.name}}</div>
52
+ <div class="common-phase-description">
53
+ <xdrdirselector Width="70px" Height="70px" Widths="58px" Heights="58px" :Datas="styles" :Data="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
54
+ </div>
55
+ </el-tooltip>
56
+ </el-col>
57
+ <el-col :span="10">
58
+ <el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="element.flowperhour" ref="type" :disabled="element.mode === 7"></el-input-number>
59
+ </el-col>
60
+ <el-col :span="10">
61
+ <el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="element.saturation" ref="types" :disabled="element.mode === 7"></el-input-number>
62
+ </el-col>
63
+ </el-row>
64
+ </div>
65
+ </draggable>
66
+ </div>
67
+ </div>
68
+ </template>
69
+ <script>
70
+ import draggable from 'vuedraggable'
71
+ import { getDuration } from '@/api/cross'
72
+ import xdrdirselector from '@/components/XRDDirSelector'
73
+
74
+ export default {
75
+ name: 'patternOptimize',
76
+ components: {
77
+ draggable,
78
+ xdrdirselector
79
+ },
80
+ data () {
81
+ return {
82
+ showStyle: {
83
+ left: '7px',
84
+ top: '0px'
85
+ },
86
+ styles: {
87
+ left: '7px',
88
+ top: '0px'
89
+ },
90
+ typeOptions: [{
91
+ value: 'flow-split-opt'
92
+ }, {
93
+ value: 'cycle-opt'
94
+ }],
95
+ value: 'flow-split-opt',
96
+ optimizecycle: 0
97
+ }
98
+ },
99
+ props: {
100
+ headerText: {
101
+ type: String,
102
+ default: 'Header'
103
+ },
104
+ id: {
105
+ type: Number
106
+ },
107
+ rings: {
108
+ type: Array
109
+ },
110
+ nowNumber: {
111
+ type: Number
112
+ },
113
+ phaseList: {
114
+ type: Array
115
+ },
116
+ options: {
117
+ type: Object,
118
+ default () {
119
+ return {}
120
+ }
121
+ },
122
+ list: {
123
+ type: Array,
124
+ default () {
125
+ return []
126
+ }
127
+ },
128
+ // index: {
129
+ // type: Number
130
+ // },
131
+ ISActiveMask: {
132
+ type: Boolean,
133
+ default: true
134
+ },
135
+ // 当phase的描述为空时,显示的图形颜色。
136
+ MaskColor: {
137
+ type: String,
138
+ default: '#000000'
139
+ }
140
+ },
141
+ created () {
142
+ // this.addMinSplit()
143
+ this.addMin()
144
+ },
145
+ computed () {
146
+
147
+ },
148
+ watch: {
149
+ list: {
150
+ handler: function () {
151
+ // let list = this.$refs.type
152
+ // let flow = this.$refs.types
153
+ // console.log(this.list, 'list')
154
+ // let cycle = 0
155
+ // let n = this.index
156
+ // for (let i = 0; i < list.length; i++) {
157
+ // cycle = cycle + Number(list[i].currentValue)
158
+ // }
159
+ // const globalParamModel = this.$store.getters.globalParamModel
160
+ // // let MaxCycle = globalParamModel.getParamsByType('patternList')[n].cycle
161
+ // let pattern = globalParamModel.getParamsByType('patternList')[n]
162
+ // globalParamModel.getParamsByType('patternList')[n].cycle = this.getMaxCycle(pattern)
163
+ // this.addMinSplit()
164
+ // this.$emit('handleSplit', n)
165
+ },
166
+ deep: true
167
+ }
168
+ },
169
+ methods: {
170
+ onOptimizeClick () {
171
+ let msg = this.$t('openatccomponents.pattern.algorithmEngineOptimization')
172
+ const loading = this.$loading({
173
+ lock: true,
174
+ text: msg,
175
+ spinner: 'el-icon-loading',
176
+ background: 'rgba(0, 0, 0, 0.7)'
177
+ })
178
+ setTimeout(() => {
179
+ loading.close()
180
+ this.handeleOptimizeClick()
181
+ }, 1000)
182
+ },
183
+ handeleOptimizeClick () {
184
+ let newPha = []
185
+ for (let i = 0; i < this.rings.length; i++) {
186
+ newPha.push(...this.rings[i])
187
+ }
188
+ let phaseData = newPha.map(item => {
189
+ return {
190
+ id: item.id,
191
+ flowperhour: item.flowperhour,
192
+ saturation: item.saturation
193
+ }
194
+ })
195
+ let patternList = this.$store.state.globalParam.tscParam.patternList
196
+ let pattern = patternList.filter((item) => item.id === this.id)[0]
197
+ let reqData = {
198
+ 'type': this.value,
199
+ 'optcycle': this.optimizecycle ? this.optimizecycle : 0,
200
+ 'phaseList': this.phaseList,
201
+ 'pattern': pattern,
202
+ 'phases': phaseData
203
+ }
204
+ let isValidata = []
205
+ for (let j = 0; j < newPha.length; j++) {
206
+ let comNum = (newPha[j].length / 4) * 1700 * 0.8
207
+ isValidata.push(newPha[j].flowperhour > comNum)
208
+ }
209
+ if (isValidata.includes(true)) {
210
+ this.$confirm(this.$t('openatccomponents.overview.maxFlow'),
211
+ this.$t('openatccomponents.common.alarm'), {
212
+ confirmButtonText: this.$t('eopenatccomponentsdge.common.confirm'),
213
+ cancelButtonText: this.$t('openatccomponents.common.cancel'),
214
+ type: 'warning'
215
+ }).then(() => {
216
+ getDuration(reqData).then(data => {
217
+ if (data.data.success) {
218
+ this.$message({
219
+ type: 'success',
220
+ message: this.$t('openatccomponents.pattern.success')
221
+ })
222
+ for (let i = 0; i < this.rings.length; i++) {
223
+ for (let j = 0; j < this.rings[i].length; j++) {
224
+ for (let h = 0; h < data.data.data.phase.length; h++) {
225
+ if (this.rings[i][j].id === data.data.data.phase[h].id) {
226
+ this.rings[i][j].value = data.data.data.phase[h].duration
227
+ // this.rings[i][j].cycle = data.data.data.phase[h].cycle
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+ }).catch(error => {
234
+ console.log(error)
235
+ })
236
+ }).catch(() => {
237
+ })
238
+ } else {
239
+ getDuration(reqData).then(data => {
240
+ if (data.data.success) {
241
+ this.$message({
242
+ type: 'success',
243
+ message: this.$t('openatccomponents.pattern.success')
244
+ })
245
+ for (let i = 0; i < this.rings.length; i++) {
246
+ for (let j = 0; j < this.rings[i].length; j++) {
247
+ for (let h = 0; h < data.data.data.phase.length; h++) {
248
+ if (this.rings[i][j].id === data.data.data.phase[h].id) {
249
+ this.rings[i][j].value = data.data.data.phase[h].duration
250
+ // this.rings[i][j].cycle = data.data.data.phase[h].cycle
251
+ }
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }).catch(error => {
257
+ console.log(error)
258
+ })
259
+ }
260
+ },
261
+ addMin () {
262
+ for (let i of this.list) {
263
+ if (!i.flowperhour || !i.saturation) {
264
+ i.length = this.list.length
265
+ i.flowperhour = 0
266
+ i.saturation = 1700
267
+ }
268
+ }
269
+ }
270
+ // addMinSplit () {
271
+ // const globalParamModel = this.$store.getters.globalParamModel
272
+ // let phaseList = globalParamModel.getParamsByType('phaseList')
273
+ // for (let ls of this.list) {
274
+ // let phase = phaseList.filter((item) => {
275
+ // return item.id === ls.id
276
+ // })[0]
277
+ // if (!phase.redyellow) {
278
+ // phase.redyellow = 0
279
+ // }
280
+ // if (!phase.yellow) {
281
+ // phase.yellow = 0
282
+ // }
283
+ // if (!phase.redclear) {
284
+ // phase.redclear = 0
285
+ // }
286
+ // if (!phase.flashgreen) {
287
+ // phase.flashgreen = 0
288
+ // }
289
+ // if (!phase.phasewalk) {
290
+ // phase.phasewalk = 0
291
+ // }
292
+ // if (!phase.pedclear) {
293
+ // phase.pedclear = 0
294
+ // }
295
+ // // let temp1 = phase.redyellow + phase.yellow + phase.redclear + phase.flashgreen // 绿信比的最小值要大于最小绿+黄灯+全红+绿闪
296
+ // // let temp2 = phase.phasewalk + phase.pedclear
297
+ // // if (temp1 > temp2) {
298
+ // // ls.minSplit = temp1
299
+ // // } else {
300
+ // // ls.minSplit = temp2
301
+ // // }
302
+ // // if (ls.mode !== 7 && ls.value < ls.minSplit) {
303
+ // // ls.value = ls.minSplit
304
+ // // }
305
+ // // let temp1 = phase.yellow + phase.redclear + phase.flashgreen // 绿信比的最小值要大于最小绿+黄灯+全红+绿闪
306
+ // let temp1 = phase.yellow + phase.redclear + phase.mingreen
307
+ // let temp2 = phase.yellow + phase.redclear + phase.phasewalk + phase.pedclear
308
+ // ls.minSplit = temp1 > temp2 ? temp1 : temp2
309
+ // if (ls.mode !== 7 && ls.value < ls.minSplit) {
310
+ // ls.value = ls.minSplit
311
+ // this.$message.error(this.$t('openatccomponents.pattern.splitCheckMsg'))
312
+ // }
313
+ // }
314
+ // },
315
+ // getMaxCycle (pattern) {
316
+ // let rings = pattern.rings
317
+ // let maxCycle = 0
318
+ // for (let ring of rings) {
319
+ // if (ring.length === 0) continue
320
+ // let cycle = 0
321
+ // for (let r of ring) {
322
+ // if (r.mode === 7) { // 忽略相位不计周期
323
+ // continue
324
+ // }
325
+ // cycle = cycle + r.value
326
+ // }
327
+ // if (cycle > maxCycle) {
328
+ // maxCycle = cycle
329
+ // }
330
+ // }
331
+ // return maxCycle
332
+ // },
333
+ // doChange (val) {
334
+ // // if (val.mode === 7) {
335
+ // // val.value = 0
336
+ // // } else {
337
+ // // val.value = 30
338
+ // // }
339
+ // }
340
+ }
341
+ }
342
+ </script>
343
+ <style lang="scss" scoped>
344
+ .col-content {
345
+ width: 100%;
346
+ }
347
+ .kanbanOptimize {
348
+ .common-board-column {
349
+ max-width: unset !important;
350
+ }
351
+ }
352
+ .optimizetype{
353
+ // float: left;
354
+ font-size: 14PX;
355
+ margin:0 0 10PX 0;
356
+ .el-input {
357
+ width: 80PX;
358
+ }
359
+ .el-select{
360
+ width: 145PX;
361
+ }
362
+ .el-button {
363
+ margin-left: 10PX;
364
+ }
365
+ .optimiNum {
366
+ padding-left: 10PX;
367
+ }
368
+ }
369
+ </style>
@@ -20,6 +20,8 @@
20
20
  :stateName="stateName"
21
21
  :crossStatusData="crossStatusData"
22
22
  :agentId="agentId"
23
+ :isShowMessage ="isShowMessage"
24
+ :isShowInterval="isShowInterval"
23
25
  :roadDirection="roadDirection" />
24
26
  <channelization
25
27
  v-if="curHomePage === 'Channelization'"
@@ -132,6 +134,14 @@ export default {
132
134
  type: String,
133
135
  default: 'right'
134
136
  },
137
+ isShowInterval: {
138
+ type: Boolean,
139
+ default: true
140
+ },
141
+ isShowMessage: {
142
+ type: Boolean,
143
+ default: true
144
+ },
135
145
  isfromatc: {
136
146
  type: Boolean,
137
147
  default: true
@@ -140,6 +150,7 @@ export default {
140
150
  data () {
141
151
  return {
142
152
  stateName: this.$t('openatccomponents.overview.offline'),
153
+ curBodyWidth: 1920,
143
154
  controlData: {},
144
155
  checked: false,
145
156
  overlap: [],
@@ -317,10 +328,10 @@ export default {
317
328
  // let childErrorCode = data.data.data.errorCode
318
329
  // if (childErrorCode) {
319
330
  // let childerror = getMessageByCode(data.data.data.errorCode, _this.$i18n.locale)
320
- // _this.$message.error(parrenterror + ',' + childerror)
331
+ // _this.isShowMessage && _this.$message.error(parrenterror + ',' + childerror)
321
332
  // }
322
333
  // } else {
323
- // _this.$message.error(parrenterror)
334
+ // _this.isShowMessage && _this.$message.error(parrenterror)
324
335
  // }
325
336
  _this.curHomePage = 'Graphical'
326
337
  return
@@ -360,7 +371,7 @@ export default {
360
371
  let success = data.data.data.content.success
361
372
  if (success !== 0) {
362
373
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
363
- this.$message.error(this.$t(errormsg))
374
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
364
375
  return
365
376
  }
366
377
  }
@@ -370,10 +381,10 @@ export default {
370
381
  let childErrorCode = data.data.data.errorCode
371
382
  if (childErrorCode) {
372
383
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
373
- this.$message.error(parrenterror + ',' + childerror)
384
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
374
385
  }
375
386
  } else {
376
- this.$message.error(parrenterror)
387
+ this.isShowMessage && this.$message.error(parrenterror)
377
388
  }
378
389
  if (this.isResend) {
379
390
  this.reSend()
@@ -435,7 +446,7 @@ export default {
435
446
  let success = data.data.data.content.success
436
447
  if (success !== 0) {
437
448
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
438
- this.$message.error(this.$t(errormsg))
449
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
439
450
  return
440
451
  }
441
452
  }
@@ -443,7 +454,7 @@ export default {
443
454
  // this.devStatus = 2
444
455
  this.clearPatternInterval() // 清除其他定时器
445
456
  this.clearVolumeInterval()
446
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
457
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
447
458
  if (this.isResend) {
448
459
  this.reSend()
449
460
  }
@@ -455,10 +466,10 @@ export default {
455
466
  let childErrorCode = data.data.data.errorCode
456
467
  if (childErrorCode) {
457
468
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
458
- this.$message.error(parrenterror + ',' + childerror)
469
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
459
470
  }
460
471
  } else {
461
- this.$message.error(parrenterror)
472
+ this.isShowMessage && this.$message.error(parrenterror)
462
473
  }
463
474
  this.clearPatternInterval() // 清除其他定时器
464
475
  this.clearVolumeInterval()
@@ -478,7 +489,7 @@ export default {
478
489
  console.log('this.controlData', this.controlData)
479
490
  this.checkStage(this.controlData)
480
491
  }).catch(error => {
481
- // this.$message.error(error)
492
+ // this.isShowMessage && this.$message.error(error)
482
493
  console.log(error)
483
494
  })
484
495
  },
@@ -701,7 +712,7 @@ export default {
701
712
  queryDevParams () {
702
713
  queryDevice(this.AgentId).then(res => {
703
714
  if (!res.data.success) {
704
- this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
715
+ this.isShowMessage && this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
705
716
  return
706
717
  }
707
718
  let devParams = res.data.data.jsonparam
@@ -733,7 +744,7 @@ export default {
733
744
  let success = data.data.data.content.success
734
745
  if (success !== 0) {
735
746
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
736
- this.$message.error(this.$t(errormsg))
747
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
737
748
  return
738
749
  }
739
750
  }
@@ -743,10 +754,10 @@ export default {
743
754
  let childErrorCode = data.data.data.errorCode
744
755
  if (childErrorCode) {
745
756
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
746
- this.$message.error(parrenterror + ',' + childerror)
757
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
747
758
  }
748
759
  } else {
749
- this.$message.error(parrenterror)
760
+ this.isShowMessage && this.$message.error(parrenterror)
750
761
  }
751
762
  return
752
763
  }
@@ -758,7 +769,7 @@ export default {
758
769
  getPlatform () {
759
770
  queryDevice(this.AgentId).then(res => {
760
771
  if (!res.data.success) {
761
- this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
772
+ this.isShowMessage && this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
762
773
  return
763
774
  }
764
775
  let devParams = res.data.data.jsonparam