| | |
| | | class="other-btn"
|
| | | round
|
| | | @click="checkDetail(item)"
|
| | | v-if="activeName == '应用中心'&&item.price>0"
|
| | | v-if="activeName == '应用中心' && item.price > 0"
|
| | | >激活</el-button
|
| | | >
|
| | | <el-button
|
| | |
| | | class="update-btn"
|
| | | round
|
| | | @click.stop="actived(item)"
|
| | | v-if="activeName == '应用中心'&&item.price==0"
|
| | | v-if="activeName == '应用中心' && item.price == 0"
|
| | | >安装</el-button
|
| | | >
|
| | | <el-button
|
| | |
| | | goback() {
|
| | | this.inDetail = false;
|
| | | },
|
| | | // isShow(authority) {
|
| | | // return (
|
| | | // this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
|
| | | // );
|
| | | // },
|
| | | batchUpdate(s) {
|
| | | if (s == "both") {
|
| | | this.batchUpdateSDK();
|
| | |
| | | this.tempList = this.installedList;
|
| | | this.tempDarkList = this.notInstalledList;
|
| | | break;
|
| | |
|
| | | case "更新":
|
| | | this.showQuickPath = false;
|
| | | this.tempList = this.hasNewVersionSdk;
|
| | |
| | | this.tempDarkList = [];
|
| | | }
|
| | | },
|
| | | // closeDial() {
|
| | | // this.productDetailVisible = false;
|
| | | // this.productDetail = {};
|
| | | // this.otherProducts = [];
|
| | | // },
|
| | | checkDetail(item, typ) {
|
| | | this.inDetail = true;
|
| | | this.detailProductID = item.id;
|
| | |
| | | this.detailType = this.activeName == "应用中心" ? "inactive" : "active";
|
| | | }
|
| | | },
|
| | | // checkInWindow(item) {
|
| | | // this.backStack.push([this.productDetail, this.otherProducts]);
|
| | | // this.backDisable = false;
|
| | | // this.checkIsDefOrNot(item.id);
|
| | |
|
| | | // 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,
|
| | | // ];
|
| | | // for (let i = 0; i < allNeedToNew.length; i++) {
|
| | | // const item = allNeedToNew[i];
|
| | | // if (item.id == _this.productDetail.productBaseId) {
|
| | | // flag = true;
|
| | | // }
|
| | | // }
|
| | | // this.needToUpgradeInWin = flag;
|
| | | // _this.productDetail.isUpgrade = flag;
|
| | |
|
| | | // _this.otherProducts = res.data.randoms;
|
| | | // });
|
| | | // },
|
| | | checkIsDefOrNot(id) {
|
| | | if (id.length > 10) {
|
| | | this.isDefaultApp = false;
|
| | | } else {
|
| | | this.isDefaultApp = true;
|
| | | }
|
| | | this.isDefaultApp = id.length <= 10;
|
| | | },
|
| | | // backwards() {
|
| | | // if (this.backStack.length == 0) {
|
| | | // this.backDisable = true;
|
| | | // return;
|
| | | // }
|
| | | // this.forwardStack.push([this.productDetail, this.otherProducts]);
|
| | | // let item = this.backStack.pop();
|
| | | // this.productDetail = item[0];
|
| | | // this.checkIsDefOrNot(this.productDetail.productBaseId);
|
| | | // this.otherProducts = item[1];
|
| | | // this.forwardDisable = false;
|
| | | // if (this.backStack.length == 0) {
|
| | | // this.backDisable = true;
|
| | | // }
|
| | | // },
|
| | | forwards() {
|
| | | if (this.forwardStack.length == 0) {
|
| | | this.forwardDisable = true;
|
| | |
| | | })
|
| | | .catch((e) => {});
|
| | | },
|
| | | // toActivatePage(item) {
|
| | | // this.checkDetail(item, "inactive");
|
| | | // this.actType = this.activeTab;
|
| | | // this.actId = item.id;
|
| | | // this.actStep = 0;
|
| | | // this.activeCode = "";
|
| | | // this.activedSdkOrApp = this.newActInfo();
|
| | | // },
|
| | | // cancelActivate() {
|
| | | // this.showInputCode = false;
|
| | | // this.activeCode = "";
|
| | | // },
|
| | | newActInfo() {
|
| | | return {
|
| | | activateCode: "",
|
| | |
| | | getUnActivedApp().then((res) => {
|
| | | if (res.code == 200) {
|
| | | this.unActivedAppList = res.data;
|
| | | this.pickTab()
|
| | | this.pickTab();
|
| | | }
|
| | | });
|
| | | },
|
| | |
| | | });
|
| | | }
|
| | | },
|
| | | // checkMyAlgorith() {
|
| | | // this.showActivateSuccess = false;
|
| | | // this.activeName = "已激活";
|
| | | // },
|
| | | onFileUpload(file) {
|
| | | this.patchFile = { ...file };
|
| | | this.fileAdded = true;
|
| | |
| | | version: res.data.apps[0].version,
|
| | | productName: res.data.productName,
|
| | | installContent: res.data.apps[0].installContent,
|
| | | |
| | | };
|
| | | }
|
| | | if (res.data.sdks.length > 0) {
|
| | |
| | | this.$message.error(e.msg);
|
| | | });
|
| | | },
|
| | | // openApp() {
|
| | | // window.parent.postMessage(
|
| | | // { msg: "toOpenApp?" + this.productDetail.productBaseId },
|
| | | // "*"
|
| | | // );
|
| | | // },
|
| | | onFileAdded(f) {
|
| | | this.patchUpdateStatus = "";
|
| | | },
|
| | |
| | | this.notInstalledList = unInstalledList;
|
| | | this.toUpdateArr1 = this.installedList.slice(0, 10);
|
| | | this.hasNewVersionSdk = hasNewVersionList;
|
| | | this.pickTab()
|
| | | this.pickTab();
|
| | | },
|
| | | // unloadSDKinWin() {
|
| | | // let appToUnload;
|
| | | // let sdkToUnload;
|
| | | // if (this.productDetail.productTypeName == "应用") {
|
| | | // appToUnload = this.installedApps.find((item) => {
|
| | | // return item.id == this.productDetail.productBaseId;
|
| | | // });
|
| | | // this.unloadApp(appToUnload);
|
| | | // } else {
|
| | | // sdkToUnload = this.installedList.find((item) => {
|
| | | // return item.id == this.productDetail.productBaseId;
|
| | | // });
|
| | | // this.unloadSdk(sdkToUnload);
|
| | | // }
|
| | | // },
|
| | | // unLoadSdkOrApp(item) {
|
| | | // this.activeTab == "sdk" ? this.unloadSdk(item) : this.unloadApp(item);
|
| | | // },
|
| | | unloadSdk(sdk) {
|
| | | let _this = this;
|
| | | this.$confirm("确定要卸载该算法吗?", "提示")
|
| | |
| | | })
|
| | | .catch((e) => {});
|
| | | },
|
| | |
|
| | | donwloadSDK(item) {
|
| | | let timer = null;
|
| | | item.upgradeLoading = true;
|
| | |
| | | clearInterval(timer);
|
| | | item.upgradeLoading = false;
|
| | | this.downloadItem = "";
|
| | | |
| | |
|
| | | window.parent.postMessage({ msg: "AppUpdate" }, "*");
|
| | | })
|
| | | .catch((err) => {
|
| | |
| | | this.sdkUpgreading = true;
|
| | | },
|
| | | autoRefreshAppAndSdkState() {
|
| | | // 关闭后退出
|
| | | this.getAllApps();
|
| | | this.getAllSdk();
|
| | | if (!this.autoRefresh) {
|
| | | return;
|
| | | }
|
| | | if (this.appUpgreading) {
|
| | | this.getAllApps();
|
| | | }
|
| | | if (this.sdkUpgreading) {
|
| | | this.getAllSdk();
|
| | | }
|
| | | let _this = this;
|
| | | setTimeout(() => {
|
| | | _this.autoRefreshAppAndSdkState();
|
| | | if (this.appUpgreading) {
|
| | | this.getAllApps();
|
| | | }
|
| | | if (this.sdkUpgreading) {
|
| | | this.getAllSdk();
|
| | | }
|
| | | }, 1000);
|
| | | },
|
| | | },
|
| | |
| | | text-align: center;
|
| | | position: relative;
|
| | | .check-btn {
|
| | | background-color:#FFFFFF !important;
|
| | | border-color: #BDBDBD !important;
|
| | | background-color: #ffffff !important;
|
| | | border-color: #bdbdbd !important;
|
| | | color: #333333;
|
| | | }
|
| | | .update-btn {
|