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 }) => {