diff --git a/src/js/result_data_resolve.js b/src/js/result_data_resolve.js new file mode 100644 index 000000000..679482d08 --- /dev/null +++ b/src/js/result_data_resolve.js @@ -0,0 +1,26 @@ +/** + * 解析epmet后台返回结果,并且执行传入的逻辑 + * @param success_processor 正常返回执行的函数,代表要对data做何种操作 + * @param fail_processor 异常返回执行的函数,代表要对data做何种操作 + * @param result 后台返回的结果json对象 + */ +const processResult = (success_processor, fail_processor, result) => { + const { data, code, msg } = result + if (code !== 0) { + // 表明后台返回错误 + if (code < 8000) { + this.$message.error('服务器开小差了...') + } else { + this.$message.error(msg) + } + fail_processor() + return + } + + if (success_processor) { + // 后台没有返回错误,正常执行 + success_processor(data) + } +} + +export const processEpmetResult = processResult diff --git a/src/views/modules/communityService/fuwuzhaoren/detailForm.vue b/src/views/modules/communityService/fuwuzhaoren/detailForm.vue index 6d8e0f97c..8ad5861e5 100644 --- a/src/views/modules/communityService/fuwuzhaoren/detailForm.vue +++ b/src/views/modules/communityService/fuwuzhaoren/detailForm.vue @@ -176,7 +176,6 @@ }, components: { fileList }, async mounted() { - await this.getPolicyList(); // if (this.serviceRecordId) {//详情 await this.loadInfo(); this.initLoading = true; @@ -225,19 +224,6 @@ this.showPersonList = false; }, - async getPolicyList() { - const url = "/governance/policy/policyList"; - - let params = {}; - - const { data, code, msg } = await requestPost(url, params); - - if (code === 0) { - this.policyList = data; - } else { - this.$message.error(msg); - } - }, //加载组织 async loadInfo() { const url = "/governance/icServiceRecordV2/detail"; @@ -252,7 +238,6 @@ this.formData = { ...data }; this.formData.serviceRecordId = this.serviceRecordId; this.feedbackFormData = { ...data.feedback }; - this.formData.policyName = ""; this.formData.gridIdListName = ""; this.feedbackFormData.serviceStatusShow = ""; this.feedbackFormData.satisfactionShow = ""; @@ -272,11 +257,6 @@ this.feedbackFormData.satisfactionShow = element.label; } }); - this.policyList.forEach((element) => { - if (this.formData.policyId === element.policyId) { - this.formData.policyName = element.title; - } - }); this.fileList = []; if ( diff --git a/src/views/modules/communityService/fuwuzhaoren/index.vue b/src/views/modules/communityService/fuwuzhaoren/index.vue index 855087eea..ecae1af8a 100644 --- a/src/views/modules/communityService/fuwuzhaoren/index.vue +++ b/src/views/modules/communityService/fuwuzhaoren/index.vue @@ -187,13 +187,13 @@ align="center" width="50" /> - - + + + {{ scope.row.servedPersonQty }} + + - + @@ -382,13 +384,14 @@ import { mapGetters } from "vuex"; // import eventInfo from "./cpts/event-info"; import axios from "axios"; import addForm from "./addForm"; -import detailForm from "./detailForm"; +import detailForm from "./detailForm.vue"; import editForm from "./editForm"; import feedBackForm from "./addForm"; -// import personList from "../policy/oldPersonList.vue"; +import personList from "./personList"; // 其他组件其他页面有调用 export default { - components: { addForm, detailForm, feedBackForm, editForm }, + components: { addForm, detailForm, feedBackForm, editForm, personList }, + data () { let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 @@ -479,7 +482,8 @@ export default { serviceOptions: [], serviceOptiondList: [], - policyId: '', + commonServiceId: null, + tagId: null, showPersonList: false, ruleList: [], @@ -513,6 +517,7 @@ export default { this.getTableData(); }, methods: { + // 服务类型下拉框选中事件 handleChangeServiceTypeLevel1() { this.formData.serviceTypeLevel2Id = '' @@ -599,12 +604,11 @@ export default { return this.$message.error("网络错误"); }); }, - //加载组织数据 + //加载人员列表数据 async handlePersonList (row) { - - this.policyId = row.policyId - await this.loadRuleList() - this.formType = 'personList' + this.commonServiceId = row.serviceRecordId; + this.tagId = row.resiSearchTagId; + this.showPersonList = true; }, diff --git a/src/views/modules/communityService/fuwuzhaoren/personList.vue b/src/views/modules/communityService/fuwuzhaoren/personList.vue new file mode 100644 index 000000000..397824de2 --- /dev/null +++ b/src/views/modules/communityService/fuwuzhaoren/personList.vue @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标记享受服务人员 + 查询 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +