<template>
|
<div class="neigh-dtail">
|
<v-header title="详情"></v-header>
|
|
<div class="clearfix text">
|
<p class="w_col_24">需求标题:{{ obj.title || "无" }}</p>
|
<p class="w_col_8">需求类型:{{ obj.classifyName || "无" }}</p>
|
<p class="w_col_8">发布人:{{ obj.linkman || "无" }}</p>
|
<p class="w_col_8">发布时间:{{ obj.creationTime || "无" }}</p>
|
<p class="w_col_8">已认领人数:{{ obj.joinNum || "无" }}</p>
|
<p v-if="obj.claimNum * 1 > 0" class="w_col_8">
|
最大认领人数:{{ obj.claimNum || "无" }}
|
</p>
|
<p v-if="obj.claimNum * 1 == -1" class="w_col_8">最大认领人数:无限制</p>
|
<p class="w_col_8">认领开始时间:{{ obj.claimStartTime || "无" }}</p>
|
<p class="w_col_8">认领结束时间:{{ obj.claimEndTime || "无" }}</p>
|
<p class="w_col_8">需求开始时间:{{ obj.needStartTime || "无" }}</p>
|
<p class="w_col_8">需求结束时间:{{ obj.needEndTime || "无" }}</p>
|
<p class="w_col_8">任务地点:{{ obj.address || "无" }}</p>
|
<p class="w_col_8">联系人:{{ obj.linkman || "无" }}</p>
|
<p class="w_col_8">联系电话:{{ obj.phone || "无" }}</p>
|
<p class="w_col_24">积分奖励:{{ obj.award || "无" }}积分</p>
|
<div class="w_col_24">需求详情:{{ obj.content }}</div>
|
<!-- <div class="desc"></div> -->
|
</div>
|
<div class="imgs">
|
<el-image
|
fit="cover"
|
class="img-style"
|
:src="obj.imgsUrl"
|
:preview-src-list="[obj.imgsUrl]"
|
></el-image>
|
</div>
|
<v-header title="处理进度"></v-header>
|
<div class="process">
|
<p class="w_col_24">
|
处理状态:{{
|
["", "认领中", "进行中", "已结束"][obj.status * 1] || "无"
|
}}
|
</p>
|
<!-- <p class="w_col_12">服务时长:{{ obj.title || "无" }}</p> -->
|
</div>
|
|
<v-header title="认领记录"></v-header>
|
<div class="tab">
|
<v-tool-table :trs="trs" :tds="tds">
|
<template v-slot:punchStartTime="{ scope }">
|
{{ scope.punchStartTime || "" }}
|
</template>
|
<template v-slot:punchEndTime="{ scope }">
|
{{ scope.punchEndTime || "" }}
|
</template>
|
<template v-slot:serviceTime="{ scope }">
|
{{
|
((scope.serviceTime * 1) / 1000 / 60 / 60).toFixed(2) + "小时" || ""
|
}}
|
</template>
|
</v-tool-table>
|
</div>
|
<!-- <v-tool-page :item="paged" @on-page="onPage"></v-tool-page> -->
|
<div class="back">
|
<button class="m_btn small" @click="$router.back()">返回</button>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
props: {},
|
components: {},
|
inject: ["appShowImage", "appTimeout", "appPath"],
|
data() {
|
return {
|
status: ["", "待审核", "显示", "隐藏", "驳回"],
|
trs: [
|
{ text: "人员", val: "userName" },
|
{ text: "认领时间", val: "creationTime" },
|
{ text: "开始服务时间", val: "btn", slot: "punchStartTime" },
|
{ text: "结束服务时间", val: "btn", slot: "punchEndTime" },
|
{ text: "服务时长", val: "btn", slot: "serviceTime" }
|
],
|
paged: { page: 0, total: 0, r: 0, limit: 10 },
|
tds: [],
|
obj: {}
|
};
|
},
|
watch: {},
|
methods: {
|
init(id) {
|
this.$api.get("StriveFor/NeedProblem/getDetails?id=" + id, "", e => {
|
this.obj = e;
|
this.obj.imageList = e.releaseImages ? e.releaseImages.split(",") : [];
|
});
|
},
|
comment() {
|
let user = demo.$session.get("user");
|
|
let data = {
|
taskId: this.$route.params.id,
|
pageSize: this.paged.limit,
|
pageNum: this.paged.page,
|
communityId: user.communityId
|
};
|
this.$api.get("StriveFor/getNeedClaimList", data, e => {
|
// console.log(e)
|
this.paged.total = e.total;
|
this.tds = e;
|
});
|
},
|
onPage(v) {
|
if (v.page === this.paged.page && v.page && !v.reset) {
|
return 0;
|
}
|
this.paged.page = v.page;
|
this.paged.limit = v.limit;
|
this.comment();
|
},
|
onShowComment(v) {
|
this.appPath("man_neighbor_comment/" + v.id);
|
},
|
onToggleComment(v, n) {
|
let txt = n === 1 ? "显示" : "隐藏";
|
this.$js.model("", "是否" + txt, res => {
|
if (res) {
|
this.$api.post(
|
"neighbor/changeCommentStatusByAdmin",
|
{ id: v.id, status: n },
|
() => {
|
demo.toast(txt + "成功");
|
v.status = n;
|
}
|
);
|
}
|
});
|
}
|
},
|
mounted() {
|
this.init(this.$route.params.id);
|
this.comment();
|
// this.tds = [{}];
|
}
|
};
|
</script>
|
<style lang="less" scoped>
|
.neigh-dtail {
|
overflow-y: auto;
|
.desc {
|
font-size: 15px;
|
color: #333;
|
line-height: 1.5;
|
}
|
.imgs {
|
display: flex;
|
flex-wrap: wrap;
|
margin: 30px 0;
|
.img-style {
|
display: block;
|
margin: 0 10px 10px 0;
|
width: 110px;
|
height: 110px;
|
background-color: #eee;
|
cursor: pointer;
|
}
|
}
|
.text {
|
font-size: 15px;
|
color: #333;
|
p {
|
line-height: 1.5;
|
margin-bottom: 15px;
|
}
|
}
|
.back {
|
margin: 30px 0;
|
.m_btn {
|
min-width: 80px;
|
}
|
}
|
}
|
.process {
|
.lie-box {
|
padding-bottom: 20px;
|
}
|
.title {
|
padding-bottom: 10px;
|
}
|
}
|
</style>
|