cloud-web-corejs 1.0.54-dev.116 → 1.0.54-dev.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,20 @@
7
7
  {{ dataId ? $t1('查看数据表定义模板') : $t1('新增数据表定义模板') }}
8
8
  </div>
9
9
  <div class="fr">
10
+ <el-button type="primary" plain class="button-sty" icon="el-icon-set-up" @click="openDtDialog"
11
+ v-if="isDev && !dataId && menuKindAuth.editAuth===1 && !readonly">
12
+ {{ $t1('引用数据库中数据表结构') }}
13
+ </el-button>
14
+ <el-button type="primary" plain class="button-sty" icon="el-icon-set-up" @click="openTmDialog"
15
+ v-if="isDev && !dataId && menuKindAuth.editAuth===1 && !readonly">
16
+ {{ $t1('引用数据表定义的结构') }}
17
+ </el-button>
18
+
19
+ <el-button type="success" class="button-sty" icon="el-icon-check"
20
+ @click="createModifyTable()"
21
+ v-if="!szTaMb.systems && szTaMb.id && menuKindAuth.editAuth===1 && !readonly">
22
+ {{ $t1('创建/更新数据表') }}
23
+ </el-button>
10
24
  <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
11
25
  {{ $t1('重置') }}
12
26
  </el-button>
@@ -14,11 +28,6 @@
14
28
  v-if="isDev && !szTaMb.systems && menuKindAuth.editAuth===1 && !readonly">
15
29
  {{ $t1('保存') }}
16
30
  </el-button>
17
-
18
- <el-button type="success" class="button-sty" icon="el-icon-check"
19
- @click="createModifyTable()" v-if="!szTaMb.systems && szTaMb.id && menuKindAuth.editAuth===1 && !readonly">
20
- {{ $t1('创建/更新数据表') }}
21
- </el-button>
22
31
  </div>
23
32
  </div>
24
33
  <baseTabs>
@@ -33,7 +42,7 @@
33
42
  </th>
34
43
  <td colspan="3">
35
44
  <el-form-item prop="taEn" :rules="[{ required: true, trigger: ['blur', 'change'] }]">
36
- <el-input type="text" autocomplete="off" v-model="szTaMb.taEn" clearable/>
45
+ <el-input type="text" autocomplete="off" v-model="szTaMb.taEn" clearable :disabled="szTaMb.fromTable"/>
37
46
  </el-form-item>
38
47
  </td>
39
48
  <th><em class="f-red">*</em>{{ $t1('数据库表名') }}</th>
@@ -217,7 +226,7 @@
217
226
  </template>
218
227
  </template>
219
228
  <template #zdEn="{row, rowIndex}">
220
- <template v-if="!!row.systems || !!row.relationZd">
229
+ <template v-if="!!row.systems || !!row.relationZd || row.fromTable">
221
230
  <div :style="!!row.relationZd ? 'margin-left:20px' : ''">{{ row.zdEn }}</div>
222
231
  </template>
223
232
  <template v-else>
@@ -293,9 +302,9 @@
293
302
  @confirm="confirmInsertSzTaMb"
294
303
  :multi="false"
295
304
  />
296
- <itemSzTaMbDialog v-if="showItemSzTaMbDialog"
297
- :visiable.sync="showItemSzTaMbDialog"
298
- @confirm="confirmInsertItemSzTaMb" multi="false"/>
305
+ <szTaMbDialog v-if="showItemSzTaMbDialog"
306
+ :visiable.sync="showItemSzTaMbDialog"
307
+ @confirm="confirmInsertItemSzTaMb" multi="false"/>
299
308
  <MenuKindDialog v-if="showMenuKindDialog"
300
309
  :visiable.sync="showMenuKindDialog"
301
310
  @confirm="confirmInsertMenuKind"
@@ -425,14 +434,53 @@
425
434
  />
426
435
  <preformDialog v-if="showPreformDialog" :visiable.sync="showPreformDialog"
