first commit
This commit is contained in:
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基础信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
||||
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
||||
<van-field readonly :value="viewData.unitname" label="单位"></van-field>
|
||||
<van-field readonly :value="viewData.unionname" label="工会"></van-field>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
作品信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly name="type" :value="viewData.hdsbzpzt" label="作品主题"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.lname" label="活动类别"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.zname" label="作品类别"></van-field>
|
||||
<van-field readonly :value="viewData.zpms" label="简介"
|
||||
input-align="left"
|
||||
style="flex-flow: column"
|
||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
||||
|
||||
<van-field label="照片" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">照  片</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="img2List" view :del="false"
|
||||
v-if="img2List&&img2List.length>0"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="视频" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">视  频</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<template v-for="item in videoList" v-if="videoList.length>0">
|
||||
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
|
||||
width="640" height="264"
|
||||
data-setup="{}" webkit-playsinline='true' playsinline='true' x-webkit-airplay='true'
|
||||
x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true'>
|
||||
<source :src="FILE_DOMAIN+item.filepath" type="video/mp4">
|
||||
</video>
|
||||
</template>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="音频" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">音  频</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<template v-for="item in videoList" v-if="audioList.length>0">
|
||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
||||
<source :src="FILE_DOMAIN+item.filepath"/>
|
||||
</audio>
|
||||
</template>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有音频。
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="文档" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">文  档</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<template v-for="(item,index) in docList" v-if="docList.length>0">
|
||||
<div class="text-nowrap color-puple"
|
||||
@click="previewFile(item.filepath,item.filename,docList,index,item.id)">
|
||||
{{ item.filename }}
|
||||
</div>
|
||||
</template>
|
||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
videoList: [],
|
||||
prevImgList: [],
|
||||
img2List: [],
|
||||
audioList: [],
|
||||
docList: [],
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
|
||||
doctype: ['doc', 'docx'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
|
||||
const refs = await $.get("/mobile/cahd/list/findOne", {id})
|
||||
|
||||
if (refs) {
|
||||
this.viewData = refs[0]
|
||||
data.forEach(val => {
|
||||
val.fjname = val.filename
|
||||
val.fjurl = val.filepath
|
||||
val.url = FILE_DOMAIN + 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(FILE_DOMAIN + 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);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$toast.fail('获取信息失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基础信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
||||
<van-field readonly :value="viewData.sex" label="性别"></van-field>
|
||||
<van-field readonly :value="viewData.birthday" label="出生年月"></van-field>
|
||||
<van-field readonly :value="viewData.birthPlace" label="出生地"></van-field>
|
||||
<van-field readonly :value="viewData.education" label="文化程度"></van-field>
|
||||
<van-field readonly :value="viewData.hobby" label="爱好"></van-field>
|
||||
<van-field readonly :value="viewData.unitName" label="工作部门"></van-field>
|
||||
<van-field readonly :value="viewData.position" label="职务"></van-field>
|
||||
<van-field readonly :value="viewData.mobile" label="电话"></van-field>
|
||||
<van-field readonly :value="viewData.email" label="电子邮箱"></van-field>
|
||||
<van-field readonly :value="viewData.homeAddress" label="家庭住址"></van-field>
|
||||
<van-field readonly :value="viewData.QQNumber" label="QQ"></van-field>
|
||||
<van-field readonly :value="viewData.bodyHeight" label="身高"></van-field>
|
||||
<van-field readonly :value="viewData.bodyWeight" label="体重"></van-field>
|
||||
<van-field readonly :value="viewData.health" label="身体状况"></van-field>
|
||||
<van-field readonly :value="viewData.sport" label="经常从事的运动"></van-field>
|
||||
<van-field readonly :value="viewData.medicalHistory ? '是' : '否'" label="是否有过特殊病史"></van-field>
|
||||
<van-field readonly :value="viewData.joinActivity ? '是' : '否'" label="是否愿意参加本协会的活动"></van-field>
|
||||
<van-field readonly :value="viewData.otherThing" label="特别需要说明的问题(身体或心理)"></van-field>
|
||||
<!-- <van-field readonly :value="viewData.remark" label="备注"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.loginname" label="工号"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.unitName" label="工作部门"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.mobile" label="电话"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.QQNumber" label="QQ"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.hobby" label="爱好"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.sickness" label="是否患有运动限制类疾病"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.familyUserName" label="紧急联系人姓名"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.familyRelation" label="紧急联系人关系"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.familyMobile" label="紧急联系人电话"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.project" label="擅长项目"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.selfSkill" label="个人技能水平"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.playRole" label="期望在协会中扮演的角色"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.provideServices" label="是否愿意为协会提供志愿服务"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.joinManageWork" label="是否愿意参与协会的管理工作"></van-field>-->
|
||||
<!-- <van-field readonly :value="viewData.giveHelp" label="是否愿意为协会的活动提供赞助或资源支持"></van-field>-->
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<!-- <template v-if="viewData.upa">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.upa.username" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.upa.auditTime" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.upa.auditOpinion ? viewData.upa.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.upa.auditSign"
|
||||
v-if="viewData.upa.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>-->
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
const {data, code, msg} = await $.get("/platform/sys/club/sq/findOne", {id})
|
||||
if (data) {
|
||||
this.viewData = data
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$toast.fail('获取信息失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 60% !important;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 7px 16px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="card-header" v-if="$slots.header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="card-footer" v-if="$slots.footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MCard"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.card {
|
||||
border: none;
|
||||
border-radius: .5rem;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
border-bottom:1px dashed rgba(0,0,0,.125);
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.card-header:first-child {
|
||||
border-radius: calc(.5rem - 1px) calc(.5rem - 1px) 0 0
|
||||
}
|
||||
|
||||
.card-body>.van-cell{
|
||||
padding: 5px 0;
|
||||
}
|
||||
.card-body{
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
|
||||
.card-header, .card-footer {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div class="loader"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MLoading"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.loader {
|
||||
z-index: 10000;
|
||||
position: relative;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
transform: rotate(165deg);
|
||||
}
|
||||
|
||||
.loader:before, .loader:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
border-radius: 0.25em;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.loader:before {
|
||||
animation: before 2s infinite;
|
||||
}
|
||||
|
||||
.loader:after {
|
||||
animation: after 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes before {
|
||||
0% {
|
||||
width: 0.5em;
|
||||
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
35% {
|
||||
width: 2.5em;
|
||||
box-shadow: 0 -0.5em rgba(225, 20, 98, 0.75), 0 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
70% {
|
||||
width: 0.5em;
|
||||
box-shadow: -1em -0.5em rgba(225, 20, 98, 0.75), 1em 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes after {
|
||||
0% {
|
||||
height: 0.5em;
|
||||
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
35% {
|
||||
height: 2.5em;
|
||||
box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
70% {
|
||||
height: 0.5em;
|
||||
box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to center the whole thing!
|
||||
*/
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.loader {
|
||||
position: absolute;
|
||||
top: calc(50% - 1.25em);
|
||||
left: calc(50% - 1.25em);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<figure>
|
||||
<div class="dot white"></div>
|
||||
<div class="dot"></div>
|
||||
<div class="dot"></div>
|
||||
<div class="dot"></div>
|
||||
<div class="dot"></div>
|
||||
</figure>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MTableLoading"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
body {
|
||||
background: #222;
|
||||
}
|
||||
|
||||
figure {
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 6.250em;
|
||||
height: 6.250em;
|
||||
animation: rotate 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.white {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
animation: flash 2.4s linear infinite;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
width: 2.4em;
|
||||
height: 2.4em;
|
||||
border-radius: 100%;
|
||||
transition: all 1s ease;
|
||||
}
|
||||
|
||||
.dot:nth-child(2) {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: #FF4444;
|
||||
animation: dotsY 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.dot:nth-child(3) {
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
background: #FFBB33;
|
||||
animation: dotsX 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.dot:nth-child(4) {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: #99CC00;
|
||||
animation: dotsY 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.dot:nth-child(5) {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #33B5E5;
|
||||
animation: dotsX 2.4s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
10% {
|
||||
width: 6.250em;
|
||||
height: 6.250em;
|
||||
}
|
||||
66% {
|
||||
width: 2.4em;
|
||||
height: 2.4em;
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
width: 6.250em;
|
||||
height: 6.250em;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dotsY {
|
||||
66% {
|
||||
opacity: .1;
|
||||
width: 2.4em;
|
||||
}
|
||||
77% {
|
||||
opacity: 1;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dotsX {
|
||||
66% {
|
||||
opacity: .1;
|
||||
height: 2.4em;
|
||||
}
|
||||
77% {
|
||||
opacity: 1;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flash {
|
||||
33% {
|
||||
opacity: 0;
|
||||
border-radius: 0%;
|
||||
}
|
||||
55% {
|
||||
opacity: .6;
|
||||
border-radius: 100%;
|
||||
}
|
||||
66% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,186 @@
|
||||
<style>
|
||||
.field .van-field__error-message {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<van-form @submit="onSubmit" ref="form">
|
||||
<template v-for="column in dynamicData">
|
||||
<!-- 文本、数值、时间 -->
|
||||
<template v-if="['VARCHAR','TEXT','INT','DATE','DATETIME'].includes(column.columnType)">
|
||||
<van-field
|
||||
class="field"
|
||||
v-model="column.columnValue"
|
||||
:clickable="['SELECT'].includes(column.columnFormType)"
|
||||
:label="column.columnName"
|
||||
:name="column.columnCode"
|
||||
:type="['INT'].includes(column.columnType) ? 'digit' : ''"
|
||||
:placeholder="(['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName"
|
||||
:readonly="['SELECT'].includes(column.columnFormType)"
|
||||
:rules="[{ required: column.isRequired, message: (['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName }]"
|
||||
:required="column.isRequired"
|
||||
@click="selectFieldClick(column)"
|
||||
></van-field>
|
||||
|
||||
<van-popup v-if="['SELECT'].includes(column.columnFormType)"
|
||||
v-model="pickerStates[column.columnCode + 'Picker']"
|
||||
position="bottom">
|
||||
<template v-if="['DATETIME','DATE'].includes(column.columnType)">
|
||||
<van-datetime-picker
|
||||
:title="column.columnName"
|
||||
:type="column.columnType.toLocaleLowerCase()"
|
||||
:min-date="new Date(2008, 0, 1)"
|
||||
:max-date="new Date(2017, 5, 30)"
|
||||
show-toolbar
|
||||
@cancel="pickerStates[column.columnCode + 'Picker'] = false; column.columnValue = ''"
|
||||
@confirm="(time)=>{dateTimePickerConfirm(time,column)}"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-picker
|
||||
:columns="column.selectValues"
|
||||
:title="column.columnName"
|
||||
show-toolbar
|
||||
@cancel="pickerStates[column.columnCode + 'Picker'] = false; column.columnValue = ''"
|
||||
@confirm="(value)=>{ordinaryPickerConfirm(value,column)}"
|
||||
/>
|
||||
</template>
|
||||
</van-popup>
|
||||
</template>
|
||||
<!-- 单选框 -->
|
||||
<template v-else-if="['BOOLEAN'].includes(column.columnType)">
|
||||
|
||||
</template>
|
||||
<!-- 文件 -->
|
||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||
<van-field :required="column.isRequired" :label="column.columnName"
|
||||
:rules="[{ required: column.isRequired, message: '请上传' + column.columnName }]">
|
||||
<template #input>
|
||||
<!-- <van-uploader v-model="fileList" :after-read="(file)=>{fileAfterRead(file,column)}"
|
||||
:max-count="column.fileNumber"/>-->
|
||||
|
||||
<vant_file_upload :files.sync="column.columnValue" :max="column.fileNumber"
|
||||
:type="column.fileType"></vant_file_upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</van-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 请在van-form中引用 -->
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "TrainDynamicForm",
|
||||
components: {
|
||||
'vant_file_upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
||||
},
|
||||
props: {
|
||||
dynamicData: []
|
||||
},
|
||||
model: {
|
||||
prop: 'dynamicData',
|
||||
event: 'updateDynamicData'
|
||||
},
|
||||
watch: {
|
||||
dynamicData: {
|
||||
handler: function (newValue, oldValue) {
|
||||
this.$emit('updateDynamicData', newValue)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//所有的picker状态
|
||||
pickerStates: {},
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validForm() {
|
||||
try {
|
||||
this.$refs.form.validate().then(() => {
|
||||
return true
|
||||
}).catch(() => {
|
||||
return false
|
||||
})
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
|
||||
/*return new Promise(resolve => {
|
||||
this.$refs.form.validate().then(() => {
|
||||
resolve(true)
|
||||
}).catch(() => {
|
||||
resolve(false)
|
||||
})
|
||||
})*/
|
||||
|
||||
},
|
||||
onSubmit() {
|
||||
|
||||
},
|
||||
selectFieldClick(column) {
|
||||
console.log(column)
|
||||
this.$set(this.pickerStates, column.columnCode + 'Picker', true)
|
||||
if (!['DATE', 'DATETIME'].includes(column.columnType)) {
|
||||
//说明是普通的下拉框
|
||||
// column.selectValues = ['1', '2', '3']
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 时间picker确认
|
||||
* @param time
|
||||
* @param column
|
||||
*/
|
||||
dateTimePickerConfirm(time, column) {
|
||||
if (column.columnType === 'DATE') {
|
||||
column.columnValue = moment(time).format('YYYY-MM-DD')
|
||||
} else if (column.columnType === 'DATETIME') {
|
||||
column.columnValue = moment(time).format('YYYY-MM-DD HH:mm:ss')
|
||||
} else {
|
||||
//预留别的类型
|
||||
column.columnValue = moment(time).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
this.pickerStates[column.columnCode + 'Picker'] = false
|
||||
},
|
||||
/**
|
||||
* 普通picker确认
|
||||
* @param value
|
||||
* @param column
|
||||
*/
|
||||
ordinaryPickerConfirm(value, column) {
|
||||
column.columnValue = value
|
||||
this.pickerStates[column.columnCode + 'Picker'] = false
|
||||
},
|
||||
/**
|
||||
* 文件读取
|
||||
*/
|
||||
fileAfterRead(file, column) {
|
||||
|
||||
|
||||
console.log(file)
|
||||
console.log(column)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.dynamicData)
|
||||
// this.dynamicData.forEach(v => {
|
||||
// if (v.columnFormType === 'SELECT') {
|
||||
// v.columnPickerName = v.columnCode+'Picker'
|
||||
// }
|
||||
// })
|
||||
// console.log(this.dynamicData)
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
申请信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field :value="viewData.loginname" label="工号" left-icon="contact"></van-field>
|
||||
<van-field label="姓名" :value="viewData.username" left-icon="contact"></van-field>
|
||||
<van-field label="性别" :value="viewData.sex" left-icon="ellipsis"></van-field>
|
||||
<van-field label="民族" left-icon="bar-chart-o" :value="viewData.nation"></van-field>
|
||||
<van-field label="学历" left-icon="coupon-o" :value="viewData.education"></van-field>
|
||||
<van-field label="学位" left-icon="comment-o" :value="viewData.academicDegree"></van-field>
|
||||
<van-field label="政治面貌" left-icon="label-o" :value="viewData.political"></van-field>
|
||||
<van-field :value="viewData.personType" label="人员类型" left-icon="label-o"></van-field>
|
||||
<van-field label="身份证" left-icon="idcard" :value="viewData.idcard"></van-field>
|
||||
<van-field label="联系电话" left-icon="phone-o" :value="viewData.mobile"></van-field>
|
||||
<van-field label="户口所在地" left-icon="wap-home-o"
|
||||
:value="viewData.registeredResidence"></van-field>
|
||||
<van-field label="现居住地" left-icon="home-o" :value="viewData.homeAddress"></van-field>
|
||||
<van-field label="工作单位" left-icon="cluster-o" :value="viewData.unitname"></van-field>
|
||||
<van-field label="职务" left-icon="debit-pay" :value="viewData.position"></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<van-cell-group class="mt10 up_down">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<van-field readonly>
|
||||
<template #input>
|
||||
<div v-html="viewData.position"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10 up_down">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
|
||||
<van-field readonly>
|
||||
<template #input>
|
||||
<div v-html="viewData.specialSkill"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10 up_down">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div class="van-cell__title van-field__label"
|
||||
style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div v-if="family && family.length>0">
|
||||
<div v-for="(o,i) in family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{ toChinesNum(i + 1) }}</span>
|
||||
</div>
|
||||
<van-form readonly input-align="right">
|
||||
<van-field label="关系" :value="o.relation" left-icon="exchange"></van-field>
|
||||
<van-field label="姓名" :value="o.name" left-icon="user-o"></van-field>
|
||||
<van-field label="联系方式" :value="o.mobile" left-icon="phone-o"></van-field>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="height: 100px">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<template v-if="unionAudit">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field label="审 核 人" :value="unionAudit.username" left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="审核时间" :value="moment(unionAudit.auditTime).format('YYYY-MM-DD')"
|
||||
left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o" :value="unionAudit.auditOpinion"
|
||||
readonly></van-field>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="schoolAudit">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field label="审 核 人" :value="schoolAudit.username" left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="审核时间" :value="moment(schoolAudit.auditTime).format('YYYY-MM-DD')"
|
||||
left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o" :value="schoolAudit.auditOpinion"
|
||||
readonly></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
viewData: {},
|
||||
unionAudit: {},
|
||||
schoolAudit: {},
|
||||
family: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
user_id: String,
|
||||
record_id: String
|
||||
},
|
||||
methods: {
|
||||
async getAuditInfo(id) {
|
||||
const {data} = await $.get('/platform/member/common/findChangeApplyInfo', {id: id})
|
||||
if (data !== null) {
|
||||
const {unionAudit, schoolAudit} = data
|
||||
this.info = data
|
||||
this.unionAudit = unionAudit
|
||||
this.schoolAudit = schoolAudit
|
||||
} else {
|
||||
this.unionAudit = null
|
||||
this.schoolAudit = null
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async getUserInfo(id) {
|
||||
const {data} = await $.get('/platform/member/common/userInfo', {userId: id})
|
||||
this.viewData = data
|
||||
this.family = JSON.parse(data.family)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.card_title {
|
||||
margin: 5px 0 5px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
申请信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field :value="viewData.loginname" label="工号" left-icon="contact"></van-field>
|
||||
<van-field label="姓名" :value="viewData.username" left-icon="contact"></van-field>
|
||||
<van-field label="性别" :value="viewData.sex" left-icon="ellipsis"></van-field>
|
||||
<van-field label="民族" left-icon="bar-chart-o" :value="viewData.nation"></van-field>
|
||||
<van-field label="学历" left-icon="coupon-o" :value="viewData.education"></van-field>
|
||||
<van-field label="学位" left-icon="comment-o" :value="viewData.academicDegree"></van-field>
|
||||
<van-field label="政治面貌" left-icon="label-o" :value="viewData.political"></van-field>
|
||||
<van-field :value="viewData.personType" label="人员类型" left-icon="label-o"></van-field>
|
||||
<van-field label="身份证" left-icon="idcard" :value="viewData.idcard"></van-field>
|
||||
<van-field label="联系电话" left-icon="phone-o" :value="viewData.mobile"></van-field>
|
||||
<van-field label="户口所在地" left-icon="wap-home-o" :value="viewData.registeredResidence"></van-field>
|
||||
<van-field label="现居住地" left-icon="home-o" :value="viewData.homeAddress"></van-field>
|
||||
<van-field label="工作单位" left-icon="cluster-o" :value="viewData.unitname"></van-field>
|
||||
<van-field label="职务" left-icon="debit-pay" :value="viewData.position"></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<van-cell-group class="mt10 up_down">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<van-field readonly>
|
||||
<template #input>
|
||||
<div v-html="viewData.position"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10 up_down">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
|
||||
<van-field readonly>
|
||||
<template #input>
|
||||
<div v-html="viewData.specialSkill"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10 up_down">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div v-if="family && family.length>0">
|
||||
<div v-for="(o,i) in family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{ toChinesNum(i + 1) }}</span>
|
||||
</div>
|
||||
<van-form readonly input-align="right">
|
||||
<van-field label="关系" :value="o.relation" left-icon="exchange"></van-field>
|
||||
<van-field label="姓名" :value="o.name" left-icon="user-o"></van-field>
|
||||
<van-field label="联系方式" :value="o.mobile" left-icon="phone-o"></van-field>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="height: 100px">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<template v-if="unionAudit!=null">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field label="审 核 人" :value="unionAudit.username" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="moment(unionAudit.auditTime).format('YYYY-MM-DD')" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o" :value="unionAudit.auditOpinion" readonly></van-field>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="schoolAudit!=null">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field label="审 核 人" :value="schoolAudit.username" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="moment(schoolAudit.auditTime).format('YYYY-MM-DD')" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o" :value="schoolAudit.auditOpinion" readonly></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
unionAudit: {},
|
||||
schoolAudit: {},
|
||||
family: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
user_id: String,
|
||||
record_id: String
|
||||
},
|
||||
methods: {
|
||||
// getDetailInfo(user_id, record_id) {
|
||||
// this.getUserInfo(user_id)
|
||||
// this.getAuditInfo(record_id)
|
||||
// },
|
||||
async getAuditInfo(id) {
|
||||
const {data} = await $.get('/platform/member/common/findApplyInfo', {id: id})
|
||||
if (data !== null) {
|
||||
const {unionAudit, schoolAudit} = data
|
||||
this.unionAudit = unionAudit
|
||||
this.schoolAudit = schoolAudit
|
||||
} else {
|
||||
this.unionAudit = null
|
||||
this.schoolAudit = null
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async getUserInfo(id) {
|
||||
const {data} = await $.get('/platform/member/common/userInfo', {userId: id})
|
||||
this.viewData = data
|
||||
this.family = JSON.parse(data.family)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.card_title {
|
||||
margin: 5px 0 5px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基础信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
||||
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
||||
<van-field readonly :value="viewData.dwname" label="单位"></van-field>
|
||||
<van-field readonly :value="viewData.ghname" label="工会"></van-field>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
作品信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly name="type" :value="viewData.hdname" label="作品主题"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.hdlbname" label="活动类别"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.step_count" label="健步走步数"
|
||||
v-if="viewData.step_count"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.zname" label="作品类别" v-if="viewData.zname"></van-field>
|
||||
<van-field readonly :value="viewData.hdsbzpms" label="简介"
|
||||
input-align="left"
|
||||
style="flex-flow: column"
|
||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
||||
|
||||
<van-field label="照片" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">照  片</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="img2List" view :del="false"
|
||||
v-if="img2List&&img2List.length>0"></vant-file-upload>
|
||||
<div v-if="img2List.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有照片。
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="视频" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">视  频</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<div v-if="videoList.length>0">
|
||||
<div v-for="item in videoList" class="mt10">
|
||||
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
|
||||
width="640" height="264"
|
||||
data-setup="{}" webkit-playsinline='true' playsinline='true' x-webkit-airplay='true'
|
||||
x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true'>
|
||||
<source :src="item.url" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="videoList.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有视频。
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="音频" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">音  频</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<div v-if="audioList&&audioList.length>0">
|
||||
<div v-for="audio in audioList" class="mt10">
|
||||
<audio id="amusic" preload="auto" controls>
|
||||
<source :src="FILE_DOMAIN+audio.url"/>
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center;color: #c2bbbb;font-size: 10px;" v-if="audioList.length===0">
|
||||
没有音频。
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="文档" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">文  档</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<div v-for="(item,index) in docList" v-if="docList&&docList.length>0">
|
||||
<div class="text-nowrap color-puple"
|
||||
@click="previewFile(item.filepath,item.filename,docList,index,item.id)">
|
||||
{{ item.filename }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="docList.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
||||
没有文档。
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<template v-if="viewData.union">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-cell-group>
|
||||
<van-field readonly name="type" :value="viewData.union.username" label="审核人"></van-field>
|
||||
<van-field label="审核时间" :value="viewData.union.auditTime" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.union.auditOpinion ? viewData.union.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.union.auditSign"
|
||||
v-if="viewData.union.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.school">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-cell-group>
|
||||
<van-field readonly name="type" :value="viewData.school.username" label="审核人"></van-field>
|
||||
<van-field label="审核时间" :value="viewData.school.auditTime" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.school.auditOpinion ? viewData.school.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.school.auditSign"
|
||||
v-if="viewData.school.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
videoList: [],
|
||||
prevImgList: [],
|
||||
img2List: [],
|
||||
audioList: [],
|
||||
docList: [],
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
|
||||
doctype: ['doc', 'docx'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
|
||||
const refs = await $.get("/platform/hd/wmhd/findxxById", {id})
|
||||
|
||||
if (refs) {
|
||||
this.viewData = refs.data
|
||||
console.log(refs)
|
||||
data.forEach(val => {
|
||||
val.fjname = val.filename
|
||||
val.fjurl = val.filepath
|
||||
val.id = val.filepath
|
||||
val.url = FILE_DOMAIN + '/fileStreamPreview?id=' + 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(val.url)
|
||||
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);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$toast.fail('获取信息失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user