From 0201c32312f6478b2bde706607c8c6338e9e1d06 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 27 五月 2026 17:05:29 +0800
Subject: [PATCH] 新增智能电表、空调管理
---
admin/src/views/business/ywelectricalactions.vue | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/admin/src/views/business/ywelectricalactions.vue b/admin/src/views/business/ywelectricalactions.vue
index d1ec309..82bae2c 100644
--- a/admin/src/views/business/ywelectricalactions.vue
+++ b/admin/src/views/business/ywelectricalactions.vue
@@ -59,6 +59,17 @@
<el-button type="text" :disabled="!row.responseBody" @click="openJson('鍝嶅簲鎶ユ枃', row.responseBody)">鏌ョ湅</el-button>
</template>
</el-table-column>
+ <el-table-column label="鎿嶄綔" min-width="120" align="center" fixed="right">
+ <template slot-scope="{ row }">
+ <el-button
+ v-if="row.status === 0 && row.oprId"
+ type="text"
+ :loading="queryLoadingId === row.id"
+ v-permissions="['business:ywelectricalactions:queryResult']"
+ @click="handleQueryResult(row)"
+ >鎵嬪姩鏌ヨ缁撴灉</el-button>
+ </template>
+ </el-table-column>
</el-table>
<pagination
@size-change="handleSizeChange"
@@ -101,7 +112,8 @@
actionTypeOptions: Object.keys(ACTION_TYPE_MAP).map(key => ({
value: Number(key),
label: ACTION_TYPE_MAP[key]
- }))
+ })),
+ queryLoadingId: null
}
},
created () {
@@ -164,6 +176,16 @@
openJson (title, content) {
if (!content) return
this.$refs.jsonWindow.open(title, { content })
+ },
+ handleQueryResult (row) {
+ this.queryLoadingId = row.id
+ actionsApi.queryResult(row.id)
+ .then(msg => {
+ this.$tip.success(msg || '鏌ヨ瀹屾垚')
+ this.handlePageChange(this.tableData.pagination.pageIndex)
+ })
+ .catch(e => this.$tip.apiFailed(e))
+ .finally(() => { this.queryLoadingId = null })
}
}
}
--
Gitblit v1.9.3