openatc-components 0.1.108 → 0.1.110

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.
@@ -101,7 +101,7 @@
101
101
 
102
102
  <script>
103
103
  import { getPhase } from './utils'
104
- // import { getIframdevid } from '../../../../utils/auth'
104
+ import { getIframdevid } from '../../../../utils/auth'
105
105
  import { getlockPhase, lockPhase } from '../../../../api/control'
106
106
  import Stages from '../../Stages/index'
107
107
  import RingDataModel from '../../../../utils/RingDataModel.js'
@@ -190,8 +190,9 @@ export default {
190
190
  },
191
191
  getLockPhase (val) {
192
192
  this.directions = [this.checkId(val)]
193
+ let iframdevid = getIframdevid()
193
194
  let param = {
194
- 'agentid': 'config_test',
195
+ 'agentid': iframdevid,
195
196
  'direction': this.directions
196
197
  }
197
198
  getlockPhase(param).then(res => {
@@ -223,8 +224,9 @@ export default {
223
224
  this.$message.error(this.$t('openatccomponents.overview.directionnull'))
224
225
  return
225
226
  }
227
+ let iframdevid = getIframdevid()
226
228
  let submitdata = {
227
- agentid: 'config_test',
229
+ agentid: iframdevid,
228
230
  direction: this.directions,
229
231
  greenflash: this.manualInfo.greenclear,
230
232
  duration: this.manualInfo.duration,
@@ -234,10 +236,22 @@ export default {
234
236
 
235
237
  }
236
238
  lockPhase(submitdata).then(res => {
237
- if (res.data.success !== true) {
239
+ if (!res.data.success) {
240
+ if (res.data.code === '4002' && res.data.data.errorCode === '4209') {
241
+ let success = res.data.data.content.success
242
+ if (success !== 0) {
243
+ let errormsg = 'openatccomponents.overview.putTscControlError' + success
244
+ this.$message.error(this.$t(errormsg))
245
+ return
246
+ }
247
+ }
238
248
  this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
249
+ return
239
250
  }
240
251
  this.$alert(this.$t('openatccomponents.common.download'), { type: 'success' })
252
+ // if (res.data.success !== true) {
253
+ // this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
254
+ // }
241
255
  })
242
256
  }
243
257
  }