_graphManagement.html 檔案上傳 調整中
This commit is contained in:
parent
64d30addcb
commit
edbf57cf79
@ -68,7 +68,7 @@
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered table-striped text-center m-0">
|
||||
<!-- <thead class="thead-themed">
|
||||
<thead class="thead-themed">
|
||||
<tr>
|
||||
<th>圖號</th>
|
||||
<th>圖名</th>
|
||||
@ -79,7 +79,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<!-- <tr>
|
||||
<td>TEST03</td>
|
||||
<td>TEST03</td>
|
||||
<td>A-01.dwg</td>
|
||||
@ -98,8 +98,8 @@
|
||||
<a href="#" class="btn btn-info">編輯</a>
|
||||
<a href="#" class="btn btn-danger">刪除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody> -->
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -135,39 +135,38 @@
|
||||
<input type="text" id="inpName" name="inpName" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown col-md-6 mt-3">
|
||||
<label>主要類別</label>
|
||||
<button class="btn btn-dark dropdown-toggle col-12" type="button" id="dropdownMenuButton"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
主要類別
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#">建築</a>
|
||||
<a class="dropdown-item" href="#">電力控制</a>
|
||||
<a class="dropdown-item" href="#">水力控制</a>
|
||||
<a class="dropdown-item" href="#">系統控制</a>
|
||||
<div class="col-md-6 mt-3">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="example-select">主要類別</label>
|
||||
<select class="form-control" id="example-select select2bs4">
|
||||
<option>建築</option>
|
||||
<option>電力控制</option>
|
||||
<option>水力控制</option>
|
||||
<option>系統控制</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown col-md-6 mt-3">
|
||||
<label>子類別</label>
|
||||
<button class="btn btn-dark dropdown-toggle col-12" type="button" id="dropdownMenuButton"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
子類別
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#">施工詳圖</a>
|
||||
<a class="dropdown-item" href="#">設備規範</a>
|
||||
<a class="dropdown-item" href="#">工程介面圖說</a>
|
||||
<a class="dropdown-item" href="#">門禁規範</a>
|
||||
<a class="dropdown-item" href="#">監控平面圖</a>
|
||||
<a class="dropdown-item" href="#">其它</a>
|
||||
<div class="col-md-6 mt-3">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="example-select">子類別</label>
|
||||
<select class="form-control" id="example-select select2bs4">
|
||||
<option>施工詳圖</option>
|
||||
<option>設備規範</option>
|
||||
<option>工程介面圖說</option>
|
||||
<option>門禁規範</option>
|
||||
<option>監控平面圖</option>
|
||||
<option>其它</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mt-6">
|
||||
<label>原設計</label>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info">上傳檔案</button>
|
||||
<input id="myFile" type="file" style="display:none" />
|
||||
<label for="myFile" type="button" class="file-upload btn btn-info"
|
||||
style="cursor : pointer ">上傳檔案</label>
|
||||
<div id='forFile' class="col-sm-12 forimage mt-2 offset-3 p-0"></div>
|
||||
</div>
|
||||
<div class="col-md-12 mt-1">
|
||||
<small>欲上傳之檔案名稱</small>
|
||||
@ -176,7 +175,10 @@
|
||||
<label>竣工圖</label>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info">上傳檔案</button>
|
||||
<input id="myFile" type="file" style="display:none" />
|
||||
<label for="myFile" type="button" class="file-upload btn btn-info"
|
||||
style="cursor : pointer ">上傳檔案</label>
|
||||
<div id='forFile' class="col-sm-12 forimage mt-2 offset-3 p-0"></div>
|
||||
</div>
|
||||
<div class="col-md-12 mt-1">
|
||||
<small>欲上傳之檔案名稱</small>
|
||||
@ -202,77 +204,35 @@
|
||||
building_tag: pageAct.buiTag
|
||||
}
|
||||
objSendData.Data = sendData;
|
||||
let url = baseApiUrl + "/api/History/GetMainSub";
|
||||
console.log(url);
|
||||
let url = baseApiUrl + "/GraphManage/GraManList";
|
||||
function success(res) {
|
||||
console.log(res);
|
||||
let strHtml = ``;
|
||||
// let sst = '';
|
||||
// let sstn = '';
|
||||
// let mst = '';
|
||||
$.each(res, function (index, val) {
|
||||
|
||||
$.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>`;
|
||||
strHtml = `<tr>
|
||||
<td>${res.code}</td>
|
||||
<td>${res.code}</td>
|
||||
<td>${res.code}</td>
|
||||
<td>${res.code}</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-info">編輯</a>
|
||||
<a href="#" class="btn btn-danger">刪除</a>
|
||||
</td>
|
||||
</tr>`;
|
||||
});
|
||||
|
||||
$('.table').html(strHtml);
|
||||
// $('#js_nested_list').html(strHtml);
|
||||
// getData(mst, sst, sstn);
|
||||
$('tbody').html(strHtml);
|
||||
}
|
||||
ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send();
|
||||
}
|
||||
|
||||
$("#myFile").on("change", function (e) {
|
||||
let fileHelper = new YourTeam.Utility.File();
|
||||
|
||||
if ($('#forFile').length > 0) {
|
||||
$("#forFile").html("");
|
||||
}
|
||||
console.log(this.files);
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user