Files
UNION_NSI/target/classes/static/components/hd/hdwmInfo.vue
T
2026-09-08 19:49:21 +08:00

477 lines
14 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div>
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
<el-tab-pane label="申请信息" name="1">
<table style="width: 100%">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">姓名</td>
<td class="tpb">{{ viewData.username }}</td>
<td class="tpa">工资号</td>
<td class="tpb">{{ viewData.loginname }}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">单位</td>
<td class="tpb">{{ viewData.dwname }}</td>
<td class="tpa">工会</td>
<td class="tpb">{{ viewData.ghname }}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">活动类别</td>
<td class="tpb">
<span>{{ viewData.hdlbname }}</span>
</td>
<template v-if="viewData.zplbname">
<td class="tpa">类别</td>
<td class="tpb">
<span>{{ viewData.zplbname }}</span>
</td>
</template>
<template v-else>
<td class="tpa">健步走步数</td>
<td class="tpb">
<span>{{ viewData.step_count }}</span>
</td>
</template>
</tr>
<!-- <tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">作品主题</td>
<td class="tpb" colspan="3">{{viewData.hdsbzpzt}}</td>
</tr>-->
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">标题</td>
<td class="tpb" colspan="3">{{ viewData.zpmc }}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">作品描述</td>
<td class="tpb" colspan="3">{{ viewData.hdsbzpms }}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);" v-if="viewData.isUploadPhoto||viewData.isUploadOther">
<td class="tpa">作品信息</td>
<td class="tpb" colspan="3">
<el-row v-if="viewData.isUploadPhoto">
<el-divider>照片&emsp;<i class="el-icon-picture-outline"></i></el-divider>
<file-upload view :files="img2List"></file-upload>
</el-row>
<div v-if="viewData.isUploadOther">
<el-row>
<el-divider>视频&emsp;<i class="el-icon-video-camera"></i></el-divider>
<div style="text-align: left;" v-if="videoList.length>0">
<div v-for="item in videoList">
<el-tooltip class="item" effect="dark" placement="right-start">
<div slot="content">{{ item.fjname }}</div>
<div class="view-myvideo-tab">
<div class="video-toggle-i"
@click="playVideo1(APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id)">
<i class="el-icon-video-camera-solid"></i>
<i class="el-icon-video-play"></i>
</div>
<span class="file-down-span"
style="bottom: 0;height: 20px;display: inline-block;"
@click="APP_DOMAIN+'/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
<i class="el-icon-download"></i>
</span>
</div>
</el-tooltip>
</div>
</div>
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有视频
</div>
</el-row>
<el-row>
<el-divider>音频&emsp;<i class="el-icon-video-camera"></i></el-divider>
<div style="text-align: left;" v-if="audioList.length>0">
<div v-for="item in audioList">
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
<!-- <source :src="'${AppFileDomain!}'+item.filepath"/>-->
<source :src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + item.id"/>
</audio>
</div>
</div>
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有音频
</div>
</el-row>
<el-row>
<el-divider>文档&emsp;<i class="el-icon-document-copy"></i></el-divider>
<div style="text-align: left;" v-if="docList.length>0">
<div v-for="item in docList">
<el-tooltip class="item" effect="dark" placement="right-start">
<div slot="content">{{ item.fjname }}</div>
<div class="view-myvideo-tab" style="background-color: #f6f6f6">
<div class="video-toggle-i" @click="dd3s.preview(item.filepath,item.id)">
<i class="el-icon-document"></i>
</div>
<span class="file-down-span"
style="bottom: 0;height: 20px;display: inline-block;"
@click="APP_DOMAIN+'/file_server/download?filepath=' + item.filepath + '&filename=' + item.filename">
<i class="el-icon-download"></i>
</span>
</div>
</el-tooltip>
</div>
</div>
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有文档
</div>
</el-row>
</div>
</td>
</tr>
</table>
</el-tab-pane>
<el-tab-pane label="分工会审核信息" name="2" v-if="viewData.union">
<el-form label-width="130px" label-suffix="" style="padding: 20px 0">
<vi-title title="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员">
{{ viewData.union.username }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.union.auditTime }}
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见">
<div class="textarea-div">{{ viewData.union.auditOpinion ? viewData.union.auditOpinion : '暂无' }}</div>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字">
<el-image v-if="viewData.union.auditSign"
style="width: 300px; height: 100px"
:src="viewData.union.auditSign"
fit="contain"></el-image>
<span v-else>暂无</span>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="校工会审核信息" name="3" v-if="viewData.school">
<el-form label-width="130px" label-suffix="" style="padding: 20px 0">
<vi-title title="审核信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员">
{{ viewData.school.username }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.school.auditTime }}
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见">
<div class="textarea-div">{{ viewData.school.auditOpinion ? viewData.school.auditOpinion : '暂无' }}</div>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字">
<el-image v-if="viewData.school.auditSign"
style="width: 300px; height: 100px"
:src="viewData.school.auditSign"
fit="contain"></el-image>
<span v-else>暂无</span>
</el-form-item>
</el-form>
</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 {
activeName: "1",
viewData: {},
loading: true,
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'],
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
prevImgList: [],
img2List: [],
videoList: [],
docList: [],
audioList: [],
imgShow: false,
fileDialogVisible: false
}
},
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.img2List = [];
this.prevImgList = [];
this.videoList = [];
this.audioList = [];
this.docList = [];
$.post(base + '/platform/hd/wmhd/findOneById', {id: id}).then(data => {
if (data.code == 0) {
data.data.forEach(val => {
val.fjname = val.filename
val.fjurl = val.filepath
val.url = '${AppFileDomain!}' + val.filepath
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
if (this.videotype.indexOf(filetype) > -1) {
this.videoList.push(val);
} else if (this.imgtype.indexOf(filetype) > -1) {
this.prevImgList.push('${AppFileDomain!}' + val.filepath)
this.img2List.push(val);
} else if (this.doctype.indexOf(filetype) > -1) {
this.docList.push(val);
} else if (this.audiotype.indexOf(filetype) > -1) {
this.audioList.push(val);
}
});
}
});
const {data} = await $.post("/platform/hd/wmhd/findxxById", {id: id})
this.viewData = data
this.activeName = this.handle ? "999" : "1"
this.loading = false
},
playVideo1(fjurl) {
this.$emit("playvideo", fjurl)
},
filedialogClose() {
//关闭的时候需要销毁video 但是随之dom元素也会被删除!!!!
this.imgShow = false;
this.videoShow = false;
videojs('my-video').dispose();
},
},
async created() {
}
}
</script>
<style>
.tpa {
padding: 10px;
text-align: center;
width: 12%;
color: #a0a9b4;
background-color: rgb(250, 250, 250);
border: 1px solid rgb(220, 220, 220);
}
.tpb {
padding: 10px;
text-align: center;
color: #4f576b;
width: 15%;
border: 1px solid rgb(220, 220, 220);
}
input[type=file] {
display: none;
}
.filedialog .el-dialog__header i {
font-size: 30px;
}
.filedialog .el-dialog__body {
padding: 20px 0 0 0;
}
/*video{
width: 100%!important;
height: 500px!important;
outline:none;
}*/
.video-js {
width: 100%;
height: 450px;
outline: none;
}
.vjs-tech, .video-js button {
outline: none;
}
#app .el-table th.gutter {
display: table-cell !important
}
.filedialog .el-dialog {
min-height: 500px;
}
.video-js .vjs-big-play-button { /* 中间大的播放按钮 */
font-size: 2.5em;
line-height: 2.3em;
height: 2.5em;
width: 2.5em;
-webkit-border-radius: 2.5em;
-moz-border-radius: 2.5em;
border-radius: 2.5em;
background-color: rgba(115, 133, 159, .5);
border-width: 0.12em;
margin-top: -1.25em;
margin-left: -1.75em;
}
.video-js.vjs-paused .vjs-big-play-button { /* 视频暂停时显示播放按钮 */
display: block;
}
.video-js.vjs-error .vjs-big-play-button { /* 视频加载出错时隐藏播放按钮 */
display: none;
}
.vjs-loading-spinner { /* 加载圆圈 */
font-size: 2.5em;
width: 2em;
height: 2em;
border-radius: 1em;
margin-top: -1em;
margin-left: -1.5em;
}
.el-image {
margin-right: 10px;
}
.el-divider__text {
color: #abc5df;
}
.el-divider {
background-color: #e5edf6;
}
.view-myvideo-tab {
width: 100px;
height: 100px;
background-color: #C0C4CC;
text-align: center;
cursor: pointer;
}
.video-toggle-i:hover .el-icon-video-camera-solid {
display: none;
}
.video-toggle-i:hover .el-icon-video-play {
display: inline-block;
}
.view-myvideo-tab .el-icon-video-camera-solid, .view-myvideo-tab .el-icon-video-play, .view-myvideo-tab .el-icon-document {
color: #000000;
line-height: 80px;
font-size: 40px;
}
.view-myvideo-tab .el-icon-download {
width: 100px;
}
.el-icon-video-play {
display: none;
}
.ckdialogclass .el-dialog__body {
padding-top: 10px;
}
.el-icon-download {
color: white;
}
.file-down-span {
background: black;
opacity: 0.5;
z-index: 1000;
width: 100px;
text-align: center;
/*position: absolute;*/
position: relative;
bottom: -100px;
cursor: pointer;
}
.file-down-span:hover {
opacity: 0.9;
}
.ckdialogclass .el-icon-circle-close {
color: white;
}
.form-item-container {
display: flex;
}
.form-item-container .el-form-item {
width: 50%;
}
.el-upload--picture-card {
width: 100px;
height: 100px;
line-height: 98px;
}
.el-upload-list--picture-card .el-upload-list__item {
width: 100px;
height: 100px;
}
.el-loading-mask.is-fullscreen .el-loading-spinner {
font-size: 40px;
}
</style>