网格员
@@ -75,6 +75,13 @@ export default {
if(this.fromType == 'edit') {
this.form = res.data
}
+ if(this.fromType == 'add') {
+ this.form.parentGirdId = this.detailInfo.id
+ this.form.parentGirdName = this.detailInfo.girdName
+ this.form.girdLevel = Number(this.detailInfo.girdLevel)+1
+ this.form.girdType = Number(this.detailInfo.girdType)+1
+ this.form.isLastLevel = this.form.girdLevel == 2 ? '1' : '0'
+ }
}
})
},
@@ -93,14 +100,8 @@ export default {
if(!this.form.girdName){
return this.$u.toast('请输入网格名称')
}
- if(this.fromType == 'add') {
- this.form.parentGirdId = this.detailInfo.id
- this.form.parentGirdName = this.detailInfo.girdName
- this.form.girdLevel = Number(this.detailInfo.girdLevel)+1
- this.form.girdType = Number(this.detailInfo.girdType)+1
- this.form.isLastLevel = this.form.girdLevel == 2 ? '1' : '0'
- }
- this.$http.post(`/app/appgirdinfo/addOrUpdate`, this.form).then((res) => {
+
+ this.$http.post(`/app/appgirdinfo/addOrUpdateByEw`, this.form).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('update')
diff --git a/src/apps/AppGridManagement/Organization.vue b/src/apps/AppGridManagement/Organization.vue
index f67fd214..6bf48c19 100644
--- a/src/apps/AppGridManagement/Organization.vue
+++ b/src/apps/AppGridManagement/Organization.vue
@@ -6,7 +6,7 @@
{{userGird.girdName}}