From 3300f811726041a3175784324eb2be9458e80e09 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期三, 21 十月 2020 10:37:10 +0800
Subject: [PATCH] 左侧目录树图标对齐
---
src/pages/ai/index/App.vue | 638 +++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 476 insertions(+), 162 deletions(-)
diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index 320b0d1..5a47303 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -8,7 +8,7 @@
</div>
</div>
<!-- 瓒呯骇绠$悊鍛樺彲瑙� -->
- <div class="super" v-if="isSuperUser">
+ <div class="super">
<div class="left-box">
<!-- <div class="title">
<label>绠楁硶搴�</label>
@@ -23,23 +23,35 @@
<div class="width-new-line task-list" v-show="activeName === 'myAlgorithm'">
<p class="src-title">绠楁硶杞欢</p>
<div class="flex-list">
- <div class="wrap-box" v-for="item in ungradeList" :key="item.id">
+ <div class="wrap-box" v-for="item in ungradeList" :key="'upgrade'+item.id">
<div class="list-choose-item-left">
- <div class="mask flex-center">
- <div class="info-onmask">
- <div>褰撳墠鐗堟湰:{{item.version}}</div>
- <div>杩滅鐗堟湰:{{item.remoteVersion}}</div>
- </div>
- <el-button type="primary" class="bot-btn" @click="donwload(item)">鍗囩骇</el-button>
- </div>
-
<div class="list-complete-item-handle">
- <div class="svg-wrap">
+ <div class="svg-wrap" :class="{willUpGrade:item.isUpgrade}">
+ <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>
+
+ <!-- <div class="list-complete-item-handle"> -->
+ <!-- <div class="svg-wrap" :class="{willUpGrade:item.isUpgrade}"> -->
<img
+ v-if="item.iconBlob"
class="baseImg"
- :src="`data:image/png;base64,${item.iconBlob}`"
+ :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;">
@@ -51,18 +63,20 @@
</div>
<div class="wrap-box" v-for="(item) in installedList" :key="item.id">
<div class="list-choose-item-left">
- <div class="list-complete-item-handle">
+ <div class="list-complete-item-handle">
<div class="svg-wrap">
<div class="mask flex-center" v-if="!item.isEdit">
<div class="info-onmask">
<div>褰撳墠鐗堟湰:{{item.version}}</div>
</div>
- </div>
+ </div>
<img
+ v-if="item.iconBlob"
class="baseImg"
- :src="`data:image/png;base64,${item.iconBlob}`"
+ :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;">
@@ -96,10 +110,12 @@
<div class="list-complete-item-handle">
<div class="svg-wrap">
<img
+ v-if="item.iconBlob"
class="baseImg"
- :src="`data:image/png;base64,${item.iconBlob}`"
+ :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;">
@@ -113,34 +129,101 @@
<p class="src-title">搴旂敤杞欢</p>
<div class="flex-list">
<div class="wrap-box" v-for="(item) in installedApps" :key="item.id">
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div class="svg-wrap" v-loading="item.unloadLoading" element-loading-text="鍗歌浇涓�" element-loading-background="rgba(0,0,0,.8)">
- <div class="mask" v-if="!item.isDefault">
+ <div class="list-choose-item-left">
+ <div class="list-complete-item-handle">
+ <div
+ class="svg-wrap"
+ :class="{willUpGrade:item.isUpgrade}"
+ v-loading="item.unloadLoading||item.upgradeLoading"
+ :element-loading-text="item.unloadLoading?'鍗歌浇涓�':'鍗囩骇涓�'"
+ element-loading-background="rgba(0,0,0,.8)"
+ >
+ <i class="iconfont iconupdate" v-if="item.isUpgrade"></i>
+ <div class="mask" v-if="!item.isDefault || item.isUpgrade">
+ <div class="info-onmask">
+ <div>褰撳墠鐗堟湰:{{item.version}}</div>
+ <div v-if="item.remoteVersion">鏈�鏂扮増鏈�:{{item.remoteVersion}}</div>
+ </div>
+ <div class="mask-btn">
<el-button
v-if="!item.isDefault"
@click="unLoad(item)"
type="primary"
+ size="small"
class="bot-btn"
>鍗歌浇</el-button>
- </div>
- <img class="baseImg" :src="`${item.iconBlob?'data:image/png;base64,'+item.iconBlob:item.icon}`" alt />
- </div>
- <div class="alg-name">
- <div style="padding:0px 10px 0px 10px;">
- <span v-if="!item.isEdit">{{ item.name }}</span>
- <el-input
+ <el-button
+ v-if="item.isUpgrade"
+ @click="downloadApp(item,'upgrade')"
+ type="warning"
size="small"
- v-model="item.sdk_name"
- v-if="item.isEdit"
- v-focus
- :maxlength="15"
- @blur="inputBlur(item)"
- ></el-input>
+ class="bot-btn"
+ >鍗囩骇</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 v-if="!item.isEdit">{{ item.name }}</span>
+ <el-input
+ size="small"
+ v-model="item.sdk_name"
+ v-if="item.isEdit"
+ v-focus
+ :maxlength="15"
+ @blur="inputBlur(item)"
+ ></el-input>
</div>
</div>
</div>
+ </div>
+ </div>
+ <div class="wrap-box" v-for="item in storeApps" :key="item.id">
+ <div class="list-choose-item-left">
+ <div class="list-complete-item-handle uninstall">
+ <div
+ class="svg-wrap"
+ v-loading="item.installLoading||item.upgradeLoading"
+ :element-loading-text="item.installLoading?'瀹夎涓�':'鍗囩骇涓�'"
+ element-loading-background="rgba(0,0,0,.8)"
+ >
+ <div class="mask">
+ <el-button
+ type="primary"
+ class="bot-btn"
+ @click="downloadApp(item)"
+ >瀹夎</el-button>
+ </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 v-if="!item.isEdit">{{ item.name }}</span>
+ <el-input
+ size="small"
+ v-model="item.name"
+ v-if="item.isEdit"
+ v-focus
+ :maxlength="15"
+ @blur="inputBlur(item)"
+ ></el-input>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -149,7 +232,7 @@
<el-tab-pane
label="绂荤嚎鍗囩骇/瀹夎"
name="upgradeOrInstallation"
- v-show="activeName==='upgradeOrInstallation'"
+ v-if="isShow('algorithmManage:insOffLine')"
>
<div class="tab-content">
<div class="action-bar">
@@ -165,7 +248,7 @@
</div>
</div>
</el-tab-pane>
- <el-tab-pane label="搴旂敤涓績" name="algorithmMall" v-show="activeName==='algorithmMall'">
+ <el-tab-pane label="搴旂敤涓績" name="algorithmMall" v-if=" isShow('algorithmManage:buy')">
<div class="tab-content">
<p class="src-title">绠楁硶杞欢</p>
<div class="store-list flex-list">
@@ -173,17 +256,19 @@
<div class="list-choose-item-left">
<div class="list-complete-item-handle">
<div class="alg-icon svg-wrap">
- <div class="mask" @click="actSdk(item.id)">
+ <div class="mask" @click="actSdkOrApp(item.id)">
<span
class="iconfont iconyunxiazai"
style="color:#ff6a00;font-size:20px;position:absolute;top:45%;left:45%"
></span>
</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;">
@@ -204,18 +289,23 @@
</div>
<p class="src-title">搴旂敤杞欢</p>
<div class="app-list flex-list">
- <div class="wrap-box" v-for="item in storeApps" :key="item.id">
+ <div class="wrap-box" v-for="item in unActivedAppList" :key="item.id">
<div class="list-choose-item-left">
<div class="list-complete-item-handle">
- <div class="svg-wrap" v-loading="item.installLoading" element-loading-text="瀹夎涓�" element-loading-background="rgba(0,0,0,.8)">
- <div class="mask">
- <el-button type="primary" class="bot-btn" @click="downloadApp(item)">瀹夎</el-button>
+ <div class="alg-icon svg-wrap">
+ <div class="mask" @click="actSdkOrApp(item.id,'app')">
+ <span
+ class="iconfont iconyunxiazai"
+ style="color:#ff6a00;font-size:20px;position:absolute;top:45%;left:45%"
+ ></span>
</div>
<img
+ v-if="item.iconBlob"
class="baseImg"
- :src="item.iconBlob? 'data:image/png;base64,'+item.iconBlob:item.icon"
+ :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;">
@@ -234,7 +324,6 @@
</div>
</div>
</div>
-
</div>
<el-drawer title="涓嬭浇" :visible.sync="actDrawerShow" :direction="direction">
<div class="drawer-content">
@@ -262,23 +351,23 @@
<ul class="desc">
<li>
<label>婵�娲荤爜:</label>
- <span>{{activedSdk.activateCode}}</span>
+ <span>{{activedSdkOrApp.activateCode}}</span>
</li>
<li>
<label>浜у搧鍚嶇О:</label>
- <span>{{activedSdk.productName}}</span>
+ <span>{{activedSdkOrApp.productName}}</span>
</li>
<li>
<label>閰嶇疆璇︽儏:</label>
- <span>{{activedSdk.setting}}</span>
+ <span>{{activedSdkOrApp.setting}}</span>
</li>
<li>
<label>鏈嶅姟鍒版湡鏃�:</label>
- <span>{{activedSdk.expireTime}}</span>
+ <span>{{activedSdkOrApp.expireTime}}</span>
</li>
<li>
<label>璁稿彲璇�:</label>
- <span>{{activedSdk.licence}}</span>
+ <span>{{activedSdkOrApp.licence}}</span>
</li>
<!-- <li>
<label>璁惧ID:</label>
@@ -298,6 +387,52 @@
</div>
</div>
</div>
+ <el-dialog
+ title="瀹夎鍖呬俊鎭�"
+ :visible.sync="installDialogVisible"
+ width="40%"
+ :close-on-click-modal="false"
+ >
+ <div class="installInfo">
+ <template v-if="installAppPackage != null">
+ <div>
+ <div>
+ <span>瀹夎鍖呭悕绉帮細</span>
+ <span>{{installAppPackage.productName}}</span>
+ </div>
+ <div>
+ <span>瀹夎鐗堟湰锛�</span>
+ <span>{{installAppPackage.version}}</span>
+ </div>
+ <div>
+ <span>鏇存柊鍐呭锛�</span>
+ <span>{{installAppPackage.installContent}}</span>
+ </div>
+ </div>
+ </template>
+ <template v-if="installSdkPackage != null">
+ <div>
+ <div>
+ <span>瀹夎鍖呭悕绉帮細</span>
+ <span>{{installSdkPackage.productName}}</span>
+ </div>
+ <div>
+ <span>瀹夎鐗堟湰锛�</span>
+ <span>{{installSdkPackage.version}}</span>
+ </div>
+ <div>
+ <span>鏇存柊鍐呭锛�</span>
+ <span>{{installSdkPackage.installContent}}</span>
+ </div>
+ </div>
+ </template>
+ <p>纭畾瀹夎锛�</p>
+ </div>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="installDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="offlineInstall">瀹� 瑁�</el-button>
+ </div>
+ </el-dialog>
</div>
</template>
<script>
@@ -318,10 +453,11 @@
findByType,
getTagList,
downloadSdk,
- installSdk
+ installSdk,
+ getInstallInfo
} from "./api";
-import { getApps,installApp,removeApp } from "@/api/app";
-import { getUnActivedSdk, actPageAlg } from "@/api/app";
+import { getApps, installApp, removeApp, getUnActivedSdk, actPageAlg, getUnActivedApp, actApp } from "@/api/app";
+
import FileUploader from "@/components/subComponents/FileUpload/index";
import TaskManage from "@/Pool/TaskMange";
import VideoManageData from "@/Pool/VideoManageData";
@@ -344,17 +480,28 @@
},
ungradeList () {
// 鍗囩骇澶勭悊浼氬鑷撮噸澶嶇殑key,闇�瑕佷慨鏀�
- return [];
+ //return [];
return this.TaskMange.list1.filter(sdk => {
return sdk.isUpgrade === true;
});
},
+ isAdmin () {
+ if (
+ sessionStorage.getItem("userInfo") &&
+ sessionStorage.getItem("userInfo") !== ""
+ ) {
+ let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
+ return loginName === "superadmin" || loginName === "basic";
+ }
+ return false;
+ },
},
data () {
return {
TaskMange: new TaskManage,
VideoManageData: new VideoManageData,
+ buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
activeName: "myAlgorithm",
patchUpdateStatus: "",
dragging: false,
@@ -417,10 +564,17 @@
sceneSdks: [],
sceneRuleList: "",
isInstall: false,
+ installDialogVisible: false,
+ installPackage: {},
+ installAppPackage: null,
+ installSdkPackage: null,
installPercentage: 0,
unActivedSDKList: [],
- actSdkId: '',
- activedSdk: {
+ unActivedAppList: [],
+ //actSdkId: '',
+ actType: '',
+ actId: '',
+ activedSdkOrApp: {
activateCode: '',
productName: '',
setting: '',
@@ -430,8 +584,9 @@
},
// unloadLoading: false,
// installLoading: false,
- installedApps:[],
- storeApps:[]
+ installedApps: [],
+ storeApps: [],
+ installFile: {}
}
},
watch: {
@@ -463,75 +618,145 @@
this.findByType();
this.getBaseList();
this.findAll();
- this.getUser();
this.getUnActivedList();
+ this.getUnActivedAppList();
// this.TaskMange.findAllSdk();
// this.TaskMange.findByType();
this.VideoManageData.init();
},
methods: {
- downloadApp(app){
- app.installLoading = true;
+ isShow (authority) {
+ return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
+ },
+ //绂荤嚎瀹夎
+ offlineInstall () {
+ this.installDialogVisible = false;
+ this.isInstall = true;
+ //瀹夎
+ installSdk(this.installFile).then(res => {
+ debugger
+ if (res.success) {
+ this.isInstall = false;
+ this.$message({
+ type: 'success',
+ message: '瀹夎鎴愬姛,灏嗚烦杞嚦鎴戠殑绠楁硶涓煡鐪�'
+ });
+ setTimeout(() => {
+ this.findAllSdk();
+ this.getAllApps();
+ window.parent.postMessage({
+ msg: "AppUpdate"
+ }, '*')
+ this.activeName = 'myAlgorithm';
+ }, 3000);
+ }
+
+ }).catch(e => {
+ console.log(e)
+ this.isInstall = false;
+ this.$message({
+ type: 'error',
+ message: e.data
+ });
+ })
+ },
+ downloadApp (app, action) {
+ if (action == 'upgrade') {
+ app.upgradeLoading = true;
+ } else {
+ app.installLoading = true;
+ }
let _this = this;
- installApp(app).then(res=>{
- if(res && res.success){
- setTimeout(()=>{
- app.installLoading = false;
+
+ installApp({ path: app.id }).then(res => {
+ if (res && res.success) {
+ 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({
msg: "AppUpdate"
}, '*')
- },3000);
+ }, 3000);
+ }
+ }).catch(e => {
+ console.log(e);
+ if (action == 'upgrade') {
+ app.upgradeLoading = false;
+ } else {
+ app.installLoading = false;
}
})
},
- getAllApps(){
+ getAllApps () {
let _this = this;
_this.installedApps = [];
_this.storeApps = [];
- getApps().then(res=>{
- if(res && res.success){
+ getApps().then(res => {
+ if (res && res.success) {
//_this.storeApps = res.data;
- res.data.forEach(item=>{
- if(item.installed){
- let obj = Object.assign({unloadLoading:false},item)
+ res.data.forEach(item => {
+ if (item.installed) {
+ let obj = Object.assign({ unloadLoading: false, upgradeLoading: false }, item)
_this.installedApps.push(obj)
- }else{
- let obj = Object.assign({installLoading:false},item)
+ } else {
+ let obj = Object.assign({ installLoading: false, upgradeLoading: false }, item)
_this.storeApps.push(obj)
}
});
- console.log('_this.installedApps',_this.installedApps);
- console.log('_this.storeApps',_this.storeApps);
+ console.log('_this.installedApps', _this.installedApps);
+ console.log('_this.storeApps', _this.storeApps);
}
})
},
//鍗歌浇搴旂敤
- unLoad(app){
+ unLoad (app) {
app.unloadLoading = true;
let _this = this;
- removeApp({appId:app.id}).then(res=>{
-
- if(res && res.success){
- setTimeout(()=>{
+ removeApp({ appId: app.id }).then(res => {
+
+ if (res && res.success) {
+ setTimeout(() => {
app.unloadLoading = false;
_this.getAllApps();
window.parent.postMessage({
msg: "AppUpdate"
}, '*')
- },3000);
+ }, 3000);
}
+ }).catch(e => {
+ console.log(e);
+ app.unloadLoading = false;
})
},
- actSdk (id) {
- this.actSdkId = id;
+ // actSdk (id) {
+ // this.actSdkId = id;
+ // this.actDrawerShow = true;
+ // this.actStep = 0;
+ // this.activeCode = '';
+ // this.activedSdkOrApp = this.newActInfo()
+ // },
+ actSdkOrApp (id, type = 'sdk') {
+ this.actType = type;
+ this.actId = id;
this.actDrawerShow = true;
this.actStep = 0;
this.activeCode = '';
- this.activedSdk = this.newActInfo()
+ this.activedSdkOrApp = this.newActInfo()
},
- newActInfo(){
+ newActInfo () {
return {
activateCode: '',
productName: '',
@@ -549,26 +774,54 @@
})
},
+ getUnActivedAppList () {
+ getUnActivedApp().then(res => {
+ if (res.code == 200) {
+ this.unActivedAppList = res.data;
+ }
+ });
+ },
+
installFormat (percentage) {
return percentage === 100 ? '瀹夎鎴愬姛' : `${percentage}%`;
},
actived () {
let _this = this;
- actPageAlg(this.actSdkId, this.activeCode).then(res => {
- if (res.data.isSuccess) {
- _this.activedSdk = res.data.successMsg;
- _this.actStep++;
- _this.getUnActivedList();
- _this.findAllSdk();
- }else{
- _this.$notify({
- type:'error',
- message:res.data.failMsg.failMsg
- });
- }
- }).catch(e => {
- console.log(e)
- })
+ if (this.actType == 'sdk') {
+ //婵�娲荤畻娉�
+ actPageAlg(this.actId, this.activeCode).then(res => {
+ if (res.data.isSuccess) {
+ _this.activedSdkOrApp = res.data.successMsg;
+ _this.actStep++;
+ _this.getUnActivedList();
+ _this.findAllSdk();
+ } else {
+ _this.$notify({
+ type: 'error',
+ message: res.data.failMsg.failMsg
+ });
+ }
+ }).catch(e => {
+ console.log(e)
+ });
+ } else if (this.actType == 'app') {
+ //婵�娲诲簲鐢�
+ actApp(this.actId, this.activeCode).then(res => {
+ if (res.data.isSuccess) {
+ _this.activedSdkOrApp = res.data.successMsg;
+ _this.actStep++;
+ _this.getUnActivedAppList();
+ _this.getAllApps();
+ } else {
+ _this.$notify({
+ type: 'error',
+ message: res.data.failMsg.failMsg
+ });
+ }
+ }).catch(e => {
+ console.log(e)
+ });
+ }
},
getCodeDetail () { },
checkMyAlgorith () {
@@ -580,6 +833,79 @@
this.patchFile = { ...file };
this.fileAdded = true;
const h = this.$createElement;
+ //涓婁紶瀹屾垚鑾峰彇瀹夎淇℃伅
+ let _this = this;
+ getInstallInfo(file).then(res => {
+ _this.installFile = file;
+ if (res.success) {
+ _this.installDialogVisible = true;
+ debugger
+ if (res.data.apps.length > 0) {
+ _this.installAppPackage = {
+ appId: res.data.apps[0].appId,
+ version: res.data.apps[0].version,
+ productName: res.data.productName,
+ installContent: res.data.apps[0].installContent
+ }
+ }
+ if (res.data.sdks.length > 0) {
+ _this.installSdkPackage = {
+ appId: res.data.sdks[0].sdkId,
+ version: res.data.sdks[0].version,
+ productName: res.data.productName,
+ installContent: res.data.sdks[0].installContent
+ }
+ }
+
+ // this.$confirm('', '绠楁硶淇℃伅', {
+ // message: `<div class="installInfo">
+ // <div><span>绠楁硶鍚嶇О锛�</span><span>${file.filename}</span></div>
+ // <div><span>瀹夎鐗堟湰锛�</span><span></span></div>
+ // <div><span>鏇存柊鍐呭锛�</span><span></span></div>
+ // <p>纭畾瀹夎姝ょ畻娉曪紵</p>
+ // </div>`,
+ // confirmButtonText: '瀹夎',
+ // cancelButtonText: '鍙栨秷',
+ // dangerouslyUseHTMLString: true,
+ // type: ''
+ // }).then(() => {
+ // this.isInstall = true;
+ // //瀹夎
+ // installSdk(file).then(res => {
+ // debugger
+ // if (res.success) {
+ // this.isInstall = false;
+ // //this.$refs['progressBar'].style.width = 100%
+ // //this.installPercentage = 100%
+ // this.$message({
+ // type: 'success',
+ // message: '瀹夎鎴愬姛,灏嗚烦杞嚦鎴戠殑绠楁硶涓煡鐪�'
+ // });
+ // setTimeout(() => {
+ // this.findAllSdk();
+ // this.activeName = 'myAlgorithm';
+ // }, 3000)
+ // }
+
+ // }).catch(e => {
+ // console.log(e)
+ // this.isInstall = false;
+ // this.$message({
+ // type: 'error',
+ // message: e.data
+ // });
+ // })
+ // }).catch(() => {
+ // console.log('鍙栨秷瀹夎');
+
+ // })
+ }
+ }).catch(e => {
+ this.$message({
+ type: 'error',
+ message: e.data
+ });
+ })
// this.$msgbox({
// title: '绠楁硶淇℃伅',
// message: h('div', null, [
@@ -610,39 +936,7 @@
// });
// });
- this.$confirm('', '绠楁硶淇℃伅', {
- message: `<div class="installInfo">
- <div><span>绠楁硶鍚嶇О锛�</span><span>${file.filename}</span></div>
- <div><span>瀹夎鐗堟湰锛�</span><span></span></div>
- <div><span>鏇存柊鍐呭锛�</span><span></span></div>
- <p>纭畾瀹夎姝ょ畻娉曪紵</p>
- </div>`,
- confirmButtonText: '瀹夎',
- cancelButtonText: '鍙栨秷',
- dangerouslyUseHTMLString: true,
- type: ''
- }).then(() => {
- this.isInstall = true;
- //瀹夎
- installSdk(file).then(res => {
- if (res.success) {
-
- this.isInstall = false;
- //this.$refs['progressBar'].style.width = 100%
- //this.installPercentage = 100%
- this.$message({
- type: 'success',
- message: '瀹夎鎴愬姛,灏嗚烦杞嚦鎴戠殑绠楁硶涓煡鐪�'
- });
- setTimeout(() => {
- this.findAllSdk();
- this.activeName = 'myAlgorithm';
- }, 3000)
- }
- });
- }).catch(() => {
- console.log('鍙栨秷瀹夎')
- })
+
},
@@ -1206,19 +1500,6 @@
this.clickSet(row);
}
},
- getUser () {
- // console.log("鐧诲綍鐢ㄦ埛",JSON.parse(sessionStorage.getItem("userInfo")).username)
- if (
- sessionStorage.getItem("userInfo") &&
- (JSON.parse(sessionStorage.getItem("userInfo")).username ==
- "superadmin" ||
- JSON.parse(sessionStorage.getItem("userInfo")).username == "basic")
- ) {
- this.isSuperUser = true;
- } else {
- this.isSuperUser = false;
- }
- },
donwload (item) {
this.downloading = true;
this.downloadItem = item.id;
@@ -1340,32 +1621,31 @@
color: #606266;
cursor: pointer;
}
-.el-loading-mask .el-loading-spinner{
- top: 40px!important;
+.el-loading-mask .el-loading-spinner {
+ top: 40px !important;
}
-.el-loading-mask .el-loading-spinner svg{
- transform: none!important;
- top: 20px!important;
- left: 40%!important;
+.el-loading-mask .el-loading-spinner svg {
+ transform: none !important;
+ top: 20px !important;
+ left: 40% !important;
}
-.el-loading-mask .el-loading-spinner p.el-loading-text{
- display: block!important;
- text-align: center!important;
- bottom: 10px!important;
- top: 80px!important;
+.el-loading-mask .el-loading-spinner p.el-loading-text {
+ display: block !important;
+ text-align: center !important;
+ bottom: 10px !important;
+ top: 80px !important;
right: 0 !important;
color: #78adf7;
}
-.el-loading-mask .el-loading-spinner .path{
+.el-loading-mask .el-loading-spinner .path {
stroke: #78adf7;
}
.installInfo {
text-indent: 2em;
font-size: 14px;
- color: #777;
+ line-height: 26px;
p {
text-align: center;
- color: #666;
}
}
.src-title {
@@ -1484,6 +1764,13 @@
margin: auto;
margin-bottom: 30px;
max-width: 200px;
+ .mask {
+ width: 100%;
+
+ .el-button + .el-button {
+ margin-left: 0 !important;
+ }
+ }
}
}
}
@@ -1523,6 +1810,9 @@
z-index: 1;
border-radius: 3px;
display: none;
+ .el-button + .el-button {
+ margin-left: 0 !important;
+ }
.tool {
position: absolute;
top: 49%;
@@ -1646,7 +1936,8 @@
}
}
}
- .store-list,.app-list {
+ .store-list,
+ .app-list {
display: flex;
flex-wrap: wrap;
.wrap-box {
@@ -1800,8 +2091,12 @@
z-index: 1;
border-radius: 3px;
display: none;
- .info-onmask{
+ .info-onmask {
color: #8ecaff;
+ }
+ .mask-btn {
+ width: 100%;
+ display: flex;
}
i {
color: #fff;
@@ -1888,16 +2183,17 @@
.mask {
display: flex;
align-items: flex-end;
+ flex-wrap: wrap;
+ justify-content: center;
top: 0;
.bot-btn {
flex: 1;
}
- &.flex-center{
+ &.flex-center {
align-items: center;
justify-content: center;
}
}
-
}
.list-choose-item-left-uninstal {
color: darkgray;
@@ -2072,6 +2368,24 @@
max-height: 106px;
}
}
+ .willUpGrade {
+ .iconupdate {
+ color: #01e667;
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ font-weight: 550;
+ font-size: 26px;
+ }
+ }
+ &.uninstall {
+ .svg-wrap {
+ background-color: #ddd;
+ }
+ .alg-name {
+ color: darkgray;
+ }
+ }
}
.dragAreaR {
height: 100%;
--
Gitblit v1.8.0