hanbaoshan
2020-10-19 c0c79d9b58705a3c8c13ea9f23b1dd0f724a04af
src/pages/ai/index/App.vue
@@ -8,7 +8,7 @@
          </div>
        </div>
        <!-- 超级管理员可见 -->
        <div class="super" v-if="isSuperUser">
        <div class="super">
          <div class="left-box">
            <!-- <div class="title">
          <label>算法库</label>
@@ -23,23 +23,35 @@
                <div class="width-new-line task-list" v-show="activeName === 'myAlgorithm'">
                  <p class="src-title">算法软件</p>
                  <div class="flex-list">
                    <div class="wrap-box" v-for="item in ungradeList" :key="item.id">
                    <div class="wrap-box" v-for="item in ungradeList" :key="'upgrade'+item.id">
                      <div class="list-choose-item-left">
                        <div class="mask flex-center">
                          <div class="info-onmask">
                            <div>当前版本:{{item.version}}</div>
                            <div>远端版本:{{item.remoteVersion}}</div>
                          </div>
                          <el-button type="primary" class="bot-btn" @click="donwload(item)">升级</el-button>
                        </div>
                        <div class="list-complete-item-handle">
                          <div class="svg-wrap">
                          <div class="svg-wrap" :class="{willUpGrade:item.isUpgrade}">
                            <i class="iconfont iconupdate" v-if="item.isUpgrade"></i>
                            <div class="mask">
                              <div class="info-onmask">
                                <div>当前版本:{{item.version}}</div>
                                <div>最新版本:{{item.remoteVersion}}</div>
                              </div>
                              <div class="mask-btn">
                                <el-button
                                  type="warning"
                                  class="bot-btn"
                                  size="small"
                                  @click="donwload(item)"
                                >升级</el-button>
                              </div>
                            </div>
                            <!-- <div class="list-complete-item-handle"> -->
                            <!-- <div class="svg-wrap" :class="{willUpGrade:item.isUpgrade}"> -->
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="`data:image/png;base64,${item.iconBlob}`"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
@@ -51,18 +63,20 @@
                    </div>
                    <div class="wrap-box" v-for="(item) in installedList" :key="item.id">
                      <div class="list-choose-item-left">
                        <div class="list-complete-item-handle">
                        <div class="list-complete-item-handle">
                          <div class="svg-wrap">
                            <div class="mask flex-center" v-if="!item.isEdit">
                              <div class="info-onmask">
                                <div>当前版本:{{item.version}}</div>
                              </div>
                            </div>
                            </div>
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="`data:image/png;base64,${item.iconBlob}`"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
@@ -96,10 +110,12 @@
                        <div class="list-complete-item-handle">
                          <div class="svg-wrap">
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="`data:image/png;base64,${item.iconBlob}`"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
@@ -113,34 +129,101 @@
                  <p class="src-title">应用软件</p>
                  <div class="flex-list">
                    <div class="wrap-box" v-for="(item) in installedApps" :key="item.id">
                        <div class="list-choose-item-left">
                          <div class="list-complete-item-handle">
                            <div class="svg-wrap" v-loading="item.unloadLoading" element-loading-text="卸载中" element-loading-background="rgba(0,0,0,.8)">
                              <div class="mask" v-if="!item.isDefault">
                      <div class="list-choose-item-left">
                        <div class="list-complete-item-handle">
                          <div
                            class="svg-wrap"
                            :class="{willUpGrade:item.isUpgrade}"
                            v-loading="item.unloadLoading||item.upgradeLoading"
                            :element-loading-text="item.unloadLoading?'卸载中':'升级中'"
                            element-loading-background="rgba(0,0,0,.8)"
                          >
                            <i class="iconfont iconupdate" v-if="item.isUpgrade"></i>
                            <div class="mask" v-if="!item.isDefault || item.isUpgrade">
                              <div class="info-onmask">
                                <div>当前版本:{{item.version}}</div>
                                <div v-if="item.remoteVersion">最新版本:{{item.remoteVersion}}</div>
                              </div>
                              <div class="mask-btn">
                                <el-button
                                  v-if="!item.isDefault"
                                  @click="unLoad(item)"
                                  type="primary"
                                  size="small"
                                  class="bot-btn"
                                >卸载</el-button>
                              </div>
                              <img class="baseImg" :src="`${item.iconBlob?'data:image/png;base64,'+item.iconBlob:item.icon}`" alt />
                            </div>
                            <div class="alg-name">
                              <div style="padding:0px 10px 0px 10px;">
                                <span v-if="!item.isEdit">{{ item.name }}</span>
                                <el-input
                                <el-button
                                  v-if="item.isUpgrade"
                                  @click="downloadApp(item,'upgrade')"
                                  type="warning"
                                  size="small"
                                  v-model="item.sdk_name"
                                  v-if="item.isEdit"
                                  v-focus
                                  :maxlength="15"
                                  @blur="inputBlur(item)"
                                ></el-input>
                                  class="bot-btn"
                                >升级</el-button>
                              </div>
                            </div>
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
                              <span v-if="!item.isEdit">{{ item.name }}</span>
                              <el-input
                                size="small"
                                v-model="item.sdk_name"
                                v-if="item.isEdit"
                                v-focus
                                :maxlength="15"
                                @blur="inputBlur(item)"
                              ></el-input>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="wrap-box" v-for="item in storeApps" :key="item.id">
                      <div class="list-choose-item-left">
                        <div class="list-complete-item-handle uninstall">
                          <div
                            class="svg-wrap"
                            v-loading="item.installLoading||item.upgradeLoading"
                            :element-loading-text="item.installLoading?'安装中':'升级中'"
                            element-loading-background="rgba(0,0,0,.8)"
                          >
                            <div class="mask">
                              <el-button
                                type="primary"
                                class="bot-btn"
                                @click="downloadApp(item)"
                              >安装</el-button>
                            </div>
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
                              <span v-if="!item.isEdit">{{ item.name }}</span>
                              <el-input
                                size="small"
                                v-model="item.name"
                                v-if="item.isEdit"
                                v-focus
                                :maxlength="15"
                                @blur="inputBlur(item)"
                              ></el-input>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
