81041
2019-12-03 f71a10a225a333986afeca437b2b84a49f40818e
Merge branch 'FBS9600' of http://whyclxw@118.89.139.230:10101/r/FBS9600App.git into FBS9600
6个文件已修改
256 ■■■■ 已修改文件
platforms/android/app/src/main/assets/www/pages/main/main.js 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/main/main.js 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/monitor-data/monitor-data.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/monitor-data/monitor-data.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/main/main.js
@@ -23,9 +23,15 @@
                },
                tbls: {
                    warning: {
                        timer: new Timeout(),
                        name: '告警信息',
                        height: 300,
                        noData: '暂无告警数据',
                        page: {
                            PageSize: 10,
                            PageCurr: 1,
                            PageAll: 0
                        },
                        data: []
                    },
                    charge: {
@@ -72,13 +78,17 @@
                        this.setBattDiscInfo({
                            code: 1,
                            data: [{
                                num: 1,
                                BattGroupName: '电池组1',
                                BattGroupName1: '电池组',
                                testStartTime: '2019-11-23 14:48:00',
                                testTimelong: 20,
                                groupvol: 10,
                                groupcurr: 5
                                battinf: {
                                    num: 1,
                                    BattGroupName: '电池组1',
                                    BattGroupName1: '电池组'
                                },
                                state: {
                                    testStartTime: '2019-11-23 14:48:00',
                                    testTimelong: 20,
                                    groupvol: 10,
                                    groupcurr: 5
                                }
                            }]
                        });
                        // 开启计时器
@@ -86,9 +96,9 @@
                    }
                },
                setBattDiscInfo: function setBattDiscInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.discharge.data = res.data;
                    this.tbls.discharge.data = this.formaterTestData(res);
                    // 统计个数
                    this.tabs.discharge = res.data.length;
                },
@@ -106,21 +116,30 @@
                        this.setBattCharInfo({
                            code: 1,
                            data: [{
                                num: 2,
                                BattGroupName: '电池组2',
                                BattGroupName1: '电池组',
                                testStartTime: '2019-11-23 14:48:00',
                                testTimelong: 30,
                                groupvol: 11,
                                groupcurr: 4
                                battinf: {
                                    num: 2,
                                    BattGroupName: '电池组2',
                                    BattGroupName1: '电池组'
                                },
                                state: {
                                    testStartTime: '2019-11-23 14:48:00',
                                    testTimelong: 30,
                                    groupvol: 11,
                                    groupcurr: 4
                                }
                            }, {
                                num: 5,
                                BattGroupName: '电池组5',
                                BattGroupName1: '电池组',
                                testStartTime: '2019-11-23 14:50:40',
                                testTimelong: 30,
                                groupvol: 11,
                                groupcurr: 4
                                battinf: {
                                    num: 5,
                                    BattGroupName: '电池组5',
                                    BattGroupName1: '电池组'
                                },
                                state: {
                                    testStartTime: '2019-11-23 14:50:40',
                                    testTimelong: 30,
                                    groupvol: 11,
                                    groupcurr: 4
                                }
                            }]
                        });
                        // 开启计时器