427
436
  @confirm="confirmPreformDialog"></preformDialog>
437
+
438
+ <szTaMbDialog v-if="showTmDialog"
439
+ :visiable.sync="showTmDialog"
440
+ @confirm="confirmTmDialog"
441
+ :multi="false"
442
+ />
443
+
444
+ <el-dialog
445
+ :title="$t1('引用数据库中数据表结构')"
446
+ :append-to-body="true"
447
+ :modal-append-to-body="true"
448
+ :close-on-click-modal="false"
449
+ v-if="showDtDialog"
450
+ :visible.sync="showDtDialog"
451
+ :modal="false"
452
+ custom-class="dialog-style list-dialog dialog-checkbox pd_8"
453
+ width="350px"
454
+ v-el-drag-dialog
455
+ >
456
+ <div class="cont">
457
+ <el-form ref="editCategoryForm" label-width="102px" class="adSearchForm" style="height: auto; width: auto;">
458
+ <el-form-item :label="$t1('数据表')">
459
+ <el-input v-model="dbTable" clearable class="all-width"/>
460
+ </el-form-item>
461
+ </el-form>
462
+ </div>
463
+ <span slot="footer" class="dialog-footer">
464
+ <el-button type="primary" plain class="button-sty" @click="showDtDialog=false">
465
+ <i class="el-icon-close el-icon"></i>
466
+ {{ $t2('取 消', 'system.button.cancel2') }}
467
+ </el-button>
468
+ <el-button type="primary" @click="confirmDtDialog" class="button-sty">
469
+ <i class="el-icon-check el-icon"></i>
470
+ {{ $t1('确定') }}
471
+ </el-button>
472
+ </span>
473
+ </el-dialog>
428
474
  </div>
429
475
  </template>
430
476
 
431
477
  <script>
432
478
  import mixin from "./mixins/edit";
479
+ import viewDialog from "@/layout/components/extractedCode/viewDialog.vue";
433
480
 
434
481
  export default {
435
482
  name: 'szTaMbEdit',
483
+ components: {viewDialog},
436
484
  mixins: [mixin]
437
485
  }
438
486
  </script>
@@ -2,7 +2,6 @@ import formOplogTable from "@base/components/formOplog/index.vue";
2
2
  import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
3
3
  import projectTagView from "@base/components/projectTag/view.vue";
4
4
  import szTaMbDialog from "@base/views/bd/setting/table_model/dialog.vue";
5
- import itemSzTaMbDialog from "@base/views/bd/setting/table_model/dialog.vue";
6
5
  import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
7
6
  import zdDialog from "@base/views/bd/setting/table_model/zdDialog.vue";
8
7
  import {getBdFlag} from "@base/api/user";
@@ -21,7 +20,6 @@ modules = {
21
20
  preformDialog,
22
21
  projectTagView,
23
22
  szTaMbDialog,
24
- itemSzTaMbDialog,
25
23
  MenuKindDialog,
26
24
  zdDialog
27
25
  },
@@ -39,7 +37,10 @@ modules = {
39
37
  serviceName: null,
40
38
  taRule: 0,
41
39
  dataRange: 0,
42
- szTaMbTagDTOs: []
40
+ szTaMbTagDTOs: [],
41
+ fromTable: false,
42
+ taCh: null,
43
+ sszstEn:null
43
44
  },
44
45
  treeDefaultZds: [],
45
46
  productOption: {},
@@ -66,7 +67,11 @@ modules = {
66
67
  showPreformDialog: false,
67
68
  menuKindAuth: {
68
69
  editAuth: 0
69
- }
70
+ },
71
+
72
+ dbTable: null,
73
+ showDtDialog: false,
74
+ showTmDialog: false
70
75
  };
71
76
  },
