Mike 8 年之前
父节点
当前提交
2d255b92bf

+ 1 - 0
.gitignore

xqd
@@ -0,0 +1 @@
+yanshi/android-debug.apk

+ 3 - 0
yanshi/config.xml

xqd
@@ -41,4 +41,7 @@
         <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
     </platform>
     <plugin name="cordova-plugin-device" spec="~1.1.4" />
+    <chcp>
+        <config-file url="http://w24.9026.com/chcp.json"/>
+    </chcp>
 </widget>

+ 4 - 0
yanshi/cordova-hcp.json

xqd
@@ -0,0 +1,4 @@
+{
+  "update": "now",
+  "content_url": "http://w24.9026.com/"
+}

+ 5 - 0
yanshi/www/chcp.json

xqd
@@ -0,0 +1,5 @@
+{
+  "update": "now",
+  "content_url": "http://w24.9026.com/",
+  "release": "2017.02.23-14.18.17"
+}

+ 490 - 0
yanshi/www/chcp.manifest

xqd
@@ -0,0 +1,490 @@
+[
+  {
+    "file": "css/style.css",
+    "hash": "9f7f10797bcf1e848a1c2c3eda98da7d"
+  },
+  {
+    "file": "img/adam.jpg",
+    "hash": "b445da3cc203f97bce534fdad93b3931"
+  },
+  {
+    "file": "img/ben.png",
+    "hash": "2d983b2362f6db11855af918c7f95aee"
+  },
+  {
+    "file": "img/ionic.png",
+    "hash": "251ebf03b1c7889cf36cbcbcce8f689e"
+  },
+  {
+    "file": "img/max.png",
+    "hash": "66572ace014ac9119866c3190c8a0a03"
+  },
+  {
+    "file": "img/mike.png",
+    "hash": "14650dc9e2aa1661facc830ab5fb7d6a"
+  },
+  {
+    "file": "img/perry.png",
+    "hash": "2f6e587dfaf552ec19045b4719bc534c"
+  },
+  {
+    "file": "index.html",
+    "hash": "95fea3eac3abc7f91aedc106fea157b3"
+  },
+  {
+    "file": "js/app.js",
+    "hash": "1ef2aa64fbef8a87ce24d169722c1dc9"
+  },
+  {
+    "file": "js/config.js",
+    "hash": "14d7e1ecafa25ce0d1b65b13a4a9ff3e"
+  },
+  {
+    "file": "js/controllers.js",
+    "hash": "dceb8b213f8acd3de3382d6aec7df131"
+  },
+  {
+    "file": "js/echarts.min.js",
+    "hash": "2167653d32769da2556d8e7b69abcfc7"
+  },
+  {
+    "file": "lib/ionic-material/bower.json",
+    "hash": "53ca51c3949099a53e23febb41c94dc3"
+  },
+  {
+    "file": "lib/ionic-material/CONTRIBUTING.md",
+    "hash": "3cbb7b5716a8bd056c494e95d75a5f0a"
+  },
+  {
+    "file": "lib/ionic-material/dist/ionic.material.css",
+    "hash": "ce210d2c5463777d0103909440282b6b"
+  },
+  {
+    "file": "lib/ionic-material/dist/ionic.material.js",
+    "hash": "d93da721cd23bba5e17484605ec5d653"
+  },
+  {
+    "file": "lib/ionic-material/dist/ionic.material.min.css",
+    "hash": "da817210a96df0d1685af3c6c314d83b"
+  },
+  {
+    "file": "lib/ionic-material/dist/ionic.material.min.js",
+    "hash": "d44a51569803d034b876de0a7422e0b5"
+  },
+  {
+    "file": "lib/ionic-material/dist/ionic.material.min.js.map",
+    "hash": "8d585cf9faacf10d2faaf5d76fe79092"
+  },
+  {
+    "file": "lib/ionic-material/LICENSE",
+    "hash": "a68b8256f234730ac282027db90645e0"
+  },
+  {
+    "file": "lib/ionic-material/README.md",
+    "hash": "b145f8330cc8b31ca88773a7d081f215"
+  },
+  {
+    "file": "lib/ionic-material/src/js/ionic-material.js",
+    "hash": "22da4e9bdd85eeae25d46786d345455d"
+  },
+  {
+    "file": "lib/ionic-material/src/js/lib/_ink.js",
+    "hash": "3acc583387728fa3c4f70b93074bb484"
+  },
+  {
+    "file": "lib/ionic-material/src/js/lib/_motion.js",
+    "hash": "8a2c7290dcfddddee323c02d5651961e"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/directives/md-label.scss",
+    "hash": "ba71c173ed89d8e5c6d2b13405aed328"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/bar-header-expanded.scss",
+    "hash": "9aed794092c1a4d2b2826768c91b902f"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/bar.scss",
+    "hash": "bc046168b2d50ddfce8e297471d8a00f"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/button-bar.scss",
+    "hash": "487383678a8e5a7dffce1dd2fad9d193"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/button-fab.scss",
+    "hash": "cb16bcc4ad263faba48ab2e5b8e56c6f"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/button-floating.scss",
+    "hash": "91d78c20f59bc6458fbb58098dfb9b81"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/button.scss",
+    "hash": "f032e624776402f463f2df0989736d05"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/card.scss",
+    "hash": "12a64e7a62f5e788daaf2f300eba071b"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/hero.scss",
+    "hash": "6dab7ccad6870f0357ded00ba595cb06"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/item.scss",
+    "hash": "dc4187a3130c7ebc81b004c552a0d31b"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/list.scss",
+    "hash": "4966251c6d6a8fbf5df91da98ada293d"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/loading.scss",
+    "hash": "9a503b1e24ea8af64850df45822cf856"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/login.scss",
+    "hash": "2db89feb560ab0e2a76122e56e4a8e82"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/mask.scss",
+    "hash": "cf50fecfd10f7cb7b1859020a1391cfc"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/menu.scss",
+    "hash": "339d5d2a0a016071f4dc745220ac3420"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/elements/motion-elements.scss",
+    "hash": "fea8b158af18ccdf99f6e2bc794d43f7"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/helpers/colors.scss",
+    "hash": "6f8b20c1de62de66166613e732e9b3cf"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/helpers/sizes.scss",
+    "hash": "9063d1bbaf9ac6a79fcfe4a2010e14a1"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/helpers/utilities.scss",
+    "hash": "6e30eb24335206fbd92d7d9dc5ceba92"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/index.scss",
+    "hash": "81cc84dda9e0c5d6fec8cf849d1695db"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/motion/blinds.scss",
+    "hash": "401877ad20ebe502c0d50f9d8fb3bf10"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/motion/pan-in-left.scss",
+    "hash": "f8bfa758a6001ae28cf8d70d8fc928cd"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/motion/ripple.scss",
+    "hash": "8b562f76a97b615312e5df9e573ec0ef"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/motion/slide-fade-in.scss",
+    "hash": "21db36538cdefcb7f340d7117de0037b"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/motion/slide-in-right.scss",
+    "hash": "ca2e80e9dbdc09e644934f12cf05b499"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/motion/slide-up.scss",
+    "hash": "ffab8220693710f419093f5fd99d481e"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/overrides/ink.scss",
+    "hash": "454318157b2dd9b8b8e596347039ad75"
+  },
+  {
+    "file": "lib/ionic-material/src/scss/overrides/ionic.scss",
+    "hash": "4e7989d253074d08d4b0ae5a2ef71813"
+  },
+  {
+    "file": "lib/ionic-material/webpack.config.js",
+    "hash": "66726a9beec45d537aebbd2d70823250"
+  },
+  {
+    "file": "lib/ionic/css/ionic.css",
+    "hash": "7ae3b1acd57c92de3f0c1caa8a4e7998"
+  },
+  {
+    "file": "lib/ionic/css/ionic.min.css",
+    "hash": "20d29ea12426cffb05c508c88acdb11a"
+  },
+  {
+    "file": "lib/ionic/fonts/ionicons.eot",
+    "hash": "2c2ae068be3b089e0a5b59abb1831550"
+  },
+  {
+    "file": "lib/ionic/fonts/ionicons.svg",
+    "hash": "621bd386841f74e0053cb8e67f8a0604"
+  },
+  {
+    "file": "lib/ionic/fonts/ionicons.ttf",
+    "hash": "24712f6c47821394fba7942fbb52c3b2"
+  },
+  {
+    "file": "lib/ionic/fonts/ionicons.woff",
+    "hash": "05acfdb568b3df49ad31355b19495d4a"
+  },
+  {
+    "file": "lib/ionic/js/angular-ui/angular-ui-router.js",
+    "hash": "1f7fe3573d463743394e98d8b00eb228"
+  },
+  {
+    "file": "lib/ionic/js/angular-ui/angular-ui-router.min.js",
+    "hash": "83f32131b638a8686a43510fbd645b1b"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular-animate.js",
+    "hash": "b1a0315d4738ba305aca3b00146e232c"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular-animate.min.js",
+    "hash": "fb61c6d539943f24f85f49cad4c187b5"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular-resource.js",
+    "hash": "523cfbb962e367e90da4bf1976b53d7f"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular-resource.min.js",
+    "hash": "8da982bb4bc3275659b4c081f34f9b7c"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular-sanitize.js",
+    "hash": "7b57f04a2b23847203394400eeb2c97d"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular-sanitize.min.js",
+    "hash": "04a7b73d1dc5d573a5b17d70122e8781"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular.js",
+    "hash": "1b3d5bfbeb67c93df0f8ee9de569a206"
+  },
+  {
+    "file": "lib/ionic/js/angular/angular.min.js",
+    "hash": "0744b6e5cd7b7cdad98cefb3d9c141c6"
+  },
+  {
+    "file": "lib/ionic/js/ionic-angular.js",
+    "hash": "50e928675a4a314db9502dd954752815"
+  },
+  {
+    "file": "lib/ionic/js/ionic-angular.min.js",
+    "hash": "6406188080adeb14918f2dc0d6919267"
+  },
+  {
+    "file": "lib/ionic/js/ionic.bundle.js",
+    "hash": "428886467d117ff238213382b7a8a8a7"
+  },
+  {
+    "file": "lib/ionic/js/ionic.bundle.min.js",
+    "hash": "940466e58c5d23511aab97b24ef14702"
+  },
+  {
+    "file": "lib/ionic/js/ionic.js",
+    "hash": "23356dce9ed1b8a47c52141cdf778228"
+  },
+  {
+    "file": "lib/ionic/js/ionic.min.js",
+    "hash": "80bc3ba40c9519471cec72efeb5c6fe1"
+  },
+  {
+    "file": "lib/ionic/scss/_action-sheet.scss",
+    "hash": "d0c6449f31db02323aa6e7f56ef55e67"
+  },
+  {
+    "file": "lib/ionic/scss/_animations.scss",
+    "hash": "5596f74cb1ee03f9faf453ad4ee11807"
+  },
+  {
+    "file": "lib/ionic/scss/_backdrop.scss",
+    "hash": "7ff048e091b39f6615db62ee136ef040"
+  },
+  {
+    "file": "lib/ionic/scss/_badge.scss",
+    "hash": "c7b1b0e3049754fc22b45730e6c560fa"
+  },
+  {
+    "file": "lib/ionic/scss/_bar.scss",
+    "hash": "3a3e2b39cb46db25fafff9d68c3f062e"
+  },
+  {
+    "file": "lib/ionic/scss/_button-bar.scss",
+    "hash": "bf90c5d85e628b451f90b65f9c807f5a"
+  },
+  {
+    "file": "lib/ionic/scss/_button.scss",
+    "hash": "e365f13abd3c547f442fc1ac5385111f"
+  },
+  {
+    "file": "lib/ionic/scss/_checkbox.scss",
+    "hash": "89a0987dd24210f16863d7ba2c7312bd"
+  },
+  {
+    "file": "lib/ionic/scss/_form.scss",
+    "hash": "169f7a6e449aa9e1bed20a1f30887c97"
+  },
+  {
+    "file": "lib/ionic/scss/_grid.scss",
+    "hash": "9a87c565e397bb73b7f467726a63e01c"
+  },
+  {
+    "file": "lib/ionic/scss/_items.scss",
+    "hash": "711c0937e27c2ab5979f44e36ff31ac6"
+  },
+  {
+    "file": "lib/ionic/scss/_list.scss",
+    "hash": "0ab8daf57764aac25bf68aa0b0e6c776"
+  },
+  {
+    "file": "lib/ionic/scss/_loading.scss",
+    "hash": "9f23e266d43a432bbf07a8677d1d1592"
+  },
+  {
+    "file": "lib/ionic/scss/_menu.scss",
+    "hash": "c12d33c8bea78495b2571665e35cb192"
+  },
+  {
+    "file": "lib/ionic/scss/_mixins.scss",
+    "hash": "dfa91bbaa3f54a417ce1567c5b34dc13"
+  },
+  {
+    "file": "lib/ionic/scss/_modal.scss",
+    "hash": "38e8624ef28a495e7a01341915516bd1"
+  },
+  {
+    "file": "lib/ionic/scss/_platform.scss",
+    "hash": "db73214ac171e89a966c24d5320fe096"
+  },
+  {
+    "file": "lib/ionic/scss/_popover.scss",
+    "hash": "924a0474d4e58b3280e7d1ebf1938a55"
+  },
+  {
+    "file": "lib/ionic/scss/_popup.scss",
+    "hash": "988126e645408f1e5a270934520c20ac"
+  },
+  {
+    "file": "lib/ionic/scss/_progress.scss",
+    "hash": "19a19537d8e9483db7bde8a7febd43f6"
+  },
+  {
+    "file": "lib/ionic/scss/_radio.scss",
+    "hash": "9e5544332590f92c25ea065140610b03"
+  },
+  {
+    "file": "lib/ionic/scss/_range.scss",
+    "hash": "ae2eb0fc86bdcef56346885dcb76370f"
+  },
+  {
+    "file": "lib/ionic/scss/_refresher.scss",
+    "hash": "23c7b98a85caf376b414f4ed5a713831"
+  },
+  {
+    "file": "lib/ionic/scss/_reset.scss",
+    "hash": "319f0fb2d58da7fc89222752c5e527a4"
+  },
+  {
+    "file": "lib/ionic/scss/_scaffolding.scss",
+    "hash": "83d10a4997b12f655e847c886ae54dac"
+  },
+  {
+    "file": "lib/ionic/scss/_select.scss",
+    "hash": "7b40e394e01f33ebc89fcfc89f826410"
+  },
+  {
+    "file": "lib/ionic/scss/_slide-box.scss",
+    "hash": "ae10f39144dc0f6b5b24fb6e811e992a"
+  },
+  {
+    "file": "lib/ionic/scss/_slides.scss",
+    "hash": "504700ae567875f003c7fd1571a482e1"
+  },
+  {
+    "file": "lib/ionic/scss/_spinner.scss",
+    "hash": "472ae7eb35a68c22078b1d56b10f35be"
+  },
+  {
+    "file": "lib/ionic/scss/_tabs.scss",
+    "hash": "a8e939c50fd869edf42979129898a84e"
+  },
+  {
+    "file": "lib/ionic/scss/_toggle.scss",
+    "hash": "05e76b843e03e5df07342f8f4b352ba3"
+  },
+  {
+    "file": "lib/ionic/scss/_transitions.scss",
+    "hash": "c060678db2049bbca8833bf769d65dd1"
+  },
+  {
+    "file": "lib/ionic/scss/_type.scss",
+    "hash": "db602af625137bdc4d95b262d77a15c1"
+  },
+  {
+    "file": "lib/ionic/scss/_util.scss",
+    "hash": "c7af3ffdcc728e1c6f44061ed6120c15"
+  },
+  {
+    "file": "lib/ionic/scss/_variables.scss",
+    "hash": "aa0fd7fb8581ecd75a9efaa647b1dc50"
+  },
+  {
+    "file": "lib/ionic/scss/ionic.scss",
+    "hash": "a102a720475b3304d099fc3c94e7f619"
+  },
+  {
+    "file": "lib/ionic/scss/ionicons/_ionicons-font.scss",
+    "hash": "9a1734051fa60f52fdbdd74001b0f0e0"
+  },
+  {
+    "file": "lib/ionic/scss/ionicons/_ionicons-icons.scss",
+    "hash": "fcdab55027fe7da71f277ee58fad686a"
+  },
+  {
+    "file": "lib/ionic/scss/ionicons/_ionicons-variables.scss",
+    "hash": "0af49648c5756e4a96eb1eb70f016ee3"
+  },
+  {
+    "file": "lib/ionic/scss/ionicons/ionicons.scss",
+    "hash": "37204d759a9eb7bfc074034fd1bf95fb"
+  },
+  {
+    "file": "lib/ionic/test2.json",
+    "hash": "b56611da124fc26475aa90772df90e94"
+  },
+  {
+    "file": "lib/ionic/version.json",
+    "hash": "421fc5b26f0c248e73d067ca80dbd6e1"
+  },
+  {
+    "file": "manifest.json",
+    "hash": "a3e888fb8cb528ebdbf38073f29d148c"
+  },
+  {
+    "file": "service-worker.js",
+    "hash": "7de431000cd0f19fc38619fdd7314f81"
+  },
+  {
+    "file": "templates/home.html",
+    "hash": "31c9756b376d03c85ea160f0b0e89222"
+  },
+  {
+    "file": "templates/login.html",
+    "hash": "e74b5070c389e25ebb1214a263b9e6f0"
+  },
+  {
+    "file": "templates/show.html",
+    "hash": "b156a28f188c653b4945ef8637b9adf1"
+  }
+]

