index.vue 1.49 KB
<template>
  <dee-add-model-case-dialog
    :model-list="modelList"
    :show-sub-type="false"
    :width="width"
    :title="title"
    :show-dialog="showDialog"
    :default-data="defaultData"
    :version-control="false"
    :default-open-props="defaultOpenProps"
    search-attr="dxContextId,state"
    @close="$emit('close')"
    @selection="(rows) => {$emit('selection',rows);$emit('close')}"
  />
</template>

<script>
export default {
  name: 'ChangeSource',
  props: {
    showDialog: {
      type: Boolean,
      default: false
    },
    width: { // 弹出框 宽度
      type: String,
      default: () => '1100px'
    },
    title: { // 弹出框 标题
      type: String,
      default: () => '添加对象'
    }
  },
  data() {
    return {
      modelList: [{
        label: '超差',
        value: 'DxDeviation'
      },
      {
        label: '偏离',
        value: 'DxWaver'
      },
      {
        label: '问题报告',
        value: 'DxProblemReport'
      }],
      defaultData: {
        modelName: 'DxProblemReport'
      },
      defaultOpenProps: [
        'reportedAgainsts.target.dxContext', 'prReferenceLinks.target.dxContext',
        'prReferenceLinks.target.dxView', 'reportedAgainsts.target.dxView'
      ]
    }
  },
  computed: {},
  watch: {},
  // 生命周期 - 创建完成(访问当前this实例)
  created() {},
  // 生命周期 - 挂载完成(访问DOM元素)
  mounted() {},
  methods: {}
}
</script>
<style lang="scss">
/* @import url(); 引入css类 */

</style>