whychdw
2019-12-03 ff387b16690bdb08a0d4a8a000b8310ce7afaa34
内容修改
4个文件已修改
4个文件已添加
196 ■■■■ 已修改文件
platforms/android/app/src/main/assets/www/pages/main/main.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/main/main.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/warning/warning.html 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/warning/warning.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/main/main.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/main/main.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/warning/warning.html 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/warning/warning.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/main/main.html
@@ -67,7 +67,7 @@
                        <menu-btn type="success" to="/history-data" @click="routerTo" text="运维管理" icon="icon-yunweiguanli"></menu-btn>
                    </div>
                    <div class="span4">
                        <menu-btn type="warning" text="告警管理" icon="icon-gaojing"></menu-btn>
                        <menu-btn to="/warning" @click="routerTo" type="warning" text="告警管理" icon="icon-gaojing"></menu-btn>
                    </div>
                    <div class="span4">
                        <menu-btn to="/batt-info-set" @click="routerTo" text="电池信息配置" icon="icon-dianchiguanli"></menu-btn>
@@ -95,7 +95,7 @@
                        </el-table-column>
                    </el-table>
                </div>
                <el-pagination large style="text-align:center" background layout="prev, pager, next" :total="tbls.warning.page.PageAll" @current-change="warningCurrentChange">
                <el-pagination large style="text-align:center" background layout="prev, pager, next" :current-page="tbls.warning.page.PageCurr" :total="tbls.warning.page.PageAll" @current-change="warningCurrentChange">
                </el-pagination>
            </div>
            <div class="tab-item" style="display:none" v-show="tabs.active == 'charge'">
platforms/android/app/src/main/assets/www/pages/main/main.js
@@ -58,6 +58,9 @@
                }, {
                    path: '/history-data',
                    url: '../history-data/history-data.html'
                }, {
                    path: '/warning',
                    url: '../warning/warning.html'
                }]
            },
            methods: {
@@ -96,7 +99,7 @@
                    }
                },
                setBattDiscInfo: function setBattDiscInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.discharge.data = this.formaterTestData(res);
                    // 统计个数
@@ -147,7 +150,7 @@
                    }
                },
                setBattCharInfo: function setBattCharInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.charge.data = this.formaterTestData(res);
                    // 统计个数
@@ -188,7 +191,7 @@
                        alm_cleared_type: 0,
                        page: page
                    };
                    console.log(searchParams);
                    //console.log(searchParams);
                    // 判断是否为手机端
                    if (typeof Battalram_dataService != "undefined") {
                        Battalram_dataService.serchByCondition(JSON.stringify(searchParams));
@@ -215,7 +218,7 @@
                },
                setAlarmInfo: function setAlarmInfo(res) {
                    // 设置实时告警信息
                    console.info(res);
                    // console.info(res);
                    if (res.code == 1) {
                        var page = this.tbls.warning.page;
                        // 设置数据
@@ -299,7 +302,14 @@
            mounted: function mounted() {
                var self = this;
                this.setTblsHt();
            },
            destroyed: function destroyed() {}
        });
    },
    show: function show() {
        var self = this.vm;
        // 开启计时器
        this.vm.startTimers();
                // 后台触发事件查询所有的电池组放电信息
                window['DeviceServicereadBattDiscInfocalljs'] = function (res) {
                    // 设置电池信息
@@ -323,17 +333,14 @@
                    self.tbls.warning.timer.open();
                };
            },
            destroyed: function destroyed() {}
        });
    },
    show: function show() {
        // 开启计时器
        this.vm.startTimers();
        //bui.alert('show');
    },
    hide: function hide() {
        var self = this.vm;
        // 关闭计时器
        this.vm.stopTimers();
        // 清除全局方法
        window.DeviceServicereadBattDiscInfocalljs = null;
        window.DeviceServicereadBattCharInfocalljs = null;
        window.Battalram_dataServiceserchByConditioncalljs = null;
    },
    destroyed: function destroyed() {
        this.vm.$destroy();
platforms/android/app/src/main/assets/www/pages/warning/warning.html
New file
@@ -0,0 +1,32 @@
<div class="bui-page">
    <header class="bui-bar">
        <div class="bui-bar-left">
            <div class="bui-btn btn-back"><i class="icon-back"></i></div>
        </div>
        <div class="bui-bar-main">告警管理</div>
        <div class="bui-bar-right"></div>
    </header>
    <main>
        <div id="uiTab" class="bui-tab">
            <div class="bui-tab-head">
                <ul class="bui-nav">
                    <li class="bui-btn">实时告警</li>
                    <li class="bui-btn">历史告警</li>
                    <li class="bui-btn">告警参数设置</li>
                </ul>
            </div>
            <div class="bui-tab-main">
                <ul>
                    <li><img src="images/placeholder-list.png" alt=""></li>
                    <li style="display:none"><img src="images/placeholder-page.png" alt=""></li>
                    <li style="display:none"><img src="images/placeholder-list.png" alt=""></li>
                </ul>
            </div>
        </div>
    </main>
    <footer>
    </footer>
</div>
platforms/android/app/src/main/assets/www/pages/warning/warning.js
New file
@@ -0,0 +1,29 @@
"use strict";
/**
 * 模板模块
 * 默认模块名: warning
 * @return {[object]}  [ 返回一个对象 ]
 */
loader.define({
    data: {
        vm: ''
    },
    loaded: function loaded(require, exports, module) {
        // 引入vue
        this.vm = new Vue({
            el: getPageRoot(module),
            data: {},
            methods: {},
            mounted: function mounted() {
                var uiTab = bui.tab({
                    id: "#uiTab"
                });
            },
            destroyed: function destroyed() {}
        });
    },
    destroyed: function destroyed() {
        this.vm.$destroy();
    }
});
www/pages/main/main.html
@@ -67,7 +67,7 @@
                        <menu-btn type="success" to="/history-data" @click="routerTo" text="运维管理" icon="icon-yunweiguanli"></menu-btn>
                    </div>
                    <div class="span4">
                        <menu-btn type="warning" text="告警管理" icon="icon-gaojing"></menu-btn>
                        <menu-btn to="/warning" @click="routerTo" type="warning" text="告警管理" icon="icon-gaojing"></menu-btn>
                    </div>
                    <div class="span4">
                        <menu-btn to="/batt-info-set" @click="routerTo" text="电池信息配置" icon="icon-dianchiguanli"></menu-btn>
@@ -95,7 +95,7 @@
                        </el-table-column>
                    </el-table>
                </div>
                <el-pagination large style="text-align:center" background layout="prev, pager, next" :total="tbls.warning.page.PageAll" @current-change="warningCurrentChange">
                <el-pagination large style="text-align:center" background layout="prev, pager, next" :current-page="tbls.warning.page.PageCurr" :total="tbls.warning.page.PageAll" @current-change="warningCurrentChange">
                </el-pagination>
            </div>
            <div class="tab-item" style="display:none" v-show="tabs.active == 'charge'">
www/pages/main/main.js
@@ -58,6 +58,9 @@
                }, {
                    path: '/history-data',
                    url: '../history-data/history-data.html'
                }, {
                    path: '/warning',
                    url: '../warning/warning.html'
                }]
            },
            methods: {
@@ -96,7 +99,7 @@
                    }
                },
                setBattDiscInfo: function setBattDiscInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.discharge.data = this.formaterTestData(res);
                    // 统计个数
