Blame view

src/views/ywbl/ywsq/slectBdc.vue 1.41 KB
任超 committed
1
<template>
任超 committed
2 3 4
  <dialogBox title="查询权利信息" width="85%" :isButton="false" :isMain="true" @closeDialog="closeDialog" v-model="myValue">
    <component :is="editItem" @closeDialog="closeDialog" :isJump="isJump" @updateDialog="updateDialog" :djywbm="djywbm"
      :key="key" />
任超 committed
5 6 7
  </dialogBox>
</template>
<script>
任超 committed
8
import { queueDjywmc } from './slectBdcdata.js'
任超 committed
9 10
export default {
  props: {
任超 committed
11
    isJump: { type: Boolean, default: false },
任超 committed
12 13
    value: { type: Boolean, default: true },
    djywbm: { type: String, default: '' }
任超 committed
14 15 16
  },
  data () {
    return {
任超 committed
17
      key: 0,
任超 committed
18
      editItem: '',
任超 committed
19
      myValue: this.value,
任超 committed
20 21
    }
  },
任超 committed
22 23 24
  watch: {
    value (val) {
      this.myValue = val
任超 committed
25
      this.key++
任超 committed
26 27 28 29
      if (this.$route.query.sqywbm) {
        let dd = queueDjywmc(this.$route.query.sqywbm)
        this.editItem = this.loadView(dd)
      }
任超 committed
30
    },
任超 committed
31
    'djywbm' (val) {
任超 committed
32 33 34
      let dd = queueDjywmc(val)
      this.editItem = this.loadView(dd)
    }
任超 committed
35 36 37
  },
  methods: {
    loadView (view) {
38
      return r => require.ensure([], () => r(require(`./components/${view}.vue`)))
任超 committed
39 40
    },
    closeDialog () {
任超 committed
41
      this.$emit("input", false)
任超 committed
42 43 44
    },
    updateDialog () {
      this.$emit("input", false)
任超 committed
45
      this.$emit("updateDialog", true)
任超 committed
46
    }
任超 committed
47
  }
任超 committed
48
}
任超 committed
49 50 51 52
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
任超 committed
53

任超 committed
54 55 56 57 58
/deep/.submit_button {
  text-align: center;
  padding: 10px;
  margin: 10px;
}
任超 committed
59
</style>