+ 2 - 0
yanshi/www/css/style.css

xqd
@@ -55,5 +55,7 @@
   	background: pink;
   	border: 1px solid black;
   	margin: 0 auto;
+    float: left;
+    margin-left: 108px;
   }
 

+ 1 - 1
yanshi/www/js/config.js

xqd
@@ -1,5 +1,5 @@
 var starter = angular.module('starter.services', [])
 
 	starter.constant("config",{
-		server:'http://172.31.40.13/'
+		server:'http://w27.9026.com/'
 	});

+ 236 - 65
yanshi/www/js/controllers.js

xqd xqd xqd
@@ -106,71 +106,71 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
 				$scope.item2 = req.nj;
 				$scope.data3 = [req.glys,req.ssgl,req.xl,req.zs,req.dl];
 				//效率云图
-				$scope.a = req.n_zs;
-				$scope.b = req.n_nj;
-				$scope.c = req.n_xl;
+				$scope.item3= req.n_speed;
+				$scope.data4 = [req.n_torque,req.n_v,req.n_p,req.n_a,req.n_efficiency];
+				console.log(req.n_speed);
+				console.log($scope.data4);
 				
+// 				var Stat = G2.Stat;
+// 	    		var vvvdata = [];
+// //	    for(var i = 0; i <= 20; i ++) {
+// //	        for(var j = 0; j <= 20; j ++) {
+// //	          var x = i*25.6;
+// //	          var y = j*19.2;
+// //	          var z = 700-(x+0.5*y)+Math.random()*(400); 
+// //	          console.log(x);
+// //	          console.log(y);
+// //	          console.log(z);
+// //	          
+// //	        }
+// //	    }
+// 				var data1 = $scope.a;
+// 				var data2 = $scope.b;
+// 				var data3 = $scope.c;
 				