@@ -149,7 +232,7 @@
              <el-tab-pane
                label="离线升级/安装"
                name="upgradeOrInstallation"
                v-show="activeName==='upgradeOrInstallation'"
                v-if="isShow('algorithmManage:insOffLine')"
              >
                <div class="tab-content">
                  <div class="action-bar">
@@ -165,7 +248,7 @@
                  </div>
                </div>
              </el-tab-pane>
              <el-tab-pane label="应用中心" name="algorithmMall" v-show="activeName==='algorithmMall'">
              <el-tab-pane label="应用中心" name="algorithmMall" v-if=" isShow('algorithmManage:buy')">
                <div class="tab-content">
                  <p class="src-title">算法软件</p>
                  <div class="store-list flex-list">
@@ -173,17 +256,19 @@
                      <div class="list-choose-item-left">
                        <div class="list-complete-item-handle">
                          <div class="alg-icon svg-wrap">
                            <div class="mask" @click="actSdk(item.id)">
                            <div class="mask" @click="actSdkOrApp(item.id)">
                              <span
                                class="iconfont iconyunxiazai"
                                style="color:#ff6a00;font-size:20px;position:absolute;top:45%;left:45%"
                              ></span>
                            </div>
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
@@ -204,18 +289,23 @@
                  </div>
                  <p class="src-title">应用软件</p>
                  <div class="app-list flex-list">
                    <div class="wrap-box" v-for="item in storeApps" :key="item.id">
                    <div class="wrap-box" v-for="item in unActivedAppList" :key="item.id">
                      <div class="list-choose-item-left">
                        <div class="list-complete-item-handle">
                          <div class="svg-wrap" v-loading="item.installLoading" element-loading-text="安装中" element-loading-background="rgba(0,0,0,.8)">
                            <div class="mask">
                              <el-button type="primary" class="bot-btn" @click="downloadApp(item)">安装</el-button>
                          <div class="alg-icon svg-wrap">
                            <div class="mask" @click="actSdkOrApp(item.id,'app')">
                              <span
                                class="iconfont iconyunxiazai"
                                style="color:#ff6a00;font-size:20px;position:absolute;top:45%;left:45%"
                              ></span>
                            </div>
                            <img
                              v-if="item.iconBlob"
                              class="baseImg"
                              :src="item.iconBlob? 'data:image/png;base64,'+item.iconBlob:item.icon"
                              :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                              alt
                            />
                            <img v-else class="baseImg" :src="item.icon" alt />
                          </div>
                          <div class="alg-name">
                            <div style="padding:0px 10px 0px 10px;">
@@ -234,7 +324,6 @@
                      </div>
                    </div>
                  </div>
                </div>
                <el-drawer title="下载" :visible.sync="actDrawerShow" :direction="direction">
                  <div class="drawer-content">
