Browse Source

服务方过滤,bugs

feature
mk 2 years ago
parent
commit
a5dbe915e9
  1. 3
      src/views/modules/communityParty/regionalParty/activitysForm.vue
  2. 3
      src/views/modules/communityParty/regionalParty/unitsForm.vue
  3. 2
      src/views/modules/communityService/fuwuzhaoren/addForm.vue
  4. 2
      src/views/modules/communityService/gangweizhaoren/addForm.vue
  5. 95
      src/views/modules/communityService/gxxq/addForm.vue
  6. 1
      src/views/modules/communityService/gxxq/index.vue
  7. 2
      src/views/modules/communityService/jinengzhaoren/addForm.vue
  8. 29
      src/views/modules/communityService/policy/addPolicy.vue
  9. 2
      src/views/modules/communityService/wennuanzhaoren/addForm.vue
  10. 1
      src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue

3
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -28,8 +28,9 @@
<el-cascader <el-cascader
v-model="formData.serviceMatterList" v-model="formData.serviceMatterList"
:options="demandOptions" :options="demandOptions"
:props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList'}" :props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList',multiple:true,emitPath:false}"
clearable clearable
collapse-tags
size="small" size="small"
class="u-item-width-normal" class="u-item-width-normal"
></el-cascader> ></el-cascader>

3
src/views/modules/communityParty/regionalParty/unitsForm.vue

@ -69,8 +69,9 @@
<el-cascader <el-cascader
v-model="formData.serviceMatterList" v-model="formData.serviceMatterList"
:options="demandOptions" :options="demandOptions"
:props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList'}" :props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList',multiple:true,emitPath:false}"
clearable clearable
collapse-tags
size="small" size="small"
class="u-item-width-normal" class="u-item-width-normal"
></el-cascader> ></el-cascader>

2
src/views/modules/communityService/fuwuzhaoren/addForm.vue

