<template>
  <div style="background:white">
    <search :importData="importData" :editData="editData" :noveltySearch='noveltySearch' :projectId="projectId" :isEdit="isEdit" :innerProjectId1="innerProjectId" :defaultSearchDB="defaultSearchDB"></search>
  </div>
</template>

<script>
import search from './search.vue';
export default {
  components: {
    search
  },
  props: {},
  data() {
    return {
      editData:null
    };
  },
  watch: {},
  computed: {
    importData() {
      var data = this.$route.query.importData
      if(data){
        data = JSON.parse(data)
      }else{
        data = {}
      }
      return data
    },
    isEdit(){
      return this.$route.query.isEdit=='true'?true:false
    },
    noveltySearch(){
      return this.$route.query.noveltySearch=='true'?true:false
    },
    projectId(){
      return this.$route.query.projectId
    },
    innerProjectId(){
      return this.$route.query.innerProjectId
    },
    defaultSearchDB(){
      var a = this.$route.query.defaultSearchDB
      return a?JSON.parse(a):undefined
    }
  },
  created() {
    if(this.isEdit){
      var params = this.$s.getSession('conditionImport')
      if(!params){
        return
      }
      if(params.importData){
        this.importData = params.importData
      }
      if(params.data){
        this.editData = params.data
      }
    }else{
      this.$s.setSession('conditionImport',null)
    }
  },
  mounted() {
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
</style>