<template>
|
<div class="volunteer_exam">
|
<div class="w_row clearfix">
|
<section class="w_col_12">
|
<p>姓名:</p>
|
<article>{{ detail.name }}</article>
|
</section>
|
<section class="w_col_12">
|
<p>年龄:</p>
|
<article>{{ detail.age }}</article>
|
</section>
|
<section class="w_col_12">
|
<p>职业:</p>
|
<article>{{ detail.job }}</article>
|
</section>
|
<section class="w_col_12">
|
<p>政治面貌:</p>
|
<article>{{ is_po(+detail.politicalFace - 1) }}</article>
|
</section>
|
<section class="w_col_12">
|
在读大学生:
|
<article>{{ detail.isUniversity === 1 ? "是" : "否" }}</article>
|
</section>
|
<section class="w_col_12">
|
<p>学校名字:</p>
|
<article>{{ detail.universityName || "暂无" }}</article>
|
</section>
|
<section class="w_col_12">
|
身份证号码:
|
<article>{{ detail.idCard || "暂无" }}</article>
|
</section>
|
<section class="w_col_12">
|
志愿者组织:
|
<article>{{ detail.orgName || "暂无" }}</article>
|
</section>
|
<section class="w_col_12">
|
志愿者队伍:
|
<article>{{ detail.teamName || "暂无" }}</article>
|
</section>
|
<section class="w_col_12">
|
<p>技能:</p>
|
<article>{{ detail.skillName || "暂无" }}</article>
|
</section>
|
</div>
|
<section>
|
<p>居住地址:</p>
|
<article>{{ detail.address }}</article>
|
</section>
|
<!---->
|
|
<section>
|
<p>申请原因:</p>
|
<article>{{ detail.applyReson }}</article>
|
</section>
|
<section>
|
<p>证件照:</p>
|
<article>
|
<div v-for="(it, ix) in photoPathList" :key="ix">
|
<img :src="it" @click="onScaleImage(it)" alt="" />
|
</div>
|
</article>
|
</section>
|
<section v-if="!show">
|
<p>审核状态:</p>
|
<article>
|
<el-radio v-model="a1" label="2">审核通过</el-radio>
|
<el-radio v-model="a1" label="3">驳回</el-radio>
|
</article>
|
</section>
|
<section v-if="a1 === '3'">
|
<p>驳回理由:</p>
|
<article>
|
<textarea
|
cols="30"
|
rows="10"
|
class="m_inp"
|
v-model="text"
|
maxlength="200"
|
></textarea>
|
</article>
|
</section>
|
<section v-if="show">
|
<p>审核状态:</p>
|
<article>
|
{{ is_type(+detail.state - 1) }}
|
</article>
|
</section>
|
<section v-if="detail.state === 3 && show">
|
<p>驳回原因:</p>
|
<article>{{ detail.rejectReson }}</article>
|
</section>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
props: {
|
item: {
|
type: Object,
|
default: () => {
|
return {};
|
},
|
},
|
door: {
|
type: Object,
|
default: () => {
|
return {};
|
},
|
},
|
},
|
components: {},
|
data() {
|
return { detail: {}, a1: "2", text: "", show: false };
|
},
|
watch: {
|
item: {
|
handler() {
|
this.setItem();
|
},
|
deep: true,
|
},
|
door: {
|
handler(n) {
|
if (n.r) {
|
this.sub(n.t);
|
}
|
},
|
deep: true,
|
},
|
a1(n) {
|
if (+n === 2) {
|
this.text = "";
|
}
|
},
|
},
|
methods: {
|
is_type(v) {
|
return ["待审核", "已通过", "已驳回"][v] || v + 1;
|
},
|
is_po(v) {
|
return ["党员", "团员", "群众"][v] || v + 1;
|
},
|
onScaleImage(img) {
|
this.$store.dispatch("setImage", {
|
time: Date.now(),
|
tool: 1,
|
pic: img,
|
});
|
},
|
sub(type) {
|
if (this.show) {
|
this.$store.dispatch("setFixed", {
|
event: "del",
|
type: type,
|
time: Date.now(),
|
});
|
return 0;
|
}
|
if (+this.a1 === 3) {
|
if (!this.text) {
|
demo.toast("请输入驳回原因");
|
return 0;
|
}
|
}
|
let os = {
|
rejectReson: this.text,
|
state: this.a1,
|
id: this.detail.id,
|
};
|
this.$api.put("communitymanager/volunteerexamine", os, (e) => {
|
demo.toast("操作成功");
|
this.$nextTick(() => {
|
this.$store.dispatch("setFixed", {
|
event: "del",
|
type: type,
|
time: Date.now(),
|
});
|
this.$store.dispatch("setPageReset", "/man_vol_exam");
|
});
|
});
|
},
|
setItem() {
|
if (this.item.id) {
|
this.$api.get(
|
"communitymanager/volunteerexamine",
|
{ id: this.item.id },
|
(e) => {
|
this.detail = e;
|
this.photoPathList = e.photoPath ? e.photoPath.split(",") : [];
|
}
|
);
|
this.show = this.item.show;
|
if (this.show) {
|
this.a1 = "1";
|
}
|
} else {
|
demo.toast("无效志愿者");
|
}
|
},
|
},
|
mounted() {
|
this.setItem();
|
},
|
};
|
</script>
|
<style lang='less' scoped>
|
.volunteer_exam {
|
font-size: 14px;
|
color: #333;
|
p {
|
line-height: 1.2;
|
}
|
section {
|
display: flex;
|
margin-bottom: 15px;
|
p {
|
width: 80px;
|
text-align: right;
|
}
|
article {
|
flex: 1;
|
}
|
}
|
img {
|
width: 307px;
|
height: 185px;
|
display: block;
|
}
|
.m_inp {
|
resize: none;
|
}
|
}
|
</style>
|