修改歷史資料需求

This commit is contained in:
dev02 2023-01-04 09:13:59 +08:00
parent c4a1360677
commit 50e408e48d
7 changed files with 26 additions and 2 deletions

View File

@ -533,6 +533,7 @@ namespace Backend.Controllers
{ "@is_show_riserDiagram", device_Item.is_show_riserDiagram}, { "@is_show_riserDiagram", device_Item.is_show_riserDiagram},
{ "@is_controll", device_Item.is_controll}, { "@is_controll", device_Item.is_controll},
{ "@is_bool", device_Item.is_bool}, { "@is_bool", device_Item.is_bool},
{ "@is_show_history", device_Item.is_show_history},
{ "@created_by", myUserInfo.Userinfo_guid}, { "@created_by", myUserInfo.Userinfo_guid},
}; };
await backendRepository.AddOneByCustomTable(Device_itemDic, "device_item"); await backendRepository.AddOneByCustomTable(Device_itemDic, "device_item");
@ -551,6 +552,7 @@ namespace Backend.Controllers
{ "@is_show_riserDiagram", device_Item.is_show_riserDiagram}, { "@is_show_riserDiagram", device_Item.is_show_riserDiagram},
{ "@is_controll", device_Item.is_controll}, { "@is_controll", device_Item.is_controll},
{ "@is_bool", device_Item.is_bool}, { "@is_bool", device_Item.is_bool},
{ "@is_show_history", device_Item.is_show_history},
{ "@updated_by", myUserInfo.Userinfo_guid}, { "@updated_by", myUserInfo.Userinfo_guid},
{ "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}, { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")},
}; };

View File

@ -44,6 +44,7 @@ namespace Backend.Models
public byte is_controll { get; set; } public byte is_controll { get; set; }
public byte is_bool { get; set; } public byte is_bool { get; set; }
public byte is_link { get; set; } public byte is_link { get; set; }
public int is_show_history { get; set; }
} }
public class Checksame public class Checksame

View File

@ -112,6 +112,7 @@
var data = rel.data; var data = rel.data;
ds = data; ds = data;
console.log(ds)
if (data == null || data.length == 0) { if (data == null || data.length == 0) {
this.data = []; this.data = [];
document.getElementById('loadDataText').innerText = ""; document.getElementById('loadDataText').innerText = "";

View File

@ -352,6 +352,9 @@
{ {
"data": "is_link" "data": "is_link"
}, },
{
"data": "is_show_history"
},
{ {
"data": null, "data": null,
"defaultContent": '<button class="btn btn-primary edit-btn">修改</button> <button class="btn btn-danger del-btn">刪除</button>' "defaultContent": '<button class="btn btn-primary edit-btn">修改</button> <button class="btn btn-danger del-btn">刪除</button>'
@ -409,6 +412,12 @@
} else { } else {
rel.is_link = "是" rel.is_link = "是"
} }
if (rel.is_show_history == 0) {
rel.is_show_history= "否"
} else {
rel.is_show_history = "是"
}
}); });
return data; return data;
@ -657,6 +666,7 @@
is_show_riserDiagram: $('input[name="is_show_riserDiagram"]:checked').val(), is_show_riserDiagram: $('input[name="is_show_riserDiagram"]:checked').val(),
is_controll: $('input[name="is_controll"]:checked').val(), is_controll: $('input[name="is_controll"]:checked').val(),
is_bool: $('input[name="is_bool"]:checked').val(), is_bool: $('input[name="is_bool"]:checked').val(),
is_show_history: $('input[name="is_show_history"]:checked').val()
} }
$.post(url, send_data, function (rel) { $.post(url, send_data, function (rel) {
@ -723,6 +733,7 @@
$("input[name='is_show_riserDiagram'][value='" + rel.data.is_show_riserDiagram + "']").prop("checked", true); $("input[name='is_show_riserDiagram'][value='" + rel.data.is_show_riserDiagram + "']").prop("checked", true);
$("input[name='is_controll'][value='" + rel.data.is_controll + "']").prop("checked", true); $("input[name='is_controll'][value='" + rel.data.is_controll + "']").prop("checked", true);
$("input[name='is_bool'][value='" + rel.data.is_bool + "']").prop("checked", true); $("input[name='is_bool'][value='" + rel.data.is_bool + "']").prop("checked", true);
$("input[name='is_show_history'][value='" + rel.data.is_show_history + "']").prop("checked", true);
$("#device-sub-modal").modal(); $("#device-sub-modal").modal();
} }

View File

@ -52,6 +52,7 @@
<th>是否加入 - 設備燈號中的點位選單</th> <th>是否加入 - 設備燈號中的點位選單</th>
<th>是否為布林值</th> <th>是否為布林值</th>
<th>是否與N4同步</th> <th>是否與N4同步</th>
<th>是否顯示在歷史資料</th>
<th>功能</th> <th>功能</th>
</tr> </tr>
</thead> </thead>
@ -153,6 +154,12 @@
<label class="custom-control-label" for="is_bool">是否為布林值</label> <label class="custom-control-label" for="is_bool">是否為布林值</label>
</div> </div>
</div> </div>
<div class="form-group col-12">
<div class="col-12 mb-2 custom-control custom-checkbox align-content-center">
<input type="checkbox" class="custom-control-input" name="is_show_history" id="is_show_history" value="1" />
<label class="custom-control-label" for="is_show_history">是否顯示在歷史資料</label>
</div>
</div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -189,9 +189,9 @@
i2 = (val2.device != null && i2 == null) ? index2 : null; i2 = (val2.device != null && i2 == null) ? index2 : null;
strHtml += `<li> strHtml += `<li>
<a href="#" data-filter-tags="${val2.full_name.toLowerCase() } ${val2.sub_system_tag.toLowerCase() }" data-subtag="${val2.sub_system_tag}"> <a href="#" data-filter-tags="${val2.full_name.toLowerCase() }" data-subtag="${val2.sub_system_tag}">
<span class="nav-link-text"> <span class="nav-link-text">
${val2.full_name} ${val2.sub_system_tag} ${val2.full_name}
</span> </span>
</a> </a>
<ul style="${(i1 != null ? index == i1 : first) && index2 == i2 ? `display:block;` : ``}">`; <ul style="${(i1 != null ? index == i1 : first) && index2 == i2 ? `display:block;` : ``}">`;

View File

@ -48,6 +48,8 @@ namespace Repository.Models
public string tag_name { get; set; } public string tag_name { get; set; }
public string point_name { get; set; } public string point_name { get; set; }
public string building { get; set; } public string building { get; set; }
public string DisplayName { get; set; }
public string FullName { get; set; }
} }
public class Device_item8 public class Device_item8