This commit is contained in:
dev02 2022-11-24 10:44:08 +08:00
commit 64d30addcb

View File

@ -68,7 +68,7 @@
</div> </div>
<table class="table table-bordered table-striped text-center m-0"> <table class="table table-bordered table-striped text-center m-0">
<thead class="thead-themed"> <!-- <thead class="thead-themed">
<tr> <tr>
<th>圖號</th> <th>圖號</th>
<th>圖名</th> <th>圖名</th>
@ -99,7 +99,7 @@
<a href="#" class="btn btn-danger">刪除</a> <a href="#" class="btn btn-danger">刪除</a>
</td> </td>
</tr> </tr>
</tbody> </tbody> -->
</table> </table>
</div> </div>
@ -190,4 +190,89 @@
</form> </form>
</div> </div>
</div> </div>
</div> </div>
<script>
$(function () {
initList();
})
function initList() {
let sendData = {
building_tag: pageAct.buiTag
}
objSendData.Data = sendData;
let url = baseApiUrl + "/api/History/GetMainSub";
console.log(url);
function success(res) {
let strHtml = ``;
// let sst = '';
// let sstn = '';
// let mst = '';
$.each(res.data.history_Main_Systems, function (index, val) {
strHtml = ` <thead class="thead-themed">
<tr>
<th>圖號</th>
<th>圖名</th>
<th>原設計</th>
<th>竣工圖</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td>TEST03</td>
<td>TEST03</td>
<td>A-01.dwg</td>
<td></td>
<td>
<a href="#" class="btn btn-info">編輯</a>
<a href="#" class="btn btn-danger">刪除</a>
</td>
</tr>
<tr>
<td>TEST06</td>
<td>TEST06</td>
<td>A-01.dwg</td>
<td>AS-01.dwg</td>
<td>
<a href="#" class="btn btn-info">編輯</a>
<a href="#" class="btn btn-danger">刪除</a>
</td>
</tr>
</tbody>`;
// strHtml += `<li>
// <a href="#" data-filter-tags="user interface buttons compass action dropdown navigation sidebars" data-maintag="${val.main_system_tag}">
// <span class="nav-link-text">${val.full_name}</span>
// </a>
// <ul style="${index == 0 ? `display:block;` : ``}">`;
// $.each(val.history_Sub_systems, function (index2, val2) {
// strHtml += `<li>
// <a href="#" onClick="getData('${val.main_system_tag}', '${val2.sub_system_tag}', '${val2.full_name}')" data-filter-tags="user interface buttons" data-subtag="${val2.sub_system_tag}">
// <span class="nav-link-text">
// ${val2.full_name} ${val2.sub_system_tag}
// </span>
// </a>
// </li>`;
// if (index == 0 && index2 == 0) {
// sst = val2.sub_system_tag;
// mst = val.main_system_tag;
// sstn = val2.full_name;
// }
// });
// strHtml += `</ul> </li>`;
});
$('.table').html(strHtml);
// $('#js_nested_list').html(strHtml);
// getData(mst, sst, sstn);
}
ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send();
}
</script>