From 60076cbbe1da6cc8ed3a4ebb8f67e92ea9be9e4a Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期二, 15 八月 2023 16:02:58 +0800 Subject: [PATCH] 设置按钮的加载效果 --- src/views/IndexView.vue | 40 +++++++++++++++++++++------------------- 1 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/views/IndexView.vue b/src/views/IndexView.vue index 74fa822..0e9f87d 100644 --- a/src/views/IndexView.vue +++ b/src/views/IndexView.vue @@ -12,6 +12,9 @@ }, data() { return { + button:{ + setButton:false + }, totalData: [], // 淇濆瓨璁剧疆 save: false, @@ -70,17 +73,9 @@ checkedShops: [] } - // chartInstance: [] - // // 鍐呴儴璁惧 - // devices: [] }; }, - watch: { - // 'outside.checkedShops'(){ - // this.saveOutsideData() - // console.log('111'); - // } - }, + methods: { //鑾峰彇鎵�鏈夊簵閾哄悕瀛� getDeviceInfo() { @@ -281,6 +276,8 @@ // 鐐瑰嚮鎸夐挳瑙﹀彂 show() { + // + this.button.setButton = true // 褰撳彇娑堥�夋嫨鏃讹紝闃叉鍥惧舰杩樹繚鐣欏湪椤甸潰銆� if (this.outside.checkedShops.length == 0) { this.outside.realTimeData = []; @@ -290,6 +287,8 @@ } // 鏍规嵁鎵�閫夌殑搴楅摵璇锋眰鏁版嵁 this.request(); + this.button.setButton = false + // 瀹氭椂鏇存柊 setInterval(() => { this.request(); }, this.timeInterval); @@ -440,7 +439,7 @@ content="鐐瑰嚮灞曠ず瀹炴椂鏁版嵁" placement="top-start" > - <el-button type="success" @click="show" style="margin-left: 10px"> + <el-button type="success" :loading="button.setButton" @click="show" style="margin-left: 10px"> 璁剧疆 </el-button> </el-tooltip> @@ -461,7 +460,7 @@ :key="device.mvStatCode" > <!-- 鍐呴儴璁惧 --> - <el-card v-if="index < inner.inFumeValue.length" height="1900px"> + <el-card v-if="index < inner.inFumeValue.length" class="card-font-color" height="1900px"> <template #header> <div class="card-header">{{ device.siteName }} <img src="@/assets/inner_device.jpg" class="icon-inner"/> @@ -470,8 +469,9 @@ </template> <div class="report-time-text">鏁版嵁鍙戝竷鏃堕棿锛歿{ device.time }}</div> <DashBoard :data="device.value"></DashBoard> + <div >璁惧缂栧彿锛歿{ device.mnCode }}</div> - <!-- <hr class="divider-margin" /> --> + <div class="horizontal-line"></div> <div class="status" :class="{ exceed: device.value > 1 }"> @@ -482,7 +482,7 @@ <br /> </el-card> <!-- 澶栭儴璁惧 --> - <el-card v-else> + <el-card v-else class="card-font-color"> <template #header> <div class="card-header"> {{ device.diName }} @@ -501,11 +501,11 @@ </span> </div> <div class="horizontal-line"></div> - <!-- <hr class="divider-margin" /> --> <div>璁惧缂栧彿锛歿{ device.mvStatCode }}</div> + <div class="horizontal-line"></div> - <!-- <hr class="divider-margin" /> --> + <div>璁惧渚涘簲鍟嗭細{{ device.diSupplier }}</div> <div class="status" @@ -598,6 +598,11 @@ color: #999999; } +.card-font-color { + color: #000000; +} + + @@ -641,10 +646,7 @@ width: calc(100% / 6); // margin-left: 70px; } -// .input-search { -// display: flex; -// justify-content: left; -// } + .save-switch { margin-top: 20px; margin-left: 20px; -- Gitblit v1.9.3