🌈 style(期刊): 期刊article->journal

dev
zjb 12 months ago
parent ab562bad25
commit dcf87c05f8

@ -2,7 +2,7 @@
* @Author: zhangjiabao * @Author: zhangjiabao
* @Date: 2024-01-25 11:05:17 * @Date: 2024-01-25 11:05:17
* @LastEditors: zhangjiabao * @LastEditors: zhangjiabao
* @LastEditTime: 2024-02-03 00:37:17 * @LastEditTime: 2024-02-04 22:53:38
* @FilePath: \luoo_manage_fe\src\router\index.js * @FilePath: \luoo_manage_fe\src\router\index.js
*/ */
import Vue from "vue"; import Vue from "vue";
@ -52,14 +52,14 @@ export const constantRouterMap = [
{ {
path: "/mainPage", path: "/mainPage",
component: Layout, component: Layout,
redirect: "/mainPage/article", redirect: "/mainPage/journal",
name: "MainPage", name: "MainPage",
meta: { title: "首页", icon: "example" }, meta: { title: "首页", icon: "example" },
children: [ children: [
{ {
path: "article", path: "journal",
name: "ArticlePublish", name: "JournalPublish",
component: () => import("@/views/article/publish"), component: () => import("@/views/journal/journalPublish"),
meta: { title: "期刊发布" } meta: { title: "期刊发布" }
}, },
{ {
@ -71,23 +71,23 @@ export const constantRouterMap = [
] ]
}, },
{ {
path: "/article", path: "/journal",
component: Layout, component: Layout,
meta: { title: "期刊管理", icon: "artical" }, meta: { title: "期刊管理", icon: "artical" },
children: [ children: [
{ {
path: "index", path: "index",
name: "ArticleIndex", name: "JournalIndex",
component: () => import("@/views/article"), component: () => import("@/views/journal"),
meta: { title: "期刊列表" } meta: { title: "期刊列表" }
}, },
{ {
path: "detail", path: "detail",
name: "ArticleManageDetail", name: "JournalManageDetail",
hidden: true, hidden: true,
component: () => import("@/views/article/articleDetailPage"), component: () => import("@/views/journal/journalDetailPage"),
meta: { title: "期刊详情" } meta: { title: "期刊详情" }
} }
] ]

@ -2,7 +2,7 @@
* @Author: zhangjiabao * @Author: zhangjiabao
* @Date: 2024-02-01 22:15:37 * @Date: 2024-02-01 22:15:37
* @LastEditors: zhangjiabao * @LastEditors: zhangjiabao
* @LastEditTime: 2024-02-03 00:38:41 * @LastEditTime: 2024-02-04 22:54:30
* @FilePath: \luoo_manage_fe\src\views\comment\index.vue * @FilePath: \luoo_manage_fe\src\views\comment\index.vue
--> -->
<template> <template>
@ -33,7 +33,7 @@
<el-button <el-button
type="text" type="text"
size="mini" size="mini"
@click="jumpToArticle(scope.row.journalId)" @click="jumpToJournal(scope.row.journalId)"
>{{ scope.row.journalId }}</el-button >{{ scope.row.journalId }}</el-button
> >
</template> </template>
@ -152,8 +152,8 @@ export default {
} }
}); });
}, },
jumpToArticle(id) { jumpToJournal(id) {
this.$router.push(`/article/detail?id=${id}`); this.$router.push(`/journal/detail?id=${id}`);
} }
} }
}; };

