| | |
| | | >
|
| | | <p class="src-title">算法软件</p>
|
| | | <div class="flex-list">
|
| | | <!-- <div class="wrap-box" v-for="item in ungradeList" :key="'upgrade'+item.id">
|
| | | <div class="list-choose-item-left">
|
| | | <div class="list-complete-item-handle">
|
| | | <div
|
| | | class="svg-wrap"
|
| | | :class="{willUpGrade:item.isUpgrade}"
|
| | | v-loading="item.upgradeLoading"
|
| | | :element-loading-text="item.progressMsg"
|
| | | element-loading-background="rgba(0,0,0,.8)"
|
| | | >
|
| | | <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>
|
| | | <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>{{ item.sdk_name }}</span>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>-->
|
| | | <div
|
| | | class="wrap-box"
|
| | | v-for="item in installedList"
|
| | |
| | | </div>
|
| | | <div
|
| | | class="info-onmask"
|
| | | @click="checkDetail(item, 'inactive')"
|
| | | @click="checkDetail(item, 'activeNotInstall')"
|
| | | >
|
| | | 查看详情
|
| | | </div>
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <el-drawer
|
| | | title="下载"
|
| | | :visible.sync="actDrawerShow"
|
| | | :direction="direction"
|
| | | >
|
| | | <div class="drawer-content">
|
| | | <div class="current-step">
|
| | | <el-steps
|
| | | align-center
|
| | | :active="actStep"
|
| | | finish-status="success"
|
| | | >
|
| | | <el-step title="添加激活码"></el-step>
|
| | | <el-step title="激活成功"></el-step>
|
| | | </el-steps>
|
| | | </div>
|
| | |
|
| | | <div v-if="actStep == 0">
|
| | | <div class="act-code">
|
| | | <p>使用激活码将新的算法添加到您的账户</p>
|
| | | <el-input
|
| | | v-model="activeCode"
|
| | | placeholder="00000-00000-00000-00000-00000"
|
| | | @blur="getCodeDetail"
|
| | | ></el-input>
|
| | | </div>
|
| | | <div class="text-right">
|
| | | <el-button type="primary" @click="actived"
|
| | | >激活</el-button
|
| | | >
|
| | | </div>
|
| | | </div>
|
| | | <div v-else-if="actStep == 1">
|
| | | <ul class="desc">
|
| | | <li>
|
| | | <label>激活码:</label>
|
| | | <span>{{ activedSdkOrApp.activateCode }}</span>
|
| | | </li>
|
| | | <li>
|
| | | <label>产品名称:</label>
|
| | | <span>{{ activedSdkOrApp.productName }}</span>
|
| | | </li>
|
| | | <li>
|
| | | <label>配置详情:</label>
|
| | | <span>{{ activedSdkOrApp.setting }}</span>
|
| | | </li>
|
| | | <li>
|
| | | <label>服务到期日:</label>
|
| | | <span>{{ activedSdkOrApp.expireTime }}</span>
|
| | | </li>
|
| | | <li>
|
| | | <label>许可证:</label>
|
| | | <span>{{ activedSdkOrApp.licence }}</span>
|
| | | </li>
|
| | | <!-- <li>
|
| | | <label>设备ID:</label>
|
| | | <span>3342-235f-ret55-fdsg</span>
|
| | | </li>-->
|
| | | </ul>
|
| | | <div class="text-right">
|
| | | <el-button type="primary" @click="checkMyAlgorith"
|
| | | >确定</el-button
|
| | | >
|
| | | <p class="tip">提示:请在“已激活”中查看并安装算法</p>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </el-drawer>
|
| | | <!-- -->
|
| | | |
| | | </el-tab-pane>
|
| | | <el-tab-pane name="update">
|
| | | <span slot="label">
|
| | |
| | | <span>{{ productDetail.productName }}</span>
|
| | | </el-tooltip></div>
|
| | | <div class="tags">
|
| | | <!-- <span
|
| | | class="tag"
|
| | | v-for="(id, index) in curCheckTarget.productLabelId"
|
| | | :key="index+'i'" |
| | | >{{showNameById(id)}}</span> -->
|
| | | <el-tag type="info" size="small" color="#fff" v-if="!isSDKDialog">应用</el-tag>
|
| | | <el-tag type="info" size="small" color="#fff" v-if="isSDKDialog">算法</el-tag>
|
| | | <!-- <el-tag type="info" size="small" color="#fff" v-if="!isSDKDialog">软件</el-tag> -->
|
| | | </div>
|
| | | <div class="btns">
|
| | | <el-button size="small" type="warning" v-if="needToUpgradeInWin||productDetail.isUpgrade" @click="upgradeSDKinWin" >{{
|
| | | isUpgrading ? "升级中.." : "升级"
|
| | | }}</el-button>
|
| | | <el-button size="small" type="primary" v-if="isActive&&!isDefaultApp" @click="unloadSDKinWin">卸载</el-button>
|
| | | <el-button size="small" type="primary" v-if="!isActive" @click="showInputCode=!showInputCode">激活</el-button>
|
| | | <el-button size="small" type="primary" v-if="!isActive&&!showInstallNotActive" @click="showInputCode=!showInputCode">激活</el-button>
|
| | | <el-button size="small" type="primary" v-if="!isActive&&showInstallNotActive" @click="downloadSdkInSide">{{isUpgrading?"安装中..":"安装"}}</el-button>
|
| | | <el-button size="small" type="success" v-if="!isSDKDialog&&isActive" @click="openApp">打开</el-button>
|
| | | </div>
|
| | |
|
| | |
| | | </div>
|
| | | </div>
|
| | | </el-dialog>
|
| | | <!-- -->
|
| | | <el-dialog
|
| | | :visible.sync="showActivateSuccess"
|
| | | title="激活成功!"
|
| | |
| | | downloadItem: "",
|
| | | downloading: false,
|
| | | direction: "rtl",
|
| | | actDrawerShow: false,
|
| | | actStep: 0,
|
| | | showActivateSuccess:false,
|
| | | activeCode: "",
|
| | |
| | | showInputCode:false,
|
| | | needToUpgradeInWin:false,
|
| | | errMsg:"",
|
| | | showInstallNotActive:false
|
| | | };
|
| | | },
|
| | | directives: {
|
| | |
| | | checkDetail(item,type) {
|
| | | if (type =='inactive') {
|
| | | this.isActive =false
|
| | | this.showInstallNotActive = false
|
| | | this.showInputCode = false
|
| | | }else{
|
| | | }else if (type =='active'){
|
| | | this.showInputCode = false
|
| | | this.showInstallNotActive = false
|
| | | this.isActive =true
|
| | | }else if (type =='activeNotInstall'){
|
| | | this.showInputCode = false
|
| | | this.isActive =false
|
| | | this.showInstallNotActive = true
|
| | | }
|
| | | this.checkIsDefOrNot(item.id)
|
| | | this.needToUpgradeInWin = item.isUpgrade?true:false
|
| | |
| | | }
|
| | |
|
| | | },
|
| | |
|
| | | //离线安装
|
| | | offlineInstall() {
|
| | | this.installDialogVisible = false;
|
| | |
| | | installApp({ path: app.id })
|
| | | .then((res) => {
|
| | | if (res && res.success) {
|
| | | _this.$notify({
|
| | | title: "成功",
|
| | | message: "安装应用成功",
|
| | | type: "success",
|
| | | });
|
| | | setTimeout(() => {
|
| | | if (action == "upgrade") {
|
| | | app.upgradeLoading = false;
|
| | |
| | | },
|
| | | "*"
|
| | | );
|
| | | _this.$notify({
|
| | | title: "成功",
|
| | | message: "卸载应用成功",
|
| | | type: "success",
|
| | | });
|
| | | }
|
| | | })
|
| | | .catch((e) => {
|
| | |
| | | console.log(e);
|
| | | });
|
| | | },
|
| | | // actSdk (id) {
|
| | | // this.actSdkId = id;
|
| | | // this.actDrawerShow = true;
|
| | | // this.actStep = 0;
|
| | | // this.activeCode = '';
|
| | | // this.activedSdkOrApp = this.newActInfo()
|
| | | // },
|
| | |
|
| | | actSdkOrApp(item, type = "sdk") {
|
| | | this.checkDetail(item, 'inactive')
|
| | | this.actType = type;
|
| | | this.actId = item.id;
|
| | | // this.actDrawerShow = true;
|
| | | this.actStep = 0;
|
| | | this.activeCode = "";
|
| | | this.activedSdkOrApp = this.newActInfo();
|
| | |
| | | .then((res) => {
|
| | | if (res && res.success) {
|
| | | sdk.unloadLoading = false;
|
| | | this.$notify({
|
| | | title: "成功",
|
| | | message: "卸载完成",
|
| | | type: "success",
|
| | | });
|
| | | _this.getAllSdk();
|
| | | window.parent.postMessage(
|
| | | {
|
| | |
| | | this.appUpgreading = true;
|
| | | }else{
|
| | | downloadSdk({path:this.productDetail.productBaseId}).then((res)=>{
|
| | | this.needToUpgradeInWin=false
|
| | | this.productDetail.isUpgrade = false
|
| | | this.isUpgrading = !this.isUpgrading;
|
| | | this.$notify({
|
| | | title: "成功",
|
| | | message: "升级完成",
|
| | | type: "success",
|
| | | });
|
| | | this.needToUpgradeInWin=false
|
| | | this.productDetail.isUpgrade = false
|
| | | this.isUpgrading = !this.isUpgrading;
|
| | | }).catch((err)=>{
|
| | | this.$notify({
|
| | | title: "升级失败",
|
| | |
| | |
|
| | |
|
| | | },
|
| | |
|
| | | downloadSdkInSide(){
|
| | | this.downloadItem = this.productDetail.productBaseId;
|
| | | this.isUpgrading = true
|
| | | downloadSdk({ path: this.productDetail.productBaseId })
|
| | | .then((rsp) => {
|
| | | this.productDetailVisible = false
|
| | | this.downloadItem = "";
|
| | | this.$notify({
|
| | | type: "success",
|
| | | message: "算法已安装"
|
| | | });
|
| | | this.isUpgrading=false
|
| | | })
|
| | | .catch((err) => {
|
| | | this.$notify({
|
| | | type: "warning",
|
| | | message: err.data,
|
| | | });
|
| | | this.downloadItem = "";
|
| | | this.isUpgrading=false
|
| | | });
|
| | | // 开启自动刷新
|
| | | this.sdkUpgreading = true;
|
| | | },
|
| | | donwload(item) {
|
| | | item.upgradeLoading = true;
|
| | | //this.downloading = true;
|
| | | this.downloadItem = item.id;
|
| | |
|
| | | downloadSdk({ path: item.id })
|
| | | .then((rsp) => {
|
| | | // this.$notify({
|
| | | // type: "success",
|
| | | // message: "算法已安装"
|
| | | // });
|
| | | item.upgradeLoading = false;
|
| | | //this.downloading = false;
|
| | | this.downloadItem = "";
|
| | | this.$notify({
|
| | | type: "success",
|
| | | message: "算法安装成功"
|
| | | });
|
| | | })
|
| | | .catch((err) => {
|
| | | this.$notify({
|
| | |
| | |
|
| | | }
|
| | | .text {
|
| | | height: 156px;
|
| | | overflow: auto;
|
| | | padding: 0 15px 0px 15px;
|
| | | height: 156px;
|
| | | overflow: auto;
|
| | | padding: 0 15px 0px 15px;
|
| | |
|
| | |
|
| | | .single-desc {
|