| | |
| | | {{ row.relayState === "1" ? "合闸" : row.relayState === "0" ? "拉闸" : "未知" }} |
| | | </el-tag> |
| | | </template> |
| | | <template #syncTime="{ row }"> |
| | | {{ row.syncTime ? dayjs(row.syncTime).format('YYYY-MM-DD HH:mm:ss') : '-' }} |
| | | </template> |
| | | <template #operate="{ row }"> |
| | | <el-button link type="primary" @click="openForm('edit', row)">编辑</el-button> |
| | | <el-button v-if="row.source === 'manual'" link type="danger" @click="handleDelete(row)">删除</el-button> |
| | |
| | | <script setup> |
| | | import { onMounted, reactive, ref, toRefs } from "vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import FormDia from "./components/formDia.vue"; |
| | | import { meterListPage, meterSync, meterDelete } from "@/api/energyManagement/tqdianbiao.js"; |
| | | |
| | |
| | | { label: "来源", prop: "source", dataType: "slot", slot: "source", width: 80 }, |
| | | { label: "继电器", prop: "relayState", dataType: "slot", slot: "relayState", width: 90 }, |
| | | { label: "备注", prop: "description", minWidth: 100 }, |
| | | { label: "同步时间", prop: "syncTime", minWidth: 160 }, |
| | | { label: "同步时间", prop: "syncTime", dataType: "slot", slot: "syncTime", minWidth: 160 }, |
| | | { label: "操作", prop: "operate", dataType: "slot", slot: "operate", width: 120, fixed: "right" }, |
| | | ]); |
| | | |