ZZJ
2021-09-29 46b274e6b5d0bd7f2afe46a8adeac4faaa446dc9
src/pages/vindicate/views/updateSettings.vue
@@ -47,8 +47,14 @@
            <div class="desc desc-suc" v-if="!checking && !hasNewVersion">
              当前已经是最新版本
            </div>
            <div class="text-desc" v-if="hasNewVersion && !checking&& !upgrading">
              {{verText}}
            </div>
            <el-button
              v-if="hasNewVersion && !checking"
              v-if="hasNewVersion && !checking&&!upgrading"
              :loading="upgrading"
              type="primary"
              style="width: 150px"
@@ -56,21 +62,37 @@
              @click="upgradeNewVersion"
              >更新</el-button
            >
            <div class="text-desc" v-if="hasNewVersion && !checking&& !upgrading">
              {{verText}}
            </div>
          </div>
          <div class="upload-center" v-if="radio2 == '上传更新'">
            <div class="upload-info"><span class="icon iconfont">&#xe66e;</span> 上传安装软件</div>
            <div class="upload-top">
              <el-upload
              <div class="upload-container">
               <div class="upload-fail " v-if="upStatus===0">
                 <i class="icon iconfont upload-icon">
                &#xe6f1;
               </i>
               <p>上传失败,请重新上传。</p>
               </div>
               <div class="upload-success"  v-if="upStatus===1">
               <i class="icon iconfont upload-icon">
                &#xe6f1;
               </i>
               <p>上传成功,请点击更新按钮开始更新。</p>
               </div>
               <el-upload
                class="upload-demo"
                drag
                action
                v-show="!shengjiing"
                :http-request="uploadPkg"
                :limit="1"
              >
               >
                <i class="el-icon-upload"></i>
                <div
                  class="el-upload__text"
@@ -83,6 +105,8 @@
                <div class="el-upload__tip" slot="tip"></div>
              </el-upload>
              </div>
              <span
                class="icon iconfont spin-bg"
                :class="shengjiing ? 'spin-bg-rot' : ''"
@@ -91,6 +115,7 @@
              >
              <div class="desc" v-if="shengjiing">正在进行更新……</div>
              <el-button
                v-if="!upgrading"
                type="primary"
                style="width: 150px; font-size: 15px"
                @click="upgrade"
