dev
This commit is contained in:
parent
3bbf45d21d
commit
7402bffd1f
|
|
@ -20,8 +20,8 @@
|
|||
</div>
|
||||
<div class="content" ref="content">
|
||||
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">
|
||||
<el-table-column v-for="(column, index) in column_list" show-overflow-tooltip :fixed="index < 2 ? 'left' : null"
|
||||
:prop="column['en']" :label="column['zh']" :width="column['column_width']"/>
|
||||
<el-table-column v-for="(column, index) in column_list" show-overflow-tooltip :fixed="index < 2 ? 'left' : null"
|
||||
:prop="column['en']" :label="column['zh']" :width="column['column_width']"/>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
|
|
@ -30,8 +30,8 @@
|
|||
v-model:current-page="current_page" @current-change="change_page"/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="loading" :width="300" height="150" title="更新版本" :close="false">
|
||||
{{ uploadMsg }}
|
||||
<Mask :is-show="loading" :width="300" :height="300" title="更新版本" :close="false">
|
||||
{{ tip_message }}
|
||||
<div class="demo-progress" style="margin-top: 20px">
|
||||
<el-progress :percentage="percentage" :format="format"/>
|
||||
</div>
|
||||
|
|
@ -124,29 +124,50 @@ const format = ((p: number) => {
|
|||
return `正在更新`
|
||||
})
|
||||
let percentage = ref(0)
|
||||
|
||||
const tip_message = ref("正在更新目录,请稍后...")
|
||||
const start_type = () => {
|
||||
loading.value = true
|
||||
percentage.value = 0;
|
||||
post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => {
|
||||
percentage.value = 100
|
||||
tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整";
|
||||
download(res.currentVersionName, current_tab.value);
|
||||
}).catch((err: any) => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
let download = (ver: any, type: any) => {
|
||||
if (ver) {
|
||||
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
|
||||
loading.value = false
|
||||
percentage.value = 0
|
||||
})
|
||||
} else {
|
||||
percentage.value = 100
|
||||
loading.value = false;
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: "当前是最新版本",
|
||||
type: 'success',
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
let download = (ver: any, type: any) => {
|
||||
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
|
||||
percentage.value = setInterval(() => {
|
||||
if (percentage.value < 100) {
|
||||
percentage.value += 1;
|
||||
}
|
||||
}, 100);
|
||||
if (res == null) {
|
||||
loading.value = false;
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: "当前是最新版本",
|
||||
type: 'success',
|
||||
})
|
||||
return
|
||||
}
|
||||
start_type()
|
||||
}).catch((err: any) => {
|
||||
percentage.value = 100
|
||||
loading.value = false;
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: "当前是最新版本",
|
||||
type: 'success',
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue