whychdw
2019-10-23 68e09d71abbac761b7fc91923ee30a8d74f158fd
修改内容
4个文件已修改
48 ■■■■■ 已修改文件
platforms/android/app/src/main/assets/www/pages/testdata/testdata.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/testdata/testdata.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/testdata/testdata.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/testdata/testdata.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/testdata/testdata.html
@@ -25,7 +25,7 @@
                                    <table class="base-tbl">
                                        <tbody>
                                            <tr>
                                                <td>组端电压:<span>{{testData.groupVol}}</span> V</td>
                                                <td>组端电压:<span>{{testData.tatalVol}}</span> V</td>
                                                <td>测试电流:<span>{{testData.chargeCurr}}</span> A</td>
                                            </tr>
                                            <tr>
platforms/android/app/src/main/assets/www/pages/testdata/testdata.js
@@ -20,6 +20,7 @@
        this.vm = new Vue({
            el: getPageRoot(module),
            data: {
                loading: bui.loading(),
                getTestDataTimer: '',
                getTestDataWorker: getTestDataWorker,    // 获取测试数据监控
                startTestWorker: startTestWorker,        // 启动测试Worker线程监控
@@ -120,7 +121,7 @@
                startTest: function() {
                    var params = this.params;
                    var testData = this.testData;
                    var dataState = this.regData(testData.groupVol);
                    var dataState = this.regData(testData.tatalVol);
                    if(dataState.code == 1) {
                        switch(params.name) {
                            case 'charge':
@@ -142,6 +143,8 @@
                },
                startDischarge: function() {        // 启动放电测试
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.startDischarge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -149,6 +152,8 @@
                },
                startCharge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.startCharge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -170,6 +175,8 @@
                },
                stopDischarge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.stopDischarge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -177,6 +184,8 @@
                },
                stopCharge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.stopCharge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -198,6 +207,8 @@
                },
                pauseDischarge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.pauseDischarge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -205,6 +216,8 @@
                },
                pauseCharge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.pauseCharge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -250,6 +263,8 @@
                
                // 监控启动测试返回结果
                this.startTestWorker.onmessage = function(res) {
                    // 关闭等待框
                    self.loading.hide();
                    var rs = res.data(res);
                    if(rs.code == 1) {
                        bui.alert('启动成功!');
@@ -260,6 +275,8 @@
                
                // 监控停止测试返回结果
                this.stopTestWorker.onmessage = function(res) {
                    // 关闭等待框
                    self.loading.hide();
                    var rs = res.data(res);
                    if(rs.code == 1) {
                        bui.alert('停止成功!');
@@ -270,6 +287,8 @@
                
                // 监控暂停测试返回结果
                this.pauseTestWorker.onmessage = function(res) {
                    // 关闭等待框
                    self.loading.hide();
                    var rs = res.data(res);
                    if(rs.code == 1) {
                        bui.alert('暂停成功!');
@@ -283,6 +302,7 @@
                this.getTestDataWorker.terminate();
                this.startTestWorker.terminate();
                this.stopTestWorker.terminate();
                this.pauseTestWorker.terminate();
                
                // 关闭延时请求
                clearTimeout(this.getTestDataTimer);
www/pages/testdata/testdata.html
@@ -25,7 +25,7 @@
                                    <table class="base-tbl">
                                        <tbody>
                                            <tr>
                                                <td>组端电压:<span>{{testData.groupVol}}</span> V</td>
                                                <td>组端电压:<span>{{testData.tatalVol}}</span> V</td>
                                                <td>测试电流:<span>{{testData.chargeCurr}}</span> A</td>
                                            </tr>
                                            <tr>
www/pages/testdata/testdata.js
@@ -20,6 +20,7 @@
        this.vm = new Vue({
            el: getPageRoot(module),
            data: {
                loading: bui.loading(),
                getTestDataTimer: '',
                getTestDataWorker: getTestDataWorker,    // 获取测试数据监控
                startTestWorker: startTestWorker,        // 启动测试Worker线程监控
@@ -120,7 +121,7 @@
                startTest: function() {
                    var params = this.params;
                    var testData = this.testData;
                    var dataState = this.regData(testData.groupVol);
                    var dataState = this.regData(testData.tatalVol);
                    if(dataState.code == 1) {
                        switch(params.name) {
                            case 'charge':
@@ -142,6 +143,8 @@
                },
                startDischarge: function() {        // 启动放电测试
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.startDischarge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -149,6 +152,8 @@
                },
                startCharge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.startCharge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -170,6 +175,8 @@
                },
                stopDischarge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.stopDischarge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -177,6 +184,8 @@
                },
                stopCharge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.stopCharge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -198,6 +207,8 @@
                },
                pauseDischarge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.pauseDischarge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -205,6 +216,8 @@
                },
                pauseCharge: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        // 显示等待框
                        this.loading.show();
                        JSInterface.pauseCharge();
                    }else {
                        bui.alert('请使用手机端登陆!');
@@ -250,6 +263,8 @@
                
                // 监控启动测试返回结果
                this.startTestWorker.onmessage = function(res) {
                    // 关闭等待框
                    self.loading.hide();
                    var rs = res.data(res);
                    if(rs.code == 1) {
                        bui.alert('启动成功!');
@@ -260,6 +275,8 @@
                
                // 监控停止测试返回结果
                this.stopTestWorker.onmessage = function(res) {
                    // 关闭等待框
                    self.loading.hide();
                    var rs = res.data(res);
                    if(rs.code == 1) {
                        bui.alert('停止成功!');
@@ -270,6 +287,8 @@
                
                // 监控暂停测试返回结果
                this.pauseTestWorker.onmessage = function(res) {
                    // 关闭等待框
                    self.loading.hide();
                    var rs = res.data(res);
                    if(rs.code == 1) {
                        bui.alert('暂停成功!');
@@ -283,6 +302,7 @@
                this.getTestDataWorker.terminate();
                this.startTestWorker.terminate();
                this.stopTestWorker.terminate();
                this.pauseTestWorker.terminate();
                
                // 关闭延时请求
                clearTimeout(this.getTestDataTimer);