merged
This commit is contained in:
		
						commit
						3b19c70a75
					
				@ -16,7 +16,7 @@
 | 
				
			|||||||
                    <div class="d-flex" id="graTree"></div>
 | 
					                    <div class="d-flex" id="graTree"></div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="col-10">
 | 
					                <div class="col-10">
 | 
				
			||||||
                    <div class="row my-2">
 | 
					                    <div class="row my-2 mx-0">
 | 
				
			||||||
                        <a href="javascript:;" id="creGraMan" class="btn btn-success">
 | 
					                        <a href="javascript:;" id="creGraMan" class="btn btn-success">
 | 
				
			||||||
                            +新增
 | 
					                            +新增
 | 
				
			||||||
                        </a>
 | 
					                        </a>
 | 
				
			||||||
@ -65,7 +65,7 @@
 | 
				
			|||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="col-md-12 mt-2">
 | 
					                        <div class="col-md-12 mt-2">
 | 
				
			||||||
                            <label>原設計</label>
 | 
					                            <label>檔案</label>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="col-md-12">
 | 
					                        <div class="col-md-12">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -278,8 +278,8 @@
 | 
				
			|||||||
        let dowLoaEle = YT.Alert.Tip("準備下載中...", "show", true);
 | 
					        let dowLoaEle = YT.Alert.Tip("準備下載中...", "show", true);
 | 
				
			||||||
        let rowData = graTable.row($(this).closest("tr")).data();
 | 
					        let rowData = graTable.row($(this).closest("tr")).data();
 | 
				
			||||||
        let apiUrl = baseApiUrl + `/File/Download?type=graph&savename=${rowData.oriSavName}&oriname=${rowData.oriOrgName}`;
 | 
					        let apiUrl = baseApiUrl + `/File/Download?type=graph&savename=${rowData.oriSavName}&oriname=${rowData.oriOrgName}`;
 | 
				
			||||||
        let extname = rowData.oriOrgName?.split(".").slice(-1) || "dwg";
 | 
					        
 | 
				
			||||||
        download(token, apiUrl, rowData.name + "_原設計圖" + "." + extname, function () {
 | 
					        download(token, apiUrl, rowData.oriOrgName, function () {
 | 
				
			||||||
            $(dowLoaEle.ele).YTAlert().hide();
 | 
					            $(dowLoaEle.ele).YTAlert().hide();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
@ -390,8 +390,8 @@
 | 
				
			|||||||
                        Create: {
 | 
					                        Create: {
 | 
				
			||||||
                            label: "新增",
 | 
					                            label: "新增",
 | 
				
			||||||
                            _disabled: function (data) {
 | 
					                            _disabled: function (data) {
 | 
				
			||||||
                                if (depth >= 3) {
 | 
					                                if (depth >= 4) {
 | 
				
			||||||
                                    return true;   //第五層後無法新增
 | 
					                                    return true;   //第三層後無法新增
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
                                return false;
 | 
					                                return false;
 | 
				
			||||||
                            },
 | 
					                            },
 | 
				
			||||||
@ -405,6 +405,12 @@
 | 
				
			|||||||
                        },
 | 
					                        },
 | 
				
			||||||
                        Rename: {
 | 
					                        Rename: {
 | 
				
			||||||
                            label: "重新命名",
 | 
					                            label: "重新命名",
 | 
				
			||||||
 | 
					                            _disabled: function (data) {
 | 
				
			||||||
 | 
					                                if ($node.id == "0") {
 | 
				
			||||||
 | 
					                                    return true;   //最上層無法編輯
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                                return false;
 | 
				
			||||||
 | 
					                            },
 | 
				
			||||||
                            action: function (obj) {
 | 
					                            action: function (obj) {
 | 
				
			||||||
                                tree.edit($node);
 | 
					                                tree.edit($node);
 | 
				
			||||||
                                /*                                tree.sort($node, true)*/
 | 
					                                /*                                tree.sort($node, true)*/
 | 
				
			||||||
@ -412,6 +418,12 @@
 | 
				
			|||||||
                        },
 | 
					                        },
 | 
				
			||||||
                        Remove: {
 | 
					                        Remove: {
 | 
				
			||||||
                            label: "移除",
 | 
					                            label: "移除",
 | 
				
			||||||
 | 
					                            _disabled: function (data) {
 | 
				
			||||||
 | 
					                                if ($node.id == "0") {
 | 
				
			||||||
 | 
					                                    return true;   //最上層無法移除
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                                return false;
 | 
				
			||||||
 | 
					                            },
 | 
				
			||||||
                            action: function (obj) {
 | 
					                            action: function (obj) {
 | 
				
			||||||
                                tree.delete_node($node);
 | 
					                                tree.delete_node($node);
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
@ -426,18 +438,27 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function treeEvent() {
 | 
					    function treeEvent() {
 | 
				
			||||||
 | 
					        let selectedNode = [];
 | 
				
			||||||
        $('#graTree').on("loaded.jstree", function (e, data) {
 | 
					        $('#graTree').on("loaded.jstree", function (e, data) {
 | 
				
			||||||
            let topNode = $('#graTree').jstree(true).get_node("#");
 | 
					            let topNode = $('#graTree').jstree(true).get_node("0");
 | 
				
			||||||
            $('#graTree').jstree(true).select_node(topNode.children[0]);
 | 
					            $('#graTree').jstree(true).select_node(topNode.children[0]);
 | 
				
			||||||
            $("#graTree").jstree("open_node", 0);
 | 
					            $("#graTree").jstree("open_node", 0);
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        $('#graTree').on("select_node.jstree", function (e, data) {
 | 
					        $('#graTree').on("select_node.jstree", function (e, data) {
 | 
				
			||||||
 | 
					            if (data.node.id != "0") {
 | 
				
			||||||
                dtAjaxResetSendData(graTable, { layer_id: parseInt(data.node.id) });
 | 
					                dtAjaxResetSendData(graTable, { layer_id: parseInt(data.node.id) });
 | 
				
			||||||
                graTable.ajax.reload();
 | 
					                graTable.ajax.reload();
 | 
				
			||||||
 | 
					                selectedNode.unshift(data.node.id);
 | 
				
			||||||
 | 
					                if (selectedNode.length > 3) {
 | 
				
			||||||
 | 
					                    selectedNode.splice(selectedNode.length - 1, 1);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                curLayerId = parseInt(data.node.id);
 | 
					                curLayerId = parseInt(data.node.id);
 | 
				
			||||||
                $("#graLayer").text(levelNameByNodeId(data.node));
 | 
					                $("#graLayer").text(levelNameByNodeId(data.node));
 | 
				
			||||||
                $("#curLevText").text(levelNameByNodeId(data.node));
 | 
					                $("#curLevText").text(levelNameByNodeId(data.node));
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                $("#graTree").jstree(true).deselect_node(data.node);
 | 
				
			||||||
 | 
					                $("#graTree").jstree(true).select_node(selectedNode[0]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        $("#graTree").on('create_node.jstree', function (e, data) {
 | 
					        $("#graTree").on('create_node.jstree', function (e, data) {
 | 
				
			||||||
            let main = {};
 | 
					            let main = {};
 | 
				
			||||||
 | 
				
			|||||||
@ -2371,8 +2371,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    //載入3D模型
 | 
					    //載入3D模型
 | 
				
			||||||
    function load3DModel() {
 | 
					    function load3DModel() {
 | 
				
			||||||
 | 
					 | 
				
			||||||
        launchViewer(pageAct.urn, (viewer) => {
 | 
					        launchViewer(pageAct.urn, (viewer) => {
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
            let elevOption = {
 | 
					            let elevOption = {
 | 
				
			||||||
                selector: "#forgeViewer",
 | 
					                selector: "#forgeViewer",
 | 
				
			||||||
                viewer: viewer,
 | 
					                viewer: viewer,
 | 
				
			||||||
@ -2382,12 +2383,17 @@
 | 
				
			|||||||
            // 電梯移動訂閱程序載入
 | 
					            // 電梯移動訂閱程序載入
 | 
				
			||||||
            let forge3DElev = new Forge3DElevFull(elevOption);
 | 
					            let forge3DElev = new Forge3DElevFull(elevOption);
 | 
				
			||||||
            forge3DElev.bajaEndCallback = function () {
 | 
					            forge3DElev.bajaEndCallback = function () {
 | 
				
			||||||
 | 
					                debugger
 | 
				
			||||||
 | 
					                /*hideAllObjects(this.getNodeIds());*/
 | 
				
			||||||
 | 
					                setTransparentBuilding(0);
 | 
				
			||||||
                endPageLoading();
 | 
					                endPageLoading();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            forge3DElev.bajaChaCallback = function (data) {
 | 
					            forge3DElev.bajaChaCallback = function (data) {
 | 
				
			||||||
                subDeviceSetStatus(data);
 | 
					                subDeviceSetStatus(data);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            forge3DElev.init();
 | 
					            forge3DElev.init();
 | 
				
			||||||
 | 
					             
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -36,6 +36,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
    var allDevList = [];  //全設備清單
 | 
					    var allDevList = [];  //全設備清單
 | 
				
			||||||
 | 
					    var subDeviceData = [];
 | 
				
			||||||
    var heatMap = null;
 | 
					    var heatMap = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $(function () {
 | 
					    $(function () {
 | 
				
			||||||
@ -45,12 +46,9 @@
 | 
				
			|||||||
                setLightColor();
 | 
					                setLightColor();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (arr.indexOf(3) != -1) {
 | 
					            if (arr.indexOf(3) != -1) {
 | 
				
			||||||
                
 | 
					 | 
				
			||||||
                getHotspotPoint(() => {
 | 
					                getHotspotPoint(() => {
 | 
				
			||||||
                    getLightDevice();
 | 
					 | 
				
			||||||
                    show3DModel(data.urn_3D);
 | 
					                    show3DModel(data.urn_3D);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
@ -66,18 +64,7 @@
 | 
				
			|||||||
                break;
 | 
					                break;
 | 
				
			||||||
            case 4:
 | 
					            case 4:
 | 
				
			||||||
                strHtml = `<div class="d-flex mb-4" style="gap:15px">
 | 
					                strHtml = `<div class="d-flex mb-4" style="gap:15px">
 | 
				
			||||||
                                <div class="row m-0 align-items-center">
 | 
					                                ${setTopLight()}
 | 
				
			||||||
                                    <span id="sysNorLight" class="circle-light mr-2 " data-light-type="normal"></span>
 | 
					 | 
				
			||||||
                                    <label class="mb-0">正常</label>
 | 
					 | 
				
			||||||
                                </div>
 | 
					 | 
				
			||||||
                                <div class="row m-0 align-items-center">
 | 
					 | 
				
			||||||
                                    <span id="sysCloLight" class="circle-light mr-2" data-light-type="close"></span>
 | 
					 | 
				
			||||||
                                    <label class="mb-0">關機</label>
 | 
					 | 
				
			||||||
                                </div>
 | 
					 | 
				
			||||||
                                <div class="row m-0 align-items-center">
 | 
					 | 
				
			||||||
                                    <span id="sysErrLight" class="circle-light mr-2" data-light-type="error"></span>
 | 
					 | 
				
			||||||
                                    <label class="mb-0">異常</label>
 | 
					 | 
				
			||||||
                                </div>
 | 
					 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <div class="col-12 p-0" id="floDevList">
 | 
					                            <div class="col-12 p-0" id="floDevList">
 | 
				
			||||||
@ -107,13 +94,26 @@
 | 
				
			|||||||
            if (!matchDevice) {
 | 
					            if (!matchDevice) {
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            console.log(data)
 | 
				
			||||||
 | 
					            //將訂閱值塞入 subDeviceData
 | 
				
			||||||
 | 
					            if (subDeviceData.findIndex(x => x.device_number == matchDevice.device_number) == -1) {
 | 
				
			||||||
 | 
					                let obj = {};
 | 
				
			||||||
 | 
					                obj.device_number = matchDevice.device_number;
 | 
				
			||||||
 | 
					                obj.dbid = matchDevice.forge_dbid;
 | 
				
			||||||
 | 
					                subDeviceData.push(obj)
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            let subData = subDeviceData.filter(x => x.device_number == matchDevice.device_number)[0];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (subData) {
 | 
				
			||||||
 | 
					                subData[data.point_name] = data.value;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let norDevPoiName = matchDevice.device_normal_point_name;
 | 
					            let norDevPoiName = matchDevice.device_normal_point_name;
 | 
				
			||||||
            let cloDevPoiName = matchDevice.device_close_point_name;
 | 
					            let cloDevPoiName = matchDevice.device_close_point_name;
 | 
				
			||||||
            let errDevPoiName = matchDevice.device_error_point_name;
 | 
					            let errDevPoiName = matchDevice.device_error_point_name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (data.point_name == "Temp") {
 | 
					            if (data.point_name == "Temp") {
 | 
				
			||||||
                console.log(data)
 | 
					 | 
				
			||||||
                heatMap?.changeTemp(data.device_number_full, !isNaN(parseInt(data.value)) ? parseInt(data.value) : 0);
 | 
					                heatMap?.changeTemp(data.device_number_full, !isNaN(parseInt(data.value)) ? parseInt(data.value) : 0);
 | 
				
			||||||
                let devIdx = allDevList.findIndex(x => x.device_number == data.device_number_full);
 | 
					                let devIdx = allDevList.findIndex(x => x.device_number == data.device_number_full);
 | 
				
			||||||
                allDevList[devIdx]._temp = !isNaN(parseInt(data.value)) ? parseInt(data.value) : 0;
 | 
					                allDevList[devIdx]._temp = !isNaN(parseInt(data.value)) ? parseInt(data.value) : 0;
 | 
				
			||||||
@ -127,10 +127,13 @@
 | 
				
			|||||||
            } else if (data.point_name == errDevPoiName && data.value == matchDevice.device_error_point_value) {
 | 
					            } else if (data.point_name == errDevPoiName && data.value == matchDevice.device_error_point_value) {
 | 
				
			||||||
                $(`#${matchDevice.device_number}_status`).attr("data-light-type", "error").data("light-type", "error");
 | 
					                $(`#${matchDevice.device_number}_status`).attr("data-light-type", "error").data("light-type", "error");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            setLightColor();
 | 
					            setLightColor();
 | 
				
			||||||
 | 
					            setForgeHotSpotColor(matchDevice);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        myBaja.setSubscribeDeviceEndCallBack(function (data) {
 | 
					        myBaja.setSubscribeDeviceEndCallBack(function (data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            endPageLoading();
 | 
					            endPageLoading();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -163,6 +166,40 @@
 | 
				
			|||||||
        })
 | 
					        })
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 設置昇位圖上方 燈號
 | 
				
			||||||
 | 
					    function setTopLight() {
 | 
				
			||||||
 | 
					        let sysSubObj = pageAct.sysSubObj;
 | 
				
			||||||
 | 
					        let strHtml = ``;
 | 
				
			||||||
 | 
					        if (sysSubObj.device_normal_point_name != null && sysSubObj.device_normal_point_value != null) {
 | 
				
			||||||
 | 
					            strHtml += ` <div class="row m-0 align-items-center">
 | 
				
			||||||
 | 
					                            <span id="sysNorLight" class="circle-light mr-2 " data-light-type="normal"></span>
 | 
				
			||||||
 | 
					                            <label class="mb-0">${sysSubObj.device_normal_text}</label>
 | 
				
			||||||
 | 
					                        </div>`;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (sysSubObj.device_close_point_name != null && sysSubObj.device_close_point_value != null) {
 | 
				
			||||||
 | 
					            strHtml += ` <div class="row m-0 align-items-center">
 | 
				
			||||||
 | 
					                                    <span id="sysCloLight" class="circle-light mr-2" data-light-type="close"></span>
 | 
				
			||||||
 | 
					                                    <label class="mb-0">${sysSubObj.device_close_text}</label>
 | 
				
			||||||
 | 
					                            </div>`;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (sysSubObj.device_error_point_name != null && sysSubObj.device_error_point_value != null) {
 | 
				
			||||||
 | 
					            strHtml += ` <div class="row m-0 align-items-center">
 | 
				
			||||||
 | 
					                            <span id="sysErrLight" class="circle-light mr-2" data-light-type="error"></span>
 | 
				
			||||||
 | 
					                            <label class="mb-0">${sysSubObj.device_error_text}</label>
 | 
				
			||||||
 | 
					                        </div>`;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return strHtml;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // forge 3D 異常點位變紅色
 | 
				
			||||||
 | 
					    function setForgeHotSpotColor(device) {
 | 
				
			||||||
 | 
					        let subData = subDeviceData.filter(x => x.device_number == device.device_number)[0]
 | 
				
			||||||
 | 
					        if (subData && subData[device.device_error_point_name] == device.device_error_point_value && !isNaN(parseInt(device.spriteDbid))) {
 | 
				
			||||||
 | 
					            changeColorForHotspot(parseInt(device.spriteDbid), "error");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 取得設備列表 並繪製卡片
 | 
					    // 取得設備列表 並繪製卡片
 | 
				
			||||||
    function getFloDevList() {
 | 
					    function getFloDevList() {
 | 
				
			||||||
        let url = baseApiUrl + "/api/Device/GetDeviceList";
 | 
					        let url = baseApiUrl + "/api/Device/GetDeviceList";
 | 
				
			||||||
@ -256,15 +293,24 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Card 即時狀態
 | 
					    // Card 即時狀態
 | 
				
			||||||
    function drawStateTabBlo() {
 | 
					    function drawStateTabBlo(devNum) {
 | 
				
			||||||
        let strHtml = `<div style="height:15rem">
 | 
					        let devPath = devNum.replaceAll("_", "/");
 | 
				
			||||||
                            <iframe src="/ord?station:%7Cslot:/TPE/B1/EE/E4/R2F/NA/WHT/N1|view:?fullScreen=true" width="100%" height="100%"></iframe>
 | 
					        let strHtml = `<div style="height:100%">
 | 
				
			||||||
 | 
					                            <iframe src="/ord?station:%7Cslot:/${devPath}|view:?fullScreen=true" style="width:100%;height:100%;min-height:30vh"></iframe>
 | 
				
			||||||
                       </div>`
 | 
					                       </div>`
 | 
				
			||||||
        return strHtml;
 | 
					        return strHtml;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    function iframeResize(obj) {
 | 
				
			||||||
 | 
					        obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    function show3DModel(urn) {
 | 
					    function show3DModel(urn) {
 | 
				
			||||||
 | 
					        $(loadEle).Loading("start");
 | 
				
			||||||
        launchViewerForHotspot(urn, (viewer, nodeIds) => {
 | 
					        launchViewerForHotspot(urn, (viewer, nodeIds) => {
 | 
				
			||||||
 | 
					            let devDbIds = allDevList.map(x => x.forge_dbid);
 | 
				
			||||||
 | 
					            /*hideAllObjects(devDbIds);*/
 | 
				
			||||||
 | 
					            setTransparentBuilding(0, devDbIds);
 | 
				
			||||||
 | 
					            $(loadEle).Loading("close");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let devices = allDevList.map(x => {
 | 
					            let devices = allDevList.map(x => {
 | 
				
			||||||
                return {
 | 
					                return {
 | 
				
			||||||
                    roomDbId: !isNaN(parseInt(x.room_dbid)) ? parseInt(x.room_dbid) : -1,
 | 
					                    roomDbId: !isNaN(parseInt(x.room_dbid)) ? parseInt(x.room_dbid) : -1,
 | 
				
			||||||
@ -300,9 +346,42 @@
 | 
				
			|||||||
                endPageLoading();
 | 
					                endPageLoading();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            forge3DElev.init();
 | 
					            forge3DElev.init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (subDeviceData.length != 0) {
 | 
				
			||||||
 | 
					                let stSubArr = subDeviceData.map(x => Object.keys(x).filter(y => y == "ST").map(y => x));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                for (let sub of stSubArr) {
 | 
				
			||||||
 | 
					                    let matchDevice = allDevList.filter(x => x.device_number == sub[0]?.device_number)[0];
 | 
				
			||||||
 | 
					                    if (matchDevice) {
 | 
				
			||||||
 | 
					                        setForgeHotSpotColor(matchDevice);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            getWaterNodeId();
 | 
				
			||||||
 | 
					        }, () => {
 | 
				
			||||||
 | 
					            $(loadEle).Loading("close");
 | 
				
			||||||
        }, "[name=forgeViewer]");
 | 
					        }, "[name=forgeViewer]");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 供水系統 - 取得欲染色 dbid
 | 
				
			||||||
 | 
					    function getWaterNodeId() {
 | 
				
			||||||
 | 
					        let url = baseApiUrl + "/api/Device/GetForgeNodeIdFromVar";
 | 
				
			||||||
 | 
					        let sendData = { forgeNodeKey: "water_wupply" };
 | 
				
			||||||
 | 
					        objSendData.Data = sendData;
 | 
				
			||||||
 | 
					        ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
 | 
				
			||||||
 | 
					            if (!res || res.code != "0000" || !res.data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                if (!isNaN(parseInt(res.data[0]?.system_value))) {
 | 
				
			||||||
 | 
					                    changeColor(parseInt(res.data[0]?.system_value))
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                console.log(res.data)
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }, null, "POST").send();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function getHotspotPoint(callback = null) {
 | 
					    function getHotspotPoint(callback = null) {
 | 
				
			||||||
        let url = baseApiUrl + "/api/GetDevForCor";
 | 
					        let url = baseApiUrl + "/api/GetDevForCor";
 | 
				
			||||||
@ -337,50 +416,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async function getLightDevice() {//callback = null
 | 
					 | 
				
			||||||
        getLightData(null);
 | 
					 | 
				
			||||||
        let url = baseApiUrl + "/api/GetDevNodeForCor";
 | 
					 | 
				
			||||||
        let sendData = {
 | 
					 | 
				
			||||||
            "device_area_tag": pageAct.AreaTag,
 | 
					 | 
				
			||||||
            "device_building_tag": pageAct.buiTag,
 | 
					 | 
				
			||||||
            "device_system_tag": pageAct.sysMainTag,
 | 
					 | 
				
			||||||
            "device_name_tag": pageAct.sysSubTag,
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
        objSendData.Data = sendData;
 | 
					 | 
				
			||||||
        ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
 | 
					 | 
				
			||||||
            if (!res || res.code != "0000" || !res.data) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                let myLightList = [];
 | 
					 | 
				
			||||||
                $.each(res.data, (idx, data) => {
 | 
					 | 
				
			||||||
                    let item = {};
 | 
					 | 
				
			||||||
                    item.position = {};
 | 
					 | 
				
			||||||
                    if (data.device_node_coordinate_3d != null && isJSON(data.device_node_coordinate_3d)) {
 | 
					 | 
				
			||||||
                        item.position = JSON.parse(data.device_node_coordinate_3d);
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    $.extend(item, data);
 | 
					 | 
				
			||||||
                    myLightList.push(item);
 | 
					 | 
				
			||||||
                })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                console.log("2", myLightList);
 | 
					 | 
				
			||||||
                setLightList(myLightList);
 | 
					 | 
				
			||||||
                //callback ? callback() : "";
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }, null, "POST").send();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    function setHotspotPoint(myDataList = []) {
 | 
					    function setHotspotPoint(myDataList = []) {
 | 
				
			||||||
        console.log(myDataList)
 | 
					        console.log(myDataList)
 | 
				
			||||||
        getHopspotPoint(myDataList);
 | 
					        getHopspotPoint(myDataList);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async function setLightList(myDataList = []) {
 | 
					 | 
				
			||||||
        console.log(myDataList);
 | 
					 | 
				
			||||||
        getLightData(myDataList);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    var parentEle = "";
 | 
					    var parentEle = "";
 | 
				
			||||||
    onEvent("autodesk:click:sprite", "[name=forgeViewer]", function (e, obj) {
 | 
					    onEvent("autodesk:click:sprite", "[name=forgeViewer]", function (e, obj) {
 | 
				
			||||||
        forgeUnFocusAll();
 | 
					        forgeUnFocusAll();
 | 
				
			||||||
@ -398,10 +438,18 @@
 | 
				
			|||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    onEvent("autodesk:complete:sprite", "[name=forgeViewer]", function (e, obj) {
 | 
					    onEvent("autodesk:complete:sprite", "[name=forgeViewer]", function (e, obj) {
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        $("#floDevList a[name=devItem]").each((idx, ele) => {
 | 
					        $("#floDevList a[name=devItem]").each((idx, ele) => {
 | 
				
			||||||
            let devNum = $(ele).data("number");
 | 
					            let devNum = $(ele).data("number");
 | 
				
			||||||
            let dbid = obj.myDataList.filter(x => x.device_number == devNum)[0]?._dbId;
 | 
					            let dbid = obj.myDataList.filter(x => x.device_number == devNum)[0]?._dbId;
 | 
				
			||||||
 | 
					            allDevList.forEach((dev, idx) => {
 | 
				
			||||||
 | 
					                if (dev.device_number == devNum) {
 | 
				
			||||||
 | 
					                    dev.spriteDbid = dbid;
 | 
				
			||||||
 | 
					                    setForgeHotSpotColor(dev);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
            $(ele).data("dbId", dbid);
 | 
					            $(ele).data("dbId", dbid);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1034,10 +1034,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // show 3D 模型
 | 
					    // show 3D 模型
 | 
				
			||||||
    function show3DModel(urn) {
 | 
					    function show3DModel(urn) {
 | 
				
			||||||
 | 
					        $(loadEle).Loading("start");
 | 
				
			||||||
        launchViewerForHotspot(urn, (viewer, nodeIds) => {
 | 
					        launchViewerForHotspot(urn, (viewer, nodeIds) => {
 | 
				
			||||||
            let nextFloor = getNextFloor(pageAct.floGuid);
 | 
					            let nextFloor = getNextFloor(pageAct.floGuid);
 | 
				
			||||||
            let curFloTag = pageAct.floTag;
 | 
					            let curFloTag = pageAct.floTag;
 | 
				
			||||||
            debugger
 | 
					            
 | 
				
			||||||
            if (!nextFloor) {
 | 
					            if (!nextFloor) {
 | 
				
			||||||
                toast_warning("超出樓層範圍");
 | 
					                toast_warning("超出樓層範圍");
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
@ -1050,7 +1051,9 @@
 | 
				
			|||||||
                nextFloor = nextFloor.split("U")[1];
 | 
					                nextFloor = nextFloor.split("U")[1];
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            getLevelsData(curFloTag, nextFloor);
 | 
					            getLevelsData(curFloTag, nextFloor, function () {
 | 
				
			||||||
 | 
					                $(loadEle).Loading("close");
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
            setHeatMap();
 | 
					            setHeatMap();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let elevOption = {
 | 
					            let elevOption = {
 | 
				
			||||||
@ -1066,6 +1069,8 @@
 | 
				
			|||||||
                endPageLoading();
 | 
					                endPageLoading();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            forge3DElev.init();
 | 
					            forge3DElev.init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,216 +1,71 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
:root {
 | 
					:root { --yt-main-gray: #c2c7d0; --yt-main-black: #212529; --yt-main-gray-hover: #c2c7d0; --yt-gray: #505050; --yt-gray-hover: #3c3c3c; --yt-gray-2: #8f8c8c; --yt-gray-2-hover: #646060; --yt-gray-3: #ededed; --yt-gray-4: #dddddd; --yt-pink: #ff95d0; --yt-pink-hover: #ef84c0; --yt-red-2: #d34949; --yt-yellow-1: #ffc902; }
 | 
				
			||||||
    --yt-main-gray: #c2c7d0;
 | 
					 | 
				
			||||||
    --yt-main-black: #212529;
 | 
					 | 
				
			||||||
    --yt-main-gray-hover: #c2c7d0;
 | 
					 | 
				
			||||||
    --yt-gray: #505050;
 | 
					 | 
				
			||||||
    --yt-gray-hover: #3c3c3c;
 | 
					 | 
				
			||||||
    --yt-gray-2: #8f8c8c;
 | 
					 | 
				
			||||||
    --yt-gray-2-hover: #646060;
 | 
					 | 
				
			||||||
    --yt-gray-3: #ededed;
 | 
					 | 
				
			||||||
    --yt-gray-4: #dddddd;
 | 
					 | 
				
			||||||
    --yt-pink: #ff95d0;
 | 
					 | 
				
			||||||
    --yt-pink-hover: #ef84c0;
 | 
					 | 
				
			||||||
    --yt-red-2: #d34949;
 | 
					 | 
				
			||||||
    --yt-yellow-1: #ffc902;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.mod-skin-dark:not(.mod-skin-light) .panel-hdr, .mod-skin-dark:not(.mod-skin-light) .card-header {
 | 
					.mod-skin-dark:not(.mod-skin-light) .panel-hdr, .mod-skin-dark:not(.mod-skin-light) .card-header { background: rgba(0, 0, 0, 0.03); }
 | 
				
			||||||
    background: rgba(0, 0, 0, 0.03);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.btn-sm-2 {
 | 
					.btn-sm-2 { padding: 2px 19px; }
 | 
				
			||||||
    padding: 2px 19px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.table td {
 | 
					.table td { word-break: break-all; }
 | 
				
			||||||
    word-break: break-all;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
label[id$='-error'].error {
 | 
					label[id$='-error'].error { color: var(--yt-red-2); }
 | 
				
			||||||
    color: var(--yt-red-2);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
[id^=yt_tooltip] {
 | 
					[id^=yt_tooltip] { min-width: 650px !important; }
 | 
				
			||||||
    min-width: 650px !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.circle-light {
 | 
					.circle-light { display: inline-block; width: 25px; height: 25px; border-radius: 50px; }
 | 
				
			||||||
    display: inline-block;
 | 
					 | 
				
			||||||
    width: 25px;
 | 
					 | 
				
			||||||
    height: 25px;
 | 
					 | 
				
			||||||
    border-radius: 50px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.light-flash {
 | 
					.light-flash { --flash-color-1: #ffa100; --flash-color-2: #26272b; animation: flashing-bg 0.5s linear infinite; }
 | 
				
			||||||
    --flash-color-1: #ffa100;
 | 
					 | 
				
			||||||
    --flash-color-2: #26272b;
 | 
					 | 
				
			||||||
    animation: flashing-bg 0.5s linear infinite;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.light-flash-c {
 | 
					.light-flash-c { --flash-color-1: #ffa100; --flash-color-2: #26272b; animation: flashing-c 0.5s linear infinite; }
 | 
				
			||||||
    --flash-color-1: #ffa100;
 | 
					 | 
				
			||||||
    --flash-color-2: #26272b;
 | 
					 | 
				
			||||||
    animation: flashing-c 0.5s linear infinite;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.light-flash-c-bd {
 | 
					.light-flash-c-bd { --flash-color-1: #ffa100; --flash-color-2: #26272b; animation: flashing-c-bd 0.5s linear infinite; }
 | 
				
			||||||
    --flash-color-1: #ffa100;
 | 
					 | 
				
			||||||
    --flash-color-2: #26272b;
 | 
					 | 
				
			||||||
    animation: flashing-c-bd 0.5s linear infinite;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* checkbox switch */
 | 
					/* checkbox switch */
 | 
				
			||||||
input.toggle:checked::before {
 | 
					input.toggle:checked::before { content: ''; position: absolute; top: 2px; left: 24px; display: block; border-radius: 25px; width: 20px; height: 20px; background: #3f8635; }
 | 
				
			||||||
    content: '';
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    top: 2px;
 | 
					 | 
				
			||||||
    left: 24px;
 | 
					 | 
				
			||||||
    display: block;
 | 
					 | 
				
			||||||
    border-radius: 25px;
 | 
					 | 
				
			||||||
    width: 20px;
 | 
					 | 
				
			||||||
    height: 20px;
 | 
					 | 
				
			||||||
    background: #3f8635;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle::before {
 | 
					input.toggle::before { content: ''; position: absolute; top: 2px; left: 3px; display: block; border-radius: 25px; width: 20px; height: 20px; background: #656565; transition: 0.2s; }
 | 
				
			||||||
    content: '';
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    top: 2px;
 | 
					 | 
				
			||||||
    left: 3px;
 | 
					 | 
				
			||||||
    display: block;
 | 
					 | 
				
			||||||
    border-radius: 25px;
 | 
					 | 
				
			||||||
    width: 20px;
 | 
					 | 
				
			||||||
    height: 20px;
 | 
					 | 
				
			||||||
    background: #656565;
 | 
					 | 
				
			||||||
    transition: 0.2s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle {
 | 
					input.toggle { cursor: pointer; appearance: none; position: relative; width: 48px; height: 24px; background: #464646; border-radius: 50px; align-content: center; }
 | 
				
			||||||
    cursor: pointer;
 | 
					 | 
				
			||||||
    appearance: none;
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
    width: 48px;
 | 
					 | 
				
			||||||
    height: 24px;
 | 
					 | 
				
			||||||
    background: #464646;
 | 
					 | 
				
			||||||
    border-radius: 50px;
 | 
					 | 
				
			||||||
    align-content: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle:checked {
 | 
					input.toggle:checked { background: #97c193; }
 | 
				
			||||||
    background: #97c193;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.loading-bg {
 | 
					.loading-bg { background: #0000009c; background-repeat: no-repeat; opacity: 0; width: 100%; height: 100vh; position: fixed; z-index: 3000; }
 | 
				
			||||||
    background: #0000009c;
 | 
					 | 
				
			||||||
    background-repeat: no-repeat;
 | 
					 | 
				
			||||||
    opacity: 0;
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    height: 100vh;
 | 
					 | 
				
			||||||
    position: fixed;
 | 
					 | 
				
			||||||
    z-index: 3000;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dropdown-menu {
 | 
					.dropdown-menu { z-index: 3000; }
 | 
				
			||||||
    z-index:3000;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.adsk-viewing-viewer {
 | 
					.adsk-viewing-viewer { top: 0px; }
 | 
				
			||||||
    top:0px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lds-ring {
 | 
					.lds-ring { display: inline-block; position: relative; width: 25px; height: 25px; margin-right: 0.8rem; }
 | 
				
			||||||
    display: inline-block;
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
    width: 25px;
 | 
					 | 
				
			||||||
    height: 25px;
 | 
					 | 
				
			||||||
    margin-right:0.8rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lds-ring div {
 | 
					.lds-ring div { top: -4px; box-sizing: border-box; display: block; position: absolute; width: 25px; height: 25px; margin: 6px; border: 6px solid #fff; border-radius: 50%; animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; border-color: #fff transparent transparent transparent; }
 | 
				
			||||||
    top: -4px;
 | 
					 | 
				
			||||||
    box-sizing: border-box;
 | 
					 | 
				
			||||||
    display: block;
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    width: 25px;
 | 
					 | 
				
			||||||
    height: 25px;
 | 
					 | 
				
			||||||
    margin: 6px;
 | 
					 | 
				
			||||||
    border: 6px solid #fff;
 | 
					 | 
				
			||||||
    border-radius: 50%;
 | 
					 | 
				
			||||||
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
 | 
					 | 
				
			||||||
    border-color: #fff transparent transparent transparent;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lds-ring div:nth-child(1) {
 | 
					.lds-ring div:nth-child(1) { animation-delay: -0.45s; }
 | 
				
			||||||
    animation-delay: -0.45s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lds-ring div:nth-child(2) {
 | 
					.lds-ring div:nth-child(2) { animation-delay: -0.3s; }
 | 
				
			||||||
    animation-delay: -0.3s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lds-ring div:nth-child(3) {
 | 
					.lds-ring div:nth-child(3) { animation-delay: -0.15s; }
 | 
				
			||||||
    animation-delay: -0.15s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* js-tree */
 | 
					/* js-tree */
 | 
				
			||||||
.jstree-node {
 | 
					.jstree-node { padding-bottom: 3px; }
 | 
				
			||||||
    padding-bottom:3px;
 | 
					.jstree-default-dark { background-color: transparent; }
 | 
				
			||||||
}
 | 
					.jstree a.jstree-anchor { color: #d6d6d6 !important; }
 | 
				
			||||||
.jstree-default-dark {
 | 
					 | 
				
			||||||
    background-color:transparent;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.jstree a.jstree-anchor {
 | 
					 | 
				
			||||||
    color:#d6d6d6 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dropzone .dz-preview.dz-file-preview .dz-image {
 | 
					.dropzone .dz-preview.dz-file-preview .dz-image { background: linear-gradient(to bottom, #675d72, #4d4a56) !important; }
 | 
				
			||||||
    background: linear-gradient(to bottom, #675d72, #4d4a56) !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dz-remove {
 | 
					.dz-remove { position: absolute; top: -8px; right: -8px; z-index: 100; }
 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    top: -8px;
 | 
					 | 
				
			||||||
    right: -8px;
 | 
					 | 
				
			||||||
    z-index: 100;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dz-remove span {
 | 
					.dz-remove span { width: 30px; height: 30px; font-size: 24px; border-radius: 10px; color: white; cursor: pointer !important; padding-top: 3px; transition: 0.2s; }
 | 
				
			||||||
    width: 30px;
 | 
					 | 
				
			||||||
    height: 30px;
 | 
					 | 
				
			||||||
    font-size: 24px;
 | 
					 | 
				
			||||||
    border-radius: 10px;
 | 
					 | 
				
			||||||
    color: white;
 | 
					 | 
				
			||||||
    cursor: pointer !important;
 | 
					 | 
				
			||||||
    padding-top: 3px;
 | 
					 | 
				
			||||||
    transition: 0.2s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dz-remove span.mi-delete {
 | 
					.dz-remove span.mi-delete { background: var(--danger); }
 | 
				
			||||||
    background: var(--danger);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dz-remove span.mi-cancel {
 | 
					.dz-remove span.mi-cancel { font-size: 30px; color: var(--color_grey); }
 | 
				
			||||||
    font-size: 30px;
 | 
					 | 
				
			||||||
    color: var(--color_grey);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dz-remove:hover span {
 | 
					.dz-remove:hover span { transform: scale(1.1); transition: 0.2s; }
 | 
				
			||||||
    transform: scale(1.1);
 | 
					.dropzone .dz-preview.dz-image-preview { background-color: transparent !important; }
 | 
				
			||||||
    transition: 0.2s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.dropzone .dz-preview.dz-image-preview {
 | 
					 | 
				
			||||||
    background-color:transparent !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
input:-webkit-autofill {
 | 
					input:-webkit-autofill { background-color: rgba(0, 0, 0, 0.15) !important; }
 | 
				
			||||||
     background-color:rgba(0, 0, 0, 0.15)!important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.d-grid {
 | 
					.d-grid { display: grid; }
 | 
				
			||||||
    display: grid;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.grid-gap-1 { grid-gap: 1px; }
 | 
					.grid-gap-1 { grid-gap: 1px; }
 | 
				
			||||||
.grid-gap-2 { grid-gap: 2px; }
 | 
					.grid-gap-2 { grid-gap: 2px; }
 | 
				
			||||||
@ -219,88 +74,59 @@ input:-webkit-autofill {
 | 
				
			|||||||
.grid-gap-5 { grid-gap: 5px; }
 | 
					.grid-gap-5 { grid-gap: 5px; }
 | 
				
			||||||
.grid-gap-c { grid-gap: var(--c-grid-gap); }
 | 
					.grid-gap-c { grid-gap: var(--c-grid-gap); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.grid-temp-col-c {
 | 
					.grid-temp-col-c { grid-template-columns: var(--c-grid-temp-col); }
 | 
				
			||||||
    grid-template-columns: var(--c-grid-temp-col);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.vakata-context, .vakata-context ul { background-color: #3f3f3f; box-shadow: 2px 2px 2px #111111; }
 | 
					.vakata-context, .vakata-context ul { background-color: #3f3f3f; box-shadow: 2px 2px 2px #111111; }
 | 
				
			||||||
.vakata-context li > a { color: white; text-shadow: 1px 1px 0 #4b4b4b; }
 | 
					.vakata-context li > a { color: white; text-shadow: 1px 1px 0 #4b4b4b; }
 | 
				
			||||||
.vakata-context .vakata-context-hover > a { background-color: #666666; box-shadow: 0 0 2px #2f2f2f; }
 | 
					.vakata-context .vakata-context-hover > a { background-color: #666666; box-shadow: 0 0 2px #2f2f2f; }
 | 
				
			||||||
.vakata-context li > a:hover { background-color: #636363; box-shadow: 0 0 2px #2f2f2f; }
 | 
					.vakata-context li > a:hover { background-color: #636363; box-shadow: 0 0 2px #2f2f2f; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.yt-left-navbar { position: fixed; left: 0; top: 0; height: 100%; z-index: 10; background-color: var(--theme-fusion-900); width: auto; max-width: 300px; margin-top: 4.125rem; }
 | 
					.yt-left-navbar { position: fixed; left: 0; top: 0; height: 100%; z-index: 10; background-color: rgb(25 25 25 / 95%); width: auto; max-width: 300px; margin-top: 4.125rem; }
 | 
				
			||||||
.yt-navbar-content ul { padding: 1rem 0rem; list-style-type: none; }
 | 
					.yt-navbar-content ul { padding: 1rem 0rem; list-style-type: none; }
 | 
				
			||||||
.yt-navbar-content ul li { position: relative; display: flex; flex-wrap: wrap; }
 | 
					.yt-navbar-content ul li { position: relative; display: flex; flex-wrap: wrap; }
 | 
				
			||||||
.yt-navbar-content ul li a { font-size: 0.9rem; padding: 0.75rem 2rem; position: relative; width: 100%; }
 | 
					.yt-navbar-content ul li a { font-size: 0.9rem; padding: 0.75rem 2rem; position: relative; width: 100%; }
 | 
				
			||||||
.yt-navbar-content ul li a:hover { background-color: var(--theme-fusion-600); }
 | 
					.yt-navbar-content ul li a:hover { background-color: var(--theme-fusion-600); }
 | 
				
			||||||
.yt-navbar-content ul li a:active, .yt-navbar-content ul li a.active { background-color: var(--theme-fusion-500); }
 | 
					.yt-navbar-content ul li a:active, .yt-navbar-content ul li a.active { background-color: var(--theme-fusion-500); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.card-header.p-3.ui-draggable-handle:hover { cursor: move; }
 | 
				
			||||||
@media screen and (max-width: 576px) {
 | 
					@media screen and (max-width: 576px) {
 | 
				
			||||||
    .yt-left-navbar { width: 100%; max-width: 100%; margin-top: 0; }
 | 
					    .yt-left-navbar { width: 100%; max-width: 100%; margin-top: 0; }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@keyframes lds-ring {
 | 
					@keyframes lds-ring {
 | 
				
			||||||
    0% {
 | 
					    0% { transform: rotate(0deg); }
 | 
				
			||||||
        transform: rotate(0deg);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    100% {
 | 
					    100% { transform: rotate(360deg); }
 | 
				
			||||||
        transform: rotate(360deg);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@keyframes flashing-c {
 | 
					@keyframes flashing-c {
 | 
				
			||||||
    0% {
 | 
					    0% { color: var(--flash-color-1); }
 | 
				
			||||||
        color: var(--flash-color-1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    49% {
 | 
					    49% { color: var(--flash-color-1); }
 | 
				
			||||||
        color: var(--flash-color-1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    50% {
 | 
					    50% { color: var(--flash-color-2); }
 | 
				
			||||||
        color: var(--flash-color-2);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    99% {
 | 
					    99% { color: var(--flash-color-2); }
 | 
				
			||||||
        color: var(--flash-color-2);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@keyframes flashing-bg {
 | 
					@keyframes flashing-bg {
 | 
				
			||||||
    0% {
 | 
					    0% { background: var(--flash-color-1); }
 | 
				
			||||||
        background: var(--flash-color-1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    49% {
 | 
					    49% { background: var(--flash-color-1); }
 | 
				
			||||||
        background: var(--flash-color-1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    50% {
 | 
					    50% { background: var(--flash-color-2); }
 | 
				
			||||||
        background: var(--flash-color-2);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    99% {
 | 
					    99% { background: var(--flash-color-2); }
 | 
				
			||||||
        background: var(--flash-color-2);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@keyframes flashing-c-bd {
 | 
					@keyframes flashing-c-bd {
 | 
				
			||||||
    0% {
 | 
					    0% { border-color: var(--flash-color-1); }
 | 
				
			||||||
        border-color: var(--flash-color-1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    49% {
 | 
					    49% { border-color: var(--flash-color-1); }
 | 
				
			||||||
        border-color: var(--flash-color-1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    50% {
 | 
					    50% { border-color: var(--flash-color-2); }
 | 
				
			||||||
        border-color: var(--flash-color-2);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    99% {
 | 
					    99% { border-color: var(--flash-color-2); }
 | 
				
			||||||
        border-color: var(--flash-color-2);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
/* ================================================================ */
 | 
					/* ================================================================ */
 | 
				
			||||||
/*                             單一方法                             */
 | 
					/*                             單一方法                             */
 | 
				
			||||||
@ -308,322 +134,168 @@ input:-webkit-autofill {
 | 
				
			|||||||
/* cursor */
 | 
					/* cursor */
 | 
				
			||||||
.cur-def { cursor: default !important; }
 | 
					.cur-def { cursor: default !important; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.cur-poi {
 | 
					.cur-poi { cursor: pointer !important; }
 | 
				
			||||||
    cursor: pointer !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*left 距離*/
 | 
					/*left 距離*/
 | 
				
			||||||
.left-05 {
 | 
					.left-05 { left: 0.5rem !important; }
 | 
				
			||||||
    left: 0.5rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.left-04 {
 | 
					.left-04 { left: 0.4rem !important; }
 | 
				
			||||||
    left: 0.4rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.left-03 {
 | 
					.left-03 { left: 0.3rem !important; }
 | 
				
			||||||
    left: 0.3rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.left-02 {
 | 
					.left-02 { left: 0.2rem !important; }
 | 
				
			||||||
    left: 0.2rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.left-01 {
 | 
					.left-01 { left: 0.1rem !important; }
 | 
				
			||||||
    left: 0.1rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*right 距離*/
 | 
					/*right 距離*/
 | 
				
			||||||
.right-05 {
 | 
					.right-05 { right: 0.5rem !important; }
 | 
				
			||||||
    right: 0.5rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.right-04 {
 | 
					.right-04 { right: 0.4rem !important; }
 | 
				
			||||||
    right: 0.4rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.right-03 {
 | 
					.right-03 { right: 0.3rem !important; }
 | 
				
			||||||
    right: 0.3rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.right-02 {
 | 
					.right-02 { right: 0.2rem !important; }
 | 
				
			||||||
    right: 0.2rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.right-01 {
 | 
					.right-01 { right: 0.1rem !important; }
 | 
				
			||||||
    right: 0.1rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*bottom 0.5rem*/
 | 
					/*bottom 0.5rem*/
 | 
				
			||||||
.bm-05 {
 | 
					.bm-05 { bottom: 0.5rem !important; }
 | 
				
			||||||
    bottom: 0.5rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bm-04 {
 | 
					.bm-04 { bottom: 0.4rem !important; }
 | 
				
			||||||
    bottom: 0.4rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bm-03 {
 | 
					.bm-03 { bottom: 0.3rem !important; }
 | 
				
			||||||
    bottom: 0.3rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bm-02 {
 | 
					.bm-02 { bottom: 0.2rem !important; }
 | 
				
			||||||
    bottom: 0.2rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bm-01 {
 | 
					.bm-01 { bottom: 0.1rem !important; }
 | 
				
			||||||
    bottom: 0.1rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*top 0.5rem*/
 | 
					/*top 0.5rem*/
 | 
				
			||||||
.tp-05 {
 | 
					.tp-05 { top: 0.5rem !important; }
 | 
				
			||||||
    top: 0.5rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.tp-04 {
 | 
					.tp-04 { top: 0.4rem !important; }
 | 
				
			||||||
    top: 0.4rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.tp-03 {
 | 
					.tp-03 { top: 0.3rem !important; }
 | 
				
			||||||
    top: 0.3rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.tp-02 {
 | 
					.tp-02 { top: 0.2rem !important; }
 | 
				
			||||||
    top: 0.2rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.tp-01 {
 | 
					.tp-01 { top: 0.1rem !important; }
 | 
				
			||||||
    top: 0.1rem !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* font-weight */
 | 
					/* font-weight */
 | 
				
			||||||
.fw-1 {
 | 
					.fw-1 { font-weight: 100; }
 | 
				
			||||||
    font-weight: 100;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-2 {
 | 
					.fw-2 { font-weight: 200; }
 | 
				
			||||||
    font-weight: 200;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-3 {
 | 
					.fw-3 { font-weight: 300; }
 | 
				
			||||||
    font-weight: 300;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-4 {
 | 
					.fw-4 { font-weight: 400; }
 | 
				
			||||||
    font-weight: 400;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-5 {
 | 
					.fw-5 { font-weight: 500; }
 | 
				
			||||||
    font-weight: 500;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-6 {
 | 
					.fw-6 { font-weight: 600; }
 | 
				
			||||||
    font-weight: 600;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-7 {
 | 
					.fw-7 { font-weight: 700; }
 | 
				
			||||||
    font-weight: 700;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-8 {
 | 
					.fw-8 { font-weight: 800; }
 | 
				
			||||||
    font-weight: 800;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fw-9 {
 | 
					.fw-9 { font-weight: 900; }
 | 
				
			||||||
    font-weight: 900;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* font-size */
 | 
					/* font-size */
 | 
				
			||||||
.fs-05 {
 | 
					.fs-05 { font-size: 0.5rem; }
 | 
				
			||||||
    font-size: 0.5rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-075 {
 | 
					.fs-075 { font-size: 0.75rem; }
 | 
				
			||||||
    font-size: 0.75rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-09 {
 | 
					.fs-09 { font-size: 0.9rem; }
 | 
				
			||||||
    font-size: 0.9rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-1 {
 | 
					.fs-1 { font-size: 1rem; }
 | 
				
			||||||
    font-size: 1rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-1-05 {
 | 
					.fs-1-05 { font-size: 1.05rem; }
 | 
				
			||||||
    font-size: 1.05rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-1-1 {
 | 
					.fs-1-1 { font-size: 1.1rem; }
 | 
				
			||||||
    font-size: 1.1rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-1-2 {
 | 
					.fs-1-2 { font-size: 1.2rem; }
 | 
				
			||||||
    font-size: 1.2rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-1-3 {
 | 
					.fs-1-3 { font-size: 1.3rem; }
 | 
				
			||||||
    font-size: 1.3rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-1-5 {
 | 
					.fs-1-5 { font-size: 1.5rem; }
 | 
				
			||||||
    font-size: 1.5rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-2 {
 | 
					.fs-2 { font-size: 2rem; }
 | 
				
			||||||
    font-size: 2rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.fs-2-5 {
 | 
					.fs-2-5 { font-size: 2.5rem; }
 | 
				
			||||||
    font-size: 2.5rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* border width */
 | 
					/* border width */
 | 
				
			||||||
.bd-0 {
 | 
					.bd-0 { border-width: 0px; }
 | 
				
			||||||
    border-width: 0px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bd-1 {
 | 
					.bd-1 { border-width: 1px; }
 | 
				
			||||||
    border-width: 1px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bd-2 {
 | 
					.bd-2 { border-width: 2px; }
 | 
				
			||||||
    border-width: 2px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* border direction */
 | 
					/* border direction */
 | 
				
			||||||
.bd-l {
 | 
					.bd-l { border-left-style: solid; }
 | 
				
			||||||
    border-left-style: solid;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bd-r {
 | 
					.bd-r { border-right-style: solid; }
 | 
				
			||||||
    border-right-style: solid;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bd-t {
 | 
					.bd-t { border-top-style: solid; }
 | 
				
			||||||
    border-top-style: solid;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bd-b {
 | 
					.bd-b { border-bottom-style: solid; }
 | 
				
			||||||
    border-bottom-style: solid;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* border radius */
 | 
					/* border radius */
 | 
				
			||||||
.br-1 {
 | 
					.br-1 { border-radius: 1px; }
 | 
				
			||||||
    border-radius: 1px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.br-2 {
 | 
					.br-2 { border-radius: 2px; }
 | 
				
			||||||
    border-radius: 2px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.br-3 {
 | 
					.br-3 { border-radius: 3px; }
 | 
				
			||||||
    border-radius: 3px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.br-4 {
 | 
					.br-4 { border-radius: 4px; }
 | 
				
			||||||
    border-radius: 4px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.br-5 {
 | 
					.br-5 { border-radius: 5px; }
 | 
				
			||||||
    border-radius: 5px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* flex-gap */
 | 
					/* flex-gap */
 | 
				
			||||||
.gap-1 {
 | 
					.gap-1 { gap: 1px; }
 | 
				
			||||||
    gap: 1px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-2 {
 | 
					.gap-2 { gap: 2px; }
 | 
				
			||||||
    gap: 2px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-3 {
 | 
					.gap-3 { gap: 3px; }
 | 
				
			||||||
    gap: 3px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-4 {
 | 
					.gap-4 { gap: 4px; }
 | 
				
			||||||
    gap: 4px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-5 {
 | 
					.gap-5 { gap: 5px; }
 | 
				
			||||||
    gap: 5px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-6 {
 | 
					.gap-6 { gap: 6px; }
 | 
				
			||||||
    gap: 6px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-7 {
 | 
					.gap-7 { gap: 7px; }
 | 
				
			||||||
    gap: 7px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.gap-8 {
 | 
					.gap-8 { gap: 8px; }
 | 
				
			||||||
    gap: 8px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* vertical-align */
 | 
					/* vertical-align */
 | 
				
			||||||
.va-t {
 | 
					.va-t { vertical-align: top; }
 | 
				
			||||||
    vertical-align: top;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.va-m {
 | 
					.va-m { vertical-align: middle; }
 | 
				
			||||||
    vertical-align: middle;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.va-b {
 | 
					.va-b { vertical-align: bottom; }
 | 
				
			||||||
    vertical-align: bottom;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bg-orange {
 | 
					.bg-orange { background-color: #ffa100; }
 | 
				
			||||||
    background-color: #ffa100;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* text color */
 | 
					/* text color */
 | 
				
			||||||
.t-main-purple {
 | 
					.t-main-purple { color: #623c80 !important; }
 | 
				
			||||||
    color: #623c80 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-black {
 | 
					.t-black { color: #000 !important; }
 | 
				
			||||||
    color: #000 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-white {
 | 
					.t-white { color: #fff !important; }
 | 
				
			||||||
    color: #fff !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-fb-blue {
 | 
					.t-fb-blue { color: #466ac2 !important; }
 | 
				
			||||||
    color: #466ac2 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-line-green {
 | 
					.t-line-green { color: #54C814 !important; }
 | 
				
			||||||
    color: #54C814 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-red {
 | 
					.t-red { color: #db0000 !important; }
 | 
				
			||||||
    color: #db0000 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-red-2 {
 | 
					.t-red-2 { color: var(--yt-red-2) !important; }
 | 
				
			||||||
    color: var(--yt-red-2) !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-gray {
 | 
					.t-gray { color: var(--yt-gray); }
 | 
				
			||||||
    color: var(--yt-gray);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-main-gray {
 | 
					.t-main-gray { color: var(--yt-main-gray); }
 | 
				
			||||||
    color: var(--yt-main-gray);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-gray-2 {
 | 
					.t-gray-2 { color: var(--yt-gray-2) !important; }
 | 
				
			||||||
    color: var(--yt-gray-2) !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-gray-3 {
 | 
					.t-gray-3 { color: var(--yt-gray-3); }
 | 
				
			||||||
    color: var(--yt-gray-3);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.t-yellow {
 | 
					.t-yellow { color: var(--yt-yellow-1); }
 | 
				
			||||||
    color: var(--yt-yellow-1);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -47,6 +47,10 @@
 | 
				
			|||||||
        <button type="button" class="btn btn-dark" onclick="cancelTransparentModel()">取消透明物件</button>
 | 
					        <button type="button" class="btn btn-dark" onclick="cancelTransparentModel()">取消透明物件</button>
 | 
				
			||||||
        <button type="button" class="btn btn-danger" onclick="proFile()">剖面</button>
 | 
					        <button type="button" class="btn btn-danger" onclick="proFile()">剖面</button>
 | 
				
			||||||
        <button type="button" class="btn btn-dark" onclick="getLevels()">取得levels</button>
 | 
					        <button type="button" class="btn btn-dark" onclick="getLevels()">取得levels</button>
 | 
				
			||||||
 | 
					        <div style="height: 50px">
 | 
				
			||||||
 | 
					            <canvas id="iot-heatmap-legend" width="300" height="50"></canvas>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <button type="button" class="btn btn-info" onclick="showHeat()">顯示熱圖圖示</button>
 | 
				
			||||||
        <!--<input id="lightBar" type="range" min="0" max="100" step="5" onchange="changeLightPower()">亮度-->
 | 
					        <!--<input id="lightBar" type="range" min="0" max="100" step="5" onchange="changeLightPower()">亮度-->
 | 
				
			||||||
        <!-- <input type="range">Main Axis</input> -->
 | 
					        <!-- <input type="range">Main Axis</input> -->
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -191,7 +195,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
        var curLightIsOpen = true;
 | 
					        var curLightIsOpen = true;
 | 
				
			||||||
        var light;
 | 
					        //var light;
 | 
				
			||||||
 | 
					        var cavas;
 | 
				
			||||||
 | 
					        this.canvas = document.getElementById('iot-heatmap-legend');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $(document).ready(function () {
 | 
					        $(document).ready(function () {
 | 
				
			||||||
            //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA');
 | 
					            //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA');
 | 
				
			||||||
@ -351,16 +357,16 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        function openOrCloseLight() {
 | 
					        function openOrCloseLight() {
 | 
				
			||||||
            if (light != null) {
 | 
					            //if (light != null) {
 | 
				
			||||||
                if (curLightIsOpen) {
 | 
					                if (curLightIsOpen) {
 | 
				
			||||||
                    curLightIsOpen = false;
 | 
					                    curLightIsOpen = false;
 | 
				
			||||||
                    setLightOpenOrClose(curLightIsOpen, light);
 | 
					                    setLightOpenOrClose(curLightIsOpen);//, light
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else {
 | 
					                else {
 | 
				
			||||||
                    curLightIsOpen = true;
 | 
					                    curLightIsOpen = true;
 | 
				
			||||||
                    setLightOpenOrClose(curLightIsOpen, light);
 | 
					                    setLightOpenOrClose(curLightIsOpen);//, light
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        function changeColorHotspot() {
 | 
					        function changeColorHotspot() {
 | 
				
			||||||
@ -396,6 +402,41 @@
 | 
				
			|||||||
            profile();
 | 
					            profile();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        function showHeat() {
 | 
				
			||||||
 | 
					            const labels = [
 | 
				
			||||||
 | 
					                `${(10).toFixed(2) }${"°C"}`,
 | 
				
			||||||
 | 
					                `${(40 / 2).toFixed(2)}${"°C"}`,
 | 
				
			||||||
 | 
					                `${(30).toFixed(2) }${"°C"}`
 | 
				
			||||||
 | 
					            ];
 | 
				
			||||||
 | 
					            const colorStops = ['blue', 'green', 'yellow', 'red'];
 | 
				
			||||||
 | 
					            createHeatmapRect(labels, colorStops);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        function createHeatmapRect(labels, colorStops) {
 | 
				
			||||||
 | 
					            if (!this.canvas) {
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const context = this.canvas.getContext('2d');
 | 
				
			||||||
 | 
					            let i, len;
 | 
				
			||||||
 | 
					            context.clearRect(0, 0, 300, 50);
 | 
				
			||||||
 | 
					            context.fillStyle = 'back';//white
 | 
				
			||||||
 | 
					            for (i = 0, len = labels.length; i < len; i++) {
 | 
				
			||||||
 | 
					                let x = 10 + 280 * i / (len - 1);
 | 
				
			||||||
 | 
					                if (i === len - 1) {
 | 
				
			||||||
 | 
					                    x -= context.measureText(labels[i]).width;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else if (i > 0) {
 | 
				
			||||||
 | 
					                    x -= 0.5 * context.measureText(labels[i]).width;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                context.fillText(labels[i], x, 10);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const gradient = context.createLinearGradient(0, 0, 300, 0);
 | 
				
			||||||
 | 
					            for (i = 0, len = colorStops.length; i < len; i++) {
 | 
				
			||||||
 | 
					                gradient.addColorStop(i / (len - 1), colorStops[i]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            context.fillStyle = gradient;
 | 
				
			||||||
 | 
					            context.fillRect(10, 20, 280, 20);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -34,6 +34,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
    <link rel="mask-icon" href="img/favicon/safari-pinned-tab.svg" color="#5bbad5">
 | 
					    <link rel="mask-icon" href="img/favicon/safari-pinned-tab.svg" color="#5bbad5">
 | 
				
			||||||
    <!-- Font Awesome -->
 | 
					    <!-- Font Awesome -->
 | 
				
			||||||
    <link href="lib/fontawesome-free/css/all.min.css" rel="stylesheet" />
 | 
					    <link href="lib/fontawesome-free/css/all.min.css" rel="stylesheet" />
 | 
				
			||||||
 | 
					    <link href="lib/jquery-ui/jquery-ui.min.css" rel="stylesheet" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <link href="lib/chart.js/Chart.min.css" rel="stylesheet" />
 | 
					    <link href="lib/chart.js/Chart.min.css" rel="stylesheet" />
 | 
				
			||||||
    <link href="lib/jstree-master/themes/default/style.min.css" rel="stylesheet" />
 | 
					    <link href="lib/jstree-master/themes/default/style.min.css" rel="stylesheet" />
 | 
				
			||||||
    <link href="lib/jstree-master/themes/default-dark/style.min.css" rel="stylesheet" />
 | 
					    <link href="lib/jstree-master/themes/default-dark/style.min.css" rel="stylesheet" />
 | 
				
			||||||
@ -140,7 +142,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
                    <!--we need this logo when user switches to nav-function-top-->
 | 
					                    <!--we need this logo when user switches to nav-function-top-->
 | 
				
			||||||
                    <div class="page-logo">
 | 
					                    <div class="page-logo">
 | 
				
			||||||
                        <a href="javascript:;" name="topFunBtn" data-page="dashboard" class="page-logo-link press-scale-down d-flex align-items-center position-relative">
 | 
					                        <a href="javascript:;" name="topFunBtn" data-page="dashboard" class="page-logo-link press-scale-down d-flex align-items-center position-relative">
 | 
				
			||||||
                            <img name="webLogo" src="img/logo.png" alt="SmartAdmin WebApp" aria-roledescription="logo">
 | 
					                            <img src="img/logo.png" alt="SmartAdmin WebApp" aria-roledescription="logo">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <!--<span class="page-logo-text mr-1">SmartAdmin WebApp</span>-->
 | 
					                            <!--<span class="page-logo-text mr-1">SmartAdmin WebApp</span>-->
 | 
				
			||||||
                            <!--<span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
 | 
					                            <!--<span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
 | 
				
			||||||
@ -770,6 +772,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
                        "lib/jquery-validation/dist/jquery.validate",
 | 
					                        "lib/jquery-validation/dist/jquery.validate",
 | 
				
			||||||
                        "lib/jquery-validation/dist/additional-methods.min",
 | 
					                        "lib/jquery-validation/dist/additional-methods.min",
 | 
				
			||||||
                        "lib/jquery-validation/dist/localization/messages_zh_TW",
 | 
					                        "lib/jquery-validation/dist/localization/messages_zh_TW",
 | 
				
			||||||
 | 
					                        "lib/jquery-ui/jquery-ui.min",
 | 
				
			||||||
                        "lib/chart.js/Chart.min",
 | 
					                        "lib/chart.js/Chart.min",
 | 
				
			||||||
                        "lib/dropzone/dropzone-min",
 | 
					                        "lib/dropzone/dropzone-min",
 | 
				
			||||||
                        "lib/jstree-master/jstree.min",
 | 
					                        "lib/jstree-master/jstree.min",
 | 
				
			||||||
@ -824,7 +827,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
            function isValidLogin() {
 | 
					            function isValidLogin() {
 | 
				
			||||||
                $("#app").load("_dashboard.html", loadCallback);
 | 
					                $("#app").load("_dashboard.html", loadCallback);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                getLogo();
 | 
					 | 
				
			||||||
                getUserInfo();
 | 
					                getUserInfo();
 | 
				
			||||||
                iniFroList();
 | 
					                iniFroList();
 | 
				
			||||||
                showMainSys();
 | 
					                showMainSys();
 | 
				
			||||||
@ -1078,7 +1080,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
                                                                    </div>
 | 
					                                                                    </div>
 | 
				
			||||||
                                                                </div>
 | 
					                                                                </div>
 | 
				
			||||||
                                                                <div class="card-body p-2 tab-content">
 | 
					                                                                <div class="card-body p-2 tab-content">
 | 
				
			||||||
                                                                    <div id="state" class="show active" data-tabname="cardTab" data-tabrole="child">
 | 
					                                                                    <div id="state" class="show active" data-tabname="cardTab" data-tabrole="child" style="height:100%">
 | 
				
			||||||
                                                                        ${drawStateTabBlo(devNum)}
 | 
					                                                                        ${drawStateTabBlo(devNum)}
 | 
				
			||||||
                                                                    </div>
 | 
					                                                                    </div>
 | 
				
			||||||
                                                                    <div id="info" data-tabname="cardTab" data-tabrole="child">
 | 
					                                                                    <div id="info" data-tabname="cardTab" data-tabrole="child">
 | 
				
			||||||
@ -1096,13 +1098,27 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
                        onShow: function (tooltipEle, oriEle) {
 | 
					                        onShow: function (tooltipEle, oriEle) {
 | 
				
			||||||
                            var tab = new YT.Tab({ tabName: "cardTab" })
 | 
					                            var tab = new YT.Tab({ tabName: "cardTab" })
 | 
				
			||||||
                            loadOpeRecTable(devGuid);
 | 
					                            loadOpeRecTable(devGuid);
 | 
				
			||||||
                            //loadErrRecTable2($(oriEle).data("number"));
 | 
					                            
 | 
				
			||||||
                            //loadErrRecTable();
 | 
					 | 
				
			||||||
                            loadErr($(oriEle).data("number"));
 | 
					                            loadErr($(oriEle).data("number"));
 | 
				
			||||||
                            $(tooltipEle).find("#info").html(typeof drawInfoTabBlo != "undefined" ? drawInfoTabBlo(devGuid) : "");
 | 
					                            $(tooltipEle).find("#info").html(typeof drawInfoTabBlo != "undefined" ? drawInfoTabBlo(devGuid) : "");
 | 
				
			||||||
                            if ($(oriEle).data("dbId")) {
 | 
					                            if ($(oriEle).data("dbId")) {
 | 
				
			||||||
                                controlFocusHotspot($(oriEle).data("dbId"));
 | 
					                                controlFocusHotspot($(oriEle).data("dbId"));
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					                            $(tooltipEle).draggable({
 | 
				
			||||||
 | 
					                                cursor: "move",
 | 
				
			||||||
 | 
					                                handle: ".card-header"  // 只能通过卡片的标题栏拖拽
 | 
				
			||||||
 | 
					                            });
 | 
				
			||||||
 | 
					                            $(tooltipEle).resizable({
 | 
				
			||||||
 | 
					                                resize: function (event,ui) {
 | 
				
			||||||
 | 
					                                    let iframe = $(ui.element).find("iframe");
 | 
				
			||||||
 | 
					                                    if (iframe.length != 0) {
 | 
				
			||||||
 | 
					                                        //let cardBodyHei = $(ui.element).find(".card-body").css("height");
 | 
				
			||||||
 | 
					                                        //if (cardBodyHei) { 
 | 
				
			||||||
 | 
					                                        //    $(iframe).css("height", cardBodyHei);
 | 
				
			||||||
 | 
					                                        //}
 | 
				
			||||||
 | 
					                                    }
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            });
 | 
				
			||||||
                            typeof subDeviceSetTable != "undefined" ? subDeviceSetTable($(oriEle).data("number")) : ""
 | 
					                            typeof subDeviceSetTable != "undefined" ? subDeviceSetTable($(oriEle).data("number")) : ""
 | 
				
			||||||
                        },
 | 
					                        },
 | 
				
			||||||
                        onHide: function (tooltipEle, oriEle) {
 | 
					                        onHide: function (tooltipEle, oriEle) {
 | 
				
			||||||
@ -1221,7 +1237,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            function controlFocusHotspot(dbId, open = true) {
 | 
					            function controlFocusHotspot(dbId, open = true) {
 | 
				
			||||||
                changeColorForHotspot(dbId, open);
 | 
					                changeColorForHotspot(dbId, open ? "focus" : null);
 | 
				
			||||||
                changeScaleForHotspot(dbId, open);
 | 
					                changeScaleForHotspot(dbId, open);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1457,7 +1473,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            let li = creEle("li");
 | 
					                            let li = creEle("li");
 | 
				
			||||||
                            let a = creA(subSysObj.full_name, { "href": "javascript:;" }, [], `subSysBtn${subSysObj.sub_system_tag}`, { page: page, tabname: page }, "topFunBtn");
 | 
					                            let a = creA(subSysObj.full_name, { "href": "javascript:;" }, [], `subSysBtn${subSysObj.sub_system_tag}`, { page: page, tabname: "systemMonitor" }, "topFunBtn");
 | 
				
			||||||
                            li.append(a);
 | 
					                            li.append(a);
 | 
				
			||||||
                            a.data("subSysObj", subSysObj)
 | 
					                            a.data("subSysObj", subSysObj)
 | 
				
			||||||
                            subSysObj.main_system_tag = mainSysObj.main_system_tag;
 | 
					                            subSysObj.main_system_tag = mainSysObj.main_system_tag;
 | 
				
			||||||
 | 
				
			|||||||
@ -11,11 +11,15 @@ var levels;//剖面用
 | 
				
			|||||||
var lowerIdx;//剖面的下方樓層
 | 
					var lowerIdx;//剖面的下方樓層
 | 
				
			||||||
var upperIdx;//剖面的上方樓層
 | 
					var upperIdx;//剖面的上方樓層
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function launchViewer(urn, callback, _selector = "#forgeViewer") {
 | 
					function launchViewer(urn, callback,failCallback, _selector = "#forgeViewer") {
 | 
				
			||||||
    selector = _selector;
 | 
					    selector = _selector;
 | 
				
			||||||
    var options = {
 | 
					    var options = {
 | 
				
			||||||
        env: 'AutodeskProduction',
 | 
					        env: 'AutodeskProduction',
 | 
				
			||||||
        getAccessToken: getForgeToken
 | 
					        getAccessToken: getForgeToken,
 | 
				
			||||||
 | 
					        settings: {
 | 
				
			||||||
 | 
					            ambientShadows: false,
 | 
				
			||||||
 | 
					            groundShadows: false
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Autodesk.Viewing.Initializer(options, () => {
 | 
					    Autodesk.Viewing.Initializer(options, () => {
 | 
				
			||||||
@ -25,11 +29,14 @@ function launchViewer(urn, callback, _selector = "#forgeViewer") {
 | 
				
			|||||||
        var documentId = 'urn:' + urn;
 | 
					        var documentId = 'urn:' + urn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
 | 
					        Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
 | 
				
			||||||
 | 
					        setShadowShow();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $(selector).on("autodesk:loaded", function (e, nodeIds) {
 | 
					        $(selector).on("autodesk:loaded", function (e, nodeIds) {
 | 
				
			||||||
            callback ? callback(viewer, nodeIds) : "";
 | 
					            callback ? callback(viewer, nodeIds) : "";
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 | 
					        $(selector).on("autodesk:loaded:fail", function (e) {
 | 
				
			||||||
 | 
					            failCallback ? failCallback(viewer) : "";
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //test 
 | 
					        //test 
 | 
				
			||||||
        // for (let i = 0; i < urn.length; i++) {
 | 
					        // for (let i = 0; i < urn.length; i++) {
 | 
				
			||||||
@ -58,12 +65,16 @@ function launchViewer(urn, callback, _selector = "#forgeViewer") {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function launchViewerForHotspot(urn, callback, _selector = "#forgeViewer") {
 | 
					function launchViewerForHotspot(urn, callback, failCallback, _selector = "#forgeViewer") {
 | 
				
			||||||
    selector = _selector;
 | 
					    selector = _selector;
 | 
				
			||||||
    var av = Autodesk.Viewing;
 | 
					    var av = Autodesk.Viewing;
 | 
				
			||||||
    var options = {
 | 
					    var options = {
 | 
				
			||||||
        env: 'AutodeskProduction',
 | 
					        env: 'AutodeskProduction',
 | 
				
			||||||
        getAccessToken: getForgeToken
 | 
					        getAccessToken: getForgeToken,
 | 
				
			||||||
 | 
					        settings: {
 | 
				
			||||||
 | 
					            ambientShadows: false,
 | 
				
			||||||
 | 
					            groundShadows: false
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Autodesk.Viewing.Initializer(options, () => {
 | 
					    Autodesk.Viewing.Initializer(options, () => {
 | 
				
			||||||
@ -76,18 +87,27 @@ function launchViewerForHotspot(urn, callback, _selector = "#forgeViewer") {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
 | 
					        Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
 | 
				
			||||||
 | 
					        setShadowShow();
 | 
				
			||||||
        $(selector).on("autodesk:loaded", function (e, nodeIds) {
 | 
					        $(selector).on("autodesk:loaded", function (e, nodeIds) {
 | 
				
			||||||
            callback ? callback(viewer, nodeIds) : "";
 | 
					            callback ? callback(viewer, nodeIds) : "";
 | 
				
			||||||
 | 
					            console.log(viewer.get)
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $(selector).on("autodesk:loaded:fail", function (e) {
 | 
				
			||||||
 | 
					            failCallback ? failCallback(viewer) : "";
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function launchViewerNoTools(urn, callback, _selector = "#forgeViewer") {
 | 
					function launchViewerNoTools(urn, callback, failCallback, _selector = "#forgeViewer") {
 | 
				
			||||||
    selector = _selector;
 | 
					    selector = _selector;
 | 
				
			||||||
    var options = {
 | 
					    var options = {
 | 
				
			||||||
        env: 'AutodeskProduction',
 | 
					        env: 'AutodeskProduction',
 | 
				
			||||||
        getAccessToken: getForgeToken
 | 
					        getAccessToken: getForgeToken,
 | 
				
			||||||
 | 
					        settings: {
 | 
				
			||||||
 | 
					            ambientShadows: false,
 | 
				
			||||||
 | 
					            groundShadows: false
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Autodesk.Viewing.Initializer(options, () => {
 | 
					    Autodesk.Viewing.Initializer(options, () => {
 | 
				
			||||||
@ -97,10 +117,14 @@ function launchViewerNoTools(urn, callback, _selector = "#forgeViewer") {
 | 
				
			|||||||
        var documentId = 'urn:' + urn;
 | 
					        var documentId = 'urn:' + urn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
 | 
					        Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
 | 
				
			||||||
 | 
					        setShadowShow();
 | 
				
			||||||
        $(selector).on("autodesk:loaded", function (e, nodeIds) {
 | 
					        $(selector).on("autodesk:loaded", function (e, nodeIds) {
 | 
				
			||||||
            callback ? callback(viewer, nodeIds) : "";
 | 
					            callback ? callback(viewer, nodeIds) : "";
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $(selector).on("autodesk:loaded:fail", function (e) {
 | 
				
			||||||
 | 
					            failCallback ? failCallback(viewer) : "";
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -495,7 +519,7 @@ function getAllDbIds(viewer) {
 | 
				
			|||||||
 * Autodesk.Viewing.Document.load() failuire callback.
 | 
					 * Autodesk.Viewing.Document.load() failuire callback.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function onDocumentLoadFailure(viewerErrorCode) {
 | 
					function onDocumentLoadFailure(viewerErrorCode) {
 | 
				
			||||||
    $(selector).trigger("autodesk:loaded");
 | 
					    $(selector).trigger("autodesk:loaded:fail");
 | 
				
			||||||
    console.error("onDocumentLoadFailure() - errorCode:" + viewerErrorCode);
 | 
					    console.error("onDocumentLoadFailure() - errorCode:" + viewerErrorCode);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -622,10 +646,14 @@ class ADHeatMaps {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//全部物件 透明度: 輸入0:透明;輸入1:不透明
 | 
					//全部物件 透明度: 輸入0:透明;輸入1:不透明
 | 
				
			||||||
function setTransparentBuilding(transparent) {
 | 
					function setTransparentBuilding(transparent, filDbids = []) {
 | 
				
			||||||
    for (var i = 0; i < allDbIdsStr.length; i++) {
 | 
					    for (var i = 0; i < allDbIdsStr.length; i++) {
 | 
				
			||||||
        setTransparency(parseInt(allDbIdsStr[i]), transparent);
 | 
					        setTransparency(parseInt(allDbIdsStr[i]), transparent);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (var i = 0; i < filDbids.length; i++) {
 | 
				
			||||||
 | 
					        setTransparency(parseInt(filDbids[i]), transparent == 0 ? 1 : 0);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//設定模型 透明度
 | 
					//設定模型 透明度
 | 
				
			||||||
@ -636,7 +664,11 @@ function setTransparency(nodeId, opacity) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    model.getData().instanceTree.enumNodeFragments(
 | 
					    model.getData().instanceTree.enumNodeFragments(
 | 
				
			||||||
        nodeId, (fragId) => {
 | 
					        nodeId, (fragId) => {
 | 
				
			||||||
 | 
					            // 將遍歷到的片段 ID 添加到結果陣列中
 | 
				
			||||||
            fragIds.push(fragId)
 | 
					            fragIds.push(fragId)
 | 
				
			||||||
 | 
					        }, (nodeId) => {
 | 
				
			||||||
 | 
					            // 如果遍歷到的節點是葉節點,则返回 true,表示繼續遍歷該節點的片段
 | 
				
			||||||
 | 
					            return model.getData().instanceTree.isLeaf(nodeId);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fragIds.forEach((fragId) => {
 | 
					    fragIds.forEach((fragId) => {
 | 
				
			||||||
@ -656,12 +688,34 @@ function setTransparency(nodeId, opacity) {
 | 
				
			|||||||
    viewer.impl.invalidate(true, true, true);
 | 
					    viewer.impl.invalidate(true, true, true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function changeColor(nodeId) {//電梯變綠色
 | 
					function changeColor(nodeId, color = [0, 255, 0, 1]) {//電梯變綠色
 | 
				
			||||||
 | 
					    let model = viewer.model;
 | 
				
			||||||
 | 
					    let fragList = viewer.model.getFragmentList();
 | 
				
			||||||
    let instanceTree = viewer.model.getData().instanceTree;
 | 
					    let instanceTree = viewer.model.getData().instanceTree;
 | 
				
			||||||
 | 
					    color = color.map((x, i) => i < 3 ? x / 255 : x);
 | 
				
			||||||
 | 
					    color = new THREE.Vector4().fromArray(color);
 | 
				
			||||||
 | 
					    model.getData().instanceTree.enumNodeFragments(
 | 
				
			||||||
 | 
					        nodeId, (fragId) => {
 | 
				
			||||||
 | 
					            // 將遍歷到的片段 ID 添加到結果陣列中
 | 
				
			||||||
 | 
					            let material = fragList.getMaterial(fragId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (material) {
 | 
				
			||||||
 | 
					                //设置透明度
 | 
				
			||||||
 | 
					                material.opacity = 1;//0.5;
 | 
				
			||||||
 | 
					                material.transparent = true;
 | 
				
			||||||
 | 
					                //标记更新
 | 
				
			||||||
 | 
					                material.needsUpdate = true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }, (nodeId) => {
 | 
				
			||||||
 | 
					            // 如果遍歷到的節點是葉節點,则返回 true,表示繼續遍歷該節點的片段
 | 
				
			||||||
 | 
					            return model.getData().instanceTree.isLeaf(nodeId);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
    instanceTree.enumNodeChildren(nodeId, function (chiNodeId) {
 | 
					    instanceTree.enumNodeChildren(nodeId, function (chiNodeId) {
 | 
				
			||||||
        var color = new THREE.Vector4(0, 1, 0, 1);
 | 
					 | 
				
			||||||
        viewer.setThemingColor(chiNodeId, color);
 | 
					        viewer.setThemingColor(chiNodeId, color);
 | 
				
			||||||
    }, true)
 | 
					    }, (chiNodeId) => {
 | 
				
			||||||
 | 
					        // 如果遍歷到的節點是葉節點,则返回 true,表示繼續遍歷該節點的片段
 | 
				
			||||||
 | 
					        return model.getData().instanceTree.isLeaf(chiNodeId);
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function hideColor(nodeId) {//顏色改成透明
 | 
					function hideColor(nodeId) {//顏色改成透明
 | 
				
			||||||
@ -734,11 +788,11 @@ async function addHotPoint(data) {
 | 
				
			|||||||
    function onSpriteClicked(event) {
 | 
					    function onSpriteClicked(event) {
 | 
				
			||||||
        event.hasStopped = true;
 | 
					        event.hasStopped = true;
 | 
				
			||||||
        if (event != undefined && event != null) {
 | 
					        if (event != undefined && event != null) {
 | 
				
			||||||
            if (event.dbId >= dbIdStart && event.dbId <= dbIdEnd) {//event.dbId > 0 && event.dbId < 19
 | 
					            if (event.dbId >= dbIdStart) {//event.dbId > 0 && event.dbId < 19
 | 
				
			||||||
                console.log(`Sprite clicked: ${event.dbId}`);
 | 
					                console.log(`Sprite clicked: ${event.dbId}`);
 | 
				
			||||||
                openHotspotModal();
 | 
					                openHotspotModal();
 | 
				
			||||||
                for (let i = dbIdStart; i <= dbIdEnd; i++) {
 | 
					                for (let i = dbIdStart; i <= myDataList.length + 10; i++) {
 | 
				
			||||||
                    changeColorForHotspot(i, false);
 | 
					                    changeColorForHotspot(i);
 | 
				
			||||||
                    changeScaleForHotspot(i, false);
 | 
					                    changeScaleForHotspot(i, false);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                let myData = myDataList.filter(x => x._dbId == event.dbId)[0];
 | 
					                let myData = myDataList.filter(x => x._dbId == event.dbId)[0];
 | 
				
			||||||
@ -776,11 +830,13 @@ async function addHotPoint(data) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 熱點 更換顏色
 | 
					// 熱點 更換顏色
 | 
				
			||||||
async function changeColorForHotspot(dbId, type = true) {
 | 
					async function changeColorForHotspot(dbId, type = null) {
 | 
				
			||||||
    const dataVizExtn = await viewer.loadExtension("Autodesk.DataVisualization");
 | 
					    const dataVizExtn = await viewer.loadExtension("Autodesk.DataVisualization");
 | 
				
			||||||
    let spriteColorFocus = new THREE.Color(0x00ffe1);
 | 
					    let spriteColorFocus = new THREE.Color(0xffffff); 
 | 
				
			||||||
    if (!type) {
 | 
					    if (type == "focus") {
 | 
				
			||||||
        spriteColorFocus = new THREE.Color(0xffffff);
 | 
					        spriteColorFocus = new THREE.Color(0x00ffe1);
 | 
				
			||||||
 | 
					    } else if (type == "error") {
 | 
				
			||||||
 | 
					        spriteColorFocus = new THREE.Color(0xff0000);
 | 
				
			||||||
    } 
 | 
					    } 
 | 
				
			||||||
    const viewablesToUpdate = dbId;
 | 
					    const viewablesToUpdate = dbId;
 | 
				
			||||||
    dataVizExtn.invalidateViewables(viewablesToUpdate, (viewable) => {
 | 
					    dataVizExtn.invalidateViewables(viewablesToUpdate, (viewable) => {
 | 
				
			||||||
@ -1001,7 +1057,7 @@ async function getRemoteLevels() {
 | 
				
			|||||||
    return levels2;
 | 
					    return levels2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function getLevelsData(lowerFloor, upperFloor) {
 | 
					async function getLevelsData(lowerFloor, upperFloor, callback = null) {
 | 
				
			||||||
    // 樓層正規化 取得樓層 
 | 
					    // 樓層正規化 取得樓層 
 | 
				
			||||||
    const floorRegex = /[\d|\w]+F/gmi;
 | 
					    const floorRegex = /[\d|\w]+F/gmi;
 | 
				
			||||||
    const data = await this.getRemoteLevels();
 | 
					    const data = await this.getRemoteLevels();
 | 
				
			||||||
@ -1015,7 +1071,7 @@ async function getLevelsData(lowerFloor, upperFloor) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.levels = data;
 | 
					    this.levels = data;
 | 
				
			||||||
    profile();
 | 
					    profile(callback);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function getCutPlaneParam(idx, n) {
 | 
					function getCutPlaneParam(idx, n) {
 | 
				
			||||||
@ -1036,12 +1092,13 @@ function getCutPlaneParam(idx, n) {
 | 
				
			|||||||
    return new THREE.Vector4(0, 0, n, d);
 | 
					    return new THREE.Vector4(0, 0, n, d);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function profile() {
 | 
					function profile(callback = null) {
 | 
				
			||||||
    //const upperIdx = 6;
 | 
					    //const upperIdx = 6;
 | 
				
			||||||
    const upperCutPlaneParam = this.getCutPlaneParam(upperIdx, 1);
 | 
					    const upperCutPlaneParam = this.getCutPlaneParam(upperIdx, 1);
 | 
				
			||||||
    //const lowerIdx = 7;
 | 
					    //const lowerIdx = 7;
 | 
				
			||||||
    const lowerCutPlaneParam = this.getCutPlaneParam(lowerIdx, -1);
 | 
					    const lowerCutPlaneParam = this.getCutPlaneParam(lowerIdx, -1);
 | 
				
			||||||
    this.viewer.setCutPlanes([upperCutPlaneParam, lowerCutPlaneParam]);
 | 
					    this.viewer.setCutPlanes([upperCutPlaneParam, lowerCutPlaneParam]);
 | 
				
			||||||
 | 
					    callback ? callback() : "";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
//----------------- end -----------------------------------------------
 | 
					//----------------- end -----------------------------------------------
 | 
				
			||||||
//新增燈光
 | 
					//新增燈光
 | 
				
			||||||
@ -1091,11 +1148,15 @@ function changeColorTransparency(nodeId, color) {//變綠色
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//隱藏全物件
 | 
					//隱藏全物件
 | 
				
			||||||
function hideAllObjects() {
 | 
					function hideAllObjects(filDbids = []) {
 | 
				
			||||||
    //viewer.hide(4);//只針對一個物件(dbid為4)做隱藏
 | 
					    //viewer.hide(4);//只針對一個物件(dbid為4)做隱藏
 | 
				
			||||||
    for (var i = 0; i < allDbIdsStr.length; i++) {
 | 
					    for (var i = 0; i < allDbIdsStr.length; i++) {
 | 
				
			||||||
        viewer.hide(parseInt(allDbIdsStr[i]));
 | 
					        viewer.hide(parseInt(allDbIdsStr[i]));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (var i = 0; i < filDbids.length; i++) {
 | 
				
			||||||
 | 
					        viewer.show(parseInt(filDbids[i]), viewer.model);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
//顯示全物件
 | 
					//顯示全物件
 | 
				
			||||||
function showAllObjects() {
 | 
					function showAllObjects() {
 | 
				
			||||||
@ -1121,4 +1182,10 @@ async function toLoadHeatmap(roomArr) {
 | 
				
			|||||||
    const model = viewer.model;
 | 
					    const model = viewer.model;
 | 
				
			||||||
    loadHeatmaps(model, roomArr);
 | 
					    loadHeatmaps(model, roomArr);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function setShadowShow(type = false) {
 | 
				
			||||||
 | 
					    viewer.setGroundShadow(type);
 | 
				
			||||||
 | 
					    viewer.impl.sceneUpdated(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
//============================= end ===================================
 | 
					//============================= end ===================================
 | 
				
			||||||
@ -4,12 +4,14 @@ var targetFloorZ;
 | 
				
			|||||||
var elevatorSpeed;
 | 
					var elevatorSpeed;
 | 
				
			||||||
var allDbIdsStr;
 | 
					var allDbIdsStr;
 | 
				
			||||||
let bulbLight;//點燈
 | 
					let bulbLight;//點燈
 | 
				
			||||||
let spotLight;//聚光燈
 | 
					var spotLight;//聚光燈
 | 
				
			||||||
var myDataList;//設備清單
 | 
					var myDataList;//設備清單
 | 
				
			||||||
var viewableData;
 | 
					var viewableData;
 | 
				
			||||||
var dataVizExtn;
 | 
					var dataVizExtn;
 | 
				
			||||||
var spriteColorRed;
 | 
					var spriteColorRed;
 | 
				
			||||||
var levels;//剖面用
 | 
					var levels;//剖面用
 | 
				
			||||||
 | 
					var light;
 | 
				
			||||||
 | 
					let pointLightHelper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function launchViewer(urn) {
 | 
					function launchViewer(urn) {
 | 
				
			||||||
    var av = Autodesk.Viewing;
 | 
					    var av = Autodesk.Viewing;
 | 
				
			||||||
@ -71,7 +73,7 @@ function onDocumentLoadSuccess(doc) {
 | 
				
			|||||||
         var currSelection = viewer.getSelection();
 | 
					         var currSelection = viewer.getSelection();
 | 
				
			||||||
         var domElem = document.getElementById('id_printer');
 | 
					         var domElem = document.getElementById('id_printer');
 | 
				
			||||||
         domElem.innerText = currSelection[0];
 | 
					         domElem.innerText = currSelection[0];
 | 
				
			||||||
         var a = newLight();
 | 
					         /*var a = newLight();*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
         //var color = new THREE.Vector4(255 / 255, 0, 0, 1);
 | 
					         //var color = new THREE.Vector4(255 / 255, 0, 0, 1);
 | 
				
			||||||
@ -464,8 +466,8 @@ function onDocumentLoadSuccess(doc) {
 | 
				
			|||||||
    //spotLight.target = cube;
 | 
					    //spotLight.target = cube;
 | 
				
			||||||
    //viewer.scene.add(spotLight);
 | 
					    //viewer.scene.add(spotLight);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //var light = newLight();
 | 
					    //light = newLight();
 | 
				
			||||||
    /*newLight();*/
 | 
					    newLight();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -480,7 +482,7 @@ async function addHotPoint(data) {
 | 
				
			|||||||
    const spriteIcon = "https://d2zqnmauvnpnnm.cloudfront.net/assets-1/images/circle.svg"; //"/img/forge/hotspot.svg";
 | 
					    const spriteIcon = "https://d2zqnmauvnpnnm.cloudfront.net/assets-1/images/circle.svg"; //"/img/forge/hotspot.svg";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const style = new DataVizCore.ViewableStyle(viewableType, spriteColor, spriteIcon);
 | 
					    const style = new DataVizCore.ViewableStyle(viewableType, spriteColor, spriteIcon);
 | 
				
			||||||
 | 
					    var a = newLight();
 | 
				
			||||||
    //function onSpriteClicked(event) {
 | 
					    //function onSpriteClicked(event) {
 | 
				
			||||||
    //    console.log(`Sprite clicked: ${event.dbId}`);
 | 
					    //    console.log(`Sprite clicked: ${event.dbId}`);
 | 
				
			||||||
    //}
 | 
					    //}
 | 
				
			||||||
@ -519,6 +521,7 @@ async function addHotPoint(data) {
 | 
				
			|||||||
        event.hasStopped = true;
 | 
					        event.hasStopped = true;
 | 
				
			||||||
        if (event != undefined && event != null) {
 | 
					        if (event != undefined && event != null) {
 | 
				
			||||||
            if (event.dbId >= 10 && event.dbId <= 13) {//event.dbId > 0 && event.dbId < 19
 | 
					            if (event.dbId >= 10 && event.dbId <= 13) {//event.dbId > 0 && event.dbId < 19
 | 
				
			||||||
 | 
					                setLightValues(20, 0x00ff00)
 | 
				
			||||||
                console.log(`Sprite clicked: ${event.dbId}`);
 | 
					                console.log(`Sprite clicked: ${event.dbId}`);
 | 
				
			||||||
                openHotspotModal();
 | 
					                openHotspotModal();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -1139,8 +1142,10 @@ async function loadHeatmaps(model) {
 | 
				
			|||||||
    // Setup surface shading
 | 
					    // Setup surface shading
 | 
				
			||||||
    await dataVizExtn.setupSurfaceShading(model, heatmapData);
 | 
					    await dataVizExtn.setupSurfaceShading(model, heatmapData);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //dataVizExtn.registerSurfaceShadingColors("co2", [0x00ff00, 0xff0000]);
 | 
					    const sensorColors = [0x0000ff, 0x00ff00, 0xffff00, 0xff0000];//0 ~ 1 藍綠黃紅
 | 
				
			||||||
    dataVizExtn.registerSurfaceShadingColors("temperature", [0xff0000, 0x0000ff]);
 | 
					
 | 
				
			||||||
 | 
					    //dataVizExtn.registerSurfaceShadingColors("co2", [0x00ff00, 0xff0000]); 0~1
 | 
				
			||||||
 | 
					    dataVizExtn.registerSurfaceShadingColors("temperature", sensorColors);//[0xff0000, 0x0000ff]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function getSensorValue(device, sensorType) {
 | 
					    function getSensorValue(device, sensorType) {
 | 
				
			||||||
        return sensorVals[parseInt(device.id.slice(-1)) - 1]; // 值: 0~1之間
 | 
					        return sensorVals[parseInt(device.id.slice(-1)) - 1]; // 值: 0~1之間
 | 
				
			||||||
@ -1382,33 +1387,31 @@ async function newLight() {
 | 
				
			|||||||
    //angle - 光從其上界為 Math.PI / 2 的方向散射的最大角度。
 | 
					    //angle - 光從其上界為 Math.PI / 2 的方向散射的最大角度。
 | 
				
			||||||
    //半影 - 由於半影而衰減的聚光燈錐體的百分比。取值介於 0 和 1 之間。默認值為零。
 | 
					    //半影 - 由於半影而衰減的聚光燈錐體的百分比。取值介於 0 和 1 之間。默認值為零。
 | 
				
			||||||
    //decay - 光沿光的距離變暗的量。
 | 
					    //decay - 光沿光的距離變暗的量。
 | 
				
			||||||
    spotLight = new THREE.SpotLight(0xffffff, 200, 20, 0.6, 0.5, 10);//0xffffff 80, 10  //15, 20 , Math.PI / 12
 | 
					    //spotLight = new THREE.SpotLight(0xff0000, 200, 20, 0.6, 0.5, 10);//0xffffff 80, 10  //15, 20 , Math.PI / 12
 | 
				
			||||||
    spotLight.position.set(43.72, -15.65, -44.96); //set(-17.33, 51.03, -2.52); // -7.58, 18.20, -0.25 -44.96
 | 
					    //spotLight.position.set(43.72, -15.65, -44.96); //set(-17.33, 51.03, -2.52); // -7.58, 18.20, -0.25 -44.96
 | 
				
			||||||
    spotLight.castShadow = false;
 | 
					    //spotLight.castShadow = false;
 | 
				
			||||||
    spotLight.visible = true;
 | 
					    //spotLight.visible = true;
 | 
				
			||||||
    //var geom = new THREE.BoxGeometry(); //create 幾何對象 -17.33, 51.03, -4.52
 | 
					 | 
				
			||||||
    //var material = new THREE.MeshLambertMaterial({ color: 0xffff00 });//0xff0000
 | 
					 | 
				
			||||||
    //var cube = new THREE.Mesh(geom, material);
 | 
					 | 
				
			||||||
    //cube.position.set(43.72, -15.65, -46); //set(-17.33, 51.03, -10);//-4.52 // -7.58, 18.20, -1
 | 
					 | 
				
			||||||
    //cube.scale.set(0.5, 0.5, 0.5);
 | 
					 | 
				
			||||||
    //viewer.scene.add(cube);
 | 
					 | 
				
			||||||
    //spotLight.target = cube;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    spotLight.target.position.set(43.72, -15.65, -60);// -15.65 -48
 | 
					    //spotLight.target.position.set(43.72, -15.65, -60);// -15.65 -48
 | 
				
			||||||
    viewer.scene.add(spotLight.target);
 | 
					    //viewer.scene.add(spotLight.target);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    viewer.scene.add(spotLight);
 | 
					    //viewer.scene.add(spotLight);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    viewer.impl.sceneUpdated(true);
 | 
					    //viewer.impl.sceneUpdated(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //return spotLight;
 | 
					    //return spotLight;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //加入點燈光
 | 
					    //加入點燈光
 | 
				
			||||||
    //bulbLight = new THREE.PointLight(0xff0000, 50, 20, 2);//0xff0000
 | 
					    bulbLight = new THREE.PointLight(0xff0000, 50, 20, 2);//0xff0000
 | 
				
			||||||
    //bulbLight.position.set(43.72, -15.65, -44.96);//17.880840301513672
 | 
					    bulbLight.position.set(43.72, -15.65, -44.96);//17.880840301513672
 | 
				
			||||||
    //bulbLight.castShadow = true;
 | 
					    bulbLight.castShadow = true;
 | 
				
			||||||
    //viewer.scene.add(bulbLight);
 | 
					    bulbLight.visible = true;
 | 
				
			||||||
    //viewer.impl.sceneUpdated(true);
 | 
					    viewer.scene.add(bulbLight);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //pointLightHelper = new THREE.PointLightHelper(pointLight);
 | 
				
			||||||
 | 
					    //viewer.scene.add(pointLightHelper);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    viewer.impl.sceneUpdated(true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-------------- 更改燈光範圍 --------------------------
 | 
					//-------------- 更改燈光範圍 --------------------------
 | 
				
			||||||
@ -1418,23 +1421,31 @@ function setLightPower(value) {
 | 
				
			|||||||
    viewer.impl.sceneUpdated(true);
 | 
					    viewer.impl.sceneUpdated(true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function setLightValues(intensity, distance, angle, penumbra, decay) {
 | 
					function setLightValues(intensity, color) {// distance, angle, penumbra, decay,
 | 
				
			||||||
 | 
					    viewer.scene.remove(spotLight)
 | 
				
			||||||
    spotLight.intensity = intensity;
 | 
					    spotLight.intensity = intensity;
 | 
				
			||||||
    spotLight.distance = distance;
 | 
					    //spotLight.distance = distance;
 | 
				
			||||||
    spotLight.angle = angle;
 | 
					    //spotLight.angle = angle;
 | 
				
			||||||
    spotLight.penumbra = penumbra;
 | 
					    //spotLight.penumbra = penumbra;
 | 
				
			||||||
    spotLight.decay = decay;
 | 
					    //spotLight.decay = decay;
 | 
				
			||||||
 | 
					    var tempcolor = new THREE.Color().setHex(color);
 | 
				
			||||||
 | 
					    spotLight.color = tempcolor;
 | 
				
			||||||
 | 
					    viewer.impl.sceneUpdated(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    viewer.scene.add(spotLight);
 | 
				
			||||||
    viewer.impl.sceneUpdated(true);
 | 
					    viewer.impl.sceneUpdated(true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function setLightOpenOrClose(value, light) {
 | 
					function setLightOpenOrClose(value) {//, light
 | 
				
			||||||
    if (value) {
 | 
					    if (value) {
 | 
				
			||||||
        light.visible = true;
 | 
					        //light.visible = true;
 | 
				
			||||||
        //spotLight.visible = true;
 | 
					        //spotLight.visible = true;
 | 
				
			||||||
 | 
					        bulbLight.visible = true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else {
 | 
					    else {
 | 
				
			||||||
        light.visible = false;
 | 
					        //light.visible = false;
 | 
				
			||||||
        //spotLight.visible = false;
 | 
					        //spotLight.visible = false;
 | 
				
			||||||
 | 
					        bulbLight.visible = false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    viewer.impl.sceneUpdated(true);
 | 
					    viewer.impl.sceneUpdated(true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -604,4 +604,8 @@ class Forge3DElevFull {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }, null, "POST").send();
 | 
					        }, null, "POST").send();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    getNodeIds = function () {
 | 
				
			||||||
 | 
					        return this.elev3DObj.map(x => x.nodeId);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -83,7 +83,7 @@ class YourTeamNavbar {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    initClose = function () {
 | 
					    initClose = function () {
 | 
				
			||||||
        debugger
 | 
					        
 | 
				
			||||||
        let width = $(this.element)[0].offsetWidth;
 | 
					        let width = $(this.element)[0].offsetWidth;
 | 
				
			||||||
        if (this.type == "left") {
 | 
					        if (this.type == "left") {
 | 
				
			||||||
            $(this.element).css("left", 0 - width);
 | 
					            $(this.element).css("left", 0 - width);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										7
									
								
								Frontend/lib/jquery-ui/jquery-ui.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Frontend/lib/jquery-ui/jquery-ui.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										6
									
								
								Frontend/lib/jquery-ui/jquery-ui.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Frontend/lib/jquery-ui/jquery-ui.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -61,7 +61,9 @@ namespace FrontendWebApi.ApiControllers
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                var dbsub = await frontendRepository.GetAllAsync<HistoryDBMainSub>(
 | 
					                var dbsub = await frontendRepository.GetAllAsync<HistoryDBMainSub>(
 | 
				
			||||||
                    @$"select distinct v1.system_key main_name, v1.system_value main_system_tag, v2.system_key sub_name, v2.system_value sub_system_tag, v1.system_priority, v2.system_priority,
 | 
					                    @$"select distinct v1.system_key main_name, v1.system_value main_system_tag, v2.system_key sub_name, v2.system_value sub_system_tag, v1.system_priority, v2.system_priority,
 | 
				
			||||||
                                dk.device_normal_color, dk.device_close_color, dk.device_error_color,dk.device_normal_flashing, dk.device_close_flashing, dk.device_error_flashing
 | 
					                                dk.device_normal_color, dk.device_close_color, dk.device_error_color,dk.device_normal_flashing, dk.device_close_flashing, dk.device_error_flashing,
 | 
				
			||||||
 | 
					                                dk.device_normal_text, dk.device_close_text, dk.device_error_text,dk.device_normal_point_name, dk.device_close_point_name, dk.device_error_point_name,
 | 
				
			||||||
 | 
					                                dk.device_normal_point_value, dk.device_close_point_value, dk.device_error_point_value
 | 
				
			||||||
                                -- di.full_name as device_item_name, di.points as device_item_points, di.unit as device_item_unit, di.is_show_riserDiagram as device_item_is_show_riserDiagram,
 | 
					                                -- di.full_name as device_item_name, di.points as device_item_points, di.unit as device_item_unit, di.is_show_riserDiagram as device_item_is_show_riserDiagram,
 | 
				
			||||||
                                -- di.is_controll as device_item_is_controll, di.is_bool as device_item_is_bool, di.is_link as device_item_is_link
 | 
					                                -- di.is_controll as device_item_is_controll, di.is_bool as device_item_is_bool, di.is_link as device_item_is_link
 | 
				
			||||||
                        from role_auth a
 | 
					                        from role_auth a
 | 
				
			||||||
@ -100,6 +102,15 @@ namespace FrontendWebApi.ApiControllers
 | 
				
			|||||||
                        history_Sub_System.device_normal_flashing = sub.device_normal_flashing;
 | 
					                        history_Sub_System.device_normal_flashing = sub.device_normal_flashing;
 | 
				
			||||||
                        history_Sub_System.device_close_flashing = sub.device_close_flashing;
 | 
					                        history_Sub_System.device_close_flashing = sub.device_close_flashing;
 | 
				
			||||||
                        history_Sub_System.device_error_flashing = sub.device_error_flashing;
 | 
					                        history_Sub_System.device_error_flashing = sub.device_error_flashing;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_normal_text = sub.device_normal_text;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_close_text = sub.device_close_text;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_error_text = sub.device_error_text;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_normal_point_name = sub.device_normal_point_name;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_close_point_name = sub.device_close_point_name;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_error_point_name = sub.device_error_point_name;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_normal_point_value = sub.device_normal_point_value;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_close_point_value = sub.device_close_point_value;
 | 
				
			||||||
 | 
					                        history_Sub_System.device_error_point_value = sub.device_error_point_value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        history_Main_System.History_Sub_systems.Add(history_Sub_System);
 | 
					                        history_Main_System.History_Sub_systems.Add(history_Sub_System);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
@ -792,8 +803,8 @@ namespace FrontendWebApi.ApiControllers
 | 
				
			|||||||
        /// <param name="account"></param>
 | 
					        /// <param name="account"></param>
 | 
				
			||||||
        /// <returns></returns>
 | 
					        /// <returns></returns>
 | 
				
			||||||
        [HttpPost]
 | 
					        [HttpPost]
 | 
				
			||||||
        [Route("api/Device/GetForgeNodeName")]
 | 
					        [Route("api/Device/GetForgeNodeIdFromVar")]
 | 
				
			||||||
        public async Task<ActionResult<List<Variable>>> GetForgeNodeName([FromBody] string forgeNodeKey)
 | 
					        public async Task<ActionResult<List<Variable>>> GetForgeNodeIdFromVar([FromBody] string forgeNodeKey)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ApiResult<List<Variable>> apiResult = new ApiResult<List<Variable>>();
 | 
					            ApiResult<List<Variable>> apiResult = new ApiResult<List<Variable>>();
 | 
				
			||||||
            List<Variable> variable = new List<Variable>();
 | 
					            List<Variable> variable = new List<Variable>();
 | 
				
			||||||
 | 
				
			|||||||
@ -40,45 +40,45 @@ namespace FrontendWebApi.ApiControllers
 | 
				
			|||||||
        [Authorize]
 | 
					        [Authorize]
 | 
				
			||||||
        public override void OnActionExecuting(ActionExecutingContext filterContext)
 | 
					        public override void OnActionExecuting(ActionExecutingContext filterContext)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            controllerName = ControllerContext.RouteData.Values["controller"].ToString();   //controller名稱
 | 
					            //controllerName = ControllerContext.RouteData.Values["controller"].ToString();   //controller名稱
 | 
				
			||||||
            actionName = ControllerContext.RouteData.Values["action"].ToString();   //action名稱
 | 
					            //actionName = ControllerContext.RouteData.Values["action"].ToString();   //action名稱
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var ctx = filterContext.HttpContext;
 | 
					            //var ctx = filterContext.HttpContext;
 | 
				
			||||||
            ctx.Response.Headers.Add("Access-Control-Allow-Origin", "*");
 | 
					            //ctx.Response.Headers.Add("Access-Control-Allow-Origin", "*");
 | 
				
			||||||
            ctx.Response.Headers.Add("Access-Control-Allow-Headers", "*");
 | 
					            //ctx.Response.Headers.Add("Access-Control-Allow-Headers", "*");
 | 
				
			||||||
            ctx.Response.Headers.Add("Access-Control-Allow-Credentials", "true");
 | 
					            //ctx.Response.Headers.Add("Access-Control-Allow-Credentials", "true");
 | 
				
			||||||
            EDFunction edFunction = new EDFunction();
 | 
					            //EDFunction edFunction = new EDFunction();
 | 
				
			||||||
            myUser = new JwtGet()
 | 
					            //myUser = new JwtGet()
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                account = User.Claims.Where(a => a.Type == "account").Select(e => e.Value).FirstOrDefault(),
 | 
					            //    account = User.Claims.Where(a => a.Type == "account").Select(e => e.Value).FirstOrDefault(),
 | 
				
			||||||
                email = User.Claims.Where(a => a.Type == "email").Select(e => e.Value).FirstOrDefault(),
 | 
					            //    email = User.Claims.Where(a => a.Type == "email").Select(e => e.Value).FirstOrDefault(),
 | 
				
			||||||
                full_name = User.Claims.Where(a => a.Type == "full_name").Select(e => e.Value).FirstOrDefault(),
 | 
					            //    full_name = User.Claims.Where(a => a.Type == "full_name").Select(e => e.Value).FirstOrDefault(),
 | 
				
			||||||
                exp = User.Claims.Where(a => a.Type == "exp").Select(e => Convert.ToInt32(e.Value)).FirstOrDefault(),
 | 
					            //    exp = User.Claims.Where(a => a.Type == "exp").Select(e => Convert.ToInt32(e.Value)).FirstOrDefault(),
 | 
				
			||||||
                nbf = User.Claims.Where(a => a.Type == "nbf").Select(e => Convert.ToInt32(e.Value)).FirstOrDefault(),
 | 
					            //    nbf = User.Claims.Where(a => a.Type == "nbf").Select(e => Convert.ToInt32(e.Value)).FirstOrDefault(),
 | 
				
			||||||
                userinfo_guid = User.Claims.Where(a => a.Type == "userinfo_guid").Select(e => e.Value).FirstOrDefault(),
 | 
					            //    userinfo_guid = User.Claims.Where(a => a.Type == "userinfo_guid").Select(e => e.Value).FirstOrDefault(),
 | 
				
			||||||
            };
 | 
					            //};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (myUser.exp == 0)
 | 
					            //if (myUser.exp == 0)
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                jwt_str = "Jwt Token不合法";
 | 
					            //    jwt_str = "Jwt Token不合法";
 | 
				
			||||||
                jwtlife = false;
 | 
					            //    jwtlife = false;
 | 
				
			||||||
                filterContext.Result = new JsonResult(new { HttpStatusCode.Unauthorized });
 | 
					            //    filterContext.Result = new JsonResult(new { HttpStatusCode.Unauthorized });
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
            else
 | 
					            //else
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                if (myUser.exp <= DateTime.Now.AddHours(-8).AddMinutes(10).Subtract(new DateTime(1970, 1, 1)).TotalSeconds)
 | 
					            //    if (myUser.exp <= DateTime.Now.AddHours(-8).AddMinutes(10).Subtract(new DateTime(1970, 1, 1)).TotalSeconds)
 | 
				
			||||||
                {
 | 
					            //    {
 | 
				
			||||||
                    jwtlife = true;
 | 
					            //        jwtlife = true;
 | 
				
			||||||
                    JwtLogin jwtLoing = new JwtLogin()
 | 
					            //        JwtLogin jwtLoing = new JwtLogin()
 | 
				
			||||||
                    {
 | 
					            //        {
 | 
				
			||||||
                        account = myUser.account,
 | 
					            //            account = myUser.account,
 | 
				
			||||||
                        email = myUser.email,
 | 
					            //            email = myUser.email,
 | 
				
			||||||
                        full_name = myUser.full_name,
 | 
					            //            full_name = myUser.full_name,
 | 
				
			||||||
                        userinfo_guid = myUser.userinfo_guid
 | 
					            //            userinfo_guid = myUser.userinfo_guid
 | 
				
			||||||
                    };
 | 
					            //        };
 | 
				
			||||||
                    jwt_str = jwt.GenerateToken(jwtLoing).token;
 | 
					            //        jwt_str = jwt.GenerateToken(jwtLoing).token;
 | 
				
			||||||
                }
 | 
					            //    }
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
            base.OnActionExecuting(filterContext);
 | 
					            base.OnActionExecuting(filterContext);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -65,6 +65,15 @@ namespace FrontendWebApi.Models
 | 
				
			|||||||
        public string device_normal_color { get; set; }
 | 
					        public string device_normal_color { get; set; }
 | 
				
			||||||
        public string device_close_color { get; set; }
 | 
					        public string device_close_color { get; set; }
 | 
				
			||||||
        public string device_error_color { get; set; }
 | 
					        public string device_error_color { get; set; }
 | 
				
			||||||
 | 
					        public string device_normal_point_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_close_point_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_error_point_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_normal_text { get; set; }
 | 
				
			||||||
 | 
					        public string device_close_text { get; set; }
 | 
				
			||||||
 | 
					        public string device_error_text { get; set; }
 | 
				
			||||||
 | 
					        public string device_normal_point_value { get; set; }
 | 
				
			||||||
 | 
					        public string device_close_point_value { get; set; }
 | 
				
			||||||
 | 
					        public string device_error_point_value { get; set; }
 | 
				
			||||||
        public string device_item_name { get; set; }
 | 
					        public string device_item_name { get; set; }
 | 
				
			||||||
        public string device_item_points { get; set; }
 | 
					        public string device_item_points { get; set; }
 | 
				
			||||||
        public string device_item_unit { get; set; }
 | 
					        public string device_item_unit { get; set; }
 | 
				
			||||||
@ -126,6 +135,16 @@ namespace FrontendWebApi.Models
 | 
				
			|||||||
        public string device_normal_flashing { get; set; }
 | 
					        public string device_normal_flashing { get; set; }
 | 
				
			||||||
        public string device_close_flashing { get; set; }
 | 
					        public string device_close_flashing { get; set; }
 | 
				
			||||||
        public string device_error_flashing { get; set; }
 | 
					        public string device_error_flashing { get; set; }
 | 
				
			||||||
 | 
					        public string device_normal_text { get; set; }
 | 
				
			||||||
 | 
					        public string device_close_text { get; set; }
 | 
				
			||||||
 | 
					        public string device_error_text { get; set; }
 | 
				
			||||||
 | 
					        public string device_normal_point_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_close_point_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_error_point_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_normal_point_value { get; set; }
 | 
				
			||||||
 | 
					        public string device_close_point_value { get; set; }
 | 
				
			||||||
 | 
					        public string device_error_point_value { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string auth_code { get; set; }
 | 
					        public string auth_code { get; set; }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    public class History_PostDevice
 | 
					    public class History_PostDevice
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user