@@ -128,11 +147,58 @@
                    }
                },
                setBattCharInfo: function setBattCharInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.charge.data = res.data;
                    this.tbls.charge.data = this.formaterTestData(res);
                    // 统计个数
                    this.tabs.charge = res.data.length;
                },
                formaterTestData: function formaterTestData(res) {
                    var rs = [];
                    if (res.code == 1) {
                        var data = res.data;
                        for (var i = 0; i < data.length; i++) {
                            var _data = data[i];
                            var tmp = {
                                num: _data.battinf.num,
                                BattGroupName: _data.battinf.BattGroupName,
                                BattGroupName1: _data.battinf.BattGroupName1,
                                testStartTime: new Date(_data.state.testStartTime).format('yyyy-MM-dd hh:mm:ss'),
                                testTimelong: formatSeconds(_data.state.testTimelong),
                                groupvol: _data.state.groupvol,
                                groupcurr: _data.state.groupcurr
                            };
                            rs.push(tmp);
                        }
                    }
                    return rs;
                },
                startSearchAlarmInfo: function startSearchAlarmInfo() {
                    var self = this;
                    this.tbls.warning.timer.start(function () {
                        self.searchAlarmInfo();
                    }, 4000);
                },
                searchAlarmInfo: function searchAlarmInfo() {
                    // 查询实时告警信息
                    var self = this;
                    var page = this.warning.page;
                    // 构造查询条件
                    var searchParams = {
                        alm_cleared_type: 0,
                        page: page
                    };
                    // 判断是否为手机端
                    if (typeof Battalram_dataService == "undefined") {
                        Battalram_dataService.serchByCondition(JSON.stringify(searchParams));
                    } else {
                        // 开启计时器
                        this.tbls.charge.timer.open();
                    }
                },
                setAlarmInfo: function setAlarmInfo(res) {
                    // 设置实时告警信息
                    console.log(res);
                },
                routerTo: function routerTo(path) {
                    var routes = this.routes;
@@ -178,6 +244,12 @@
                    // 开启计时器
                    self.tbls.charge.timer.open();
                };
                // 查询告警信息
                window['Battalram_dataServiceserchByConditioncalljs'] = function (res) {
                    // 开启计时器
                    self.tbls.charge.timer.open();
                };
            },
            destroyed: function destroyed() {}
        });
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.html
@@ -139,12 +139,12 @@
                    </li>
                    <li style="display:none">
                        <v-touch @swipeleft="handleNextBtn" @swiperight="handlePreBtn">
                            <high-bar-chart v-if="shows.monRes" :height="options.monRes.height" id="monResBar" name="单体内阻" unit="mΩ" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monResBar"></high-bar-chart>
                            <high-bar-chart v-if="shows.monRes" :height="options.monRes.height" id="monResBar" name="单体内阻" unit="mΩ" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monResBar" :mon-hander-click="monHandlerClick"></high-bar-chart>
                        </v-touch>
                    </li>
                    <li style="display:none">
                        <v-touch @swipeleft="handleNextBtn" @swiperight="handlePreBtn">
                            <high-bar-chart v-if="shows.monTmp" :height="options.monTmp.height" id="monTmpBar" name="单体温度" unit="℃" :colors="{min:'#19be6b', max: '#ed4014'}" ref="monTmpBar"></high-bar-chart>
                            <high-bar-chart v-if="shows.monTmp" :height="options.monTmp.height" id="monTmpBar" name="单体温度" unit="℃" :colors="{min:'#19be6b', max: '#ed4014'}" ref="monTmpBar" :mon-hander-click="monHandlerClick"></high-bar-chart>
                        </v-touch>
                    </li>
                </ul>
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.js
@@ -206,7 +206,7 @@
                    var self = this;
                    this.timer.start(function () {
                        self.readBattMonInfo();
                    }, 4000);
                    }, 12000);
                },
                readBattMonInfo: function readBattMonInfo() {
                    // 读取电池组信息
www/pages/main/main.js
@@ -23,9 +23,15 @@
                },
                tbls: {
                    warning: {
                        timer: new Timeout(),
                        name: '告警信息',
                        height: 300,
                        noData: '暂无告警数据',
                        page: {
                            PageSize: 10,
                            PageCurr: 1,
                            PageAll: 0
                        },
                        data: []
                    },
                    charge: {
@@ -72,13 +78,17 @@
                        this.setBattDiscInfo({
                            code: 1,
                            data: [{
                                num: 1,
                                BattGroupName: '电池组1',
                                BattGroupName1: '电池组',
                                testStartTime: '2019-11-23 14:48:00',
                                testTimelong: 20,
                                groupvol: 10,
                                groupcurr: 5
                                battinf: {
                                    num: 1,
                                    BattGroupName: '电池组1',
                                    BattGroupName1: '电池组'
                                },
                                state: {
                                    testStartTime: '2019-11-23 14:48:00',
                                    testTimelong: 20,
                                    groupvol: 10,
                                    groupcurr: 5
                                }
                            }]
                        });
                        // 开启计时器
@@ -86,9 +96,9 @@
                    }
                },
                setBattDiscInfo: function setBattDiscInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.discharge.data = res.data;
                    this.tbls.discharge.data = this.formaterTestData(res);
                    // 统计个数
                    this.tabs.discharge = res.data.length;
                },
@@ -106,21 +116,30 @@
                        this.setBattCharInfo({
                            code: 1,
                            data: [{
                                num: 2,
                                BattGroupName: '电池组2',
                                BattGroupName1: '电池组',
                                testStartTime: '2019-11-23 14:48:00',
                                testTimelong: 30,
                                groupvol: 11,
                                groupcurr: 4
                                battinf: {
                                    num: 2,
                                    BattGroupName: '电池组2',
                                    BattGroupName1: '电池组'
                                },
                                state: {
                                    testStartTime: '2019-11-23 14:48:00',
                                    testTimelong: 30,
                                    groupvol: 11,
                                    groupcurr: 4
                                }
                            }, {
                                num: 5,
                                BattGroupName: '电池组5',
                                BattGroupName1: '电池组',
                                testStartTime: '2019-11-23 14:50:40',
                                testTimelong: 30,
                                groupvol: 11,
                                groupcurr: 4
                                battinf: {
                                    num: 5,
                                    BattGroupName: '电池组5',
                                    BattGroupName1: '电池组'
                                },
                                state: {
                                    testStartTime: '2019-11-23 14:50:40',
                                    testTimelong: 30,
                                    groupvol: 11,
                                    groupcurr: 4
                                }
                            }]
                        });
                        // 开启计时器
