whychdw
2019-12-03 6d728712c4169fffb8657b5c477c02bbb656c340
修改内容
10个文件已修改
178 ■■■■ 已修改文件
platforms/android/app/src/main/assets/www/index.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/js/componets.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.html 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/index.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/js/componets.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/monitor-data/monitor-data.html 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/monitor-data/monitor-data.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/index.html
@@ -22,14 +22,14 @@
    <script src="js/bui.js"></script>
    <script src="js/common_functions.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="css/element-ui/index.js"></script>
    <script src="js/componets.js?3122c865b1"></script>
    <script src="css/element-ui/index.js?3aa0e315ae"></script>
    <script src="js/componets.js?ec02efd5f7"></script>
    <script src="css/highchart/highcharts.js"></script>
    <script src="js/hammer.min.js"></script>
    <script src="js/vue-touch.js"></script>
    <script src="js/vconsole.min.js"></script>
    
    <script src="index.js"></script>
    <script src="index.js?3aa0e315ae"></script>
</body>
</html>
platforms/android/app/src/main/assets/www/index.js
@@ -1,7 +1,7 @@
"use strict";
window.router = bui.router();
//new VConsole();
new VConsole();
bui.ready(function () {
    // 初始化路由
    router.init({
platforms/android/app/src/main/assets/www/js/componets.js
@@ -592,16 +592,3 @@
    });
};
BarChart.prototype.setOption = function (option) {};
var FragmentFactory = Vue.FragmentFactory;
var remove = Vue.util.remove;
var createAnchor = Vue.util.createAnchor;
console.log(createAnchor);
console.log(FragmentFactory);
// 定义v-lazy指令
Vue.directive('lazy', {
    terminal: true,
    // 当绑定元素插入到 DOM 中。
    inserted: function inserted(el) {
        console.log(Vue.FragmentFactory);
    }
});
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.html
@@ -10,10 +10,19 @@
        </div>
    </header>
    <main>
        <el-drawer v-cloak v-lazy="0" :visible.sync="open" direction="ltr">
        <el-drawer v-cloak :visible.sync="open" direction="ltr">
            <div class="heading" slot="title"><div class="center">电池组列表</div></div>
            <hdw-list :list="battList" @handle-click="listClick"></hdw-list>
        </el-drawer>
        <div id="dialogCenter" class="bui-dialog" style="display:none">
            <div class="bui-dialog-head">{{options.monResLine.title}}</div>
            <div class="bui-dialog-main">
                <high-line-chart v-if="shows.monResLine" :style="{width: '700px'}" height="350px" id="monResLine" name="单体内阻" unit="mΩ" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monResLine"></high-line-chart>
            </div>
            <div class="bui-dialog-close"><i class="icon-close"></i></div>
        </div>
        <div class="bui-fluid">
            <div class="span10">
                <div class="bui-fluid">
@@ -125,7 +134,7 @@
                    </li>
                    <li style="display:none">
                        <v-touch @swipeleft="handleNextBtn" @swiperight="handlePreBtn">
                            <high-bar-chart v-if="shows.monVol" :height="options.monVol.height" id="monVolBar" name="单体电压" unit="V" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monVolBar"></high-bar-chart>
                            <high-bar-chart v-if="shows.monVol" :height="options.monVol.height" id="monVolBar" name="单体电压" unit="V" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monVolBar" :mon-hander-click="monHandlerClick"></high-bar-chart>
                        </v-touch>
                    </li>
                    <li style="display:none">
platforms/android/app/src/main/assets/www/pages/monitor-data/monitor-data.js
@@ -19,11 +19,14 @@
                    total: false,
                    monVol: false,
                    monRes: false,
                    monTmp: false
                    monTmp: false,
                    monResLine: false
                },
                loading: bui.loading(),
                open: true,
                uiDialog: '',
                num: -1,
                BattGroupId: -1,
                title: '??',
                battInfo: {
                    sysstate: 0,
@@ -37,9 +40,11 @@
                },
                battList: [{
                    num: 1,
                    BattGroupId: 1,
                    text: '电池组1'
                }, {
                    num: 2,
                    BattGroupId: 2,
                    text: '电池组2'
                }],
                tabs: {
@@ -94,6 +99,7 @@
                        }
                    },
                    monResLine: { // 单体内阻折线图
                        title: '',
                        option: {
                            categories: [],
                            data: []
@@ -184,6 +190,9 @@
                    this.initPage();
                    // 根据点电池组编号查询电池组信息
                    this.num = item.num;
                    // 设置电池组id
                    this.BattGroupId = item.BattGroupId;
                    this.startReadBattMonInfo();
                },
                searchAll: function searchAll() {
@@ -604,6 +613,27 @@
                    } else {
                        this.options.page.pageTotal = Math.ceil(total / this.options.page.size);
                    }
                },
                monHandlerClick: function monHandlerClick(event) {
                    var self = this;
                    var page = this.options.page;
                    var monNum = event.point.index + 1 + (page.curr - 1) * page.size;
                    this.options.monResLine.title = '单体#' + monNum + '内阻折线图';
                    // 构造查询对象
                    var searchParams = {
                        BattGroupId: this.BattGroupId,
                        mon_num: monNum
                    };
                    // 开启等待框
                    this.loading.show();
                    if (typeof Battresdata_infService != "undefined") {
                        Battresdata_infService.serchByCondition(JSON.stringify(searchParams));
                    } else {
                        setTimeout(function () {
                            self.loading.hide();
                            self.uiDialog.open();
                        }, 1000);
                    }
                }
            },
            created: function created() {
@@ -631,6 +661,10 @@
                // 显示单体温度
                setTimeout(function () {
                    self.shows.monTmp = true;
                }, 0);
                // 显示单体内阻折线
                setTimeout(function () {
                    self.shows.monResLine = true;
                }, 0);
            },
            computed: {
@@ -682,6 +716,14 @@
                    self.tabs.active = index;
                    self.tabsChange();
                });
                // 自定义居中弹出框
                this.uiDialog = bui.dialog({
                    id: "#dialogCenter",
                    width: 700,
                    autoClose: false
                });
                // 查询所有已经安装的电池组
                this.searchAll();
