Przeglądaj źródła

Merge branch 'master' of git.beswell.com:duanchangpeng/flyLong

duanchangpeng 5 lat temu
rodzic
commit
c3258badfe

+ 10 - 3
app/src/page/mainpage.vue

@@ -7,14 +7,20 @@
         <ul class="list">
             <li v-for="l in list" @click="goAppoint(l)" v-if="parseInt(l.Status) == 1">
                 <div class="lt">
-                    <img src="../static/images/main/shop2.jpg" width="100%" height="100%" v-show="parseInt(l.ShopID) == 3"/>
-                    <img src="../static/images/main/shop.jpg" width="100%" height="100%" v-show="parseInt(l.ShopID) == 4"/>
-                    <img src="../static/images/main/shop3.png" width="100%" height="100%" v-show="parseInt(l.ShopID) == 5"/>
+                    <img src="../static/images/main/shop2.jpg" width="100%" height="100%"
+                         v-show="parseInt(l.ShopID) == 3"/>
+                    <img src="../static/images/main/shop.jpg" width="100%" height="100%"
+                         v-show="parseInt(l.ShopID) == 4"/>
+                    <img src="../static/images/main/shop3.png" width="100%" height="100%"
+                         v-show="parseInt(l.ShopID) == 5"/>
+                    <img src="../static/images/main/shop6.png" width="100%" height="100%"
+                         v-show="parseInt(l.ShopID) == 6"/>
                 </div>
                 <div class="rt">
                     <h4 style="background-color: #FFA310" v-if="l.ShopID == 3">{{ l.ShopName.substr(5,12) }}</h4>
                     <h4 style="background-color: #37CB00" v-if="l.ShopID == 4">{{ l.ShopName.substr(5,12) }}</h4>
                     <h4 style="background-color: #028FE1" v-if="l.ShopID == 5">{{ l.ShopName.substr(5,12) }}</h4>
+                    <h4 style="background-color: #d624e1" v-if="l.ShopID == 6">{{ l.ShopName }}</h4>
                     <span>今日预约名额剩余
               <i v-if="l.RemainOrdernum > 0">{{ l.RemainOrdernum }}</i>
               <i v-if="l.RemainOrdernum == 0" class="red">{{ l.RemainOrdernum }}</i>
@@ -271,6 +277,7 @@
         height: 100%;
         float: left;
     }
