| | |
| | | // });
|
| | | // return arr;
|
| | | // },
|
| | | isAdmin () {
|
| | | isAdmin() {
|
| | | if (
|
| | | sessionStorage.getItem("userInfo") &&
|
| | | sessionStorage.getItem("userInfo") !== ""
|
| | |
| | | return false;
|
| | | },
|
| | | },
|
| | | data () {
|
| | | data() {
|
| | | return {
|
| | | sdkList: [],
|
| | | installedList: [],
|
| | |
| | | }
|
| | | }
|
| | | },
|
| | | mounted () {
|
| | | mounted() {
|
| | | // 获取所有应用
|
| | | this.getAllSdk();
|
| | | this.getAllApps();
|
| | |
| | | this.getUnActivedAppList();
|
| | | },
|
| | | methods: {
|
| | | isShow (authority) {
|
| | | isShow(authority) {
|
| | | return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
|
| | | },
|
| | | //离线安装
|
| | | offlineInstall () {
|
| | | offlineInstall() {
|
| | | this.installDialogVisible = false;
|
| | | this.isInstall = true;
|
| | | //安装
|
| | |
| | | });
|
| | | })
|
| | | },
|
| | | downloadApp (app, action) {
|
| | | downloadApp(app, action) {
|
| | | if (action == 'upgrade') {
|
| | | app.upgradeLoading = true;
|
| | | } else {
|
| | |
| | | this.appUpgreading = true;
|
| | | this.startAutoFresh();
|
| | | },
|
| | | async getAllApps () {
|
| | | async getAllApps() {
|
| | | let iArry = []
|
| | | let sArry = []
|
| | |
|
| | |
| | | this.storeApps = sArry;
|
| | | },
|
| | | //卸载应用
|
| | | unLoad (app) {
|
| | | unLoad(app) {
|
| | | app.unloadLoading = true;
|
| | | let _this = this;
|
| | | removeApp({ appId: app.id }).then(res => {
|
| | |
| | | // this.activeCode = '';
|
| | | // this.activedSdkOrApp = this.newActInfo()
|
| | | // },
|
| | | actSdkOrApp (id, type = 'sdk') {
|
| | | actSdkOrApp(id, type = 'sdk') {
|
| | | this.actType = type;
|
| | | this.actId = id;
|
| | | this.actDrawerShow = true;
|
| | |
| | | this.activeCode = '';
|
| | | this.activedSdkOrApp = this.newActInfo()
|
| | | },
|
| | | newActInfo () {
|
| | | newActInfo() {
|
| | | return {
|
| | | activateCode: '',
|
| | | productName: '',
|
| | |
| | | devIds: ''
|
| | | }
|
| | | },
|
| | | getUnActivedList () {
|
| | | getUnActivedList() {
|
| | | getUnActivedSdk().then(res => {
|
| | | if (res.code == 200) {
|
| | | this.unActivedSDKList = res.data;
|
| | |
| | | })
|
| | |
|
| | | },
|
| | | getUnActivedAppList () {
|
| | | getUnActivedAppList() {
|
| | | getUnActivedApp().then(res => {
|
| | | if (res.code == 200) {
|
| | | this.unActivedAppList = res.data;
|
| | | }
|
| | | });
|
| | | },
|
| | | actived () {
|
| | | actived() {
|
| | | let _this = this;
|
| | | if (this.actType == 'sdk') {
|
| | | //激活算法
|
| | |
| | | });
|
| | | }
|
| | | },
|
| | | 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;
|
| | |
| | | _this.installFile = file;
|
| | | if (res.success) {
|
| | | _this.installDialogVisible = true;
|
| | | debugger
|
| | | if (res.data.apps.length > 0) {
|
| | | _this.installAppPackage = {
|
| | | appId: res.data.apps[0].appId,
|
| | |
| | |
|
| | | },
|
| | |
|
| | | onFileAdded (f) {
|
| | | onFileAdded(f) {
|
| | | this.patchUpdateStatus = "";
|
| | | },
|
| | |
|
| | | async getAllSdk () {
|
| | | async getAllSdk() {
|
| | | let installedList = [];
|
| | | let unInstalledList = [];
|
| | | let res = await findAllSdk();
|
| | |
| | | this.notInstalledList = unInstalledList;
|
| | | },
|
| | |
|
| | | donwload (item) {
|
| | | debugger
|
| | | donwload(item) {
|
| | | item.upgradeLoading = true;
|
| | | //this.downloading = true;
|
| | | this.downloadItem = item.id;
|
| | |
| | | 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)
|
| | | }
|
| | |
| | | .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;
|
| | |
| | | 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 {
|
| | |
| | | }
|
| | | }
|
| | | .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%;
|