@@ -128,11 +147,58 @@
                    }
                },
                setBattCharInfo: function setBattCharInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.charge.data = res.data;
                    this.tbls.charge.data = this.formaterTestData(res);
                    // 统计个数
                    this.tabs.charge = res.data.length;
                },
                formaterTestData: function formaterTestData(res) {
                    var rs = [];
                    if (res.code == 1) {
                        var data = res.data;
                        for (var i = 0; i < data.length; i++) {
                            var _data = data[i];
                            var tmp = {
                                num: _data.battinf.num,
                                BattGroupName: _data.battinf.BattGroupName,
                                BattGroupName1: _data.battinf.BattGroupName1,
                                testStartTime: new Date(_data.state.testStartTime).format('yyyy-MM-dd hh:mm:ss'),
                                testTimelong: formatSeconds(_data.state.testTimelong),
                                groupvol: _data.state.groupvol,
                                groupcurr: _data.state.groupcurr
                            };
                            rs.push(tmp);
                        }
                    }
                    return rs;
                },
                startSearchAlarmInfo: function startSearchAlarmInfo() {
                    var self = this;
                    this.tbls.warning.timer.start(function () {
                        self.searchAlarmInfo();
                    }, 4000);
                },
                searchAlarmInfo: function searchAlarmInfo() {
                    // 查询实时告警信息
                    var self = this;
                    var page = this.warning.page;
                    // 构造查询条件
                    var searchParams = {
                        alm_cleared_type: 0,
                        page: page
                    };
                    // 判断是否为手机端
                    if (typeof Battalram_dataService == "undefined") {
                        Battalram_dataService.serchByCondition(JSON.stringify(searchParams));
                    } else {
                        // 开启计时器
                        this.tbls.charge.timer.open();
                    }
                },
                setAlarmInfo: function setAlarmInfo(res) {
                    // 设置实时告警信息
                    console.log(res);
                },
                routerTo: function routerTo(path) {
                    var routes = this.routes;
@@ -178,6 +244,12 @@
                    // 开启计时器
                    self.tbls.charge.timer.open();
                };
                // 查询告警信息
                window['Battalram_dataServiceserchByConditioncalljs'] = function (res) {
                    // 开启计时器
                    self.tbls.charge.timer.open();
                };
            },
            destroyed: function destroyed() {}
        });
www/pages/monitor-data/monitor-data.html
@@ -139,12 +139,12 @@
                    </li>
                    <li style="display:none">
                        <v-touch @swipeleft="handleNextBtn" @swiperight="handlePreBtn">
                            <high-bar-chart v-if="shows.monRes" :height="options.monRes.height" id="monResBar" name="单体内阻" unit="mΩ" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monResBar"></high-bar-chart>
                            <high-bar-chart v-if="shows.monRes" :height="options.monRes.height" id="monResBar" name="单体内阻" unit="mΩ" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monResBar" :mon-hander-click="monHandlerClick"></high-bar-chart>
                        </v-touch>
                    </li>
                    <li style="display:none">
                        <v-touch @swipeleft="handleNextBtn" @swiperight="handlePreBtn">
                            <high-bar-chart v-if="shows.monTmp" :height="options.monTmp.height" id="monTmpBar" name="单体温度" unit="℃" :colors="{min:'#19be6b', max: '#ed4014'}" ref="monTmpBar"></high-bar-chart>
                            <high-bar-chart v-if="shows.monTmp" :height="options.monTmp.height" id="monTmpBar" name="单体温度" unit="℃" :colors="{min:'#19be6b', max: '#ed4014'}" ref="monTmpBar" :mon-hander-click="monHandlerClick"></high-bar-chart>
                        </v-touch>
                    </li>
                </ul>
www/pages/monitor-data/monitor-data.js
@@ -206,7 +206,7 @@
                    var self = this;
                    this.timer.start(function () {
                        self.readBattMonInfo();
                    }, 4000);
                    }, 12000);
                },
                readBattMonInfo: function readBattMonInfo() {
                    // 读取电池组信息