let modules = {};
modules = {
  name: "preformDialog",
  props:['formScript'],
  data() {
    return {
      showDialog: true,
      formData: {
        logContent: null,
        transactions:1
      },
      showTransactions:false
    }
  },
  created(){
    let formScript = this.$baseLodash.cloneDeep(this.formScript)
    this.showTransactions = !formScript.transactions
    this.formData.transactions = formScript.transactions
  },
  methods: {
    closeDialog() {
      this.$emit("update:visiable", false);
      this.showDialog = false;
    },
    confirmDialog() {
      this.$refs.editForm.$baseValidate(valid => {
        if (valid) {
          this.closeDialog();
          this.$emit("confirm", this.formData);
        }
      });

    }
  }
}
export default modules