72
77
  created() {
@@ -443,7 +448,13 @@ modules = {
443
448
  // }
444
449
  // this.customer.szTaZdMbDTOs.push({tacitly: tacitly});
445
450
  let newIndex = this.getNewIndex();
446
- this.szTaMb.szTaZdMbDTOs.push({zdType: 'Text', enabled: true, orders: newIndex, generateCode: false});
451
+ this.szTaMb.szTaZdMbDTOs.push({
452
+ zdType: 'Text',
453
+ enabled: true,
454
+ orders: newIndex,
455
+ generateCode: false,
456
+ fromTable: false
457
+ });
447
458
  },
448
459
  deleteItem(row, rowIndex) {
449
460
  let referenceZd = row.referenceZd;
@@ -787,6 +798,109 @@ modules = {
787
798
  }
788
799
  });
789
800
  }
801
+ },
802
+ openDtDialog() {
803
+ //引用数据库中数据表结构
804
+ this.dbTable = null;
805
+ this.showDtDialog = true;
806
+ },
807
+ confirmDtDialog() {
808
+ if (!this.dbTable) {
809
+ this.$baseAlert("数据表不能为空");
810
+ return
811
+ }
812
+ this.$http({
813
+ // aes: true,
814
+ url: "/" + this.szTaMb.serviceName + `/dbTable/getSzTaZdMbs`,
815
+ method: `post`,
816
+ data: {
817
+ stringOne: this.dbTable
818
+ },
819
+ isLoading: true,
820
+ success: res => {
821
+ let items = res.objx || [];
822
+ /*let szTaZdMbDTOs = items.map(item => {
823
+ return {
824
+ ...item,
825
+ createBy: null,
826
+ createDate: null,
827
+ fromTable: true,
828
+ id: null,
829
+ modifyBy: null,
830
+ modifyDate: null
831
+ }
832
+ })
833
+ let newRow = {
834
+ ...row,
835
+ createBy: null,
836
+ createDate: null,
837
+ fromTable: true,
838
+ id: null,
839
+ modifyBy: null,
840
+ modifyDate: null,
841
+ sid: null
842
+ }
843
+ Object.keys(newRow).forEach(key => {
844
+ if (key.endsWith('DTOs')) {
845
+ delete newRow[key]
846
+ }
847
+ })
848
+ Object.assign(this.szTaMb, newRow);
849
+ this.szTaMb.szTaZdMbDTOs = szTaZdMbDTOs;*/
850
+ }
851
+ });
852
+ },
853
+ openTmDialog() {
854
+ //引用数据表定义的结构
855
+ this.showTmDialog = true;
856
+ },
857
+ confirmTmDialog(rows) {
858
+ if (rows.length) {
859
+ let row = rows[0];
860
+ this.$http({
861
+ aes: true,
862
+ url: USER_PREFIX + `/szTaMb/getSzTaZdMbs`,
863
+ method: `post`,
864
+ data: {
865
+ id: row.id
866
+ },
867
+ isLoading: true,
868
+ modalStrictly: true,
869
+ success: res => {
870
+ let items = res.objx || [];
871
+ let szTaZdMbDTOs = items.filter(item => !item.systems).map(item => {
872
+ return {
873
+ ...item,
874
+ createBy: null,
875
+ createDate: null,
876
+ fromTable: true,
877
+ id: null,
878
+ modifyBy: null,
879
+ modifyDate: null
880
+ }
881
+ })
882
+ let newRow = {
883
+ ...row,
884
+ createBy: null,
885
+ createDate: null,
886
+ fromTable: true,
887
+ id: null,
888
+ modifyBy: null,
889
+ modifyDate: null,
890
+ sid: null,
891
+ taBm: null,
892
+ taCode: null
893
+ }
894
+ Object.keys(newRow).forEach(key => {
895
+ if (key.endsWith('DTOs')) {
896
+ delete newRow[key]
897
+ }
898
+ })
899
+ Object.assign(this.szTaMb, newRow);
900
+ this.szTaMb.szTaZdMbDTOs = szTaZdMbDTOs;
901
+ }
902
+ });
903
+ }
790
904
  }
791
905
  }
792
906
  };