From e65c4102f0175d666746936381c3dee278358a72 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期二, 27 十月 2020 16:22:00 +0800 Subject: [PATCH] 添加apps.json代理,整理代码 --- src/pages/ai/index/App.vue | 56 +++++++++++++++++++++++++++----------------------------- 1 files changed, 27 insertions(+), 29 deletions(-) diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue index fd0c57f..c836d3e 100644 --- a/src/pages/ai/index/App.vue +++ b/src/pages/ai/index/App.vue @@ -505,7 +505,7 @@ // }); // return arr; // }, - isAdmin () { + isAdmin() { if ( sessionStorage.getItem("userInfo") && sessionStorage.getItem("userInfo") !== "" @@ -517,7 +517,7 @@ return false; }, }, - data () { + data() { return { sdkList: [], installedList: [], @@ -568,7 +568,7 @@ } } }, - mounted () { + mounted() { // 鑾峰彇鎵�鏈夊簲鐢� this.getAllSdk(); this.getAllApps(); @@ -577,11 +577,11 @@ this.getUnActivedAppList(); }, methods: { - isShow (authority) { + isShow(authority) { return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1 }, //绂荤嚎瀹夎 - offlineInstall () { + offlineInstall() { this.installDialogVisible = false; this.isInstall = true; //瀹夎 @@ -611,7 +611,7 @@ }); }) }, - downloadApp (app, action) { + downloadApp(app, action) { if (action == 'upgrade') { app.upgradeLoading = true; } else { @@ -654,7 +654,7 @@ this.appUpgreading = true; this.startAutoFresh(); }, - async getAllApps () { + async getAllApps() { let iArry = [] let sArry = [] @@ -680,7 +680,7 @@ this.storeApps = sArry; }, //鍗歌浇搴旂敤 - unLoad (app) { + unLoad(app) { app.unloadLoading = true; let _this = this; removeApp({ appId: app.id }).then(res => { @@ -707,7 +707,7 @@ // this.activeCode = ''; // this.activedSdkOrApp = this.newActInfo() // }, - actSdkOrApp (id, type = 'sdk') { + actSdkOrApp(id, type = 'sdk') { this.actType = type; this.actId = id; this.actDrawerShow = true; @@ -715,7 +715,7 @@ this.activeCode = ''; this.activedSdkOrApp = this.newActInfo() }, - newActInfo () { + newActInfo() { return { activateCode: '', productName: '', @@ -725,7 +725,7 @@ devIds: '' } }, - getUnActivedList () { + getUnActivedList() { getUnActivedSdk().then(res => { if (res.code == 200) { this.unActivedSDKList = res.data; @@ -733,14 +733,14 @@ }) }, - getUnActivedAppList () { + getUnActivedAppList() { getUnActivedApp().then(res => { if (res.code == 200) { this.unActivedAppList = res.data; } }); }, - actived () { + actived() { let _this = this; if (this.actType == 'sdk') { //婵�娲荤畻娉� @@ -778,12 +778,12 @@ }); } }, - getCodeDetail () { }, - checkMyAlgorith () { + getCodeDetail() { }, + checkMyAlgorith() { this.actDrawerShow = false; this.activeName = "myAlgorithm"; }, - onFileUpload (file) { + onFileUpload(file) { //this.patchUpdateStatus = `<span style="color:green">涓婁紶鎴愬姛, 鐐瑰嚮鍗囩骇鎸夐挳寮�濮嬪畨瑁�</span>`; this.patchFile = { ...file }; this.fileAdded = true; @@ -794,7 +794,6 @@ _this.installFile = file; if (res.success) { _this.installDialogVisible = true; - debugger if (res.data.apps.length > 0) { _this.installAppPackage = { appId: res.data.apps[0].appId, @@ -821,11 +820,11 @@ }, - onFileAdded (f) { + onFileAdded(f) { this.patchUpdateStatus = ""; }, - async getAllSdk () { + async getAllSdk() { let installedList = []; let unInstalledList = []; let res = await findAllSdk(); @@ -861,8 +860,7 @@ this.notInstalledList = unInstalledList; }, - donwload (item) { - debugger + donwload(item) { item.upgradeLoading = true; //this.downloading = true; this.downloadItem = item.id; @@ -891,14 +889,14 @@ this.appUpgreading = true; this.startAutoFresh(); }, - inputBlur (item) { + inputBlur(item) { // console.log(item, '淇敼鍚嶇О') this.$set(item, "isEdit", false); }, - handleTabClick () { + handleTabClick() { }, - startAutoFresh () { + startAutoFresh() { if (this.freshTimer) { clearTimeout(this.freshTimer) } @@ -981,7 +979,7 @@ .src-title { //color: #bfbfbf; color: #bbcee8; - font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC'; + font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC"; font-weight: 650; font-style: normal; height: 36px; @@ -1006,7 +1004,7 @@ position: absolute; top: 50%; left: 50%; - background: url('/images/algo/green.gif'); + background: url("/images/algo/green.gif"); overflow: hidden; transform: translate(-50%, -50%); .inner-bar { @@ -1168,16 +1166,16 @@ } } .drawer-content { - font-family: 'PingFangSC-Regular'; + font-family: "PingFangSC-Regular"; .el-step__title.is-process { border-color: #3d68e1 !important; color: #3d68e1 !important; - font-family: Tahoma, Helvetica, Arial, '\5B8B\4F53', sans-serif; + font-family: Tahoma, Helvetica, Arial, "\5B8B\4F53", sans-serif; } .el-step__head.is-process { border-color: #3d68e1 !important; color: #3d68e1 !important; - font-family: Tahoma, Helvetica, Arial, '\5B8B\4F53', sans-serif; + font-family: Tahoma, Helvetica, Arial, "\5B8B\4F53", sans-serif; } .el-input { width: 100%; -- Gitblit v1.8.0