heyujie
2022-06-17 6c1e43d919b199a47f1fc67831ed4b8f3ab7788b
src/pages/desktop/index/components/Desktop.vue
@@ -95,7 +95,7 @@
        <span class="ver-text">版本:</span>{{ versionName }}
      </div>
      <div class="ver">
        <span class="ver-text">状态:</span>{{ versionState }}
        <span class="ver-text">状态:</span>尚未激活
      </div>
      <el-divider></el-divider>
      <div class="info" v-if="versionName == 'SmartAI正式版'">
@@ -157,7 +157,6 @@
      <!-- <el-divider></el-divider> -->
      <span slot="footer" class="dialog-footer">
        <!-- v-if="!snExpire && versionName != 'SmartAI正式版'" -->
        <div class="btns">
          <el-button
            v-if="!snExpire && versionName != 'SmartAI正式版'"
@@ -169,7 +168,7 @@
            class="cancel"
            v-if="snExpire && versionName != 'SmartAI正式版'"
            @click="$emit('quit')"
            >退出登录
            >退出登陆
          </el-button>
          <el-button class="ok" type="primary" @click="activateVersion"
            >激活</el-button
@@ -208,20 +207,25 @@
              <span>{{ item.orderMoney }} 元</span>
            </div>
            <div class="desc">
              <div>订单生成日期:{{ item.createTime }}</div>
              <div>产品名称:{{ prod.productName }}</div>
              <div>产品类型:{{ prod.productTypeName }}</div>
              <div>系统版本:{{ prod.edition }}</div>
              <div>通道数量:{{ prod.ChCount }}</div>
              <div>摄像机数量:{{ prod.cameraCount }}</div>
              <div>服务时长:{{ prod.serveYear }} 年</div>
              <div>授权数量:{{ prod.authCount }}</div>
              <div>起止服务时间 :{{ startAndEnd(item.createTime, prod.serveYear) }}</div>
            </div>
          </div>
        </div>
      </div>
      <div class="no-order-list" v-else>抱歉,没有查询到订单。</div>
      <span slot="footer" class="dialog-footer">
       <div class="btns">
        <div class="btns">
          <el-button class="cancel" @click="$emit('quit')">退出登录</el-button>
        <el-button class="ok" type="primary" @click="activeVerByOrd">激活</el-button>
       </div>
          <el-button class="ok" type="primary" @click="activeVerByOrd"
            >激活</el-button
          >
        </div>
      </span>
    </el-dialog>
  </div>
@@ -252,10 +256,10 @@
      showFreeVersion: false,
      activeDialog: false,
      countdown: 60,
      innerDialog: true,
      innerDialog: false,
      versionName: "",
      codeMsg: "获取验证码",
      versionState: "尚未激活",
      // versionState: ,
      secrectKey: "",
      curOrder: {},
      curProd: {},
@@ -264,7 +268,7 @@
      snExpire: false,
      timer: null,
      token: "",
      orderList: [],
      orderList: [ ],
      phone: {
        phoneNum: "",
        verifyCode: "",
@@ -281,6 +285,11 @@
    this.validateSn();
  },
  methods: {
    startAndEnd(createTime,serveYear){
      let year = createTime.split("-")[0]
      let endTime = parseInt(year) + serveYear + createTime.slice(4)
      return createTime + " - " + endTime
    },
    activeVerByOrd() {
      activeByOrder({
        token: this.token,
@@ -300,6 +309,7 @@
    validateSn() {
      getSN().then((res) => {
        this.snExpire = res.data.expire;
        this.activeDialog = res.data.expire
        this.showFreeVersion = res.data.sn == "" || res.data.expire;
        this.versionName = this.getVersionName(res.data.edition);
      });
@@ -674,6 +684,7 @@
  }
}
.el-dialog.my-order {
  border-radius: 24px;
  .el-dialog__body {
    padding: 22px 20px;
  }
@@ -681,7 +692,7 @@
    display: flex;
    justify-content: right;
    .cancel {
     width: 140px;
      width: 140px;
      height: 40px;
      cursor: pointer;
@@ -695,7 +706,7 @@
      justify-content: center;
    }
    .ok {
     width: 140px;
      width: 140px;
      height: 40px;
      cursor: pointer;
      border-radius: 20px;
@@ -710,14 +721,13 @@
    }
  }
  .tip {
        width: auto;
    /* height: 40px; */
    width: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 0 10px;
    border-radius: 5px;
    color: #5F5F5F;
    color: #5f5f5f;
    line-height: 20px;
    font-weight: bold;
    -ms-flex-align: center;
@@ -742,7 +752,7 @@
    height: 550px;
    overflow-y: auto;
    .order-card {
      height: 150px;
      // height: 150px;
      background: #fff;
      margin-bottom: 15px;
@@ -763,10 +773,10 @@
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        height: 110px;
        text-align: left;
        box-sizing: border-box;
        padding: 0 20px;
        box-sizing: border-box;    font-size: 13px;
        padding: 8px 20px;    line-height: 20px;
      }
    }
  }