-				var Stat = G2.Stat;
-	    		var vvvdata = [];
-//	    for(var i = 0; i <= 20; i ++) {
-//	        for(var j = 0; j <= 20; j ++) {
-//	          var x = i*25.6;
-//	          var y = j*19.2;
-//	          var z = 700-(x+0.5*y)+Math.random()*(400); 
-//	          console.log(x);
-//	          console.log(y);
-//	          console.log(z);
-//	          
-//	        }
-//	    }
-				var data1 = $scope.a;
-				var data2 = $scope.b;
-				var data3 = $scope.c;
-				
-				for(var i=0;i<=212;i++){
-					var x = data1[i];
-					var y = data2[i];
-					var z = data3[i];
-					vvvdata.push({
-			            l:x,
-			            g: y,
-			            Altitude:z
-			        });
-					    console.log(x+'x')
-						console.log(y+'y')
-						console.log(z+'z')
-				}
+// 				for(var i=0;i<=212;i++){
+// 					var x = data1[i];
+// 					var y = data2[i];
+// 					var z = data3[i];
+// 					vvvdata.push({
+// 			            l:x,
+// 			            g: y,
+// 			            Altitude:z
+// 			        });
+// 					    console.log(x+'x')
+// 						console.log(y+'y')
+// 						console.log(z+'z')
+// 				}
 				
 	    
-      var chart = new G2.Chart({
-        id: 'c1',
-        forceFit: true,
-        height: 1000
-      });
-      //为了将数据与图片上的位置完全吻合,我们需要将横轴和纵轴的范围设定为数据对应范围,并将范围优化处理关闭
-      var defs = {
-        'l': {
-          type: 'linear',
-          min: 2735,
-          max: 2900,
-          nice: false//优化处理关闭
-        },
-        'g': {
-          type: 'linear',
-          min: 0,
-          max: 2,
-          nice: false
-        },
-        'Altitude': {
-          tickCount:5
-        }
-      };
+//       var chart = new G2.Chart({
+//         id: 'c1',
+//         forceFit: true,
+//         height: 1000
+//       });
+//       //为了将数据与图片上的位置完全吻合,我们需要将横轴和纵轴的范围设定为数据对应范围,并将范围优化处理关闭
+//       var defs = {
+//         'l': {
+//           type: 'linear',
+//           min: 2735,
+//           max: 2900,
+//           nice: false//优化处理关闭
+//         },
+//         'g': {
+//           type: 'linear',
+//           min: 0,
+//           max: 2,
+//           nice: false
+//         },
+//         'Altitude': {
+//           tickCount:5
+//         }
+//       };
 