@@ -147,7 +150,7 @@
                    }
                },
                setBattCharInfo: function setBattCharInfo(res) {
                    console.log(res);
                    //console.log(res);
                    // 对数据进行处理
                    this.tbls.charge.data = this.formaterTestData(res);
                    // 统计个数
@@ -188,7 +191,7 @@
                        alm_cleared_type: 0,
                        page: page
                    };
                    console.log(searchParams);
                    //console.log(searchParams);
                    // 判断是否为手机端
                    if (typeof Battalram_dataService != "undefined") {
                        Battalram_dataService.serchByCondition(JSON.stringify(searchParams));
@@ -215,7 +218,7 @@
                },
                setAlarmInfo: function setAlarmInfo(res) {
                    // 设置实时告警信息
                    console.info(res);
                    // console.info(res);
                    if (res.code == 1) {
                        var page = this.tbls.warning.page;
                        // 设置数据
@@ -299,7 +302,14 @@
            mounted: function mounted() {
                var self = this;
                this.setTblsHt();
            },
            destroyed: function destroyed() {}
        });
    },
    show: function show() {
        var self = this.vm;
        // 开启计时器
        this.vm.startTimers();
                // 后台触发事件查询所有的电池组放电信息
                window['DeviceServicereadBattDiscInfocalljs'] = function (res) {
                    // 设置电池信息
@@ -323,17 +333,14 @@
                    self.tbls.warning.timer.open();
                };
            },
            destroyed: function destroyed() {}
        });
    },
    show: function show() {
        // 开启计时器
        this.vm.startTimers();
        //bui.alert('show');
    },
    hide: function hide() {
        var self = this.vm;
        // 关闭计时器
        this.vm.stopTimers();
        // 清除全局方法
        window.DeviceServicereadBattDiscInfocalljs = null;
        window.DeviceServicereadBattCharInfocalljs = null;
        window.Battalram_dataServiceserchByConditioncalljs = null;
    },
    destroyed: function destroyed() {
        this.vm.$destroy();
www/pages/warning/warning.html
New file
@@ -0,0 +1,32 @@
<div class="bui-page">
    <header class="bui-bar">
        <div class="bui-bar-left">
            <div class="bui-btn btn-back"><i class="icon-back"></i></div>
        </div>
        <div class="bui-bar-main">告警管理</div>
        <div class="bui-bar-right"></div>
    </header>
    <main>
        <div id="uiTab" class="bui-tab">
            <div class="bui-tab-head">
                <ul class="bui-nav">
                    <li class="bui-btn">实时告警</li>
                    <li class="bui-btn">历史告警</li>
                    <li class="bui-btn">告警参数设置</li>
                </ul>
            </div>
            <div class="bui-tab-main">
                <ul>
                    <li><img src="images/placeholder-list.png" alt=""></li>
                    <li style="display:none"><img src="images/placeholder-page.png" alt=""></li>
                    <li style="display:none"><img src="images/placeholder-list.png" alt=""></li>
                </ul>
            </div>
        </div>
    </main>
    <footer>
    </footer>
</div>
www/pages/warning/warning.js
New file
@@ -0,0 +1,29 @@
"use strict";
/**
 * 模板模块
 * 默认模块名: warning
 * @return {[object]}  [ 返回一个对象 ]
 */
loader.define({
    data: {
        vm: ''
    },
    loaded: function loaded(require, exports, module) {
        // 引入vue
        this.vm = new Vue({
            el: getPageRoot(module),
            data: {},
            methods: {},
            mounted: function mounted() {
                var uiTab = bui.tab({
                    id: "#uiTab"
                });
            },
            destroyed: function destroyed() {}
        });
    },
    destroyed: function destroyed() {
        this.vm.$destroy();
    }
});