田源
2024-03-18 3b5faa420d89c2ee7f3973c043ea997e4885e0ec
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -16,10 +16,10 @@
               :key="item.oid" :icon="item.paramVOS.icon"
               :type="item.paramVOS.buttonType || 'primary'" plain
               size="small"
               @click="buttonClick(item)">
               @click="buttonClick(item,scope)">
      {{ item.name }}
    </el-button>
    <dynamic-form :title="formName" :visible.sync="visible"></dynamic-form>
<!--    <dynamic-form :title="formName" :visible.sync="visible"></dynamic-form>-->
  </div>
</template>
@@ -36,6 +36,9 @@
    LocationType: {
      type: String,
    },
    scope:{
      type:Object,
    }
  },
  data() {
    return {
@@ -81,7 +84,7 @@
            initvalue: "reviewtype=department",
            location: 'top',
            buttonType: 'primary',
            buttonMethods: 'form'
            buttonMethods: 'add'
          },
          pkComponent: "D99AD59E-563F-AB7A-F307-794B929114CD",
          pkParentOid: "",
@@ -125,7 +128,7 @@
            location: 'menu',
            buttonType: 'text',
            icon: "el-icon-edit",
            buttonMethods: 'form'
            buttonMethods: 'edit'
          },
          pkComponent: "D99AD59E-563F-AB7A-F307-794B929114CD",
          pkParentOid: "",
@@ -240,14 +243,7 @@
  },
  methods: {
    buttonClick(item) {
      this.$emit('buttonClick', item.id)
      this.formName = item.name;
      if (item.paramVOS.buttonMethods === 'form') {
        this.visible = true;
      }else if(item.paramVOS.buttonMethods === 'delete'){
        this.$message.success('删除成功!')
      }
      this.$emit('buttonClick',this.scope,item)
    }
  }
}