This commit is contained in:
Fine 2024-09-29 15:07:36 +08:00
parent 156b6f833c
commit f49bebe220
2 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,9 @@ export const alarmStore = defineStore({
}),
actions: {
async getAlarms(params: Recordable) {
this.loading = true;
const res: AxiosResponse = await graphql.query("queryAlarms").params(params);
this.loading = false;
if (res.data.errors) {
return res.data;
}

View File

@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="timeline-table clear">
<div class="timeline-table clear" v-loading="alarmStore.loading">
<div v-for="(i, index) in alarmStore.alarms" :key="index" class="clear timeline-item">
<div class="g-sm-3 grey sm hide-xs time-line tr">
{{ dateFormat(parseInt(i.startTime)) }}