|
@@ -139,6 +139,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 模型参数输入框/下拉框 -->
|
|
|
+ <div class="param-spacer"></div>
|
|
|
<div class="container-block">
|
|
|
<SubTitle title="模式参数" />
|
|
|
</div>
|
|
@@ -169,12 +170,12 @@
|
|
|
<el-button type="primary" @click="updateOpEnergyStrategy">确认</el-button>
|
|
|
<el-button @click="openParameterDialog = false">关闭</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
</el-dialog>
|
|
|
- </el-table>
|
|
|
|
|
|
+
|
|
|
+ </el-table>
|
|
|
<!-- 步骤流程图弹框 -->
|
|
|
- <el-dialog title="步骤流程图" :visible.sync="stepDialogVisible" width="80%" :style="{ height: '80vh' }">
|
|
|
+ <el-dialog title="步骤流程图" :visible.sync="stepDialogVisible" width="80%" :style="{ height: '100vh' }">
|
|
|
<div style="display: flex;">
|
|
|
<div style="width: 50%;" >
|
|
|
<el-steps direction="vertical" :active="currentStepDetail.stepIndex">
|
|
@@ -194,15 +195,15 @@
|
|
|
<el-form-item label="步骤名称">
|
|
|
<el-input v-model="currentStepDetail.stepName"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="策略代码">
|
|
|
- <el-input v-model="currentStepDetail.strategyCode"></el-input>
|
|
|
- </el-form-item>
|
|
|
+<!-- <el-form-item label="策略代码">-->
|
|
|
+<!-- <el-input v-model="currentStepDetail.strategyCode"></el-input>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
<el-form-item label="步骤代码">
|
|
|
<el-input v-model="currentStepDetail.stepCode"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="步骤顺序">
|
|
|
- <el-input v-model="currentStepDetail.stepIndex"></el-input>
|
|
|
- </el-form-item>
|
|
|
+<!-- <el-form-item label="步骤顺序">-->
|
|
|
+<!-- <el-input v-model="currentStepDetail.stepIndex"></el-input>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
<el-form-item label="步骤处理">
|
|
|
<el-input v-model="currentStepDetail.stepHandler"></el-input>
|
|
|
</el-form-item>
|
|
@@ -222,15 +223,18 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div v-else>
|
|
|
- <h3>步骤详情</h3>
|
|
|
- <p><strong>步骤名称:</strong> {{ currentStepDetail.stepName }}</p>
|
|
|
- <p><strong>策略代码:</strong> {{ currentStepDetail.strategyCode }}</p>
|
|
|
- <p><strong>步骤代码:</strong> {{ currentStepDetail.stepCode }}</p>
|
|
|
- <p><strong>步骤顺序:</strong> {{ currentStepDetail.stepIndex }}</p>
|
|
|
- <p><strong>步骤处理:</strong> {{ currentStepDetail.stepHandler }}</p>
|
|
|
- <p><strong>步骤参数:</strong> {{ currentStepDetail.stepParam }}</p>
|
|
|
- <p><strong>目标设施:</strong> {{ currentStepDetail.targetFacs }}</p>
|
|
|
- <p><strong>目标设备:</strong> {{ currentStepDetail.targetDevice }}</p>
|
|
|
+ <h2>步骤详情:</h2>
|
|
|
+ <ul>
|
|
|
+ <li><p><strong>步骤名称:</strong> {{ currentStepDetail.stepName }}</p></li>
|
|
|
+ <li><p><strong>策略代码:</strong> {{ currentStepDetail.strategyCode }}</p></li>
|
|
|
+ <li><p><strong>步骤代码:</strong> {{ currentStepDetail.stepCode }}</p></li>
|
|
|
+ <li><p><strong>步骤顺序:</strong> {{ currentStepDetail.stepIndex }}</p></li>
|
|
|
+ <li><p><strong>步骤处理:</strong> {{ currentStepDetail.stepHandler }}</p></li>
|
|
|
+ <li><p><strong>步骤参数:</strong> {{ currentStepDetail.stepParam }}</p></li>
|
|
|
+ <li><p><strong>目标设施:</strong> {{ currentStepDetail.targetFacs }}</p></li>
|
|
|
+ <li><p><strong>目标设备:</strong> {{ currentStepDetail.targetDevice }}</p></li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
<el-button type="primary" @click="editMode = true">编辑</el-button>
|
|
|
<el-button @click="stepDialogVisible = false">关闭</el-button>
|
|
|
</div>
|
|
@@ -424,7 +428,6 @@ export default {
|
|
|
this.getAreaTree('Area')
|
|
|
this.getList();
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
/** 查询能源策略列表 */
|
|
|
getList() {
|
|
@@ -485,7 +488,8 @@ export default {
|
|
|
handleParameter(row) {
|
|
|
console.log("参数按钮操作!!!!!",row)
|
|
|
this.currentStrategyCode=row.strategyCode
|
|
|
- this.openParameterDialog = true; // 打开弹框
|
|
|
+ this.selectedParamValue = ''; // 重置选中的参数值
|
|
|
+ this.openParameterDialog = true;
|
|
|
this.getStrategyParam(row.strategyCode);
|
|
|
this.getStrategyParamOption(row.strategyType, 'default.controlMode');
|
|
|
console.log("打开参数弹框时的 selectedParamValue:", this.selectedParamValue);
|
|
@@ -497,7 +501,7 @@ export default {
|
|
|
getStrategyParam(strategyCode).then(response => {
|
|
|
const params = response.data.default.controlMode;
|
|
|
this.defaultParams = [
|
|
|
- { paramName: params.paramName, paramValue: this.selectedParamValue, paramValueFormat: params.paramValueFormat },
|
|
|
+ { paramName: params.paramName, paramValue: params.paramValue, paramValueFormat: params.paramValueFormat },
|
|
|
];
|
|
|
console.log(" 获取默认参数", this.defaultParams)
|
|
|
})
|
|
@@ -532,23 +536,19 @@ export default {
|
|
|
getStrategyParam(this.currentStrategyCode).then(response => {
|
|
|
const inverterControlParams = response.data.inverterControl;
|
|
|
console.log("inverterControlParams",inverterControlParams)
|
|
|
+ this.selectedParamKey=inverterControlParams.controlMode.paramValue
|
|
|
+ console.log("selectedParamKey", this.selectedParamKey);
|
|
|
this.paramKeys = Object.keys(inverterControlParams);
|
|
|
console.log("Param Keys:", this.paramKeys);
|
|
|
});
|
|
|
this.getStrategyParamOptions(1, 'inverterControl.controlMode');
|
|
|
break;
|
|
|
case 'powerAndVoltage':
|
|
|
-
|
|
|
// 直接展示文本框,不需要调用接口
|
|
|
getStrategyParam(this.currentStrategyCode).then(response => {
|
|
|
const powerAndVoltageParams = response.data.powerAndVoltage;
|
|
|
this.paramKeys = Object.keys(powerAndVoltageParams);
|
|
|
this.defaultParamsOption = Object.values(powerAndVoltageParams);
|
|
|
- // 重置 powerAndVoltage 模式下的参数值
|
|
|
- this.defaultParamsOption.forEach((item) => {
|
|
|
- item.paramValue = ''; // 或者设置为某个初始值
|
|
|
- });
|
|
|
-
|
|
|
});
|
|
|
break;
|
|
|
default:
|
|
@@ -620,6 +620,7 @@ export default {
|
|
|
stepCode: '',
|
|
|
stepIndex: this.strategyStepOption.length + 1 || 1,
|
|
|
stepHandler: '',
|
|
|
+ strategyCode:this.currentRow.strategyCode,
|
|
|
stepParam: '',
|
|
|
targetFacs: '',
|
|
|
targetDevice: '',
|
|
@@ -746,6 +747,13 @@ export default {
|
|
|
|
|
|
<style lang="css" scoped>
|
|
|
|
|
|
+.param-spacer {
|
|
|
+ margin: 50px 0; /* 这将增加上下各20px的间距 */
|
|
|
+}
|
|
|
+
|
|
|
+.container-block {
|
|
|
+ margin-bottom: 15px; /* 这将为每个参数块增加底部间距 */
|
|
|
+}
|
|
|
.param-label {
|
|
|
display: inline-block;
|
|
|
margin-right: 10px;
|