openatc-components 0.4.17 → 0.4.18

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.
@@ -24,7 +24,7 @@
24
24
  </el-select>
25
25
  <span class="optimiNum">{{$t('openatccomponents.pattern.optimizecycle')}}</span>
26
26
  <el-input v-model="optimizecycle" clearable :placeholder="$t('openatccomponents.common.enter')"></el-input>
27
- <!-- <el-button type="primary" @click="optimize()">{{$t('openatccomponents.pattern.inoptimize')}}</el-button> -->
27
+ <el-button v-if="isTentative" type="primary" @click="optimize()">{{$t('openatccomponents.pattern.inoptimize')}}</el-button>
28
28
  </div>
29
29
  <el-table class="tb-edit" ref="singleTables" row-key="id" :data="tableRing" element-loading-text="Loading" :max-height="tableHeight" fit highlight-current-row id="footerBtn">
30
30
  <el-table-column prop="id" sortable align="center" :label="$t('openatccomponents.overview.id')">
@@ -131,6 +131,10 @@ export default {
131
131
  type: String,
132
132
  default: 'Header'
133
133
  },
134
+ isTentative: {
135
+ type: Boolean,
136
+ default: false
137
+ },
134
138
  tableRing: {
135
139
  type: Array
136
140
  },
@@ -179,7 +183,7 @@ export default {
179
183
  },
180
184
  created () {
181
185
  // this.addMinSplit()
182
- this.addMin()
186
+ // this.addMin()
183
187
  },
