init
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="投稿信息" name="1">
|
||||
<el-descriptions class="margin-top" :column="3" size="medium " border>
|
||||
<el-descriptions-item label="投稿人">
|
||||
{{ viewData.username }}({{ viewData.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人单位">
|
||||
{{ viewData.unitname }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人工会">
|
||||
{{ viewData.unionname }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="稿件名称">
|
||||
{{ viewData.manuscriptName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="稿件类型">
|
||||
{{ viewData.manuscriptTypeName }}( {{ viewData.manuscriptCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿类型">
|
||||
{{ viewData.type == 1 ? '协会投稿' : viewData.type == 2 ? '分工会投稿' : '校工会投稿' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="说明">
|
||||
{{ viewData.remark }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" size="medium " border>
|
||||
<el-descriptions-item label="新闻稿件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="分工会审核信息" name="2" v-if="viewData.union_audit&&viewData.union_audit.length>0">
|
||||
|
||||
<el-descriptions border :column="2">
|
||||
<template v-for="(o,i) in viewData.unionAudit">
|
||||
<el-descriptions-item label="审核人">{{ o.username + '-' + o.loginname }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ o.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" span="4">{{ o.auditOpinion }}</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核信息" name="3" v-if="viewData.school_union_audit&&viewData.school_union_audit.length>0">
|
||||
|
||||
<el-descriptions border :column="2">
|
||||
<template v-for="(o,i) in viewData.schoolAudit">
|
||||
<el-descriptions-item label="审核人">{{ o.username + '-' + o.loginname }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ o.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" span="4">{{ o.auditOpinion }}</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane v-if="handle" :label="label" name="999">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
panes: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
size: '',
|
||||
activeName: "1",
|
||||
viewData: {},
|
||||
loading: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
},
|
||||
methods: {
|
||||
hasPane(name) {
|
||||
if (!this.handle) {
|
||||
return true
|
||||
}
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async getInfo(id) {
|
||||
this.loading = true
|
||||
const {data, code, msg} = await $.get("/platform/manuscript/apply/findOne", {id})
|
||||
this.loading = false
|
||||
if (data) {
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
this.viewData = data
|
||||
console.log(data)
|
||||
if (this.viewData.files && this.viewData.files.length > 0) {
|
||||
this.viewData.files = JSON.parse(data.files)
|
||||
}
|
||||
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$message({
|
||||
message: "获取信息失败",
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-descriptions .is-bordered {
|
||||
table-layout: fixed;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user