提交
This commit is contained in:
@@ -388,6 +388,8 @@
|
||||
:value="currentContent.content"
|
||||
@getContent="getContent"
|
||||
@openLatexEditor="openLatexEditor"
|
||||
@openRefSelector="handleOpenRefSelector"
|
||||
:chanFerForm="chanFerForm"
|
||||
v-if="editVisible"
|
||||
ref="commonContent"
|
||||
style="margin-left: -115px"
|
||||
@@ -422,6 +424,8 @@
|
||||
@getContent="getContent"
|
||||
type="content"
|
||||
@openLatexEditor="openLatexEditor"
|
||||
@openRefSelector="handleOpenRefSelector"
|
||||
:chanFerForm="chanFerForm"
|
||||
v-if="addContentVisible"
|
||||
ref="addContent"
|
||||
style="margin-left: -115px"
|
||||
@@ -439,6 +443,40 @@
|
||||
</el-dialog>
|
||||
|
||||
<common-late-x v-if="showLateX" @close="showLateX = false" @save="saveLateX" :LateXInfo="LateXInfo"></common-late-x>
|
||||
|
||||
<el-dialog
|
||||
:title="$t('wordCite.selectRef')"
|
||||
:visible.sync="refSelectorVisible"
|
||||
width="860px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-table
|
||||
:data="chanFerForm"
|
||||
highlight-current-row
|
||||
@current-change="handleRefCurrentChange"
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
size="small"
|
||||
>
|
||||
<el-table-column type="index" :label="'#'" width="60" :index="idx => idx + 1"></el-table-column>
|
||||
<el-table-column :label="$t('wordCite.reference')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.refer_frag || [scope.row.author, scope.row.title, scope.row.joura, scope.row.dateno].filter(Boolean).join(' ') || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="DOI" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.doilink || scope.row.doi || scope.row.isbn || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="refSelectorVisible = false">{{ $t('wordCite.cancel') }}</el-button>
|
||||
<el-button type="danger" v-if="refSelectorCurrentRefId" @click="handleRemoveRefCite">{{ $t('wordCite.remove') }}</el-button>
|
||||
<el-button type="primary" :disabled="!refSelectedRow" @click="handleConfirmRefCite">{{ $t('wordCite.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -576,7 +614,11 @@ export default {
|
||||
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: []
|
||||
chanFerFormRepeatList: [],
|
||||
refSelectorVisible: false,
|
||||
refSelectorCurrentRefId: null,
|
||||
refSelectedRow: null,
|
||||
refSelectorSource: 'commonContent'
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -685,6 +727,36 @@ export default {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
handleOpenRefSelector(data) {
|
||||
this.refSelectorCurrentRefId = data && data.currentRefId ? data.currentRefId : null;
|
||||
this.refSelectedRow = null;
|
||||
if (this.editVisible) {
|
||||
this.refSelectorSource = 'commonContent';
|
||||
} else if (this.addContentVisible) {
|
||||
this.refSelectorSource = 'addContent';
|
||||
}
|
||||
this.refSelectorVisible = true;
|
||||
},
|
||||
handleRefCurrentChange(row) {
|
||||
this.refSelectedRow = row;
|
||||
},
|
||||
handleConfirmRefCite() {
|
||||
if (!this.refSelectedRow) return;
|
||||
const ref = this.$refs[this.refSelectorSource];
|
||||
if (ref) {
|
||||
ref.insertAutocite(this.refSelectedRow.p_refer_id);
|
||||
}
|
||||
this.refSelectorVisible = false;
|
||||
this.refSelectedRow = null;
|
||||
},
|
||||
handleRemoveRefCite() {
|
||||
const ref = this.$refs[this.refSelectorSource];
|
||||
if (ref) {
|
||||
ref.removeAutocite();
|
||||
}
|
||||
this.refSelectorVisible = false;
|
||||
this.refSelectedRow = null;
|
||||
},
|
||||
ChanFerMashUp(e) {
|
||||
this.$api
|
||||
.post('api/Production/referHB', e)
|
||||
|
||||
Reference in New Issue
Block a user