From 5be9679fb4288936b576cf3d1f1548af1c4151b8 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 21 七月 2025 15:31:21 +0800
Subject: [PATCH] 2025.7.21 任务管理-监管地图功能(待完成)
---
src/views/fysp/config/DeviceMatch.vue | 65 ++++++++++++++++++++++++++++++--
1 files changed, 61 insertions(+), 4 deletions(-)
diff --git a/src/views/fysp/config/DeviceMatch.vue b/src/views/fysp/config/DeviceMatch.vue
index 82eafd2..2bf5f74 100644
--- a/src/views/fysp/config/DeviceMatch.vue
+++ b/src/views/fysp/config/DeviceMatch.vue
@@ -1,5 +1,5 @@
<template>
- <FYTable @search="onSearch" :pagination="true" ref="tableRef">
+ <FYTable @search="onSearch" :pagination="false" ref="tableRef" size="small">
<template #options>
<!-- 鍖哄幙 -->
<FYOptionLocation
@@ -24,11 +24,48 @@
</el-form>
</template>
- <template #table-column>
- <el-table-column prop="sceneName" :show-overflow-tooltip="true" label="鍚嶇О">
+ <!-- <template #options-expand2>
+ <CompDeviceMatchEdit :area="area"></CompDeviceMatchEdit>
+ </template> -->
+
+ <template #table-column>
+ <el-table-column fixed="left" type="index" label="#" width="40" index="1"></el-table-column>
+ <el-table-column
+ prop="deviceCode"
+ :show-overflow-tooltip="true"
+ label="鐩戞祴璁惧缂栧彿"
+ width="160"
+ >
+ </el-table-column>
+ <el-table-column prop="deviceName" :show-overflow-tooltip="true" label="鐩戞祴璁惧鍚嶇О">
+ </el-table-column>
+ <el-table-column prop="svUserName" :show-overflow-tooltip="true" label="鐩戠鐢ㄦ埛鍚嶇О">
+ </el-table-column>
+ <el-table-column prop="tzUserName" :show-overflow-tooltip="true" label="瀹堟硶鑷姪鐢ㄦ埛鍚嶇О">
+ </el-table-column>
+ <el-table-column
+ prop="createTime"
+ :show-overflow-tooltip="true"
+ label="鍒涘缓鏃堕棿"
+ :formatter="timeFormat"
+ >
+ </el-table-column>
+ <el-table-column fixed="right" label="鎿嶄綔" width="100">
+ <template #default="{ row }">
+ <el-button type="primary" size="small" @click="itemEdit(row)">缂栬緫</el-button>
+ </template>
</el-table-column>
</template>
</FYTable>
+ <el-drawer
+ v-model="drawerShow"
+ title="璁惧鍖归厤璁板綍缂栬緫"
+ direction="btt"
+ size="80%"
+ destroy-on-close
+ >
+ <CompDeviceMatchEdit :data="selectedItem" :area="area"></CompDeviceMatchEdit>
+ </el-drawer>
</template>
<script setup>
/**
@@ -37,10 +74,13 @@
import dayjs from 'dayjs';
import { ref, reactive, computed, getCurrentInstance } from 'vue';
import userMapApi from '@/api/fysp/userMapApi';
-import CompQuickSet from '@/views/fysp/evaluation/components/CompQuickSet.vue';
+import CompDeviceMatchEdit from '@/views/fysp/config/device/CompDeviceMatchEdit.vue';
+
+// fixme 2024.9.26 鍚庣画鍙互鐢╲ueuse涓殑鏃堕棿鏍煎紡鍖栨柟娉曟潵浠f浛
const { $fm } = getCurrentInstance().appContext.config.globalProperties;
+/******** 鍖归厤璁板綍鏌ヨ ********/
const tableRef = ref();
const formSearch = reactive({
locations: {},
@@ -78,4 +118,21 @@
// formSearch.sourceType = param.sourceType;
tableRef.value.onSearch();
}
+
+function timeFormat(row) {
+ const time = row.createTime;
+ if (time) {
+ return $fm.formatYMDH(time);
+ } else {
+ return '';
+ }
+}
+
+/******** 鍖归厤璁板綍缂栬緫 ********/
+const drawerShow = ref(false);
+const selectedItem = ref(null);
+function itemEdit(row) {
+ selectedItem.value = row;
+ drawerShow.value = true;
+}
</script>
--
Gitblit v1.9.3