-      chart.source(vvvdata,defs);
-      chart.contour().position(Stat.smooth.loess.triangular('l*g*Altitude',0.01)).color('Altitude','hue').size(3);
-      chart.render();
-		document.getElementById('newchats').style.display='none';
+//       chart.source(vvvdata,defs);
+//       chart.contour().position(Stat.smooth.loess.triangular('l*g*Altitude',0.01)).color('Altitude','hue').size(3);
+//       chart.render();
+// 		document.getElementById('newchats').style.display='none';
 				
 			});
 		}).error(function(){
@@ -246,16 +246,17 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
 		return tabUrl == $scope.currentTab;
 	};
 	$scope.onClickTab = function(tab){
-		if(tab.url=="strom.html"){
-			document.getElementById('newchats').style.display='block';
-		}else{
-			document.getElementById('newchats').style.display='none';
-		}
+		// if(tab.url=="strom.html"){
+		// 	document.getElementById('newchats').style.display='block';
+		// }else{
+		// 	document.getElementById('newchats').style.display='none';
+		// }
 		$scope.currentTab = tab.url;
 	};
 	//TN曲线图
 	$scope.legend1 = ["扭矩", "电压",'输入功率','电流','效率'];  
 	$scope.legend2 = ["功率因素", "输入功率",'效率','转速','电流'];  
+	$scope.legend3 = ["扭矩", "电压",'输入功率','电流','效率'];   
     $scope.num = [0,1,2,3,4];
 
 }])
