{{ isEdit ? '编辑笑话' : '添加笑话' }}
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -46,7 +66,7 @@ const formRef = ref()
const isEdit = ref(false)
const form = reactive({
- title: '', content: '', type_ids: [], crowd_ids: [], status: 'pending'
+ title: '', content: '', polished_content: '', ai_score: null, ai_level: '', type_ids: [], crowd_ids: [], status: 'pending'
})
const types = ref([])
@@ -59,7 +79,16 @@ const loadData = async () => {
if (route.params.id) {
isEdit.value = true
const res = await getJoke(route.params.id)
- Object.assign(form, res)
+ Object.assign(form, {
+ title: res.title,
+ content: res.content,
+ polished_content: res.polished_content || '',
+ ai_score: res.ai_score || null,
+ ai_level: res.ai_level || '',
+ type_ids: res.type_ids || [],
+ crowd_ids: res.crowd_ids || [],
+ status: res.status
+ })
}
}
diff --git a/admin/src/views/joke/List.vue b/admin/src/views/joke/List.vue
index b097762..0da7337 100644
--- a/admin/src/views/joke/List.vue
+++ b/admin/src/views/joke/List.vue
@@ -4,9 +4,54 @@
笑话管理
添加笑话
-
+
+
+
+
+
+ 🔍
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
-
+
+
+
+
+ {{ getLevelText(row.ai_level) }}
+
+ -
+
+
+
+
+ 已润色
+ -
+
+
{{ name }}
@@ -24,8 +69,8 @@
-
-
+
+
编辑
@@ -33,28 +78,69 @@
-
+
@@ -73,4 +179,33 @@ onMounted(() => loadJokes())
justify-content: space-between;
align-items: center;
}
+.search-bar {
+ display: flex;
+ gap: 10px;
+ align-items: center;
+ margin-top: 16px;
+ flex-wrap: wrap;
+}
+.search-icon {
+ font-size: 14px;
+}
+.text-muted {
+ color: #999;
+}
+.pagination-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 20px;
+}
+.page-jump {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ color: #606266;
+ font-size: 13px;
+}
+:deep(.el-input-number) {
+ width: 80px;
+}
diff --git a/admin/src/views/user/List.vue b/admin/src/views/user/List.vue
new file mode 100644
index 0000000..595ed5a
--- /dev/null
+++ b/admin/src/views/user/List.vue
@@ -0,0 +1,118 @@
+