index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div style="background:white">
  3. <search :importData="importData" :editData="editData" :noveltySearch='noveltySearch'></search>
  4. </div>
  5. </template>
  6. <script>
  7. import search from './search.vue';
  8. export default {
  9. components: {
  10. search
  11. },
  12. props: {},
  13. data() {
  14. return {
  15. importData:this.$route.query,
  16. editData:null
  17. };
  18. },
  19. watch: {},
  20. computed: {
  21. // importData() {
  22. // return this.$route.query
  23. // },
  24. isEdit(){
  25. return this.$route.query.isEdit
  26. },
  27. noveltySearch(){
  28. return this.$route.query.noveltySearch
  29. },
  30. },
  31. created() {
  32. if(this.isEdit){
  33. var params = this.$s.getSession('conditionImport')
  34. if(!params){
  35. return
  36. }
  37. if(params.importData){
  38. this.importData = params.importData
  39. }
  40. if(params.data){
  41. this.editData = params.data
  42. }
  43. }else{
  44. this.$s.setSession('conditionImport',null)
  45. }
  46. },
  47. mounted() {
  48. },
  49. methods: {},
  50. };
  51. </script>
  52. <style lang="scss" scoped>
  53. </style>