|
|
@@ -38,23 +38,17 @@ function Channel_Info(j_data,channel_power_infro)
|
|
|
channel_display(j_data,channel_power_infro,channel_infro)
|
|
|
}
|
|
|
|
|
|
-function threshold_mannage(orgin_data,channel_power_infro,threshold)
|
|
|
+function threshold_mannage(orgin_data,channel_power_infro)
|
|
|
{
|
|
|
// 获取要插入新行的DOM元素
|
|
|
const dataList = document.getElementById('threshold_mannage');
|
|
|
|
|
|
// 清空现有的列表项
|
|
|
dataList.innerHTML = '';
|
|
|
- channel_length = threshold.c_upper.act_para.length
|
|
|
- current_upper = threshold.c_upper.act_para
|
|
|
- voltage_upper = threshold.v_upper.act_para
|
|
|
- voltage_lower = threshold.v_lower.act_para
|
|
|
- power_upper = threshold.p_upper.act_para
|
|
|
- consump_upper = threshold.w_upper.act_para
|
|
|
+ channel_length = channel_power_infro.length
|
|
|
//遍历数据数组
|
|
|
- for(let i = 0;i<=channel_length-1;i++)
|
|
|
+ for(let j = 1;j<channel_length;j++)
|
|
|
{
|
|
|
- j = i + 1
|
|
|
// 创建一个新的列表项元素
|
|
|
const listItem = document.createElement('tr');
|
|
|
dataList.appendChild(listItem);
|
|
|
@@ -75,33 +69,38 @@ function threshold_mannage(orgin_data,channel_power_infro,threshold)
|
|
|
|
|
|
//自动生成电流上限列
|
|
|
const current_max_td = document.createElement('td');
|
|
|
- current_max_td.textContent = current_upper[i]
|
|
|
+ c_val = channel_power_infro[j].thr.c_upper.val
|
|
|
+ current_max_td.textContent = c_val
|
|
|
dataList.appendChild(current_max_td);
|
|
|
|
|
|
// 自动生成电压上限列
|
|
|
const voltage_max_td = document.createElement('td');
|
|
|
- voltage_max_td.textContent = voltage_upper[i];
|
|
|
+ u_u_val = channel_power_infro[j].thr.v_upper.val;
|
|
|
+ voltage_max_td.textContent = u_u_val;
|
|
|
dataList.appendChild(voltage_max_td);
|
|
|
|
|
|
// 自动生成电压下限列
|
|
|
const voltage_min_td = document.createElement('td');
|
|
|
- voltage_min_td.textContent = voltage_lower[i];
|
|
|
+ u_l_val = channel_power_infro[j].thr.v_lower.val;
|
|
|
+ voltage_min_td.textContent = u_l_val
|
|
|
dataList.appendChild(voltage_min_td);
|
|
|
|
|
|
// 自动生成功率上限列
|
|
|
const power_max_td = document.createElement('td');
|
|
|
- power_max_td.textContent = power_upper[i];
|
|
|
+ p_val = channel_power_infro[j].thr.p_upper.val;
|
|
|
+ power_max_td.textContent = p_val
|
|
|
dataList.appendChild(power_max_td);
|
|
|
|
|
|
// 自动生成耗电量上限列
|
|
|
const consump_td = document.createElement('td');
|
|
|
- consump_td.textContent = consump_upper[i];
|
|
|
+ c_val = channel_power_infro[j].thr.w_upper.val;
|
|
|
+ consump_td.textContent = c_val
|
|
|
dataList.appendChild(consump_td);
|
|
|
|
|
|
// 自动生成配置按钮列
|
|
|
const operation_td = document.createElement('button');
|
|
|
operation_td.textContent = '配置';
|
|
|
- operation_td.id = "edite"+{i}
|
|
|
+ operation_td.id = "edite"+{j}
|
|
|
operation_td.addEventListener('click', function() {
|
|
|
editRow(orgin_data,threshold,i,channel_power_infro)
|
|
|
});
|