| | |
| | | border-top: none;
|
| | | border-bottom: none;
|
| | | }
|
| | | .vertical-center-modal{
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: center;
|
| | | }
|
| | | .vertical-center-modal .ivu-modal{
|
| | | top: 0;
|
| | | }
|
| | |
|
| | | /* component style */
|
| | | .bui-list-header {
|
| | |
| | | text-align: center;
|
| | | background-color: #2d8cf0;
|
| | | }
|
| | |
|
| | | .bui-loading-block {
|
| | | width: 80px !important;
|
| | | height: 80px !important;
|
| | | margin-top: -40px !important;
|
| | | margin-left: -40px !important;
|
| | | line-height: 10px !important;
|
| | | }
|
| | | .bui-loading {
|
| | | font-size: 80px;
|
| | | }
|
| | | /* index */
|
| | | #appStates {
|
| | | position: absolute;
|
| | |
| | |
|
| | |
|
| | |
|
| | | <script src="index.js?696ad81bb8"></script>
|
| | | <script src="index.js"></script>
|
| | | <script src="js/lazyload.js"></script>
|
| | | <script src="js/load_lazy.js"></script>
|
| | | <script src="js/load_lazy.js?4eb0eb411a"></script>
|
| | | </body>
|
| | |
|
| | | </html> |
| | |
| | | } |
| | | }, |
| | | mounted: function mounted() { |
| | | // 开启检测是否连接正常 |
| | | this.startCheck(); |
| | | } |
| | | }); |
| | |
| | |
|
| | | <div class="bui-page" id="main">
|
| | | <div style="display:none">
|
| | | <modal title="服务器地址设置" v-model="addressModal.show" width="400" footer-hide :mask-closable="false" class-name="vertical-center-modal">
|
| | | <i-input v-model="addressModal.address" @on-change="chagneSaveBtn()" clearable>
|
| | | <span slot="prepend">服务器IP地址</span>
|
| | | </i-input>
|
| | | <br>
|
| | | <i-input v-model="addressModal.port" @on-change="chagneSaveBtn()" clearable>
|
| | | <span slot="prepend">服务器端口号</span>
|
| | | </i-input>
|
| | | <br>
|
| | | <div class="h-modal-footer">
|
| | | <i-button type="primary" @click="testAddress()" style="margin-right:16px">测试地址</i-button>
|
| | | <i-button v-if="addressModal.notSave" disabled="disabled">保存地址</i-button>
|
| | | <i-button v-else type="primary" @click="saveAddress()">保存地址</i-button>
|
| | | </div>
|
| | | </modal>
|
| | | </div>
|
| | | <main ref="main">
|
| | |
|
| | | <div class="main-inner">
|
| | |
| | | <li class="bui-btn bui-box span3" @click="handlerTabs('menu')">
|
| | | <div class="thumbnail success"><i class="icon"></i></div>
|
| | | <div class="span1">
|
| | | <h3 class="item-title approve">3</h3>
|
| | | <h3 class="item-title approve">4</h3>
|
| | | <p class="item-text">菜单</p>
|
| | | </div>
|
| | | </li>
|
| | |
| | | <div class="bui-icon warning round"><i class="icon-bell"></i><span class="bui-badges" v-text="numbers.alarms">0</span></div>
|
| | | <div class="span1">告警管理</div>
|
| | | </li>
|
| | | |
| | | <li class="bui-btn" @click="handerClickAlert('address')">
|
| | | <div class="bui-icon primary round"><i class="iconfont icon-wangluo"></i></div>
|
| | | <div class="span1">网址设置</div>
|
| | | </li>
|
| | |
|
| | | <li class="bui-btn" @click="outSystem()">
|
| | | <div class="bui-icon danger round"><i class="iconfont icon-tuichu"></i></div>
|
| | |
| | | </div>
|
| | | </main>
|
| | | </div>
|
| | | <style scoped>.table{display:table;width:100vw;height:100vh}.table .table-cell{display:table-cell;vertical-align:top}.table-cell-inner{height:100vh;overflow:auto}.exammine{padding:25px 0;background-color:#fff}.exammine>[class*=bui-btn]{border:none;padding:0 20px;border-right:1px solid #f5f5f5}.activity .icon,.exammine .icon{color:#fff}.exammine li .span1 h3{font-size:38px;text-align:right}.exammine li .span1 h3.approve{color:#f90}.exammine li .span1 h3.respond{color:#70b4e1}.exammine li .span1 h3.due{color:#f16a7a}.exammine li .span1 p{font-size:18px;text-align:right}.exammine>[class*=bui-btn]:last-child{border:none}.exammine .thumbnail{line-height:88px;height:88px;width:88px;text-align:center;border-radius:50%;margin-right:0;color:#fff}.exammine .thumbnail.approve{background-color:#f90}.exammine .thumbnail.respond{background-color:#70b4e1}.exammine .thumbnail.due{background-color:#f16a7a}.exammine [class*=bui-btn] .icon,.exammine [class*=bui-btn] .iconfont{font-size:54px;margin:0}.exammine [class*=bui-btn] .iconfont{font-size:32px;margin:0}.activity{border-top:none;margin-top:20px;padding:0 20px;background-color:#fff}.activity .bui-btn{padding-top:20px;padding-bottom:20px;padding-left:0;padding-right:0}.bui-btn:active{background-color:#bbb}</style>
|
| | | <style scoped>.table{display:table;width:100vw;height:100vh}.table .table-cell{display:table-cell;vertical-align:top}.table-cell-inner{height:100vh;overflow:auto}.exammine{padding:25px 0;background-color:#fff}.exammine>[class*=bui-btn]{border:none;padding:0 20px;border-right:1px solid #f5f5f5}.activity .icon,.exammine .icon{color:#fff}.exammine li .span1 h3{font-size:38px;text-align:right}.exammine li .span1 h3.approve{color:#f90}.exammine li .span1 h3.respond{color:#70b4e1}.exammine li .span1 h3.due{color:#f16a7a}.exammine li .span1 p{font-size:18px;text-align:right}.exammine>[class*=bui-btn]:last-child{border:none}.exammine .thumbnail{line-height:88px;height:88px;width:88px;text-align:center;border-radius:50%;margin-right:0;color:#fff}.exammine .thumbnail.approve{background-color:#f90}.exammine .thumbnail.respond{background-color:#70b4e1}.exammine .thumbnail.due{background-color:#f16a7a}.exammine [class*=bui-btn] .icon,.exammine [class*=bui-btn] .iconfont{font-size:54px;margin:0}.exammine [class*=bui-btn] .iconfont{font-size:32px;margin:0}.activity{border-top:none;margin-top:20px;padding:0 20px;background-color:#fff}.activity .bui-btn{padding-top:20px;padding-bottom:20px;padding-left:0;padding-right:0}.bui-btn:active{background-color:#bbb}.h-modal-footer{text-align:right}</style>
|
| | |
| | | var vm = new Vue({ |
| | | el: bs.$el[0], |
| | | data: { |
| | | addressModal: { |
| | | address: '', |
| | | port: '', |
| | | show: false, |
| | | notSave: true |
| | | }, |
| | | block: { |
| | | main: 0, |
| | | block1: 0, |
| | |
| | | }, { |
| | | path: 'system', |
| | | url: '../system/system.html' |
| | | }, { |
| | | path: 'address', |
| | | url: '../system/address.html' |
| | | }] |
| | | }, |
| | | methods: { |
| | |
| | | router.load({ url: url, param: {} }); |
| | | } |
| | | }, |
| | | handerClickAlert: function handerClickAlert(str) { |
| | | switch (str) { |
| | | case 'address': |
| | | this.showAddressModal(); |
| | | break; |
| | | } |
| | | }, |
| | | showAddressModal: function showAddressModal() { |
| | | this.addressModal.show = true; |
| | | this.addressModal.notSave = true; |
| | | }, |
| | | chagneSaveBtn: function chagneSaveBtn() { |
| | | this.addressModal.notSave = true; |
| | | }, |
| | | testAddress: function testAddress() { |
| | | var url = 'http://' + this.addressModal.address + ':' + this.addressModal.port + '/Device_Manage/'; |
| | | var self = this; |
| | | var searchParams = { |
| | | num: 2 |
| | | }; |
| | | var json = JSON.stringify(searchParams); |
| | | // 请求后台 |
| | | $.ajax({ |
| | | type: 'post', |
| | | async: true, |
| | | url: url + "Batt_rtstateAction!serchByInfo", |
| | | data: 'json=' + json, |
| | | dataType: 'json', |
| | | timeout: 2000, |
| | | success: function success(res) { |
| | | self.$Message.info('测试连接成功,可以保存地址!'); |
| | | self.addressModal.notSave = false; |
| | | }, |
| | | error: function error() { |
| | | self.$Message.error('测试连接失败,请检查输入的地址!'); |
| | | } |
| | | }); |
| | | }, |
| | | saveAddress: function saveAddress() { |
| | | var address = this.addressModal; |
| | | try { |
| | | Android.saveServerInfo(address.address, address.port); |
| | | } catch (e) { |
| | | this.$Message.warning('保存失败,请检查当前运行环境!'); |
| | | } |
| | | |
| | | this.addressModal.show = false; |
| | | }, |
| | | getUrl: function getUrl(str) { |
| | | var url = ''; |
| | | for (var i = 0; i < this.routers.length; i++) { |
New file |
| | |
| | |
|
| | | <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>
|
| | | </header>
|
| | | <main>
|
| | | |
| | | |
| | | </main>
|
| | | </div> |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | /**
|
| | | * 首页模块
|
| | | * 默认模块名: main
|
| | | * @return {[object]} [ 返回一个对象 ]
|
| | | */ |
| | | loader.define(function (require, exports, module) { |
| | | var bs = bui.store({ |
| | | scope: 'page', |
| | | data: {} |
| | | }); |
| | | |
| | | var vm = new Vue({ |
| | | el: bs.$el[0] |
| | | }); |
| | | }); |