Browse Source

智慧工地调用界面

李顺 2 years ago
parent
commit
0bb6400ca6

+ 1 - 4
readme.txt

@@ -1,4 +1 @@
-公司内部
-1.权限管理系统:http://192.168.2.104:8020/
-2.巡检系统后台api:http://192.168.2.104:8011/api
-3.登录验证:http://192.168.2.104:8032/webapi
+本分支用于给智慧工地系统提供数字管网地图页面

+ 34 - 34
src/configure.ts

@@ -302,17 +302,17 @@ var AppX = {
             },
         ],
         "loadOnStartWidgets": [
-            {
-                "subsys": "sys",
-                "super": true,
-                "name": "Loading",
-                "discription": "加载动画",
-                "url": "widgets/Loading",
-                "main": "Widget",
-                "configPath": "",
-                "templatePath": "",
-                "optional": false
-            },
+            // {
+            //     "subsys": "sys",
+            //     "super": true,
+            //     "name": "Loading",
+            //     "discription": "加载动画",
+            //     "url": "widgets/Loading",
+            //     "main": "Widget",
+            //     "configPath": "",
+            //     "templatePath": "",
+            //     "optional": false
+            // },
             {
                 "subsys": "sys",
                 "name": "BaseWidget",
@@ -321,7 +321,7 @@ var AppX = {
                 "main": "Widget",
                 "configPath": "",
                 "templatePath": "",
-                "depend": "Loading",
+                "depend": "",
                 "optional": false
             },
             {
@@ -404,28 +404,28 @@ var AppX = {
                 "depend": "BaseWidget",
                 "optional": false
             },
-            {
-                "subsys": "sys",
-                "name": "BaseImageOpacity",
-                "discription": "地表透明度",
-                "url": "widgets/BaseImageOpacity",
-                "main": "Widget",
-                "configPath": "",
-                "templatePath": "",
-                "depend": "BaseWidget",
-                "optional": false
-            },
-            {
-                "subsys": "sys",
-                "name": "LayerUpOrDown",
-                "discription": "管线抬升",
-                "url": "widgets/LayerUpOrDown",
-                "main": "Widget",
-                "configPath": "",
-                "templatePath": "",
-                "depend": "BaseWidget",
-                "optional": false
-            },
+            // {
+            //     "subsys": "sys",
+            //     "name": "BaseImageOpacity",
+            //     "discription": "地表透明度",
+            //     "url": "widgets/BaseImageOpacity",
+            //     "main": "Widget",
+            //     "configPath": "",
+            //     "templatePath": "",
+            //     "depend": "BaseWidget",
+            //     "optional": false
+            // },
+            // {
+            //     "subsys": "sys",
+            //     "name": "LayerUpOrDown",
+            //     "discription": "管线抬升",
+            //     "url": "widgets/LayerUpOrDown",
+            //     "main": "Widget",
+            //     "configPath": "",
+            //     "templatePath": "",
+            //     "depend": "BaseWidget",
+            //     "optional": false
+            // },
             {
                 "subsys": "sys",
                 "name": "MapScale",

+ 46 - 6
src/main.ts

@@ -1,6 +1,7 @@
 var configFile = "configure.js";
 let prjCode = "HN01";
 let typeStr="";
+let sendposition=null;
 require({}, [configFile], (AppX) => {
     //加载配置文件
     loadApp(AppX);
@@ -29,6 +30,24 @@ function loadApp(AppX: AppX) {
                 return;
             }
             setCurrentUser(qbstoken, userId, loginUser);
+        }else if(typeStr==="ZHGD"){
+            prjCode = getSearchString('prjcode', search);
+            const qbstoken = getSearchString('token', search);
+            const userId = getSearchString('userId', search);
+            const loginUser = getSearchString('loginUser', search);
+            const longitude=getSearchString('longitude', search);
+            const latitude=getSearchString('latitude', search);
+            const height=getSearchString('height', search);
+            sendposition={
+                lon:longitude,
+                lat:latitude,
+                height:height
+            }
+            if (!prjCode || !loginUser) {
+                alert("登录口令缺失");
+                return;
+            }
+            setCurrentUser(qbstoken, userId, loginUser);
         }
     } else {
         alert("登录口令缺失");
@@ -223,11 +242,19 @@ function setPrj(prj) {
         success: function (result) {
             if (result.code == 1 && result.result) {
                 AppX.appConfig.currentPrj = id.toString();
-                const initPosition=JSON.parse(position);
-                const carto=Cesium.Cartographic.fromDegrees(parseFloat(initPosition.lon),parseFloat(initPosition.lat),parseFloat(initPosition.height));
-                const cartes3=Cesium.Cartographic.toCartesian(carto);
-                //当前项目位置
-                AppX.appConfig.initPosition={position:{x:cartes3.x,y:cartes3.y,z:cartes3.z}};
+                if(sendposition){
+                    const carto=Cesium.Cartographic.fromDegrees(parseFloat(sendposition.lon),parseFloat(sendposition.lat),parseFloat(sendposition.height));
+                    const cartes3=Cesium.Cartographic.toCartesian(carto);
+                    //当前项目位置
+                    AppX.appConfig.initPosition={position:{x:cartes3.x,y:cartes3.y,z:cartes3.z}};
+                }else{
+                    const initPosition=JSON.parse(position);
+                    const carto=Cesium.Cartographic.fromDegrees(parseFloat(initPosition.lon),parseFloat(initPosition.lat),parseFloat(initPosition.height));
+                    const cartes3=Cesium.Cartographic.toCartesian(carto);
+                    //当前项目位置
+                    AppX.appConfig.initPosition={position:{x:cartes3.x,y:cartes3.y,z:cartes3.z}};
+                }
+                
                 setCurrentSystem();
             } else {
                 console.log("set project faile");
@@ -239,8 +266,21 @@ function setPrj(prj) {
     })
 }
 function setCurrentUser(token, userId, loginUser) {
+    let url="";
+    switch(typeStr){
+        case "QBS":
+            url=AppX.appConfig.apiRoot + "/auth/token/third/loginByQuality";
+            break;
+        case "ZHGD":
+            url=AppX.appConfig.apiRoot + "/auth/token/third/loginByEpc";
+            break;
+    }
+    if(url===""){
+        console.log('登录验证失败');
+        return;
+    }
     $.ajax({
-        url: AppX.appConfig.apiRoot + "/auth/token/third/loginByQuality",
+        url: url,
         type: "GET",
         dataType: "json",
         data: {

+ 1 - 1
src/widgets/Coordinate/css/style.scss

@@ -8,7 +8,7 @@
     left: 0;
     padding-left: 4px;
     padding-right: 5px;
-    color: #000;
+    color: #fefefe;
     //background-color: rgba(0,0,0,0.6);
     z-index: 70;
     height: $height;

+ 10 - 7
src/widgets/InfoSearch/css/style.scss

@@ -8,7 +8,7 @@
   // width:30%;
   width: 300px;
   $fontsize: 0.875rem;
-  background: white;
+  background: rgba(19, 69, 107, 0.62);
   border-radius: 4px;
   box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.4);
   //height:400px;
@@ -18,7 +18,8 @@
     font-size: $fontsize;
     select {
       border: none;
-      background-color: #fff;
+      background-color: rgba(19, 69, 107, 0.62);
+      color:#fefefe;
     }
     // select.searchType{
     //   //width:68px;
@@ -27,23 +28,25 @@
       font-size: $fontsize;
       border: none;
       box-shadow: none;
+      background: rgba(19, 69, 107, 0.62);
+      color: #fefefe;
     }
     input::-webkit-input-placeholder {
-      color: #777777;
+      color: #a3a3a3;
     }
     button.search {
       font-size: $fontsize;
-      color: #fff;
+      color: #fefefe;
       border: none;
-      background-color: #006ed4;
+      background-color:rgba(19, 69, 107, 0.62);
       box-shadow: none;
       border-radius: 0;
     }
     button.clear-searchInput {
       font-size: $fontsize;
-      color: #777777;
+      color: #fefefe;
       border: none;
-      background-color: #fff;
+      background-color: rgba(19, 69, 107, 0.62);
       box-shadow: none;
       border-radius: 0;
       display: none;

+ 2 - 2
src/widgets/MapScale/css/style.scss

@@ -4,7 +4,7 @@
     border-radius: 5px;
     position: absolute;
     left: 20px;
-    color: #000;
+    color: #fefefe;
     font-size: 1.125rem;
     font-weight: 500;
     z-index: 100;
@@ -25,7 +25,7 @@
             position:absolute;
             left:0;
             bottom:0;
-            border:2px solid #000;
+            border:2px solid #fefefe;
             height: 10px;
             width:100%;
             border-top: none;

+ 3 - 3
src/widgets/MapToolBar/Widget.ts

@@ -53,10 +53,10 @@ class MapToolBar extends BaseWidget {
         this.g_preViews = new Array();
         this.g_afterViews = new Array();
         //设置面板内容
-        this.setHtml(this.template.split("$$")[0]);
+        //this.setHtml(this.template.split("$$")[0]);
         this.initEvent();
-        this.initTianditu("vec_c","cva_c");
-        this._selectTdtType="vec_c";
+        this.initTianditu("img_c","cia_c");
+        this._selectTdtType="img_c";
         //this.AppX.runtimeConfig.toolbar = this;
     }
 

+ 33 - 24
src/widgets/PipeUnitInfo/css/style.scss

@@ -216,7 +216,7 @@
   .card {
     height: 100%;
     width: 100%;
-
+    background: rgba(19, 69, 107, 0.62);
     .card-header {
       padding: 5px;
       background-color: unset;
@@ -285,14 +285,15 @@
   //头部切换栏
   .nav-tabs {
     a.nav-link {
-      color: black;
+      color: #fefefe;
     }
 
     a.nav-link.active {
-      color: #0970cf !important;
+      color: #fefefe !important;
       border: none;
       border-bottom: solid;
-      border-color: #0970cf !important;
+      border-color: #fefefe !important;
+      background:rgba(19, 69, 107, 0.62);
     }
 
     .nav-link:focus,
@@ -322,8 +323,8 @@
           white-space: nowrap;
           text-overflow: ellipsis;
           overflow: hidden;
-          color: black;
-          background: #f8f8f8;
+          color: #fefefe;
+          background: rgba(19, 69, 107, 0.62);
           border: none;
         }
 
@@ -334,7 +335,7 @@
           white-space: nowrap;
           text-overflow: ellipsis;
           overflow: hidden;
-          color: #888888;
+          color: #fefefe;
           padding: 6px;
           position: relative;
           float: left;
@@ -383,7 +384,7 @@
       border-top: solid;
       border-bottom: solid;
       border-width: 2px;
-      border-color: #f8f8f8;
+      border-color: rgba(19, 69, 107, 0.62);
       width: 100%;
       margin-top: 20px;
       height: 200px;
@@ -409,6 +410,7 @@
           font-size: 20px;
           font-weight: 700;
           left: 10px;
+          color:#fefefe;
         }
       }
 
@@ -424,7 +426,7 @@
         position: relative;
         float: left;
         text-align: right;
-        color: #888888;
+        color: #fefefe;
         padding: 6px;
       }
 
@@ -437,9 +439,9 @@
         float: left;
         text-align: left;
         background-size: 100px;
-        background: #f8f8f8;
+        background: rgba(19, 69, 107, 0.62);
         margin-right: calc(50% - 390px);
-        color: black;
+        color: #fefefe;
         padding-left: 10px;
         border: none;
       }
@@ -501,6 +503,7 @@
       bottom: 0px;
       top: 120%;
       text-align: center;
+      color:#fefefe;
     }
   }
 
@@ -523,8 +526,8 @@
           text-overflow: ellipsis;
           overflow: hidden;
           margin-left: 10px;
-          color: black;
-          background: #f8f8f8;
+          color: #fefefe;
+          background: rgba(19, 69, 107, 0.62);
           border: none;
           float: left;
         }
@@ -536,7 +539,7 @@
           white-space: nowrap;
           text-overflow: ellipsis;
           overflow: hidden;
-          color: #888888;
+          color: #fefefe;
           padding: 6px;
           position: relative;
           float: left;
@@ -676,6 +679,7 @@
         font-size: 20px;
         font-weight: 700;
         left: 10px;
+        color:#fefefe;
       }
 
       .smSearch {
@@ -790,7 +794,7 @@
   //质量页面的样式
   #unitMass {
     .baseInfo {
-      color: #888888;
+      color: #fefefe;
       // overflow-y: auto;
       .headerInfo {
         position: relative;
@@ -899,7 +903,7 @@
         display: block;
         text-align: right;
         padding: 3px 0px;
-        color: #888888;
+        color: #fefefe;
       }
 
       input.turnInput {
@@ -907,12 +911,12 @@
         // float: left;
         // width: calc(100% - 130px);
         // border: none;
-        // background: #f8f8f8;
+        // background: rgba(19, 69, 107, 0.62);
         // color: black;
         width: calc(100% - 130px);
         margin-left: 5px;
         border: none;
-        background: #f8f8f8;
+        background: rgba(19, 69, 107, 0.62);
         color: black;
         text-overflow: ellipsis;
       }
@@ -945,6 +949,7 @@
         font-size: 20px;
         font-weight: 700;
         left: 10px;
+        color:#fefefe;
       }
     }
 
@@ -963,7 +968,7 @@
         float: left;
         text-align: right;
         padding: 6px;
-        color: #888888;
+        color: #fefefe;
       }
 
       input.info-content {
@@ -971,8 +976,9 @@
         float: left;
         width: calc((100% - 170px) / 2 - 10px);
         border: none;
-        background: #f8f8f8;
+        background: rgba(19, 69, 107, 0.62);
         margin-right: 10px;
+        color:#fefefe;
       }
 
       input.info-code {
@@ -980,8 +986,8 @@
         float: left;
         width: calc((100% - 170px) / 2 - 10px);
         border: none;
-        background: #f8f8f8;
-        color: black;
+        background: rgba(19, 69, 107, 0.62);
+        color: #fefefe;
         margin-right: 10px;
       }
 
@@ -1019,14 +1025,14 @@
         display: block;
         text-align: right;
         padding: 6px 0px;
-        color: #888888;
+        color: #fefefe;
       }
 
       input.clInput {
         width: calc(100% - 130px);
         margin-left: 10px;
         border: none;
-        background: #f8f8f8;
+        background: rgba(19, 69, 107, 0.62);
         color: black;
       }
     }
