| | |
| | | <meta charset="utf-8" /> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0" /> |
| | | <link rel="icon" type="image/png" href="<%= BASE_URL %>favicon.png" sizes="32x32" /> |
| | | <link rel="icon" type="image/png" href="<%= htmlWebpackPlugin.options.faviconPath%>" sizes="32x32" /> |
| | | <link rel="stylesheet" href="/fonts/alibaba/iconfont.css"> |
| | | <title><%= htmlWebpackPlugin.options.title %></title> |
| | | |
| | |
| | | color: #f90; |
| | | font-size: 14px; |
| | | } |
| | | .s-system-manage .el-tabs--border-card .el-tabs__header .el-tabs__item{ |
| | | |
| | | .s-system-manage .el-tabs--border-card .el-tabs__header .el-tabs__item { |
| | | padding: 5px 50px; |
| | | height: 50px; |
| | | font-family: PingFangSC-Regular; |
| | |
| | | storeApps: [],
|
| | | installFile: {},
|
| | | freshTimer: null,
|
| | | appUpgreading: false,
|
| | | sdkUpgreading: false
|
| | | appUpgreading: true,
|
| | | sdkUpgreading: true,
|
| | | autoRefresh: true,
|
| | | }
|
| | | },
|
| | | directives: {
|
| | |
| | | },
|
| | | mounted() {
|
| | | // 获取所有应用
|
| | | this.getAllSdk();
|
| | | this.getAllApps();
|
| | | this.autoRefreshAppAndSdkState();
|
| | |
|
| | | this.getUnActivedList();
|
| | | this.getUnActivedAppList();
|
| | | },
|
| | | beforeDestroy() {
|
| | | this.autoRefresh = false;
|
| | | },
|
| | | methods: {
|
| | | isShow(authority) {
|
| | |
| | | });
|
| | | setTimeout(() => {
|
| | | this.getAllSdk();
|
| | | this.getAllApps();
|
| | | window.parent.postMessage({
|
| | | msg: "AppUpdate"
|
| | | }, '*')
|
| | |
| | | // message: '安装成功'
|
| | | // });
|
| | | }
|
| | | _this.getAllApps();
|
| | | // _this.getAllApps();
|
| | | window.parent.postMessage({
|
| | | msg: "AppUpdate"
|
| | | }, '*')
|
| | |
| | |
|
| | | // 开启自动刷新
|
| | | this.appUpgreading = true;
|
| | | this.startAutoFresh();
|
| | | },
|
| | | async getAllApps() {
|
| | | let iArry = []
|
| | |
| | | obj.upgradeLoading = true;
|
| | |
|
| | | this.appUpgreading = true;
|
| | | this.startAutoFresh();
|
| | | }
|
| | |
|
| | | item.installed ? iArry.push(obj) : sArry.push(obj)
|
| | |
| | | let unInstalledList = [];
|
| | | let res = await findAllSdk();
|
| | | if (res && res.success) {
|
| | | this.sdkUpgreading = false;
|
| | |
|
| | | res.data.forEach(item => {
|
| | | let obj = Object.assign({ unloadLoading: false, upgradeLoading: false }, item)
|
| | | if (obj.progressMsg !== "" && obj.progressMsg !== "已安装") {
|
| | | obj.upgradeLoading = true;
|
| | |
|
| | | this.appUpgreading = true;
|
| | | this.startAutoFresh();
|
| | | this.sdkUpgreading = true;
|
| | | }
|
| | |
|
| | | //算法软件 已安装其中包含待升级 未安装
|
| | | item.installed ? installedList.push(obj) : unInstalledList.push(obj)
|
| | |
|
| | | });
|
| | |
|
| | |
|
| | | // this.sdkList = res.data.map((i, index) => {
|
| | | // if (i.progressMsg !== "" && i.progressMsg !== "已安装") {
|
| | | // i.upgradeLoading = true;
|
| | |
|
| | | // this.appUpgreading = true;
|
| | | // this.startAutoFresh();
|
| | | // }
|
| | | // this.$set(i, "isEdit", false);
|
| | | // return i;
|
| | | // });
|
| | | }
|
| | | this.installedList = installedList;
|
| | | this.notInstalledList = unInstalledList;
|
| | |
| | | item.upgradeLoading = false;
|
| | | //this.downloading = false;
|
| | | this.downloadItem = "";
|
| | | this.getAllSdk();
|
| | | })
|
| | | .catch(err => {
|
| | | this.$notify({
|
| | |
| | | this.downloadItem = "";
|
| | | });
|
| | | // 开启自动刷新
|
| | | this.appUpgreading = true;
|
| | | this.startAutoFresh();
|
| | | this.sdkUpgreading = true;
|
| | | },
|
| | | inputBlur(item) {
|
| | | // console.log(item, '修改名称')
|
| | |
| | | handleTabClick() {
|
| | |
|
| | | },
|
| | | startAutoFresh() {
|
| | | if (this.freshTimer) {
|
| | | clearTimeout(this.freshTimer)
|
| | | autoRefreshAppAndSdkState() {
|
| | | // 关闭后退出
|
| | | if (!this.autoRefresh) {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (!this.appUpgreading && !this.sdkUpgreading) {
|
| | | this.freshTimer = -1
|
| | | return
|
| | | if (this.appUpgreading) {
|
| | | this.getAllApps();
|
| | | }
|
| | |
|
| | | this.getAllSdk()
|
| | | this.getAllApps()
|
| | | if (this.sdkUpgreading) {
|
| | | this.getAllSdk();
|
| | | }
|
| | |
|
| | | this.freshTimer = setTimeout(this.startAutoFresh, 5 * 1000)
|
| | | let _this = this
|
| | | setTimeout(() => {
|
| | | _this.autoRefreshAppAndSdkState();
|
| | | }, 500)
|
| | | }
|
| | | }
|
| | | };
|
| | |
| | | icon: '/images/desktop/message.png', |
| | | tip: '消息', |
| | | title: 'SmartAI', |
| | | body: config.version, |
| | | body: 'V' + config.version, |
| | | time: new Date() |
| | | }, true); |
| | | }, 1000); |
| | |
| | | |
| | | this.webPort = this.sysinfo.server_port; |
| | | |
| | | this.sysinfo.webVersion = config.version; |
| | | this.sysinfo.webVersion = 'V' + config.version; |
| | | } |
| | | |
| | | this.loading = false; |
| | |
| | | entry: path, |
| | | template: 'public/index.html', |
| | | title: chunk == 'desktop/index' ? 'SmartAI' : chunk, |
| | | chunks: [chunk_vendor, 'chunk-common', chunk] |
| | | chunks: [chunk_vendor, 'chunk-common', chunk], |
| | | faviconPath: "favicon.png" |
| | | } |
| | | if (chunk != 'index') { |
| | | pages[chunk].filename = 'view/' + chunk + '.html' |
| | |
| | | }, |
| | | "/data/api-v/app/findAllApp": { |
| | | target: '/', |
| | | target: 'http://localhost:8080/', |
| | | // target: 'http://localhost:8080/', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/data/api-v/app/findAllApp': 'apps.json' |