From abc651b2192b0fb7bc18f921f65d40f0dc8ae327 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期三, 28 四月 2021 10:32:46 +0800
Subject: [PATCH] 修改应用中心图标样式
---
src/pages/ai/index/App.vue | 281 ++++++++++++++++++++++++++++---------------------------
1 files changed, 143 insertions(+), 138 deletions(-)
diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index f863a7c..187b5ef 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -36,7 +36,7 @@
<i class="iconfont iconupdate" v-if="item.isUpgrade"></i>
<div class="mask" v-if="!item.isDefault || item.isUpgrade">
<div class="left-top">
- <div>褰撳墠鐗堟湰1:{{ item.version }}</div>
+ <div>褰撳墠鐗堟湰:{{ item.version }}</div>
<div v-if="item.remoteVersion">鏈�鏂扮増鏈�:{{ item.remoteVersion }}</div>
</div>
<div class="info-onmask" @click="checkDetail(item, 'active')">鏌ョ湅璇︽儏</div>
@@ -53,7 +53,7 @@
type="warning"
size="small"
class="bot-btn"
- >鍗囩骇1</el-button>
+ >鍗囩骇</el-button>
</div>
</div>
<img
@@ -104,7 +104,7 @@
@click="checkDetail(item, 'activeNotInstall')"
>鏌ョ湅璇︽儏</div>
<div class="mask-btn">
- <el-button @click="donwload(item, 1)" type="primary" class="bot-btn">瀹夎</el-button>
+ <el-button @click="donwload(item,1)" type="primary" class="bot-btn">瀹夎</el-button>
</div>
</div>
<div class="click-download" title="涓嬭浇">
@@ -165,7 +165,7 @@
<div v-if="item.remoteVersion">鏈�鏂扮増鏈�:{{ item.remoteVersion }}</div>
</div>
<!-- v-if="!item.isDefault" -->
- <div class="info-onmask" @click="checkDetail(item, 'active')">鏌ョ湅璇︽儏</div>
+ <div class="info-onmask" @click="checkDetail(item,'active')">鏌ョ湅璇︽儏</div>
<div class="mask-btn">
<el-button
v-show="!item.isDefault"
@@ -283,7 +283,9 @@
</el-tab-pane>
<el-tab-pane label="搴旂敤涓績" name="algorithmMall" v-if="isShow('algorithmManage:buy')">
<div class="tab-content">
- <p class="src-title">绠楁硶杞欢</p>
+ <div class="flex-title">
+ <p class="src-title">绠楁硶杞欢</p>
+ </div>
<div class="store-list flex-list">
<div class="wrap-box" v-for="item in unActivedSDKList" :key="item.id">
<div class="list-choose-item-left">
@@ -376,7 +378,7 @@
<div>褰撳墠鐗堟湰:{{ item.version }}</div>
<div v-if="item.remoteVersion">鏈�鏂扮増鏈�:{{ item.remoteVersion }}</div>
</div>
- <div class="info-onmask" @click="actSdkOrApp(item, 'app')">鏌ョ湅璇︽儏</div>
+ <div class="info-onmask" @click="actSdkOrApp(item,'app')">鏌ョ湅璇︽儏</div>
<div class="mask-btn">
<el-button
@click="actSdkOrApp(item, 'app')"
@@ -420,7 +422,7 @@
</el-tab-pane>
<el-tab-pane name="update">
<span slot="label">
- <el-badge class="update-badge" :value="updateNum" :hidden="updateNum == 0">鏇存柊</el-badge>
+ <el-badge class="update-badge" :value="updateNum" :hidden="updateNum==0">鏇存柊</el-badge>
</span>
<div class="task-list">
<div class="flex-title">
@@ -429,9 +431,9 @@
</div>
<div class="flex-list">
<div
- v-if="hasNewVersionSdk.length == 0"
+ v-if="hasNewVersionSdk.length==0"
class="empty-tip"
- >{{ errMsg ? errMsg : "鏆傛棤鏁版嵁" }}</div>
+ >{{errMsg?errMsg:"鏆傛棤鏁版嵁"}}</div>
<div class="wrap-box" v-for="item in hasNewVersionSdk" :key="item.id">
<div class="list-choose-item-left">
<div class="list-complete-item-handle">
@@ -448,7 +450,7 @@
<div>褰撳墠鐗堟湰:{{ item.version }}</div>
<div v-if="item.remoteVersion">鏈�鏂扮増鏈�:{{ item.remoteVersion }}</div>
</div>
- <div class="info-onmask" @click="checkDetail(item, 'active')">鏌ョ湅璇︽儏</div>
+ <div class="info-onmask" @click="checkDetail(item,'active')">鏌ョ湅璇︽儏</div>
<div class="mask-btn">
<el-button
@click="unLoadSdk(item)"
@@ -514,7 +516,7 @@
<div>褰撳墠鐗堟湰:{{ item.version }}</div>
<div v-if="item.remoteVersion">鏈�鏂扮増鏈�:{{ item.remoteVersion }}</div>
</div>
- <div class="info-onmask" @click="checkDetail(item, 'active')">鏌ョ湅璇︽儏</div>
+ <div class="info-onmask" @click="checkDetail(item,'active')">鏌ョ湅璇︽儏</div>
<div class="mask-btn">
<el-button
v-if="!item.isDefault"
@@ -617,7 +619,7 @@
<!-- <div class="dialog-content" v-if="productDetailVisible" > -->
<el-dialog class="product-detail-dialog" :visible="productDetailVisible" @close="closeDial">
<!-- <el-button-group> -->
- <div class="button-group" v-show="!backDisable || !forwardDisable">
+ <div class="button-group" v-show="!backDisable||!forwardDisable">
<el-button size="small" @click="backwards" :disabled="backDisable">
<span><</span>
</el-button>
@@ -626,7 +628,7 @@
<!-- <el-button type="primary" size="small"><i class="el-icon-arrow-right el-icon--right"></i></el-button> -->
</div>
<!-- </el-button-group> -->
- <div class="dialog-title" slot="title">{{ isSDKDialog ? "绠楁硶璇︽儏" : "搴旂敤璇︽儏" }}</div>
+ <div class="dialog-title" slot="title">{{isSDKDialog?"绠楁硶璇︽儏":"搴旂敤璇︽儏"}}</div>
<div class="dialog-content">
<div class="box-top">
<div class="top-left">
@@ -693,31 +695,35 @@
<el-button
size="small"
type="warning"
- v-if="needToUpgradeInWin || productDetail.isUpgrade"
+ v-if="needToUpgradeInWin||productDetail.isUpgrade"
@click="upgradeSDKinWin"
- >{{ isUpgrading ? "鍗囩骇涓�.." : "鍗囩骇" }}</el-button>
+ >
+ {{
+ isUpgrading ? "鍗囩骇涓�.." : "鍗囩骇"
+ }}
+ </el-button>
<el-button
size="small"
type="primary"
- v-if="isActive && !isDefaultApp"
+ v-if="isActive&&!isDefaultApp"
@click="unloadSDKinWin"
>鍗歌浇</el-button>
<el-button
size="small"
type="primary"
- v-if="!isActive && !showInstallNotActive"
- @click="showInputCode = !showInputCode"
+ v-if="!isActive&&!showInstallNotActive"
+ @click="showInputCode=!showInputCode"
>婵�娲�</el-button>
<el-button
size="small"
type="primary"
- v-if="!isActive && showInstallNotActive"
+ v-if="!isActive&&showInstallNotActive"
@click="downloadSdkInSide"
- >{{ isUpgrading ? "瀹夎涓�.." : "瀹夎" }}</el-button>
+ >{{isUpgrading?"瀹夎涓�..":"瀹夎"}}</el-button>
<el-button
size="small"
type="success"
- v-if="!isSDKDialog && isActive"
+ v-if="!isSDKDialog&&isActive"
@click="openApp"
>鎵撳紑</el-button>
</div>
@@ -780,7 +786,13 @@
size="small"
effect="dark"
>{{ item.title === "" ? "鏆傛棤鏁版嵁" : item.title }}</el-tag>
- <div class="desc">{{ item.desc === "" ? "鏆傛棤鏁版嵁" : item.desc }}</div>
+ <div class="desc">
+ {{
+ item.desc === ""
+ ? "鏆傛棤鏁版嵁"
+ : item.desc
+ }}
+ </div>
</div>
</div>
</div>
@@ -811,14 +823,10 @@
<el-tooltip
class
effect="dark"
- :content="item.name === '' ? '鏆傛棤鏁版嵁' : item.name"
+ :content="item.name === '' ? '鏆傛棤鏁版嵁':item.name"
placement="top-start"
>
- <span>
- {{
- item.name === "" ? "鏆傛棤鏁版嵁" : item.name
- }}
- </span>
+ <span>{{ item.name === "" ? "鏆傛棤鏁版嵁" : item.name }}</span>
</el-tooltip>
</div>
</div>
@@ -991,7 +999,7 @@
showInputCode: false,
needToUpgradeInWin: false,
errMsg: "",
- showInstallNotActive: false,
+ showInstallNotActive: false
};
},
directives: {
@@ -1030,31 +1038,31 @@
}
},
closeDial() {
- this.productDetailVisible = false;
- this.productDetail = {};
- this.otherProducts = [];
+ this.productDetailVisible = false
+ this.productDetail = {}
+ this.otherProducts = []
},
checkDetail(item, type) {
- if (type == "inactive") {
- this.isActive = false;
- this.showInstallNotActive = false;
- this.showInputCode = false;
- } 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;
+ if (type == 'inactive') {
+ this.isActive = false
+ this.showInstallNotActive = false
+ this.showInputCode = false
+ } 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;
- this.resetStack();
+ this.checkIsDefOrNot(item.id)
+ this.needToUpgradeInWin = item.isUpgrade ? true : false
+ this.resetStack()
if (item.sdk_type === undefined) {
- this.isSDKDialog = false;
+ this.isSDKDialog = false
} else {
- this.isSDKDialog = true;
+ this.isSDKDialog = true
}
this.productDetailVisible = true;
let _this = this;
@@ -1067,76 +1075,76 @@
});
},
resetStack() {
- this.forwardStack = [];
- this.backStack = [];
- this.backDisable = true;
- this.forwardDisable = true;
+ this.forwardStack = []
+ this.backStack = []
+ this.backDisable = true
+ this.forwardDisable = true
+
},
checkInWindow(item) {
- this.backStack.push([this.productDetail, this.otherProducts]);
- this.backDisable = false;
- this.checkIsDefOrNot(item.id);
+ 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,
- ];
+ _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;
+ flag = true
}
}
- this.needToUpgradeInWin = flag;
- _this.productDetail.isUpgrade = flag;
+ this.needToUpgradeInWin = flag
+ _this.productDetail.isUpgrade = flag
_this.otherProducts = res.data.randoms;
});
},
checkIsDefOrNot(id) {
if (id.length > 10) {
- this.isDefaultApp = false;
+ this.isDefaultApp = false
} else {
- this.isDefaultApp = true;
+ this.isDefaultApp = true
}
},
backwards() {
if (this.backStack.length == 0) {
- this.backDisable = true;
- return;
+ 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;
+ 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;
+ this.backDisable = true
+
}
},
forwards() {
if (this.forwardStack.length == 0) {
- this.forwardDisable = true;
- return;
+ this.forwardDisable = true
+ return
}
- this.backStack.push([this.productDetail, this.otherProducts]);
- this.backDisable = false;
- let item = this.forwardStack.pop();
+ this.backStack.push([this.productDetail, this.otherProducts])
+ this.backDisable = false
+ let item = this.forwardStack.pop()
- this.productDetail = item[0];
- this.otherProducts = item[1];
+ this.productDetail = item[0]
+ this.otherProducts = item[1]
if (this.forwardStack.length == 0) {
- this.forwardDisable = true;
+ this.forwardDisable = true
}
+
},
//绂荤嚎瀹夎
offlineInstall() {
@@ -1254,7 +1262,7 @@
let _this = this;
this.$confirm("纭畾瑕佸嵏杞借搴旂敤鍚�?", "鎻愮ず")
.then(() => {
- _this.productDetailVisible = false;
+ _this.productDetailVisible = false
app.unloadLoading = true;
removeApp({ appId: app.id })
@@ -1295,8 +1303,8 @@
},
cancelActivate() {
- this.showInputCode = false;
- this.activeCode = "";
+ this.showInputCode = false
+ this.activeCode = ""
},
newActInfo() {
return {
@@ -1338,7 +1346,7 @@
if (res.data.isSuccess) {
this.productDetailVisible = false;
_this.activedSdkOrApp = res.data.successMsg;
- this.showActivateSuccess = true;
+ this.showActivateSuccess = true
_this.actStep++;
_this.getUnActivedList();
_this.getAllSdk();
@@ -1359,7 +1367,7 @@
if (res.data.isSuccess) {
this.productDetailVisible = false;
_this.activedSdkOrApp = res.data.successMsg;
- this.showActivateSuccess = true;
+ this.showActivateSuccess = true
_this.actStep++;
_this.getUnActivedAppList();
_this.getAllApps();
@@ -1418,13 +1426,10 @@
});
},
openApp() {
- let message = "toOpenApp?" + this.productDetail.productBaseId;
- window.parent.postMessage(
- {
- msg: message,
- },
- "*"
- );
+ let message = 'toOpenApp?' + this.productDetail.productBaseId;
+ window.parent.postMessage({
+ msg: message
+ }, "*")
},
onFileAdded(f) {
@@ -1452,7 +1457,7 @@
//绠楁硶杞欢 宸插畨瑁呭叾涓寘鍚緟鍗囩骇 鏈畨瑁�
item.installed ? installedList.push(obj) : unInstalledList.push(obj);
- item.isUpgrade ? hasNewVersionList.push(obj) : null;
+ item.isUpgrade ? hasNewVersionList.push(obj) : null
});
}
this.installedList = installedList;
@@ -1460,18 +1465,19 @@
this.hasNewVersionSdk = hasNewVersionList;
},
unloadSDKinWin() {
- let appToUnload;
- let sdkToUnload;
+
+ let appToUnload
+ let sdkToUnload
if (this.productDetail.productTypeName == "搴旂敤") {
appToUnload = this.installedApps.find((item) => {
- return item.id == this.productDetail.productBaseId;
- });
- this.unLoad(appToUnload);
+ return item.id == this.productDetail.productBaseId
+ })
+ this.unLoad(appToUnload)
} else {
sdkToUnload = this.installedList.find((item) => {
- return item.id == this.productDetail.productBaseId;
- });
- this.unLoadSdk(sdkToUnload);
+ return item.id == this.productDetail.productBaseId
+ })
+ this.unLoadSdk(sdkToUnload)
}
},
//鍗歌浇绠楁硶
@@ -1479,7 +1485,7 @@
let _this = this;
this.$confirm("纭畾瑕佸嵏杞借绠楁硶鍚�?", "鎻愮ず")
.then(() => {
- _this.productDetailVisible = false;
+ _this.productDetailVisible = false
sdk.unloadLoading = true;
removeSdk({ sdkId: sdk.id })
.then((res) => {
@@ -1521,9 +1527,10 @@
message: "鍗囩骇瀹屾垚",
type: "success",
});
- this.needToUpgradeInWin = false;
- this.productDetail.isUpgrade = false;
+ this.needToUpgradeInWin = false
+ this.productDetail.isUpgrade = false
this.isUpgrading = !this.isUpgrading;
+
}
})
.catch((e) => {
@@ -1538,27 +1545,28 @@
// 寮�鍚嚜鍔ㄥ埛鏂�
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",
- });
- })
- .catch((err) => {
- this.$notify({
- title: "鍗囩骇澶辫触",
- message: err.data,
- type: "warning",
- });
- this.isUpgrading = !this.isUpgrading;
+ downloadSdk({ path: this.productDetail.productBaseId }).then((res) => {
+ this.needToUpgradeInWin = false
+ this.productDetail.isUpgrade = false
+ this.isUpgrading = !this.isUpgrading;
+ this.$notify({
+ title: "鎴愬姛",
+ message: "鍗囩骇瀹屾垚",
+ type: "success",
});
+ }).catch((err) => {
+ this.$notify({
+ title: "鍗囩骇澶辫触",
+ message: err.data,
+ type: "warning",
+ });
+ this.isUpgrading = !this.isUpgrading;
+ })
this.sdkUpgreading = true;
}
+
+
+
},
downloadSdkInSide() {
this.downloadItem = this.productDetail.productBaseId;
@@ -1571,7 +1579,7 @@
type: "success",
message: "绠楁硶宸插畨瑁�",
});
- this.isUpgrading = false;
+ this.isUpgrading = false
})
.catch((err) => {
this.$notify({
@@ -1579,13 +1587,12 @@
message: err.data,
});
this.downloadItem = "";
- this.isUpgrading = false;
+ this.isUpgrading = false
});
// 寮�鍚嚜鍔ㄥ埛鏂�
this.sdkUpgreading = true;
},
donwload(item, typ) {
-
item.upgradeLoading = true;
this.downloadItem = item.id;
@@ -1596,7 +1603,7 @@
this.downloadItem = "";
this.$notify({
type: "success",
- message: typ == 1 ? "绠楁硶瀹夎鎴愬姛" : "绠楁硶鍗囩骇鎴愬姛",
+ message: typ == 1 ? "绠楁硶瀹夎鎴愬姛" : "绠楁硶鍗囩骇鎴愬姛"
});
})
.catch((err) => {
@@ -1751,13 +1758,10 @@
overflow: hidden;
.summary {
height: 120px;
-
margin: 5px 5px 0 5px;
-
.icon {
margin: 0 10px;
margin-top: 8px;
-
float: left;
.baseImg {
max-width: 106px;
@@ -2022,6 +2026,7 @@
.el-tabs--border-card > .el-tabs__content {
padding: 0 !important;
overflow: auto !important;
+ background-color: #1c364a;
}
.el-tabs__content {
padding: 0 !important;
@@ -2065,7 +2070,7 @@
}
}
.task-list {
- background:#1c364a;
+ background: #1c364a;
padding: 20px;
box-sizing: border-box;
@@ -2098,7 +2103,7 @@
display: flex;
flex-wrap: wrap;
.wrap-box {
- width: 11.6%;
+ width: 11%;
margin-bottom: 30px;
.list-choose-item-left {
width: 80%;
@@ -2219,7 +2224,7 @@
}
}
.tab-content {
- padding: 30px 20px;
+ padding: 20px 20px;
}
}
.mask {
@@ -2346,7 +2351,7 @@
}
.list-choose-item-left-uninstal {
color: gray;
- filter: grayscale(100%);;
+ filter: grayscale(100%);
}
.list-complete-item.sortable-chosen {
background: #4ab7bd;
--
Gitblit v1.8.0