From 8ba80c0eb376402efa1ae600426e82a9248e82f0 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Tue, 7 Jan 2025 15:30:15 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E7=82=B9=E7=BC=96=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/site/list/index.vue | 56 ++++++++++++++++++++++++++---------
1 file changed, 42 insertions(+), 14 deletions(-)
diff --git a/src/pages/site/list/index.vue b/src/pages/site/list/index.vue
index 577f972..e02a65d 100644
--- a/src/pages/site/list/index.vue
+++ b/src/pages/site/list/index.vue
@@ -14,15 +14,12 @@
-
-
-
-
-
-
+
+
前往网站首页
内容管理
+ 编辑
@@ -30,6 +27,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -44,7 +56,14 @@ export default {
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
- list: []
+ list: [],
+
+ siteVisible: false,
+ form: {
+ id: '',
+ siteName: '',
+ domainName: '',
+ },
};
},
computed: {
@@ -88,13 +107,6 @@ export default {
handleCurrentChange (val) {
this.page = val
},
- // 更改域名
- async update (row) {
- await this.$put(this.api.updateSite, {
- id: row.id,
- domainName: row.domainName
- })
- },
// 前往网站首页
toIndex (row) {
window.open((Setting.isDev ? `http://${location.hostname}:8097` : row.domainName) + `#/column?siteId=${row.id}`)
@@ -104,6 +116,22 @@ export default {
this.setSite(row)
this.$router.push(`/column`)
},
+ // 编辑
+ edit (row) {
+ this.form = {
+ id: row.id,
+ siteName: row.siteName,
+ domainName: row.domainName,
+ }
+ this.siteVisible = true
+ },
+ // 编辑提交
+ async submit () {
+ await this.$put(this.api.updateSite, this.form)
+ this.siteVisible = false
+ Util.successMsg('保存成功')
+ this.getData()
+ },
}
};