@@ -1055,6 +1061,7 @@
         font-size: 20px;
         font-weight: 700;
         left: 10px;
+        color:#fefefe;
       }
 
       .upDown {
@@ -1150,6 +1157,7 @@
 
   .bubblecontent {
     overflow: hidden;
+    background:rgba(19, 69, 107, 0.62)
   }
 
   .bubbletitle {
@@ -1160,6 +1168,7 @@
 .bubblewindow:after {
   // left: 343px;
   left: 50%;
+  border-top-color: rgba(19, 69, 107, 0.9);
 }
 
 #widget-unitInfoPanel {

+ 1 - 1
src/widgets/TopSectionUI/Widget.html

@@ -12,7 +12,7 @@
                 aria-expanded="false">
                 部件查看
             </button>
-            <div class="dropdown-menu" aria-labelledby="btnGroupDrop1">
+            <div class="dropdown-menu" style="background:rgba(19, 69, 107, 0.62)" aria-labelledby="btnGroupDrop1">
                 <button data-type="bjckpoint" class="btn btn-secondary dropdown-item" href="#">点选</button>
                 <button data-type="bjckrect" class="btn btn-secondary dropdown-item" href="#">框选</button>
             </div>

+ 3 - 3
src/widgets/TopSectionUI/css/style.scss

@@ -7,7 +7,7 @@
     display: flex;
     display:-webkit-flex;
     flex-flow: row nowrap;
-    background-color: #fff;
+    background-color: rgba(19, 69, 107, 0.62);
     border-radius: 4px;
     box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.4);
     .switchContainer{
@@ -33,7 +33,7 @@
             font-size:0.875rem;
             box-shadow: none;
             padding:0.55rem 0.65rem;
-            color:#333333;
+            color:#fefefe;
             font-size: 0.875rem;
         }
         .btn-secondary{
@@ -43,7 +43,7 @@
             font-family: Source Han Sans CN;
         }
         .btn-secondary:hover{
-            color:#006ED4;
+            //color:#006ED4;
         }
         .btn-secondary:active{
             color: unset;