From 208548501db7256ab364f904196f614c4f1a0b40 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期一, 29 四月 2024 11:51:14 +0800 Subject: [PATCH] 添加action --- Source/ProjectWeb/src/components/dynamic-components/index.vue | 82 ++++++++++++++++++++++++++++++++++++---- 1 files changed, 73 insertions(+), 9 deletions(-) diff --git a/Source/ProjectWeb/src/components/dynamic-components/index.vue b/Source/ProjectWeb/src/components/dynamic-components/index.vue index c027072..5f62cb1 100644 --- a/Source/ProjectWeb/src/components/dynamic-components/index.vue +++ b/Source/ProjectWeb/src/components/dynamic-components/index.vue @@ -1,37 +1,65 @@ <template> - <dynamic-table v-if="componentVO.uiComponentType=='table'" + <dynamic-table v-if="componentVO.uiComponentType=='table' || componentVO.uiComponentType=='TreeTable'" + :uiBtmType="uiBtmType" + :uiContext="uiContext" :key="areasName+'table-'+componentVO.oid" :inDialog="inDialog" + :canEdit="canEdit" :componentVO="componentVO" :sourceData="sourceData" + :sourceBtmType="sourceBtmType" + :dataStore="dataStore" :areasName="areasName" - :paramVOS="paramVOS"> + :paramVOS="paramVOS" + @setDataStore="setDataStore" + :isShow="isShow"> </dynamic-table> <dynamic-form v-else-if="componentVO.uiComponentType=='form'" + :uiBtmType="uiBtmType" + :uiContext="uiContext" :key="areasName+'form-'+componentVO.oid" :inDialog="inDialog" + :canEdit="canEdit" :componentVO="componentVO" :sourceData="sourceData" + :sourceBtmType="sourceBtmType" + :dataStore="dataStore" :areasName="areasName" - :paramVOS="paramVOS"> + :paramVOS="paramVOS" + @setDataStore="setDataStore" + :isShow="isShow"> </dynamic-form> <dynamic-tree v-else-if="componentVO.uiComponentType=='tree'" + :uiBtmType="uiBtmType" + :uiContext="uiContext" :key="areasName+'tree-'+componentVO.oid" :inDialog="inDialog" + :canEdit="canEdit" :componentVO="componentVO" :sourceData="sourceData" + :sourceBtmType="sourceBtmType" + :dataStore="dataStore" :areasName="areasName" - :paramVOS="paramVOS"> - + :paramVOS="paramVOS" + @setDataStore="setDataStore" + :isShow="isShow"> </dynamic-tree> - <dynamic-custom v-else-if="componentVO.uiComponentType=='custom'" :inDialog="inDialog" + <dynamic-custom v-else-if="componentVO.uiComponentType=='customer'" + :uiBtmType="uiBtmType" + :uiContext="uiContext" + :inDialog="inDialog" + :canEdit="canEdit" :key="areasName+'custom-'+componentVO.oid" :componentVO="componentVO" :sourceData="sourceData" + :sourceBtmType="sourceBtmType" + :dataStore="dataStore" :areasName="areasName" - :paramVOS="paramVOS"> + :paramVOS="paramVOS" + @setDataStore="setDataStore" + :isShow="isShow"> </dynamic-custom> </template> @@ -41,10 +69,19 @@ import dynamicForm from "@/components/dynamic-components/dynamic-form" import dynamicTree from "@/components/dynamic-components/dynamic-tree" import dynamicCustom from "@/components/dynamic-components/dynamic-custom" +import dynamicTreeTable from "@/components/dynamic-components/dynamic-TreeTable" export default { name: "dynamicIndex", - components:{dynamicCustom, dynamicTree, dynamicForm, dynamicTable}, + components:{dynamicCustom, dynamicTree, dynamicForm, dynamicTable,dynamicTreeTable }, props:{ + //ui涓婁笅鏂囩殑涓氬姟绫诲瀷锛堟垨閾炬帴绫诲瀷锛� + uiBtmType: { + type: String + }, + //ui涓婁笅鏂� + uiContext:{ + type: String + }, componentVO:{ type:Object, default: {} @@ -52,6 +89,11 @@ inDialog: { type: Boolean, default: false + }, + canEdit:{ + //鍐呭鏄惁鍙紪杈� + type:Boolean, + default:false }, areasName:{ type:String, @@ -62,11 +104,33 @@ type:Object, default: {} }, + //涓婁竴鍖哄煙涓氬姟绫诲瀷 + sourceBtmType:{ + type: String + }, + dataStore:{ + //寮圭獥鏃舵寜閽墍灞炲尯鍩熼�変腑鏁版嵁 + type:Array, + default: [] + }, paramVOS:{ type:Object, default: {} - } + }, + isShow: { + //鎵�鍦ㄥ尯鍩熸槸鍚﹀凡鏄剧ず锛岄拡瀵箃ab鍜宑ollapse + type: Boolean, + default: true + }, }, + created() { + }, + methods:{ + setDataStore(value) { + this.$emit("setDataStore", value); + this.dataStore = value.dataStore; + } + } } </script> -- Gitblit v1.9.3