|
| xqd
@@ -41,31 +41,31 @@ starter.controller('homeCtrl',["$scope",'$http','$timeout','$ionicLoading','$sta
|
|
|
$ionicLoading.show({
|
|
|
template: '加载中...',
|
|
|
});
|
|
|
- $http({
|
|
|
- method:'get',
|
|
|
- url:config.server+'/list',
|
|
|
- }).success(function(newItem){
|
|
|
- $timeout(function(){
|
|
|
- $ionicLoading.hide();
|
|
|
- $scope.excals = newItem
|
|
|
+ $http({
|
|
|
+ method:'get',
|
|
|
+ url:config.server+'/list',
|
|
|
+ }).success(function(newItem){
|
|
|
+ $timeout(function(){
|
|
|
+ $ionicLoading.hide();
|
|
|
+ $scope.excals = newItem
|
|
|
+ });
|
|
|
+ }).error(function(){
|
|
|
+ $timeout(function(){
|
|
|
+ $ionicLoading.hide();
|
|
|
+ var alertPopup = $ionicPopup.alert({
|
|
|
+ title: '连接超时',
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: '<b>确定</b>',
|
|
|
+ type: 'button-calm',
|
|
|
+ },
|
|
|
+ ]
|
|
|
});
|
|
|
- }).error(function(){
|
|
|
- $timeout(function(){
|
|
|
- $ionicLoading.hide();
|
|
|
- var alertPopup = $ionicPopup.alert({
|
|
|
- title: '连接超时',
|
|
|
- buttons: [
|
|
|
- {
|
|
|
- text: '<b>确定</b>',
|
|
|
- type: 'button-calm',
|
|
|
- },
|
|
|
- ]
|
|
|
- });
|
|
|
- })
|
|
|
- })
|
|
|
- .finally(function() {
|
|
|
- $scope.$broadcast('scroll.refreshComplete');
|
|
|
- });
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .finally(function() {
|
|
|
+ $scope.$broadcast('scroll.refreshComplete');
|
|
|
+ });
|
|
|
|
|
|
}
|
|
|
$scope.getName = function(name){
|
|
| xqd
@@ -82,6 +82,7 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
}).success(function(newItem){
|
|
|
$scope.excels = newItem
|
|
|
})
|
|
|
+<<<<<<< HEAD
|
|
|
$scope.change = function(selectedName){
|
|
|
$ionicLoading.show({
|
|
|
template: '加载中...',
|
|
| xqd
@@ -114,6 +115,9 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+=======
|
|
|
+
|
|
|
+>>>>>>> ede8857903a17ac912d5c1ef522cf634ae4c137b
|
|
|
name = $stateParams.item;
|
|
|
$scope.name = name;
|
|
|
$ionicLoading.show({
|
|
| xqd
@@ -150,6 +154,41 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
+ $scope.change = function(selectedName){
|
|
|
+ $scope.name = selectedName;
|
|
|
+ $ionicLoading.show({
|
|
|
+ template: '加载中...',
|
|
|
+ });
|
|
|
+ $http({
|
|
|
+ method:'get',
|
|
|
+ url:config.server+'/data/'+selectedName
|
|
|
+ }).success(function(req){
|
|
|
+ $ionicLoading.hide();
|
|
|
+ $timeout(function() {
|
|
|
+ //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];
|
|
|
+ console.log(req)
|
|
|
+ });
|
|
|
+ }).error(function(){
|
|
|
+ $timeout(function(){
|
|
|
+ $ionicLoading.hide();
|
|
|
+ var alertPopup = $ionicPopup.alert({
|
|
|
+ title: '连接超时',
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: '<b>确定</b>',
|
|
|
+ type: 'button-calm',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
$scope.tabs = [
|
|
|
{"title":"主页","url":"line.html"},
|
|
|
{"title":"TN曲线","url":"tn.html"},
|
|
| xqd
@@ -172,7 +211,13 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
$scope.num = [0,1,2,3,4];
|
|
|
|
|
|
}])
|
|
|
-
|
|
|
+starter.filter('filet', function () {
|
|
|
+ return function (filepath) {
|
|
|
+ var pos = filepath.replace(".xlsx", "");
|
|
|
+ alert(pos);
|
|
|
+ return pos;
|
|
|
+ };
|
|
|
+})
|
|
|
starter.directive('main', function() {
|
|
|
return {
|
|
|
scope: {
|