@@ -262,23 +351,23 @@
                      <ul class="desc">
                        <li>
                          <label>激活码:</label>
                          <span>{{activedSdk.activateCode}}</span>
                          <span>{{activedSdkOrApp.activateCode}}</span>
                        </li>
                        <li>
                          <label>产品名称:</label>
                          <span>{{activedSdk.productName}}</span>
                          <span>{{activedSdkOrApp.productName}}</span>
                        </li>
                        <li>
                          <label>配置详情:</label>
                          <span>{{activedSdk.setting}}</span>
                          <span>{{activedSdkOrApp.setting}}</span>
                        </li>
                        <li>
                          <label>服务到期日:</label>
                          <span>{{activedSdk.expireTime}}</span>
                          <span>{{activedSdkOrApp.expireTime}}</span>
                        </li>
                        <li>
                          <label>许可证:</label>
                          <span>{{activedSdk.licence}}</span>
                          <span>{{activedSdkOrApp.licence}}</span>
                        </li>
                        <!-- <li>
                          <label>设备ID:</label>
@@ -298,6 +387,52 @@
        </div>
      </div>
    </div>
    <el-dialog
      title="安装包信息"
      :visible.sync="installDialogVisible"
      width="40%"
      :close-on-click-modal="false"
    >
      <div class="installInfo">
        <template v-if="installAppPackage != null">
          <div>
            <div>
              <span>安装包名称:</span>
              <span>{{installAppPackage.productName}}</span>
            </div>
            <div>
              <span>安装版本:</span>
              <span>{{installAppPackage.version}}</span>
            </div>
            <div>
              <span>更新内容:</span>
              <span>{{installAppPackage.installContent}}</span>
            </div>
          </div>
        </template>
        <template v-if="installSdkPackage != null">
          <div>
            <div>
              <span>安装包名称:</span>
              <span>{{installSdkPackage.productName}}</span>
            </div>
            <div>
              <span>安装版本:</span>
              <span>{{installSdkPackage.version}}</span>
            </div>
            <div>
              <span>更新内容:</span>
              <span>{{installSdkPackage.installContent}}</span>
            </div>
          </div>
        </template>
        <p>确定安装?</p>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="installDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="offlineInstall">安 装</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
