openatc-components 0.5.78 → 0.5.80
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/kisscomps/components/patternConfig/index.vue +8 -2
- package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +16 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/en.js +1 -0
- package/src/i18n/language/ru.js +1 -0
- package/src/i18n/language/zh.js +1 -0
- package/src/kisscomps/components/patternConfig/index.vue +8 -2
- package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +16 -1
|
@@ -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
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
**/
|
|
12
12
|
<template>
|
|
13
13
|
<div class="app-container" ref="pattern-container">
|
|
14
|
-
<el-table :data="newPatternList" :max-height="tableHeight" id="footerBtn" :show-header="isShowTableHeader">
|
|
14
|
+
<el-table :data="newPatternList" :max-height="tableHeight" id="footerBtn" :show-header="isShowTableHeader" :key="tableKey">
|
|
15
15
|
<el-table-column :type="isAllowedExpand ? 'expand' : ''" v-if="isAllowedExpand">
|
|
16
16
|
<template slot-scope="scope">
|
|
17
17
|
<div v-if="isAllowedExpand && isSingleCrossMode" class="optimizetype">
|
|
@@ -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>
|
|
@@ -204,6 +209,12 @@ export default {
|
|
|
204
209
|
}
|
|
205
210
|
}
|
|
206
211
|
return max
|
|
212
|
+
},
|
|
213
|
+
tableKey () {
|
|
214
|
+
// tableColums / isAllowedExpand 变化会动态增减列,element-ui 的列注册仅在
|
|
215
|
+
// mounted 时按 DOM 位置记录一次,实例复用会导致列顺序错乱,
|
|
216
|
+
// 因此列配置变化时通过 key 强制重建表格,保证列顺序与配置一致
|
|
217
|
+
return `${(this.tableColums || []).join(',')}#${this.isAllowedExpand}`
|
|
207
218
|
}
|
|
208
219
|
},
|
|
209
220
|
data () {
|
|
@@ -338,6 +349,10 @@ export default {
|
|
|
338
349
|
}
|
|
339
350
|
return res
|
|
340
351
|
},
|
|
352
|
+
isShowOperation () {
|
|
353
|
+
// 操作列仅在显式配置 tableColums 包含 'operation' 时显示,避免未配置的宿主意外显示
|
|
354
|
+
return !!(this.tableColums && this.tableColums.length > 0 && this.tableColums.find(item => item === 'operation'))
|
|
355
|
+
},
|
|
341
356
|
getPeriod (row) {
|
|
342
357
|
let period = row.timeperiodrange || row.period
|
|
343
358
|
let res = ''
|