+
     .list .lt {
         width: 33%;
         height: 100%;

BIN
app/src/static/images/main/shop6.png


+ 31 - 11
hbuild/online/manifest.json

@@ -102,7 +102,15 @@
                         "spotlight-retina" : "", /*iPhone高分屏Spotlight搜索程序图标,分辨率:58x58*/
                         "spotlight-retina7" : "", /*iPhone iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/
                         "settings-normal" : "", /*iPhone设置页面程序图标,分辨率:29x29*/
-                        "settings-retina" : ""
+                        "settings-retina" : "",
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
                     },
                     "ipad" : {
                         "normal" : "", /*iPad普通屏幕程序图标,分辨率:72x72*/
@@ -114,16 +122,26 @@
                         "spotlight-normal7" : "", /*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/
                         "spotlight-retina7" : "", /*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/
                         "settings-normal" : "", /*iPad设置页面程序图标,分辨率:29x29*/
-                        "settings-retina" : ""
-                    }
+                        "settings-retina" : "",
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "appstore" : "unpackage/res/icons/1024x1024.png"
                 },
                 "android" : {
                     "mdpi" : "", /*普通屏程序图标,分辨率:48x48*/
                     "ldpi" : "", /*大屏程序图标,分辨率:48x48*/
-                    "hdpi" : "D:/wwwroot/flyong/icon/1024.png", /*高分屏程序图标,分辨率:72x72*/
-                    "xhdpi" : "D:/wwwroot/flyong/icon/1024.png", /*720P高分屏程序图标,分辨率:96x96*/
-                    "xxhdpi" : "D:/wwwroot/flyong/icon/1024.png",
-                    "xxxhdpi" : "D:/wwwroot/flyong/icon/1024.png"
+                    "hdpi" : "unpackage/res/icons/72x72.png", /*高分屏程序图标,分辨率:72x72*/
+                    "xhdpi" : "unpackage/res/icons/96x96.png", /*720P高分屏程序图标,分辨率:96x96*/
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
                 }
             },
             "splashscreen" : {
@@ -147,10 +165,12 @@
                 "android" : {
                     "mdpi" : "", /*普通屏启动图片,分辨率:240x282*/
                     "ldpi" : "", /*大屏启动图片,分辨率:320x442*/
-                    "hdpi" : "", /*高分屏启动图片,分辨率:480x762*/
-                    "xhdpi" : "", /*720P高分屏启动图片,分辨率:720x1242*/
-                    "xxhdpi" : ""
-                }
+                    "hdpi" : "D:/wwwroot/flyLong/icon/drawable-xhdpi/welcome.png", /*高分屏启动图片,分辨率:480x762*/
+                    "xhdpi" : "D:/wwwroot/flyLong/icon/drawable-xxhdpi/welcome.png", /*720P高分屏启动图片,分辨率:720x1242*/
+                    "xxhdpi" : "D:/wwwroot/flyLong/icon/drawable-xxxhdpi/welcome.png"
+                },
+                "androidStyle" : "default",
+                "iosStyle" : "common"
             },
             "plugins" : {
                 "speech" : {

+ 1 - 0
online/package.json

@@ -11,6 +11,7 @@
     "axios": "^0.19.2",
     "chart.js": "^2.9.3",
     "core-js": "^3.6.4",
+    "mockjs": "^1.1.0",
     "muse-ui": "^3.0.2",
     "muse-ui-loading": "^0.2.0",
     "muse-ui-message": "^0.2.1",

+ 4 - 0
online/src/main.js

@@ -14,6 +14,10 @@ Vue.use(Message);
 import NProgress from 'muse-ui-progress';
 Vue.use(NProgress);
 
+import VueSimpleVerify from 'vue-simple-verify'
+import '../node_modules/vue-simple-verify/dist/vue-simple-verify.css'
+Vue.component('vue-simple-verify', VueSimpleVerify);
+
 // import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
 // let vConsole = new VConsole() // 初始化
 

+ 100 - 645
online/src/page/login.vue

@@ -1,666 +1,121 @@
 <template>
-  <div id="skin-blur-violate">
-    <section id="login">
-      <header>
-        <img src="../static/images/login/logo.png" height="109" width="109" id="logo"/>
-        <img src="../static/images/login/title.png" height="100%" width="274px"/>
-      </header>
-      <div class="clearfix"></div>
-      <!-- Login -->
-      <form class="box tile animated active" id="box-login">
-        <h2 class="m-t-0 m-b-15"></h2>
-        <div class="rowHeight">
-          <input type="text" class="login-control login_account" placeholder="输入手机号"
-                 v-model="login.phone">
+    <div class="container">
+        <div class="topImg">
+            <img src="../static/images/login/head.png"/>
         </div>
-        <div class="rowHeight">
-          <input type="number" class="login-control login_valid" placeholder="输入右侧图形码"
-                 v-model="login.uservalid">
-          <img id="imgValidcode" :src="valImgSrc" :title="InvisibilityGiveitatry" @click="getValImgSrc">
+        <div class="control">
+            <mu-text-field v-model="input" placeholder="|请输入手机号"></mu-text-field>
+            <mu-button color="info" small round v-if="btnShow" @click="errorToast">继续</mu-button>
+            <mu-button color="primary" small round v-else @click="stepVertify">继续</mu-button>
         </div>
-        <div class="rowHeight">
-          <input type="number" class="login-control login_pwd" placeholder="输入验证码" v-model="login.userpwd"
-                 @keyup.enter="pwdLoginBtn">
-          <mu-button id="getValidSms" :disabled="getValidSmsState" color="success" @click="getValidSmsBtn">
-            {{ btnText }}
-          </mu-button>
+        <div class="vertify" v-if="vertifyShow">
+            <vue-simple-verify ref="verify" @success="success" />
         </div>
-        <div class="btn_center">
-          <span class="btn btn-md login_btn" @click="pwdLoginBtn">登    录</span>
-        </div>
-      </form>
-    </section>
-    <mu-snackbar :position="normal.position" :open.sync="normal.open" :color="normal.color">
-      {{ normal.message }}
-      <mu-button flat slot="action" color="secondary" @click="normal.open = false">{{ "close" }}</mu-button>
-    </mu-snackbar>
-  </div>
+    </div>
 </template>
 
 <script>
-import {
-  SignIn,
-  GenVerifyPic,
-  GetPhoneVFCode,
-  PhoneSignIn,
-  WXBind,
-  testSelect
-} from '../api/getApiRes.js'
-
-let qs = require('qs');
-
-export default {
-  data() {
-    let samepass = (rule, value, callback) => {
-      if (value !== this.form.newpwd) {
-        callback(new Error('两次输入密码不一致!'));
-      } else {
-        callback();
-      }
-    };
-    let pwdPass = (rule, value, callback) => {
-      let re = /^[0-9a-zA-Z_]{1,}$/;
-      if (value.search(re) == -1) {
-        callback(new Error('错了哦,密码只能由字母、数字及下划线组成'));
-      } else {
-        callback()
-      }
-    };
-    let phonetest = (rule, value, callback) => {
-      let re = /^1[3|4|5|7|8|9][0-9]\d{8}$/;
-      if (value.search(re) == -1) {
-        callback(new Error('错了哦,手机号码格式不正确'));
-      } else {
-        callback()
-      }
-    };
-    return {
-      Password: "Password",
-      VerificationCode: "Verification Code",
-      InvisibilityGiveitatry: "无效?再点一下试试吧!",
-      valImgSrc: '',//
-      picId: '',//
-      getValidSmsState: false,//
-      overtime: '',
-      btnText: '获取验证码',
-      normal: normal,
-      login: {
-        phone: '',
-        userpwd: '',
-        uservalid: '',
-      },
-      rules: {
-        username: [
-          {required: true, message: '请输入用户名', trigger: 'blur'},
-          {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
-        ],
-        phone: [
-          {required: true, message: '请输入手机号', trigger: 'blur'},
-          {min: 11, max: 12, message: '手机号长度是11位', trigger: 'blur'},
-          {validator: phonetest, trigger: 'blur'}
-        ],
-        re_phonevalid: [
-          {required: true, message: '请输入验证码', trigger: 'blur'},
-          {min: 4, max: 4, message: '长度在 4 个字符', trigger: 'blur'},
-        ],
-        newpwd: [
-          {required: true, message: '请输入新密码', trigger: 'blur'},
-          {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
-          {validator: pwdPass, trigger: 'blur'}
-        ],
-        again: [
-          {required: true, message: '请输入确认密码', trigger: 'blur'},
-          {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
-          {validator: pwdPass, trigger: 'blur'},
-          {validator: samepass, trigger: 'blur'},
-        ],
-      }
-    }
-  },
-  mounted() {
-    // 入口状态有 3 种
-    // 1.全新登入,拿weixinId 拿验证码 ,绑定 ,登陆
-    // 2.token 未失效用户,直接进入内页,继续凭token使用
-    // 3.token 已失效用户,删掉本地token ,重新按照1的模式登陆
-    if (localStorage.token) {
-      // 凭借旧token直接登陆
-      this.$router.push({path: '/'});
-    } else {
-      // 获取图形验证码
-      this.getValImgSrc();
-      this.overtime = new Date();
-      let from = this.$route.query.from;//获取来源
-      let userAgent = navigator.userAgent;
-      let host = window.location.host;
-      console.log(host);
-      if (from == 'app' || host == '192.168.0.162:8080') {//判断是否微信浏览器
-        // 浏览器测试
-        console.log('from app & brower');
-      } else {
-        console.log('form wx');
-        this.checkcode();
-      }
-    }
-  },
-  methods: {
-    // 获取CODE
-    checkcode() {
-      // 0213tIFa1fBjAz0OVDIa1LfXwc03tIFK
-      if (this.getUrlKey('state') == 123) {
-        // 取到值了
-        localStorage.code = this.getUrlKey('code');
-        // console.log('code:' + localStorage.code);
-      } else {
-        // 第一次加载
-        this.GetOpenId();
-      }
-    },
-    // 获取公众号ID
-    GetOpenId() {
-      let origin = location.href;
-      // let origin = 'http://wx.xfeilong.com';
-      let urlNow = encodeURIComponent(origin);
-      let scope = 'snsapi_userinfo';    //snsapi_userinfo   //静默授权 用户无感知
-      let appid = 'wx36cb8b6661d71811';//正式
-      let state = '123';
-      let url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appid + '&redirect_uri=' + urlNow + '&response_type=code&scope=' + scope + '&state=' + state + '#wechat_redirect';
-      self.location = url;
-    },
-    getUrlKey(name) {
-      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
-    },
-    // 获取验证码
-    getValidSmsBtn() {
-      let that = this;
-      let phone = that.login.phone;
-      let uservalid = that.login.uservalid;
-      if (!phone) {
-        that.Toast('手机号不能为空');
-        return false
-      }
-      if (phone.length != 11) {
-        that.Toast('手机号只能是11位');
-        return false
-      }
-      if (!globalCheckPhone(phone)) {
-        that.Toast('手机号格式不正确');
-        return false
-      }
-      if (!uservalid) {
-        that.Toast('图形验证码不能为空');
-        return false
-      }
-      if (uservalid.length != 4) {
-        that.Toast('图形验证码只能是4位');
-        return false
-      }
-      let param = {
-        token: localStorage.token,
-        phone: phone,
-        codeType: 1,
-        picId: this.valImgId,
-        picCode: uservalid,
-      };
-      let postdata = qs.stringify(param);
-      GetPhoneVFCode(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.Toast('短信验证码已发送', 'success');
-          that.calcTime();
-        } else {
-          that.Toast(json.Memo);
-        }
-      })
-    },
-    calcTime() {
-      // 短信倒数计时
-      let countdown = 60;
-      let that = this;
-      //设置button效果,开始计时
-      that.getValidSmsState = true;
-      that.btnText = countdown + "S"
-      //启动计时器,1秒执行一次
-      let timer = setInterval(function () {
-        if (countdown == 0) {
-          clearInterval(timer);//停止计时器
-          that.getValidSmsState = false;
-          that.btnText = "重新发送"
-        } else {
-          countdown--;
-          that.btnText = countdown + "S"
-        }
-      }, 1000);
-    },
-    clearLogin() {
-      this.login.username = '';
-      this.login.userpwd = '';
-      this.login.uservalid = '';
-      this.getValImgSrc();
-    },
-    // 点击验证码切换
-    getValImgSrc() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        width: 100,
-        height: 30,
-        noiseCount: 1,
-        length: 4,
-        source: 123456789,
-      };
-      let postdata = qs.stringify(param);
-      GenVerifyPic(postdata).then(res => {
-        let json = res;
-        that.valImgSrc = json.Pic;
-        that.valImgId = json.Id;
-      })
-    },
-    // pwd登录
-    pwdLoginBtn() {
-      let that = this;
-      let phone = this.login.phone;
-      let userpwd = this.login.userpwd;
-      // 重置验证码超时
-      that.overtime = new Date();
-      if (!that.globalValid(phone, 10, 12, '手机号', that)) return;
-      if (!that.globalValid(userpwd, 5, 7, '短信验证码', that)) return;
-      this.loginInfo();
-    },
-    // 校验内容长度
-    globalValid(data, mins, maxs, text, that) {
-      let thisVal = data;
-      let thisLeng = thisVal.length;
-      let min = parseInt(mins);
-      let max = parseInt(maxs);
-      let dispalyMin = min + 1;
-      if (thisVal == '') {
-        this.Toast(text + ' ' + '不能为空');
-        return false
-      } else if (thisLeng <= min) {
-        this.Toast(text + '最少' + dispalyMin + '字符');
-        return false
-      } else if (thisLeng > max) {
-        this.Toast(text + '超过限制长度');
-        return false
-      } else {
-        return true
-      }
-    },
-    // pwd登陆
-    loginInfo: function () {
-      const that = this;
-      let current = new Date();
-      let betweenTime = current - that.overtime;
-      let s = 120;
-      if (betweenTime > s * 1000) {
-        that.changeValImg();
-        that.$toast.message('验证码已超时,请重新输入');
-        return false
-      }
-      let param = {
-        phone: that.login.phone,
-        code: that.login.userpwd,
-        channel: 3
-      };
-      let postdata = qs.stringify(param);
-      PhoneSignIn(postdata).then(res => {
-        if (res.Code == 0) {
-          that.res = res.Rs;
-          // 使用token做免校验登陆
-          localStorage.token = res.Rs.token;
-          // 如果是wx登陆就执行绑定操作
-          let from = this.$route.query.from;//获取来源
-          if (from != 'app') {
-            that.bindWx();
-          }
-
-          // 607862e8828013be90c2ccb78468b43a
-          // test
-          that.$router.push({path: '/'});
-        } else {
-          this.getValImgSrc();
-          if (res.Code == 10005) {
-            that.$refs.userpwd.value = '';
-            that.Toast('密码错误,请重新输入');
-          } else {
-            that.Toast(res.Memo + ',错误代码:' + res.Code);
-            that.form.valid = '';
-          }
+    import '../Global'
+
+    export default {
+        data() {
+            return {
+                btnShow: true, //true  false
+                vertifyShow: false,
+                input: '',
+            }
+        },
+        watch: {
+            input: {
+                handler(newName, oldName) {
+                    let that = this;
+                    // 校验手机号格式
+                    if (globalCheckPhone(newName)) {
+                        that.btnShow = false;
+                    }
+                },
+                deep: true,
+                immediate: true
+            },
+        },
+        methods: {
+            errorToast() {
+                this.Toast('手机号格式不正确');
+            },
+            success(){
+
+            },
+            stepVertify(){
+                this.btnShow = false;
+                this.vertifyShow = true;
+            }
         }
-      })
-    },
-    bindWx() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        code: localStorage.code,
-      };
-      let postdata = qs.stringify(param);
-      WXBind(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // that.$router.push({path: '/'});
-        } else {
-          // that.Toast(res.Memo + ',错误代码:' + res.Code);
-        }
-      })
-    },
-    getUserInfo(token) {
-      let that = this;
-      let param = {
-        token: token,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          var userLevel = json.Rs.Rolesname;
-          localStorage.userLevel = userLevel;
-          localStorage.comId = json.Rs.Comid;
-          localStorage.Insname = json.Rs.Insname;
-          that.$router.push({path: '/'});
-        } else {
-          that.$toast.message(json.Memo);
-        }
-      })
     }
-  },
-  components: {}
-}
 </script>
 
 <style scoped>