@@ -168,7 +193,8 @@
      upgrading: false,
      checking: true,
      newVersionName: "",
      hasNewVersion: true,
      hasNewVersion: false,
      upStatus:'',
      sysSetList: [
        { title: "自动清理软件包缓存", val: false, name: "sys_auto_clean" },
        { title: "更新提醒", val: false, name: "sys_update_notice" },
@@ -251,7 +277,16 @@
      uploadUpgradePkg(param).then((res) => {
        this.upgrading = false;
        this.pkgID = res.data.id;
      });
        this.upStatus = 1
        setTimeout(() => {
        this.upStatus =''
      }, 2000);
      }).catch(()=>{
        this.upStatus = 0
        setTimeout(() => {
        this.upStatus =''
      }, 2000);
      })
    },
    upgrade() {
      this.shengjiing = true;
@@ -314,6 +349,7 @@
        }
      });
    },
  },
};
</script>
@@ -341,7 +377,6 @@
    border-right: 4px solid #f8f8f8;
    .menu-item {
      background-color: #F2F2F7;
      height: 56px;
      margin-bottom: 4px;
      border-radius: 8px;
@@ -365,7 +400,7 @@
      }
    }
    .menu-item-active {     
      background-color: var(--colorCard);
      background-color: var(--colorCard) !important;
       .iconfont {
          color: #fff !important;
        }
@@ -374,13 +409,7 @@
        }
    }
    .menu-item:hover {   
      background-color: var(--colorCard);
       .iconfont {
          color: #fff;
        }
        .menu-text {
           color: #fff;
        }
      background-color: #F2F2F7;
    }
  }
  .cluster-right {
@@ -423,8 +452,35 @@
    .net-set {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      justify-content: start;
      height: 95%;
      padding: 0 30px;
      .el-radio-group {
        margin-top:33px ;
        .el-radio-button__inner {
          font-size: 14px;
          width: 84px;
          height: 28px;
          padding: 0;
          border-radius: 20px;
          text-align: center;
          line-height: 28px;
          background: #F2F2F7 !important;
          border: none !important;
          box-shadow:none !important;
          &:hover {
            color: var(--colorCard) !important;
          }
        }
        & label.is-active   .el-radio-button__inner {
            background: var(--colorCard) !important;
            border: none !important;
             &:hover {
            color: white !important;
          }
          }
      }
      @keyframes spin {
        from {
          transform: rotate(0deg);
@@ -436,19 +492,17 @@
      .spin-bg {
        color: rgb(206, 205, 205);
        font-size: 100px;
        margin-bottom: 20px;
        font-size: 60px;
        margin-top: 60px;
        margin-bottom:15px ;
      }
      .spin-bg-rot {
        animation: spin 0.8s linear infinite;
      }
      .desc {
        height: 20px;
        line-height: 20px;
        font-size: 15px;
        color: rgb(231, 121, 58);
        margin-bottom: 20px;
        font-weight: 600;
        font-weight: bold;
        font-size: 16px;
        color: #333333;
      }
      .update-center {
        display: flex;
@@ -456,26 +510,72 @@
        align-items: center;
        .desc-suc {
          color: #3a8120;
          color: #333;
          border-radius: 8px;
        }
        .el-button {
          width: 100px;
          margin-top: 48px;
          width: 150px;
          height: 40px;
          border-radius: 25px;
          font-size: 15px;
          background: var(--colorCard) !important;
          border: none !important;
          &:hover {
          color: white !important;
          }
        }
        .text-desc{
          width: 260px;
          width: 90%;
          height: 150px;
          margin-top: 20px;
          background-color: rgba(250, 250, 250, 1);
          border: 1px dashed rgba(220, 220, 220, 1);
          height: 100px;
          padding: 10px 20px;
          color: rgba(94, 94, 94, 1);
          background-color: #F2F2F7;
          padding: 20px 30px;
          color: #333;
          text-align: left;
          font-size: 14px;
          border-radius:5px ;
          font-size: 12px;
          border-radius:8px ;
        }
      }
      .upload-center {
        margin-top:44px ;
        .upload-info {
          margin-bottom:20px ;
          text-align: left;
          font-weight: bold;
          font-size: 14px;
          color: #333333;
        }
        .upload-container {
          position: relative;
          width: 412px;
          height: 174px;
          background-color: #fff;
          border-radius: 8px;
          .upload-success,.upload-fail {
            position: absolute;
            z-index: 1;
            width: 100%;
            height: 174px;
            top: 0;
            left: 0;
            background-color: #fff;
            font-weight: bold;
            font-size: 10px;
            transition: all 1000ms linear 0;
            -o-transition: all 1000ms linear 0; /*兼容parsto内核*/
            -moz-transition: all 1000ms linear 0; /*兼容gecko内核*/
            -webkit-transition: all 1000ms linear 0; /*兼容webkit内核*/
          }
          .upload-icon {
            display: block;
            margin-top: 32px;
            margin-bottom:42px ;
            font-size: 50px;
          }
        }
        .update-center {
          height: 160px;
@@ -494,7 +594,13 @@
            margin-bottom: 10px;
          }
          .el-button {
            width: 120px;
            width: 150px;
            height: 40px;
            background: var(--colorCard) !important;
            border: none !important;
            &:hover {
            color: white !important;
          }
          }
          .el-button--small {
            font-size: 14px;
@@ -507,8 +613,47 @@
          box-sizing: border-box;
          flex-direction: column;
          .el-upload {
          width: 340px !important;
          height: 117.87px !important;
          margin: 28px auto;
          .el-upload-dragger {
            width: 100% !important;
            height: 100% !important;
            i {
              display: none  !important;
            }
            .el-upload__text {
              color: #828282  !important;
              margin-top: 52px !important;
              font-size: 14px !important;
            }
            .el-loading-text {
              font-size: 14px !important;
              color: #333333 !important;
            }
          }
          }
          .el-upload.el-upload--text .el-upload-dragger:hover {
            border-color: var(--colorCard) !important;
          }
          em {
            color: var(--colorCard) !important;
          }
          .uploader-btn {
            margin-top: 15px;
            width: 150px;
            height: 40px;
            margin-top: 158px;
            margin-bottom:25px ;
            background: var(--colorCard) !important;
            border: none !important;
            border-radius: 25px !important;
            &:hover {
            color: white !important;
          }
          }
        }
        .up-text {
@@ -525,6 +670,10 @@
        }
      }
      .cur-version {
        position: absolute;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 14px;
      }
    }
@@ -537,7 +686,7 @@
        background-color: #f8f8f8;
        justify-content: space-between;
        border-radius: 12px;
        margin-bottom: 10px;
        margin-bottom: 4px;
        padding-left:20px ;
        .name {
          font-size: 14px;
@@ -557,12 +706,12 @@
        margin-right: 17px;
      }
      .is-checked .el-switch__core{
       background-color: #4E97FF  !important;
       background-color: var(--colorCard)  !important;
       border: 1px solid var(--colorCard) !important;
      }
    }
    .save-btn {
      background-color: #3d68e1;
      width: 240px;
      height: 40px;
      margin: 0 auto;
@@ -571,7 +720,14 @@
      line-height: 40px;
      font-size: 14px;
      margin-top: 20px;
       background: var(--colorCard) !important;
          border: none !important;
          &:hover {
          color: white !important;
          }
    }
  }
}
</style>