cloud-web-corejs 1.0.54-dev.641 → 1.0.54-dev.643
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
CHANGED
|
@@ -36,7 +36,7 @@ function _typeof(obj) {
|
|
|
36
36
|
* import 相关资源
|
|
37
37
|
*/
|
|
38
38
|
import jquery from "jquery";
|
|
39
|
-
// js
|
|
39
|
+
// js颜色选择(webpack 下会注册在 npm jquery 实例上,需与全局 jQuery 同步)
|
|
40
40
|
import "@claviska/jquery-minicolors/jquery.minicolors.min";
|
|
41
41
|
// 条形码
|
|
42
42
|
import JsBarcode from "jsbarcode";
|
|
@@ -60,11 +60,18 @@ import Canvg from 'canvg';
|
|
|
60
60
|
import defaultTypeProvider from "./etypes/default-etyps-provider";
|
|
61
61
|
|
|
62
62
|
// window.$ = window.jQuery = $;
|
|
63
|
-
if(window.$){
|
|
63
|
+
if (window.$) {
|
|
64
64
|
window.jQuery = window.$;
|
|
65
|
-
}else{
|
|
65
|
+
} else {
|
|
66
66
|
window.$ = window.jQuery = jquery;
|
|
67
67
|
}
|
|
68
|
+
// minicolors 通过 require('jquery') 挂载,与页面 script 引入的全局 jQuery 可能不是同一实例
|
|
69
|
+
if (window.jQuery !== jquery && jquery.fn.minicolors && !window.jQuery.fn.minicolors) {
|
|
70
|
+
window.jQuery.fn.minicolors = jquery.fn.minicolors;
|
|
71
|
+
}
|
|
72
|
+
if (window.jQuery !== jquery && jquery.minicolors && !window.jQuery.minicolors) {
|
|
73
|
+
window.jQuery.minicolors = jquery.minicolors;
|
|
74
|
+
}
|
|
68
75
|
window.autoConnect = false;
|
|
69
76
|
window.io = io;
|
|
70
77
|
|
|
@@ -465,14 +465,18 @@
|
|
|
465
465
|
v-el-readonly
|
|
466
466
|
v-if="isReferenceZdType(row.zdType)"
|
|
467
467
|
:disabled="!row.zdEn"
|
|
468
|
-
clearable
|
|
469
|
-
@clear="clearReferenceZd(row)"
|
|
470
468
|
>
|
|
471
|
-
<
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
469
|
+
<span slot="suffix" class="el-input__suffix-inner">
|
|
470
|
+
<i
|
|
471
|
+
v-if="row.referenceZd"
|
|
472
|
+
class="el-input__icon el-icon-circle-close"
|
|
473
|
+
@click.stop="confirmClearReferenceZd(row)"
|
|
474
|
+
></i>
|
|
475
|
+
<i
|
|
476
|
+
class="el-input__icon el-icon-search"
|
|
477
|
+
@click="openReferenceZdDialog(row, rowIndex, $table)"
|
|
478
|
+
></i>
|
|
479
|
+
</span>
|
|
476
480
|
</el-input>
|
|
477
481
|
<template v-else>
|
|
478
482
|
{{ row.referenceZd }}
|
|
@@ -121,7 +121,7 @@ modules = {
|
|
|
121
121
|
Text: "文本",
|
|
122
122
|
TextArea: "长文本",
|
|
123
123
|
DateTime: "日期时间",
|
|
124
|
-
Reference: "关联表",
|
|
124
|
+
Reference: "关联表(文本)",
|
|
125
125
|
ReferenceLong: "关联表(长整型)",
|
|
126
126
|
},
|
|
127
127
|
|
|
@@ -736,6 +736,41 @@ modules = {
|
|
|
736
736
|
this.clearReferenceZd(row);
|
|
737
737
|
}
|
|
738
738
|
},
|
|
739
|
+
getReferenceChildRows(row) {
|
|
740
|
+
let referenceZd = row.referenceZd;
|
|
741
|
+
if (!referenceZd && !row.zdEn) {
|
|
742
|
+
return [];
|
|
743
|
+
}
|
|
744
|
+
let referenceZd2 = referenceZd ? referenceZd + "." + row.zdEn : null;
|
|
745
|
+
let relationZdSuffix = row.zdEn ? "." + row.zdEn : null;
|
|
746
|
+
return this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
|
747
|
+
if (referenceZd && (referenceZd === item.relationZd || referenceZd2 === item.relationZd)) {
|
|
748
|
+
return true;
|
|
749
|
+
}
|
|
750
|
+
if (relationZdSuffix && item.relationZd && item.relationZd.endsWith(relationZdSuffix)) {
|
|
751
|
+
return true;
|
|
752
|
+
}
|
|
753
|
+
return false;
|
|
754
|
+
});
|
|
755
|
+
},
|
|
756
|
+
confirmClearReferenceZd(row) {
|
|
757
|
+
if (!row.referenceZd) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
if (this.hasFieldCreated(row)) {
|
|
761
|
+
this.$baseAlert(this.$t1("该字段已在数据库中创建,不能清空关联配置"));
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
let childRows = this.getReferenceChildRows(row);
|
|
765
|
+
if (childRows.some((item) => this.hasFieldCreated(item))) {
|
|
766
|
+
this.$baseAlert(this.$t1("关联显示字段已在数据库中创建,不能清空关联配置"));
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
let text = this.$t1("清空关联配置将同时删除关联显示字段,您确定要继续吗?");
|
|
770
|
+
this.$baseConfirm(text).then(() => {
|
|
771
|
+
this.clearReferenceZd(row);
|
|
772
|
+
});
|
|
773
|
+
},
|
|
739
774
|
clearReferenceZd(row) {
|
|
740
775
|
let referenceZd = row.referenceZd;
|
|
741
776
|
if (referenceZd) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {selectDialogMixins} from "@base/mixins/selectDialog";
|
|
1
|
+
import { selectDialogMixins } from "@base/mixins/selectDialog";
|
|
2
2
|
|
|
3
3
|
let modules = {};
|
|
4
4
|
modules = {
|
|
5
|
-
name:
|
|
6
|
-
props: [
|
|
5
|
+
name: "zdDialog",
|
|
6
|
+
props: ["visiable", "multi", "rows", "param", "taBm"],
|
|
7
7
|
mixins: [selectDialogMixins],
|
|
8
8
|
components: {},
|
|
9
9
|
created() {
|
|
@@ -20,7 +20,7 @@ modules = {
|
|
|
20
20
|
formData: {},
|
|
21
21
|
vxeOption: {},
|
|
22
22
|
showSaleOrgDialog: false,
|
|
23
|
-
fieldKey: "taZdMc"
|
|
23
|
+
fieldKey: "taZdMc",
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
26
|
methods: {
|
|
@@ -28,86 +28,89 @@ modules = {
|
|
|
28
28
|
let that = this;
|
|
29
29
|
|
|
30
30
|
let zdTypeMap = {
|
|
31
|
-
Boolean: this.$t1(
|
|
32
|
-
Integer: this.$t1(
|
|
33
|
-
Long: this.$t1(
|
|
34
|
-
Decimal: this.$t1(
|
|
35
|
-
Money: this.$t1(
|
|
36
|
-
Text: this.$t1(
|
|
37
|
-
TextArea: this.$t1(
|
|
38
|
-
DateTime: this.$t1(
|
|
39
|
-
Reference: this.$t1(
|
|
40
|
-
ReferenceLong: this.$t1(
|
|
41
|
-
}
|
|
31
|
+
Boolean: this.$t1("布尔"),
|
|
32
|
+
Integer: this.$t1("整数"),
|
|
33
|
+
Long: this.$t1("长整数"),
|
|
34
|
+
Decimal: this.$t1("精度小数"),
|
|
35
|
+
Money: this.$t1("金额"),
|
|
36
|
+
Text: this.$t1("文本"),
|
|
37
|
+
TextArea: this.$t1("长文本"),
|
|
38
|
+
DateTime: this.$t1("日期时间"),
|
|
39
|
+
Reference: this.$t1("关联表(文本)"),
|
|
40
|
+
ReferenceLong: this.$t1("关联表(长整型)"),
|
|
41
|
+
};
|
|
42
42
|
|
|
43
43
|
let tableOption = {
|
|
44
44
|
vue: that,
|
|
45
|
-
tableRef:
|
|
46
|
-
tableName:
|
|
47
|
-
path: USER_PREFIX +
|
|
45
|
+
tableRef: "table-m1",
|
|
46
|
+
tableName: "bd_table_model_field_dialog-m1",
|
|
47
|
+
path: USER_PREFIX + "/szTaMb/getSzTaZdMbsByTaBm",
|
|
48
48
|
param: () => {
|
|
49
49
|
return {
|
|
50
50
|
taBm: this.taBm,
|
|
51
51
|
enabled: true,
|
|
52
52
|
searchDb: true,
|
|
53
53
|
...this.formData,
|
|
54
|
-
...this.param
|
|
54
|
+
...this.param,
|
|
55
55
|
};
|
|
56
56
|
},
|
|
57
57
|
columns: [
|
|
58
|
-
{type:
|
|
58
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
59
59
|
{
|
|
60
|
-
title: this.$t1(
|
|
61
|
-
field:
|
|
62
|
-
width: 150
|
|
60
|
+
title: this.$t1("实体字段名称"),
|
|
61
|
+
field: "zdEn",
|
|
62
|
+
width: 150,
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
title: this.$t1(
|
|
66
|
-
field:
|
|
67
|
-
width: 150
|
|
65
|
+
title: this.$t1("数据库表字段名"),
|
|
66
|
+
field: "taZdMc",
|
|
67
|
+
width: 150,
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
title: this.$t1(
|
|
71
|
-
field:
|
|
72
|
-
width: 150
|
|
70
|
+
title: this.$t1("字段描述"),
|
|
71
|
+
field: "zdCh",
|
|
72
|
+
width: 150,
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
title: this.$t1(
|
|
76
|
-
|
|
75
|
+
title: this.$t1("字段类型"),
|
|
76
|
+
field: "zdType",
|
|
77
|
+
width: 150,
|
|
78
|
+
slots: {
|
|
79
|
+
default: ({ row, rowIndex, $table }) => {
|
|
77
80
|
return zdTypeMap[row.zdType];
|
|
78
|
-
}
|
|
79
|
-
}
|
|
81
|
+
},
|
|
82
|
+
},
|
|
80
83
|
},
|
|
81
84
|
{
|
|
82
|
-
title: this.$t1(
|
|
83
|
-
field:
|
|
84
|
-
width: 150
|
|
85
|
+
title: this.$t1("关联字段"),
|
|
86
|
+
field: "referenceZd",
|
|
87
|
+
width: 150,
|
|
85
88
|
},
|
|
86
89
|
{
|
|
87
90
|
width: 47,
|
|
88
|
-
fixed:
|
|
89
|
-
title:
|
|
90
|
-
sortable: false
|
|
91
|
-
}
|
|
91
|
+
fixed: "right",
|
|
92
|
+
title: "",
|
|
93
|
+
sortable: false,
|
|
94
|
+
},
|
|
92
95
|
],
|
|
93
96
|
config: {
|
|
94
97
|
checkboxConfig: {
|
|
95
98
|
checkStrictly: true,
|
|
96
99
|
showHeader: this.selectMulti,
|
|
97
|
-
trigger:
|
|
100
|
+
trigger: "row",
|
|
98
101
|
},
|
|
99
102
|
proxyConfig: {
|
|
100
103
|
props: {
|
|
101
104
|
result: "objx", // 配置响应结果列表字段
|
|
102
105
|
total: "objx.length", // 配置响应结果总页数字段
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
106
109
|
};
|
|
107
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
110
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
108
111
|
that.vxeOption = opts;
|
|
109
112
|
});
|
|
110
113
|
},
|
|
111
|
-
}
|
|
114
|
+
},
|
|
112
115
|
};
|
|
113
|
-
export default modules
|
|
116
|
+
export default modules;
|