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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.5.78",
3
+ "version": "0.5.79",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -1484,6 +1484,7 @@ const en = {
1484
1484
  'addplan': 'Click the Add button to add the greenwave Optimize plan',
1485
1485
  'createconfig': 'Click the Edit button to start the configuration',
1486
1486
  'operation': 'Operation',
1487
+ 'simulation': 'Simulation',
1487
1488
  'isdelete': 'Is delete',
1488
1489
  'nochooseplan': 'No route selected!',
1489
1490
  'namerepeat': 'Duplicate route name!',
@@ -1274,6 +1274,7 @@ const ru = {
1274
1274
  'addplan': 'Нажмите кнопку «Добавить» чтобы добавить план координации «зеленой волны»',
1275
1275
  'createconfig': 'Нажмите кнопку редактирования, чтобы начать создание конфигурации',
1276
1276
  'operation': 'Действие',
1277
+ 'simulation': 'Симуляция',
1277
1278
  'isdelete': 'Удалить?',
1278
1279
  'nochooseplan': 'Не выбрана ни одна схема!',
1279
1280
  'namerepeat': 'Название дублируется!',
@@ -1481,6 +1481,7 @@ const zh = {
1481
1481
  'addplan': '点击添加按钮添加绿波协调计划',
1482
1482
  'createconfig': '点击编辑按钮开始生成配置',
1483
1483
  'operation': '操作',
1484
+ 'simulation': '仿真',
1484
1485
  'isdelete': '是否删除',
1485
1486
  'nochooseplan': '未选中任何方案!',
1486
1487
  'namerepeat': '名称重复!',
@@ -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 = ''