根据标签autoCite显示参考文献

This commit is contained in:
2026-04-01 17:30:40 +08:00
parent 3f53a6c7d0
commit 1f29fb5baf
9 changed files with 2223 additions and 21 deletions

View File

@@ -75,7 +75,7 @@
<template slot="catalogue1">
<catalogue
v-if="Main_List.length > 0"
:content="Main_List"
:content="catalogueContent"
:articleId="articleId"
ref="catalogue"
@goToListComment="goToListComment"
@@ -94,6 +94,7 @@
ref="commonWord"
:value="htmlContent"
:contentList="Main_List"
:chanFerForm="chanFerForm"
:comments="comments"
:wordStyle="wordStyle"
@onDrop="onDrop"
@@ -127,6 +128,18 @@
<template slot="comment">
<div style="" class="commentList annotations"></div>
</template>
<template slot="refrences">
<edit-public-ref-table-only
v-if="p_article_id"
ref="editPublicRefTableOnly"
:chanFerForm="chanFerForm"
:chanFerFormRepeatList="chanFerFormRepeatList"
:p_article_id="p_article_id"
@ChanFerMashUp="ChanFerMashUp"
@refrashComp="fetchReferList"
@changeRefer="fetchReferList"
/>
</template>
</common-word>
</div>
</div>
@@ -437,6 +450,7 @@ import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑
import Tinymce from '@/components/page/components/Tinymce';
import bottomTinymce from '@/components/page/components/Tinymce';
import catalogue from '@/components/page/components/table/catalogue.vue';
import editPublicRefTableOnly from './editPublicRefTableOnly.vue';
export default {
data() {
return {
@@ -559,18 +573,31 @@ export default {
pictVisible: false,
typesettingType: 1,
imagesList: [],
exegesis: "The following contents'<b></b>,<i></i>'are necessary for the generation phase, please do not delete them!!!"
exegesis: "The following contents'<b></b>,<i></i>'are necessary for the generation phase, please do not delete them!!!",
p_article_id: null,
chanFerForm: [],
chanFerFormRepeatList: []
};
},
components: {
Tinymce,
bottomTinymce,
catalogue
catalogue,
editPublicRefTableOnly
},
computed: {
combinedValue() {
// 将两个值组合成一个新的值,可以是字符串、数组、对象等
// return `${this.isFirstComponentLoaded}-${this.isWordComponentLoaded}`;
catalogueContent() {
const base = Array.isArray(this.Main_List) ? this.Main_List : [];
if (!Array.isArray(this.chanFerForm) || this.chanFerForm.length === 0) return base;
return [
...base,
{
am_id: 'References',
content: 'References',
is_h1: 1,
is_h2: 0
}
];
}
},
watch: {
@@ -597,6 +624,7 @@ export default {
async created() {
localStorage.removeItem('scrollPosition');
this.isShowEditComment();
this.loadPreacceptArticleDetail();
this.getDate();
this.getCommentList();
},
@@ -615,11 +643,62 @@ export default {
},
async activated() {
this.isShowEditComment();
this.loadPreacceptArticleDetail();
this.getDate();
this.getCommentList();
},
methods: {
loadPreacceptArticleDetail() {
if (!this.articleId) return;
this.$api
.post('api/Article/getPreacceptArticleDetail', { article_id: this.articleId })
.then((res) => {
const pid = res.data && res.data.production && res.data.production.p_article_id;
this.p_article_id = pid;
if (pid != null && pid !== '') {
if (!this.Art_P_Id) this.Art_P_Id = pid;
this.fetchReferList();
}
})
.catch(() => {});
},
fetchReferList() {
if (!this.p_article_id) return;
this.$api
.post('api/Production/getReferList', {
p_article_id: this.p_article_id
})
.then((res) => {
this.chanFerForm = res.data.refers;
this.chanFerFormRepeatList = Object.values(res.data.repeat || {});
for (let i = 0; i < this.chanFerForm.length; i++) {
this.chanFerForm[i].edit_mark = 1;
}
this.$nextTick(() => {
if (this.$refs.editPublicRefTableOnly) {
this.$refs.editPublicRefTableOnly.init();
}
});
})
.catch((err) => {
console.log(err);
});
},
ChanFerMashUp(e) {
this.$api
.post('api/Production/referHB', e)
.then((res) => {
if (res.code == 0) {
this.fetchReferList();
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
},
openAddTable(content) {
this.editVisible = false;
this.threeVisible = true;
@@ -655,6 +734,11 @@ export default {
loadedWord() {
this.isWordComponentLoaded = true;
this.$nextTick(() => {
if (this.$refs.editPublicRefTableOnly) {
this.$refs.editPublicRefTableOnly.init();
}
});
},
// 监听第一个兄弟组件加载完毕
// onFirstComponentLoaded(imagesList) {