@@ -749,6 +791,17 @@
                        self.$message.error('重启汇集器失败!');
                    }
                };
                // 获取单体内阻信息
                window['Battresdata_infServiceserchByConditioncalljs'] = function (res) {
                    console.log(res);
                    // 关闭等待
                    self.loading.hide();
                    // 根据返回结果显示内容
                    if (res.code == 1) {} else {}
                    // 显示面板
                    self.uiDialog.open();
                };
            },
            destroyed: function destroyed() {
www/index.html
@@ -22,14 +22,14 @@
    <script src="js/bui.js"></script>
    <script src="js/common_functions.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="css/element-ui/index.js"></script>
    <script src="js/componets.js?3122c865b1"></script>
    <script src="css/element-ui/index.js?3aa0e315ae"></script>
    <script src="js/componets.js?ec02efd5f7"></script>
    <script src="css/highchart/highcharts.js"></script>
    <script src="js/hammer.min.js"></script>
    <script src="js/vue-touch.js"></script>
    <script src="js/vconsole.min.js"></script>
    
    <script src="index.js"></script>
    <script src="index.js?3aa0e315ae"></script>
</body>
</html>
www/index.js
@@ -1,7 +1,7 @@
"use strict";
window.router = bui.router();
//new VConsole();
new VConsole();
bui.ready(function () {
    // 初始化路由
    router.init({
www/js/componets.js
@@ -592,16 +592,3 @@
    });
};
BarChart.prototype.setOption = function (option) {};
var FragmentFactory = Vue.FragmentFactory;
var remove = Vue.util.remove;
var createAnchor = Vue.util.createAnchor;
console.log(createAnchor);
console.log(FragmentFactory);
// 定义v-lazy指令
Vue.directive('lazy', {
    terminal: true,
    // 当绑定元素插入到 DOM 中。
    inserted: function inserted(el) {
        console.log(Vue.FragmentFactory);
    }
});
www/pages/monitor-data/monitor-data.html
@@ -10,10 +10,19 @@
        </div>
    </header>
    <main>
        <el-drawer v-cloak v-lazy="0" :visible.sync="open" direction="ltr">
        <el-drawer v-cloak :visible.sync="open" direction="ltr">
            <div class="heading" slot="title"><div class="center">电池组列表</div></div>
            <hdw-list :list="battList" @handle-click="listClick"></hdw-list>
        </el-drawer>
        <div id="dialogCenter" class="bui-dialog" style="display:none">
            <div class="bui-dialog-head">{{options.monResLine.title}}</div>
            <div class="bui-dialog-main">
                <high-line-chart v-if="shows.monResLine" :style="{width: '700px'}" height="350px" id="monResLine" name="单体内阻" unit="mΩ" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monResLine"></high-line-chart>
            </div>
            <div class="bui-dialog-close"><i class="icon-close"></i></div>
        </div>
        <div class="bui-fluid">
            <div class="span10">
                <div class="bui-fluid">
@@ -125,7 +134,7 @@
                    </li>
                    <li style="display:none">
                        <v-touch @swipeleft="handleNextBtn" @swiperight="handlePreBtn">
                            <high-bar-chart v-if="shows.monVol" :height="options.monVol.height" id="monVolBar" name="单体电压" unit="V" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monVolBar"></high-bar-chart>
                            <high-bar-chart v-if="shows.monVol" :height="options.monVol.height" id="monVolBar" name="单体电压" unit="V" :colors="{min:'#ed4014', max: '#19be6b'}" ref="monVolBar" :mon-hander-click="monHandlerClick"></high-bar-chart>
                        </v-touch>
                    </li>
                    <li style="display:none">
www/pages/monitor-data/monitor-data.js
@@ -19,11 +19,14 @@
                    total: false,
                    monVol: false,
                    monRes: false,
                    monTmp: false
                    monTmp: false,
                    monResLine: false
                },
                loading: bui.loading(),
                open: true,
                uiDialog: '',
                num: -1,
                BattGroupId: -1,
                title: '??',
                battInfo: {
                    sysstate: 0,
@@ -37,9 +40,11 @@
                },
                battList: [{
                    num: 1,
                    BattGroupId: 1,
                    text: '电池组1'
                }, {
                    num: 2,
                    BattGroupId: 2,
                    text: '电池组2'
                }],
                tabs: {
@@ -94,6 +99,7 @@
                        }
                    },
                    monResLine: { // 单体内阻折线图
                        title: '',
                        option: {
                            categories: [],
                            data: []
@@ -184,6 +190,9 @@
                    this.initPage();
                    // 根据点电池组编号查询电池组信息
                    this.num = item.num;
                    // 设置电池组id
                    this.BattGroupId = item.BattGroupId;
                    this.startReadBattMonInfo();
                },
                searchAll: function searchAll() {
@@ -604,6 +613,27 @@
                    } else {
                        this.options.page.pageTotal = Math.ceil(total / this.options.page.size);
                    }
                },
                monHandlerClick: function monHandlerClick(event) {
                    var self = this;
                    var page = this.options.page;
                    var monNum = event.point.index + 1 + (page.curr - 1) * page.size;
                    this.options.monResLine.title = '单体#' + monNum + '内阻折线图';
                    // 构造查询对象
                    var searchParams = {
                        BattGroupId: this.BattGroupId,
                        mon_num: monNum
                    };
                    // 开启等待框
                    this.loading.show();
                    if (typeof Battresdata_infService != "undefined") {
                        Battresdata_infService.serchByCondition(JSON.stringify(searchParams));
                    } else {
                        setTimeout(function () {
                            self.loading.hide();
                            self.uiDialog.open();
                        }, 1000);
                    }
                }
            },
            created: function created() {
@@ -631,6 +661,10 @@
                // 显示单体温度
                setTimeout(function () {
                    self.shows.monTmp = true;
                }, 0);
                // 显示单体内阻折线
                setTimeout(function () {
                    self.shows.monResLine = true;
                }, 0);
            },
            computed: {
@@ -682,6 +716,14 @@
                    self.tabs.active = index;
                    self.tabsChange();
                });
                // 自定义居中弹出框
                this.uiDialog = bui.dialog({
                    id: "#dialogCenter",
                    width: 700,
                    autoClose: false
                });
                // 查询所有已经安装的电池组
                this.searchAll();
@@ -749,6 +791,17 @@
                        self.$message.error('重启汇集器失败!');
                    }
                };
                // 获取单体内阻信息
                window['Battresdata_infServiceserchByConditioncalljs'] = function (res) {
                    console.log(res);
                    // 关闭等待
                    self.loading.hide();
                    // 根据返回结果显示内容
                    if (res.code == 1) {} else {}
                    // 显示面板
                    self.uiDialog.open();
                };
            },
            destroyed: function destroyed() {