From 159fa1f9e62cf2873bf26b2db83d0b32656cdf3d Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期四, 06 六月 2024 19:44:58 +0800
Subject: [PATCH] 修改

---
 web/src/views/modules/sysPictureBase/SysPictureBase.vue             |   12 ++++++++++--
 web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue |    8 ++++----
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
index bfb24e0..0dfe340 100644
--- a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
+++ b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
@@ -56,12 +56,12 @@
       }
     },
     methods: {
-      async init() {
-        if (this.dataForm.id) {
-          let res = await this.$http.get(`/sysPictureBase/${this.dataForm.id}`)
+      async init(id,row) {
+        if (id) {
+          //let res = await this.$http.get(`/sysPictureBase/${this.dataForm.id}`)
           this.dataForm = {
             ...this.dataForm,
-            ...res.data
+            ...row
           }
           console.log(this.dataForm, 'this.dataForm this.dataForm')
         }
diff --git a/web/src/views/modules/sysPictureBase/SysPictureBase.vue b/web/src/views/modules/sysPictureBase/SysPictureBase.vue
index 863b4f0..7914db7 100644
--- a/web/src/views/modules/sysPictureBase/SysPictureBase.vue
+++ b/web/src/views/modules/sysPictureBase/SysPictureBase.vue
@@ -30,8 +30,13 @@
           </el-table-column>
           <el-table-column prop="contentType" label="妫�绱㈠叧閿瓧"/>
           <zt-table-column-dict prop="productType" label="浜у搧绫诲瀷" dict="product" :additional=additional />
-          <zt-table-column-handle :table="table"
-                                  delete-perm="sysPictureBase::delete"/>
+          <zt-table-column-handle :table="table"  edit-perm="sysPictureBase::delete"
+                                  delete-perm="sysPictureBase::delete">
+            <template slot-scope="scope">
+              <zt-table-button size="small" type="primary" @click="edit(scope.row)">淇敼
+              </zt-table-button>
+            </template>
+          </zt-table-column-handle>
         </el-table>
         <!-- 寮圭獥, 鏂板 / 淇敼 -->
         <add-or-update ref="addOrUpdate" @refreshDataList="table.query"/>
@@ -72,6 +77,9 @@
           await this.$tip.success()
           this.$refs.tableObj.query()
         }
+      },
+      edit(row){
+        this.$refs.addOrUpdate.$refs.dialog.init(row.id,row)
       }
     }
   }

--
Gitblit v1.9.1