Merge branch 'master' of https://git.nuttyreading.com/wangjinlei/tougao_web into similarity-check
This commit is contained in:
@@ -19,8 +19,8 @@ const service = axios.create({
|
|||||||
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
|
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
|
||||||
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
|
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
|
||||||
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
|
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
|
||||||
baseURL: '/api', //本地
|
// baseURL: '/api', //本地
|
||||||
// baseURL: '/', //正式
|
baseURL: '/', //正式
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2527,6 +2527,7 @@ export default {
|
|||||||
background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
});
|
||||||
this.$api.post('api/Article/changeRepetition', this.repeform).then((res) => {
|
this.$api.post('api/Article/changeRepetition', this.repeform).then((res) => {
|
||||||
|
this.repebox = false;
|
||||||
load.close();
|
load.close();
|
||||||
this.$message.success('success');
|
this.$message.success('success');
|
||||||
this.initarticle();
|
this.initarticle();
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<span class="label">{{ $t('autoPromotion.journal') }} : </span>
|
<span class="label">{{ $t('autoPromotion.journal') }} : </span>
|
||||||
{{ currentJournalName }}
|
{{ currentJournalName }}
|
||||||
<el-select
|
<el-select
|
||||||
v-if="config.initialized && selectedJournalId"
|
v-if="selectedJournalId"
|
||||||
v-model="headerPromotionFactoryId"
|
v-model="headerPromotionFactoryId"
|
||||||
class="header-factory-task-select custom-pipeline-select"
|
class="header-factory-task-select custom-pipeline-select"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</el-option-group>
|
</el-option-group>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-tag
|
<el-tag
|
||||||
v-if="config.initialized && selectedJournalId && headerFactoryTaskRunning !== null"
|
v-if="selectedJournalId && headerFactoryTaskRunning !== null"
|
||||||
:type="headerFactoryTaskRunning ? 'success' : 'info'"
|
:type="headerFactoryTaskRunning ? 'success' : 'info'"
|
||||||
size="small"
|
size="small"
|
||||||
effect="plain"
|
effect="plain"
|
||||||
@@ -74,10 +74,10 @@
|
|||||||
|
|
||||||
<el-button type="text" size="small" style="margin-left: 10px" @click="openFactoryTaskDialogFromLogs">
|
<el-button type="text" size="small" style="margin-left: 10px" @click="openFactoryTaskDialogFromLogs">
|
||||||
<i class="el-icon-edit"></i>
|
<i class="el-icon-edit"></i>
|
||||||
{{ config.initialized ? $t('autoPromotionLogs.editConfig') : $t('autoPromotionLogs.startConfig') }}
|
{{ $t('autoPromotionLogs.editConfig') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="config.initialized && selectedJournalId && headerPromotionFactoryId" class="right">
|
<div v-if="selectedJournalId && headerPromotionFactoryId" class="right">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -92,31 +92,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<div v-loading="loading" class="main-body">
|
<div v-loading="loading" class="main-body">
|
||||||
<el-card v-if="!config.initialized" shadow="never" class="wizard-card">
|
<div class="manage-mode">
|
||||||
<auto-promotion-wizard
|
|
||||||
mode="inline"
|
|
||||||
:config="config"
|
|
||||||
:wizardStartDate.sync="wizardStartDate"
|
|
||||||
:selectedFieldIds.sync="selectedFieldIds"
|
|
||||||
:selectedCountryIds.sync="selectedCountryIds"
|
|
||||||
:availableFields="availableFields"
|
|
||||||
:availableCountries="availableCountries"
|
|
||||||
:fieldsLoading="fieldsLoading"
|
|
||||||
:fieldsSaving="fieldsSaving"
|
|
||||||
:currentJournalName="currentJournalName"
|
|
||||||
:selectedTemplateThumbHtml="selectedTemplateThumbHtml"
|
|
||||||
:selectedTemplateName="selectedTemplateName"
|
|
||||||
:selectedStyleName="selectedStyleName"
|
|
||||||
:saving="saving"
|
|
||||||
:title="$t('autoPromotion.title')"
|
|
||||||
@open-template-selector="showTemplateDialog = true"
|
|
||||||
@confirm-fields="savePromotionFieldsNow"
|
|
||||||
@confirm-countries="savePromotionCountriesNow"
|
|
||||||
@confirm="completeInitialization"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<div v-else class="manage-mode">
|
|
||||||
<el-card shadow="never" class="list-card">
|
<el-card shadow="never" class="list-card">
|
||||||
<div class="filter-header-row">
|
<div class="filter-header-row">
|
||||||
<div class="tmr-capsule-group">
|
<div class="tmr-capsule-group">
|
||||||
@@ -270,30 +246,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<auto-promotion-wizard
|
|
||||||
mode="dialog"
|
|
||||||
:visible.sync="showWizardDialog"
|
|
||||||
:config="config"
|
|
||||||
:wizardStartDate.sync="wizardStartDate"
|
|
||||||
:selectedFieldIds.sync="selectedFieldIds"
|
|
||||||
:selectedCountryIds.sync="selectedCountryIds"
|
|
||||||
:availableFields="availableFields"
|
|
||||||
:availableCountries="availableCountries"
|
|
||||||
:fieldsLoading="fieldsLoading"
|
|
||||||
:fieldsSaving="fieldsSaving"
|
|
||||||
:currentJournalName="currentJournalName"
|
|
||||||
:selectedTemplateThumbHtml="selectedTemplateThumbHtml"
|
|
||||||
:selectedTemplateName="selectedTemplateName"
|
|
||||||
:selectedStyleName="selectedStyleName"
|
|
||||||
:saving="saving"
|
|
||||||
:title="$t('autoPromotion.title')"
|
|
||||||
@open-template-selector="showTemplateDialog = true"
|
|
||||||
@confirm-fields="savePromotionFieldsNow"
|
|
||||||
@confirm-countries="savePromotionCountriesNow"
|
|
||||||
@cancel="showWizardDialog = false"
|
|
||||||
@confirm="completeInitialization"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<template-selector-dialog
|
<template-selector-dialog
|
||||||
v-if="showTemplateDialog"
|
v-if="showTemplateDialog"
|
||||||
:visible.sync="showTemplateDialog"
|
:visible.sync="showTemplateDialog"
|
||||||
@@ -359,7 +311,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import CkeditorMail from '@/components/page/components/email/CkeditorMail.vue';
|
import CkeditorMail from '@/components/page/components/email/CkeditorMail.vue';
|
||||||
import TemplateSelectorDialog from '@/components/page/components/email/TemplateSelectorDialog.vue';
|
import TemplateSelectorDialog from '@/components/page/components/email/TemplateSelectorDialog.vue';
|
||||||
import AutoPromotionWizard from '@/components/page/components/autoPromotion/AutoPromotionWizard.vue';
|
|
||||||
import PromotionFactoryTaskDialog from '@/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue';
|
import PromotionFactoryTaskDialog from '@/components/page/components/autoPromotion/PromotionFactoryTaskDialog.vue';
|
||||||
import PromotionDetailDrawer from '@/components/page/components/autoPromotion/PromotionDetailDrawer.vue';
|
import PromotionDetailDrawer from '@/components/page/components/autoPromotion/PromotionDetailDrawer.vue';
|
||||||
// 这里假设你已经定义了 API 地址
|
// 这里假设你已经定义了 API 地址
|
||||||
@@ -373,8 +324,8 @@ const API = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'autoPromotion',
|
name: 'autoPromotionLogs',
|
||||||
components: { TemplateSelectorDialog, AutoPromotionWizard, PromotionFactoryTaskDialog, CkeditorMail, PromotionDetailDrawer },
|
components: { TemplateSelectorDialog, PromotionFactoryTaskDialog, CkeditorMail, PromotionDetailDrawer },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
handleRefreshList: [],
|
handleRefreshList: [],
|
||||||
@@ -482,12 +433,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
'$route.query.journal_id'(val) {
|
||||||
|
const s = String(val != null ? val : '').trim();
|
||||||
|
if (s === String(this.selectedJournalId || '').trim()) return;
|
||||||
|
this.initPage();
|
||||||
|
},
|
||||||
'$route.query.promotion_factory_id'(val) {
|
'$route.query.promotion_factory_id'(val) {
|
||||||
const s = String(val != null ? val : '').trim();
|
const s = String(val != null ? val : '').trim();
|
||||||
if (s === String(this.headerPromotionFactoryId || '').trim()) return;
|
if (s === String(this.headerPromotionFactoryId || '').trim()) return;
|
||||||
this.headerPromotionFactoryId = s;
|
this.headerPromotionFactoryId = s;
|
||||||
this.routePromotionFactoryId = s;
|
this.routePromotionFactoryId = s;
|
||||||
if (this.config.initialized && this.selectedJournalId) {
|
if (this.selectedJournalId) {
|
||||||
this.query.pageIndex = 1;
|
this.query.pageIndex = 1;
|
||||||
this.fetchList();
|
this.fetchList();
|
||||||
}
|
}
|
||||||
@@ -496,6 +452,28 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.initPage();
|
this.initPage();
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
const routeJid = String((this.$route.query && this.$route.query.journal_id) || '').trim();
|
||||||
|
const curJid = String(this.selectedJournalId || '').trim();
|
||||||
|
if (routeJid && routeJid !== curJid) {
|
||||||
|
this.initPage();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const routePid = String(
|
||||||
|
(this.$route.query && this.$route.query.promotion_factory_id) ||
|
||||||
|
(this.$route.query && this.$route.query.taskId) ||
|
||||||
|
''
|
||||||
|
).trim();
|
||||||
|
const curPid = String(this.headerPromotionFactoryId || '').trim();
|
||||||
|
if (routePid && routePid !== curPid) {
|
||||||
|
this.headerPromotionFactoryId = routePid;
|
||||||
|
this.routePromotionFactoryId = routePid;
|
||||||
|
if (this.selectedJournalId) {
|
||||||
|
this.query.pageIndex = 1;
|
||||||
|
this.fetchList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
mapFactoryTaskTypeLabel(type) {
|
mapFactoryTaskTypeLabel(type) {
|
||||||
const t = String(type || '');
|
const t = String(type || '');
|
||||||
@@ -635,10 +613,6 @@ export default {
|
|||||||
try {
|
try {
|
||||||
await this.fetchJournalDetail();
|
await this.fetchJournalDetail();
|
||||||
if (this.selectedJournalId) {
|
if (this.selectedJournalId) {
|
||||||
this.loadPromotionFields(this.selectedJournalId);
|
|
||||||
}
|
|
||||||
if (this.config.initialized) {
|
|
||||||
await this.fetchTemplates();
|
|
||||||
await this.fetchFactoryTasksForHeader();
|
await this.fetchFactoryTasksForHeader();
|
||||||
await this.fetchList();
|
await this.fetchList();
|
||||||
}
|
}
|
||||||
@@ -747,7 +721,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 下拉仅展示「类型 - 创建日期」,运行状态单独用 el-tag */
|
/** 下拉仅展示「类型 - 创建日期」,运行状态单独用 el-tag */
|
||||||
buildFactoryHeaderOptionMainLabel(task, pidFallback) {
|
buildFactoryHeaderOptionMainLabel(task, pidFallback) {
|
||||||
console.log("🚀 ~ buildFactoryHeaderOptionMainLabel ~ task:", task);
|
|
||||||
|
|
||||||
const typePart = this.getFactoryHeaderTaskTypeLabel(task) || String(pidFallback || '').trim() || '—';
|
const typePart = this.getFactoryHeaderTaskTypeLabel(task) || String(pidFallback || '').trim() || '—';
|
||||||
const expertTypePart = this.mapFactoryExpertTypeLabel(task.expert_type);
|
const expertTypePart = this.mapFactoryExpertTypeLabel(task.expert_type);
|
||||||
@@ -764,7 +738,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchFactoryTasksForHeader() {
|
async fetchFactoryTasksForHeader() {
|
||||||
if (!this.selectedJournalId || !this.config.initialized) {
|
if (!this.selectedJournalId) {
|
||||||
this.factoryTaskOptions = [];
|
this.factoryTaskOptions = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user