/**version-1.0*/
let tmixins = {};
tmixins = {
  props: ["dataId", "type", "parentTarget", 'option'],
  data() {
    return {
      oplogDTOs: [],
      m1Option: {},
      showDialog:false
    };
  },
  computed: {
    target: function () {
      return this.parentTarget || this;
    }
  },
  mounted() {

  },
  methods: {
    initData(option) {
      let data = option.param ? option.param() : {};
      this.target.$http({
        url: option.url,
        method: `post`,
        data: {
          ...data,
          searchCount: false
        },
        isLoading: true,
        modalStrictly: true,
        success: res => {
          let rows = res.objx ? (res.objx.records || res.objx || []) : [];
          this.oplogDTOs = rows;
        }
      });
    },
  }
};
export const mixins = tmixins
