暂时去掉分类管理
增加期刊引文分析 cite修改
This commit is contained in:
@@ -19,8 +19,8 @@ const service = axios.create({
|
||||
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
|
||||
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
|
||||
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
|
||||
// baseURL: '/api', //本地
|
||||
baseURL: '/', //正式
|
||||
baseURL: '/api', //本地
|
||||
// baseURL: '/', //正式
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -462,10 +462,10 @@ export default {
|
||||
index: '5',
|
||||
title: this.$t('sidebar.journalManagement'),
|
||||
subs: [
|
||||
{
|
||||
index: 'JournalManagement',
|
||||
title: this.$t('sidebar.journalManagement')
|
||||
},
|
||||
// {
|
||||
// index: 'JournalManagement',
|
||||
// title: this.$t('sidebar.journalManagement')
|
||||
// },
|
||||
|
||||
{
|
||||
index: 'Journal_Agreement',
|
||||
|
||||
@@ -88,6 +88,12 @@ const en = {
|
||||
factor: 'Factor',
|
||||
Sameperiod: 'Same period',
|
||||
ArticleInfo: 'Article Information',
|
||||
website: 'Website',
|
||||
email: 'Email',
|
||||
abbr: 'abbr',
|
||||
edit: 'Edit',
|
||||
level: 'Level',
|
||||
editorinchief: 'Editor In Chief',
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -83,7 +83,12 @@ const zh = {
|
||||
article: '文章数量',
|
||||
citeNum: '引用数量',
|
||||
articleNum: '文章数量',
|
||||
ArticleInfo: '文章信息',
|
||||
ArticleInfo: '文章信息', website: '网站',
|
||||
email: '邮箱',
|
||||
abbr: '缩写',
|
||||
edit: '编辑',
|
||||
level: '水平',
|
||||
editorinchief: '总编辑',
|
||||
|
||||
|
||||
info: '以下数据为', wos: 'Wos',
|
||||
@@ -227,6 +232,7 @@ const zh = {
|
||||
journalArticleCount: '期刊文章计数总结',
|
||||
managingDirector: '总经理',
|
||||
GroupClassification: '集团分类',
|
||||
|
||||
},
|
||||
home: {
|
||||
authortop: '用户指南',
|
||||
|
||||
@@ -35,9 +35,14 @@
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="openDrawer(scope.row)" style="font-weight: bold">
|
||||
{{ scope.row.cite.month_num }}</el-button
|
||||
>
|
||||
{{ scope.row.cite.month_num }}
|
||||
|
||||
<span @click="openDrawer(scope.row)" style="margin-left: 10px;cursor: pointer;color: #006699 !important;font-weight: bold">
|
||||
<i class="el-icon-edit"></i> {{ $t('JournalCitationAnalysis.edit') }}
|
||||
</span>
|
||||
<!-- <el-button type="primary" size="mini" @click="openDrawer(scope.row)" style="">
|
||||
|
||||
</el-button> -->
|
||||
<!-- <p
|
||||
style="padding: 0px 6px;display: inline-block;cursor: pointer; color: #409eff; background: #ecf5ff; border: 1px solid #b3d8ff"
|
||||
|
||||
@@ -122,25 +127,45 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" :label="$t('JournalCitationAnalysis.ArticleInfo')">
|
||||
<template slot-scope="scope">
|
||||
<p style="color: #333; margin-bottom: 4px">
|
||||
<span style="font-size: 14px; font-weight: 600">Article Tiltle : </span>
|
||||
|
||||
<span style="font-size: 14px"> {{ scope.row.article_name }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<span style="font-size: 14px; font-weight: 600">Author : </span>
|
||||
<span style="font-size: 14px">{{ scope.row.author }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<span style="font-size: 13px; font-weight: 500; color: #888"
|
||||
>{{ $t('paperArticleCount.Periodroll') }} :
|
||||
</span>
|
||||
<span style="font-size: 13px; color: #aaa">( {{ scope.row.vol }} )</span>
|
||||
</p>
|
||||
<p>
|
||||
<span style="font-size: 14px; color: #006699; font-weight: 500">Doi : </span>
|
||||
<span style="font-size: 14px; color: #006699 !important; font-weight: 500">{{ scope.row.doi }}</span>
|
||||
<span style="font-size: 13px; color: #006699 !important; font-weight: 500; margin-left: 5px">{{
|
||||
scope.row.doi
|
||||
}}</span>
|
||||
</p>
|
||||
<p style="color: #333; margin-bottom: 4px">
|
||||
<span style="font-size: 14px; font-weight: 600">Tiltle : </span>
|
||||
|
||||
<span style="font-size: 14px"> {{ scope.row.title }}</span>
|
||||
</p>
|
||||
|
||||
<div
|
||||
style="
|
||||
background-color: rgb(170 170 170 / 21%);
|
||||
padding: 4px 10px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
"
|
||||
>
|
||||
<p style="color: #333; margin-bottom: 4px">
|
||||
<!-- <span style="font-size: 14px; font-weight: 600">Tiltle : </span> -->
|
||||
|
||||
<span style="font-size: 14px"> {{ scope.row.article_name }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<span style="font-size: 14px; color: #888; font-weight: 500">Doi : </span>
|
||||
<span style="font-size: 13px; color: #aaa !important; font-weight: 500; margin-left: 5px">{{
|
||||
scope.row.article_doi
|
||||
}}</span>
|
||||
|
||||
<span style="float: right">
|
||||
<span style="font-size: 13px; font-weight: 500; color: #888"
|
||||
>{{ $t('paperArticleCount.Periodroll') }} :
|
||||
</span>
|
||||
<span style="font-size: 13px; color: #aaa">( {{ scope.row.vol }} )</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('citeList.is_wos')" width="80" align="center">
|
||||
@@ -152,52 +177,31 @@
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('citeList.is_china')" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_wos == 0">{{ $t('citeList.is_china0') }}</span>
|
||||
<p v-if="scope.row.is_wos == 1">{{ $t('citeList.yes') }}</p>
|
||||
<p v-if="scope.row.is_wos == 2">{{ $t('citeList.no') }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('partyRole.status')" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
style="
|
||||
padding: 2px 4px;
|
||||
border-radius: 2px;
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
background: #f4f4f5;
|
||||
border-color: #d3d4d6;
|
||||
float: right;
|
||||
"
|
||||
v-if="
|
||||
scope.row.state == 0 ||
|
||||
scope.row.state == 1 ||
|
||||
scope.row.state == 2 ||
|
||||
scope.row.state == 3 ||
|
||||
scope.row.state == 4 ||
|
||||
scope.row.state == 5 ||
|
||||
scope.row.state == 6
|
||||
"
|
||||
>
|
||||
<!-- {{ scope.row.link ?$t('partyRole.Published') : '' }} -->
|
||||
{{ $t(`artstate.state${scope.row.state}`) }}
|
||||
</span>
|
||||
<span v-if="scope.row.is_china == 0">{{ $t('citeList.is_china0') }}</span>
|
||||
<p v-if="scope.row.is_china == 1">{{ $t('citeList.yes') }}</p>
|
||||
<p v-if="scope.row.is_china == 2">{{ $t('citeList.no') }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('citeList.factor')" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #006699; font-weight: bold">{{ scope.row.factor ? scope.row.factor : '-' }}</span>
|
||||
<span>{{ scope.row.factor ? scope.row.factor : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="addCite(scope.row)" type="primary">Edit</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<common-cite-list ref="commonCiteList" :doiInfo="this.doiInfo" :journal="currentData" @refresh="getJournalList"></common-cite-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const jAtableY = () => import('@/components/common/journalArticleTable');
|
||||
const commonCiteList = () => import('@/components/page/components/JournalCitationAnalysis/citeList.vue');
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -210,13 +214,15 @@ export default {
|
||||
JournalList: [],
|
||||
JournalListLoad: false,
|
||||
currentData: {},
|
||||
doiInfo: {},
|
||||
p_year: new Date().getFullYear() - 1,
|
||||
year: new Date().getFullYear(),
|
||||
month: new Date().getMonth() + 1
|
||||
};
|
||||
},
|
||||
components: {
|
||||
jAtableY
|
||||
jAtableY,
|
||||
commonCiteList
|
||||
},
|
||||
async created() {
|
||||
this.loading = true;
|
||||
@@ -225,6 +231,32 @@ export default {
|
||||
this.$forceUpdate();
|
||||
},
|
||||
methods: {
|
||||
addCite(data) {
|
||||
console.log('this.currentData at line 221:', this.currentData);
|
||||
console.log('data at line 220:', data);
|
||||
this.doiInfo = {
|
||||
doi: data.article_doi,
|
||||
is_china: data.is_china,
|
||||
is_wos: data.is_wos,
|
||||
factor: data.factor,
|
||||
article_id: data.article_id,
|
||||
article_title: data.article_name,
|
||||
journal_title: data.journal_name,
|
||||
vol: data.vol,
|
||||
article_cite_id: data.article_cite_id
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commonCiteList.showDialogSpecial();
|
||||
});
|
||||
|
||||
// this.$router.push({
|
||||
// name: 'publishRefernceEditor',
|
||||
// query: {
|
||||
// id: this.articleId,
|
||||
// pid: this.UpHtpFIle.p_article_id
|
||||
// }
|
||||
// });
|
||||
},
|
||||
getJournalList() {
|
||||
this.JournalListLoad = true;
|
||||
this.JournalList = [];
|
||||
|
||||
@@ -0,0 +1,649 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<!-- <el-button type="primary" @click="horizontal = !horizontal">切换tree方向</el-button> -->
|
||||
|
||||
<div style="overflow: hidden">
|
||||
<span style="font-size: 14px;font-weight: 700; color: #606266; margin: 0 10px 0 0">{{ $t('GroupClassification.Journal') }}: </span>
|
||||
<el-select
|
||||
v-model="dataForm.journal_id"
|
||||
placeholder="Please select a journal"
|
||||
@change="handleSelectJournal"
|
||||
style="width: 220px; margin-right: 35px"
|
||||
>
|
||||
<el-option v-for="item in df_jour" :label="item.title" :key="item.journal_id" :value="item.journal_id"></el-option>
|
||||
</el-select>
|
||||
|
||||
<div
|
||||
@click="toggleExpand(data, true)"
|
||||
style="float: right; line-height: 32px; color: #006699; font-size: 12px; font-weight: 700; margin-right: 20px"
|
||||
>
|
||||
{{ $t('GroupClassification.ExpandAll') }}
|
||||
</div>
|
||||
</div>
|
||||
<org-tree
|
||||
id="orgTreeNode"
|
||||
:data="data"
|
||||
:horizontal="horizontal"
|
||||
isSelect
|
||||
collapsable
|
||||
:render-content="renderContent"
|
||||
@on-expand="onExpand"
|
||||
@on-node-mouseover="onMouseover"
|
||||
@on-node-mouseout="onMouseout"
|
||||
@on-expand-mouseover="Mouseover"
|
||||
@on-expand-mouseout="Mouseout"
|
||||
@on-node-click="cccc"
|
||||
>
|
||||
</org-tree>
|
||||
<!-- <div
|
||||
class="floating"
|
||||
v-show="isShowF && bd&&this.currentTreeData.id!='abc0'"
|
||||
@mouseover="
|
||||
() => {
|
||||
isShowF = true;
|
||||
}
|
||||
"
|
||||
@mouseout="
|
||||
() => {
|
||||
isShowF = false;
|
||||
}
|
||||
"
|
||||
@mousewheel.prevent="mouseWheelDia"
|
||||
>
|
||||
<p @click="addOrEdit(0)">{{ $t('GroupClassification.bind') }}</p>
|
||||
|
||||
<p @click="addOrEdit(1)">{{ $t('GroupClassification.Unbind') }}</p>
|
||||
</div> -->
|
||||
<!-- 增加/编辑弹层 -->
|
||||
<el-dialog
|
||||
:title="isEdit == 0 ? $t('GroupClassification.add') : $t('GroupClassification.edit')"
|
||||
v-if="dialogVisible"
|
||||
:visible="dialogVisible"
|
||||
@close="clearDialog"
|
||||
show-close
|
||||
:close-on-click-modal="false"
|
||||
custom-class="addOrEditDia"
|
||||
width="35%"
|
||||
>
|
||||
<div class="tips">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm" @submit.native.prevent label-width="120px">
|
||||
<el-form-item :label="$t('GroupClassification.major_current')" v-if="isEdit == 0">
|
||||
{{ this.currentTreeData.label }}
|
||||
</el-form-item>
|
||||
<el-form-item prop="major_title" :label="$t('GroupClassification.major_title')">
|
||||
<el-input
|
||||
v-focus
|
||||
:placeholder="$t('GroupClassification.enter')"
|
||||
clearable
|
||||
v-model="ruleForm.major_title"
|
||||
@keyup.enter.native="confirm"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="nickname" :label="$t('GroupClassification.nickname')">
|
||||
<el-input
|
||||
v-focus
|
||||
:placeholder="$t('GroupClassification.enter')"
|
||||
clearable
|
||||
v-model="ruleForm.nickname"
|
||||
@keyup.enter.native="confirm"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="major_sort" :label="$t('GroupClassification.sort')">
|
||||
<el-input
|
||||
v-focus
|
||||
:placeholder="$t('GroupClassification.enter')"
|
||||
clearable
|
||||
v-model="ruleForm.major_sort"
|
||||
@keyup.enter.native="confirm"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div class="tip-left">
|
||||
<el-button size="small" type="info" @click="dialogVisible = false">{{ $t('GroupClassification.cancel') }}</el-button>
|
||||
<el-button size="small" type="primary" @click="confirm">{{ $t('GroupClassification.submit') }}</el-button>
|
||||
</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 删除 -->
|
||||
<el-dialog
|
||||
:title="$t('GroupClassification.delete')"
|
||||
v-if="dialogVisible2"
|
||||
:visible="dialogVisible2"
|
||||
@close="clearDialog"
|
||||
custom-class="delDia"
|
||||
width="35%"
|
||||
>
|
||||
<div class="tips">
|
||||
<p style="text-align: left">{{ $t('GroupClassification.deleteInfo') }} 【{{ this.currentTreeData.label }} 】?</p>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div class="tip-left">
|
||||
<el-button size="mini" type="info" @click="dialogVisible2 = false">{{ $t('GroupClassification.cancel') }}</el-button>
|
||||
<el-button size="mini" type="primary" @click="confimdelete">{{ $t('GroupClassification.submit') }}</el-button>
|
||||
</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrgTree from '@/components/org-tree';
|
||||
import bus from '@/components/common/bus';
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {
|
||||
OrgTree
|
||||
},
|
||||
directives: {
|
||||
focus: {
|
||||
inserted: function (el) {
|
||||
el.querySelector('input').focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataForm: {},
|
||||
edit_id: localStorage.getItem('U_id'),
|
||||
currentJournal: {},
|
||||
df_jour: [],
|
||||
bd: true,
|
||||
ruleForm: {
|
||||
major_title: '',
|
||||
nickname: ''
|
||||
},
|
||||
rules: {
|
||||
major_title: [{ required: true, message: this.$t('GroupClassification.enter'), trigger: 'change' }]
|
||||
// nickname: [{ required: true, message: this.$t('GroupClassification.enter'), trigger: 'change' }]
|
||||
},
|
||||
dialogVisible: false,
|
||||
dialogVisible2: false,
|
||||
isShowF: false,
|
||||
data: {
|
||||
id: 'abc0',
|
||||
label: this.$t('sidebar.GroupClassification'),
|
||||
leave: 1, // tree层级
|
||||
children: []
|
||||
},
|
||||
horizontal: true,
|
||||
collapsable: true,
|
||||
isSelect: true,
|
||||
isEdit: 0,
|
||||
currentTreeData: {},
|
||||
lastId: 11,
|
||||
labelClassName: 'bg-white',
|
||||
urlList: {
|
||||
list: 'api/Major/getJournalMajorInAll',
|
||||
|
||||
bind: 'api/Major/addJournalMajor',
|
||||
unbind: 'api/Major/delJournalMajor'
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
dialogVisible: {
|
||||
handler(newV, oldV) {
|
||||
if (newV == false) {
|
||||
this.ruleForm = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const a = this.numFormatter(9999999999);
|
||||
console.log(a);
|
||||
await this.getSelect();
|
||||
},
|
||||
async activated() {
|
||||
const a = this.numFormatter(9999999999);
|
||||
console.log(a);
|
||||
await this.getSelect();
|
||||
},
|
||||
methods: {
|
||||
async init(){
|
||||
await this.getSelect();
|
||||
},
|
||||
// 获取下拉值
|
||||
async getSelect() {
|
||||
this.$api
|
||||
.post('/api/Journal/getJournalByeditor', {
|
||||
user_id: this.edit_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.df_jour = res.data.journals;
|
||||
|
||||
this.dataForm.journal_id = this.df_jour[0].journal_id;
|
||||
this.currentJournal = this.df_jour[0];
|
||||
await this.getDate();
|
||||
|
||||
|
||||
// this.getDate();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
async handleSelectJournal(e) {
|
||||
var data = this.df_jour.find((v) => v.journal_id == e);
|
||||
|
||||
this.currentJournal = data;
|
||||
console.log('this.currentJournal at line 221:', this.currentJournal);
|
||||
await this.getDate();
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
renameKeys(obj, oldKey, newKey) {
|
||||
if (obj[oldKey]) {
|
||||
obj[newKey] = obj[oldKey];
|
||||
delete obj[oldKey];
|
||||
}
|
||||
for (let k in obj) {
|
||||
if (typeof obj[k] === 'object') {
|
||||
this.renameKeys(obj[k], oldKey, newKey);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取数据
|
||||
async getDate() {
|
||||
this.$api
|
||||
.post(this.urlList.list, { journal_issn: this.currentJournal.issn })
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.data.children = res.data.majors;
|
||||
|
||||
await this.renameKeys(this.data.children, 'major_title', 'label');
|
||||
await this.toggleExpand(this.data, true); // 调用全部展开
|
||||
this.$forceUpdate();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
|
||||
// 增加千分位
|
||||
numFormatter(num) {
|
||||
let res = num;
|
||||
if (num && num !== null) {
|
||||
res = num.toString().replace(/\d+/, (n) => {
|
||||
return n.replace(/(\d)(?=(\d{3})+$)/g, ($1) => {
|
||||
return $1 + ',';
|
||||
});
|
||||
});
|
||||
}
|
||||
return res;
|
||||
},
|
||||
async cccc(a, b) {
|
||||
// console.log('a at line 274:', a);
|
||||
console.log('b at line 270:', b);
|
||||
// isShowF && bd
|
||||
console.log('bd at line 272:', this.isShowF, this.bd);
|
||||
if (this.isShowF && this.bd&&this.currentTreeData.id!='abc0') {
|
||||
var BindInfo = b.selected == 0 ? this.$t('GroupClassification.BindInfo') : this.$t('GroupClassification.UnBindInfo');
|
||||
this.$confirm(`${this.$t('GroupClassification.JournalBindInfo')} ${this.currentJournal.title}${BindInfo}`, '提示', {
|
||||
confirmButtonText: this.$t('GroupClassification.submit'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
cancelButtonText: this.$t('GroupClassification.cancel'),
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
var url = '';
|
||||
if (b.selected == 1) {
|
||||
url = this.urlList.unbind;
|
||||
} else if (b.selected == 0) {
|
||||
url = this.urlList.bind;
|
||||
}
|
||||
url;
|
||||
console.log('url at line 278:', url);
|
||||
this.$api
|
||||
.post(url, {
|
||||
journal_issn: this.currentJournal.issn,
|
||||
major_id: b.major_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.$nextTick(async () => {
|
||||
setTimeout(async () => {
|
||||
await this.getDate();
|
||||
}, 200);
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: this.$t('GroupClassification.cancel')
|
||||
// });
|
||||
});
|
||||
}
|
||||
},
|
||||
mouseWheelDia() {
|
||||
// bugfix 鼠标移入弹层,滚动鼠标不能缩放bug
|
||||
this.isShowF = false;
|
||||
},
|
||||
Mouseover() {
|
||||
// 鼠标移入缩放icon
|
||||
this.bd = false;
|
||||
},
|
||||
Mouseout() {
|
||||
// 鼠标移出缩放icon
|
||||
this.bd = true;
|
||||
},
|
||||
clearDialog() {
|
||||
// 关闭添加/编辑/删除弹层
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisible2 = false;
|
||||
this.ruleForm.major_title = '';
|
||||
},
|
||||
addOrEdit(val) {
|
||||
// 点击添加/编辑
|
||||
// 新增val:0,编辑val:1
|
||||
this.dialogVisible = true;
|
||||
this.isEdit = val;
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (val == 1) {
|
||||
// 编辑回显
|
||||
this.ruleForm.major_title = this.currentTreeData.label;
|
||||
this.ruleForm.major_sort = this.currentTreeData.major_sort;
|
||||
this.ruleForm.major_id = this.currentTreeData.major_id;
|
||||
this.ruleForm.nickname = this.currentTreeData.nickname;
|
||||
} else {
|
||||
this.ruleForm.pid = this.currentTreeData.major_id;
|
||||
}
|
||||
},
|
||||
async confirm() {
|
||||
// 添加/编辑的确定
|
||||
this.$refs.ruleForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.isEdit == 1) {
|
||||
// 编辑
|
||||
// this.ruleForm.major_title =
|
||||
// data.id = this.treeData.id;
|
||||
// this.currentTreeData.label = data.label;
|
||||
|
||||
this.$api
|
||||
.post(this.urlList.edit, {
|
||||
major_title: this.ruleForm.major_title,
|
||||
major_id: this.ruleForm.major_id,
|
||||
major_sort: this.ruleForm.major_sort
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.clearDialog();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 前端编辑数据
|
||||
|
||||
// loading.close();
|
||||
} else {
|
||||
this.$api
|
||||
.post(this.urlList.add, {
|
||||
major_title: this.ruleForm.major_title,
|
||||
pid: this.ruleForm.pid,
|
||||
major_sort: this.ruleForm.major_sort
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.clearDialog();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
// 添加
|
||||
// 前端添加数据,需要自己生成子级id,可以传数据的时候把最后一级id传过来,进行累加
|
||||
// data.id = this.lastId++;
|
||||
// // data.level = this.currentTreeData.level + 1;
|
||||
// data.label = this.ruleForm.major_title;
|
||||
// data.expand = true;
|
||||
// const render = (formData) => {
|
||||
// formData.some((item) => {
|
||||
// if (item.id === this.currentTreeData.id) {
|
||||
// if (item.children) {
|
||||
// item.children.push(data);
|
||||
// } else {
|
||||
// this.$set(item, 'children', [data]);
|
||||
// }
|
||||
// } else if (item.children) {
|
||||
// render(item.children);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// const arr = [this.data];
|
||||
// render(arr);
|
||||
// this.data = arr[0];
|
||||
|
||||
// loading.close();
|
||||
}
|
||||
this.$nextTick(async () => {
|
||||
await this.getDate();
|
||||
});
|
||||
} else {
|
||||
// loading.close();
|
||||
}
|
||||
});
|
||||
},
|
||||
del() {
|
||||
this.dialogVisible2 = true;
|
||||
},
|
||||
async confimdelete() {
|
||||
// 是否确定删除当前节点
|
||||
// 前端删除 遍历原数据,删除匹配id数据
|
||||
this.$api
|
||||
.post(this.urlList.delete, {
|
||||
major_id: this.currentTreeData.major_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.clearDialog();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
|
||||
this.$nextTick(async () => {
|
||||
await this.getDate();
|
||||
});
|
||||
});
|
||||
// const deleteData = (data) => {
|
||||
// data.some((item, i) => {
|
||||
// if (item.id === this.currentTreeData.id) {
|
||||
// data.splice(i, 1);
|
||||
// } else if (item.children) {
|
||||
// deleteData(item.children);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// const arr = [this.data];
|
||||
// deleteData(arr);
|
||||
// this.data = arr[0] ? arr[0] : {};
|
||||
// this.dialogVisible2 = false;
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '节点删除成功!'
|
||||
// });
|
||||
},
|
||||
onMouseover(e, data) {
|
||||
var collapse = localStorage.getItem('collapse');
|
||||
var width = Number(e.clientX - (!collapse || collapse == 'false' ? 260 : 40));
|
||||
|
||||
// 鼠标移入树节点
|
||||
this.currentTreeData = data; // 鼠标移入,该节点的所有数据
|
||||
|
||||
this.isShowF = true;
|
||||
var floating = document.getElementsByClassName('floating')[0];
|
||||
if(floating){
|
||||
floating.style.left = width + 'px';
|
||||
floating.style.top = e.clientY - 80 + 'px';
|
||||
}
|
||||
|
||||
},
|
||||
onMouseout(e, data) {
|
||||
// 鼠标移出树节点
|
||||
this.isShowF = false;
|
||||
},
|
||||
renderContent(h, data) {
|
||||
return data.label;
|
||||
},
|
||||
onExpand(e, data) {
|
||||
// 节点展开收缩
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (data.leave == 1 && data.expand == true) {
|
||||
// bugfix
|
||||
var dom = document.getElementById('ddd');
|
||||
(dom.style.top = '50%'), (dom.style.left = '8%');
|
||||
}
|
||||
if ('expand' in data) {
|
||||
data.expand = !data.expand;
|
||||
if (!data.expand && data.children) {
|
||||
this.collapse(data.children);
|
||||
}
|
||||
} else {
|
||||
this.$set(data, 'expand', true);
|
||||
}
|
||||
},
|
||||
collapse(list) {
|
||||
list.forEach((child) => {
|
||||
if (child.expand) {
|
||||
child.expand = false;
|
||||
}
|
||||
|
||||
child.children && this.collapse(child.children);
|
||||
});
|
||||
},
|
||||
toggleExpand(data, val) {
|
||||
// 节点默认全部展开
|
||||
var _this = this;
|
||||
// console.log(data);
|
||||
if (Array.isArray(data)) {
|
||||
data.forEach(function (item) {
|
||||
_this.$set(item, 'expand', val);
|
||||
if (item.children) {
|
||||
_this.toggleExpand(item.children, val);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$set(data, 'expand', val);
|
||||
if (data.children) {
|
||||
_this.toggleExpand(data.children, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.floating {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
box-shadow: rgba(0, 0, 0, 0.2);
|
||||
width: auto;
|
||||
// height: 45px;
|
||||
line-height: 24px;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
top: 0;
|
||||
transition: all 0.3s;
|
||||
z-index: 999;
|
||||
font-size: 12px;
|
||||
padding: 6px;
|
||||
span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.addOrEditDia,
|
||||
.delDia {
|
||||
padding: 14px 18px 10px 18px;
|
||||
border-radius: 4px !important;
|
||||
.el-dialog__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0 !important;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding: 0;
|
||||
padding-top: 20px;
|
||||
// margin-top: 37px;
|
||||
}
|
||||
.el-dialog__footer {
|
||||
padding: 27px 0 9px 0 !important;
|
||||
}
|
||||
.el-dialog__headerbtn {
|
||||
position: static !important;
|
||||
}
|
||||
}
|
||||
.bg-white {
|
||||
background-color: white;
|
||||
}
|
||||
.bg-orange {
|
||||
background-color: orange;
|
||||
}
|
||||
.bg-gold {
|
||||
background-color: gold;
|
||||
}
|
||||
.bg-gray {
|
||||
background-color: gray;
|
||||
}
|
||||
.bg-lightpink {
|
||||
background-color: lightpink;
|
||||
}
|
||||
.bg-chocolate {
|
||||
background-color: chocolate;
|
||||
}
|
||||
.bg-tomato {
|
||||
background-color: tomato;
|
||||
}
|
||||
.outBox {
|
||||
height: calc(100% - 100px) !important;
|
||||
margin-top: 10px;
|
||||
width: calc(100% - 40px) !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<!-- <el-button type="primary" @click="horizontal = !horizontal">切换tree方向</el-button> -->
|
||||
|
||||
<div style="padding: 20px 0; box-sizing: border-box">
|
||||
<el-table
|
||||
:data="JournalList"
|
||||
class="table"
|
||||
ref="multipleTable"
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="New messages (0)"
|
||||
>
|
||||
<el-table-column type="expand" width="30">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableExpand">
|
||||
<div class="item">
|
||||
<span class="title">{{ $t('JournalCitationAnalysis.abbr') }} :</span><span>{{ scope.row.abbr }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">{{ $t('JournalCitationAnalysis.editorinchief') }} :</span
|
||||
><span>{{ scope.row.editorinchief }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">{{ $t('JournalCitationAnalysis.email') }} :</span><span>{{ scope.row.email }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">{{ $t('JournalCitationAnalysis.website') }} :</span><span>{{ scope.row.website }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">{{ $t('JournalCitationAnalysis.level') }} :</span><span>{{ scope.row.level }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="No." align="center" width="50">
|
||||
<template slot-scope="scop">
|
||||
{{ scop.$index + 1 }}
|
||||
</template>
|
||||
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="title" label="title">
|
||||
<template slot-scope="scope">
|
||||
<span style="font-weight: 700 !important; color: rgb(51, 51, 51)"> {{ scope.row.title }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="issn" width="160" label="issn"></el-table-column>
|
||||
|
||||
<el-table-column label=" " width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<p
|
||||
@click="
|
||||
openJournal({
|
||||
...scope.row
|
||||
})
|
||||
"
|
||||
style="color: #006699 !important; cursor: pointer"
|
||||
>
|
||||
{{ $t('menu.Classificationmanagement') }}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<el-drawer
|
||||
:title="this.currentTreeData.label + ' ' + $t('GroupClassification.AssociatedJournal')"
|
||||
:visible.sync="drawer"
|
||||
direction="rtl"
|
||||
:before-close="handleClose"
|
||||
size="50%"
|
||||
>
|
||||
<common-class ref="commonClass" :currentJournal="currentJournal"></common-class>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrgTree from '@/components/org-tree';
|
||||
import commonclass from './class.vue';
|
||||
import bus from '@/components/common/bus';
|
||||
export default {
|
||||
name: 'app',
|
||||
props: ['urlList'],
|
||||
components: {
|
||||
OrgTree,
|
||||
commonclass
|
||||
},
|
||||
directives: {
|
||||
focus: {
|
||||
inserted: function (el) {
|
||||
el.querySelector('input').focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
edit_id: localStorage.getItem('U_id'),
|
||||
AssociatedJournalList: [],
|
||||
JournalList: [],
|
||||
drawer: false,
|
||||
bd: true,
|
||||
ruleForm: {
|
||||
major_title: '',
|
||||
nickname: ''
|
||||
},
|
||||
rules: {
|
||||
major_title: [{ required: true, message: this.$t('GroupClassification.enter'), trigger: 'change' }]
|
||||
// nickname: [{ required: true, message: this.$t('GroupClassification.enter'), trigger: 'change' }]
|
||||
},
|
||||
dialogVisible: false,
|
||||
dialogVisible2: false,
|
||||
isShowF: false,
|
||||
data: {
|
||||
id: 'abc0',
|
||||
label: this.$t('sidebar.GroupClassification'),
|
||||
leave: 1, // tree层级
|
||||
children: []
|
||||
},
|
||||
horizontal: true,
|
||||
collapsable: true,
|
||||
isEdit: 0,
|
||||
currentTreeData: {},
|
||||
currentJournal: {},
|
||||
lastId: 11,
|
||||
labelClassName: 'bg-white'
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
dialogVisible: {
|
||||
handler(newV, oldV) {
|
||||
if (newV == false) {
|
||||
this.ruleForm = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const a = this.numFormatter(9999999999);
|
||||
console.log(a);
|
||||
await this.getDate();
|
||||
},
|
||||
async activated() {
|
||||
await this.getDate();
|
||||
},
|
||||
methods: {
|
||||
changeBind(b) {
|
||||
var BindInfo = b.selected == 0 ? this.$t('GroupClassification.BindInfo') : this.$t('GroupClassification.UnBindInfo');
|
||||
this.$confirm(`${this.$t('GroupClassification.JournalBindInfo')} ${b.title}${BindInfo}`, '提示', {
|
||||
confirmButtonText: this.$t('GroupClassification.submit'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
cancelButtonText: this.$t('GroupClassification.cancel'),
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
var url = '';
|
||||
if (b.selected == 1) {
|
||||
url = this.urlList.unbind;
|
||||
} else if (b.selected == 0) {
|
||||
url = this.urlList.bind;
|
||||
}
|
||||
url;
|
||||
console.log('url at line 278:', url);
|
||||
this.$api
|
||||
.post(url, {
|
||||
journal_issn: b.issn,
|
||||
major_id: this.currentTreeData.major_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.$nextTick(async () => {
|
||||
setTimeout(async () => {
|
||||
await this.getAssociatedJournalList();
|
||||
}, 200);
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: this.$t('GroupClassification.cancel')
|
||||
// });
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
},
|
||||
getAssociatedJournalList() {
|
||||
this.$api
|
||||
.post(this.urlList.AssociatedJournalList, {
|
||||
major_id: this.currentTreeData.major_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.AssociatedJournalList = res.data.list;
|
||||
console.log('this.AssociatedJournalList at line 234:', this.AssociatedJournalList);
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
openJournal(data) {
|
||||
this.currentJournal=data
|
||||
this.drawer = true;
|
||||
this.$refs.commonClass.init()
|
||||
// AssociatedJournalList
|
||||
|
||||
// this.getAssociatedJournalList();
|
||||
},
|
||||
renameKeys(obj, oldKey, newKey) {
|
||||
if (obj[oldKey]) {
|
||||
obj[newKey] = obj[oldKey];
|
||||
delete obj[oldKey];
|
||||
}
|
||||
for (let k in obj) {
|
||||
if (typeof obj[k] === 'object') {
|
||||
this.renameKeys(obj[k], oldKey, newKey);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取数据
|
||||
async getDate() {
|
||||
this.$api
|
||||
.post(this.urlList.list, {
|
||||
user_id: this.edit_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.JournalList = res.data.journals;
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
|
||||
// 增加千分位
|
||||
numFormatter(num) {
|
||||
let res = num;
|
||||
if (num && num !== null) {
|
||||
res = num.toString().replace(/\d+/, (n) => {
|
||||
return n.replace(/(\d)(?=(\d{3})+$)/g, ($1) => {
|
||||
return $1 + ',';
|
||||
});
|
||||
});
|
||||
}
|
||||
return res;
|
||||
},
|
||||
cccc(a, b) {
|
||||
// console.log(a);
|
||||
// console.log(b);
|
||||
},
|
||||
mouseWheelDia() {
|
||||
// bugfix 鼠标移入弹层,滚动鼠标不能缩放bug
|
||||
this.isShowF = false;
|
||||
},
|
||||
Mouseover() {
|
||||
// 鼠标移入缩放icon
|
||||
this.bd = false;
|
||||
},
|
||||
Mouseout() {
|
||||
// 鼠标移出缩放icon
|
||||
this.bd = true;
|
||||
},
|
||||
clearDialog() {
|
||||
// 关闭添加/编辑/删除弹层
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisible2 = false;
|
||||
this.ruleForm.major_title = '';
|
||||
},
|
||||
addOrEdit(val) {
|
||||
// 点击添加/编辑
|
||||
// 新增val:0,编辑val:1
|
||||
this.dialogVisible = true;
|
||||
this.isEdit = val;
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (val == 1) {
|
||||
// 编辑回显
|
||||
this.ruleForm = {
|
||||
major_title: this.currentTreeData.label,
|
||||
major_sort: this.currentTreeData.major_sort,
|
||||
major_id: this.currentTreeData.major_id,
|
||||
nickname: this.currentTreeData.nickname
|
||||
};
|
||||
} else {
|
||||
this.ruleForm.pid = this.currentTreeData.major_id;
|
||||
}
|
||||
},
|
||||
async confirm() {
|
||||
// 添加/编辑的确定
|
||||
this.$refs.ruleForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.isEdit == 1) {
|
||||
// 编辑
|
||||
// this.ruleForm.major_title =
|
||||
// data.id = this.treeData.id;
|
||||
// this.currentTreeData.label = data.label;
|
||||
|
||||
this.$api
|
||||
.post(this.urlList.edit, {
|
||||
major_title: this.ruleForm.major_title,
|
||||
major_id: this.ruleForm.major_id,
|
||||
major_sort: this.ruleForm.major_sort,
|
||||
nickname: this.ruleForm.nickname
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.clearDialog();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 前端编辑数据
|
||||
|
||||
// loading.close();
|
||||
} else {
|
||||
this.$api
|
||||
.post(this.urlList.add, {
|
||||
major_title: this.ruleForm.major_title,
|
||||
pid: this.ruleForm.pid,
|
||||
major_sort: this.ruleForm.major_sort,
|
||||
nickname: this.ruleForm.nickname
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.clearDialog();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
// 添加
|
||||
// 前端添加数据,需要自己生成子级id,可以传数据的时候把最后一级id传过来,进行累加
|
||||
// data.id = this.lastId++;
|
||||
// // data.level = this.currentTreeData.level + 1;
|
||||
// data.label = this.ruleForm.major_title;
|
||||
// data.expand = true;
|
||||
// const render = (formData) => {
|
||||
// formData.some((item) => {
|
||||
// if (item.id === this.currentTreeData.id) {
|
||||
// if (item.children) {
|
||||
// item.children.push(data);
|
||||
// } else {
|
||||
// this.$set(item, 'children', [data]);
|
||||
// }
|
||||
// } else if (item.children) {
|
||||
// render(item.children);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// const arr = [this.data];
|
||||
// render(arr);
|
||||
// this.data = arr[0];
|
||||
|
||||
// loading.close();
|
||||
}
|
||||
this.$nextTick(async () => {
|
||||
setTimeout(async () => {
|
||||
await this.getDate();
|
||||
}, 200);
|
||||
});
|
||||
} else {
|
||||
// loading.close();
|
||||
}
|
||||
});
|
||||
},
|
||||
del() {
|
||||
this.dialogVisible2 = true;
|
||||
},
|
||||
async confimdelete() {
|
||||
// 是否确定删除当前节点
|
||||
// 前端删除 遍历原数据,删除匹配id数据
|
||||
this.$api
|
||||
.post(this.urlList.delete, {
|
||||
major_id: this.currentTreeData.major_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.clearDialog();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
|
||||
this.$nextTick(async () => {
|
||||
setTimeout(async () => {
|
||||
await this.getDate();
|
||||
}, 200);
|
||||
});
|
||||
});
|
||||
// const deleteData = (data) => {
|
||||
// data.some((item, i) => {
|
||||
// if (item.id === this.currentTreeData.id) {
|
||||
// data.splice(i, 1);
|
||||
// } else if (item.children) {
|
||||
// deleteData(item.children);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// const arr = [this.data];
|
||||
// deleteData(arr);
|
||||
// this.data = arr[0] ? arr[0] : {};
|
||||
// this.dialogVisible2 = false;
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '节点删除成功!'
|
||||
// });
|
||||
},
|
||||
onMouseover(e, data) {
|
||||
var collapse = localStorage.getItem('collapse');
|
||||
var width = Number(e.clientX - (!collapse || collapse == 'false' ? 260 : 40));
|
||||
|
||||
// 鼠标移入树节点
|
||||
this.currentTreeData = data; // 鼠标移入,该节点的所有数据
|
||||
|
||||
this.isShowF = true;
|
||||
var floating = document.getElementsByClassName('floating')[0];
|
||||
if (floating) {
|
||||
floating.style.left = width + 'px';
|
||||
floating.style.top = e.clientY - 80 + 'px';
|
||||
}
|
||||
},
|
||||
onMouseout(e, data) {
|
||||
// 鼠标移出树节点
|
||||
this.isShowF = false;
|
||||
},
|
||||
renderContent(h, data) {
|
||||
return data.label;
|
||||
},
|
||||
onExpand(e, data) {
|
||||
// 节点展开收缩
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (data.leave == 1 && data.expand == true) {
|
||||
// bugfix
|
||||
var dom = document.getElementById('ddd');
|
||||
(dom.style.top = '50%'), (dom.style.left = '8%');
|
||||
}
|
||||
if ('expand' in data) {
|
||||
data.expand = !data.expand;
|
||||
if (!data.expand && data.children) {
|
||||
this.collapse(data.children);
|
||||
}
|
||||
} else {
|
||||
this.$set(data, 'expand', true);
|
||||
}
|
||||
},
|
||||
collapse(list) {
|
||||
list.forEach((child) => {
|
||||
if (child.expand) {
|
||||
child.expand = false;
|
||||
}
|
||||
|
||||
child.children && this.collapse(child.children);
|
||||
});
|
||||
},
|
||||
toggleExpand(data, val) {
|
||||
// 节点默认全部展开
|
||||
var _this = this;
|
||||
// console.log(data);
|
||||
if (Array.isArray(data)) {
|
||||
data.forEach(function (item) {
|
||||
_this.$set(item, 'expand', val);
|
||||
if (item.children) {
|
||||
_this.toggleExpand(item.children, val);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$set(data, 'expand', val);
|
||||
if (data.children) {
|
||||
_this.toggleExpand(data.children, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.floating {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
box-shadow: rgba(0, 0, 0, 0.2);
|
||||
width: auto;
|
||||
// height: 45px;
|
||||
line-height: 24px;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
top: 0;
|
||||
transition: all 0.3s;
|
||||
z-index: 999;
|
||||
font-size: 12px;
|
||||
padding: 6px;
|
||||
span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.addOrEditDia,
|
||||
.delDia {
|
||||
padding: 14px 18px 10px 18px;
|
||||
border-radius: 4px !important;
|
||||
.el-dialog__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0 !important;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding: 0;
|
||||
padding-top: 20px;
|
||||
// margin-top: 37px;
|
||||
}
|
||||
.el-dialog__footer {
|
||||
padding: 27px 0 9px 0 !important;
|
||||
}
|
||||
.el-dialog__headerbtn {
|
||||
position: static !important;
|
||||
}
|
||||
}
|
||||
.bg-white {
|
||||
background-color: white;
|
||||
}
|
||||
.bg-orange {
|
||||
background-color: orange;
|
||||
}
|
||||
.bg-gold {
|
||||
background-color: gold;
|
||||
}
|
||||
.bg-gray {
|
||||
background-color: gray;
|
||||
}
|
||||
.bg-lightpink {
|
||||
background-color: lightpink;
|
||||
}
|
||||
.bg-chocolate {
|
||||
background-color: chocolate;
|
||||
}
|
||||
.bg-tomato {
|
||||
background-color: tomato;
|
||||
}
|
||||
.outBox {
|
||||
height: calc(100% - 100px) !important;
|
||||
margin-top: 10px;
|
||||
width: calc(100% - 40px) !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
.tableExpand {
|
||||
padding: 10px 20px;
|
||||
padding-left: 40px;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
display: inline-block;
|
||||
// width: 140px;
|
||||
margin-right: 10px;
|
||||
font-weight: 700 !important;
|
||||
color: rgb(51, 51, 51);
|
||||
}
|
||||
.item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,39 +2,28 @@
|
||||
<div id="app">
|
||||
<!-- <el-button type="primary" @click="horizontal = !horizontal">切换tree方向</el-button> -->
|
||||
|
||||
<div style="overflow: hidden">
|
||||
<span style="font-size: 14px;font-weight: 700; color: #606266; margin: 0 10px 0 0">{{ $t('GroupClassification.Journal') }}: </span>
|
||||
<el-select
|
||||
v-model="dataForm.journal_id"
|
||||
placeholder="Please select a journal"
|
||||
@change="handleSelectJournal"
|
||||
style="width: 220px; margin-right: 35px"
|
||||
>
|
||||
<el-option v-for="item in df_jour" :label="item.title" :key="item.journal_id" :value="item.journal_id"></el-option>
|
||||
</el-select>
|
||||
<!-- <div class="journalList" style="overflow: hidden">
|
||||
<span style="font-size: 14px;font-weight: 700; color: #333; margin: 0 0px 20 0">{{ this.$t('sidebar.editorialBoard3') }} </span>
|
||||
|
||||
<div v-for="(v, i) in df_jour">
|
||||
<p @click="handleSelectJournal(v)">
|
||||
<span
|
||||
class="el-tree-node__expand-icon el-icon-caret-right"
|
||||
style="margin-right: 10px"
|
||||
:style="currentJournal.journal_id == v.journal_id ? 'color: #006699;' : 'color:transparent'"
|
||||
></span>
|
||||
|
||||
<div
|
||||
@click="toggleExpand(data, true)"
|
||||
style="float: right; line-height: 32px; color: #006699; font-size: 12px; font-weight: 700; margin-right: 20px"
|
||||
>
|
||||
{{ $t('GroupClassification.ExpandAll') }}
|
||||
<span :style="currentJournal.journal_id == v.journal_id ? 'color: #006699;font-weight:700;' : ''">{{ v.title }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<org-tree
|
||||
id="orgTreeNode"
|
||||
:data="data"
|
||||
:horizontal="horizontal"
|
||||
isSelect
|
||||
collapsable
|
||||
:render-content="renderContent"
|
||||
@on-expand="onExpand"
|
||||
@on-node-mouseover="onMouseover"
|
||||
@on-node-mouseout="onMouseout"
|
||||
@on-expand-mouseover="Mouseover"
|
||||
@on-expand-mouseout="Mouseout"
|
||||
@on-node-click="cccc"
|
||||
>
|
||||
</org-tree>
|
||||
</div> -->
|
||||
|
||||
|
||||
<commonTable :urlList="urlList">
|
||||
|
||||
</commonTable>
|
||||
|
||||
|
||||
<!-- <div
|
||||
class="floating"
|
||||
v-show="isShowF && bd&&this.currentTreeData.id!='abc0'"
|
||||
@@ -130,11 +119,12 @@
|
||||
|
||||
<script>
|
||||
import OrgTree from '@/components/org-tree';
|
||||
import commonTable from './common.vue';
|
||||
import bus from '@/components/common/bus';
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {
|
||||
OrgTree
|
||||
OrgTree,commonTable
|
||||
},
|
||||
directives: {
|
||||
focus: {
|
||||
@@ -145,6 +135,10 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'title'
|
||||
},
|
||||
dataForm: {},
|
||||
edit_id: localStorage.getItem('U_id'),
|
||||
currentJournal: {},
|
||||
@@ -175,7 +169,7 @@ export default {
|
||||
lastId: 11,
|
||||
labelClassName: 'bg-white',
|
||||
urlList: {
|
||||
list: 'api/Major/getJournalMajorInAll',
|
||||
list: 'api/Journal/getJournalByeditor',
|
||||
|
||||
bind: 'api/Major/addJournalMajor',
|
||||
unbind: 'api/Major/delJournalMajor'
|
||||
@@ -211,11 +205,10 @@ export default {
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.df_jour = res.data.journals;
|
||||
|
||||
this.dataForm.journal_id = this.df_jour[0].journal_id;
|
||||
this.currentJournal = this.df_jour[0];
|
||||
await this.getDate();
|
||||
|
||||
|
||||
this.dataForm.journal_id = this.df_jour[0].journal_id;
|
||||
this.currentJournal = this.df_jour[0];
|
||||
await this.getDate();
|
||||
|
||||
// this.getDate();
|
||||
} else {
|
||||
@@ -227,11 +220,9 @@ export default {
|
||||
});
|
||||
},
|
||||
async handleSelectJournal(e) {
|
||||
var data = this.df_jour.find((v) => v.journal_id == e);
|
||||
this.currentJournal = e;
|
||||
|
||||
this.currentJournal = data;
|
||||
console.log('this.currentJournal at line 221:', this.currentJournal);
|
||||
await this.getDate();
|
||||
// await this.getDate();
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
@@ -249,13 +240,13 @@ export default {
|
||||
// 获取数据
|
||||
async getDate() {
|
||||
this.$api
|
||||
.post(this.urlList.list, { journal_issn: this.currentJournal.issn })
|
||||
.post(this.urlList.list, {})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.data.children = res.data.majors;
|
||||
this.data = res.data.journals;
|
||||
|
||||
await this.renameKeys(this.data.children, 'major_title', 'label');
|
||||
await this.toggleExpand(this.data, true); // 调用全部展开
|
||||
// await this.renameKeys(this.data.children, 'major_title', 'label');
|
||||
// await this.toggleExpand(this.data, true); // 调用全部展开
|
||||
this.$forceUpdate();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
@@ -283,11 +274,11 @@ export default {
|
||||
console.log('b at line 270:', b);
|
||||
// isShowF && bd
|
||||
console.log('bd at line 272:', this.isShowF, this.bd);
|
||||
if (this.isShowF && this.bd&&this.currentTreeData.id!='abc0') {
|
||||
if (this.isShowF && this.bd && this.currentTreeData.id != 'abc0') {
|
||||
var BindInfo = b.selected == 0 ? this.$t('GroupClassification.BindInfo') : this.$t('GroupClassification.UnBindInfo');
|
||||
this.$confirm(`${this.$t('GroupClassification.JournalBindInfo')} ${this.currentJournal.title}${BindInfo}`, '提示', {
|
||||
confirmButtonText: this.$t('GroupClassification.submit'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
dangerouslyUseHTMLString: true,
|
||||
cancelButtonText: this.$t('GroupClassification.cancel'),
|
||||
type: 'warning'
|
||||
})
|
||||
@@ -504,17 +495,16 @@ export default {
|
||||
onMouseover(e, data) {
|
||||
var collapse = localStorage.getItem('collapse');
|
||||
var width = Number(e.clientX - (!collapse || collapse == 'false' ? 260 : 40));
|
||||
|
||||
|
||||
// 鼠标移入树节点
|
||||
this.currentTreeData = data; // 鼠标移入,该节点的所有数据
|
||||
|
||||
|
||||
this.isShowF = true;
|
||||
var floating = document.getElementsByClassName('floating')[0];
|
||||
if(floating){
|
||||
floating.style.left = width + 'px';
|
||||
floating.style.top = e.clientY - 80 + 'px';
|
||||
if (floating) {
|
||||
floating.style.left = width + 'px';
|
||||
floating.style.top = e.clientY - 80 + 'px';
|
||||
}
|
||||
|
||||
},
|
||||
onMouseout(e, data) {
|
||||
// 鼠标移出树节点
|
||||
@@ -643,4 +633,25 @@ export default {
|
||||
width: calc(100% - 40px) !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
.journalList {
|
||||
width: 360px;
|
||||
height: 100%;
|
||||
padding: 5px 10px 10px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
float: left;
|
||||
|
||||
background: #fff;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.baseInfo{
|
||||
width: calc(100% - 370px);
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -50,9 +50,16 @@
|
||||
<p v-html="scope.row.title"></p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Cite" width="80px" align="center">
|
||||
<el-table-column label="Cite" width="100px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<p style="cursor: pointer;color:#006699 !important;" @click="goCite(scope.row)">{{ scope.row.cite_num?scope.row.cite_num.length:0 }}</p>
|
||||
<p style="cursor: pointer;color:#006699 !important;" @click="goCite(scope.row)">
|
||||
|
||||
{{ scope.row.cite_num?scope.row.cite_num.length:0 }}
|
||||
|
||||
<span style="margin-left: 4px;cursor: pointer;color: #006699 !important;font-weight: bold">
|
||||
<i class="el-icon-edit"></i>
|
||||
</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Html" width="100px" align="center">
|
||||
|
||||
1211
src/components/page/components/JournalCitationAnalysis/citeList.vue
Normal file
1211
src/components/page/components/JournalCitationAnalysis/citeList.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user