From 474047882bc1d22b910783057f00ad875e411dab Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 22 十一月 2023 17:51:51 +0800
Subject: [PATCH] 首页保存按钮loading
---
Source/UBCS-WEB/src/views/statistic/statisticPage.vue | 26 ++++++++++++++++++++++----
Source/UBCS-WEB/src/views/wel/Statistic.vue | 11 +++++------
Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue | 4 ++--
3 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue b/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue
index 6ea8c1d..4427fb6 100644
--- a/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue
+++ b/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue
@@ -1,7 +1,7 @@
<template>
<div id="main">
<basic-container>
- <v-chart :options="option" ref="chart" style="width: 100%;height:100vh"></v-chart>
+ <v-chart :options="option" ref="chart" style="width: 100%;"></v-chart>
</basic-container>
</div>
</template>
@@ -41,7 +41,7 @@
},
],
title: {
- text: '涓婚搴撴暟鎹粺璁″垎鏋�',
+ text: '涓绘暟鎹粺璁″垎鏋�',
left:'center',
textAlign:'center'
},
diff --git a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
index 8707be1..3afb4d8 100644
--- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
+++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -1,5 +1,18 @@
<template>
-<lineChart></lineChart>
+ <!-- 鏂板鍙充晶鎸夐挳-->
+ <div>
+ <div style=" display: flex; justify-content: flex-end;">
+ <el-button plain type="primary" @click="addHandler">鏂板</el-button>
+ </div>
+ <!-- 鏂板瀵硅瘽妗�-->
+ <el-dialog
+ title="鏂板鏁版嵁缁熻鍒嗘瀽"
+ :visible.sync="addVisible"
+ append-to-body
+ >
+ </el-dialog>
+ </div>
+
</template>
<script>
@@ -10,9 +23,14 @@
lineChart
},
name: "statisticPage",
- data(){
- return{
-
+ data() {
+ return {
+ addVisible: false,
+ }
+ },
+ methods: {
+ addHandler() {
+ this.addVisible = true;
}
}
}
diff --git a/Source/UBCS-WEB/src/views/wel/Statistic.vue b/Source/UBCS-WEB/src/views/wel/Statistic.vue
index 0eda3f5..4b74518 100644
--- a/Source/UBCS-WEB/src/views/wel/Statistic.vue
+++ b/Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -9,7 +9,6 @@
top='-40px'>
<el-table
ref="TableBox"
- v-loading="TableLoading"
:data="Crud.data"
border
style="width: 100%"
@@ -54,7 +53,7 @@
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
- <el-button plain type="primary" @click="SaveHandler">淇濆瓨</el-button>
+ <el-button plain type="primary" @click="SaveHandler" v-loading="BtnLoading">淇濆瓨</el-button>
</div>
</el-dialog>
</div>
@@ -67,7 +66,7 @@
name: "Statistic",
data() {
return {
- TableLoading: false,
+ BtnLoading: false,
loading: true,
Crud: {
form: '',
@@ -127,7 +126,7 @@
this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹紒');
return;
}
- this.TableLoading = true;
+ this.BtnLoading = true;
try {
const {data: {code}} = await save(this.userId, this.SelectRow.map(item => item.code));
if (code === 200) {
@@ -136,12 +135,12 @@
this.option.data = [];
this.MasterGetList();
this.dialogTableVisible = false;
- this.TableLoading = false;
+ this.BtnLoading = false;
this.loading = true;
this.FontInfo();
}
} catch {
- this.TableLoading = false;
+ this.BtnLoading = false;
}
},
MoreHandler() {
--
Gitblit v1.9.3