|
| xqd
@@ -82,7 +82,42 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
}).success(function(newItem){
|
|
|
$scope.excels = newItem
|
|
|
})
|
|
|
+<<<<<<< HEAD
|
|
|
+ $scope.change = function(selectedName){
|
|
|
+ $ionicLoading.show({
|
|
|
+ template: '加载中...',
|
|
|
+ });
|
|
|
+ $http({
|
|
|
+ method:'get',
|
|
|
+ url:config.server+'/data/'+selectedName
|
|
|
+ }).success(function(req){
|
|
|
+ $timeout(function() {
|
|
|
+ $ionicLoading.hide();
|
|
|
+ //tn曲线图参数
|
|
|
+ $scope.item1= req.speed;
|
|
|
+ $scope.data2 = [req.torque,req.v,req.p,req.a,req.efficiency];
|
|
|
+ //五轴图参数
|
|
|
+ $scope.item2 = req.nj;
|
|
|
+ $scope.data3 = [req.glys,req.ssgl,req.xl,req.zs,req.dl];
|
|
|
+ });
|
|
|
+ }).error(function(){
|
|
|
+ $timeout(function(){
|
|
|
+ $ionicLoading.hide();
|
|
|
+ var alertPopup = $ionicPopup.alert({
|
|
|
+ title: '连接超时',
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: '<b>确定</b>',
|
|
|
+ type: 'button-calm',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+=======
|
|
|
|
|
|
+>>>>>>> ede8857903a17ac912d5c1ef522cf634ae4c137b
|
|
|
name = $stateParams.item;
|
|
|
$scope.name = name;
|
|
|
$ionicLoading.show({
|
|
| xqd
@@ -94,12 +129,15 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
}).success(function(req){
|
|
|
$timeout(function() {
|
|
|
$ionicLoading.hide();
|
|
|
+ //主页参数
|
|
|
+ console.log(req.t2);
|
|
|
//tn曲线图参数
|
|
|
$scope.item1= req.speed;
|
|
|
$scope.data2 = [req.torque,req.v,req.p,req.a,req.efficiency];
|
|
|
//五轴图参数
|
|
|
- $scope.item2 = req.torque;
|
|
|
- $scope.data3 = [req.speed,req.v,req.p,req.a,req.efficiency];
|
|
|
+ $scope.item2 = req.nj;
|
|
|
+ $scope.data3 = [req.glys,req.ssgl,req.xl,req.zs,req.dl];
|
|
|
+
|
|
|
});
|
|
|
}).error(function(){
|
|
|
$timeout(function(){
|
|
| xqd
@@ -169,7 +207,7 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
};
|
|
|
//TN曲线图
|
|
|
$scope.legend1 = ["扭矩", "电压",'输入功率','电流','效率'];
|
|
|
- $scope.legend2 = ["转速", "电压",'输入功率','电流','效率'];
|
|
|
+ $scope.legend2 = ["功率因素", "输入功率",'效率','转速','电流'];
|
|
|
$scope.num = [0,1,2,3,4];
|
|
|
|
|
|
}])
|
|
| xqd
@@ -407,11 +445,11 @@ starter.directive('line', function() {
|
|
|
yAxis: [
|
|
|
{
|
|
|
type: 'value',
|
|
|
-// name: '转速',
|
|
|
- min: 600,
|
|
|
- max: 2000,
|
|
|
+// name: '功率因素',
|
|
|
+ min: 0.27,
|
|
|
+ max: 0.7,
|
|
|
position: 'left',
|
|
|
- offset:205,
|
|
|
+ offset:225,
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: colors[0],
|
|
| xqd
@@ -428,10 +466,10 @@ starter.directive('line', function() {
|
|
|
{
|
|
|
type: 'value',
|
|
|
// name: '电\n压\n(V)',
|
|
|
- min: 193,
|
|
|
- max: 202,
|
|
|
+ min: 130,
|
|
|
+ max: 630,
|
|
|
position: 'left',
|
|
|
- offset: 150,
|
|
|
+ offset: 170,
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: colors[1],
|
|
| xqd
@@ -448,10 +486,10 @@ starter.directive('line', function() {
|
|
|
{
|
|
|
type: 'value',
|
|
|
// name: '输\n入\n功\n率\n(W)',
|
|
|
- min: 0,
|
|
|
- max: 1300,
|
|
|
+ min: 64,
|
|
|
+ max: 77,
|
|
|
position: 'left',
|
|
|
- offset:90,
|
|
|
+ offset:125,
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: colors[2],
|
|
| xqd
@@ -467,10 +505,10 @@ starter.directive('line', function() {
|
|
|
{
|
|
|
type: 'value',
|
|
|
// name: '电\n流\n(A)',
|
|
|
- min: 1,
|
|
|
- max: 6,
|
|
|
+ min: 2600,
|
|
|
+ max: 2940,
|
|
|
position: 'left',
|
|
|
- offset:45,
|
|
|
+ offset:50,
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: colors[3],
|
|
| xqd
@@ -487,8 +525,8 @@ starter.directive('line', function() {
|
|
|
{
|
|
|
type: 'value',
|
|
|
// name: '效\n率\n(%)',
|
|
|
- min: 10,
|
|
|
- max: 80,
|
|
|
+ min: 1.3,
|
|
|
+ max: 2.3,
|
|
|
position: 'left',
|
|
|
offset:0,
|
|
|
axisLine: {
|
|
| xqd
@@ -526,53 +564,5 @@ starter.directive('line', function() {
|
|
|
}
|
|
|
};
|
|
|
})
|
|
|
-//starter.directive('c1',function(){
|
|
|
-// return {
|
|
|
-// restrict:'E',
|
|
|
-// template: '<div style="height:700px;"></div>',
|
|
|
-// replace: true,
|
|
|
-// }
|
|
|
-// var Stat = G2.Stat;
|
|
|
-// var data = [];
|
|
|
-// 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);
|
|
|
-// data.push({
|
|
|
-// l: x,
|
|
|
-// g: y,
|
|
|
-// Altitude: z
|
|
|
-// });
|
|
|
-// }
|
|
|
-// }
|
|
|
-// var chart = new G2.Chart({
|
|
|
-// id: 'c1',
|
|
|
-// forceFit: true,
|
|
|
-// height: 450
|
|
|
-// });
|
|
|
-// //为了将数据与图片上的位置完全吻合,我们需要将横轴和纵轴的范围设定为数据对应范围,并将范围优化处理关闭
|
|
|
-// var defs = {
|
|
|
-// 'l': {
|
|
|
-// type: 'linear',
|
|
|
-// min: 0,
|
|
|
-// max: 512,
|
|
|
-// nice: false//优化处理关闭
|
|
|
-// },
|
|
|
-// 'g': {
|
|
|
-// type: 'linear',
|
|
|
-// min: 0,
|
|
|
-// max: 384,
|
|
|
-// nice: false
|
|
|
-// },
|
|
|
-// 'Altitude': {
|
|
|
-// tickCount:200
|
|
|
-// }
|
|
|
-// };
|
|
|
-//
|
|
|
-// chart.source(data,defs);
|
|
|
-// chart.contour().position(Stat.smooth.loess.triangular('l*g*Altitude',0.01)).color('Altitude','hue').size(3);
|
|
|
-// chart.render();
|
|
|
-//
|
|
|
-//})
|
|
|
+
|
|
|
|