自动化样式

This commit is contained in:
2026-04-29 09:20:47 +08:00
parent 56cda2c232
commit a4cbce2db7
11 changed files with 917 additions and 116 deletions

View File

@@ -478,6 +478,7 @@ const currentYear = new Date().getFullYear();
var ReviewTime = `(${currentYear - 2}${currentYear})`;
import commonReviewer from '../page/components/reviewerList/add.vue';
import commonMajorTableList from '../page/components/major/tableList.vue';
import bus from '../common/bus'
export default {
components: {
commonReviewer,
@@ -657,11 +658,27 @@ export default {
},
created() {
this.getDate();
this.getContent();
this.loadFields();
// this.initMajor()
},
methods: {
readPromotionFactoryJumpJournalId() {
try {
const raw = sessionStorage.getItem('promotionFactoryJump');
if (!raw) return '';
const obj = JSON.parse(raw || '{}');
if (!obj || obj.from !== 'promotionFactory') return '';
if (obj.targetPath && String(obj.targetPath) !== String(this.$route.path)) return '';
const id = obj.journal_id != null ? String(obj.journal_id) : '';
sessionStorage.removeItem('promotionFactoryJump');
return id;
} catch (e) {
try {
sessionStorage.removeItem('promotionFactoryJump');
} catch (e2) {}
return '';
}
},
getProps() {
return {
value: 'value',
@@ -716,6 +733,32 @@ export default {
.then((res) => {
if (res.code == 0) {
this.df_jour = res.data.journals;
const fromQueryId = (this.$route && this.$route.query && (this.$route.query.journalId || this.$route.query.journal_id)) || '';
const fromSessionId = this.readPromotionFactoryJumpJournalId();
const pickedId = fromQueryId || fromSessionId;
if (pickedId) {
this.query.journalId = Number(pickedId) || 0;
}
this.getContent();
// 仅首次接收参数:应用后立刻清掉 URL避免刷新仍然固定某一本期刊
if (fromQueryId) {
const oldFullPath = this.$route && this.$route.fullPath ? this.$route.fullPath : '';
const nextQuery = Object.assign({}, (this.$route && this.$route.query) || {});
delete nextQuery.journal_id;
delete nextQuery.journalId;
delete nextQuery._ap_from;
if (oldFullPath) {
bus.$emit('close_tag_by_path', { path: oldFullPath, silent: true });
}
this.$router.replace({ query: nextQuery }).catch(() => {});
// 兜底:某些场景 router.replace 不更新地址栏,这里强制清掉 query
try {
const u = new URL(window.location.href);
['_ap_from', 'journal_id', 'journalId', 'journalIdd'].forEach((k) => u.searchParams.delete(k));
window.history.replaceState({}, '', u.toString());
} catch (e) {}
}
} else {
this.$message.error(res.msg);
}