diff --git a/src/views/CVERecord/CveJsonView.vue b/src/views/CVERecord/CveJsonView.vue index 38a2735c..5cadb87b 100644 --- a/src/views/CVERecord/CveJsonView.vue +++ b/src/views/CVERecord/CveJsonView.vue @@ -23,11 +23,17 @@ export default ({ }, methods: { getJSon() { - debugger - if (_.isEmpty(this.$store.state.recordData) && _.isEmpty(this.$store.state.idData)) this.$router.push('/'); - if (!_.isUndefined(this.$store.state.isArecord) && !_.isEmpty(this.$store.state.recordData)) { + console.log('1, ', _.isEmpty(this.$store.state.recordData), _.isEmpty(this.$store.state.idData)); + console.log('2, ', _.isUndefined(this.$store.state.isArecord), !_.isUndefined(this.$store.state.isArecord)); + console.log('3, ', _.isEmpty(this.$store.state.recordData), !_.isEmpty(this.$store.state.recordData)); + console.log('4, ', _.isEmpty(this.$store.state.idData), !_.isEmpty(this.$store.state.idData)); + + if (_.isUndefined(this.$store.state.isArecord) || (_.isEmpty(this.$store.state.recordData) && _.isEmpty(this.$store.state.idData))) { + this.$router.push('/'); + } + if (this.$store.state.isArecord && !_.isEmpty(this.$store.state.recordData)) { this.record = this.$store.state.recordData; - } else if (!!_.isUndefined(this.$store.state.isArecord) && !_.isEmpty(this.$store.state.idData)) { + } else if (!this.$store.state.isArecord && !_.isEmpty(this.$store.state.idData)) { this.record = this.$store.state.idData; } else { this.$router.push('/');