openatc-components 0.5.78 → 0.5.79

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.
@@ -45,7 +45,8 @@
45
45
  :maxTableHeight="maxTableHeight"
46
46
  :opt="item.devs"
47
47
  :isAllowedExpand="isAllowedExpand"
48
- @onNewPatternListChange="onNewPatternListChange"/>
48
+ @onNewPatternListChange="onNewPatternListChange"
49
+ @onSimulation="onSimulation"/>
49
50
  </div>
50
51
  </div>
51
52
  </el-tab-pane>
@@ -66,7 +67,8 @@
66
67
  :opt="opt.optPatternList && opt.optPatternList.length > 0 ? opt.optPatternList[0].devs : {}"
67
68
  :isAllowedExpand="isAllowedExpand"
68
69
  :maxTableHeight="maxTableHeight"
69
- @onNewPatternListChange="onNewPatternListChange"/>
70
+ @onNewPatternListChange="onNewPatternListChange"
71
+ @onSimulation="onSimulation"/>
70
72
  </div>
71
73
  <PlanContent v-show="false"
72
74
  :schemeData="schemeData"
@@ -446,6 +448,10 @@ export default {
446
448
  editableTab.devs = devList
447
449
  // this.refreshChart()
448
450
  },
451
+ onSimulation (row) {
452
+ // 向外转发仿真事件(宿主可监听处理)
453
+ this.$emit('onSimulation', row)
454
+ },
449
455
  afterEnter () {
450
456
  if (this.chooseId === 0) {
451
457
  return false
@@ -138,6 +138,11 @@
138
138
  </div>
139
139
  </template>
140
140
  </el-table-column>
141
+ <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.operation')" width="90" v-if="isShowOperation()">
142
+ <template slot-scope="scope">
143
+ <el-button type="primary" size="small" @click="$emit('onSimulation', scope.row)">{{$t('openatccomponents.greenwaveoptimize.simulation')}}</el-button>
144
+ </template>
145
+ </el-table-column>
141
146
  </el-table>
142
147
  </div>
143
148
  </template>
@@ -338,6 +343,10 @@ export default {
338
343
  }
339
344
  return res
340
345
  },
346
+ isShowOperation () {
347
+ // 操作列仅在显式配置 tableColums 包含 'operation' 时显示,避免未配置的宿主意外显示
348
+ return !!(this.tableColums && this.tableColums.length > 0 && this.tableColums.find(item => item === 'operation'))
349
+ },
341
350
  getPeriod (row) {
342
351
  let period = row.timeperiodrange || row.period
343
352
  let res = ''