Changpeng Duan 5 роки тому
батько
коміт
643fbad562
4 змінених файлів з 343 додано та 335 видалено
  1. 2 0
      tv/src/Global.js
  2. 1 1
      tv/src/Mock/index.js
  3. 4 4
      tv/src/assets/css/bg.css
  4. 336 330
      tv/src/views/Index.vue

+ 2 - 0
tv/src/Global.js

@@ -5,6 +5,7 @@ companyInfo = {
     year: new Date().getFullYear(),
 };
 
+
 // headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';
 // headapi = 'http://192.168.0.110:8080/';//从郑伟那里获得数据源
 // headapi = '';//从郑伟那里获得数据源
@@ -14,6 +15,7 @@ headapi = 'http://192.168.0.10:8080/';//实际场馆默认数据源
 // 七牛云imgsrc
 imgUrl = "http://qjzpcd34v.hb-bkt.clouddn.com";
 
+// pad测试版本
 
 // 常用选项
 globalQuipState = function () {

+ 1 - 1
tv/src/Mock/index.js

@@ -370,7 +370,7 @@ let getClassStat = function (ClassOn, dp) {
     };
 };
 
-let t = 0;//0 is on 1 is off
+let t = 1;//0 is on 1 is off
 if (t == 0) {
     // 列表测试
     Mock.mock('/api/testTable', 'post', testTable());

+ 4 - 4
tv/src/assets/css/bg.css

@@ -1,28 +1,28 @@
 .bgStyle1 {
     background-color: #028fe1;
     background: url("../../static/img/bg/bg_1.png");
-    background-size: 100%;
+    background-size: 100%  100%;
     background-repeat: no-repeat;
 }
 
 .bgStyle2 {
     background-color: #028fe1;
     background: url("../../static/img/bg/bg_2.png");
-    background-size: 100%;
+    background-size: 100%  100%;
     background-repeat: no-repeat;
 }
 
 .bgStyle3 {
     background-color: #028fe1;
     background: url("../../static/img/bg/bg_3.png");
-    background-size: 100%;
+    background-size: 100%  100%;
     background-repeat: no-repeat;
 }
 
 .bgStyle4 {
     background-color: #028fe1;
     background: url("../../static/img/bg/bg_4.png");
-    background-size: 100%;
+    background-size: 100%  100%;
     background-repeat: no-repeat;
 }
 

+ 336 - 330
tv/src/views/Index.vue

@@ -1,345 +1,351 @@
 <template>
-  <div class="IndexContainer">
-    <keep-alive>
-      <router-view></router-view>
-    </keep-alive>
-  </div>
+    <div :class="[{'IndexContainer':true},{'isPad':isPad}]">
+        <keep-alive>
+            <router-view></router-view>
+        </keep-alive>
+    </div>
 </template>
 <!--<script src="../../public/mui.js"></script>-->
 
 <script>
-import {
-  QueryVueFramework,
-  DownloadVueFramework,
-  getCheckUpdate,
-  getUserList
-} from '@/api/getApiRes'
-
-import "../../public/mui.js"
-import '../Global'
-
-let qs = require('qs');
-
-export default {
-  name: 'Home',
-  data() {
-    return {
-      autoUpdate: false,//自动升级
-      aSideState: false,
-      thisClick: 0,
-      tabwildState: 1,
-      handleTabsList: [{
-        title: '系统首页',
-        name: '1',
-        clmurl: '/',
-      }],
-      editableTabsValue: '1',
-      curVersion: '1.0.1'
-    }
-  },
-  mounted() {
-    // alert('clientWidth:' + document.documentElement.clientWidth);
-    // alert('devicePixelRatio:' + window.devicePixelRatio);
-    //浏览器默认的
-    localStorage.eqSn = '30:9C:23:0C:8B:1E';
-    localStorage.version = '1.1.0';
-    this.getCurVersion();
-
-  },
-  methods: {
-    // 获取当前版本号
-    getCurVersion() {
-      let that = this;
-      //浏览器默认的
-      localStorage.eqSn = '30:9C:23:0C:8B:1E';
-      localStorage.version = '1.1.0';
-
-      if (window.plus) {
-        plusReady();
-      } else {
-        console.log('mui is not ready');
-        // 调试时候关闭
-        this.getServeIpAddress(localStorage.eqSn);
-        // plusReady();
-        document.addEventListener('plusready', plusReady, false);
-      }
-
-      function plusReady() {
-        if (typeof plus == 'undefined') return false;
-        // 获取本地应用资源版本号
-        plus.runtime.getProperty(plus.runtime.appid, function (inf) {
-          localStorage.version = inf.version;
-          that.curVersion = inf.version;
-        });
-
-        //   获取手机UUID
-        plus.device.getInfo({
-          success: function (e) {
-            let uuid = JSON.stringify(e.uuid).toString().substr(1);
-            uuid = uuid.substring(0, uuid.length - 1);
-            localStorage.eqSn = uuid;
-            console.log('===== uuid =====:' + uuid);
-            console.log('getDeviceInfo success: ' + JSON.stringify(e.uuid));
-            // 正式版打开
+    import {
+        QueryVueFramework,
+        DownloadVueFramework,
+        getCheckUpdate,
+        getUserList
+    } from '@/api/getApiRes'
+
+    import "../../public/mui.js"
+    import '../Global'
+
+    let qs = require('qs');
+
+    export default {
+        name: 'Home',
+        data() {
+            return {
+                autoUpdate: false,//自动升级
+                aSideState: false,
+                thisClick: 0,
+                tabwildState: 1,
+                handleTabsList: [{
+                    title: '系统首页',
+                    name: '1',
+                    clmurl: '/',
+                }],
+                editableTabsValue: '1',
+                curVersion: '1.0.1',
+                isPad:true// pad 展示版本
+            }
+        },
+        mounted() {
+            // alert('clientWidth:' + document.documentElement.clientWidth);
+            // alert('devicePixelRatio:' + window.devicePixelRatio);
+            //浏览器默认的
+            localStorage.eqSn = '30:9C:23:0C:8B:1E';
+            localStorage.version = '1.1.0';
+            this.getCurVersion();
+
+        },
+        methods: {
+            // 获取当前版本号
+            getCurVersion() {
+                let that = this;
+                //浏览器默认的
+                localStorage.eqSn = '30:9C:23:0C:8B:1E';
+                localStorage.version = '1.1.0';
+
+                if (window.plus) {
+                    plusReady();
+                } else {
+                    console.log('mui is not ready');
+                    // 调试时候关闭
+                    this.getServeIpAddress(localStorage.eqSn);
+                    // plusReady();
+                    document.addEventListener('plusready', plusReady, false);
+                }
+
+                function plusReady() {
+                    if (typeof plus == 'undefined') return false;
+                    // 获取本地应用资源版本号
+                    plus.runtime.getProperty(plus.runtime.appid, function (inf) {
+                        localStorage.version = inf.version;
+                        that.curVersion = inf.version;
+                    });
+
+                    //   获取手机UUID
+                    plus.device.getInfo({
+                        success: function (e) {
+                            let uuid = JSON.stringify(e.uuid).toString().substr(1);
+                            uuid = uuid.substring(0, uuid.length - 1);
+                            localStorage.eqSn = uuid;
+                            console.log('===== uuid =====:' + uuid);
+                            console.log('getDeviceInfo success: ' + JSON.stringify(e.uuid));
+                            // 正式版打开
+                            // 获取转发端口地址
+                            that.getServeIpAddress(e.uuid);
+
+                            // 公司测试机用公司版本升级
+                            if (uuid == "a1f2d679c1624d3a" || uuid == "8e501b0bde9ce600") {
+                                //首发版本 '1.1.0' 在线版不需要自动升级
+                                // 内测版自动升级
+                                let url = 'http://192.168.0.3:19096/v1/Sensors/QueryVueFramework';
+                                let param = {};
+                                let postdata = qs.stringify(param);
+                                axios.post(url, postdata).then(function (data) {
+                                    let json = data.data;
+                                    if (json.Code == 0) {
+                                        if (localStorage.version != json.VueFramework.Version) {
+                                            // 测试版本下载
+                                            console.log(332);
+                                            let downUrl = "http://192.168.0.3:19096/v1/Sensors/DownloadVueFramework";
+                                            that.downWgt(downUrl);
+                                        }
+                                    } else {
+                                        console.log(json.Memo);
+                                    }
+                                }, function (response) {
+                                    console.info(response);
+                                })
+                            } else {
+                                console.log(223);
+                                // 正式版
+                                //开启自动升级
+                                that.checkUpdate();
+                            }
+                        },
+                        fail: function (e) {
+                            console.log('getDeviceInfo failed: ' + JSON.stringify(e));
+                        }
+                    });
+                }
+            },
+            // 是否有新版本
+            checkUpdate() {
+                let that = this;
+                let param = {};
+                let postdata = qs.stringify(param);
+                const h = this.$createElement;
+                QueryVueFramework(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        console.log('localStorage.version' + localStorage.version);
+                        if (localStorage.version != json.VueFramework.Version) {
+                            // 正式
+                            let url = "http://cal.beswell.com:85/v1/Sensors/DownloadVueFramework";
+                            this.downWgt(url);
+                            // that.downWgt(url, json.Version);
+                            // that.$notify({
+                            //     title: '升级提醒',
+                            //     message: h('i', {style: 'color: teal'}, '检测到新的版本,正在下载最新版本')
+                            // });
+                        }
+                    }
+                })
+            },
+            downWgt(url) {
+                let that = this;
+                plus.downloader.createDownload(url, {filename: "_doc/update/"}, function (d, status) {
+                    // plus.downloader.createDownload(url, {}, function (d, status) {
+                    if (status == 200) {
+                        console.log(d);
+                        console.log("下载wgt成功:" + d.filename);
+                        that.installWgt(d.filename); // 安装wgt包
+                    } else {
+                        console.log("下载wgt失败!");
+                        // plus.nativeUI.alert("下载wgt失败!");
+                    }
+                    plus.nativeUI.closeWaiting();
+                }).start();
+            },
+            installWgt(path) {
+                // plus.nativeUI.showWaiting("安装wgt文件...");
+                plus.runtime.install(path, {}, function () {
+                    plus.nativeUI.closeWaiting();
+                    console.log("安装wgt文件成功!");
+                    // plus.nativeUI.alert("应用资源更新完成!", function () {
+                    plus.runtime.restart();
+                    // });
+                }, function (e) {
+                    plus.nativeUI.closeWaiting();
+                    console.log("安装wgt文件失败[" + e.code + "]:" + e.message);
+                    // plus.nativeUI.alert("安装wgt文件失败[" + e.code + "]:" + e.message);
+                });
+            },
             // 获取转发端口地址
-            that.getServeIpAddress(e.uuid);
-
-            // 公司测试机用公司版本升级
-            if (uuid == "a1f2d679c1624d3a" || uuid == "8e501b0bde9ce600") {
-              //首发版本 '1.1.0' 在线版不需要自动升级
-              // 内测版自动升级
-              let url = 'http://192.168.0.3:19096/v1/Sensors/QueryVueFramework';
-              let param = {};
-              let postdata = qs.stringify(param);
-              axios.post(url, postdata).then(function (data) {
-                let json = data.data;
-                if (json.Code == 0) {
-                  if (localStorage.version != json.VueFramework.Version) {
-                    // 测试版本下载
-                    console.log(332);
-                    let downUrl = "http://192.168.0.3:19096/v1/Sensors/DownloadVueFramework";
-                    that.downWgt(downUrl);
-                  }
+            getServeIpAddress(eqsn) {
+                const that = this;
+                let url = '';
+                // 测试使用0.3心率系统
+                if (eqsn == 'a1f2d679c1624d3a' || eqsn == '30:9C:23:0C:8B:1E') {
+                    url = "http://192.168.0.3:19096/v1/Sensors/GetShopConfigParam";
                 } else {
-                  console.log(json.Memo);
+                    url = 'http://cal.beswell.com:85/v1/Sensors/GetShopConfigParam'
                 }
-              }, function (response) {
-                console.info(response);
-              })
-            } else {
-              console.log(223);
-              // 正式版
-              //开启自动升级
-              that.checkUpdate();
+                let param = {
+                    eqSn: eqsn
+                };
+                let postdata = qs.stringify(param);
+                axios.post(url, postdata).then(function (data) {
+                    let json = data.data;
+                    if (json.Code == 0) {
+                        headapi = json.Rs.DataServiceIP;
+                    } else {
+                        headapi = 'http://192.168.0.10:8080/';
+                        console.log(json.memo);
+                        that.$message.error(json.memo);
+                    }
+                }, function (response) {
+                    console.info(response);
+                })
             }
-          },
-          fail: function (e) {
-            console.log('getDeviceInfo failed: ' + JSON.stringify(e));
-          }
-        });
-      }
-    },
-    // 是否有新版本
-    checkUpdate() {
-      let that = this;
-      let param = {};
-      let postdata = qs.stringify(param);
-      const h = this.$createElement;
-      QueryVueFramework(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          console.log('localStorage.version' + localStorage.version);
-          if (localStorage.version != json.VueFramework.Version) {
-            // 正式
-            let url = "http://cal.beswell.com:85/v1/Sensors/DownloadVueFramework";
-            this.downWgt(url);
-            // that.downWgt(url, json.Version);
-            // that.$notify({
-            //     title: '升级提醒',
-            //     message: h('i', {style: 'color: teal'}, '检测到新的版本,正在下载最新版本')
-            // });
-          }
-        }
-      })
-    },
-    downWgt(url) {
-      let that = this;
-      plus.downloader.createDownload(url, {filename: "_doc/update/"}, function (d, status) {
-        // plus.downloader.createDownload(url, {}, function (d, status) {
-        if (status == 200) {
-          console.log(d);
-          console.log("下载wgt成功:" + d.filename);
-          that.installWgt(d.filename); // 安装wgt包
-        } else {
-          console.log("下载wgt失败!");
-          // plus.nativeUI.alert("下载wgt失败!");
-        }
-        plus.nativeUI.closeWaiting();
-      }).start();
-    },
-    installWgt(path) {
-      // plus.nativeUI.showWaiting("安装wgt文件...");
-      plus.runtime.install(path, {}, function () {
-        plus.nativeUI.closeWaiting();
-        console.log("安装wgt文件成功!");
-        // plus.nativeUI.alert("应用资源更新完成!", function () {
-        plus.runtime.restart();
-        // });
-      }, function (e) {
-        plus.nativeUI.closeWaiting();
-        console.log("安装wgt文件失败[" + e.code + "]:" + e.message);
-        // plus.nativeUI.alert("安装wgt文件失败[" + e.code + "]:" + e.message);
-      });
-    },
-    // 获取转发端口地址
-    getServeIpAddress(eqsn) {
-      const that = this;
-      let url = '';
-      // 测试使用0.3心率系统
-      if (eqsn == 'a1f2d679c1624d3a' || eqsn == '30:9C:23:0C:8B:1E') {
-        url = "http://192.168.0.3:19096/v1/Sensors/GetShopConfigParam";
-      } else {
-        url = 'http://cal.beswell.com:85/v1/Sensors/GetShopConfigParam'
-      }
-      let param = {
-        eqSn: eqsn
-      };
-      let postdata = qs.stringify(param);
-      axios.post(url, postdata).then(function (data) {
-        let json = data.data;
-        if (json.Code == 0) {
-          headapi = json.Rs.DataServiceIP;
-        } else {
-          headapi = 'http://192.168.0.10:8080/';
-          console.log(json.memo);
-          that.$message.error(json.memo);
-        }
-      }, function (response) {
-        console.info(response);
-      })
-    }
 
-  },
-  components: {}
-}
+        },
+        components: {}
+    }
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style>
-ul, li {
-  list-style: none;
-  margin: 0;
-  padding: 0;
-}
-
-.el-header {
-  padding: 0 !important;
-  height: 72px !important;
-}
-
-.shortElaside {
-  width: 140px !important;
-  overflow: hidden;
-  height: 100%;
-  float: left;
-}
-
-.lognElaside {
-  width: 256px !important;
-  overflow: hidden;
-  height: 100%;
-  float: left;
-}
-
-/deep/ .nav {
-  width: 60px;
-}
-
-.IndexContainer {
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  background: #F0F2F5;
-}
-
-.IndexContainer > .el-container {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
-
-.footer {
-  position: absolute;
-  bottom: 0px;
-  width: 100%;
-  padding: 10px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  text-align: center;
-  text-indent: -30%;
-  font-size: 12px;
-  color: #BDBDBD;
-  background: #F0F2F5;
-  z-index: 222;
-}
-
-.el-main {
-  width: 100%;
-  height: 100%;
-  /*min-height: 800px;*/
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  overflow-y: hidden;
-  padding: 10px 20px;
-}
-
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .lognElaside {
-    width: 70px !important;
-  }
-
-  .logoContainer img {
-    display: none !important;
-  }
-
-  .el-main {
-    padding: 3px !important;
-    overflow-y: scroll;
-  }
-
-  .el-main > .context {
-    /*height: 640px;*/
-    /*overflow-y: scroll;*/
-    padding: 6px !important;
-  }
-
-  .table {
-    /*width: 950px;*/
-    /*overflow-x: scroll;*/
-  }
-
-  .el-dialog {
-    max-width: 960px;
-  }
-
-  .el-dialog__body {
-    padding: 3px;
-  }
-
-  .el-transfer__buttons {
-    width: 60px;
-    padding: 3px;
-  }
-
-  .el-transfer .el-button + .el-button {
-    float: right;
-  }
-
-  .el-container.is-vertical {
-    position: absolute;
-    left: 140px;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    height: 100%;
-  }
-
-  .context {
-    border-radius: 12px;
-    height: 823px !important;
-    overflow-y: scroll;
-  }
-
-  .el-dialog {
-    padding: 5px;
-    padding-bottom: 15px;
-  }
-}
+    ul, li {
+        list-style: none;
+        margin: 0;
+        padding: 0;
+    }
+
+    .el-header {
+        padding: 0 !important;
+        height: 72px !important;
+    }
+
+    .shortElaside {
+        width: 140px !important;
+        overflow: hidden;
+        height: 100%;
+        float: left;
+    }
+
+    .lognElaside {
+        width: 256px !important;
+        overflow: hidden;
+        height: 100%;
+        float: left;
+    }
+
+    /deep/ .nav {
+        width: 60px;
+    }
+
+    .IndexContainer {
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        background: #F0F2F5;
+    }
+    /*演示版专供*/
+    .isPad {
+        height: 11.2rem;
+    }
+
+
+    .IndexContainer > .el-container {
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .footer {
+        position: absolute;
+        bottom: 0px;
+        width: 100%;
+        padding: 10px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        text-align: center;
+        text-indent: -30%;
+        font-size: 12px;
+        color: #BDBDBD;
+        background: #F0F2F5;
+        z-index: 222;
+    }
+
+    .el-main {
+        width: 100%;
+        height: 100%;
+        /*min-height: 800px;*/
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        overflow-y: hidden;
+        padding: 10px 20px;
+    }
+
+    /*ipad only*/
+    @media only screen and (max-width: 1366px) {
+        .lognElaside {
+            width: 70px !important;
+        }
+
+        .logoContainer img {
+            display: none !important;
+        }
+
+        .el-main {
+            padding: 3px !important;
+            overflow-y: scroll;
+        }
+
+        .el-main > .context {
+            /*height: 640px;*/
+            /*overflow-y: scroll;*/
+            padding: 6px !important;
+        }
+
+        .table {
+            /*width: 950px;*/
+            /*overflow-x: scroll;*/
+        }
+
+        .el-dialog {
+            max-width: 960px;
+        }
+
+        .el-dialog__body {
+            padding: 3px;
+        }
+
+        .el-transfer__buttons {
+            width: 60px;
+            padding: 3px;
+        }
+
+        .el-transfer .el-button + .el-button {
+            float: right;
+        }
+
+        .el-container.is-vertical {
+            position: absolute;
+            left: 140px;
+            top: 0;
+            right: 0;
+            bottom: 0;
+            height: 100%;
+        }
+
+        .context {
+            border-radius: 12px;
+            height: 823px !important;
+            overflow-y: scroll;
+        }
+
+        .el-dialog {
+            padding: 5px;
+            padding-bottom: 15px;
+        }
+    }
 </style>