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

dev
zjb 8 months ago
parent ab562bad25
commit dcf87c05f8

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

@ -2,7 +2,7 @@
* @Author: zhangjiabao
* @Date: 2024-02-01 22:15:37
* @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
-->
<template>
@ -33,7 +33,7 @@
<el-button
type="text"
size="mini"
@click="jumpToArticle(scope.row.journalId)"
@click="jumpToJournal(scope.row.journalId)"
>{{ scope.row.journalId }}</el-button
>
</template>
@ -152,8 +152,8 @@ export default {
}
});
},
jumpToArticle(id) {
this.$router.push(`/article/detail?id=${id}`);
jumpToJournal(id) {
this.$router.push(`/journal/detail?id=${id}`);
}
}
};

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

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

@ -3,7 +3,7 @@
* @Date: 2024-02-03 00:03:50
* @LastEditors: zhangjiabao
* @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>
<div class="app-container">
@ -11,23 +11,23 @@
<div slot="header" class="card-header clearfix">
<span class="card-header-text">期刊详情</span>
</div>
<ArticleDetail
<JournalDetail
style="margin-left: -300px"
:data="data"
:remoteTagList="remoteData.tags"
:publisher="remoteData.publisher"
></ArticleDetail>
></JournalDetail>
</el-card>
</div>
</template>
<script>
import ArticleDetail from "./articleDetail.vue";
import articleApi from "@/api/article";
import JournalDetail from "./journalDetail.vue";
import journalApi from "@/api/journal";
import tagApi from "@/api/tag";
export default {
name: "",
components: { ArticleDetail },
name: "JournalDetailPage",
components: { JournalDetail },
props: {},
data() {
return {
@ -56,7 +56,7 @@ export default {
mounted() {},
methods: {
fetchDetail(id) {
articleApi.getDetail(id).then(res => {
journalApi.getDetail(id).then(res => {
if (res.code === 200) {
this.data = JSON.parse(JSON.stringify(res.data));
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:
* @version: v1
@ -74,7 +67,7 @@
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:on-change="handleUploadArticleImageSuccess"
:on-change="handleUploadJournalImageSuccess"
multiple
:limit="1"
:on-exceed="handleExceed"
@ -341,7 +334,7 @@ import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
export default {
name: "ArticleModify",
name: "JournalModify",
props: {
data: {
type: Object,
@ -526,7 +519,7 @@ export default {
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleUploadArticleImageSuccess(response, file, fileList) {
handleUploadJournalImageSuccess(response, file, fileList) {
if (response.status === "success") {
this.$message.success("上传成功");
this.data.image = response.response.data["fullUrl"];

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