cloud-web-corejs 1.0.54-dev.258 → 1.0.54-dev.259
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/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +49 -36
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4 -3
- package/src/components/xform/mixins/scriptHttp.js +172 -1
- package/src/components/xform/utils/util.js +1445 -1
package/package.json
CHANGED
@@ -70,7 +70,7 @@ export default {
|
|
70
70
|
widgetClass() {
|
71
71
|
let list = [];
|
72
72
|
let optionModel = this.field.options
|
73
|
-
if (optionModel.
|
73
|
+
if (optionModel.colorClass) list.push(optionModel.colorClass);
|
74
74
|
if (optionModel.underline) list.push('underLine');
|
75
75
|
if (optionModel.disabled) list.push('is-disabled');
|
76
76
|
return list
|
@@ -66,7 +66,7 @@ export default {
|
|
66
66
|
widgetClass() {
|
67
67
|
let list = [];
|
68
68
|
let optionModel = this.field.options
|
69
|
-
if (optionModel.
|
69
|
+
if (optionModel.colorClass) list.push(optionModel.colorClass);
|
70
70
|
if (optionModel.underline) list.push('underLine');
|
71
71
|
if (optionModel.disabled) list.push('is-disabled');
|
72
72
|
return list
|
@@ -6,7 +6,8 @@ import {
|
|
6
6
|
runDataSourceRequest,
|
7
7
|
getReportGlobalMap,
|
8
8
|
getAccessUrl,
|
9
|
-
generateId
|
9
|
+
generateId,
|
10
|
+
trim
|
10
11
|
} from "../../../../../components/xform/utils/util";
|
11
12
|
import FormValidators, {getRegExp} from "../../../../../components/xform/utils/validators";
|
12
13
|
import scriptHttpMixin from "../../../../../components/xform/mixins/scriptHttp";
|
@@ -1005,13 +1006,15 @@ modules = {
|
|
1005
1006
|
if (this.hasVabsearchFlag()) {
|
1006
1007
|
if (this.field.options.multipleChoices) {
|
1007
1008
|
let fieldKeyName = this.fieldKeyName;
|
1008
|
-
let valueField = this.field.options.valueField || fieldKeyName;
|
1009
|
-
let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
|
1009
|
+
let valueField = trim(this.field.options.valueField || fieldKeyName);
|
1010
|
+
let vabSearchName = trim(this.field.options.vabSearchName || fieldKeyName);
|
1011
|
+
let valueSourceField = trim(searchDialogConfig.valueSourceField)
|
1012
|
+
let labelSourceField = trim(searchDialogConfig.labelSourceField)
|
1010
1013
|
|
1011
1014
|
rows = (this.fieldModel || []).map((row) => {
|
1012
1015
|
return {
|
1013
|
-
[
|
1014
|
-
[
|
1016
|
+
[valueSourceField]: row[valueField],
|
1017
|
+
[labelSourceField]: row[vabSearchName],
|
1015
1018
|
};
|
1016
1019
|
});
|
1017
1020
|
}
|
@@ -1057,11 +1060,13 @@ modules = {
|
|
1057
1060
|
let row = rows && rows.length ? rows[0] : null;
|
1058
1061
|
let multipleChoices =
|
1059
1062
|
optionModel.searchDialogConfig.multipleChoices || false;
|
1063
|
+
|
1064
|
+
let valueSourceField = trim(searchDialogConfig.valueSourceField)
|
1065
|
+
let labelSourceField = trim(searchDialogConfig.labelSourceField)
|
1060
1066
|
if (this.hasVabsearchFlag()) {
|
1061
1067
|
let fieldKeyName = this.fieldKeyName;
|
1062
|
-
let valueField = this.field.options.valueField || fieldKeyName;
|
1063
|
-
let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
|
1064
|
-
|
1068
|
+
let valueField = trim(this.field.options.valueField || fieldKeyName);
|
1069
|
+
let vabSearchName = trim(this.field.options.vabSearchName || fieldKeyName);
|
1065
1070
|
if (tableParam) {
|
1066
1071
|
let rowData = tableParam.row;
|
1067
1072
|
if (this.getMultipleChoices()) {
|
@@ -1071,28 +1076,30 @@ modules = {
|
|
1071
1076
|
rowData[fieldKeyName] = rows.map((item) => {
|
1072
1077
|
let newData = {};
|
1073
1078
|
newData[valueField] =
|
1074
|
-
item[
|
1079
|
+
item[valueSourceField] ?? null;
|
1075
1080
|
newData[vabSearchName] =
|
1076
|
-
item[
|
1081
|
+
item[labelSourceField] ?? null;
|
1077
1082
|
tableData.forEach((item1) => {
|
1078
|
-
let targetFormField = item1.targetFormField || item1.targetField
|
1079
|
-
|
1083
|
+
let targetFormField = trim(item1.targetFormField || item1.targetField)
|
1084
|
+
let sourceField = trim(item1.sourceField)
|
1085
|
+
newData[targetFormField] = item[sourceField];
|
1080
1086
|
});
|
1081
1087
|
return newData;
|
1082
1088
|
});
|
1083
1089
|
}
|
1084
1090
|
} else {
|
1085
1091
|
rowData[fieldKeyName] = !isClear
|
1086
|
-
? row[
|
1092
|
+
? row[valueSourceField]
|
1087
1093
|
: null;
|
1088
|
-
if (
|
1094
|
+
if (labelSourceField)
|
1089
1095
|
rowData[vabSearchName] = !isClear
|
1090
|
-
? row[
|
1096
|
+
? row[labelSourceField]
|
1091
1097
|
: null;
|
1092
1098
|
tableData.forEach((item) => {
|
1093
|
-
let targetFormField = item.targetFormField || item.targetField;
|
1099
|
+
let targetFormField = trim(item.targetFormField || item.targetField);
|
1100
|
+
let sourceField = trim(item.sourceField)
|
1094
1101
|
if (!isClear) {
|
1095
|
-
rowData[targetFormField] = row[
|
1102
|
+
rowData[targetFormField] = row[sourceField];
|
1096
1103
|
} else {
|
1097
1104
|
rowData[targetFormField] = null;
|
1098
1105
|
}
|
@@ -1107,12 +1114,13 @@ modules = {
|
|
1107
1114
|
rowData = rows.map((item) => {
|
1108
1115
|
let newData = {};
|
1109
1116
|
newData[valueField] =
|
1110
|
-
item[
|
1117
|
+
item[valueSourceField] ?? null;
|
1111
1118
|
newData[vabSearchName] =
|
1112
|
-
item[
|
1119
|
+
item[labelSourceField] ?? null;
|
1113
1120
|
tableData.forEach((item1) => {
|
1114
|
-
let targetFormField = item1.targetFormField || item1.targetField
|
1115
|
-
|
1121
|
+
let targetFormField = trim(item1.targetFormField || item1.targetField)
|
1122
|
+
let sourceField = trim(item1.sourceField)
|
1123
|
+
newData[targetFormField] = item[sourceField];
|
1116
1124
|
});
|
1117
1125
|
return newData;
|
1118
1126
|
});
|
@@ -1120,20 +1128,22 @@ modules = {
|
|
1120
1128
|
this.setValue(rowData);
|
1121
1129
|
} else {
|
1122
1130
|
this.fieldModel = !isClear
|
1123
|
-
? row[
|
1131
|
+
? row[valueSourceField]
|
1124
1132
|
: null;
|
1125
|
-
if (
|
1133
|
+
if (labelSourceField) {
|
1126
1134
|
this.setShowValue(
|
1127
|
-
!isClear ? row[
|
1135
|
+
!isClear ? row[labelSourceField] : null
|
1128
1136
|
);
|
1129
1137
|
}
|
1130
1138
|
tableData.forEach((item) => {
|
1131
1139
|
// formModel[item.targetField] = row[item.sourceField]
|
1132
1140
|
let value = !isClear ? row[item.sourceField] ?? null : null;
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1141
|
+
let targetField = trim(item.targetField)
|
1142
|
+
let targetFormField = trim(item.targetFormField)
|
1143
|
+
if (targetField) {
|
1144
|
+
this.getWidgetRef(targetField).setValue(value);
|
1145
|
+
} else if (targetFormField) {
|
1146
|
+
formModel[targetFormField] = value;
|
1137
1147
|
}
|
1138
1148
|
});
|
1139
1149
|
}
|
@@ -1144,25 +1154,28 @@ modules = {
|
|
1144
1154
|
let addRows = rows.map((rowData) => {
|
1145
1155
|
let itemData = {};
|
1146
1156
|
tableData.forEach((item) => {
|
1147
|
-
let targetFormField = item.targetFormField || item.targetField;
|
1148
|
-
|
1157
|
+
let targetFormField = trim(item.targetFormField || item.targetField);
|
1158
|
+
let sourceField = trim(item.sourceField)
|
1159
|
+
itemData[targetFormField] = rowData[sourceField];
|
1149
1160
|
});
|
1150
1161
|
return itemData;
|
1151
1162
|
});
|
1163
|
+
let tableUniqueKey = trim(searchDialogConfig.tableUniqueKey);
|
1152
1164
|
this.getWidgetRef(searchDialogConfig.tableRef).addTableData(
|
1153
1165
|
addRows,
|
1154
|
-
|
1166
|
+
tableUniqueKey
|
1155
1167
|
);
|
1156
1168
|
} else if (!multipleChoices) {
|
1157
1169
|
tableData.forEach((item) => {
|
1158
1170
|
let value = row[item.sourceField] ?? null;
|
1159
1171
|
// formModel[item.targetField] = value
|
1160
1172
|
// this.getWidgetRef(item.targetField).setValue(value);
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1173
|
+
let targetField = trim(item.targetField)
|
1174
|
+
let targetFormField = trim(item.targetFormField)
|
1175
|
+
if (targetField) {
|
1176
|
+
this.getWidgetRef(targetField).setValue(value);
|
1177
|
+
} else if (targetFormField) {
|
1178
|
+
formModel[targetFormField] = value;
|
1166
1179
|
}
|
1167
1180
|
|
1168
1181
|
|
@@ -487,7 +487,7 @@ export default {
|
|
487
487
|
getWidgetClass() {
|
488
488
|
let list = [];
|
489
489
|
let optionModel = this.field.options.widgetTextLinkConfig?.options || {};
|
490
|
-
if (optionModel.
|
490
|
+
if (optionModel.colorClass) list.push(optionModel.colorClass);
|
491
491
|
if (optionModel.underline) list.push('underLine');
|
492
492
|
if (this.field.options.disabled) list.push('is-disabled');
|
493
493
|
return list
|
@@ -6,14 +6,14 @@
|
|
6
6
|
<el-form-item :label="i18nt('表单值显示')" v-if="selectedWidget.type!=='a-link2'">
|
7
7
|
<el-switch v-model="optionModel.isFormLabel"></el-switch>
|
8
8
|
</el-form-item>
|
9
|
-
<el-form-item :label="i18nt('颜色')">
|
10
|
-
<el-select v-model="optionModel.
|
9
|
+
<!-- <el-form-item :label="i18nt('颜色')">
|
10
|
+
<el-select v-model="optionModel.colorClass" clearable>
|
11
11
|
<el-option value="f-red" label="橙"></el-option>
|
12
12
|
<el-option value="f-dred" label="红"></el-option>
|
13
13
|
<el-option value="f-green" label="绿"></el-option>
|
14
14
|
<el-option value="f-blue" label="蓝"></el-option>
|
15
15
|
</el-select>
|
16
|
-
</el-form-item
|
16
|
+
</el-form-item>-->
|
17
17
|
<el-form-item :label="i18nt('超链接')">
|
18
18
|
<el-input type="text" v-model="optionModel.href"></el-input>
|
19
19
|
</el-form-item>
|
@@ -3,14 +3,14 @@
|
|
3
3
|
<el-form-item :label="i18nt('显示下划线')">
|
4
4
|
<el-switch v-model="optionModel.underline"></el-switch>
|
5
5
|
</el-form-item>
|
6
|
-
<el-form-item :label="i18nt('颜色')">
|
7
|
-
<el-select v-model="optionModel.
|
6
|
+
<!-- <el-form-item :label="i18nt('颜色')">
|
7
|
+
<el-select v-model="optionModel.colorClass" clearable>
|
8
8
|
<el-option value="f-red" label="橙"></el-option>
|
9
9
|
<el-option value="f-dred" label="红"></el-option>
|
10
10
|
<el-option value="f-green" label="绿"></el-option>
|
11
11
|
<el-option value="f-blue" label="蓝"></el-option>
|
12
12
|
</el-select>
|
13
|
-
</el-form-item
|
13
|
+
</el-form-item>-->
|
14
14
|
<el-form-item :label="i18nt('超链接')">
|
15
15
|
<el-input type="text" v-model="optionModel.href"></el-input>
|
16
16
|
</el-form-item>
|
package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('颜色')">
|
3
|
+
<el-select v-model="optionModel.colorClass" clearable>
|
4
|
+
<el-option value="f-red" label="橙"></el-option>
|
5
|
+
<el-option value="f-dred" label="红"></el-option>
|
6
|
+
<el-option value="f-green" label="绿"></el-option>
|
7
|
+
<el-option value="f-blue" label="蓝"></el-option>
|
8
|
+
</el-select>
|
9
|
+
</el-form-item>
|
10
|
+
</template>
|
11
|
+
|
12
|
+
<script>
|
13
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
14
|
+
|
15
|
+
export default {
|
16
|
+
name: "colorClass-editor",
|
17
|
+
mixins: [i18n],
|
18
|
+
props: {
|
19
|
+
designer: Object,
|
20
|
+
selectedWidget: Object,
|
21
|
+
optionModel: Object,
|
22
|
+
},
|
23
|
+
}
|
24
|
+
</script>
|
25
|
+
|
26
|
+
<style scoped>
|
27
|
+
|
28
|
+
</style>
|
@@ -157,6 +157,7 @@ const COMMON_PROPERTIES = {
|
|
157
157
|
"tagFormCode": "project-tag-editor",
|
158
158
|
"autoValueEnabled": "autoValueEnabled-editor",
|
159
159
|
// "commonAttributeEnabled": "commonAttributeEnabled-editor"
|
160
|
+
"colorClass": "colorClass-editor",
|
160
161
|
}
|
161
162
|
|
162
163
|
const ADVANCED_PROPERTIES = {
|
@@ -1918,6 +1918,7 @@ export const basicFields = [
|
|
1918
1918
|
hidden: !1,
|
1919
1919
|
required: !1,
|
1920
1920
|
customClass: "",
|
1921
|
+
colorClass: "",
|
1921
1922
|
defaultValue: "",
|
1922
1923
|
labelAlign: "",
|
1923
1924
|
labelWidth: null,
|
@@ -1969,7 +1970,7 @@ export const basicFields = [
|
|
1969
1970
|
aTextFlag: 1,
|
1970
1971
|
underline: false,
|
1971
1972
|
href: "",
|
1972
|
-
|
1973
|
+
colorClass: "f-red",
|
1973
1974
|
|
1974
1975
|
onCreated: "",
|
1975
1976
|
onMounted: "",
|
@@ -2009,7 +2010,7 @@ export const basicFields = [
|
|
2009
2010
|
aLinkFlag: 1,
|
2010
2011
|
underline: false,
|
2011
2012
|
href: "",
|
2012
|
-
|
2013
|
+
colorClass: "f-blue",
|
2013
2014
|
isFormLabel: false,
|
2014
2015
|
onCreated: "",
|
2015
2016
|
onMounted: "",
|
@@ -2045,7 +2046,7 @@ export const basicFields = [
|
|
2045
2046
|
aLinkFlag: 1,
|
2046
2047
|
underline: false,
|
2047
2048
|
href: "",
|
2048
|
-
|
2049
|
+
colorClass: "f-blue",
|
2049
2050
|
|
2050
2051
|
onClick: "",
|
2051
2052
|
clickBindEvent: null,
|