From fcf7d75825747d8a49ae727fe0c26341a9680236 Mon Sep 17 00:00:00 2001
From: xiexiang <9ga-8vwj45xe1@dingtalk.com>
Date: Thu, 12 Aug 2021 15:01:03 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=AE=8C=E6=88=90=E6=96=87=E7=AB=A0=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E3=80=81=E9=9A=90=E8=97=8F=E4=B9=A6?=
=?UTF-8?q?=E6=BA=90=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/books-management.js | 44 ++++
src/icons/svg/disabled.svg | 1 +
src/icons/svg/keyboard.svg | 1 +
src/router/modules/books-management.js | 1 +
.../books-management/ShuYuan-page/index.vue | 26 ++-
.../article-page/components/edit-dialog.vue | 70 +++++--
.../books-management/article-page/index.vue | 188 ++++++++++++------
7 files changed, 244 insertions(+), 87 deletions(-)
create mode 100644 src/api/books-management.js
create mode 100644 src/icons/svg/disabled.svg
create mode 100644 src/icons/svg/keyboard.svg
diff --git a/src/api/books-management.js b/src/api/books-management.js
new file mode 100644
index 0000000..99ef733
--- /dev/null
+++ b/src/api/books-management.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+/**
+ * 书籍管理
+ */
+
+
+export function booksCategory(params) {
+ return request({
+ url: '/category/index', // 书源分类
+ method: 'get',
+ params: params
+ })
+}
+export function booksSource(params) {
+ return request({
+ url: '/platform/index', // 书源
+ method: 'get',
+ params: params
+ })
+}
+
+export function getBooksList(params) {
+ return request({
+ url: '/book/index', // 书籍列表
+ method: 'get',
+ params: params
+ })
+}
+
+export function updateBooks(id) {
+ return request({
+ url: `/book/update/${id}`, // 编辑书籍
+ method: 'put'
+ })
+}
+
+export function deleteBooks(id) {
+ return request({
+ url: `/book/delete/${id}`, // 删除书籍
+ method: 'delete'
+ })
+}
+
diff --git a/src/icons/svg/disabled.svg b/src/icons/svg/disabled.svg
new file mode 100644
index 0000000..68f60ae
--- /dev/null
+++ b/src/icons/svg/disabled.svg
@@ -0,0 +1 @@
+
diff --git a/src/icons/svg/keyboard.svg b/src/icons/svg/keyboard.svg
new file mode 100644
index 0000000..c3b310e
--- /dev/null
+++ b/src/icons/svg/keyboard.svg
@@ -0,0 +1 @@
+
diff --git a/src/router/modules/books-management.js b/src/router/modules/books-management.js
index 8f5b994..bb3ece0 100644
--- a/src/router/modules/books-management.js
+++ b/src/router/modules/books-management.js
@@ -19,6 +19,7 @@ const booksManagement = {
meta: { title: '文章管理' }
},
{
+ hidden: true,
path: 'ShuYuan',
component: () => import('@/views/books-management/ShuYuan-page/index'),
name: 'memberManagement',
diff --git a/src/views/books-management/ShuYuan-page/index.vue b/src/views/books-management/ShuYuan-page/index.vue
index e069266..7860703 100644
--- a/src/views/books-management/ShuYuan-page/index.vue
+++ b/src/views/books-management/ShuYuan-page/index.vue
@@ -64,6 +64,7 @@
size="mini"
@click="openGatherDialog(null)"
>
+
一键采集书籍
定时采集书籍
+
+ 上次采集时间: 2021-08-09 13:52:42
+
@@ -226,7 +230,7 @@ export default {
// }
// })
},
-
+
// 更新操作
refreshData() {
this._baseRequest(true)
@@ -254,15 +258,13 @@ export default {
},
// 删除操作弹窗
openDeleteDialog(scope) {
- this.$confirm('是否确认删除改书籍?删除后该书源信息将永久删除, 且不可复原, 请谨慎操作!', '删除提示', {
+ this.$confirm('是否确认禁用该书籍?禁用后该书源信息将停止使用, 请谨慎操作!', '禁用提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.selectItem = scope.row
- }).catch(() => {
- this.$message.info('已取消删除')
- })
+ }).catch(() => {})
},
// 每页数据
handleSizeChange(val) {
@@ -301,6 +303,16 @@ export default {
.drop-down{
margin: 0 10px;
}
+ .btn-text{
+ color: #A97402;
+ font-size: 14px;
+ padding: 6px 10px 6px 3px;
+ margin-left: 8px;
+ background: rgba(255, 193, 61, 0.2);
+ border-radius: 2px;
+ border: 1px solid rgba(255, 193, 61, 0.5);
+ box-sizing: border-box;
+ }
}
.pagination-container{
display: flex;
diff --git a/src/views/books-management/article-page/components/edit-dialog.vue b/src/views/books-management/article-page/components/edit-dialog.vue
index 9c7f467..a3ef737 100644
--- a/src/views/books-management/article-page/components/edit-dialog.vue
+++ b/src/views/books-management/article-page/components/edit-dialog.vue
@@ -14,53 +14,54 @@
>
-
-
+
确认
@@ -73,13 +74,17 @@