@@ -617,4 +618,174 @@ starter.directive('line', function() {
     };  
 })
 
+starter.directive('strom', function() {  
+    return {  
+        scope: {  
+            id: "@",  
+            legend3: "=",  
+            item3: "=",
+            num:"=",
+            data4: "="  
+        },  
+        restrict: 'E',  
+        template: '<div style="height:700px;"></div>',  
+        replace: true,  
+        link: function($scope, element, attrs, controller) { 
+        	var colors = ['#a62ca6', '#8e0515', '#45baf3','#ff2420','#1a9a1a'];
+            var option = { 
+            	color:colors,
+                // 提示框,鼠标悬浮交互时的信息提示  
+                tooltip: {  
+                    show: true,  
+                    trigger: 'axis'  
+                },  
+                grid:{
+
+                	left:'23%'
+                },
+             
+                   	//图例  
+                legend: {  
+                    data: $scope.legend3,
+                    textStyle:{
+                    	fontSize:22
+                    }
+                }, 
+                // 横轴坐标轴  
+                xAxis: [
+			        {
+			            type: 'category',
+//			            boundaryGap:false,
+			            axisLabel:{
+		            		textStyle:{
+		            		fontSize:20
+		            	},
+		            		formatter: '{value} rpm'
+		            },
+			            data: $scope.item3
+			        }
+			    ], 
+			    
+                // 纵轴坐标轴  
+                yAxis: [
+		        {
+		            type: 'value',
+//		            name: '扭\n矩\n(N*m)',
+		            min: 0,
+		            max: 4,
+		            position: 'left',
+		            offset:205,
+		            axisLine: {
+		                lineStyle: {
+		                    color: colors[0],
+		                    width:2
+		                }
+		            },
+		            axisLabel:{
+		            	margin:20,
+		            	textStyle:{
+		            		fontSize:18
+		            	}
+		            }
+		        },
+		        {
+		            type: 'value',
+//		            name: '电\n压\n(V)',
+		            min: 193,
+		            max: 202,
+		            position: 'left',
+		            offset: 150,
+		            axisLine: {
+		                lineStyle: {
+		                    color: colors[1],
+		                    width:2
+		                }
+		            },
+		             axisLabel:{
+		             	margin:15,
+		            	textStyle:{
+		            		fontSize:18
+		            	}
+		            },
+		        },
+		        {
+		            type: 'value',
+//		            name: '输\n入\n功\n率\n(W)',
+		            min: 0,
+		            max: 1300,
+		            position: 'left',
+		            offset:90,
+		            axisLine: {
+		                lineStyle: {
+		                    color: colors[2],
+		                    width:2
+		                }
+		            },
+		             axisLabel:{
+		            	textStyle:{
+		            		fontSize:18
+		            	}
+		            },
+		        },
+		        {
+		            type: 'value',
+//		            name: '电\n流\n(A)',
+		            min: 1,
+		            max: 6,
+		            position: 'left',
+		            offset:45,
+		            axisLine: {
+		                lineStyle: {
+		                    color: colors[3],
+		                    width:2
+		                }
+		            },
+		       		  axisLabel:{
+		       		  	margin:20,
+		            	textStyle:{
+		            		fontSize:18
+		            	}
+		            },
+		        },
+		        {
+		            type: 'value',
+//		            name: '效\n率\n(%)',
+		            min: 10,
+		            max: 80,
+		            position: 'left',
+		            offset:0,
+		            axisLine: {
+		                lineStyle: {
+		                    color: colors[4],
+		                    width:2
+		                }
+		            },
+		              axisLabel:{
+		              	margin:15,
+		            	textStyle:{
+		            		fontSize:18
+		            	}
+		            },
+		        }
+		    ], 
+                // 数据内容数组  
+                series: function(){  
+                    var serie=[];  
+                    for(var i=0;i<$scope.legend3.length;i++){  
+                        var item3 = {  
+                            name : $scope.legend3[i],  
+                            type: 'line',
+                            yAxisIndex:$scope.num[i],
+                            data: $scope.data4[i]  
+                        };  
+                        serie.push(item3);  
+                    }  
+                    return serie;  
+                }()  
+            };  
+            var myChart = echarts.init(document.getElementById($scope.id),'macarons');  
+            myChart.setOption(option);  
+        }  
+    };  
+})
 

