| | |
| | | </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
|
| | | class="baseImg"
|
| | | :src="`data:image/png;base64,${item.iconBlob}`"
|
| | |
| | | <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">
|
| | | <el-button
|
| | | v-if="!item.isDefault"
|
| | | @click="unLoad(item)"
|
| | | type="primary"
|
| | | class="bot-btn"
|
| | | >卸载</el-button>
|
| | | </div>
|
| | | <img class="baseImg" :src="`${item.iconBlob?'data:image/png;base64,'+item.iconBlob:item.icon}`" alt />
|
| | | <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">
|
| | | <el-button
|
| | | v-if="!item.isDefault"
|
| | | @click="unLoad(item)"
|
| | | type="primary"
|
| | | class="bot-btn"
|
| | | >卸载</el-button>
|
| | | </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>
|
| | | <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
|
| | | 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-choose-item-left">
|
| | | <div class="list-complete-item-handle uninstall">
|
| | | <div class="svg-wrap" v-loading="item.installLoading" element-loading-text="安装中" element-loading-background="rgba(0,0,0,.8)">
|
| | | <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>
|
| | | <el-button
|
| | | type="primary"
|
| | | class="bot-btn"
|
| | | @click="downloadApp(item)"
|
| | | >安装</el-button>
|
| | | </div>
|
| | | <img
|
| | | class="baseImg"
|
| | |
| | | <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%"
|
| | |
| | | </div>
|
| | | <p class="src-title">应用软件</p>
|
| | | <div class="app-list flex-list">
|
| | | |
| | | <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="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
|
| | | class="baseImg"
|
| | | :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
|
| | | alt
|
| | | />
|
| | | </div>
|
| | | <div class="alg-name">
|
| | | <div style="padding:0px 10px 0px 10px;">
|
| | | <span v-if="!item.isEdit">{{ item.sdk_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>
|
| | | |
| | | </div>
|
| | | <el-drawer title="下载" :visible.sync="actDrawerShow" :direction="direction">
|
| | | <div class="drawer-content">
|
| | |
| | | <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>
|
| | |
| | | downloadSdk,
|
| | | installSdk
|
| | | } 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";
|
| | |
| | | isInstall: false,
|
| | | installPercentage: 0,
|
| | | unActivedSDKList: [],
|
| | | actSdkId: '',
|
| | | activedSdk: {
|
| | | unActivedAppList: [],
|
| | | //actSdkId: '',
|
| | | actType: '',
|
| | | actId: '',
|
| | | activedSdkOrApp: {
|
| | | activateCode: '',
|
| | | productName: '',
|
| | | setting: '',
|
| | |
| | | },
|
| | | // unloadLoading: false,
|
| | | // installLoading: false,
|
| | | installedApps:[],
|
| | | storeApps:[]
|
| | | installedApps: [],
|
| | | storeApps: []
|
| | | }
|
| | | },
|
| | | watch: {
|
| | |
| | | this.findAll();
|
| | | this.getUser();
|
| | | this.getUnActivedList();
|
| | | this.getUnActivedAppList();
|
| | | // this.TaskMange.findAllSdk();
|
| | | // this.TaskMange.findByType();
|
| | | this.VideoManageData.init();
|
| | | },
|
| | | methods: {
|
| | | downloadApp(app){
|
| | | downloadApp (app) {
|
| | | app.installLoading = true;
|
| | | let _this = this;
|
| | | installApp(app).then(res=>{
|
| | | if(res && res.success){
|
| | | setTimeout(()=>{
|
| | | installApp(app).then(res => {
|
| | | if (res && res.success) {
|
| | | setTimeout(() => {
|
| | | app.installLoading = false;
|
| | | _this.getAllApps();
|
| | | window.parent.postMessage({
|
| | | msg: "AppUpdate"
|
| | | }, '*')
|
| | | },3000); |
| | | }, 3000);
|
| | | }
|
| | | })
|
| | | },
|
| | | 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 }, item)
|
| | | _this.installedApps.push(obj)
|
| | | }else{
|
| | | let obj = Object.assign({installLoading:false},item)
|
| | | } else {
|
| | | let obj = Object.assign({ installLoading: 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);
|
| | | }
|
| | | })
|
| | |
|
| | | },
|
| | | 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: '',
|
| | |
| | | })
|
| | |
|
| | | },
|
| | | 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 () {
|
| | |
| | | //安装
|
| | | installSdk(file).then(res => {
|
| | | if (res.success) {
|
| | | |
| | |
|
| | | this.isInstall = false;
|
| | | //this.$refs['progressBar'].style.width = 100%
|
| | | //this.installPercentage = 100%
|
| | |
| | | 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 {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | .store-list,.app-list {
|
| | | .store-list,
|
| | | .app-list {
|
| | | display: flex;
|
| | | flex-wrap: wrap;
|
| | | .wrap-box {
|
| | |
| | | z-index: 1;
|
| | | border-radius: 3px;
|
| | | display: none;
|
| | | .info-onmask{
|
| | | .info-onmask {
|
| | | color: #8ecaff;
|
| | | }
|
| | | i {
|
| | |
| | | .bot-btn {
|
| | | flex: 1;
|
| | | }
|
| | | &.flex-center{
|
| | | &.flex-center {
|
| | | align-items: center;
|
| | | justify-content: center;
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | .list-choose-item-left-uninstal {
|
| | | color: darkgray;
|
| | |
| | | max-height: 106px;
|
| | | }
|
| | | }
|
| | | &.uninstall{
|
| | | .svg-wrap{
|
| | | &.uninstall {
|
| | | .svg-wrap {
|
| | | background-color: #ddd;
|
| | | }
|
| | | .alg-name{
|
| | | .alg-name {
|
| | | color: darkgray;
|
| | | }
|
| | | }
|