| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <!-- </draggable> -->
|
| | | <div
|
| | | class="wrap-box"
|
| | | v-for="item in notInstalledList"
|
| | |
| | | v-loading="downloading && downloadItem == item.id"
|
| | | >
|
| | | <div class="mask">
|
| | | <el-button
|
| | | type="primary"
|
| | | class="bot-btn"
|
| | | @click="donwload(item)"
|
| | | >安装</el-button
|
| | | >
|
| | | <div class="left-top">
|
| | | <div v-if="item.installed">当前版本:{{ item.version }}</div>
|
| | | <div v-if="item.remoteVersion">
|
| | | 最新版本:{{ item.remoteVersion }}
|
| | | </div>
|
| | | </div>
|
| | | <div
|
| | | class="info-onmask"
|
| | | @click="checkDetail(item, 'inactive')"
|
| | | >
|
| | | 查看详情
|
| | | </div>
|
| | | <div class="mask-btn">
|
| | | <el-button
|
| | | @click="donwload(item)"
|
| | | type="primary"
|
| | | class="bot-btn"
|
| | | >安装</el-button
|
| | | >
|
| | | |
| | | </div>
|
| | | |
| | | </div>
|
| | | <div class="click-download" title="下载">
|
| | | <span class="iconfont iconxiazai1"></span>
|
| | |
| | | element-loading-background="rgba(0,0,0,.8)"
|
| | | >
|
| | | <div class="mask">
|
| | | |
| | | <el-button
|
| | | size="small"
|
| | | type="primary"
|
| | |
| | | <div class="summary">
|
| | | <div class="icon">
|
| | | <img
|
| | | v-if="curCheckTarget.iconBlob"
|
| | | v-if="productDetail.iconBlob"
|
| | | class="baseImg"
|
| | | :src="
|
| | | curCheckTarget.iconBlob.indexOf(',') > 0
|
| | | ? curCheckTarget.iconBlob
|
| | | : `data:image/png;base64,${curCheckTarget.iconBlob}`
|
| | | productDetail.iconBlob.indexOf(',') > 0
|
| | | ? productDetail.iconBlob
|
| | | : `data:image/png;base64,${productDetail.iconBlob}`
|
| | | "
|
| | | alt
|
| | | />
|
| | | </div>
|
| | | <div class="right-desc">
|
| | | <div class="name">{{ productDetail.productName }}</div>
|
| | | |
| | | <div class="name"><el-tooltip class="" effect="dark" :content="productDetail.productName " placement="right-start">
|
| | | <span>{{ productDetail.productName }}</span>
|
| | | </el-tooltip></div>
|
| | | <div class="tags">
|
| | | <!-- <span
|
| | | class="tag"
|
| | |
| | | >{{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>
|
| | | <!-- <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" @click="upgradeSDKinWin" >{{
|
| | | <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" @click="unloadSDKinWin">卸载</el-button>
|
| | | <el-button size="small" type="primary" v-if="!isActive" @click="showInputCode=!showInputCode">下载激活</el-button>
|
| | | <el-button size="small" type="success" v-if="!isSDKDialog" @click="openApp">打开</el-button>
|
| | | <el-button size="small" type="success" v-if="!isSDKDialog&&isActive" @click="openApp">打开</el-button>
|
| | | </div>
|
| | |
|
| | | </div>
|
| | |
| | | }
|
| | | this.needToUpgradeInWin = item.isUpgrade?true:false
|
| | | this.resetStack()
|
| | | this.curCheckTarget = item;
|
| | | // this.productDetail = item;
|
| | | if (item.sdk_type===undefined) {
|
| | | this.isSDKDialog=false
|
| | | }else{
|
| | |
| | | let _this = this;
|
| | | getAppDetail({ id: item.id }).then((res) => {
|
| | | _this.productDetail = res.data.detail;
|
| | | _this.productDetail.isUpgrade = item.isUpgrade
|
| | | _this.productDetail.iconBlob = item.iconBlob
|
| | |
|
| | | _this.otherProducts = res.data.randoms;
|
| | |
|
| | | });
|
| | |
| | |
|
| | | },
|
| | | checkInWindow(item){
|
| | | this.backStack.push([this.productDetail,this.otherProducts])
|
| | | this.backStack.push([this.productDetail, this.otherProducts])
|
| | | // debugger
|
| | | this.backDisable = false
|
| | | this.curCheckTarget = item;
|
| | | // this.productDetailVisible = true;
|
| | |
|
| | | let _this = this;
|
| | | getAppDetail({ id: item.id }).then((res) => {
|
| | | _this.productDetail = res.data.detail;
|
| | | _this.productDetail.iconBlob = item.iconBlob
|
| | | this.actId = _this.productDetail.productBaseId
|
| | | let flag=false
|
| | | const allNeedToNew = [...this.hasNewVersionSdk,...this.hasNewVersionApp]
|
| | |
| | | flag=true
|
| | | }
|
| | | }
|
| | | this.needToUpgradeInWin = true
|
| | | this.needToUpgradeInWin = flag
|
| | | _this.productDetail.isUpgrade = flag
|
| | |
|
| | | _this.otherProducts = res.data.randoms;
|
| | | });
|
| | | },
|
| | |
| | | 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(
|
| | |
| | | "*"
|
| | | );
|
| | | }, 3000);
|
| | | }else {
|
| | | |
| | | }
|
| | | })
|
| | | .catch((e) => {
|
| | | console.log(e);
|
| | | _this.$notify({
|
| | | title: "安装失败",
|
| | | message: e.data,
|
| | | type: "warning",
|
| | | });
|
| | | if (action == "upgrade") {
|
| | | app.upgradeLoading = false;
|
| | | } else {
|
| | |
| | | this.hasNewVersionApp = nArry;
|
| | | },
|
| | |
|
| | | //卸载应用
|
| | | //卸载
|
| | | unLoad(app) {
|
| | | let _this = this;
|
| | | this.$confirm("确定要卸载该应用吗?", "提示")
|
| | | .then(() => {
|
| | | _this.productDetailVisible = false
|
| | |
|
| | | app.unloadLoading = true;
|
| | | removeApp({ appId: app.id })
|
| | | .then((res) => {
|
| | |
| | | this.hasNewVersionSdk = hasNewVersionList;
|
| | | },
|
| | | unloadSDKinWin(){
|
| | | let _this = this;
|
| | | this.$confirm("确定要卸载该算法么?", "提示").then(()=>{
|
| | | _this.productDetailVisible = false
|
| | | removeSdk({sdkId:this.productDetail.productBaseId}).then((res)=>{
|
| | | _this.getAllSdk();
|
| | | window.parent.postMessage(
|
| | | {
|
| | | msg: "AppUpdate",
|
| | | },
|
| | | "*"
|
| | | );
|
| | | }).catch((err)=>{
|
| | | console.log(err);
|
| | |
|
| | | let appToUnload
|
| | | let sdkToUnload
|
| | | if (this.productDetail.productTypeName=="应用") {
|
| | | appToUnload= this.installedApps.find((item)=>{
|
| | | return item.id == this.productDetail.productBaseId
|
| | | })
|
| | | }).catch(()=>{
|
| | | |
| | | })
|
| | | this.unLoad(appToUnload)
|
| | | }else{
|
| | | sdkToUnload= this.installedList.find((item)=>{
|
| | | return item.id == this.productDetail.productBaseId
|
| | | })
|
| | | this.unLoadSdk(sdkToUnload)
|
| | | }
|
| | | },
|
| | | //卸载算法
|
| | | unLoadSdk(sdk) {
|
| | | let _this = this;
|
| | | this.$confirm("确定要卸载该算法吗?", "提示")
|
| | | .then(() => {
|
| | | _this.productDetailVisible = false
|
| | | sdk.unloadLoading = true;
|
| | | removeSdk({ sdkId: sdk.id })
|
| | | .then((res) => {
|
| | |
| | |
|
| | | this.isUpgrading = !this.isUpgrading;
|
| | |
|
| | | downloadSdk({path:this.productDetail.productBaseId}).then((res)=>{
|
| | | let _this = this;
|
| | | if (this.productDetail.productTypeName=="应用") {
|
| | | installApp({ path: this.productDetail.productBaseId})
|
| | | .then((res) => {
|
| | | if (res && res.success) {
|
| | | this.$notify({
|
| | | title: "成功",
|
| | | message: "升级完成",
|
| | | type: "success",
|
| | | });
|
| | | this.needToUpgradeInWin=false
|
| | | this.productDetail.isUpgrade = false
|
| | | this.isUpgrading = !this.isUpgrading;
|
| | | |
| | | }
|
| | | })
|
| | | .catch((e) => {
|
| | | _this.$notify({
|
| | | title: "升级失败",
|
| | | message: e.data,
|
| | | type: "warning",
|
| | | });
|
| | | this.isUpgrading = !this.isUpgrading;
|
| | | });
|
| | |
|
| | | // 开启自动刷新
|
| | | this.appUpgreading = true;
|
| | | }else{
|
| | | downloadSdk({path:this.productDetail.productBaseId}).then((res)=>{
|
| | | this.$notify({
|
| | | title: "成功",
|
| | | message: "升级完成",
|
| | | type: "success",
|
| | | });
|
| | | this.needToUpgradeInWin=false
|
| | | this.productDetail.isUpgrade = false
|
| | | this.isUpgrading = !this.isUpgrading;
|
| | | }).catch((err)=>{
|
| | | this.$notify({
|
| | |
| | | this.isUpgrading = !this.isUpgrading;
|
| | | })
|
| | | this.sdkUpgreading = true;
|
| | | }
|
| | |
|
| | |
|
| | | |
| | | },
|
| | |
|
| | | donwload(item) {
|
| | |
| | | .right-desc {
|
| | | float: left;
|
| | | position: absolute;
|
| | | left: 145px;
|
| | | left: 140px;
|
| | | .name {
|
| | | font-size: 28px;
|
| | |
|
| | | // font-weight: bold;
|
| | | margin-bottom: 5px;
|
| | | text-overflow: ellipsis;
|
| | | white-space: nowrap;
|
| | | overflow: hidden;
|
| | | width: 250px;
|
| | | }
|
| | | .tags {
|
| | | margin-bottom: 10px;
|
| | |
| | | position: absolute;
|
| | | top: 61%;
|
| | | left: 12%;
|
| | | width: 100px;
|
| | | text-overflow: ellipsis;
|
| | | white-space: nowrap;
|
| | | overflow: hidden;
|
| | | font-size: 13px;
|
| | | width: 100px;
|
| | | text-overflow: ellipsis;
|
| | | white-space: nowrap;
|
| | | overflow: hidden;
|
| | | font-size: 13px;
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | max-width: 200px;
|
| | | .mask {
|
| | | width: 100%;
|
| | |
|
| | | |
| | | |
| | | .el-button + .el-button {
|
| | | margin-left: 0 !important;
|
| | | }
|
| | |
| | | flex-wrap: wrap;
|
| | | justify-content: center;
|
| | | top: 0;
|
| | | |
| | | .bot-btn {
|
| | | flex: 1;
|
| | | }
|