@ -226,12 +226,12 @@
v-loading="modifyDialog.loading" v-loading="modifyDialog.loading"
style="height: 70vh;overflow: auto;padding-left:20px;padding-right:20px" style="height: 70vh;overflow: auto;padding-left:20px;padding-right:20px"
> >
<ArticleDetail <JournalDetail
v-if="modifyDialog.visible && modifyDialog.type === 2" v-if="modifyDialog.visible && modifyDialog.type === 2"
:data="modifyDialog.data" :data="modifyDialog.data"
:remoteTagList="queryForm.remoteData.superFilterTags" :remoteTagList="queryForm.remoteData.superFilterTags"
:publisher="queryForm.remoteData.publisher" :publisher="queryForm.remoteData.publisher"
></ArticleDetail> ></JournalDetail>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleDialogCancel" <el-button size="small" type="primary" @click="handleDialogCancel"
@ -305,13 +305,13 @@
</template> </template>
<script> <script>
import articleApi from "@/api/article"; import journalApi from "@/api/journal";
import tagApi from "@/api/tag"; import tagApi from "@/api/tag";
import SuperFilterTagDrawer from "./superFilterTagDrawer.vue"; import SuperFilterTagDrawer from "./superFilterTagDrawer.vue";
import ArticleDetail from "./articleDetail.vue"; import JournalDetail from "./journalDetail.vue";
export default { export default {
name: "Article", name: "Journal",
data() { data() {
return { return {
// 01 2 // 01 2
@ -360,7 +360,7 @@ export default {
}; };
}, },
components: { components: {
ArticleDetail, JournalDetail,
SuperFilterTagDrawer SuperFilterTagDrawer
}, },
filters: {}, filters: {},
@ -401,7 +401,7 @@ export default {
} }
this.table.loading = true; this.table.loading = true;
this.table.data = []; this.table.data = [];
articleApi journalApi
.getList(queryParam, this.table.page.current, this.table.page.size) .getList(queryParam, this.table.page.current, this.table.page.size)
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -533,13 +533,13 @@ export default {
* 新建标签点击事件 * 新建标签点击事件
*/ */
handleAddClick() { handleAddClick() {
this.$router.push(`/mainPage/article?type=add`); this.$router.push(`/mainPage/journal?type=add`);
}, },
/** /**
* 编辑标签点击事件 * 编辑标签点击事件
*/ */
handleModifyClick(row) { handleModifyClick(row) {
this.$router.push(`/mainPage/article?id=${row.id}&type=modify`); this.$router.push(`/mainPage/journal?id=${row.id}&type=modify`);
}, },
/** /**
* 发布点击事件 * 发布点击事件
@ -556,7 +556,7 @@ export default {
handleDetailClick(row) { handleDetailClick(row) {
this.modifyDialog.visible = true; this.modifyDialog.visible = true;
this.modifyDialog.loading = true; this.modifyDialog.loading = true;
articleApi.getDetail(row.id).then(res => { journalApi.getDetail(row.id).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.modifyDialog.data = JSON.parse(JSON.stringify(res.data)); this.modifyDialog.data = JSON.parse(JSON.stringify(res.data));
this.modifyDialog.type = 2; this.modifyDialog.type = 2;
@ -573,7 +573,7 @@ export default {
* 表格内状态滑块切换事件 * 表格内状态滑块切换事件
*/ */
handleTableRowStatusChange($event, row) { handleTableRowStatusChange($event, row) {
articleApi.updateStatus(row.id, $event).then(res => { journalApi.updateStatus(row.id, $event).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.message); this.$message.success(res.message);
} else { } else {
@ -599,7 +599,7 @@ export default {
* 发布弹窗确认按扭 * 发布弹窗确认按扭
*/ */
handlePublishDialogSubmit() { handlePublishDialogSubmit() {
articleApi journalApi
.publish( .publish(
this.publishDialog.id, this.publishDialog.id,
this.publishDialog.type, this.publishDialog.type,

@ -120,7 +120,7 @@
import commentApi from "@/api/comment"; import commentApi from "@/api/comment";
export default { export default {
name: "ArticleDetail", name: "JournalDetail",
props: { props: {
data: { data: {
type: Object, type: Object,

@ -3,7 +3,7 @@
* @Date: 2024-02-03 00:03:50 * @Date: 2024-02-03 00:03:50
* @LastEditors: zhangjiabao * @LastEditors: zhangjiabao
* @LastEditTime: 2024-02-03 00:54:34 * @LastEditTime: 2024-02-03 00:54:34
* @FilePath: \luoo_manage_fe\src\views\article\articleDetailPage.vue * @FilePath: \luoo_manage_fe\src\views\journal\journalDetailPage.vue
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
@ -11,23 +11,23 @@
<div slot="header" class="card-header clearfix"> <div slot="header" class="card-header clearfix">
<span class="card-header-text">期刊详情</span> <span class="card-header-text">期刊详情</span>
</div> </div>
<ArticleDetail <JournalDetail
style="margin-left: -300px" style="margin-left: -300px"
:data="data" :data="data"
:remoteTagList="remoteData.tags" :remoteTagList="remoteData.tags"
:publisher="remoteData.publisher" :publisher="remoteData.publisher"
></ArticleDetail> ></JournalDetail>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import ArticleDetail from "./articleDetail.vue"; import JournalDetail from "./journalDetail.vue";
import articleApi from "@/api/article"; import journalApi from "@/api/journal";
import tagApi from "@/api/tag"; import tagApi from "@/api/tag";
export default { export default {
name: "", name: "JournalDetailPage",
components: { ArticleDetail }, components: { JournalDetail },
props: {}, props: {},
data() { data() {
return { return {
@ -56,7 +56,7 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
fetchDetail(id) { fetchDetail(id) {
articleApi.getDetail(id).then(res => { journalApi.getDetail(id).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.data = JSON.parse(JSON.stringify(res.data)); this.data = JSON.parse(JSON.stringify(res.data));
this.type = 1; this.type = 1;

@ -1,10 +1,3 @@
<!--
* @Author: zhangjiabao
* @Date: 2024-01-24 10:09:33
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-02-04 11:15:32
* @FilePath: /luoo_manage_fe/src/views/article/articleModify.vue
-->
<!-- <!--
* @Description: * @Description:
* @version: v1 * @version: v1
@ -74,7 +67,7 @@
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:on-change="handleUploadArticleImageSuccess" :on-change="handleUploadJournalImageSuccess"
multiple multiple
:limit="1" :limit="1"
:on-exceed="handleExceed" :on-exceed="handleExceed"
@ -341,7 +334,7 @@ import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css"; import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css"; import "quill/dist/quill.bubble.css";
export default { export default {
name: "ArticleModify", name: "JournalModify",
props: { props: {
data: { data: {
type: Object, type: Object,
@ -526,7 +519,7 @@ export default {
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
}, },
handleUploadArticleImageSuccess(response, file, fileList) { handleUploadJournalImageSuccess(response, file, fileList) {
if (response.status === "success") { if (response.status === "success") {
this.$message.success("上传成功"); this.$message.success("上传成功");
this.data.image = response.response.data["fullUrl"]; this.data.image = response.response.data["fullUrl"];

@ -34,25 +34,25 @@
> >
</template> </template>
</el-result> </el-result>
<ArticleModify <JournalModify
style="margin-left: -200px;" style="margin-left: -200px;"
ref="modifyDialog" ref="modifyDialog"
v-if="contentShow" v-if="contentShow"
:data="data" :data="data"
:remoteTagList="remoteData.tags" :remoteTagList="remoteData.tags"
:publisher="remoteData.publisher" :publisher="remoteData.publisher"
></ArticleModify> ></JournalModify>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import articleApi from "@/api/article"; import journalApi from "@/api/journal";
import tagApi from "@/api/tag"; import tagApi from "@/api/tag";
import ArticleModify from "./articleModify.vue"; import JournalModify from "./journalModify.vue";
export default { export default {
name: "ArticlePublish", name: "JournalPublish",
data() { data() {
return { return {
type: 0, type: 0,
@ -74,7 +74,7 @@ export default {
}; };
}, },
components: { components: {
ArticleModify JournalModify
}, },
filters: {}, filters: {},
created() { created() {
@ -90,7 +90,7 @@ export default {
}, },
methods: { methods: {
fetchDetail(id) { fetchDetail(id) {
articleApi.getDetail(id).then(res => { journalApi.getDetail(id).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.data = JSON.parse(JSON.stringify(res.data)); this.data = JSON.parse(JSON.stringify(res.data));
this.type = 1; this.type = 1;
@ -183,7 +183,7 @@ export default {
// //
if (this.type === 0) { if (this.type === 0) {
articleApi.add(param).then(res => { journalApi.add(param).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.data = { this.data = {
id: null, id: null,
@ -210,7 +210,7 @@ export default {
return; return;
} }
if (this.type === 1) { if (this.type === 1) {
articleApi.update(param.id, param).then(res => { journalApi.update(param.id, param).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.data = { this.data = {
id: null, id: null,
Loading…
Cancel
Save