Commit 81dbd4b3 by 无尘

fix: 更新loading

parent 2920538c
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-09-08 17:11:02 * @Date: 2020-09-08 17:11:02
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-10-27 14:45:14 * @LastEditTime: 2020-12-21 10:28:25
--> -->
<template> <template>
<div class="app-detail"> <div class="app-detail" v-loading="loading">
<el-form label-width="90px"> <el-form label-width="90px">
<h3 class="model-title">应用信息</h3> <h3 class="model-title">应用信息</h3>
<div class="app-info"> <div class="app-info">
...@@ -70,7 +70,8 @@ export default { ...@@ -70,7 +70,8 @@ export default {
applicationLogo: '', applicationLogo: '',
serverId: '' serverId: ''
}, },
authInfoList: [] authInfoList: [],
loading: false
}; };
}, },
created() { created() {
...@@ -98,19 +99,22 @@ export default { ...@@ -98,19 +99,22 @@ export default {
* @author: 无尘 * @author: 无尘
*/ */
getAppDetail(menuId, applicationId) { getAppDetail(menuId, applicationId) {
const that = this;
that.loading = true;
getAppDetail({ menuId, applicationId }).then(res => { getAppDetail({ menuId, applicationId }).then(res => {
that.loading = false;
const { applicationName, applicationDesc, applicationVersion, overTime, adminRange, storeAdminRange, applicationLogo, serverId } = res.result || {}; const { applicationName, applicationDesc, applicationVersion, overTime, adminRange, storeAdminRange, applicationLogo, serverId } = res.result || {};
this.appData.expirationDate = new Date().getTime() - overTime; // 到期时间 that.appData.expirationDate = new Date().getTime() - overTime; // 到期时间
this.appData.expirationDay = overTime - new Date().getTime(); // 剩余到期天数 that.appData.expirationDay = overTime - new Date().getTime(); // 剩余到期天数
Object.assign(this.appData, { applicationName, applicationDesc, applicationVersion, overTime, applicationLogo, serverId }); Object.assign(that.appData, { applicationName, applicationDesc, applicationVersion, overTime, applicationLogo, serverId });
if (typeof adminRange == 'string' && adminRange.length > 0) { if (typeof adminRange == 'string' && adminRange.length > 0) {
this.appData.adminRange = JSON.parse(adminRange); that.appData.adminRange = JSON.parse(adminRange);
} }
if (typeof storeAdminRange == 'string' && storeAdminRange.length > 0) { if (typeof storeAdminRange == 'string' && storeAdminRange.length > 0) {
this.appData.storeAdminRange = JSON.parse(storeAdminRange); that.appData.storeAdminRange = JSON.parse(storeAdminRange);
} }
}); }).finally(() => that.loading = false);;
}, },
/** /**
* @description: 获取授权信息 * @description: 获取授权信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment