diff --git a/src/pages/phone/components/standardSystemPopup.vue b/src/pages/phone/components/standardSystemPopup.vue index 2f7c8f733..c0c7252fd 100644 --- a/src/pages/phone/components/standardSystemPopup.vue +++ b/src/pages/phone/components/standardSystemPopup.vue @@ -55,10 +55,14 @@ export default { required: true } }, - activated () { - this.getData() - }, methods: { + initOpen () { + this.checkedKeys = [] + this.textStatusName = '全部' + this.getData() + this.$refs.standardSystemTreeRef.setCheckedKeys([]) + this.popupShow = true + }, open () { this.getData() this.$refs.standardSystemTreeRef.setCheckedKeys(this.initKeys) diff --git a/src/pages/phone/domesticStand/index.vue b/src/pages/phone/domesticStand/index.vue index a095e698f..7020af7aa 100644 --- a/src/pages/phone/domesticStand/index.vue +++ b/src/pages/phone/domesticStand/index.vue @@ -108,18 +108,20 @@ export default { standardSystemPopup, }, data () { + const searchQuery = { + selectIndex: 'stand', + selectValue: '', + standSystem: [], + textStatus: '全部', + selectType: 'titleSearch', + standType: 'INLAND', + page: 1, + pageSize: 20 + } return { titleName: '', - searchQuery: { - selectIndex: 'stand', - selectValue: '', - standSystem: [], - textStatus: '全部', - selectType: 'titleSearch', - standType: 'INLAND', - page: 1, - pageSize: 20 - }, + searchQuery, + initSearQuery: { ...searchQuery }, total: 0, loading: false, list: [], @@ -149,8 +151,8 @@ export default { vm.titleName = '国内外政策库' break } - vm.searchQuery.page = 1 - vm.$refs.standardSystemPopupRef.popupShow = true + vm.searchQuery = { ...vm.initSearQuery } + vm.$refs.standardSystemPopupRef.initOpen() vm.$refs.scroll.scrollTo(0, 0) vm.getData() } @@ -240,10 +242,12 @@ export default { }, getDicTypeListCode () { this.$http._getData('sys/dictype/getDicTypeListCode').then(res => { - this.dict = {...res.data} - this.setMap(this.dict.WBZTCLASS, 'textStatusMap') - this.setMap(this.dict.lawsTextState, 'lawsMap') - this.setMap(this.dict.SARPROPERTY, 'natureMap') + if (res.ok) { + this.dict = {...res.data} + this.setMap(this.dict.WBZTCLASS, 'textStatusMap') + this.setMap(this.dict.lawsTextState, 'lawsMap') + this.setMap(this.dict.SARPROPERTY, 'natureMap') + } }) }, setMap(data, key) {