diff --git a/Backend/wwwroot/upload/build_map/0b5b84e1-9f21-4ebb-975f-efd96d10182e.nwd b/Backend/wwwroot/upload/build_map/0b5b84e1-9f21-4ebb-975f-efd96d10182e.nwd
new file mode 100644
index 0000000..86ab61d
Binary files /dev/null and b/Backend/wwwroot/upload/build_map/0b5b84e1-9f21-4ebb-975f-efd96d10182e.nwd differ
diff --git a/Backend/wwwroot/upload/build_map/800078cd-e686-4e2f-bd3e-a385cf9a3d02.nwd b/Backend/wwwroot/upload/build_map/800078cd-e686-4e2f-bd3e-a385cf9a3d02.nwd
new file mode 100644
index 0000000..86ab61d
Binary files /dev/null and b/Backend/wwwroot/upload/build_map/800078cd-e686-4e2f-bd3e-a385cf9a3d02.nwd differ
diff --git a/Frontend/_dashboard.html b/Frontend/_dashboard.html
index cc6a73a..9761439 100644
--- a/Frontend/_dashboard.html
+++ b/Frontend/_dashboard.html
@@ -183,14 +183,10 @@
-->
- ${res.code} |
- ${res.code} |
+ ${res.oriOrgName} |
+ ${res.donOrgName} |
${res.code} |
${res.code} |
@@ -277,59 +277,138 @@
}
// 新增資料
- onEvent('click', '#accManSendBtn', function () {
+ onEvent('click', '#close', function () {
let url = baseApiUrl + "/GraphManage/SaveGraMan";
- pageAct.opeFirmId = $(this).parent().data('id')
- objSendData.Data = { id: pageAct.opeFirmId };
- ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
- if (!res || res.code != "0000" || !res.data) {
- } else {
- pageAct.opeFirmAct = 'edit';
- selSysMain(res.data.device_system_category_layer2);
- $('#uploadForm input[id=picNum]').val(res.data.name);
- $('#uploadForm input[id=picName]').val(res.data.contact_person);
- $('#uploadForm select[id=selMain]').val(res.data.device_system_category_layer2).change();
- $('#uploadForm select[id=selSub]').val(res.data.device_system_category_layer3).change();
- $('#uploadForm input[id=myDesignDiagram]').val(res.data.phone);
- $('#uploadForm input[id=myAsBuilt]').val(res.data.email);
+ let fd = new FormData();
+
+ fd.append("main_system_tag", $("#upSelMain").val());
+ fd.append("sub_system_tag", $("#upSelSub").val());
+ fd.append("name", $("#upPicName").val());
+ fd.append("oriOrgName", $("#upMyDesignDiagram").val());
+ fd.append("donOrgName", $("#upMyAsBuilt").val());
+ // fd.append("oriFile", $("#upMyAsBuilt").val());
+ // fd.append("donFile", $("#upMyAsBuilt").val());
+ fd.append("oriFile", this.files);
+ // fd.append("donFile", fileHelper2);
+ // fd.append("product[photos][]", e.target.files[i]);
+ console.log("查看", fd);
+
+ $.ajax({
+ url: url,
+ type: "POST",
+ data: fd,
+ async: false,
+ cache: false,
+ contentType: false,
+ processData: false,
+ beforeSend: function (xhr) { xhr.setRequestHeader('Authorization', "Bearer " + localStorage.getItem("JWT-Authorization")) },
+ success: function (res) {
+ if (!res || res.code != "0000" || !res.data) {
+
+ } else {
+ console.log("error");
+ }
}
- }, null, "POST").send()
+ });
+
+ // let url = baseApiUrl + "/GraphManage/SaveGraMan";
+ // pageAct.opeFirmId = $(this).parent().data('id')
+ // objSendData.Data = { id: pageAct.opeFirmId };
+ // ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
+ // if (!res || res.code != "0000" || !res.data) {
+
+ // } else {
+ // pageAct.opeFirmAct = 'edit';
+ // selSysMain(res.data.device_system_category_layer2);
+ // $('#uploadForm input[id=picNum]').val(res.data.name);
+ // $('#uploadForm input[id=picName]').val(res.data.contact_person);
+ // $('#uploadForm select[id=selMain]').val(res.data.device_system_category_layer2).change();
+ // $('#uploadForm select[id=selSub]').val(res.data.device_system_category_layer3).change();
+ // $('#uploadForm input[id=myDesignDiagram]').val(res.data.phone);
+ // $('#uploadForm input[id=myAsBuilt]').val(res.data.email);
+ // }
+ // }, null, "POST").send()
});
- // 取上傳檔名
+ // 上傳檔案
+ var imageUploadFormOS = 0;
$("#upMyDesignDiagram").on("change", function (e) {
let fileHelper = new YourTeam.Utility.File();
- let fileName = this.files[0].name;
- strHtml = `${fileName}`;
- $('#upDesignDiagram').html(strHtml);
+ if ($('#upForDesignDiagram p').length > 0) {
+ $("#upForDesignDiagram").html("");
+ }
+ console.log(this.files);
+ imageUploadFormOS = this.files.length;
+
+ let maxlength = $("#upForDesignDiagram").data("maxlength");
+ if (maxlength) {
+ if (imageUploadFormOS + $('#upForDesignDiagram img').length > maxlength) {
+ ShowModal("error", "uplImgOverLen", "�L�k�W��", "�̦h�u��W��" + maxlength + "�i�A�z�w�g�W�X�W�Ǽƶq�C");
+ $("#upMyDesignDiagram").val("");
+ return false;
+ }
+ }
+ fileHelper.readAndPreviewImages(this.files, 'upForDesignDiagram', 0, 86, ' ', ' ');
+
});
- $("#editMyDesignDiagram").on("change", function (e) {
- let fileHelper = new YourTeam.Utility.File();
- let fileName = this.files[0].name;
+ // var imageUploadFormOS = 0;
+ // $("#upMyAsBuilt").on("change", function (e) {
+ // let fileHelper = new YourTeam.Utility.File();
- strHtml = `${fileName}`;
- $('#editDesignDiagram').html(strHtml);
- });
+ // if ($('#upForAsBuilt p').length > 0) {
+ // $("#upForAsBuilt").html("");
+ // }
+ // console.log(this.files);
+ // imageUploadFormOS = this.files.length;
+
+ // let maxlength = $("#upForAsBuilt").data("maxlength");
+ // if (maxlength) {
+ // if (imageUploadFormOS + $('#upForAsBuilt img').length > maxlength) {
+ // ShowModal("error", "uplImgOverLen", "�L�k�W��", "�̦h�u��W��" + maxlength + "�i�A�z�w�g�W�X�W�Ǽƶq�C");
+ // $("#upMyAsBuilt").val("");
+ // return false;
+ // }
+ // }
+ // fileHelper.readAndPreviewImages(this.files, 'upForAsBuilt', 0, 86, '', ' ');
+
+ // });
// 取上傳檔名
- $("#upMyAsBuilt").on("change", function (e) {
- let fileHelper = new YourTeam.Utility.File();
- let fileName = this.files[0].name;
+ // $("#upMyDesignDiagram").on("change", function (e) {
+ // let fileHelper = new YourTeam.Utility.File();
+ // let fileName = this.files[0].name;
- strHtml = `${fileName}`;
- $('#upAsBuiltDrawing').html(strHtml);
- });
+ // strHtml = `${fileName}`;
+ // $('#upDesignDiagram').html(strHtml);
+ // });
- $("#editMyAsBuilt").on("change", function (e) {
- let fileHelper = new YourTeam.Utility.File();
- let fileName = this.files[0].name;
+ // $("#editMyDesignDiagram").on("change", function (e) {
+ // let fileHelper = new YourTeam.Utility.File();
+ // let fileName = this.files[0].name;
- strHtml = `${fileName}`;
- $('#editAsBuiltDrawing').html(strHtml);
- });
+ // strHtml = `${fileName}`;
+ // $('#editDesignDiagram').html(strHtml);
+ // });
+
+ // 取上傳檔名
+ // $("#upMyAsBuilt").on("change", function (e) {
+ // let fileHelper = new YourTeam.Utility.File();
+ // let fileName = this.files[0].name;
+
+ // strHtml = `${fileName}`;
+ // $('#upAsBuiltDrawing').html(strHtml);
+ // });
+
+ // $("#editMyAsBuilt").on("change", function (e) {
+ // let fileHelper = new YourTeam.Utility.File();
+ // let fileName = this.files[0].name;
+
+ // strHtml = `${fileName}`;
+ // $('#editAsBuiltDrawing').html(strHtml);
+ // });
// 全選功能
function check_all(obj, cName) {
@@ -343,6 +422,18 @@
console.log($("#editPicNum").val());
});
+ // 關閉 modal
+ $('#uploadPicture').on('hidden.bs.modal', function (e) {
+ console.log("123456789");
+ });
+ $('#colorModal').on('hidden.bs.modal', function () {
+ // # 可以设置下拉框为初始值
+ $("#colorCodeSelect").val(-1);
+ // # 清空表单校验信息
+ $("#add").Validform().resetForm();
+ $(".Validform_checktip").html("");
+ });
+
// 刪除資料
onEvent('click', '#del', function () {
pageAct.opeRecId = null;
diff --git a/Frontend/_sysElevator.html b/Frontend/_sysElevator.html
index fa591f9..d376b32 100644
--- a/Frontend/_sysElevator.html
+++ b/Frontend/_sysElevator.html
@@ -897,87 +897,91 @@
myBaja = new subscriptionDevices();
myBaja.setSubscribeDevicesByBql(subOrdPath);
myBaja.setSubscribeDevicesCallBack(function (data) {
- function getValueByName(pointName) {
- return data.point_name == pointName ? data.value : null;
- }
-
- function actLightByPoi(pointName, selector) {
- if (getValueByName(pointName) == "trueText") {
- $(selector).removeClass("bg-secondary").addClass("bg-orange");
- $(selector).parent("div").prev().find("label").text("運轉中");
- } else if (getValueByName(pointName) == "falseText") {
- $(selector).removeClass("bg-orange").addClass("bg-secondary");
- $(selector).parent("div").prev().find("label").text("未動作");
+ try {
+ function getValueByName(pointName) {
+ return data.point_name == pointName ? data.value : null;
}
- }
- if (allDevList.length == 0) {
- return false;
- }
- data.device_number = data.device_number_full;
- let matchDevice = allDevList.filter(x => x.device_number == data.device_number)[0];
- let master = matchDevice.device_number.split("_")[5];
- //狀態
- if (data.point_name == "ST") {
- $(`#${matchDevice.device_number}_card [name=devStatus]`).text(data.value);
- //若為異常(match資料庫點位值)且後台有設定為閃爍
- if (getValueByName("ST") == matchDevice.device_error_point_value) {
- $(`#${matchDevice.device_number}_card`).addClass("light-flash")
+ function actLightByPoi(pointName, selector) {
+ if (getValueByName(pointName) == "trueText") {
+ $(selector).removeClass("bg-secondary").addClass("bg-orange");
+ $(selector).parent("div").prev().find("label").text("運轉中");
+ } else if (getValueByName(pointName) == "falseText") {
+ $(selector).removeClass("bg-orange").addClass("bg-secondary");
+ $(selector).parent("div").prev().find("label").text("未動作");
+ }
}
- }
- //現在樓層
- if (data.point_name == "CP") {
- $(`#${matchDevice.device_number}_card [name=curFloor]`).text(data.value);
- }
- if (data.point_name == "RD") {
- //往上或往下
- if (getValueByName("RD") == "UP") {
- $(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
- $(`#${matchDevice.device_number}_card [name=upFloArrow]`).addClass("light-flash-c");
- } else if (getValueByName("RD") == "DOWN") {
- $(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
- $(`#${matchDevice.device_number}_card [name=downFloArrow]`).addClass("light-flash-c");
- } else {
- $(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
- $(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
+ if (allDevList.length == 0) {
+ return false;
}
+ data.device_number = data.device_number_full;
+ let matchDevice = allDevList.filter(x => x.device_number == data.device_number)[0];
+ let master = matchDevice.device_number.split("_")[5];
+ //狀態
+ if (data.point_name == "ST") {
+ $(`#${matchDevice.device_number}_card [name=devStatus]`).text(data.value);
+ //若為異常(match資料庫點位值)且後台有設定為閃爍
+ if (getValueByName("ST") == matchDevice.device_error_point_value) {
+ $(`#${matchDevice.device_number}_card`).addClass("light-flash")
+ }
+ }
+ //現在樓層
+ if (data.point_name == "CP") {
+ $(`#${matchDevice.device_number}_card [name=curFloor]`).text(data.value);
+ }
+
+ if (data.point_name == "RD") {
+ //往上或往下
+ if (getValueByName("RD") == "UP") {
+ $(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
+ $(`#${matchDevice.device_number}_card [name=upFloArrow]`).addClass("light-flash-c");
+ } else if (getValueByName("RD") == "DOWN") {
+ $(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
+ $(`#${matchDevice.device_number}_card [name=downFloArrow]`).addClass("light-flash-c");
+ } else {
+ $(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
+ $(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
+ }
+ }
+
+ //消防回歸
+ actLightByPoi("FE", "#emerReturn");
+ //群控故障
+ actLightByPoi("GCM", "#groConFail");
+ //緊急電源
+ actLightByPoi("EPS", "#emerPower");
+ //火災回歸
+ actLightByPoi("FER", "#fireReturn");
+ //地震管制
+ actLightByPoi("EER", "#earQuaCon");
+
+
+ //將訂閱值塞入 subSeviceData
+ if (subSeviceData.findIndex(x => x.device_number == matchDevice.device_number) == -1) {
+ let obj = {};
+ obj.device_number = matchDevice.device_number;
+ subSeviceData.push(obj)
+ }
+
+ let subData = subSeviceData.filter(x => x.device_number == matchDevice.device_number)[0];
+
+ if (subData) {
+ subData[data.point_name] = data.value;
+ }
+ // 設置燈色、卡片閃爍
+ setLightColor();
+ // Card table 更新
+ subDeviceSetTable(matchDevice.device_number);
+ // 重繪 電梯管理 列表
+ reloadEleManTable(setEleManTabDataFromBaja());
+ // 電梯管理 detail
+ subDeviceSetEleManDet(matchDevice.device_number);
+ // 電梯管理 不服務樓層 detail
+ subDeviceSetEleManNotSerFloor(master);
+ } catch (e) {
+ console.log("e",e)
}
-
- //消防回歸
- actLightByPoi("FE", "#emerReturn");
- //群控故障
- actLightByPoi("GCM", "#groConFail");
- //緊急電源
- actLightByPoi("EPS", "#emerPower");
- //火災回歸
- actLightByPoi("FER", "#fireReturn");
- //地震管制
- actLightByPoi("EER", "#earQuaCon");
-
-
- //將訂閱值塞入 subSeviceData
- if (subSeviceData.findIndex(x => x.device_number == matchDevice.device_number) == -1) {
- let obj = {};
- obj.device_number = matchDevice.device_number;
- subSeviceData.push(obj)
- }
-
- let subData = subSeviceData.filter(x => x.device_number == matchDevice.device_number)[0];
-
- if (subData) {
- subData[data.point_name] = data.value;
- }
- // 設置燈色、卡片閃爍
- setLightColor();
- // Card table 更新
- subDeviceSetTable(matchDevice.device_number);
- // 重繪 電梯管理 列表
- reloadEleManTable(setEleManTabDataFromBaja());
- // 電梯管理 detail
- subDeviceSetEleManDet(matchDevice.device_number);
- // 電梯管理 不服務樓層 detail
- subDeviceSetEleManNotSerFloor(master);
});
myBaja.setSubscribeDeviceEndCallBack(function (data) {
@@ -1084,7 +1088,9 @@
// Card - 設置列表中訂閱內容
function subDeviceSetTable(devNum) {
-
+ if (allDevList.filter(x => !x.device_number).length > 0) {
+ debugger
+ }
let subData = subSeviceData.filter(x => x.device_number == devNum)[0]
let matchDevice = allDevList.filter(x => x.device_number == devNum)[0];
if (!subData) {
@@ -1111,6 +1117,8 @@
elevObj.setElevFloor(matchDevice.device_number, subData["CP"]);
}
+
+
if (isFirstLoad3D == false && elev3DObj.length != 0) {
let elevObj = elev3DObj.filter(x => x.nodeId == elev3DBind[devNum])[0];
if (elevObj && elevObj.id) {
@@ -1118,7 +1126,7 @@
elevObj.obj.movElevator();
}
}
-
+ console.log("console:", subData, devNum, allDevList)
elevObj.setEleMovStatus(matchDevice.device_number, subData["RD"] == "UP" ? 1 : subData["RD"] == "DOWN" ? 2 : 0);
//現在樓層
if (subData["CP"]) {
diff --git a/Frontend/forgeTest.html b/Frontend/forgeTest.html
index 2ed1267..e2d1489 100644
--- a/Frontend/forgeTest.html
+++ b/Frontend/forgeTest.html
@@ -20,6 +20,17 @@
+
+
+
+
+
+
+
+
+
+
+
亮度
@@ -49,7 +60,8 @@
-
+
+
-
+
|