+ 22 - 15
yanshi/www/templates/show.html

xqd xqd xqd xqd
@@ -1,7 +1,7 @@
-<ion-view view-title="{{name}}">
+<ion-view view-title="{{name | filet}}">
     <ion-nav-bar class="nav-bar-container" nav-bar-transition="ios" nav-bar-direction="exit" nav-swipe="">
         <ion-nav-buttons side="left">
-             <button class="icon ion-chevron-left" style="font-size: 16px;border: none;background: white;" ng-click="go('home')">返回</button>
+             <button class="icon ion-chevron-left" style="font-size: 1rem;border: none;background: white;" ng-click="go('home')">返回</button>
         </ion-nav-buttons>
     </ion-nav-bar>
 
@@ -16,10 +16,11 @@
 	</ion-content>
 	<script id="line.html" type="text/ng-template">
 		
-		<select style="display: block; width: 25%;height: 44px;font-size: 24px;" ng-change="change(selectedName)" 
+<!-- 		<select style="display: block; width: 25%;height: 44px;font-size: 24px;" ng-change="change(selectedName)" 
 		ng-model="selectedName" ng-init="selectedName = name" ng-options="x for x in excels">
-		</select>
-		<h1 style="text-align: center;font-weight: bold;">电机自动化测试报告</h1>
+		</select> -->
+		<h1 style="text-align: center;font-weight: bold;font-size: 4rem">电机自动化测试报告</h1>
+		<div>
 		<ul>
 			<li>PA设备</li>
 			<li>PA设备</li>