-#skin-blur-violate {
-  position: relative;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #3B3B3B;
-  background: url("../static/images/login/bg.png") top center no-repeat;
-  background-size: 100% 100%;
-}
-
-#login {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
-
-#login .box {
-  margin: 0 auto;
-  position: inherit;
-  margin-top: 20px;
-  border-radius: 9px;
-  padding: 20px 20px;
-}
-
-h1 {
-  color: #FFA200;
-  font-size: 30px;
-}
-
-header p {
-  font-size: 14px;
-  color: #7B7B7B;
-}
-
-#login header {
-  text-align: center;
-  margin-top: 15%;
-}
-
-#box-login h2 {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 20px;
-  text-align: center;
-  font-size: 24px;
-  color: #fff;
-}
-
-#tableBordered {
-  margin: 0;
-  padding: 0;
-}
-
-#tableBordered h5 {
-  margin: 0;
-  text-align: center;
-  padding: 0;
-}
-
-#login .box {
-  margin: 0 auto;
-  position: inherit;
-  margin-top: 20px;
-  border-radius: 9px !important;
-}
-
-#login header {
-  text-align: center;
-  margin-top: 15%;
-}
-
-#tableBordered {
-  margin: 0;
-  padding: 0;
-}
-
-#tableBordered h5 {
-  margin: 0;
-  text-align: center;
-  padding: 0;
-}
-
-#imgValidcode {
-  position: relative;
-  float: right;
-  /*bottom: 54px;*/
-  /*width: 100px;*/
-  width: 30%;
-  height: 50px;
-  background: #eee;
-}
-
-.login_btn {
-  width: 100%;
-  height: 50px;
-  line-height: 50px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 42px;
-  background: #E75296;
-  color: #fff;
-  font-size: 14px;
-  text-align: center;
-  border: none;
-  padding: 0;
-  font-size: 24px;
-  margin-bottom: 3%;
-}
-
-.clear_btn {
-  width: 100%;
-  height: 40px;
-  line-height: 40px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: rgba(255, 255, 255, 0.32);
-  color: #FFCC00;
-  font-size: 14px;
-  text-align: center;
-  border: none;
-  padding: 0;
-}
-
-header p {
-  margin-top: 10px;
-}
-
-#login .login-control {
-  width: 100%;
-  height: 50px;
-  line-height: 50px;
-  background: rgba(255, 255, 255, 0.4);
-  margin-bottom: 3px;
-  text-indent: 10px;
-  border: none;
-
-}
-
-#login .login-control::placeholder {
-  color: #000000;
-  font-size: 16px;
-}
-
-#logo {
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10%;
-  margin-bottom: 10px;
-}
-
-.rowHeight {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  height: 50px;
-  margin-bottom: 3px;
-}
-
-#getValidSms {
-  /*width: 100px;*/
-  width: 30%;
-  height: 50px;
-  background: #fff;
-  border: 1px solid #fff;
-  opacity: 0.6;
-  position: relative;
-  /*bottom: 55px;*/
-  float: right;
-  text-align: center;
-  color: #E75296;
-  line-height: 20px;
-  font-size: 12px;
-  min-width: 30px;
-}
-
-#login .login_valid {
-  /*width: 173px;*/
-  width:65%;
-  float: left;
-}
-
-#login .login_pwd {
-  width: 173px;
-  float: left;
-}
-
-@media only screen and (max-width: 640px) {
-
-}
-
-@media only screen and (max-width: 480px) {
-  #login .login_valid {
-    /*width: 195px;*/
-    width:65%;
-  }
-
-  #login .login_pwd {
-    /*width: 195px;*/
-    width:65%;
-  }
-}
-
-@media only screen and (max-width: 414px) {
-  #login .login_valid {
-    width:65%;
-    /*width: 223px;*/
-  }
-
-  #login .login_pwd {
-    /*width: 223px;*/
-    width:65%;
-  }
-}
-
-@media only screen and (max-width: 400px) {
-
-  #login .login_valid {
-    width:65%;
-    /*width: 218px;*/
-  }
-
-  #login .login_pwd {
-    /*width: 218px;*/
-    width:65%;
-  }
-
-  #getValidSms {
-    font-size: 13px;
-  }
-}
-
-@media only screen and (max-width: 375px) {
-  #login .login_valid {
-    /*width: 190px;*/
-    width:65%;
-  }
-
-  #login .login_pwd {
-    /*width: 190px;*/
-    width:65%;
-  }
-
-  #getValidSms {
-    font-size: 14px;
-  }
-}
+    .container {
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: url("../static/images/login/bg2.png");
+        background-size: 100%;
+        background-position: bottom center;
+    }
 
-@media only screen and (max-width: 360px) {
-  #login .login_valid {
-    /*width: 160px;*/
-    width:65%;
-  }
+    .topImg {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 
-  #login .login_pwd {
-    /*width: 160px;*/
-    width:65%;
-  }
+    .topImg img {
+        width: 80%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 20%;
+    }
 
-  #getValidSms {
-    font-size: 14px;
-  }
-}
+    .control {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 20%;
+    }
 
-@media only screen and (max-width: 320px) {
-  #login .login_valid {
-    /*width: 144px;*/
-    width:65%;
-  }
+    /deep/ .mu-input {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 
-  #login .login_pwd {
-    width:65%;
-    /*width: 144px;*/
-  }
+    /deep/ .mu-input__focus {
+        color: #E75296;
+    }
 
-  #getValidSms {
-    font-size: 12px;
-  }
-}
+    .mu-primary-color {
+        margin-top: 10px;
+        background: #E75296;
+    }
 
+    /deep/ .mu-button {
+        box-shadow: none;
+        float: right;
+    }
+    /deep/ .mu-info-color {
+        background: #E2E2E2;
+    }
 
+    /deep/ .mu-raised-button {
+        min-width: 66px;
+    }
 </style>

+ 666 - 0
online/src/page/login2.vue

