From 9a61e46d96536f3299e57f7259ae1c9972256ec6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 30 九月 2025 09:42:09 +0800
Subject: [PATCH] 1. 隐藏未完成的账户匹配页面 2. 根据第三方新的接口文档修改接口url地址
---
src/views/fysp/config/DeviceMatch.vue | 71 +++++++++++++++++++++++++++++++----
1 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/src/views/fysp/config/DeviceMatch.vue b/src/views/fysp/config/DeviceMatch.vue
index 2bf5f74..31ce579 100644
--- a/src/views/fysp/config/DeviceMatch.vue
+++ b/src/views/fysp/config/DeviceMatch.vue
@@ -14,7 +14,11 @@
:type="2"
v-model:value="formSearch.scenetype"
></FYOptionScene>
- <FYOptionTime :initValue="false" type="month" v-model:value="formSearch.time"></FYOptionTime>
+ <FYOptionTime
+ :initValue="false"
+ type="month"
+ v-model:value="formSearch.time"
+ ></FYOptionTime>
</template>
<template #buttons> </template>
@@ -29,7 +33,13 @@
</template> -->
<template #table-column>
- <el-table-column fixed="left" type="index" label="#" width="40" index="1"></el-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"
@@ -37,11 +47,23 @@
width="160"
>
</el-table-column>
- <el-table-column prop="deviceName" :show-overflow-tooltip="true" label="鐩戞祴璁惧鍚嶇О">
+ <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
+ prop="svUserName"
+ :show-overflow-tooltip="true"
+ label="鐩戠鐢ㄦ埛鍚嶇О"
+ >
</el-table-column>
- <el-table-column prop="tzUserName" :show-overflow-tooltip="true" label="瀹堟硶鑷姪鐢ㄦ埛鍚嶇О">
+ <el-table-column
+ prop="tzUserName"
+ :show-overflow-tooltip="true"
+ label="瀹堟硶鑷姪鐢ㄦ埛鍚嶇О"
+ >
</el-table-column>
<el-table-column
prop="createTime"
@@ -50,9 +72,18 @@
:formatter="timeFormat"
>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" width="100">
+ <el-table-column fixed="right" label="鎿嶄綔" width="150">
<template #default="{ row }">
- <el-button type="primary" size="small" @click="itemEdit(row)">缂栬緫</el-button>
+ <el-button
+ v-show="row.deviceCode"
+ type="primary"
+ size="small"
+ @click="itemEdit(row)"
+ >缂栬緫</el-button
+ >
+ <el-button type="success" size="small" @click="itemAdd(row)"
+ >娣诲姞璁惧</el-button
+ >
</template>
</el-table-column>
</template>
@@ -64,7 +95,11 @@
size="80%"
destroy-on-close
>
- <CompDeviceMatchEdit :data="selectedItem" :area="area"></CompDeviceMatchEdit>
+ <CompDeviceMatchEdit
+ :data="selectedItem"
+ :area="area"
+ @save="onSave"
+ ></CompDeviceMatchEdit>
</el-drawer>
</template>
<script setup>
@@ -135,4 +170,24 @@
selectedItem.value = row;
drawerShow.value = true;
}
+
+/**
+ * 鍚戠敤鎴锋坊鍔犳柊璁惧
+ * 涓嶄紶閫掍富閿甶d鍜岃澶囦俊鎭紝浠ユ琛ㄧず闇�瑕佹坊鍔犳柊鐨勮澶�
+ * @param row 閫変腑鐨勮鏁版嵁
+ */
+function itemAdd(row) {
+ selectedItem.value = {
+ svUserName: row.svUserName,
+ tzUserName: row.tzUserName,
+ svUserId: row.svUserId,
+ tzUserId: row.tzUserId
+ };
+ drawerShow.value = true;
+}
+
+function onSave() {
+ tableRef.value.onSearch();
+ drawerShow.value = false;
+}
</script>
--
Gitblit v1.9.3