|
|
|
@ -179,7 +179,6 @@ |
|
|
|
:options="casOptions" |
|
|
|
:props="optionProps" |
|
|
|
:show-all-levels="false" |
|
|
|
@change="handleChangeScope" |
|
|
|
></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
@ -361,6 +360,10 @@ export default { |
|
|
|
resiSearchTagId: [ |
|
|
|
{ required: true, message: "符合条件人员不能为空", trigger: "bulr" }, |
|
|
|
], |
|
|
|
content: [ |
|
|
|
{ required: true, message: "详细说明不能为空", trigger: "bulr" }, |
|
|
|
{ max: 1000, message: "不能超出1000个字符" , trigger: 'blur'}, |
|
|
|
], |
|
|
|
}, |
|
|
|
newDataRule: { |
|
|
|
serverOrgId: [ |
|
|
|
@ -538,7 +541,6 @@ export default { |
|
|
|
if (scopeIdArray) { |
|
|
|
this.scopeIdArray = scopeIdArray; |
|
|
|
await nextTick(); |
|
|
|
this.handleChangeScope(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -616,25 +618,6 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeScope(value) { |
|
|
|
// this.newFormData.serviceScopeList = []; |
|
|
|
// let selArray = this.$refs["myCascader"].getCheckedNodes(); |
|
|
|
// console.log("handleChangeScope", selArray); |
|
|
|
// selArray.forEach((element) => { |
|
|
|
// let obj = { |
|
|
|
// objectType: |
|
|
|
// element.data.objectType === "grid" |
|
|
|
// ? "grid" |
|
|
|
// : element.data.objectType === "neighborhood" |
|
|
|
// ? "neighborhood" |
|
|
|
// : "agency", |
|
|
|
// objectId: element.data.objectId, |
|
|
|
// objectName: element.data.objectName, |
|
|
|
// }; |
|
|
|
// this.newFormData.serviceScopeList.push(obj); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
|
|
|
|
async handleComfirm() { |
|
|
|
this.handleAdd(); |
|
|
|
}, |
|
|
|
@ -690,13 +673,13 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async addFuwu() { |
|
|
|
// 指派服务绑定0或1 |
|
|
|
// 指派服务绑定0或1 |
|
|
|
if (this.formData.assignFlag) { |
|
|
|
this.formData.assignFlag = 1; |
|
|
|
} else { |
|
|
|
this.formData.assignFlag = 0; |
|
|
|
} |
|
|
|
// 通知服务方方式,如果都没有选中传数组字符串'0' |
|
|
|
// 通知服务方方式,如果都没有选中传数组字符串'0' |
|
|
|
if (this.newFormData.noticeApproches.length == 0) { |
|
|
|
this.newFormData.noticeApproches.push(0); |
|
|
|
} |
|
|
|
@ -718,13 +701,14 @@ export default { |
|
|
|
objectName: this.newArr[i].objectName, |
|
|
|
}); |
|
|
|
} |
|
|
|
// 如果是编辑的话回填的数据会有需要将不是对象属性的过滤掉 |
|
|
|
// 如果是编辑的话回填的数据会有数组字符串需要将不是对象属性的过滤掉 |
|
|
|
let arr = []; |
|
|
|
this.newFormData.serviceScopeList.forEach((item) => { |
|
|
|
if (typeof item != "string") { |
|
|
|
arr.push(item); |
|
|
|
} |
|
|
|
}; |
|
|
|
}); |
|
|
|
//只有网格社区楼栋才可以,其他不行 |
|
|
|
this.newFormData.serviceScopeList = arr; |
|
|
|
var url = ""; |
|
|
|
var params = {}; |
|
|
|
@ -758,7 +742,7 @@ export default { |
|
|
|
this.$message.success("添加成功"); |
|
|
|
this.resetData(); |
|
|
|
this.$emit("handleComfirm"); |
|
|
|
} else { |
|
|
|
} else if(code>=8000){ |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -772,11 +756,21 @@ export default { |
|
|
|
this.formData = { |
|
|
|
serviceTypeLevel1Id: "", // 公共服务(政策级别)一级分类id |
|
|
|
commonServiceTypeId: "", // 公共服务(政策级别)二级分类id |
|
|
|
assignFlag: false, |
|
|
|
resiSearchTagId: "", //查找享受服务人员 |
|
|
|
resiSearchTagName: "", //享受服务人员名称 |
|
|
|
title: "", //服务名称 |
|
|
|
assignInfo: {}, |
|
|
|
content: "", // |
|
|
|
}; |
|
|
|
this.newFormData = { |
|
|
|
noticeApproches: [], |
|
|
|
serviceScopeList: [], // |
|
|
|
serviceTimeStart: "", //服务起始时间yyyy-MM-dd |
|
|
|
serviceTimeEnd: "", //服务截止时间yyyy-MM-dd |
|
|
|
content: "", // |
|
|
|
}; |
|
|
|
serverOrgType: "", //服务组织类型 社区自组织:community_org, 志愿者:ic_user_volunteer, 联建单位:party_unit |
|
|
|
serverOrgId: "", //服务组织Id |
|
|
|
} |
|
|
|
}, |
|
|
|
// 开启加载动画 |
|
|
|
startLoading() { |
|
|
|
|