Browse Source

社区自查查询,社区自查报告详情,楼长单元长管理范围

feature
mk 2 years ago
parent
commit
900fbb7b9a
  1. 59
      src/views/modules/base/residentManagement/louzhang/addForm.vue
  2. 159
      src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue
  3. 6
      src/views/modules/satisfaction/communitySelfInsp/index.vue

59
src/views/modules/base/residentManagement/louzhang/addForm.vue

@ -114,17 +114,17 @@
<span class="info-title-2">管理范围: </span>
<span>{{ formData.rangeName || "--" }}</span>
</div>
<el-form-item label-width="100px"
label="管理范围"
prop="rangeList"
v-else>
<el-cascader ref="cascaderUnit"
class="width-two"
v-model="formData.rangeList"
:options="optionsRange"
@change="handleChangeRange"
:props="rangeProps"
:props="{ multiple: true,checkStrictly: true, emitPath: true, children: 'subAgencyList', label: 'agencyName', value: 'agencyId'}"
:disabled="formType==='detail'"
clearable />
@ -176,7 +176,7 @@ export default {
rangeProps: {
multiple: true,
checkStrictly: true,
// emitPath: true,
emitPath: true,
children: 'subAgencyList',
label: 'agencyName',
value: 'agencyId'
@ -212,12 +212,10 @@ export default {
methods: {
async initForm (type, row) {
this.formType = type;
if (this.formType === 'add') {
} else {
this.startLoading();
this.categorizedResiId = row.categorizedResiId
await this.getDetail();
if (this.formData.agencyId) {
@ -225,11 +223,19 @@ export default {
}
this.endLoading();
}
},
filterByLevel(data, levels) {
let result = [];
for (let item of data) {
if (levels.includes(item.level)) {
result.push(item);
}
if (item.subAgencyList) {
result = result.concat(this.filterByLevel(item.subAgencyList, levels));
}
}
return result;
},
async getDetail () {
const url = `/actual/base/resiCategorized/buildingUnitChief/detail/${this.categorizedResiId}`;
@ -272,7 +278,6 @@ export default {
handleChangeRange (val) {
},
async getGridList () {
const { user } = this.$store.state
@ -318,13 +323,15 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.optionsRange = res.data
console.log(res.data);
this.optionsRange = this.filterByLevel(res.data, ['quarter', 'building', 'unit']);
this.processOptions(this.optionsRange);
}
})
.catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误')
.catch((error) => {
this.dataListLoading = false;
console.error("Error details:", error); //
return this.$message.error('网络错误');
})
this.dataListLoading = false
},
@ -389,6 +396,28 @@ export default {
resetData () {
this.formData = {};
},
processOptions(options) {
options.forEach(item => {
if (item.level === "quarter") {
item.disabled = true; //
} else if (item.level === "building") {
item.disabled = false; //
} else if (item.level === "unit") {
item.disabled = false; //
//
if (item.subAgencyList) {
item.subAgencyList.forEach(fourthLevel => {
fourthLevel.disabled = true; //
});
}
}
if (item.subAgencyList) {
this.processOptions(item.subAgencyList);
}
});
},
//
startLoading () {
loading = Loading.service({

159
src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue

@ -1,8 +1,7 @@
<template>
<div class='g-main dialog-h-content'>
<h3>{{agencyName}}{{period.substr(5,2)}}月份满意度调查</h3>
<h3>{{ agencyName }}{{ period.substr(5, 2) }}月份满意度调查</h3>
<p>尊敬的居民朋友</p>
<p style="text-indent: 2em; ">为了更好地推进社区工作为您提供更全面优质的服务请您根据真实情况填写此表我们将认真对待您提出的问题并承诺对您提供的信息保密感谢您的配合</p>
<div class="card" v-for="(item, index) in formList" :key="index">
@ -12,40 +11,41 @@
<el-radio class="f-bot16" v-model.trim="form[item.pkey]" disabled label="good">基本满意</el-radio>
<el-radio class="f-bot16" v-model.trim="form[item.pkey]" disabled label="bad">不满意</el-radio>
</section>
<p v-if="form[item.pkey] == 'bad'">{{ index + 1 }}.1您具体对些方面不满意</p>
<p v-if="form[item.pkey] == 'bad'">{{ index + 1 }}.1您具体对些方面不满意</p>
<section class="f-hflex" v-for="(itemK, indexK) in item.children" v-if="form[item.pkey] == 'bad'">
<el-radio class="f-bot16" v-model.trim="form[item.value]" :label="itemK.value" disabled
>{{ itemK.label }}</el-radio>
<el-input v-if="indexK == item.children.length -1 && form[item.pkey] == 'bad'" disabled placeholder="请填写不满意原因" v-model.trim="form[item.reason]"></el-input>
<el-radio class="f-bot16" v-model.trim="form[item.value]" :label="itemK.value" disabled>{{ itemK.label
}}</el-radio>
<el-input v-if="indexK == item.children.length - 1 && form[item.pkey] == 'bad'" disabled placeholder="请填写不满意原因"
v-model.trim="form[item.reason]"></el-input>
</section>
</div>
<p>8姓名{{form.reporterName}}</p>
<p>9电话{{form.reporterMobile}}</p>
<p>8姓名{{ form.reporterName }}</p>
<p>9电话{{ form.reporterMobile }}</p>
<p>10您是否接受回访</p>
<section class="f-hflex">
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="-2">未知</el-radio>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="-1">不接受回访</el-radio>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="0">接受回访/待回访</el-radio>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="1">已回访</el-radio>
</section>
<p v-if="form.followUpStatus === 0">11请选择合适您的回访方式</p>
<section class="f-hflex" v-if="form.followUpStatus === 0">
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="0">未知</el-radio>
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="1">电话回访</el-radio>
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="2">上门回访</el-radio>
</section>
<p >请填写您的家庭住址</p>
<el-input v-model="form.resideAddress" disabled></el-input>
<el-row type="flex" justify="end" class="f-top12">
<el-col :span="2">
<el-button @click="handleClose"> 取消</el-button>
</el-col>
</el-row>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="-2">未知</el-radio>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="-1">不接受回访</el-radio>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="0">接受回访/待回访</el-radio>
<el-radio class="f-bot16" v-model="form.followUpStatus" disabled :label="1">已回访</el-radio>
</section>
<p v-if="form.followUpStatus === 0">11请选择合适您的回访方式</p>
<section class="f-hflex" v-if="form.followUpStatus === 0">
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="0">未知</el-radio>
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="1">电话回访</el-radio>
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="2">上门回访</el-radio>
</section>
<p>请填写您的家庭住址</p>
<el-input v-model="form.resideAddress" disabled></el-input>
<el-row type="flex" justify="end" class="f-top12">
<el-col :span="2">
<el-button @click="handleClose"> 取消</el-button>
</el-col>
</el-row>
</div>
</template>
<script>
import { requestGet } from "@/js/dai/request";
import { requestGet } from "@/js/dai/request";
export default {
//
data() {
@ -61,14 +61,14 @@ export default {
formList: [],
form: {
// veryGood,good,bad
evaCulturalFacility:'',
evaSportsFacility:'',
evaEcologicalEnv:'',
evaSocialSecurity:'',
evaSocialAssistance:'',
evaOldPeopleProvide:'',
evaBasicEducation:'',
evaMedical:'',
evaCulturalFacility: '',
evaSportsFacility: '',
evaEcologicalEnv: '',
evaSocialSecurity: '',
evaSocialAssistance: '',
evaOldPeopleProvide: '',
evaBasicEducation: '',
evaMedical: '',
// cultureFacilityAsp 01 02 03 09
cultureFacilityAsp: '',
@ -89,46 +89,52 @@ export default {
medicalReason: '',
//
reporterName:'',
reporterMobile:'',
reporterName: '',
reporterMobile: '',
followUpStatus: null,
expectFollowUpWay:'',
resideAddress:'',
expectFollowUpWay: '',
resideAddress: '',
},
agencyName:this.$store.state.user.agencyName,
agencyName: this.$store.state.user.agencyName,
};
},
//
async created() {
await this.getDicts()
await this.handleArr()
await this.transformInitialArray()
await this.getInspResult()
},
//
methods: {
handleArr() {
const transformArray = (initialArray) => {
const resultMap = new Map();
for (const item of initialArray) {
const baseValue = item.value.slice(0, -2);
const endValue = item.value.slice(-2);
const modifiedBaseValue = baseValue.charAt(0).toUpperCase() + baseValue.slice(1,-3);
const reasonValue = baseValue.charAt(0) + baseValue.slice(1,-3) + 'Reason';
if (!resultMap.has(baseValue)) {
resultMap.set(baseValue, { label: item.label, value: baseValue, children: [] ,pkey:`eva${modifiedBaseValue}`,reason:reasonValue});
}
if (["01", "02", "03", "09"].includes(endValue)) {
resultMap.get(baseValue).children.push(item);
}
}
transformInitialArray() {
const resultMap = new Map();
return [...resultMap.values()].filter(item => item.children.length > 0);
};
//
this.dicts.satisfaction_ns_aspect.forEach(item => {
const endValue = item.value.slice(-2);
if (isNaN(endValue)) {
resultMap.set(item.value, {
label: item.label,
value: item.value,
children: [],
pkey: `eva${item.value.charAt(0).toUpperCase() + item.value.slice(1, -3)}`,
reason: `${item.value.replace('Asp', '')}Reason` //
});
}
});
//
this.dicts.satisfaction_ns_aspect.forEach(item => {
const parentValue = item.value.slice(0, -2);
if (resultMap.has(parentValue)) {
resultMap.get(parentValue).children.push(item);
}
});
this.formList = [...resultMap.values()];
console.log(this.formList);
},
this.formList = transformArray(this.dicts.satisfaction_ns_aspect);
console.log(this.formList);
},
async getDicts() {
try {
const requests = [
@ -150,17 +156,17 @@ export default {
console.log("获取字典失败: ", error);
}
},
async getInspResult(){
async getInspResult() {
const url = `/governance/satisfaction/communitySelfInsp/inspResult/detail/${this.inspResultId}`
const {data,code,msg} = await requestGet(url)
if(code == 0){
this.form = {...data.reporter,...data.satisfaction}
const { data, code, msg } = await requestGet(url)
if (code == 0) {
this.form = { ...data.reporter, ...data.satisfaction }
console.log(this.form);
}else{
} else {
this.$message.error(msg)
}
},
handleClose(){
handleClose() {
this.$emit('handleClose')
}
},
@ -170,14 +176,14 @@ export default {
computed: {},
//
watch: {},
props:{
inspResultId:{
type:String,
default:''
props: {
inspResultId: {
type: String,
default: ''
},
period:{
type:String,
default:''
period: {
type: String,
default: ''
}
}
}
@ -205,4 +211,5 @@ h3 {
.f-font-color {
color: #000;
font-weight: 400;
}</style>
}
</style>

6
src/views/modules/satisfaction/communitySelfInsp/index.vue

@ -57,7 +57,7 @@
:close-on-press-escape="false" title="社区自查" :modal-append-to-body="false" width="820px" top="5vh"
class="dialog-h" @closed="showFormList = false">
<form-list ref="ref_add_form" @handleClose="handleClose" :satisfactionCategoryStr="satisfactionCategoryStr"
@handelDetail="handelDetail" @handelFollowUpList="handelFollowUpList" :period="formData.period" :seriesName="seriesName" :inspRecordId="formData.inspRecordId"></form-list>
@handelDetail="handelDetail" @handelFollowUpList="handelFollowUpList" :period="formData.period" :seriesName="seriesName" :inspRecordId="inspRecordId"></form-list>
<el-dialog width="920px" class="dialog-h" title="社区自查报告详情" :close-on-click-modal="false"
v-if="showFollowUpDetail" :visible.sync="showFollowUpDetail" append-to-body>
<follow-Detail :period="formData.period" :inspResultId="inspResultId" @handleClose="showFollowUpDetail = false"></follow-Detail>
@ -99,8 +99,8 @@ export default {
formData: {
period: "",//
inspRecordId: "",
},
inspRecordId: "",
multiSelection: [], //
@ -329,7 +329,7 @@ export default {
this.option.xAxis.data = []
this.tableData = data.categoryDatas || [];
this.satisfactionCategory = []
this.formData.inspRecordId = data.inspRecordId;
this.inspRecordId = data.inspRecordId;
this.synthesisScore = data.synthesisScore;
this.personQty = data.personQty
const allowedCategories = this.dicts.satisfaction_category.map(item => item.value)

Loading…
Cancel
Save