diff --git a/src/assets/scss/modules/management/list-main.scss b/src/assets/scss/modules/management/list-main.scss index dd8a7f865..490652011 100644 --- a/src/assets/scss/modules/management/list-main.scss +++ b/src/assets/scss/modules/management/list-main.scss @@ -106,7 +106,12 @@ } } - +.div-flex{ + .m-page{ + display: flex; + justify-content: space-between; + } +} // 弹性盒子 .f-flex { diff --git a/src/views/modules/communityService/gxxq/addForm.vue b/src/views/modules/communityService/gxxq/addForm.vue index 1d73c6c5e..9ef5544c1 100644 --- a/src/views/modules/communityService/gxxq/addForm.vue +++ b/src/views/modules/communityService/gxxq/addForm.vue @@ -444,6 +444,7 @@ export default { this.formData.content = data.content; this.formData.assignFlag = data.assignFlag this.formData.resiSearchTagId = data.resiSearchTagId; + if( data.assignInfo){ this.newFormData.serviceTimeStart = data.assignInfo.serviceTimeStart; this.newFormData.serviceTimeEnd = data.assignInfo.serviceTimeEnd; this.newFormData.serverOrgType = data.assignInfo.serverOrgType; @@ -455,8 +456,9 @@ export default { data.assignInfo.serviceScopeList[i].objectId ); } - await this.handleChangeServiceTypeLevel1(); await this.getServiceuserList(data.assignInfo.serverOrgType); + } + await this.handleChangeServiceTypeLevel1(); await // this.formData = { ...data }; await this.getTagName(); @@ -696,33 +698,47 @@ export default { objectName: this.newArr[i].objectName, }); } + this.newArr = [] // 如果是编辑的话回填的数据会有数组字符串需要将不是对象属性的过滤掉 let arr = []; + let isOk = false; this.newFormData.serviceScopeList.forEach((item) => { if (typeof item != "string") { arr.push(item); } }); - // 选中的数据中有不是网格或者社区或者楼栋的就停止它 - let isOk = false; - arr.findIndex((item) => { - if ( - item.objectType == "neighborhood" || - item.objectType == "agency" || - item.objectType == "grid" - ) { - isOk = true; - } else { - return (isOk = false); - } - }); - console.log(isOk); - if (!isOk && this.formData.assignFlag) { - this.newArr = []; - this.$message.error("请选择正确的网格,社区,楼栋!"); - return; - } - this.newFormData.serviceScopeList = arr; + // 选中的数据中有不是网格或者小区或者楼栋的就停止它 + + // arr.forEach((item) => { + // if ( + // item.objectType == "neighborhood" || + // item.objectType == "agency" || + // item.objectType == "grid" + // ) { + // isOk = true; + // } else { + // isOk = false + // this.newArr = []; + // this.newFormData.serviceScopeList = [] + // arr = [] + // this.$message.error("请选择正确的网格,社区,楼栋!"); + // } + // }); + for(let i in arr){ + if(arr[i].objectType == "neighborhood" || + arr[i].objectType == "agency" || + arr[i].objectType == "grid"){ + isOk = true; + }else{ + isOk = false; + console.log( this.newArr,'没有清空?'); + this.$message.error("请选择正确的网格,社区,楼栋!"); + return + } + } + console.log( this.newArr); + this.newFormData.serviceScopeList = arr; + if (!isOk && this.formData.assignFlag) return var url = ""; var params = {}; if (this.formType == "edit") { diff --git a/src/views/modules/communityService/gxxq/index.vue b/src/views/modules/communityService/gxxq/index.vue index 49799d130..681ab04c3 100644 --- a/src/views/modules/communityService/gxxq/index.vue +++ b/src/views/modules/communityService/gxxq/index.vue @@ -204,7 +204,9 @@