Browse Source

Merge branch 'dev' into jw_feature_dev

feature
张若晨 2 years ago
parent
commit
9462af16d1
  1. 59
      src/views/modules/base/residentManagement/louzhang/addForm.vue
  2. 28
      src/views/modules/communityParty/partyOrg/orgTree.vue
  3. 159
      src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue
  4. 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 class="info-title-2">管理范围: </span>
<span>{{ formData.rangeName || "--" }}</span> <span>{{ formData.rangeName || "--" }}</span>
</div> </div>
<el-form-item label-width="100px" <el-form-item label-width="100px"
label="管理范围" label="管理范围"
prop="rangeList" prop="rangeList"
v-else> v-else>
<el-cascader ref="cascaderUnit" <el-cascader ref="cascaderUnit"
class="width-two" class="width-two"
v-model="formData.rangeList" v-model="formData.rangeList"
:options="optionsRange" :options="optionsRange"
@change="handleChangeRange" @change="handleChangeRange"
:props="rangeProps" :props="{ multiple: true,checkStrictly: true, emitPath: true, children: 'subAgencyList', label: 'agencyName', value: 'agencyId'}"
:disabled="formType==='detail'" :disabled="formType==='detail'"
clearable /> clearable />
@ -176,7 +176,7 @@ export default {
rangeProps: { rangeProps: {
multiple: true, multiple: true,
checkStrictly: true, checkStrictly: true,
// emitPath: true, emitPath: true,
children: 'subAgencyList', children: 'subAgencyList',
label: 'agencyName', label: 'agencyName',
value: 'agencyId' value: 'agencyId'
@ -212,12 +212,10 @@ export default {
methods: { methods: {
async initForm (type, row) { async initForm (type, row) {
this.formType = type; this.formType = type;
if (this.formType === 'add') { if (this.formType === 'add') {
} else { } else {
this.startLoading(); this.startLoading();
this.categorizedResiId = row.categorizedResiId this.categorizedResiId = row.categorizedResiId
await this.getDetail(); await this.getDetail();
if (this.formData.agencyId) { if (this.formData.agencyId) {
@ -225,11 +223,19 @@ export default {
} }
this.endLoading(); 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 () { async getDetail () {
const url = `/actual/base/resiCategorized/buildingUnitChief/detail/${this.categorizedResiId}`; const url = `/actual/base/resiCategorized/buildingUnitChief/detail/${this.categorizedResiId}`;
@ -272,7 +278,6 @@ export default {
handleChangeRange (val) { handleChangeRange (val) {
}, },
async getGridList () { async getGridList () {
const { user } = this.$store.state const { user } = this.$store.state
@ -318,13 +323,15 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} else { } else {
console.log(res.data);
this.optionsRange = res.data this.optionsRange = this.filterByLevel(res.data, ['quarter', 'building', 'unit']);
this.processOptions(this.optionsRange);
} }
}) })
.catch(() => { .catch((error) => {
this.dataListLoading = false this.dataListLoading = false;
return this.$message.error('网络错误') console.error("Error details:", error); //
return this.$message.error('网络错误');
}) })
this.dataListLoading = false this.dataListLoading = false
}, },
@ -389,6 +396,28 @@ export default {
resetData () { resetData () {
this.formData = {}; 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 () { startLoading () {
loading = Loading.service({ loading = Loading.service({

28
src/views/modules/communityParty/partyOrg/orgTree.vue

@ -41,8 +41,8 @@
:load="handleTreeNodeExpand" :load="handleTreeNodeExpand"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
ref="table" ref="table"
> :row-class-name="rowClassName"
>
<el-table-column <el-table-column
prop="partyOrgName" prop="partyOrgName"
label="党组织名称" label="党组织名称"
@ -197,7 +197,15 @@ export default {
} }
}); });
}, },
rowClassName(row, rowIndex) {
if (row.row.childrenQty == 0) {
return 'no-expand';
}
return '';
},
hasChildren(row){
console.log(row);
},
/** /**
* 点击"新增" * 点击"新增"
*/ */
@ -259,8 +267,14 @@ export default {
if (!data) { if (!data) {
return; return;
} }
this.partyOrgTree=[] this.partyOrgTree=[]
this.partyOrgTree.push(data); this.partyOrgTree.push(data);
data.children.forEach(item=>{
if(item.childrenQty != 0){
item.hasChildren = true
}
})
this.tableKey = new Date().getTime(); this.tableKey = new Date().getTime();
// 2 // 2
console.log(">>>>", this.partyOrgTree) console.log(">>>>", this.partyOrgTree)
@ -285,6 +299,11 @@ export default {
}) })
this.epmetResultResolver.success((data) => { this.epmetResultResolver.success((data) => {
data.forEach(item=>{
if(item.childrenQty != 0){
item.hasChildren = true
}
})
row.children = data; // row.children = data; //
resolve(row.children); // resolve(row.children); //
// this.partyOrgTree.push(data); // this.partyOrgTree.push(data);
@ -379,4 +398,7 @@ export default {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
} }
::v-deep .no-expand>:nth-child(1) .cell .el-table__expand-icon{
display: none;
}
</style> </style>

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

@ -1,8 +1,7 @@
<template> <template>
<div class='g-main dialog-h-content'> <div class='g-main dialog-h-content'>
<h3>{{agencyName}}{{period.substr(5,2)}}月份满意度调查</h3> <h3>{{ agencyName }}{{ period.substr(5, 2) }}月份满意度调查</h3>
<p>尊敬的居民朋友</p> <p>尊敬的居民朋友</p>
<p style="text-indent: 2em; ">为了更好地推进社区工作为您提供更全面优质的服务请您根据真实情况填写此表我们将认真对待您提出的问题并承诺对您提供的信息保密感谢您的配合</p> <p style="text-indent: 2em; ">为了更好地推进社区工作为您提供更全面优质的服务请您根据真实情况填写此表我们将认真对待您提出的问题并承诺对您提供的信息保密感谢您的配合</p>
<div class="card" v-for="(item, index) in formList" :key="index"> <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="good">基本满意</el-radio>
<el-radio class="f-bot16" v-model.trim="form[item.pkey]" disabled label="bad">不满意</el-radio> <el-radio class="f-bot16" v-model.trim="form[item.pkey]" disabled label="bad">不满意</el-radio>
</section> </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'"> <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 <el-radio class="f-bot16" v-model.trim="form[item.value]" :label="itemK.value" disabled>{{ itemK.label
>{{ itemK.label }}</el-radio> }}</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-input v-if="indexK == item.children.length - 1 && form[item.pkey] == 'bad'" disabled placeholder="请填写不满意原因"
v-model.trim="form[item.reason]"></el-input>
</section> </section>
</div> </div>
<p>8姓名{{form.reporterName}}</p> <p>8姓名{{ form.reporterName }}</p>
<p>9电话{{form.reporterMobile}}</p> <p>9电话{{ form.reporterMobile }}</p>
<p>10您是否接受回访</p> <p>10您是否接受回访</p>
<section class="f-hflex"> <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="-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="-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="0">接受回访/待回访</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="1">已回访</el-radio>
</section> </section>
<p v-if="form.followUpStatus === 0">11请选择合适您的回访方式</p> <p v-if="form.followUpStatus === 0">11请选择合适您的回访方式</p>
<section class="f-hflex" v-if="form.followUpStatus === 0"> <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="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="1">电话回访</el-radio>
<el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="2">上门回访</el-radio> <el-radio class="f-bot16" v-model="form.expectFollowUpWay" disabled label="2">上门回访</el-radio>
</section> </section>
<p >请填写您的家庭住址</p> <p>请填写您的家庭住址</p>
<el-input v-model="form.resideAddress" disabled></el-input> <el-input v-model="form.resideAddress" disabled></el-input>
<el-row type="flex" justify="end" class="f-top12"> <el-row type="flex" justify="end" class="f-top12">
<el-col :span="2"> <el-col :span="2">
<el-button @click="handleClose"> 取消</el-button> <el-button @click="handleClose"> 取消</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { requestGet } from "@/js/dai/request"; import { requestGet } from "@/js/dai/request";
export default { export default {
// //
data() { data() {
@ -61,14 +61,14 @@ export default {
formList: [], formList: [],
form: { form: {
// veryGood,good,bad // veryGood,good,bad
evaCulturalFacility:'', evaCulturalFacility: '',
evaSportsFacility:'', evaSportsFacility: '',
evaEcologicalEnv:'', evaEcologicalEnv: '',
evaSocialSecurity:'', evaSocialSecurity: '',
evaSocialAssistance:'', evaSocialAssistance: '',
evaOldPeopleProvide:'', evaOldPeopleProvide: '',
evaBasicEducation:'', evaBasicEducation: '',
evaMedical:'', evaMedical: '',
// cultureFacilityAsp 01 02 03 09 // cultureFacilityAsp 01 02 03 09
cultureFacilityAsp: '', cultureFacilityAsp: '',
@ -89,46 +89,52 @@ export default {
medicalReason: '', medicalReason: '',
// //
reporterName:'', reporterName: '',
reporterMobile:'', reporterMobile: '',
followUpStatus: null, followUpStatus: null,
expectFollowUpWay:'', expectFollowUpWay: '',
resideAddress:'', resideAddress: '',
}, },
agencyName:this.$store.state.user.agencyName, agencyName: this.$store.state.user.agencyName,
}; };
}, },
// //
async created() { async created() {
await this.getDicts() await this.getDicts()
await this.handleArr() await this.transformInitialArray()
await this.getInspResult() await this.getInspResult()
}, },
// //
methods: { methods: {
handleArr() { transformInitialArray() {
const transformArray = (initialArray) => { const resultMap = new Map();
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);
}
}
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() { async getDicts() {
try { try {
const requests = [ const requests = [
@ -150,17 +156,17 @@ export default {
console.log("获取字典失败: ", error); console.log("获取字典失败: ", error);
} }
}, },
async getInspResult(){ async getInspResult() {
const url = `/governance/satisfaction/communitySelfInsp/inspResult/detail/${this.inspResultId}` const url = `/governance/satisfaction/communitySelfInsp/inspResult/detail/${this.inspResultId}`
const {data,code,msg} = await requestGet(url) const { data, code, msg } = await requestGet(url)
if(code == 0){ if (code == 0) {
this.form = {...data.reporter,...data.satisfaction} this.form = { ...data.reporter, ...data.satisfaction }
console.log(this.form); console.log(this.form);
}else{ } else {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
handleClose(){ handleClose() {
this.$emit('handleClose') this.$emit('handleClose')
} }
}, },
@ -170,14 +176,14 @@ export default {
computed: {}, computed: {},
// //
watch: {}, watch: {},
props:{ props: {
inspResultId:{ inspResultId: {
type:String, type: String,
default:'' default: ''
}, },
period:{ period: {
type:String, type: String,
default:'' default: ''
} }
} }
} }
@ -205,4 +211,5 @@ h3 {
.f-font-color { .f-font-color {
color: #000; color: #000;
font-weight: 400; 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" :close-on-press-escape="false" title="社区自查" :modal-append-to-body="false" width="820px" top="5vh"
class="dialog-h" @closed="showFormList = false"> class="dialog-h" @closed="showFormList = false">
<form-list ref="ref_add_form" @handleClose="handleClose" :satisfactionCategoryStr="satisfactionCategoryStr" <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" <el-dialog width="920px" class="dialog-h" title="社区自查报告详情" :close-on-click-modal="false"
v-if="showFollowUpDetail" :visible.sync="showFollowUpDetail" append-to-body> v-if="showFollowUpDetail" :visible.sync="showFollowUpDetail" append-to-body>
<follow-Detail :period="formData.period" :inspResultId="inspResultId" @handleClose="showFollowUpDetail = false"></follow-Detail> <follow-Detail :period="formData.period" :inspResultId="inspResultId" @handleClose="showFollowUpDetail = false"></follow-Detail>
@ -99,8 +99,8 @@ export default {
formData: { formData: {
period: "",// period: "",//
inspRecordId: "",
}, },
inspRecordId: "",
multiSelection: [], // multiSelection: [], //
@ -329,7 +329,7 @@ export default {
this.option.xAxis.data = [] this.option.xAxis.data = []
this.tableData = data.categoryDatas || []; this.tableData = data.categoryDatas || [];
this.satisfactionCategory = [] this.satisfactionCategory = []
this.formData.inspRecordId = data.inspRecordId; this.inspRecordId = data.inspRecordId;
this.synthesisScore = data.synthesisScore; this.synthesisScore = data.synthesisScore;
this.personQty = data.personQty this.personQty = data.personQty
const allowedCategories = this.dicts.satisfaction_category.map(item => item.value) const allowedCategories = this.dicts.satisfaction_category.map(item => item.value)

Loading…
Cancel
Save