@@ -0,0 +1,666 @@
+<template>
+  <div id="skin-blur-violate">
+    <section id="login">
+      <header>
+        <img src="../static/images/login/logo.png" height="109" width="109" id="logo"/>
+        <img src="../static/images/login/title.png" height="100%" width="274px"/>
+      </header>
+      <div class="clearfix"></div>
+      <!-- Login -->
+      <form class="box tile animated active" id="box-login">
+        <h2 class="m-t-0 m-b-15"></h2>
+        <div class="rowHeight">
+          <input type="text" class="login-control login_account" placeholder="输入手机号"
+                 v-model="login.phone">
+        </div>
+        <div class="rowHeight">
+          <input type="number" class="login-control login_valid" placeholder="输入右侧图形码"
+                 v-model="login.uservalid">
+          <img id="imgValidcode" :src="valImgSrc" :title="InvisibilityGiveitatry" @click="getValImgSrc">
+        </div>
+        <div class="rowHeight">
+          <input type="number" class="login-control login_pwd" placeholder="输入验证码" v-model="login.userpwd"
+                 @keyup.enter="pwdLoginBtn">
+          <mu-button id="getValidSms" :disabled="getValidSmsState" color="success" @click="getValidSmsBtn">
+            {{ btnText }}
+          </mu-button>
+        </div>
+        <div class="btn_center">
+          <span class="btn btn-md login_btn" @click="pwdLoginBtn">登    录</span>
+        </div>
+      </form>
+    </section>
+    <mu-snackbar :position="normal.position" :open.sync="normal.open" :color="normal.color">
+      {{ normal.message }}
+      <mu-button flat slot="action" color="secondary" @click="normal.open = false">{{ "close" }}</mu-button>
+    </mu-snackbar>
+  </div>
+</template>
+
+<script>
+import {
+  SignIn,
+  GenVerifyPic,
+  GetPhoneVFCode,
+  PhoneSignIn,
+  WXBind,
+  testSelect
+} from '../api/getApiRes.js'
+
+let qs = require('qs');
+
+export default {
+  data() {
+    let samepass = (rule, value, callback) => {
+      if (value !== this.form.newpwd) {
+        callback(new Error('两次输入密码不一致!'));
+      } else {
+        callback();
+      }
+    };
+    let pwdPass = (rule, value, callback) => {
+      let re = /^[0-9a-zA-Z_]{1,}$/;
+      if (value.search(re) == -1) {
+        callback(new Error('错了哦,密码只能由字母、数字及下划线组成'));
+      } else {
+        callback()
+      }
+    };
+    let phonetest = (rule, value, callback) => {
+      let re = /^1[3|4|5|7|8|9][0-9]\d{8}$/;
+      if (value.search(re) == -1) {
+        callback(new Error('错了哦,手机号码格式不正确'));
+      } else {
+        callback()
+      }
+    };
+    return {
+      Password: "Password",
+      VerificationCode: "Verification Code",
+      InvisibilityGiveitatry: "无效?再点一下试试吧!",
+      valImgSrc: '',//
+      picId: '',//
+      getValidSmsState: false,//
+      overtime: '',
+      btnText: '获取验证码',
+      normal: normal,
+      login: {
+        phone: '',
+        userpwd: '',
+        uservalid: '',
+      },
+      rules: {
+        username: [
+          {required: true, message: '请输入用户名', trigger: 'blur'},
+          {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
+        ],
+        phone: [
+          {required: true, message: '请输入手机号', trigger: 'blur'},
+          {min: 11, max: 12, message: '手机号长度是11位', trigger: 'blur'},
+          {validator: phonetest, trigger: 'blur'}
+        ],
+        re_phonevalid: [
+          {required: true, message: '请输入验证码', trigger: 'blur'},
+          {min: 4, max: 4, message: '长度在 4 个字符', trigger: 'blur'},
+        ],
+        newpwd: [
+          {required: true, message: '请输入新密码', trigger: 'blur'},
+          {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
+          {validator: pwdPass, trigger: 'blur'}
+        ],
+        again: [
+          {required: true, message: '请输入确认密码', trigger: 'blur'},
+          {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
+          {validator: pwdPass, trigger: 'blur'},
+          {validator: samepass, trigger: 'blur'},
+        ],
+      }
+    }
+  },
+  mounted() {
+    // 入口状态有 3 种
+    // 1.全新登入,拿weixinId 拿验证码 ,绑定 ,登陆
+    // 2.token 未失效用户,直接进入内页,继续凭token使用
+    // 3.token 已失效用户,删掉本地token ,重新按照1的模式登陆
+    if (localStorage.token) {
+      // 凭借旧token直接登陆
+      this.$router.push({path: '/'});
+    } else {
+      // 获取图形验证码
+      this.getValImgSrc();
+      this.overtime = new Date();
+      let from = this.$route.query.from;//获取来源
+      let userAgent = navigator.userAgent;
+      let host = window.location.host;
+      console.log(host);
+      if (from == 'app' || host == '192.168.0.162:8080') {//判断是否微信浏览器
+        // 浏览器测试
+        console.log('from app & brower');
+      } else {
+        console.log('form wx');
+        // this.checkcode();
+      }
+    }
+  },
+  methods: {
+    // 获取CODE
+    checkcode() {
+      // 0213tIFa1fBjAz0OVDIa1LfXwc03tIFK
+      if (this.getUrlKey('state') == 123) {
+        // 取到值了
+        localStorage.code = this.getUrlKey('code');
+        // console.log('code:' + localStorage.code);
+      } else {
+        // 第一次加载
+        this.GetOpenId();
+      }
+    },
+    // 获取公众号ID
+    GetOpenId() {
+      let origin = location.href;
+      // let origin = 'http://wx.xfeilong.com';
+      let urlNow = encodeURIComponent(origin);
+      let scope = 'snsapi_userinfo';    //snsapi_userinfo   //静默授权 用户无感知
+      let appid = 'wx36cb8b6661d71811';//正式
+      let state = '123';
+      let url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appid + '&redirect_uri=' + urlNow + '&response_type=code&scope=' + scope + '&state=' + state + '#wechat_redirect';
+      self.location = url;
+    },
+    getUrlKey(name) {
+      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
+    },
+    // 获取验证码
+    getValidSmsBtn() {
+      let that = this;
+      let phone = that.login.phone;
+      let uservalid = that.login.uservalid;
+      if (!phone) {
+        that.Toast('手机号不能为空');
+        return false
+      }
+      if (phone.length != 11) {
+        that.Toast('手机号只能是11位');
+        return false
+      }
+      if (!globalCheckPhone(phone)) {
+        that.Toast('手机号格式不正确');
+        return false
+      }
+      if (!uservalid) {
+        that.Toast('图形验证码不能为空');
+        return false
+      }
+      if (uservalid.length != 4) {
+        that.Toast('图形验证码只能是4位');
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        phone: phone,
+        codeType: 1,
+        picId: this.valImgId,
+        picCode: uservalid,
+      };
+      let postdata = qs.stringify(param);
+      GetPhoneVFCode(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.Toast('短信验证码已发送', 'success');
+          that.calcTime();
+        } else {
+          that.Toast(json.Memo);
+        }
+      })
+    },
+    calcTime() {
+      // 短信倒数计时
+      let countdown = 60;
+      let that = this;
+      //设置button效果,开始计时
+      that.getValidSmsState = true;
+      that.btnText = countdown + "S"
+      //启动计时器,1秒执行一次
+      let timer = setInterval(function () {
+        if (countdown == 0) {
+          clearInterval(timer);//停止计时器
+          that.getValidSmsState = false;
+          that.btnText = "重新发送"
+        } else {
+          countdown--;
+          that.btnText = countdown + "S"
+        }
+      }, 1000);
+    },
+    clearLogin() {
+      this.login.username = '';
+      this.login.userpwd = '';
+      this.login.uservalid = '';
+      this.getValImgSrc();
+    },
+    // 点击验证码切换
+    getValImgSrc() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        width: 100,
+        height: 30,
+        noiseCount: 1,
+        length: 4,
+        source: 123456789,
+      };
+      let postdata = qs.stringify(param);
+      GenVerifyPic(postdata).then(res => {
+        let json = res;
+        that.valImgSrc = json.Pic;
+        that.valImgId = json.Id;
+      })
+    },
+    // pwd登录
+    pwdLoginBtn() {
+      let that = this;
+      let phone = this.login.phone;
+      let userpwd = this.login.userpwd;
+      // 重置验证码超时
+      that.overtime = new Date();
+      if (!that.globalValid(phone, 10, 12, '手机号', that)) return;
+      if (!that.globalValid(userpwd, 5, 7, '短信验证码', that)) return;
+      this.loginInfo();
+    },
+    // 校验内容长度
+    globalValid(data, mins, maxs, text, that) {
+      let thisVal = data;
+      let thisLeng = thisVal.length;
+      let min = parseInt(mins);
+      let max = parseInt(maxs);
+      let dispalyMin = min + 1;
+      if (thisVal == '') {
+        this.Toast(text + ' ' + '不能为空');
+        return false
+      } else if (thisLeng <= min) {
+        this.Toast(text + '最少' + dispalyMin + '字符');
+        return false
+      } else if (thisLeng > max) {
+        this.Toast(text + '超过限制长度');
+        return false
+      } else {
+        return true
+      }
+    },
+    // pwd登陆
+    loginInfo: function () {
+      const that = this;
+      let current = new Date();
+      let betweenTime = current - that.overtime;
+      let s = 120;
+      if (betweenTime > s * 1000) {
+        that.changeValImg();
+        that.$toast.message('验证码已超时,请重新输入');
+        return false
+      }
+      let param = {
+        phone: that.login.phone,
+        code: that.login.userpwd,
+        channel: 3
+      };
+      let postdata = qs.stringify(param);
+      PhoneSignIn(postdata).then(res => {
+        if (res.Code == 0) {
+          that.res = res.Rs;
+          // 使用token做免校验登陆
+          localStorage.token = res.Rs.token;
+          // 如果是wx登陆就执行绑定操作
+          let from = this.$route.query.from;//获取来源
+          if (from != 'app') {
+            that.bindWx();
+          }
+
+          // 607862e8828013be90c2ccb78468b43a
+          // test
+          that.$router.push({path: '/'});
+        } else {
+          this.getValImgSrc();
+          if (res.Code == 10005) {
+            that.$refs.userpwd.value = '';
+            that.Toast('密码错误,请重新输入');
+          } else {
+            that.Toast(res.Memo + ',错误代码:' + res.Code);
+            that.form.valid = '';
+          }
+        }
+      })
+    },
+    bindWx() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        code: localStorage.code,
+      };
+      let postdata = qs.stringify(param);
+      WXBind(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // that.$router.push({path: '/'});
+        } else {
+          // that.Toast(res.Memo + ',错误代码:' + res.Code);
+        }
+      })
+    },
+    getUserInfo(token) {
+      let that = this;
+      let param = {
+        token: token,
+      };
+      let postdata = qs.stringify(param);
+      testSelect(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          var userLevel = json.Rs.Rolesname;
+          localStorage.userLevel = userLevel;
+          localStorage.comId = json.Rs.Comid;
+          localStorage.Insname = json.Rs.Insname;
+          that.$router.push({path: '/'});
+        } else {
+          that.$toast.message(json.Memo);
+        }
+      })
+    }
+  },
+  components: {}
+}
+</script>
+
+<style scoped>
+#skin-blur-violate {
+  position: relative;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #3B3B3B;
+  background: url("../static/images/login/bg.png") top center no-repeat;
+  background-size: 100% 100%;
+}
+
+#login {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+#login .box {
+  margin: 0 auto;
+  position: inherit;
+  margin-top: 20px;
+  border-radius: 9px;
+  padding: 20px 20px;
+}
+
+h1 {
+  color: #FFA200;
+  font-size: 30px;
+}
+
+header p {
+  font-size: 14px;
+  color: #7B7B7B;
+}
+
+#login header {
+  text-align: center;
+  margin-top: 15%;
+}
+
+#box-login h2 {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-bottom: 20px;
+  text-align: center;
+  font-size: 24px;
+  color: #fff;
+}
+
+#tableBordered {
+  margin: 0;
+  padding: 0;
+}
+
+#tableBordered h5 {
+  margin: 0;
+  text-align: center;
+  padding: 0;
+}
+
+#login .box {
+  margin: 0 auto;
+  position: inherit;
+  margin-top: 20px;
+  border-radius: 9px !important;
+}
+
+#login header {
+  text-align: center;
+  margin-top: 15%;
+}
+
+#tableBordered {
+  margin: 0;
+  padding: 0;
+}
+
+#tableBordered h5 {
+  margin: 0;
+  text-align: center;
+  padding: 0;
+}
+
+#imgValidcode {
+  position: relative;
+  float: right;
+  /*bottom: 54px;*/
+  /*width: 100px;*/
+  width: 30%;
+  height: 50px;
+  background: #eee;
+}
+
+.login_btn {
+  width: 100%;
+  height: 50px;
+  line-height: 50px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 42px;
+  background: #E75296;
+  color: #fff;
+  font-size: 14px;
+  text-align: center;
+  border: none;
+  padding: 0;
+  font-size: 24px;
+  margin-bottom: 3%;
+}
+
+.clear_btn {
+  width: 100%;
+  height: 40px;
+  line-height: 40px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: rgba(255, 255, 255, 0.32);
+  color: #FFCC00;
+  font-size: 14px;
+  text-align: center;
+  border: none;
+  padding: 0;
+}
+
+header p {
+  margin-top: 10px;
+}
+
+#login .login-control {
+  width: 100%;
+  height: 50px;
+  line-height: 50px;
+  background: rgba(255, 255, 255, 0.4);
+  margin-bottom: 3px;
+  text-indent: 10px;
+  border: none;
+
+}
+
+#login .login-control::placeholder {
+  color: #000000;
+  font-size: 16px;
+}
+
+#logo {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10%;
+  margin-bottom: 10px;
+}
+
+.rowHeight {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  height: 50px;
+  margin-bottom: 3px;
+}
+
+#getValidSms {
+  /*width: 100px;*/
+  width: 30%;
+  height: 50px;
+  background: #fff;
+  border: 1px solid #fff;
+  opacity: 0.6;
+  position: relative;
+  /*bottom: 55px;*/
+  float: right;
+  text-align: center;
+  color: #E75296;
+  line-height: 20px;
+  font-size: 12px;
+  min-width: 30px;
+}
+
+#login .login_valid {
+  /*width: 173px;*/
+  width:65%;
+  float: left;
+}
+
+#login .login_pwd {
+  width: 173px;
+  float: left;
+}
+
+@media only screen and (max-width: 640px) {
+
+}
+
+@media only screen and (max-width: 480px) {
+  #login .login_valid {
+    /*width: 195px;*/
+    width:65%;
+  }
+
+  #login .login_pwd {
+    /*width: 195px;*/
+    width:65%;
+  }
+}
+
+@media only screen and (max-width: 414px) {
+  #login .login_valid {
+    width:65%;
+    /*width: 223px;*/
+  }
+
+  #login .login_pwd {
+    /*width: 223px;*/
+    width:65%;
+  }
+}
+
+@media only screen and (max-width: 400px) {
+
+  #login .login_valid {
+    width:65%;
+    /*width: 218px;*/
+  }
+
+  #login .login_pwd {
+    /*width: 218px;*/
+    width:65%;
+  }
+
+  #getValidSms {
+    font-size: 13px;
+  }
+}
+
+@media only screen and (max-width: 375px) {
+  #login .login_valid {
+    /*width: 190px;*/
+    width:65%;
+  }
+
+  #login .login_pwd {
+    /*width: 190px;*/
+    width:65%;
+  }
+
+  #getValidSms {
+    font-size: 14px;
+  }
+}
+
+@media only screen and (max-width: 360px) {
+  #login .login_valid {
+    /*width: 160px;*/
+    width:65%;
+  }
+
+  #login .login_pwd {
+    /*width: 160px;*/
+    width:65%;
+  }
+
+  #getValidSms {
+    font-size: 14px;
+  }
+}
+
+@media only screen and (max-width: 320px) {
+  #login .login_valid {
+    /*width: 144px;*/
+    width:65%;
+  }
+
+  #login .login_pwd {
+    width:65%;
+    /*width: 144px;*/
+  }
+
+  #getValidSms {
+    font-size: 12px;
+  }
+}
+
+
+</style>