@@ -318,10 +453,11 @@
  findByType,
  getTagList,
  downloadSdk,
  installSdk
  installSdk,
  getInstallInfo
} from "./api";
import { getApps,installApp,removeApp } from "@/api/app";
import { getUnActivedSdk, actPageAlg } from "@/api/app";
import { getApps, installApp, removeApp, getUnActivedSdk, actPageAlg, getUnActivedApp, actApp } from "@/api/app";
import FileUploader from "@/components/subComponents/FileUpload/index";
import TaskManage from "@/Pool/TaskMange";
import VideoManageData from "@/Pool/VideoManageData";
@@ -344,17 +480,28 @@
    },
    ungradeList () {
      // 升级处理会导致重复的key,需要修改
      return [];
      //return [];
      return this.TaskMange.list1.filter(sdk => {
        return sdk.isUpgrade === true;
      });
    },
    isAdmin () {
      if (
        sessionStorage.getItem("userInfo") &&
        sessionStorage.getItem("userInfo") !== ""
      ) {
        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
        return loginName === "superadmin" || loginName === "basic";
      }
      return false;
    },
  },
  data () {
    return {
      TaskMange: new TaskManage,
      VideoManageData: new VideoManageData,
      buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
      activeName: "myAlgorithm",
      patchUpdateStatus: "",
      dragging: false,
@@ -417,10 +564,17 @@
      sceneSdks: [],
      sceneRuleList: "",
      isInstall: false,
      installDialogVisible: false,
      installPackage: {},
      installAppPackage: null,
      installSdkPackage: null,
      installPercentage: 0,
      unActivedSDKList: [],
      actSdkId: '',
      activedSdk: {
      unActivedAppList: [],
      //actSdkId: '',
      actType: '',
      actId: '',
      activedSdkOrApp: {
        activateCode: '',
        productName: '',
        setting: '',
@@ -430,8 +584,9 @@
      },
      // unloadLoading: false,
      // installLoading: false,
      installedApps:[],
      storeApps:[]
      installedApps: [],
      storeApps: [],
      installFile: {}
    }
  },
  watch: {
@@ -463,75 +618,145 @@
    this.findByType();
    this.getBaseList();
    this.findAll();
    this.getUser();
    this.getUnActivedList();
    this.getUnActivedAppList();
    // this.TaskMange.findAllSdk();
    // this.TaskMange.findByType();
    this.VideoManageData.init();
  },
  methods: {
    downloadApp(app){
      app.installLoading = true;
    isShow (authority) {
      return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
    },
    //离线安装
    offlineInstall () {
      this.installDialogVisible = false;
      this.isInstall = true;
      //安装
      installSdk(this.installFile).then(res => {
        debugger
        if (res.success) {
          this.isInstall = false;
          this.$message({
            type: 'success',
            message: '安装成功,将跳转至我的算法中查看'
          });
          setTimeout(() => {
            this.findAllSdk();
            this.getAllApps();
            window.parent.postMessage({
              msg: "AppUpdate"
            }, '*')
            this.activeName = 'myAlgorithm';
          }, 3000);
        }
      }).catch(e => {
        console.log(e)
        this.isInstall = false;
        this.$message({
          type: 'error',
          message: e.data
        });
      })
    },
    downloadApp (app, action) {
      if (action == 'upgrade') {
        app.upgradeLoading = true;
      } else {
        app.installLoading = true;
      }
      let _this = this;
      installApp(app).then(res=>{
        if(res && res.success){
          setTimeout(()=>{
            app.installLoading = false;
      installApp({ path: app.id }).then(res => {
        if (res && res.success) {
          setTimeout(() => {
            if (action == 'upgrade') {
              app.upgradeLoading = false;
              _this.notify({
                type:'success',
                message:'升级成功'
              });
            } else {
              app.installLoading = false;
              _this.notify({
                type:'success',
                message:'安装成功'
              });
            }
            _this.getAllApps();
            window.parent.postMessage({
              msg: "AppUpdate"
            }, '*')
          },3000);
          }, 3000);
        }
      }).catch(e => {
        console.log(e);
        if (action == 'upgrade') {
          app.upgradeLoading = false;
        } else {
          app.installLoading = false;
        }
      })
    },
    getAllApps(){
    getAllApps () {
      let _this = this;
      _this.installedApps = [];
      _this.storeApps = [];
      getApps().then(res=>{
        if(res && res.success){
      getApps().then(res => {
        if (res && res.success) {
          //_this.storeApps = res.data;
          res.data.forEach(item=>{
            if(item.installed){
              let obj = Object.assign({unloadLoading:false},item)
          res.data.forEach(item => {
            if (item.installed) {
              let obj = Object.assign({ unloadLoading: false, upgradeLoading: false }, item)
              _this.installedApps.push(obj)
            }else{
              let obj = Object.assign({installLoading:false},item)
            } else {
              let obj = Object.assign({ installLoading: false, upgradeLoading: false }, item)
              _this.storeApps.push(obj)
            }
          });
          console.log('_this.installedApps',_this.installedApps);
          console.log('_this.storeApps',_this.storeApps);
          console.log('_this.installedApps', _this.installedApps);
          console.log('_this.storeApps', _this.storeApps);
        }
      })
    },
    //卸载应用
    unLoad(app){
    unLoad (app) {
      app.unloadLoading = true;
      let _this = this;
      removeApp({appId:app.id}).then(res=>{
        if(res && res.success){
          setTimeout(()=>{
      removeApp({ appId: app.id }).then(res => {
        if (res && res.success) {
          setTimeout(() => {
            app.unloadLoading = false;
            _this.getAllApps();
            window.parent.postMessage({
              msg: "AppUpdate"
            }, '*')
          },3000);
          }, 3000);
        }
      }).catch(e => {
        console.log(e);
        app.unloadLoading = false;
      })
    },
    actSdk (id) {
      this.actSdkId = id;
    // actSdk (id) {
    //   this.actSdkId = id;
    //   this.actDrawerShow = true;
    //   this.actStep = 0;
    //   this.activeCode = '';
    //   this.activedSdkOrApp = this.newActInfo()
    // },
    actSdkOrApp (id, type = 'sdk') {
      this.actType = type;
      this.actId = id;
      this.actDrawerShow = true;
      this.actStep = 0;
      this.activeCode = '';
      this.activedSdk = this.newActInfo()
      this.activedSdkOrApp = this.newActInfo()
    },
    newActInfo(){
    newActInfo () {
      return {
        activateCode: '',
        productName: '',
@@ -549,26 +774,54 @@
      })
    },
    getUnActivedAppList () {
      getUnActivedApp().then(res => {
        if (res.code == 200) {
          this.unActivedAppList = res.data;
        }
      });
    },
    installFormat (percentage) {
      return percentage === 100 ? '安装成功' : `${percentage}%`;
    },
    actived () {
      let _this = this;
      actPageAlg(this.actSdkId, this.activeCode).then(res => {
        if (res.data.isSuccess) {
          _this.activedSdk = res.data.successMsg;
          _this.actStep++;
          _this.getUnActivedList();
          _this.findAllSdk();
        }else{
          _this.$notify({
            type:'error',
            message:res.data.failMsg.failMsg
          });
        }
      }).catch(e => {
        console.log(e)
      })
      if (this.actType == 'sdk') {
        //激活算法
        actPageAlg(this.actId, this.activeCode).then(res => {
          if (res.data.isSuccess) {
            _this.activedSdkOrApp = res.data.successMsg;
            _this.actStep++;
            _this.getUnActivedList();
            _this.findAllSdk();
          } else {
            _this.$notify({
              type: 'error',
              message: res.data.failMsg.failMsg
            });
          }
        }).catch(e => {
          console.log(e)
        });
      } else if (this.actType == 'app') {
        //激活应用
        actApp(this.actId, this.activeCode).then(res => {
          if (res.data.isSuccess) {
            _this.activedSdkOrApp = res.data.successMsg;
            _this.actStep++;
            _this.getUnActivedAppList();
            _this.getAllApps();
          } else {
            _this.$notify({
              type: 'error',
              message: res.data.failMsg.failMsg
            });
          }
        }).catch(e => {
          console.log(e)
        });
      }
    },
    getCodeDetail () { },
    checkMyAlgorith () {
@@ -580,6 +833,79 @@
      this.patchFile = { ...file };
      this.fileAdded = true;
      const h = this.$createElement;
      //上传完成获取安装信息
      let _this = this;
      getInstallInfo(file).then(res => {
        _this.installFile = file;
        if (res.success) {
          _this.installDialogVisible = true;
          debugger
          if (res.data.apps.length > 0) {
            _this.installAppPackage = {
              appId: res.data.apps[0].appId,
              version: res.data.apps[0].version,
              productName: res.data.productName,
              installContent: res.data.apps[0].installContent
            }
          }
          if (res.data.sdks.length > 0) {
            _this.installSdkPackage = {
              appId: res.data.sdks[0].sdkId,
              version: res.data.sdks[0].version,
              productName: res.data.productName,
              installContent: res.data.sdks[0].installContent
            }
          }
          // this.$confirm('', '算法信息', {
          //   message: `<div class="installInfo">
          //           <div><span>算法名称:</span><span>${file.filename}</span></div>
          //           <div><span>安装版本:</span><span></span></div>
          //           <div><span>更新内容:</span><span></span></div>
          //           <p>确定安装此算法?</p>
          //         </div>`,
          //   confirmButtonText: '安装',
          //   cancelButtonText: '取消',
          //   dangerouslyUseHTMLString: true,
          //   type: ''
          // }).then(() => {
          //   this.isInstall = true;
          //   //安装
          //   installSdk(file).then(res => {
          //     debugger
          //     if (res.success) {
          //       this.isInstall = false;
          //       //this.$refs['progressBar'].style.width = 100%
          //       //this.installPercentage = 100%
          //       this.$message({
          //         type: 'success',
          //         message: '安装成功,将跳转至我的算法中查看'
          //       });
          //       setTimeout(() => {
          //         this.findAllSdk();
          //         this.activeName = 'myAlgorithm';
          //       }, 3000)
          //     }
          //   }).catch(e => {
          //     console.log(e)
          //     this.isInstall = false;
          //     this.$message({
          //       type: 'error',
          //       message: e.data
          //     });
          //   })
          // }).catch(() => {
          //   console.log('取消安装');
          // })
        }
      }).catch(e => {
        this.$message({
          type: 'error',
          message: e.data
        });
      })
      // this.$msgbox({
      //     title: '算法信息',
      //     message: h('div', null, [
@@ -610,39 +936,7 @@
      //     });
      //   });
      this.$confirm('', '算法信息', {
        message: `<div class="installInfo">
                    <div><span>算法名称:</span><span>${file.filename}</span></div>
                    <div><span>安装版本:</span><span></span></div>
                    <div><span>更新内容:</span><span></span></div>
                    <p>确定安装此算法?</p>
                  </div>`,
        confirmButtonText: '安装',
        cancelButtonText: '取消',
        dangerouslyUseHTMLString: true,
        type: ''
      }).then(() => {
        this.isInstall = true;
        //安装
        installSdk(file).then(res => {
          if (res.success) {
            this.isInstall = false;
            //this.$refs['progressBar'].style.width = 100%
            //this.installPercentage = 100%
            this.$message({
              type: 'success',
              message: '安装成功,将跳转至我的算法中查看'
            });
            setTimeout(() => {
              this.findAllSdk();
              this.activeName = 'myAlgorithm';
            }, 3000)
          }
        });
      }).catch(() => {
        console.log('取消安装')
      })
    },
@@ -1206,19 +1500,6 @@
        this.clickSet(row);
      }
    },
    getUser () {
      // console.log("登录用户",JSON.parse(sessionStorage.getItem("userInfo")).username)
      if (
        sessionStorage.getItem("userInfo") &&
        (JSON.parse(sessionStorage.getItem("userInfo")).username ==
          "superadmin" ||
          JSON.parse(sessionStorage.getItem("userInfo")).username == "basic")
      ) {
        this.isSuperUser = true;
      } else {
        this.isSuperUser = false;
      }
    },
    donwload (item) {
      this.downloading = true;
      this.downloadItem = item.id;
@@ -1340,32 +1621,31 @@
  color: #606266;
  cursor: pointer;
}
.el-loading-mask .el-loading-spinner{
  top: 40px!important;
.el-loading-mask .el-loading-spinner {
  top: 40px !important;
}
.el-loading-mask .el-loading-spinner svg{
  transform: none!important;
  top: 20px!important;
  left: 40%!important;
.el-loading-mask .el-loading-spinner svg {
  transform: none !important;
  top: 20px !important;
  left: 40% !important;
}
.el-loading-mask .el-loading-spinner p.el-loading-text{
  display: block!important;
  text-align: center!important;
  bottom: 10px!important;
  top: 80px!important;
.el-loading-mask .el-loading-spinner p.el-loading-text {
  display: block !important;
  text-align: center !important;
  bottom: 10px !important;
  top: 80px !important;
  right: 0 !important;
  color: #78adf7;
}
.el-loading-mask .el-loading-spinner .path{
.el-loading-mask .el-loading-spinner .path {
  stroke: #78adf7;
}
.installInfo {
  text-indent: 2em;
  font-size: 14px;
  color: #777;
  line-height: 26px;
  p {
    text-align: center;
    color: #666;
  }
}
.src-title {
@@ -1484,6 +1764,13 @@
            margin: auto;
            margin-bottom: 30px;
            max-width: 200px;
            .mask {
              width: 100%;
              .el-button + .el-button {
                margin-left: 0 !important;
              }
            }
          }
        }
      }
@@ -1523,6 +1810,9 @@
              z-index: 1;
              border-radius: 3px;
              display: none;
              .el-button + .el-button {
                margin-left: 0 !important;
              }
              .tool {
                position: absolute;
                top: 49%;
@@ -1646,7 +1936,8 @@
          }
        }
      }
      .store-list,.app-list {
      .store-list,
      .app-list {
        display: flex;
        flex-wrap: wrap;
        .wrap-box {
@@ -1800,8 +2091,12 @@
      z-index: 1;
      border-radius: 3px;
      display: none;
      .info-onmask{
      .info-onmask {
        color: #8ecaff;
      }
      .mask-btn {
        width: 100%;
        display: flex;
      }
      i {
        color: #fff;
@@ -1888,16 +2183,17 @@
      .mask {
        display: flex;
        align-items: flex-end;
        flex-wrap: wrap;
        justify-content: center;
        top: 0;
        .bot-btn {
          flex: 1;
        }
        &.flex-center{
        &.flex-center {
          align-items: center;
          justify-content: center;
        }
      }
    }
    .list-choose-item-left-uninstal {
      color: darkgray;
@@ -2072,6 +2368,24 @@
          max-height: 106px;
        }
      }
      .willUpGrade {
        .iconupdate {
          color: #01e667;
          position: absolute;
          top: 5px;
          right: 5px;
          font-weight: 550;
          font-size: 26px;
        }
      }
      &.uninstall {
        .svg-wrap {
          background-color: #ddd;
        }
        .alg-name {
          color: darkgray;
        }
      }
    }
    .dragAreaR {
      height: 100%;