@@ -37,25 +38,26 @@
 			<li>扭矩传感器</li>
 			<li></li>
 			<li></li>
-		</ul>
+		</ul></div>
+
 		<div class="line">驱动器设备</div>
-		<ul>
+		<div><ul style="margin-bottom: 100px">
 			<li ng-repeat="tab1 in table1 track by $index">{{tab1}}</li>
 			<li></li>
 			<li></li>
-		</ul>
+		</ul></div>
 		<div class="line">电机设备</div>
-		<ul>
+		<div><ul style="margin-bottom: 100px">
 			<li ng-repeat="tab2 in table2 track by $index">{{tab2}}</li>
-		</ul>
+		</ul></div>
 		<div class="line">驱动器设备</div>
-		<ul>
+		<div><ul style="margin-bottom: 100px">
 			<li ng-repeat="tab3 in table3 track by $index">{{tab3}}</li>
 			<li></li>
 			<li></li>
-		</ul>
+		</ul></div>
 		<div class="line">电机设备</div>
-		<ul>
+		<ul style="margin-bottom: 100px">
 			<li ng-repeat="tab4 in table4 track by $index">{{tab4}}</li>
 		</ul>
 		
@@ -70,9 +72,14 @@
 			<line id="line" legend2="legend2" item2="item2" data3="data3" num="num"></line> 
 		</div>
 	</script>
-	<div id="newchats">
+	<script id="strom.html" type="text/ng-template">
+		<div>
+			<strom id="strom" legend3="legend3" item3="item3" data4="data4" num="num"></strom> 
+		</div>
+	</script>
+<!-- 	<div id="newchats">
 		<div id="c1"></div>
-	</div>
+	</div> -->
 		
 </ion-view>