BIN
online/src/static/images/login/bg2.png


BIN
online/src/static/images/login/head.png


+ 4 - 2
pc/src/Global.js

@@ -342,7 +342,7 @@ turnClassResToOption = function (data) {
 }
 
 turnShopResToOption = function (data) {
-    if (!data) return false
+    if (!data) return false;
     let ids = data.map(item => {
         return {
             label: item.ShopName,
@@ -351,7 +351,9 @@ turnShopResToOption = function (data) {
         }
     })
     return ids
-}
+};
+
+
 
 turnStdToOption = function (data) {
     if (!data) return false

+ 7 - 0
pc/src/api/getApiRes.js

@@ -868,3 +868,10 @@ export function AcrossUserSimpleQuery(postdata) {
     let url = headapi + 'v1/User/AcrossUserSimpleQuery ';
     return getApiBasic(url, postdata);
 }
+
+// 2021/02/02
+// 查询演示设备
+export function QueryDemoVenueEquip(postdata) {
+    let url = headbpi + 'v1/Shop/QueryDemoVenueEquip ';
+    return getApiBasic(url, postdata);
+}

+ 16 - 14
pc/src/components/levelIcon.vue

@@ -1,5 +1,5 @@
 <template>
-    <div  :class="[{'levelIconTV':true},{'levelIconTest':true},{'levelIcon':true}]">
+    <div :class="[{'levelIconTV':true},{'levelIconTest':true},{'levelIcon':true}]">
         <ul>
             <li>
           <span class="cube">
@@ -50,29 +50,29 @@
 </template>
 
 <style scoped>
-    ul,li {
+    ul, li {
         list-style: none;
         margin: 0;
         padding: 0;
     }
+
     .levelIcon {
-      width: 100%;
-      overflow: hidden;
-      display: block;
-      margin: 0 auto;
-      height: 5rem;
+        width: 85%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 5rem;
     }
+
     .levelIconTest {
 
     }
+
     .levelIconTV {
-      /*position: absolute;*/
-      /*bottom: 0.1rem;*/
-      /*padding-bottom: 5px;*/
     }
 
     .levelIcon ul {
-        width: 96%;
+        width: 90%;
         height: 100%;
         overflow: hidden;
         display: block;
@@ -185,8 +185,8 @@
 
     .levelIcon li:nth-child(4) em {
         background: rgba(186, 204, 1, 0.16);
-        border: 1px solid #DFB200 ;
-        box-shadow: 0px 0px 5px #DFB200 ;
+        border: 1px solid #DFB200;
+        box-shadow: 0px 0px 5px #DFB200;
     }
 
     .levelIcon li:nth-child(5) em {
@@ -230,14 +230,16 @@
         margin-left: 3%;
         float: left;
     }
+
     /*pc part */
     .levelIcon {
         padding-top: 10px;
         padding-bottom: 10px;
-        background: #666;
     }
+
     .levelIcon li span div {
         padding-top: 15px;
     }
+
     /*pc part */
 </style>

+ 5 - 5
pc/src/components/power.vue

@@ -17,19 +17,19 @@
     .powerContainer {
         float: right!important;
         color: #fff;
-        font-size: 0.23rem;
-        width: 0.55rem!important;
+        font-size:1rem;
+        width: 3rem!important;
         overflow: hidden;
     }
     .powerContainer img {
-        width: 0.33rem;
+        width:2rem;
         line-height: 0.3rem;
     }
     .powerContainer span {
         display: inline-block;
-        line-height: 0.2rem;
+        line-height: 1rem;
     }
     .powerContainer em {
-        font-size: 0.15rem;
+        font-size: 1rem;
     }
 </style>

+ 267 - 0
pc/src/components/userRank.vue

@@ -0,0 +1,267 @@
+<template>
+    <div class="rankContainer">
+        <el-row :gutter="20">
+            <!--卡路里-->
+            <el-col :span="12">
+                <!--          只显示前8个-->
+                <li v-for="(s,i) in students.CalSort" v-if="i <= 7">
+                    <div
+                            :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
+                        <div class="head">
+                            <img :src="s.Head" class="headImg" v-if="s.Head">
+                            <img src="../static/img/people/flyhead.png" class="headImg" alt="" v-if="!s.Head">
+                            <img src="../static/img/rank/king1.svg" class="king" alt="" v-if="i == 0">
+                            <img src="../static/img/rank/king2.svg" class="king" alt="" v-if="i == 1">
+                            <img src="../static/img/rank/king3.svg" class="king" alt="" v-if="i == 2">
+                        </div>
+                        <div class="name">
+                            NO.{{ i + 1 }} {{ s.Name }}
+                        </div>
+                        <div class="score">
+                            {{ s.Cle|fmtInt }}
+                            <em>千卡</em>
+                        </div>
+                        <div class="record">
+                            <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
+                                 v-if="s.IsNewUser ==0 && s.IsBreaking == 1">
+                        </div>
+                    </div>
+                </li>
+            </el-col>
+            <!--CK-->
+            <el-col :span="12">
+                <li v-for="(s,i) in students.CkSort" v-if="i <= 7">
+                    <div
+                            :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
+                        <div class="head">
+                            <img :src="s.Head" class="headImg" v-if="s.Head">
+                            <img src="../static/img/people/flyhead.png" class="headImg" alt="" v-if="!s.Head">
+                            <img src="../static/img/rank/king1.svg" class="king" alt="" v-if="i == 0">
+                            <img src="../static/img/rank/king2.svg" class="king" alt="" v-if="i == 1">
+                            <img src="../static/img/rank/king3.svg" class="king" alt="" v-if="i == 2">
+                        </div>
+                        <div class="name">
+                            NO.{{ i + 1 }} {{ s.Name }}
+                        </div>
+                        <div class="score">
+                            {{ s.Ck|fmtFloat }}
+                            <em>CK</em>
+                        </div>
+                        <div class="record">
+                            <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
+                                 v-if="s.IsNewUser ==0 && s.IsBreaking == 1">
+                        </div>
+                    </div>
+                </li>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+    // import {
+    //     ClassUserRank
+    // } from '@/api/getApiRes'
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                students: {
+                    CkSort: [],
+                    CalSort: [],
+                },
+                rankTimer: null,
+            }
+        },
+        props: ['rankInfo'],
+        watch: {
+            rankInfo: {
+                handler(newName, oldName) {
+                    let that = this;
+                    if (newName) {
+                        // 排序
+                        let CkSort = that.deepClone(newName);
+                        that.students.CkSort = CkSort.sort(function (a, b) {
+                            return b.Ck - a.Ck;
+                        });
+                        let CalSort = that.deepClone(newName);
+                        that.students.CalSort = CalSort.sort(function (a, b) {
+                            return b.Cle - a.Cle;
+                        });
+                    } else {
+                        this.students.CkSort = [];
+                        this.students.CalSort = [];
+                    }
+                },
+                deep: true,
+                immediate: true
+            }
+        },
+        methods:{
+            // 深拷贝
+            deepClone(obj) {
+                let _obj = JSON.stringify(obj),
+                    objClone = JSON.parse(_obj);
+                return objClone
+            }
+    },
+        filters: {
+            fmtNum(val) {
+                if (val == 0) {
+                    return '--'
+                } else {
+                    if (parseInt(val) < 0) return 0;
+                    if (parseInt(val) > 0) return val
+                }
+            },
+            fmtFloat(val) {
+                if (val == 0) {
+                    return '0.0'
+                } else {
+                    return parseFloat(val).toFixed(1);
+                }
+            },
+            fmtInt(val) {
+                if (val == 0) {
+                    return '0'
+                } else {
+                    return parseInt(val);
+                    // return parseFloat(val).toFixed(3);
+                }
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    .rankContainer {
+        width: 100%;
+        overflow: visible;
+        display: block;
+        margin: 0 auto;
+        padding-top: 1rem;
+    }
+
+    li {
+        width: 100%;
+        height: 4rem;
+        display: block;
+        margin: 0 auto;
+        overflow: visible;
+    }
+
+    li .rows {
+        width: 100%;
+        height: 3rem;
+        /*background: #ee191d;*/
+        border-radius: 250rem;
+        overflow: visible;
+        display: block;
+        margin: 0 auto;
+        margin-top: 0.15rem;
+    }
+
+    li .head {
+        width: 3rem;
+        height: 3rem;
+        float: left;
+        margin-left: 0rem;
+        margin-top: 0.15rem;
+        overflow: visible;
+    }
+
+    li .head .headImg {
+        width: 2.8rem;
+        height: 2.8rem;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        border: 2px solid #fff;
+        border-radius: 33rem;
+    }
+
+    li .head .king {
+        position: relative;
+        top: -4rem;
+        left: -0.2rem;
+        width: 2rem;
+        height: 2rem;
+        float: left;
+    }
+
+    li .name {
+        font-weight: normal;
+        font-size: 1.5rem;
+        text-align: left;
+        color: #fff;
+        float: left;
+        margin-left:1rem;
+        line-height: 3rem;
+    }
+
+    li .record {
+        float: right;
+    }
+
+    li .record img {
+        position: relative;
+        top: -0rem;
+        width: 1.2rem;
+    }
+
+    li .score {
+        font-weight: normal;
+        font-size: 1.5rem;
+        color: #fff;
+        float: right;
+        margin-right: 1rem;
+        line-height: 3rem;
+        text-align: right;
+    }
+
+    li .score em {
+        font-size:1rem;
+    }
+
+    .row_0 {
+        background: rgba(238, 25, 29, 0.75);
+    }
+
+    .row_1 {
+        background: rgba(244, 76, 31, 0.75);
+    }
+
+    .row_2 {
+        background: rgba(242, 182, 23, 0.75);
+    }
+
+    .row_3 {
+        background: rgba(112, 238, 21, 0.75);
+    }
+
+    .row_4 {
+        background: rgba(11, 253, 45, 0.75);
+    }
+
+    .row_5 {
+        background: rgba(1, 228, 182, 0.75);
+    }
+
+    .row_6 {
+        background: rgba(0, 207, 230, 0.75);
+    }
+
+    .row_7 {
+        background: rgba(4, 209, 252, 0.75);
+    }
+
+    .tips {
+        position: absolute;
+        right: 3%;
+        top: 1rem;
+        font-size: 0.4rem;
+        color: #fff;
+    }
+
+</style>

+ 7 - 0
pc/src/static/img/rank/king1.svg

@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="57.582" height="55.185" viewBox="0 0 57.582 55.185">
+  <g id="皇冠" transform="translate(409.593 731.711) rotate(-30)">
+    <path id="路径_140" data-name="路径 140" d="M43.035-811.229a1.469,1.469,0,0,1,1.052.4,1.47,1.47,0,0,1,.463,1.025v.034a.466.466,0,0,1-.011.136L41.054-786.1a2.854,2.854,0,0,1,.029-.536,4.466,4.466,0,0,1-2.854,3.573,1.455,1.455,0,0,1,.377-.1c-3.249,1.2-9.552,2.01-16.8,1.968-7.192-.042-13.438-.893-16.6-2.131a1.879,1.879,0,0,1,.395.118,4.438,4.438,0,0,1-2.755-3.625l.013.27L.012-810.326A.686.686,0,0,1,0-810.488a1.462,1.462,0,0,1,.483-1.021,1.462,1.462,0,0,1,1.066-.372,1.223,1.223,0,0,1,.726.2L12.4-802.3l8.174-15.816a2.065,2.065,0,0,1,1.862-1.072,2.029,2.029,0,0,1,1.652.84l7.864,16.337L42-810.823l.047-.047a1.338,1.338,0,0,1,.98-.359Z" transform="translate(0 0)" fill="#fed530"/>
+    <path id="路径_141" data-name="路径 141" d="M310.32-451.958a8.9,8.9,0,0,0-9.019,8.773,8.9,8.9,0,0,0,8.773,9.019,8.9,8.9,0,0,0,9.019-8.773h0A8.9,8.9,0,0,0,310.32-451.958Z" transform="translate(-287.49 -350.578)" fill="#504312" opacity="0.67"/>
+    <text id="_1" data-name="1" transform="translate(18.015 -787.737)" fill="#f4cd38" font-size="15" font-family="Roboto-Regular, Roboto" letter-spacing="-0.05em"><tspan x="0" y="0">1</tspan></text>
+  </g>
+</svg>

+ 7 - 0
pc/src/static/img/rank/king2.svg

@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="57.582" height="55.185" viewBox="0 0 57.582 55.185">
+  <g id="皇冠" transform="translate(409.593 731.711) rotate(-30)">
+    <path id="路径_140" data-name="路径 140" d="M43.035-811.229a1.469,1.469,0,0,1,1.052.4,1.47,1.47,0,0,1,.463,1.025v.034a.466.466,0,0,1-.011.136L41.054-786.1a2.854,2.854,0,0,1,.029-.536,4.466,4.466,0,0,1-2.854,3.573,1.455,1.455,0,0,1,.377-.1c-3.249,1.2-9.552,2.01-16.8,1.968-7.192-.042-13.438-.893-16.6-2.131a1.879,1.879,0,0,1,.395.118,4.438,4.438,0,0,1-2.755-3.625l.013.27L.012-810.326A.686.686,0,0,1,0-810.488a1.462,1.462,0,0,1,.483-1.021,1.462,1.462,0,0,1,1.066-.372,1.223,1.223,0,0,1,.726.2L12.4-802.3l8.174-15.816a2.065,2.065,0,0,1,1.862-1.072,2.029,2.029,0,0,1,1.652.84l7.864,16.337L42-810.823l.047-.047a1.338,1.338,0,0,1,.98-.359Z" transform="translate(0 0)" fill="#bed8ea"/>
+    <path id="路径_141" data-name="路径 141" d="M310.32-451.958a8.9,8.9,0,0,0-9.019,8.773,8.9,8.9,0,0,0,8.773,9.019,8.9,8.9,0,0,0,9.019-8.773h0A8.9,8.9,0,0,0,310.32-451.958Z" transform="translate(-287.49 -350.578)" fill="#184f70" opacity="0.67"/>
+    <text id="_2" data-name="2" transform="translate(18.015 -787.737)" fill="#bed8ea" font-size="15" font-family="Roboto-Regular, Roboto" letter-spacing="-0.05em"><tspan x="0" y="0">2</tspan></text>
+  </g>
+</svg>

+ 8 - 0
pc/src/static/img/rank/king3.svg

@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="57.582" height="55.185" viewBox="0 0 57.582 55.185">
+  <g id="皇冠" transform="translate(409.593 731.711) rotate(-30)">
+    <path id="路径_140" data-name="路径 140" d="M43.035-811.229a1.469,1.469,0,0,1,1.052.4,1.47,1.47,0,0,1,.463,1.025v.034a.466.466,0,0,1-.011.136L41.054-786.1a2.854,2.854,0,0,1,.029-.536,4.466,4.466,0,0,1-2.854,3.573,1.455,1.455,0,0,1,.377-.1c-3.249,1.2-9.552,2.01-16.8,1.968-7.192-.042-13.438-.893-16.6-2.131a1.879,1.879,0,0,1,.395.118,4.438,4.438,0,0,1-2.755-3.625l.013.27L.012-810.326A.686.686,0,0,1,0-810.488a1.462,1.462,0,0,1,.483-1.021,1.462,1.462,0,0,1,1.066-.372,1.223,1.223,0,0,1,.726.2L12.4-802.3l8.174-15.816a2.065,2.065,0,0,1,1.862-1.072,2.029,2.029,0,0,1,1.652.84l7.864,16.337L42-810.823l.047-.047a1.338,1.338,0,0,1,.98-.359Z" transform="translate(0 0)" fill="#f2c987"/>
+    <path id="路径_141" data-name="路径 141" d="M310.32-451.958a8.9,8.9,0,0,0-9.019,8.773,8.9,8.9,0,0,0,8.773,9.019,8.9,8.9,0,0,0,9.019-8.773h0A8.9,8.9,0,0,0,310.32-451.958Z" transform="translate(-287.49 -350.578)" fill="#65420a" opacity="0.67"/>
+    <text id="_3_" data-name="3
+" transform="translate(18.015 -787.737)" fill="#f2c987" font-size="15" font-family="Roboto-Regular, Roboto" letter-spacing="-0.05em"><tspan x="0" y="0">3</tspan><tspan font-family="Roboto-Bold, Roboto" font-weight="700"><tspan x="0" y="1"></tspan></tspan></text>
+  </g>
+</svg>

Plik diff jest za duży
+ 3 - 0
pc/src/static/img/rank/recordIcon.svg


+ 765 - 650
pc/src/views/demoDevice.vue

@@ -1,664 +1,779 @@
 <template>
-  <div class="context">
-    <el-page-header @back="goBack" content="演示设备"></el-page-header>
-    <div class="panel">
-      <br>
-      <h5> {{regionName}}</h5>
-    </div>
-    <div class="change">
-      <el-button @click="addMember" type="primary">新增演示设备</el-button>
-      <el-button @click="editList">编辑演示设备</el-button>
-      <!--<el-button @click="delList" type="danger">删除区域设备</el-button>-->
-    </div>
-    <div class="table">
-      <el-table
-          :data="tableData"
-          border
-          is-horizontal-resize
-          :default-sort="{prop: 'date', order: 'descending'}"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-          class=""
-          @selection-change="handleSelectionChange" @current-change="clickChange"
-
-      >
-        <el-table-column label="选择" width="55">
-          <template slot-scope="scope">
-            <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-          </template>
-        </el-table-column>
-        <el-table-column
-            type="index"
-            label="序号"
-            align="center"
-            width="50">
-        </el-table-column>
-        <el-table-column
-            prop="EqSn"
-            label="序列号"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="Version"
-            label="版本"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="EquipType"
-            label="类型"
-            sortable
-        >
-          <template slot-scope="scope">
-            <span v-if="scope.row.EquipType == 1">TVBox</span>
-            <span v-if="scope.row.EquipType == 2">BLEHub</span>
-            <span v-if="scope.row.EquipType == 3">演示设备</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="Status"
-            label="状态"
-            sortable
-        >
-          <!--1:启用  8:暂停  9:删除-->
-          <template slot-scope="scope">
-            <span v-if="scope.row.Status == 1" style="color: yellowgreen">启用</span>
-            <span v-if="scope.row.Status == 8" style="color: yellow">暂停</span>
-            <span v-if="scope.row.Status == 9" style="color: red">删除</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="address"
-            label="操作">
-          <template slot-scope="scope">
-            <!--<el-button type="success" @click="run(scope.row)" v-if="scope.row.Status == 8">开启</el-button>-->
-            <!--<el-button type="danger" @click="pause(scope.row)" v-if="scope.row.Status == 1">暂停</el-button>-->
-            <span v-if="scope.row.EquipType != 3" style="color: red">
-                        <el-button type="danger"  size="mini"
+    <div class="context">
+        <el-page-header @back="goBack" content="演示设备"></el-page-header>
+        <div class="panel">
+            <br>
+            <h5> {{regionName}}</h5>
+        </div>
+        <div class="change">
+            <el-button @click="addMember" type="primary">新增演示设备</el-button>
+            <el-button @click="editList">编辑演示设备</el-button>
+            <!--<el-button @click="delList" type="danger">删除演示设备</el-button>-->
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange" @current-change="clickChange"
+
+            >
+                <el-table-column label="选择" width="55">
+                    <template slot-scope="scope">
+                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        align="center"
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="EqSn"
+                        label="序列号"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Version"
+                        label="版本"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="ShopName"
+                        label="所属门店"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="SvName"
+                        label="所属区域"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="状态"
+                        sortable
+                >
+                    <!--1:启用  8:暂停  9:删除-->
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.Status == 1" style="color: yellowgreen">启用</span>
+                        <span v-if="scope.row.Status == 8" style="color: yellow">暂停</span>
+                        <span v-if="scope.row.Status == 9" style="color: red">删除</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="id"
+                        label="操作"
+                >
+                    <template slot-scope="scope">
+
+                        <!--<el-button type="success" v-if="scope.row.Status == 8" size="mini"-->
+                        <!--@click="pauseRow(scope.row,1)">-->
+                        <!--启用-->
+                        <!--</el-button>-->
+                        <!--<el-button type="warning" v-if="scope.row.Status == 1" size="mini"-->
+                        <!--@click="pauseRow(scope.row,8)">-->
+                        <!--禁用-->
+                        <!--</el-button>-->
+
+                        <el-button type="danger" size="mini"
                                    @click="pauseRowDel(scope.row)">
                             删除
                         </el-button>
-                      </span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
-    </div>
-    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-      <div class="dialogContent">
-        <div class="">
-          <el-form ref="form" :model="form" label-width="160px">
-            <el-form-item label="设备序列号">
-              <el-input v-model="form.eqSn "></el-input>
-            </el-form-item>
-            <el-form-item label="版本号">
-              <el-input v-model="form.version"></el-input>
-            </el-form-item>
-            <el-form-item label="设备类型">
-              <el-select v-model="form.equipType " placeholder="请选择">
-                <el-option
-                    v-for="item in options"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-form>
+                    </template>
+                </el-table-column>
+
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
         </div>
-      </div>
-      <div class="dialogFooter">
-        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
-        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-        </el-button>
-        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-      </div>
-    </el-dialog>
-  </div>
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+            <div class="dialogContent">
+                <div class="">
+                    <el-form ref="form" :model="form" label-width="160px">
+                        <el-form-item label="设备序列号">
+                            <el-input v-model="form.eqSn "></el-input>
+                        </el-form-item>
+                        <el-form-item label="版本号">
+                            <el-input v-model="form.version"></el-input>
+                        </el-form-item>
+                        <el-form-item label="店面列表">
+                            <el-select v-model="form.shopId"
+                                       @change="changeShopId"
+                            >
+                                <el-option
+                                        v-for="item in form.shopOptions"
+                                        :key="item.ShopID"
+                                        :label="item.ShopName"
+                                        :value="item.ShopID">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="区域列表">
+                            <el-select v-model="form.venveId">
+                                <el-option
+                                        v-for="item in form.venveOptions"
+                                        :key="item.SvId"
+                                        :label="item.Name"
+                                        :value="item.SvId">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-form>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
+                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+                </el-button>
+                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
-import Global from '../Global.js'
-import {
-  testTable,
-  ShopManagerStatusEdit,
-  QueryVenueEquip,
-  AddShopVenueEquip,
-  EditShopVenueEquip,
-  ShopVenueEquipEditStatus
-} from "../api/getApiRes";
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      regionName: '',
-      dialogVisible: false,
-      dialogMemberVisible: false,
-      dialogTitle: '新增区域设备',
-      // panel 配置项目
-      multipleSelection: [],
-      tableRadio: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        eqId: '',
-        eqSn: '',
-        name: '',
-        version: '',
-        userCode: '',
-        shopId: '',
-        btnType: 0,
-        equipType: 1,
-      },
-      options: [
-        {value: 1, label: 'TVBox'},
-        {value: 2, label: 'BLEHub'},
-        {value: 3, label: '演示设备'},
-      ],
-      shops: [],
-      tableData: [],
-      serachBtnStatus: false,
+    import Global from '../Global.js'
+    import {
+        QueryDemoVenueEquip,
+        ShopListQuery,
+        QueryShopVenue,
+        QueryVenueEquip,
+        AddShopVenueEquip,
+        EditShopVenueEquip,
+        ShopVenueEquipEditStatus
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                regionName: '',
+                dialogVisible: false,
+                dialogMemberVisible: false,
+                dialogTitle: '新增演示设备',
+                // panel 配置项目
+                multipleSelection: [],
+                tableRadio: [],
+                ShopList: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    eqId: '',
+                    eqSn: '',
+                    name: '',
+                    version: '',
+                    userCode: '',
+                    venveId: '',
+                    shopId: '',
+                    ServiceKey: '',
+                    ServiceId: '',
+                    btnType: 0,
+                    equipType: 1,
+                    shopOptions: [],
+                    venveOptions: [],
+                },
+                options: [
+                    {value: 1, label: 'TVBox'},
+                    {value: 2, label: 'BLEHub'},
+                    {value: 3, label: '演示设备'},
+                ],
+                shops: [],
+                tableData: [],
+                serachBtnStatus: false,
+            }
+        },
+        mounted() {
+            this.getShopListSelect();
+            this.getTableQuery();
+        },
+        methods: {
+            // 选择店铺后重新加载区域选择列表
+            changeShopId(i) {
+                let that = this;
+                let row = '';
+                that.ShopList.map(function (item) {
+                    if (parseInt(item.ShopID) == parseInt(i)) {
+                        row = item;
+                    }
+                });
+                that.getQueryShopVenue(row.ServiceKey, row.ServiceId);
+            },
+            // 获取店面列表
+            getShopListSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    shopId: localStorage.ServiceId,
+                };
+                let postdata = qs.stringify(param);
+                ShopListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        if (json.Rs == '') {
+                            that.$message.error('当前没有可选的店铺,请先在店面管理中添加店铺!');
+                            return false
+                        }
+                        that.form.shopOptions = json.Rs;
+                        that.ShopList = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                    }
+                })
+            },
+            // 获取区域列表
+            getQueryShopVenue(ServiceKey, ServiceId) {
+                let that = this;
+                this.form.ServiceKey = ServiceKey;
+                this.form.ServiceId = ServiceId;
+                that.loading = true;
+                let param = {
+                    key: ServiceKey,
+                    shopId: ServiceId,
+                };
+                let postdata = qs.stringify(param);
+                that.form.venveId = '';
+                QueryShopVenue(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.form.venveOptions = json.Rs;
+                        } else {
+                            that.form.venveOptions = []
+                        }
+                    } else {
+                        if (!localStorage.ServiceKey) {
+                            that.$message.error('还未与心率系统对接,请联系管理员');
+                        } else {
+                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                        }
+                    }
+                })
+            },
+            goBack() {
+                this.$router.push({
+                    path: '/region', query: {}
+                });
+            },
+            // 删除
+            pauseRowDel(row) {
+                let that = this;
+                let line = "";
+                that.ShopList.map(function (item) {
+                    console.log(item);
+                    if (parseInt(item.ServiceId) == parseInt(row.ShopID)) {
+                        line = item;
+                    }
+                });
+                console.log(row);
+                console.log(line);
+                let param = {
+                    key: line.ServiceKey,
+                    shopId: line.ServiceId,
+                    svId: row.SvId,
+                    eqId: row.EqId,
+                    status: 9,//1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
+                this.$confirm('此操作将永久删除该演示设备, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    ShopVenueEquipEditStatus(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的演示设备已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+            clearForm() {
+                // clear
+                this.form.eqSn = '';
+                this.form.version = '';
+                this.form.shopId = '';
+                this.form.venveId = '';
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 新增演示设备
+            addMember() {
+                this.clearForm();
+                this.dialogMemberVisible = true;
+                this.btnType = 0;
+                this.dialogTitle = '新增演示设备';
+                this.getShopListSelect();
+            },
+            clickChange(item) {
+                this.tableRadio = item
+            },
+            // 删除
+            delList() {
+                let that = this;
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let userId = this.tableRadio.Id;
+
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: this.$route.query.svId,
+                    eqId: this.tableRadio.EqId,
+                    status: 9,//1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
+
+                this.$confirm('此操作将永久删除该演示设备, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    ShopVenueEquipEditStatus(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的演示设备已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+            // 编辑
+            editList() {
+                let that = this;
+                this.clearForm();
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let row = this.tableRadio;
+                let line = '';
+                that.ShopList.map(function (item) {
+                    if (parseInt(item.ShopID) == parseInt(row.ShopID)) {
+                        that.form.shopId = parseInt(item.ServiceId);
+                        line = item;
+                    }
+                });
+                that.getQueryShopVenue(line.ServiceKey, line.ServiceId);
+
+                this.form.venveId = row.SvId;
+                this.form.userId = row.Id;
+                this.form.name = row.Name;
+                this.form.userCode = row.Usercode;
+                this.form.password = '';
+                this.form.phone = row.Phone;
+                this.form.eqId = row.EqId;
+                this.form.eqSn = row.EqSn.trim();
+                this.form.version = row.Version.trim();
+                this.form.equipType = row.EquipType;
+                this.form.memo = row.Memo;
+                this.form.adminType = row.AdminType;
+                this.dialogVisible = true;
+                this.dialogTitle = '编辑演示设备';
+                this.form.btnType = 1;
+                this.dialogMemberVisible = true
+            },
+            // 确认提交新增演示设备
+            confirmMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.eqSn) {
+                    this.$message.error('错了哦,设备序列号不能为空');
+                    return false
+                }
+                if (that.form.version.length > 10) {
+                    this.$message.error('错了哦,版本号字符不能超过10位');
+                    return false
+                }
+                if (!that.form.shopId) {
+                    this.$message.error('错了哦,所选商家不能为空');
+                    return false
+                }
+                if (!that.form.venveId) {
+                    this.$message.error('错了哦,所选区域不能为空');
+                    return false
+                }
+
+                let param = {
+                    key: this.form.ServiceKey,
+                    shopId: this.form.ServiceId,
+                    svId: this.form.venveId,
+                    eqSn: this.form.eqSn,
+                    version: this.form.version,
+                    equipType: 3,//1:TVBox 2:BLEHub 3:演示设备
+                };
+                let postdata = qs.stringify(param);
+                AddShopVenueEquip(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '所属设备添加成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                    }
+                })
+            },
+            confirmEditMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.eqSn) {
+                    this.$message.error('错了哦,设备序列号不能为空');
+                    return false
+                }
+                if (that.form.version.length > 10) {
+                    this.$message.error('错了哦,版本号字符不能超过10位');
+                    return false
+                }
+                let param = {
+                    key: this.form.ServiceKey,
+                    shopId: this.form.ServiceId,
+                    svId: this.form.venveId,
+                    eqId: this.form.eqId,
+                    eqSn: this.form.eqSn,
+                    version: this.form.version,
+                    equipType: 3,//1:TVBox 2:BLEHub 3:演示设备
+                };
+                let postdata = qs.stringify(param);
+                EditShopVenueEquip(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '演示设备信息编辑成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                    }
+                })
+            },
+            // 查询按钮
+            query() {
+                // 按钮倒计时
+                let that = this;
+                that.serachBtnStatus = true;
+                let totalTime = 2;
+                let clock = window.setInterval(() => {
+                    totalTime--;
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000);
+
+                this.getTableQuery();
+                this.$message.success('查询完毕');
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    // key: localStorage.ServiceKey,
+                    key: '73c845ca89d952074b36a5b18d961cac',
+                };
+                let postdata = qs.stringify(param);
+                QueryDemoVenueEquip(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                // that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return nonTfmtDate(column, 11);
+            },
+            // 暂停
+            pause(row) {
+                let that = this;
+                console.log(row);
+                this.$confirm('是否暂停设备' + row.EqSn + '?', '暂停操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+
+                    let param = {
+                        key: localStorage.ServiceKey,
+                        shopId: localStorage.ServiceId,
+                        svId: this.$route.query.svId,
+                        eqId: row.EqId,
+                        status: 8,//1:启用 8:暂停 9:删除
+                    };
+
+                    let postdata = qs.stringify(param);
+                    ShopVenueEquipEditStatus(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.EqSn + '暂停成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消暂停'
+                    });
+                });
+            },
+            // 开启
+            run(row) {
+                let that = this;
+                this.$confirm('是否开启设备' + row.EqSn + '?', '开启操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+
+                    let param = {
+                        key: localStorage.ServiceKey,
+                        shopId: localStorage.ServiceId,
+                        svId: this.$route.query.svId,
+                        eqId: row.EqId,
+                        status: 1,//1:启用 8:暂停 9:删除
+                    };
+
+                    let postdata = qs.stringify(param);
+                    ShopVenueEquipEditStatus(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.EqSn + '开启成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消开启'
+                    });
+                });
+            },
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'heartLog') {
+                    this.regionName = this.$route.query.name;
+                    this.getTableQuery();
+                }
+            },
+        },
     }
