cloud-web-corejs 1.0.54-dev.116 → 1.0.54-dev.118
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.
- package/package.json +1 -1
- package/src/layout/components/Sidebar/default.vue +2 -2
- package/src/views/bd/setting/form_script/mixins/list.js +176 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +345 -14
- package/src/views/bd/setting/form_template/mixins/list.js +522 -1
- package/src/views/bd/setting/table_model/edit.vue +56 -10
- package/src/views/bd/setting/table_model/mixins/edit.js +113 -5
- package/src/views/bd/setting/table_model/mixins/list.js +332 -1
@@ -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 />
|
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
|
-
<
|
297
|
-
|
298
|
-
|
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,6 +434,43 @@
|
|
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
|
|
@@ -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,12 @@ 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,
|
44
|
+
taEn: null,
|
45
|
+
taBm: null
|
43
46
|
},
|
44
47
|
treeDefaultZds: [],
|
45
48
|
productOption: {},
|
@@ -66,7 +69,11 @@ modules = {
|
|
66
69
|
showPreformDialog: false,
|
67
70
|
menuKindAuth: {
|
68
71
|
editAuth: 0
|
69
|
-
}
|
72
|
+
},
|
73
|
+
|
74
|
+
dbTable: null,
|
75
|
+
showDtDialog: false,
|
76
|
+
showTmDialog: false
|
70
77
|
};
|
71
78
|
},
|
72
79
|
created() {
|
@@ -443,7 +450,13 @@ modules = {
|
|
443
450
|
// }
|
444
451
|
// this.customer.szTaZdMbDTOs.push({tacitly: tacitly});
|
445
452
|
let newIndex = this.getNewIndex();
|
446
|
-
this.szTaMb.szTaZdMbDTOs.push({
|
453
|
+
this.szTaMb.szTaZdMbDTOs.push({
|
454
|
+
zdType: 'Text',
|
455
|
+
enabled: true,
|
456
|
+
orders: newIndex,
|
457
|
+
generateCode: false,
|
458
|
+
fromTable: false
|
459
|
+
});
|
447
460
|
},
|
448
461
|
deleteItem(row, rowIndex) {
|
449
462
|
let referenceZd = row.referenceZd;
|
@@ -787,6 +800,101 @@ modules = {
|
|
787
800
|
}
|
788
801
|
});
|
789
802
|
}
|
803
|
+
},
|
804
|
+
openDtDialog() {
|
805
|
+
//引用数据库中数据表结构
|
806
|
+
this.dbTable = null;
|
807
|
+
this.showDtDialog = true;
|
808
|
+
},
|
809
|
+
confirmDtDialog() {
|
810
|
+
let dbTable = this.dbTable;
|
811
|
+
if (!dbTable) {
|
812
|
+
this.$baseAlert(this.$t1("数据表不能为空"));
|
813
|
+
return
|
814
|
+
}
|
815
|
+
this.showDtDialog = false;
|
816
|
+
this.$http({
|
817
|
+
// aes: true,
|
818
|
+
url: "/" + this.szTaMb.serviceName + `/dbTable/getSzTaZdMbs`,
|
819
|
+
method: `post`,
|
820
|
+
data: {
|
821
|
+
stringOne: dbTable
|
822
|
+
},
|
823
|
+
isLoading: true,
|
824
|
+
success: res => {
|
825
|
+
let items = res.objx || [];
|
826
|
+
if (!items.length) {
|
827
|
+
this.$baseAlert(this.$t1("数据表[{dbTable}]不存在", {dbTable}));
|
828
|
+
return
|
829
|
+
}
|
830
|
+
let szTaZdMbDTOs = items.filter(item => !item.systems).map(item => {
|
831
|
+
return {
|
832
|
+
...item,
|
833
|
+
createBy: null,
|
834
|
+
createDate: null,
|
835
|
+
fromTable: true,
|
836
|
+
id: null,
|
837
|
+
modifyBy: null,
|
838
|
+
modifyDate: null
|
839
|
+
}
|
840
|
+
})
|
841
|
+
this.szTaMb.taEn = dbTable;
|
842
|
+
this.szTaMb.taBm = dbTable;
|
843
|
+
this.szTaMb.szTaZdMbDTOs = szTaZdMbDTOs;
|
844
|
+
}
|
845
|
+
});
|
846
|
+
},
|
847
|
+
openTmDialog() {
|
848
|
+
//引用数据表定义的结构
|
849
|
+
this.showTmDialog = true;
|
850
|
+
},
|
851
|
+
confirmTmDialog(rows) {
|
852
|
+
if (rows.length) {
|
853
|
+
let row = rows[0];
|
854
|
+
this.$http({
|
855
|
+
aes: true,
|
856
|
+
url: USER_PREFIX + `/szTaMb/getSzTaZdMbs`,
|
857
|
+
method: `post`,
|
858
|
+
data: {
|
859
|
+
id: row.id
|
860
|
+
},
|
861
|
+
isLoading: true,
|
862
|
+
modalStrictly: true,
|
863
|
+
success: res => {
|
864
|
+
let items = res.objx || [];
|
865
|
+
let szTaZdMbDTOs = items.filter(item => !item.systems).map(item => {
|
866
|
+
return {
|
867
|
+
...item,
|
868
|
+
createBy: null,
|
869
|
+
createDate: null,
|
870
|
+
fromTable: true,
|
871
|
+
id: null,
|
872
|
+
modifyBy: null,
|
873
|
+
modifyDate: null
|
874
|
+
}
|
875
|
+
})
|
876
|
+
let newRow = {
|
877
|
+
...row,
|
878
|
+
createBy: null,
|
879
|
+
createDate: null,
|
880
|
+
fromTable: true,
|
881
|
+
id: null,
|
882
|
+
modifyBy: null,
|
883
|
+
modifyDate: null,
|
884
|
+
sid: null,
|
885
|
+
// taBm: null,
|
886
|
+
taCode: null
|
887
|
+
}
|
888
|
+
Object.keys(newRow).forEach(key => {
|
889
|
+
if (key.endsWith('DTOs')) {
|
890
|
+
delete newRow[key]
|
891
|
+
}
|
892
|
+
})
|
893
|
+
Object.assign(this.szTaMb, newRow);
|
894
|
+
this.szTaMb.szTaZdMbDTOs = szTaZdMbDTOs;
|
895
|
+
}
|
896
|
+
});
|
897
|
+
}
|
790
898
|
}
|
791
899
|
}
|
792
900
|
};
|