whychdw
2019-11-19 40d728772489f3732d6026086db7a0ebb1f70b5e
内容修改
8个文件已修改
210 ■■■■ 已修改文件
platforms/android/app/src/main/assets/www/js/components.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/battset/battset.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/battset/battset.js 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/main/main.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/js/components.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/battset/battset.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/battset/battset.js 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/main/main.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/js/components.js
@@ -35,7 +35,7 @@
            </div>
        </div>
    `,
    data() {
    data: function() {
        return {
        }
@@ -87,7 +87,7 @@
            </div>
        </div>
    `,
    data() {
    data: function() {
        return {
        }
@@ -208,7 +208,7 @@
            <div class="echart" :style="getStyle"></div>
        </div>
    `,
    data() {
    data: function() {
        return {
            graph: '',
            style: {
@@ -392,7 +392,7 @@
            <div :id="id" class="high-chart" :style="getStyle"></div>
        </div>
    `,
    data() {
    data: function() {
        return {
            chart: '',
        }
@@ -554,7 +554,7 @@
            <div :id="id" class="high-chart" :style="getStyle"></div>
        </div>
    `,
    data() {
    data: function() {
        return {
            chart: '',
        }
platforms/android/app/src/main/assets/www/pages/battset/battset.html
@@ -6,10 +6,20 @@
        <div class="bui-bar-main">电池信息配置</div>
        <div class="bui-bar-right"></div>
    </header>
    <main>
        <button @click="readBattMonInfo(1)">系统状态</button>
    <main ref="main">
        <iview-table :columns="tbls.battinfo.columns" :data="tbls.battinfo.data" title="" :height="tbls.battinfo.height" style="margin:0"></iview-table>
        <div class="footer-table-tools">
            <i-button type="primary" icon="md-add">新建电池组</i-button>
        </div>
    </main>
    <footer>
    </footer>
</div>
</div>
<style scoped>
    .footer-table-tools {
        text-align: center;
        line-height: 42px;
        height: 42px;
    }
</style>
platforms/android/app/src/main/assets/www/pages/battset/battset.js
@@ -12,6 +12,72 @@
        this.vm = new Vue({
            el: getPageRoot(module),
            data: {
                tbls: {
                    battinfo: {
                        height: '300px',
                        columns: [
                            {
                                key: "num",
                                title: "编号"
                            },
                            {
                                key: "BattGroupName",
                                title: "电池组名称"
                            },
                            {
                                key: "vol",
                                title: "电压"
                            },
                            {
                                key: 'curr',
                                title: '电流'
                            },
                            {
                                title: '操作',
                                key: 'see',
                                align: 'center',
                                width: 200,
                                render: function render(h, params) {
                                    return h('div', [h('i-button', {
                                        props: {
                                            type: 'primary',
                                            icon: 'ios-create-outline'
                                        },
                                        style: {
                                            marginRight: '5px'
                                        },
                                        on: {
                                            click: function click() {
                                                console.log(params);
                                            }
                                        }
                                    }, '编辑'),
                                    h('i-button', {
                                        props: {
                                            type: 'error',
                                            icon: 'ios-trash-outline'
                                        },
                                        style: {
                                            marginRight: '5px'
                                        },
                                        on: {
                                            click: function click() {
                                                console.log(params);
                                            }
                                        }
                                    }, '移除')]);
                                }
                            }
                        ],
                        data: [
                            {
                                num: 1
                            }
                        ]
                    }
                }
            },
            computed: {
                
            },
            methods: {
@@ -22,10 +88,17 @@
                    }else {
                        bui.alert('请使用手机端访问!')
                    }
                },
                setTblHt: function() {
                    var mainHt = this.$refs.main.offsetHeight-42+"px";
                    this.tbls.battinfo.height = mainHt;
                }
            },
            mounted: function() {
                var self = this;
                // 设置表格的高度
                this.setTblHt();
                window["readBattMonInfocalljs"] = function(res) {
                    console.log(res);
                }
platforms/android/app/src/main/assets/www/pages/main/main.html
@@ -57,10 +57,10 @@
                            <div class="bui-icon primary round"><i class="iconfont icon-zhexianzhuzhuangtu"></i></div>
                            <div class="span1">监测数据</div>
                        </li>
                        <li class="bui-btn" @click="handerClick('history')">
                        <!--<li class="bui-btn" @click="handerClick('history')">
                            <div class="bui-icon success round"><i class="iconfont icon-yunweiguanli"></i></div>
                            <div class="span1">运维数据</div>
                        </li>
                        </li>-->
                        <li class="bui-btn" @click="handerClick('warn')">
                            <div class="bui-icon warning round"><i class="icon-bell">&#xe63f;</i><span class="bui-badges" v-text="numbers.alarms">0</span></div>
                            <div class="span1">告警管理</div>
www/js/components.js
@@ -35,7 +35,7 @@
            </div>
        </div>
    `,
    data() {
    data: function() {
        return {
        }
@@ -87,7 +87,7 @@
            </div>
        </div>
    `,
    data() {
    data: function() {
        return {
        }
@@ -208,7 +208,7 @@
            <div class="echart" :style="getStyle"></div>
        </div>
    `,
    data() {
    data: function() {
        return {
            graph: '',
            style: {
@@ -392,7 +392,7 @@
            <div :id="id" class="high-chart" :style="getStyle"></div>
        </div>
    `,
    data() {
    data: function() {
        return {
            chart: '',
        }
@@ -554,7 +554,7 @@
            <div :id="id" class="high-chart" :style="getStyle"></div>
        </div>
    `,
    data() {
    data: function() {
        return {
            chart: '',
        }
www/pages/battset/battset.html
@@ -6,10 +6,20 @@
        <div class="bui-bar-main">电池信息配置</div>
        <div class="bui-bar-right"></div>
    </header>
    <main>
        <button @click="readBattMonInfo(1)">系统状态</button>
    <main ref="main">
        <iview-table :columns="tbls.battinfo.columns" :data="tbls.battinfo.data" title="" :height="tbls.battinfo.height" style="margin:0"></iview-table>
        <div class="footer-table-tools">
            <i-button type="primary" icon="md-add">新建电池组</i-button>
        </div>
    </main>
    <footer>
    </footer>
</div>
</div>
<style scoped>
    .footer-table-tools {
        text-align: center;
        line-height: 42px;
        height: 42px;
    }
</style>
www/pages/battset/battset.js
@@ -12,6 +12,72 @@
        this.vm = new Vue({
            el: getPageRoot(module),
            data: {
                tbls: {
                    battinfo: {
                        height: '300px',
                        columns: [
                            {
                                key: "num",
                                title: "编号"
                            },
                            {
                                key: "BattGroupName",
                                title: "电池组名称"
                            },
                            {
                                key: "vol",
                                title: "电压"
                            },
                            {
                                key: 'curr',
                                title: '电流'
                            },
                            {
                                title: '操作',
                                key: 'see',
                                align: 'center',
                                width: 200,
                                render: function render(h, params) {
                                    return h('div', [h('i-button', {
                                        props: {
                                            type: 'primary',
                                            icon: 'ios-create-outline'
                                        },
                                        style: {
                                            marginRight: '5px'
                                        },
                                        on: {
                                            click: function click() {
                                                console.log(params);
                                            }
                                        }
                                    }, '编辑'),
                                    h('i-button', {
                                        props: {
                                            type: 'error',
                                            icon: 'ios-trash-outline'
                                        },
                                        style: {
                                            marginRight: '5px'
                                        },
                                        on: {
                                            click: function click() {
                                                console.log(params);
                                            }
                                        }
                                    }, '移除')]);
                                }
                            }
                        ],
                        data: [
                            {
                                num: 1
                            }
                        ]
                    }
                }
            },
            computed: {
                
            },
            methods: {
@@ -22,10 +88,17 @@
                    }else {
                        bui.alert('请使用手机端访问!')
                    }
                },
                setTblHt: function() {
                    var mainHt = this.$refs.main.offsetHeight-42+"px";
                    this.tbls.battinfo.height = mainHt;
                }
            },
            mounted: function() {
                var self = this;
                // 设置表格的高度
                this.setTblHt();
                window["readBattMonInfocalljs"] = function(res) {
                    console.log(res);
                }
www/pages/main/main.html
@@ -57,10 +57,10 @@
                            <div class="bui-icon primary round"><i class="iconfont icon-zhexianzhuzhuangtu"></i></div>
                            <div class="span1">监测数据</div>
                        </li>
                        <li class="bui-btn" @click="handerClick('history')">
                        <!--<li class="bui-btn" @click="handerClick('history')">
                            <div class="bui-icon success round"><i class="iconfont icon-yunweiguanli"></i></div>
                            <div class="span1">运维数据</div>
                        </li>
                        </li>-->
                        <li class="bui-btn" @click="handerClick('warn')">
                            <div class="bui-icon warning round"><i class="icon-bell">&#xe63f;</i><span class="bui-badges" v-text="numbers.alarms">0</span></div>
                            <div class="span1">告警管理</div>