<template>
|
<div class="help-details-container">
|
<h3 class="fz-10">{{ pageTitle }}求助</h3>
|
<div class="help-info-content fl-co mr-t-30">
|
<div class="fl-f">
|
<div class="fw-bold label-width">{{ pageTitle }}内容:</div>
|
<div class="content-width">
|
{{ detailsInfoData.releaseContent }}
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="v-h label-width">{{ pageTitle }}内容:</div>
|
<div class="content-width">
|
<el-image
|
v-for="(it, ix) in detailsInfoData.imageUrl"
|
:key="ix"
|
class="image-width"
|
:src="it"
|
:preview-src-list="detailsInfoData.imageUrl"
|
fit="cover"
|
></el-image>
|
</div>
|
</div>
|
<div class="fl-f">
|
<div class="fw-bold label-width">分类名称:</div>
|
<span>{{ detailsInfoData.topicName }}</span>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fw-bold label-width">求助说明:</div>
|
<el-input
|
type="textarea"
|
class="content-width"
|
:rows="6"
|
resize="none"
|
placeholder="请输入求助说明"
|
maxlength="300"
|
clearable
|
show-word-limit
|
v-model="fromParameter.instruction"
|
></el-input>
|
</div>
|
<div class="fl-co mr-t-10">
|
<div class="fl-f">
|
<div class="fw-bold label-width">求助党员:</div>
|
<div class="fl-co right-party-width">
|
<div class="fl-al" style="margint-top: 4px">
|
<el-radio v-model="fromParameter.helpMemberType" :label="1"
|
>全部统计调查分类党员</el-radio
|
>
|
<el-radio v-model="fromParameter.helpMemberType" :label="2"
|
>指定部分党员</el-radio
|
>
|
</div>
|
<div class="fl-fw mr-t-10" v-if="fromParameter.helpMemberType == 2">
|
<div
|
class="mr-r-20 mr-b-10"
|
v-for="(it, ix) in psersonFormList"
|
:key="ix"
|
>
|
<el-select
|
class="select-width"
|
v-model="it.value"
|
clearable
|
filterable
|
placeholder="请选择党员"
|
>
|
<el-option
|
v-for="item in partyList"
|
:key="item.id"
|
:label="item.name"
|
:value="item.phone"
|
>
|
</el-option>
|
</el-select>
|
<el-button
|
class="mr-l-10"
|
@click="deletePartyHandle(ix, 'person')"
|
type="danger"
|
size="mini"
|
:disabled="psersonFormList.length == 1"
|
icon="el-icon-delete"
|
circle
|
></el-button>
|
</div>
|
<el-button
|
style="height: 30px"
|
size="mini"
|
@click="addPartyHandle('person')"
|
round
|
>添加党员</el-button
|
>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="fl-co mr-t-10">
|
<div class="fl-f">
|
<div class="fw-bold label-width">求助报到党组织:</div>
|
<div class="fl-co right-party-width">
|
<div class="fl-al" style="margint-top: 4px">
|
<el-radio v-model="fromParameter.helpOrgType" :label="1"
|
>全部党组织</el-radio
|
>
|
<el-radio v-model="fromParameter.helpOrgType" :label="2"
|
>指定部分党组织</el-radio
|
>
|
</div>
|
<div class="fl-fw mr-t-10" v-if="fromParameter.helpOrgType == 2">
|
<div
|
class="mr-r-20 mr-b-10"
|
v-for="(it, ix) in organizationFormList"
|
:key="ix"
|
>
|
<el-select
|
class="select-width"
|
v-model="it.value"
|
clearable
|
filterable
|
placeholder="请选择组织"
|
>
|
<el-option
|
v-for="item in unitList"
|
:key="item.id"
|
:label="item.name"
|
:value="item.adminPhone"
|
>
|
</el-option>
|
</el-select>
|
<el-button
|
class="mr-l-10"
|
@click="deletePartyHandle(ix, 'org')"
|
type="danger"
|
size="mini"
|
:disabled="psersonFormList.length === 1"
|
icon="el-icon-delete"
|
circle
|
></el-button>
|
</div>
|
<el-button
|
style="height: 30px"
|
size="mini"
|
@click="addPartyHandle('org')"
|
round
|
>添加党组织</el-button
|
>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-20">
|
<div class="fw-bold label-width v-h">分类名称:</div>
|
<div class="fl-al">
|
<el-button @click="$router.back()">返回</el-button>
|
<el-button type="primary" @click="submitHandle">提交</el-button>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script>
|
export default {
|
data() {
|
return {
|
detailsId: "",
|
pageTitle: "",
|
detailsInfoData: {},
|
fromParameter: {
|
instruction: "",
|
helpMemberType: 1,
|
helpOrgType: 1,
|
helpMemberContent: "",
|
helpOrgContent: "",
|
},
|
psersonFormList: [
|
{
|
value: "",
|
},
|
],
|
organizationFormList: [
|
{
|
value: "",
|
},
|
],
|
partyList: [],
|
unitList: [],
|
};
|
},
|
created() {
|
this.detailsId = this.$route.query.id;
|
this.pageTitle = this.$route.query.title;
|
this.getDetailsInfo();
|
let userInfo = demo.$session.get("user");
|
this.$api.post(
|
"communitypartybuilding/page/member",
|
{
|
type: 1,
|
pageNum: 1,
|
pageSize: 9999,
|
communityId: userInfo.communityId,
|
},
|
(e) => {
|
this.partyList = e.records;
|
}
|
);
|
this.$api.post(
|
"checkUnit/page",
|
{
|
pageNum: 1,
|
pageSize: 9999,
|
communityId: userInfo.communityId,
|
},
|
(e) => {
|
console.log(e.records);
|
this.unitList = e.records;
|
}
|
);
|
},
|
methods: {
|
getDetailsInfo() {
|
this.$api.get(
|
`neighbor/detailNeighborByAdmin`,
|
{ id: this.detailsId },
|
(res) => {
|
this.detailsInfoData.imageUrl = res.imageUrl
|
? res.imageUrl.split(",")
|
: [];
|
this.detailsInfoData = res;
|
this.detailsInfoData.imageUrl = res.imageUrl
|
? res.imageUrl.split(",")
|
: [];
|
}
|
);
|
},
|
addPartyHandle(type) {
|
if (type === "person") {
|
this.psersonFormList.push({
|
value: "",
|
});
|
} else {
|
this.organizationFormList.push({
|
value: "",
|
});
|
}
|
},
|
deletePartyHandle(index, type) {
|
if (type === "person") {
|
this.psersonFormList.splice(index, 1);
|
} else {
|
this.organizationFormList.splice(index, 1);
|
}
|
},
|
submitHandle() {
|
this.fromParameter.solveStatus = 1;
|
this.fromParameter.id = this.detailsId;
|
this.fromParameter.helpMemberContent = JSON.stringify(
|
this.psersonFormList
|
);
|
this.fromParameter.helpOrgContent = JSON.stringify(
|
this.organizationFormList
|
);
|
this.$api.post("neighbor/update", this.fromParameter, (res) => {
|
demo.toast("提交成功");
|
this.$router.back();
|
});
|
},
|
},
|
};
|
</script>
|
<style scoped>
|
.help-details-container {
|
padding-top: 20px;
|
padding-bottom: 20px;
|
overflow: auto;
|
}
|
.help-info-content {
|
line-height: 1.4;
|
}
|
.content-width {
|
width: 400px;
|
}
|
.v-h {
|
visibility: hidden;
|
}
|
.image-width {
|
margin: 0 10px 10px 0;
|
width: 90px;
|
height: 90px;
|
}
|
.select-width {
|
width: 200px;
|
}
|
.right-party-width {
|
width: 600px;
|
}
|
.label-width {
|
text-align: right;
|
width: 130px;
|
}
|
</style>
|