184
188
  watch: {
185
189
  list: {
@@ -300,6 +300,7 @@
300
300
  :tableRing="tableRing"
301
301
  :showStyle="showStyle"
302
302
  :styles="styles"
303
+ :isTentative="true"
303
304
  @handleSplit="handleSplit"
304
305
  >
305
306
  </pattern-optimize>
@@ -11,7 +11,46 @@
11
11
  **/
12
12
  <template>
13
13
  <div>
14
- <div v-if="this.nowNumber === 1" class="optimizetype">
14
+ <div 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="optimize()">{{$t('openatccomponents.pattern.inoptimize')}}</el-button> -->
28
+ </div>
29
+ <el-table class="tb-edit" ref="singleTables" row-key="id" :data="tableRing" element-loading-text="Loading" :max-height="tableHeight" fit highlight-current-row id="footerBtn">
30
+ <el-table-column prop="id" sortable align="center" :label="$t('openatccomponents.overview.id')">
31
+ <template slot-scope="scope">
32
+ <span>{{scope.row.id}}</span>
33
+ </template>
34
+ </el-table-column>
35
+ <el-table-column class="table-column" :label="$t('openatccomponents.overview.phase')" align="center">
36
+ <template slot-scope="scope">
37
+ <xdrdirselector Width="70px" Height="70px" Widths="58px" Heights="58px" :Datas="styles" :Data="showStyle" :showlist="scope.row.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
38
+ </template>
39
+ </el-table-column>
40
+ <el-table-column class="table-column" :label="$t('openatccomponents.overview.flow')" align="center">
41
+ <template slot-scope="scope">
42
+ <el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="scope.row.flowperhour" ref="type"></el-input-number>
43
+ <!-- <span>{{scope.row.flowperhour}}</span> -->
44
+ </template>
45
+ </el-table-column>
46
+ <el-table-column align="center" :label="$t('openatccomponents.overview.saturationflow')">
47
+ <template slot-scope="scope">
48
+ <el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="scope.row.saturation" ref="types"></el-input-number>
49
+ <!-- <span>{{scope.row.saturation}}</span> -->
50
+ </template>
51
+ </el-table-column>
52
+ </el-table>
53
+ <!-- <div v-if="this.nowNumber === 1" class="optimizetype">
15
54
  <span>{{$t('openatccomponents.pattern.optimizetype')}}</span>
16
55
  <el-select v-model="value" clearable :placeholder="$t('openatccomponents.common.select')">
17
56
  <el-option
@@ -68,7 +107,7 @@
68
107
  </el-row>
69
108
  </div>
70
109
  </draggable>
71
- </div>
110
+ </div> -->
72
111
  </div>
73
112
  </template>
74
113
  <script>
@@ -84,14 +123,15 @@ export default {
84
123
  },
85
124
  data () {
86
125
  return {
87
- showStyle: {
88
- left: '2px',
89
- top: '0px'
90
- },
91
- styles: {
92
- left: '1px',
93
- top: '0px'
94
- },
126
+ // showStyle: {
127
+ // left: '2px',
128
+ // top: '0px'
129
+ // },
130
+ // styles: {
131
+ // left: '1px',
132
+ // top: '0px'
133
+ // },
134
+ tableHeight: 400,
95
135
  typeOptions: [{
96
136
  value: 'flow-split-opt'
97
137
  }, {
@@ -106,6 +146,15 @@ export default {
106
146
  type: String,
107
147
  default: 'Header'
108
148
  },
149
+ tableRing: {
150
+ type: Array
151
+ },
152
+ showStyle: {
153
+ type: Object
154
+ },
155
+ styles: {
156
+ type: Object
157
+ },
109
158
  contrloType: {
110
159
  type: String
111
160
  },
@@ -154,12 +203,12 @@ export default {
154
203
  },
155
204
  created () {
156
205
  // this.addMinSplit()
157
- this.addMin()
206
+ // this.addMin()
158
207
  },
159
208
  watch: {
160
209
  list: {
161
210
  handler: function () {
162
- this.addMin()
211
+ // this.addMin()
163
212
  // let list = this.$refs.type
164
213
  // let flow = this.$refs.types
165
214
  // console.log(this.list, 'list')
@@ -179,7 +228,7 @@ export default {
179
228
  },
180
229
  stageData: {
181
230
  handler: function () {
182
- this.addMins()
231
+ // this.addMins()
183
232
  // let list = this.$refs.type
184
233
  // let flow = this.$refs.types
185
234
  // console.log(this.list, 'list')
@@ -201,16 +250,19 @@ export default {
201
250
  methods: {
202
251
  optimize () {
203
252
  let _that = this
204
- let newPha = []
205
- for (let i = 0; i < _that.rings.rings.length; i++) {
206
- newPha.push(..._that.rings.rings[i])
207
- }
208
- let phaseData = newPha.map(item => {
209
- return {
210
- id: item.id,
211
- flowperhour: item.flowperhour,
212
- saturation: item.saturation
213
- }
253
+ // let newPha = []
254
+ // for (let i = 0; i < _that.rings.rings.length; i++) {
255
+ // newPha.push(..._that.rings.rings[i])
256
+ // }
257
+ // let phaseData = newPha.map(item => {
258
+ // return {
259
+ // id: item.id,
260
+ // flowperhour: item.flowperhour,
261
+ // saturation: item.saturation
262
+ // }
263
+ // })
264
+ this.tableRing.map(item => {
265
+ delete item.desc
214
266
  })
215
267
  // let patternList = _that.$store.state.globalParam.tscParam.patternList
216
268
  // console.log(patternList, 'patternList')
@@ -220,12 +272,12 @@ export default {
220
272
  'optcycle': _that.optimizecycle,
221
273
  'phaseList': _that.phaseList,
222
274
  'pattern': pattern,
223
- 'phases': phaseData
275
+ 'phases': this.tableRing
224
276
  }
225
277
  let isValidata = []
226
- for (let j = 0; j < newPha.length; j++) {
227
- let comNum = (newPha[j].length / 4) * 1700 * 0.8
228
- isValidata.push(newPha[j].flowperhour > comNum)
278
+ for (let j = 0; j < this.tableRing.length; j++) {
279
+ let comNum = (this.tableRing[j].length / 4) * 1700 * 0.8
280
+ isValidata.push(this.tableRing[j].flowperhour > comNum)
229
281
  }
230
282
  if (isValidata.includes(true)) {
231
283
  this.$confirm(this.$t('openatccomponents.overview.maxFlow'),
@@ -270,25 +322,25 @@ export default {
270
322
  console.log(error)
271
323
  })
272
324
  }
273
- },
274
- addMins () {
275
- for (let i of this.stageData) {
276
- if (!i.flowperhour || !i.saturation) {
277
- i.flowperhour = 0
278
- i.saturation = 1700
279
- i.length = this.list.length
280
- }
281
- }
282
- },
283
- addMin () {
284
- for (let i of this.list) {
285
- if (!i.flowperhour || !i.saturation) {
286
- i.flowperhour = 0
287
- i.saturation = 1700
288
- i.length = this.list.length
289
- }
290
- }
291
325
  }
326
+ // addMins () {
327
+ // for (let i of this.stageData) {
328
+ // if (!i.flowperhour || !i.saturation) {
329
+ // i.flowperhour = 0
330
+ // i.saturation = 1700
331
+ // i.length = this.list.length
332
+ // }
333
+ // }
334
+ // },
335
+ // addMin () {
336
+ // for (let i of this.list) {
337
+ // if (!i.flowperhour || !i.saturation) {
338
+ // i.flowperhour = 0
339
+ // i.saturation = 1700
340
+ // i.length = this.list.length
341
+ // }
342
+ // }
343
+ // }
292
344
  }
293
345
  }
294
346
  </script>
@@ -297,7 +349,7 @@ export default {
297
349
  width: 100%;
298
350
  }
299
351
  .optimizetype{
300
- position: absolute;
352
+ // position: absolute;
301
353
  margin:0 0 10PX 0;
302
354
  .el-input {
303
355
  width: 80PX;