_graphManagement.html 調整

This commit is contained in:
SinoroWu 2022-11-24 14:47:44 +08:00
parent edbf57cf79
commit b0408184d8

View File

@ -28,34 +28,33 @@
</div> </div>
<div class="row bg-dark p-2 mb-5 align-items-center"> <div class="row bg-dark p-2 mb-5 align-items-center">
<div class="col-auto">
<a href="#" class="btn btn-info">全選</a>
</div>
<div class="col-auto"> <div class="col-auto">
<div class="frame-wrap"> <div class="frame-wrap">
<input id="checkAll" type="checkbox" name="all" onclick="check_all(this,'c')"
style="display:none" />
<label for="checkAll" type="button" class="btn btn-info mr-3">全選</label>
<div class="custom-control custom-checkbox custom-control-inline"> <div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline1"> <input type="checkbox" name="c" class="custom-control-input" id="defaultInline1">
<label class="custom-control-label" for="defaultInline1">施工詳圖</label> <label class="custom-control-label" for="defaultInline1">施工詳圖</label>
</div> </div>
<div class="custom-control custom-checkbox custom-control-inline"> <div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline2"> <input type="checkbox" name="c" class="custom-control-input" id="defaultInline2">
<label class="custom-control-label" for="defaultInline2">設備規範</label> <label class="custom-control-label" for="defaultInline2">設備規範</label>
</div> </div>
<div class="custom-control custom-checkbox custom-control-inline"> <div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline3"> <input type="checkbox" name="c" class="custom-control-input" id="defaultInline3">
<label class="custom-control-label" for="defaultInline3">工程介面圖說</label> <label class="custom-control-label" for="defaultInline3">工程介面圖說</label>
</div> </div>
<div class="custom-control custom-checkbox custom-control-inline"> <div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline4"> <input type="checkbox" name="c" class="custom-control-input" id="defaultInline4">
<label class="custom-control-label" for="defaultInline4">門禁規範</label> <label class="custom-control-label" for="defaultInline4">門禁規範</label>
</div> </div>
<div class="custom-control custom-checkbox custom-control-inline"> <div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline5"> <input type="checkbox" name="c" class="custom-control-input" id="defaultInline5">
<label class="custom-control-label" for="defaultInline5">監控平面圖</label> <label class="custom-control-label" for="defaultInline5">監控平面圖</label>
</div> </div>
<div class="custom-control custom-checkbox custom-control-inline"> <div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline6"> <input type="checkbox" name="c" class="custom-control-input" id="defaultInline6">
<label class="custom-control-label" for="defaultInline6">其它</label> <label class="custom-control-label" for="defaultInline6">其它</label>
</div> </div>
</div> </div>
@ -78,28 +77,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody></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>
</table> </table>
</div> </div>
@ -163,26 +141,22 @@
<label>原設計</label> <label>原設計</label>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<input id="myFile" type="file" style="display:none" /> <input id="myDesignDiagram" type="file" style="display:none" />
<label for="myFile" type="button" class="file-upload btn btn-info" <label for="myDesignDiagram" type="button" class="file-upload btn btn-info"
style="cursor : pointer ">上傳檔案</label> style="cursor : pointer ">上傳檔案</label>
<div id='forFile' class="col-sm-12 forimage mt-2 offset-3 p-0"></div> <div id='forDesignDiagram' class="col-sm-12 forimage mt-2 offset-3 p-0"></div>
</div>
<div class="col-md-12 mt-1">
<small>欲上傳之檔案名稱</small>
</div> </div>
<div id="designDiagram" class="col-md-12 ml-3"></div>
<div class="col-md-12 mt-3"> <div class="col-md-12 mt-3">
<label>竣工圖</label> <label>竣工圖</label>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<input id="myFile" type="file" style="display:none" /> <input id="myAsBuilt" type="file" style="display:none" />
<label for="myFile" type="button" class="file-upload btn btn-info" <label for="myAsBuilt" type="button" class="file-upload btn btn-info"
style="cursor : pointer ">上傳檔案</label> style="cursor : pointer ">上傳檔案</label>
<div id='forFile' class="col-sm-12 forimage mt-2 offset-3 p-0"></div> <div id='forAsBuilt' class="col-sm-12 forimage mt-2 offset-3 p-0"></div>
</div>
<div class="col-md-12 mt-1">
<small>欲上傳之檔案名稱</small>
</div> </div>
<div id="asBuiltDrawing" class="col-md-12 ml-3"></div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@ -195,6 +169,7 @@
</div> </div>
<script> <script>
$(function () { $(function () {
initList(); initList();
}) })
@ -206,7 +181,6 @@
objSendData.Data = sendData; objSendData.Data = sendData;
let url = baseApiUrl + "/GraphManage/GraManList"; let url = baseApiUrl + "/GraphManage/GraManList";
function success(res) { function success(res) {
console.log(res);
let strHtml = ``; let strHtml = ``;
$.each(res, function (index, val) { $.each(res, function (index, val) {
@ -227,12 +201,28 @@
ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send(); ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send();
} }
$("#myFile").on("change", function (e) { // 取上傳檔名
$("#myDesignDiagram").on("change", function (e) {
let fileHelper = new YourTeam.Utility.File(); let fileHelper = new YourTeam.Utility.File();
let fileName = this.files[0].name;
if ($('#forFile').length > 0) { strHtml = `<small>${fileName}</small>`;
$("#forFile").html(""); $('#designDiagram').html(strHtml);
}
console.log(this.files);
}); });
// 取上傳檔名
$("#myAsBuilt").on("change", function (e) {
let fileHelper = new YourTeam.Utility.File();
let fileName = this.files[0].name;
strHtml = `<small>${fileName}</small>`;
$('#asBuiltDrawing').html(strHtml);
});
// 全選功能
function check_all(obj, cName) {
var checkboxs = document.getElementsByName(cName);
for (var i = 0; i < checkboxs.length; i++) { checkboxs[i].checked = obj.checked; }
}
</script> </script>