-  },
-  mounted() {
-    this.regionName = this.$route.query.name;
-    this.getTableQuery();
-  },
-  methods: {
-    goBack() {
-      this.$router.push({
-        path: '/region', query: {}
-      });
-    },
-    // 删除
-    pauseRowDel(row) {
-      let that = this;
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: row.SvId,
-        eqId: row.EqId,
-        status: 9,//1:启用 8:暂停 9:删除
-      };
-      let postdata = qs.stringify(param);
-      this.$confirm('此操作将永久删除该区域设备, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的区域设备已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    clearForm() {
-      // clear
-      this.form.name = '';
-      this.form.userCode = '';
-      this.form.shopId = '';
-      this.form.eqSn = '';
-      this.form.version = '';
-      this.form.equipType = 1;
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 新增区域设备
-    addMember() {
-      this.clearForm();
-      this.dialogMemberVisible = true;
-      this.btnType = 0;
-      this.dialogTitle = '新增区域设备'
-    },
-    clickChange(item) {
-      this.tableRadio = item
-    },
-    // 删除
-    delList() {
-      let that = this;
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let userId = this.tableRadio.Id;
-
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: this.$route.query.svId,
-        eqId: this.tableRadio.EqId,
-        status: 9,//1:启用 8:暂停 9:删除
-      };
-      let postdata = qs.stringify(param);
-
-      this.$confirm('此操作将永久删除该区域设备, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的区域设备已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    // 编辑
-    editList() {
-      let that = this;
-      this.clearForm();
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.shopid = row.ShopId;
-      this.form.userId = row.Id;
-      this.form.name = row.Name;
-      this.form.userCode = row.Usercode;
-      this.form.password = '';
-      this.form.phone = row.Phone;
-      this.form.eqId = row.EqId;
-      this.form.eqSn = row.EqSn.trim();
-      this.form.version = row.Version.trim();
-      this.form.equipType = row.EquipType;
-      this.form.memo = row.Memo;
-      this.form.adminType = row.AdminType;
-      this.dialogVisible = true;
-      this.dialogTitle = '编辑区域设备';
-      this.form.btnType = 1;
-      this.dialogMemberVisible = true
-    },
-    // 确认提交新增区域设备
-    confirmMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.eqSn) {
-        this.$message.error('错了哦,设备序列号不能为空');
-        return false
-      }
-      if (that.form.version.length > 10) {
-        this.$message.error('错了哦,版本号字符不能超过10位');
-        return false
-      }
-
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: this.$route.query.svId,
-        eqSn: this.form.eqSn,
-        version: this.form.version,
-        equipType: this.form.equipType,
-      };
-      let postdata = qs.stringify(param);
-      AddShopVenueEquip(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '所属设备添加成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    confirmEditMember() {
-      let that = this;
-      console.log(that.form.version.length);
-      // checkNum
-      if (!that.form.eqSn) {
-        this.$message.error('错了哦,设备序列号不能为空');
-        return false
-      }
-      if (that.form.version.length > 10) {
-        this.$message.error('错了哦,版本号字符不能超过10位');
-        return false
-      }
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: this.$route.query.svId,
-        eqId: this.form.eqId,
-        eqSn: this.form.eqSn,
-        version: this.form.version,
-        equipType: this.form.equipType,
-      };
-      let postdata = qs.stringify(param);
-      EditShopVenueEquip(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '区域设备信息编辑成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 查询按钮
-    query() {
-      // 按钮倒计时
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2;
-      let clock = window.setInterval(() => {
-        totalTime--;
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000);
-
-      this.getTableQuery();
-      this.$message.success('查询完毕');
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: this.$route.query.svId,
-      };
-      let postdata = qs.stringify(param);
-      QueryVenueEquip(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData = json.Rs;
-            that.recordsTotal = json.Rs.length;
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 每页显示数量
-    handleSizeChange() {
-      let that = this;
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-      that.draw = that.pageination.pageItem;
-      that.getTableQuery();
-    },
-    // 翻页
-    pageChange(pageIndex) {
-      let that = this;
-      // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
-      // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
-      // 容器
-      let tables = [];
-      for (var i = index; i < nums; i++) {
-        if (that.allTableData[i]) {
-          tables.push(that.allTableData[i])
-        }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      return nonTfmtDate(column, 11);
-    },
-    // 暂停
-    pause(row) {
-      let that = this;
-      console.log(row);
-      this.$confirm('是否暂停设备' + row.EqSn + '?', '暂停操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-
-        let param = {
-          key: localStorage.ServiceKey,
-          shopId: localStorage.ServiceId,
-          svId: this.$route.query.svId,
-          eqId: row.EqId,
-          status: 8,//1:启用 8:暂停 9:删除
-        };
-
-        let postdata = qs.stringify(param);
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.EqSn + '暂停成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消暂停'
-        });
-      });
-    },
-    // 开启
-    run(row) {
-      let that = this;
-      this.$confirm('是否开启设备' + row.EqSn + '?', '开启操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-
-        let param = {
-          key: localStorage.ServiceKey,
-          shopId: localStorage.ServiceId,
-          svId: this.$route.query.svId,
-          eqId: row.EqId,
-          status: 1,//1:启用 8:暂停 9:删除
-        };
-
-        let postdata = qs.stringify(param);
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.EqSn + '开启成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消开启'
-        });
-      });
-    },
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'heartLog') {
-        this.regionName = this.$route.query.name;
-        this.getTableQuery();
-      }
-    },
-  },
-}
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
-
-.context {
-  height: 770px;
-  overflow-y: scroll;
-
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-  padding-bottom: 60px;
-}
-
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
-
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-
-.change button {
-  float: left;
-}
-
-.change button.pull-right {
-  float: right;
-}
-
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
-
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
-
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
-
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
-
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
-
-/deep/ .el-date-editor .el-range__icon {
-  line-height: 22px;
-}
-
-.panel /deep/ .el-date-editor .el-range-separator {
-  line-height: 22px;
-}
-
-/deep/ .el-select {
-  width: 100%;
-}
-.panel h5 {
-  font-size: 24px;
-}
-
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .panel /deep/ .el-date-editor--daterange {
-    width: 100%;
-  }
-}
+    @import "../assets/css/panel.css";
+
+    .context {
+        height: 770px;
+        overflow-y: scroll;
+
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+        padding-bottom: 60px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .el-date-editor .el-range__icon {
+        line-height: 22px;
+    }
+
+    .panel /deep/ .el-date-editor .el-range-separator {
+        line-height: 22px;
+    }
+
+    /deep/ .el-select {
+        width: 100%;
+    }
+
+    .panel h5 {
+        font-size: 24px;
+    }
+
+    /*ipad only*/
+    @media only screen and (max-width: 1366px) {
+        .panel /deep/ .el-date-editor--daterange {
+            width: 100%;
+        }
+    }
 
 </style>

Plik diff jest za duży
+ 275 - 227
pc/src/views/online.vue


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików