<template>
	<div>
		<div class="crumbs">
			<el-breadcrumb separator="/">
				<el-breadcrumb-item><i class="el-icon-lx-copy"></i> 引用管理</el-breadcrumb-item>
			</el-breadcrumb>
		</div>
		<div class="container">
			<el-table :data="tableData" border class="table" ref="multipleTable" header-cell-class-name="table-header">
				<el-table-column prop="journal_name" label="所引期刊"></el-table-column>
				<el-table-column prop="article_name" label="所引文章"></el-table-column>
				<el-table-column prop="factor" label="影响因子" width="100"></el-table-column>
				<el-table-column prop="journal_title" label="被引用期刊"></el-table-column>
				<el-table-column prop="date" label="出版时间" align="center" width="140"></el-table-column>
				<el-table-column label="截图留存" align="center" width="160">
					<template slot-scope="scope">
						<el-image class="table-td-thumb" :src="IMGdo_Url+'articleCite/'+scope.row.img" :preview-src-list="srcList"></el-image>
					</template>
				</el-table-column>
				<el-table-column label="状态" align="center" width="120">
					<template slot-scope="scope">
						<el-tag v-if="scope.row.state == '0'" type="primary">审核中</el-tag>
						<el-tag v-if="scope.row.state == '1'" type="success">通过</el-tag>
						<el-tag v-if="scope.row.state == '2'" type="danger">驳回</el-tag>
					</template>
				</el-table-column>
			</el-table>
		</div>


	</div>
</template>

<script>
	export default {
		data() {
			return {
				query: {
					admin_id: localStorage.getItem('admin_id')
				},
				tableData: [],
				IMGdo_Url: this.IMGdoURL,
				srcList: [], //大图
			};
		},
		created() {
			this.getData();
		},
		methods: {
			// 获取引用列表数据
			getData() {
				this.$api
					.post('master/Article/getArticleCites', this.query)
					.then(res => {
						if (res.code == 0) {
							this.tableData = res.data.cites;
							res.data.cites.forEach((item) => {
								this.srcList.push(this.IMGdo_Url+'articleCite/'+item.img);
							});
						} else {
							this.$message.error(res.msg);
						}
					})
					.catch(err => {
						this.$message.error(err);
					});
			}
		}
	};
</script>

<style>
	.table {
		width: 100%;
		font-size: 14px;
	}
</style>
