From 14007923361b32cf5a06a355d7eef5e4a61322c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Tue, 1 Aug 2023 10:35:23 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=AF=AD=E8=A8=80=E8=BD=AC=E4=B9=89?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Code/Fe/src/components/umyTable/index.vue | 5 ++-- Code/Fe/src/lang/en.js | 30 ++++++++++++++++++++++- Code/Fe/src/lang/zh.js | 14 ++++++++++- Code/Fe/src/utils/defaultButtons.js | 18 +++++++------- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/Code/Fe/src/components/umyTable/index.vue b/Code/Fe/src/components/umyTable/index.vue index 9390c20..2e7b74d 100644 --- a/Code/Fe/src/components/umyTable/index.vue +++ b/Code/Fe/src/components/umyTable/index.vue @@ -4,7 +4,6 @@ :id="_uid" :key="isUpdate" v-loading="tableLoading" - element-loading-text="拼命加载中..." @sort-change="sortChange" @selection-change="handleSelectionChange" ref="multipleTable" @@ -29,7 +28,7 @@ :header-align="'center'" > + + \ No newline at end of file From a76029bcbde025c0dc12fb9b953aa6310fd0254e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 4 Aug 2023 13:43:21 +0800 Subject: [PATCH 07/11] =?UTF-8?q?addEditFromApi=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/addEditFromApiPop/index.vue | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/Code/Fe/src/components/addEditFromApiPop/index.vue b/Code/Fe/src/components/addEditFromApiPop/index.vue index a23a87a..566b887 100644 --- a/Code/Fe/src/components/addEditFromApiPop/index.vue +++ b/Code/Fe/src/components/addEditFromApiPop/index.vue @@ -13,7 +13,7 @@ >
-
+
{{formTitle}} 【主表信息】
@@ -98,16 +98,14 @@
-
+
{{formTitle}} 【子表信息】
- @@ -214,7 +212,11 @@ export default { initFormItems(){ let _dtoList_type = this.handleType == 'add' ? 'C' : 'U' let _dtoList = this.currentDtos[_dtoList_type].dtoList - this.formItemData = JSON.parse(JSON.stringify(_dtoList)) + // 除去子表信息 + let _formItems = _dtoList.filter(item=>{ + return item.prop.toUpperCase() != 'DETAILS' + }) + if(_formItems)this.formItemData = _formItems // 编辑格式:特殊处理默认值 if(this.handleType == 'edit' && this.editRowData){ this.formData = JSON.parse(JSON.stringify(this.editRowData)) @@ -222,7 +224,7 @@ export default { this.formData = {} } // 子表数据 - let _list = this.formItemData.filter(item=>{ + let _list = _dtoList.filter(item=>{ return item.prop.toUpperCase() == 'DETAILS' }) if(_list && _list.length > 0){ @@ -233,9 +235,11 @@ export default { } } // 子表数据列 - let _detailApi = this.URLOption_detailList.slice(0,this.URLOption_detailList.lastIndexOf('/')) - let _detailDtos = this.$store.getters.dtoColumnTypes[_detailApi].S.dtoList - this.flexTableColumns = _detailDtos + if(this.URLOption_detailList){ + let _detailApi = this.URLOption_detailList.slice(0,this.URLOption_detailList.lastIndexOf('/')) + let _detailDtos = this.$store.getters.dtoColumnTypes[_detailApi].S.dtoList + this.flexTableColumns = _detailDtos + } // 表单验证格式化 this.formRules={} @@ -359,19 +363,25 @@ export default { .centerInnerContent{ height: calc(100% - 60px); overflow: auto; - display: flex; .leftMainForm{ - width: 50%; - flex-shrink: 0; height: calc(100% - 60px); } - .rightDetailTable{ - height: calc(100% - 60px); - width: calc(50%); - padding-left:40px; - border-left: #ddd solid 1px; + &.hasDetails{ + display: flex; + + .leftMainForm{ + width: 50%; + flex-shrink: 0; + } + + .rightDetailTable{ + height: calc(100% - 60px); + width: calc(50%); + padding-left:40px; + border-left: #ddd solid 1px; + } } } \ No newline at end of file From 8d3768b78d6001953ad88017ae4fd4ec460f392e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 4 Aug 2023 16:07:06 +0800 Subject: [PATCH 08/11] =?UTF-8?q?showCopyJsonPop=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/showCopyJsonPop/index.vue | 267 +++++++ .../umyTable/{index copy.vue => _index.vue} | 668 ++++++++---------- Code/Fe/src/components/umyTable/index.vue | 223 +----- 3 files changed, 600 insertions(+), 558 deletions(-) create mode 100644 Code/Fe/src/components/showCopyJsonPop/index.vue rename Code/Fe/src/components/umyTable/{index copy.vue => _index.vue} (59%) diff --git a/Code/Fe/src/components/showCopyJsonPop/index.vue b/Code/Fe/src/components/showCopyJsonPop/index.vue new file mode 100644 index 0000000..ebb2c6a --- /dev/null +++ b/Code/Fe/src/components/showCopyJsonPop/index.vue @@ -0,0 +1,267 @@ + + \ No newline at end of file diff --git a/Code/Fe/src/components/umyTable/index copy.vue b/Code/Fe/src/components/umyTable/_index.vue similarity index 59% rename from Code/Fe/src/components/umyTable/index copy.vue rename to Code/Fe/src/components/umyTable/_index.vue index bd21a40..4e0ded2 100644 --- a/Code/Fe/src/components/umyTable/index copy.vue +++ b/Code/Fe/src/components/umyTable/_index.vue @@ -1,10 +1,9 @@ \ No newline at end of file + + \ No newline at end of file diff --git a/Code/Fe/src/components/umyTable/index.vue b/Code/Fe/src/components/umyTable/index.vue index 5df6312..5c494de 100644 --- a/Code/Fe/src/components/umyTable/index.vue +++ b/Code/Fe/src/components/umyTable/index.vue @@ -175,7 +175,7 @@ { - this.$refs.copyDetailInput_ref.focus() - document.getElementById('copyDetailInput_dialog_ref').scrollTop = 0 + if(this.$refs.copyDetailInput_ref){ + this.$refs.copyDetailInput_ref.focus() + this.$refs.copyDetailInput_ref.$refs.textarea.scrollTop = 0 + } }) }, closeJsonPop(){ @@ -765,4 +768,10 @@ span { .itemSpan{ white-space: nowrap !important } +::v-deep .copyDetailInput{ + textarea{ + max-height: calc(100vh - 220px) !important; + overflow: auto !important; + } +} \ No newline at end of file From b7e5f84b47a52ccc633be90f384ab5dace216c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 4 Aug 2023 17:08:11 +0800 Subject: [PATCH 10/11] css --- Code/Fe/src/components/showCopyJsonPop/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/Fe/src/components/showCopyJsonPop/index.vue b/Code/Fe/src/components/showCopyJsonPop/index.vue index 1377929..23e142f 100644 --- a/Code/Fe/src/components/showCopyJsonPop/index.vue +++ b/Code/Fe/src/components/showCopyJsonPop/index.vue @@ -112,6 +112,7 @@ Date: Mon, 7 Aug 2023 10:22:37 +0800 Subject: [PATCH 11/11] =?UTF-8?q?showCopyJsonPop=E8=A7=A3=E5=86=B3id?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Code/Fe/src/components/showCopyJsonPop/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/Fe/src/components/showCopyJsonPop/index.vue b/Code/Fe/src/components/showCopyJsonPop/index.vue index 23e142f..383c270 100644 --- a/Code/Fe/src/components/showCopyJsonPop/index.vue +++ b/Code/Fe/src/components/showCopyJsonPop/index.vue @@ -123,10 +123,12 @@ :close-on-press-escape="true" :title="detailTableRow.name+' 详情'" > +