@ -585,7 +585,7 @@ export default {
this.demandOptions = this.getFlagData( this.demandOptions = this.getFlagData(
this.getTreeData(res.data), this.getTreeData(res.data),
"usableFlag" "usableFlag"
); ).filter((item) => item.categoryCode == '1038' ||item.categoryCode == '1039'||item.categoryCode == '1041');
} }
}) })
.catch(() => { .catch(() => {

2
src/views/modules/communityService/gangweizhaoren/addForm.vue

@ -575,7 +575,7 @@ export default {
this.demandOptions = this.getFlagData( this.demandOptions = this.getFlagData(
this.getTreeData(res.data), this.getTreeData(res.data),
"usableFlag" "usableFlag"
); ).filter((item) => item.categoryCode == '1044');
} }
}) })
.catch(() => { .catch(() => {

95
src/views/modules/communityService/gxxq/addForm.vue

@ -12,7 +12,6 @@
class="div_form" class="div_form"
> >
<!-- 需求类别 --> <!-- 需求类别 -->
<el-form-item label="需求类型" prop="categoryCode" label-width="150px"> <el-form-item label="需求类型" prop="categoryCode" label-width="150px">
<el-cascader <el-cascader
v-model="formData.categoryCode" v-model="formData.categoryCode"
@ -20,7 +19,7 @@
:props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList'}" :props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList'}"
clearable clearable
size="small" size="small"
ref="categoryCode" ref="myCategoryCode"
class="u-item-width-normal" class="u-item-width-normal"
@change="handelChangeCategoryCode" @change="handelChangeCategoryCode"
></el-cascader> ></el-cascader>
@ -364,6 +363,15 @@ export default {
policyList: [], policyList: [],
showLabelForm: false, showLabelForm: false,
codeFilters: {
'1038': ['party_unit', 'community_org'],
'1039': ['party_unit', 'community_org'],
'1040': ['party_unit', 'community_org'],
'1041': ['party_unit', 'community_org', 'publicWelfare'],
'1042': ['party_unit', 'community_org', 'publicWelfare'],
'1043': ['party_unit', 'community_org', 'publicWelfare'],
'1044': ['party_unit', 'community_org'],
},
}; };
}, },
@ -386,7 +394,6 @@ export default {
created() {}, created() {},
async mounted() { async mounted() {
this.startLoading(); this.startLoading();
// this.getCategrayList();
await this.getPolicyList(); await this.getPolicyList();
await this.loadScopeTree(); await this.loadScopeTree();
await this.getDictOptions(); await this.getDictOptions();
@ -396,17 +403,17 @@ export default {
}, },
methods: { methods: {
async initForm(type, row) { initForm(type, row) {
this.formType = type; this.formType = type;
this.scopeId = row.id; this.scopeId = row.id;
await this.getDetail(row.id); this.$nextTick(()=>{
this.getDetail(row.id);
})
}, },
async getDetail(id) { async getDetail(id) {
const url = `/governance/commonDemand/detail/${id}`; const url = `/governance/commonDemand/detail/${id}`;
const { data, code, msg } = await requestGet(url); const { data, code, msg } = await requestGet(url);
if (code === 0) { if (code === 0) {
this.formData.serviceTypeLevel1Id = data.servicePid;
this.formData.commonServiceTypeId = data.commonServiceTypeId; this.formData.commonServiceTypeId = data.commonServiceTypeId;
this.formData.title = data.title; this.formData.title = data.title;
this.formData.content = data.content; this.formData.content = data.content;
@ -417,6 +424,7 @@ export default {
} else { } else {
this.formData.categoryCode = [data.parentCategoryCode]; this.formData.categoryCode = [data.parentCategoryCode];
} }
if (data.assignInfo) { if (data.assignInfo) {
this.newFormData.serviceTimeStart = data.assignInfo.serviceTimeStart; this.newFormData.serviceTimeStart = data.assignInfo.serviceTimeStart;
this.newFormData.serviceTimeEnd = data.assignInfo.serviceTimeEnd; this.newFormData.serviceTimeEnd = data.assignInfo.serviceTimeEnd;
@ -486,21 +494,16 @@ export default {
this.formData.resiSearchTagName = ""; this.formData.resiSearchTagName = "";
}, },
handelChangeCategoryCode() { handelChangeCategoryCode() {
this.serviceOptions = [...this.originalServiceOptions]; this.serviceOptions = [...this.originalServiceOptions];
const parentMappings = { const codeFilters = this.codeFilters;
'公益事业类': ['party_unit', 'community_org'], console.log(this.serviceOptions);
'技能培训类': ['party_unit', 'publicWelfare', 'community_org'], const checkedCode = this.$refs['myCategoryCode'].getCheckedNodes()[0].parent.value;
'教育讲座类': ['party_unit', 'community_org'], console.log(checkedCode);
'社会治理类': ['party_unit', 'community_org'], if (codeFilters[checkedCode] && Array.isArray(codeFilters[checkedCode])) {
'公共服务类': ['party_unit', 'community_org', 'publicWelfare'], this.serviceOptions = this.serviceOptions.filter(item => codeFilters[checkedCode].includes(item.value));
'岗位提供类': ['party_unit', 'community_org'], } else {
}; this.serviceOptions = this.originalServiceOptions;
const checkedParent = this.$refs['categoryCode'].getCheckedNodes()[0].parent.label; }
if (parentMappings[checkedParent] && Array.isArray(parentMappings[checkedParent])) {
this.serviceOptions = this.serviceOptions.filter(item => parentMappings[checkedParent].includes(item.value));
} else {
this.serviceOptions = this.originalServiceOptions
}
}, },
async iniDefaultData() { async iniDefaultData() {
const { defaultData } = this; const { defaultData } = this;
@ -535,22 +538,37 @@ export default {
} }
}, },
async getDictOptions() { async getDictOptions() {
this.$http this.$http
.post("/sys/dict/data/dictlist", { .post("/sys/dict/data/dictlist", {
dictType: "user_demand_service_type", dictType: "user_demand_service_type",
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
this.serviceOptions = res.data; this.originalServiceOptions = [...res.data];
this.originalServiceOptions = [...this.serviceOptions]; console.log(this.originalServiceOptions);
} if (this.formType == 'edit') {
}) this.$nextTick(() => {
.catch(() => { const code = this.$refs['myCategoryCode'].checkedValue[0];
return this.$message.error("网络错误"); const filterOptions = (filterCodes) => {
}); this.serviceOptions = res.data.filter(item => filterCodes.includes(item.value));
}, };
if (code && this.codeFilters[code]) {
filterOptions(this.codeFilters[code]);
}
});
}else{
this.serviceOptions = res.data;
}
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
async getDemandOptions() { async getDemandOptions() {
this.$http this.$http
.post("/actual/base/serviceitem/listAllCategory") .post("/actual/base/serviceitem/listAllCategory")
@ -810,6 +828,7 @@ export default {
} }
}, },
}, },
computed:{}
}; };
</script> </script>

1
src/views/modules/communityService/gxxq/index.vue

@ -253,6 +253,7 @@ import { mapGetters } from "vuex";
import addForm from "./addForm.vue"; import addForm from "./addForm.vue";
import detailForm from "./detailForm.vue"; import detailForm from "./detailForm.vue";
import axios from "axios"; import axios from "axios";
import nextTick from "dai-js/tools/nextTick";
export default { export default {
data() { data() {
let endDisabledDate = (time) => { let endDisabledDate = (time) => {

2
src/views/modules/communityService/jinengzhaoren/addForm.vue

@ -574,7 +574,7 @@ export default {
this.demandOptions = this.getFlagData( this.demandOptions = this.getFlagData(
this.getTreeData(res.data), this.getTreeData(res.data),
"usableFlag" "usableFlag"
); ).filter((item) => item.categoryCode == '1043');
} }
}) })
.catch(() => { .catch(() => {

29
src/views/modules/communityService/policy/addPolicy.vue

@ -12,12 +12,14 @@
<!-- 政策类型 --> <!-- 政策类型 -->
<el-form-item label="需求类型" prop="categoryCode" label-width="150px"> <el-form-item label="需求类型" prop="categoryCode" label-width="150px">
<el-cascader <el-cascader
ref="categoryCode"
v-model="formData.categoryCode" v-model="formData.categoryCode"
:options="demandOptions" :options="demandOptions"
:props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList'}" :props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList'}"
clearable clearable
size="small" size="small"
class="u-item-width-normal" class="u-item-width-normal"
@change="handelChangeCategoryCode"
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -416,6 +418,9 @@ export default {
newArr: [], newArr: [],
sarr: [], sarr: [],
casOptions: [], casOptions: [],
serviceOptions:[],
originalServiceOptions:[]
}; };
}, },
@ -520,6 +525,25 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
handelChangeCategoryCode() {
this.serviceOptions = [...this.originalServiceOptions];
const parentMappings = {
'公益事业类': ['party_unit', 'community_org'],
'技能培训类': ['party_unit', 'community_org', 'publicWelfare'],
'教育讲座类': ['party_unit', 'community_org'],
'社会治理类': ['party_unit', 'community_org'],
'公共服务类': ['party_unit', 'community_org', 'publicWelfare'],
'设施维护类': ['party_unit', 'community_org', 'publicWelfare'],
'岗位提供类': ['party_unit', 'community_org'],
};
const checkedParent = this.$refs['categoryCode'].getCheckedNodes()[0].parent.label;
if (parentMappings[checkedParent] && Array.isArray(parentMappings[checkedParent])) {
this.serviceOptions = this.serviceOptions.filter(item => parentMappings[checkedParent].includes(item.value));
} else {
this.serviceOptions = this.originalServiceOptions
}
console.log(this.serviceOptions);
},
// //
handleClickLabel() { handleClickLabel() {
this.showLabelForm = true; this.showLabelForm = true;
@ -593,7 +617,9 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
this.serviceOptions = res.data.filter(item=>item.value == 'party_unit'||item.value == 'community_org'||item.value == 'publicWelfare'); this.serviceOptions = res.data;
this.originalServiceOptions = [...this.serviceOptions];
} }
}) })
.catch(() => { .catch(() => {
@ -601,7 +627,6 @@ export default {
}); });
}, },
getDictOptions() { getDictOptions() {
//
this.$http this.$http
.post("/sys/dict/data/dictlist", { .post("/sys/dict/data/dictlist", {
dictType: "policy_level", dictType: "policy_level",

2
src/views/modules/communityService/wennuanzhaoren/addForm.vue

@ -785,7 +785,7 @@ export default {
this.demandOptions = this.getFlagData( this.demandOptions = this.getFlagData(
this.getTreeData(res.data), this.getTreeData(res.data),
"usableFlag" "usableFlag"
); ).filter((item) => item.categoryCode == '1040');
} }
}) })
.catch(() => { .catch(() => {

1
src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue

@ -93,6 +93,7 @@
:options="demandOptions" :options="demandOptions"
:props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList',multiple:true,emitPath:false}" :props="{label: 'categoryName',value: 'categoryCode',children: 'childCateList',multiple:true,emitPath:false}"
clearable clearable
collspse-tags
size="small" size="small"
class="u-item-width-normal" class="u-item-width-normal"
></el-cascader> ></el-cascader>

Loading…
Cancel
Save