From ca7922b3af28684b0fd292701b613895537861da Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 12 九月 2024 10:00:54 +0800
Subject: [PATCH] 拆机选中&修改功能

---
 src/views/ecg/doctor/DevDismantle.vue |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/views/ecg/doctor/DevDismantle.vue b/src/views/ecg/doctor/DevDismantle.vue
index b4ec0e3..090a5a6 100644
--- a/src/views/ecg/doctor/DevDismantle.vue
+++ b/src/views/ecg/doctor/DevDismantle.vue
@@ -45,11 +45,11 @@
       </el-form-item>
     </el-form>
     <el-button @click="submitForm" type="primary" :disabled="formLoading">鎷嗘満瀹屾垚</el-button>
-    <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+    <el-button @click="resetForm()">閲嶇疆</el-button>
 
   <!-- 鍖荤敓鎷嗘満鍒楄〃 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
+    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @current-change="onCurChange" >
       <el-table-column label="id" align="center" prop="id" />
       <el-table-column label="浣滀笟绫诲瀷" align="center" prop="jobType" />
       <el-table-column label="鍖荤敓缂栧彿" align="center" prop="docId" />
@@ -193,6 +193,10 @@
   }
 }
 
+const getSelectedRent = async (rentId) => {
+  formData.value = await DevRentApi.getDevRent(rentId)
+}
+
 const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
 const list = ref<JobRecordVO[]>([]) // 鍒楄〃鐨勬暟鎹�
 const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
@@ -222,6 +226,12 @@
   }
 }
 
+const onCurChange = (cur) => {
+  console.log( cur )
+  console.log( cur.rentId)
+  getSelectedRent( cur.rentId )
+}
+
 /** 鍒濆鍖� **/
 onMounted(() => {
   getList()

--
Gitblit v1.9.3