From e96196bd170c2163f438ee825dea8bafb9c6b9e5 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 15 Aug 2022 15:51:44 +0800 Subject: [PATCH] bug --- src/views/modules/worklog/icworklog-add-or-update.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/modules/worklog/icworklog-add-or-update.vue b/src/views/modules/worklog/icworklog-add-or-update.vue index be6427e3f..bacf3a21e 100644 --- a/src/views/modules/worklog/icworklog-add-or-update.vue +++ b/src/views/modules/worklog/icworklog-add-or-update.vue @@ -167,8 +167,8 @@ export default { ...res.data } - const grid = this.optionsG.filter(item => item.value === res.data.gridId) - if (grid.length < 1) { + const grid = this.optionsG.filter(item => item.gridId === res.data.gridId) + if (grid.length < 1 && res.data.gridId !== '') { this.gridState = false this.optionsG.push({gridName:res.data.gridName, gridId:res.data.gridId, disabled: true}) } else { @@ -201,7 +201,6 @@ export default { } }, getGridList() { - this.optionsG = [] this.$http .post('/gov/mine/agency/getmygrids') .then(({ data: res }) => {