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. 26
      src/views/modules/communityParty/partyOrg/orgTree.vue
  3. 51
      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>{{ 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,10 +223,18 @@ 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
},
@ -388,6 +395,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 () {

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

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

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

@ -1,6 +1,5 @@
<template>
<div class='g-main dialog-h-content'>
<h3>{{ agencyName }}{{ period.substr(5, 2) }}月份满意度调查</h3>
<p>尊敬的居民朋友</p>
@ -12,11 +11,12 @@
<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>
@ -101,31 +101,37 @@ export default {
//
async created() {
await this.getDicts()
await this.handleArr()
await this.transformInitialArray()
await this.getInspResult()
},
//
methods: {
handleArr() {
const transformArray = (initialArray) => {
transformInitialArray() {
const resultMap = new Map();
for (const item of initialArray) {
const baseValue = item.value.slice(0, -2);
//
this.dicts.satisfaction_ns_aspect.forEach(item => {
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);
}
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` //
});
}
});
return [...resultMap.values()].filter(item => item.children.length > 0);
};
//
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 = transformArray(this.dicts.satisfaction_ns_aspect);
this.formList = [...resultMap.values()];
console.log(this.formList);
},
@ -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