cloud-web-corejs 1.0.54-dev.640 → 1.0.54-dev.641
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
|
@@ -429,6 +429,7 @@
|
|
|
429
429
|
<el-option value="TextArea" :label="$t1('长文本')"></el-option>
|
|
430
430
|
<el-option value="DateTime" :label="$t1('日期时间')"></el-option>
|
|
431
431
|
<el-option value="Reference" :label="$t1('关联表')"></el-option>
|
|
432
|
+
<el-option value="ReferenceLong" :label="$t1('关联表(长整型)')"></el-option>
|
|
432
433
|
</el-select>
|
|
433
434
|
</fieldCompare>
|
|
434
435
|
</el-form-item>
|
|
@@ -462,9 +463,10 @@
|
|
|
462
463
|
class="search-input"
|
|
463
464
|
v-model="row.referenceZd"
|
|
464
465
|
v-el-readonly
|
|
465
|
-
v-if="row.zdType
|
|
466
|
+
v-if="isReferenceZdType(row.zdType)"
|
|
466
467
|
:disabled="!row.zdEn"
|
|
467
468
|
clearable
|
|
469
|
+
@clear="clearReferenceZd(row)"
|
|
468
470
|
>
|
|
469
471
|
<i
|
|
470
472
|
slot="suffix"
|
|
@@ -122,6 +122,7 @@ modules = {
|
|
|
122
122
|
TextArea: "长文本",
|
|
123
123
|
DateTime: "日期时间",
|
|
124
124
|
Reference: "关联表",
|
|
125
|
+
ReferenceLong: "关联表(长整型)",
|
|
125
126
|
},
|
|
126
127
|
|
|
127
128
|
treeFlagMap:{
|
|
@@ -680,6 +681,9 @@ modules = {
|
|
|
680
681
|
});
|
|
681
682
|
});
|
|
682
683
|
},
|
|
684
|
+
isReferenceZdType(zdType) {
|
|
685
|
+
return zdType === "Reference" || zdType === "ReferenceLong";
|
|
686
|
+
},
|
|
683
687
|
openReferenceZdDialog(row, rowIndex, $table) {
|
|
684
688
|
let referenceZd = row.referenceZd;
|
|
685
689
|
let referenceZd2 = row.referenceZd + "." + row.zdEn;
|
|
@@ -693,16 +697,13 @@ modules = {
|
|
|
693
697
|
referenceKey = referenceZd.substr(index + 1);
|
|
694
698
|
referenceShowFields = this.szTaMb.szTaZdMbDTOs
|
|
695
699
|
.filter((item) => {
|
|
696
|
-
// return referenceZd == item.relationZd;
|
|
697
700
|
let flag = false;
|
|
698
701
|
if (item.relationZd === referenceZd || item.relationZd === referenceZd2) {
|
|
699
702
|
flag = true
|
|
700
703
|
}
|
|
701
704
|
return flag;
|
|
702
|
-
// return referenceZd == item.relationZd ;
|
|
703
705
|
})
|
|
704
706
|
.map((item) => {
|
|
705
|
-
// return item.referenceZd.split(".")[1]
|
|
706
707
|
return item.referenceZd.substr(index + 1);
|
|
707
708
|
});
|
|
708
709
|
}
|
|
@@ -725,42 +726,31 @@ modules = {
|
|
|
725
726
|
let map = {
|
|
726
727
|
"Integer": "11",
|
|
727
728
|
"Long": "20",
|
|
729
|
+
"ReferenceLong": "20",
|
|
728
730
|
"Decimal": "21,6",
|
|
729
731
|
"Money": "21,2",
|
|
730
732
|
"Text": "255"
|
|
731
733
|
}
|
|
732
734
|
row.zdLength = map[row.zdType] || null;
|
|
733
|
-
this.
|
|
735
|
+
if (!this.isReferenceZdType(row.zdType)) {
|
|
736
|
+
this.clearReferenceZd(row);
|
|
737
|
+
}
|
|
734
738
|
},
|
|
735
739
|
clearReferenceZd(row) {
|
|
736
740
|
let referenceZd = row.referenceZd;
|
|
737
741
|
if (referenceZd) {
|
|
738
|
-
let referenceZd2 =
|
|
742
|
+
let referenceZd2 = referenceZd + "." + row.zdEn;
|
|
739
743
|
this.szTaMb.szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
|
740
744
|
return referenceZd !== item.relationZd && referenceZd2 !== item.relationZd;
|
|
741
745
|
});
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
/*let oldReferenceZd = row.referenceZd;
|
|
747
|
-
if (oldReferenceZd) {
|
|
748
|
-
let oldReferenceZd2 = row.referenceZd + "." + row.zdEn;
|
|
749
|
-
let index0 = oldReferenceZd.indexOf(".");
|
|
750
|
-
let oldReferenceEntity = oldReferenceZd.substring(0, index0);
|
|
751
|
-
let delIndex = [];
|
|
752
|
-
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
753
|
-
if (item.relationZd && (oldReferenceZd == item.relationZd || oldReferenceZd2 == item.relationZd)) {
|
|
754
|
-
delIndex.push(index);
|
|
755
|
-
}
|
|
746
|
+
} else if (row.zdEn) {
|
|
747
|
+
let relationZdSuffix = "." + row.zdEn;
|
|
748
|
+
this.szTaMb.szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
|
749
|
+
return !(item.relationZd && item.relationZd.endsWith(relationZdSuffix));
|
|
756
750
|
});
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
});
|
|
761
|
-
}
|
|
762
|
-
row.referenceZd = null;
|
|
763
|
-
}*/
|
|
751
|
+
}
|
|
752
|
+
row.referenceZd = null;
|
|
753
|
+
row.refServiceName = null;
|
|
764
754
|
},
|
|
765
755
|
confirmReferenceZdDialog() {
|
|
766
756
|
let row = this.szTaMb.szTaZdMbDTOs[this.currentIndex];
|
|
@@ -781,15 +771,15 @@ modules = {
|
|
|
781
771
|
let index0 = oldReferenceZd.indexOf(".");
|
|
782
772
|
let oldReferenceEntity = oldReferenceZd.substring(0, index0);
|
|
783
773
|
let delIndex = [];
|
|
784
|
-
if (referenceEntity
|
|
774
|
+
if (referenceEntity !== oldReferenceEntity) {
|
|
785
775
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
786
|
-
if (item.relationZd && (oldReferenceZd
|
|
776
|
+
if (item.relationZd && (oldReferenceZd === item.relationZd || oldReferenceZd2 === item.relationZd)) {
|
|
787
777
|
delIndex.push(index);
|
|
788
778
|
}
|
|
789
779
|
});
|
|
790
780
|
} else {
|
|
791
781
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
792
|
-
if (oldReferenceZd
|
|
782
|
+
if (oldReferenceZd === item.relationZd || oldReferenceZd2 === item.relationZd) {
|
|
793
783
|
if (!keys.includes(item.referenceZd)) {
|
|
794
784
|
delIndex.push(index);
|
|
795
785
|
} else {
|
|
@@ -806,7 +796,7 @@ modules = {
|
|
|
806
796
|
}
|
|
807
797
|
|
|
808
798
|
let oldKeys = this.szTaMb.szTaZdMbDTOs
|
|
809
|
-
.filter((item) => (referenceZd
|
|
799
|
+
.filter((item) => (referenceZd === item.relationZd || (referenceZd + "." + item.zdEn) === item.relationZd))
|
|
810
800
|
.map((item) => item.referenceZd);
|
|
811
801
|
let addReferenceShowFields = referenceShowFields.filter((item, index) => {
|
|
812
802
|
return !oldKeys.includes(referenceEntity + "." + item);
|
|
@@ -814,7 +804,7 @@ modules = {
|
|
|
814
804
|
|
|
815
805
|
let addIndex = -1;
|
|
816
806
|
let lastIndex = this.szTaMb.szTaZdMbDTOs.findLastIndex((item) => {
|
|
817
|
-
return referenceZd
|
|
807
|
+
return referenceZd === item.relationZd || (referenceZd + "." + item.zdEn) === item.relationZd;
|
|
818
808
|
});
|
|
819
809
|
addIndex = lastIndex >= 0 ? lastIndex + 1 : this.currentIndex + 1;
|
|
820
810
|
|
|
@@ -898,7 +888,7 @@ modules = {
|
|
|
898
888
|
confirmEntityDialog(rows) {
|
|
899
889
|
if (rows.length) {
|
|
900
890
|
let row = rows[0];
|
|
901
|
-
if (this.referenceEntity
|
|
891
|
+
if (this.referenceEntity !== row.taBm) {
|
|
902
892
|
this.referenceKey = null;
|
|
903
893
|
this.referenceShowFields = [];
|
|
904
894
|
}
|
|
@@ -979,7 +969,7 @@ modules = {
|
|
|
979
969
|
changeTaRule(val) {
|
|
980
970
|
let treeDefaultZds = this.$baseLodash.cloneDeep(this.treeDefaultZds);
|
|
981
971
|
let szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs;
|
|
982
|
-
if (val
|
|
972
|
+
if (val === 1) {
|
|
983
973
|
let zdEns = szTaZdMbDTOs
|
|
984
974
|
.filter((item) => !!item.zdEn)
|
|
985
975
|
.map((item) => item.zdEn);
|
|
@@ -1020,7 +1010,7 @@ modules = {
|
|
|
1020
1010
|
let szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs;
|
|
1021
1011
|
let value = 0;
|
|
1022
1012
|
let allOrders = szTaZdMbDTOs
|
|
1023
|
-
.filter((item) => item.orders
|
|
1013
|
+
.filter((item) => item.orders !== null && item.orders !== undefined)
|
|
1024
1014
|
.map((item) => item.orders);
|
|
1025
1015
|
szTaZdMbDTOs.forEach((item) => {
|
|
1026
1016
|
let orders = item.orders;
|
|
@@ -1034,7 +1024,7 @@ modules = {
|
|
|
1034
1024
|
getBdEnv() {
|
|
1035
1025
|
getBdFlag({
|
|
1036
1026
|
success: (res) => {
|
|
1037
|
-
this.isDev = res.objx
|
|
1027
|
+
this.isDev = res.objx === 1;
|
|
1038
1028
|
},
|
|
1039
1029
|
});
|
|
1040
1030
|
},
|
|
@@ -1160,14 +1150,14 @@ modules = {
|
|
|
1160
1150
|
let toTaBmZdField = null;
|
|
1161
1151
|
if (toTaBmZd) {
|
|
1162
1152
|
toTaBmZd.split(".").forEach((item, index) => {
|
|
1163
|
-
if (index
|
|
1153
|
+
if (index === 0) {
|
|
1164
1154
|
toTaBmZdEntity = item;
|
|
1165
|
-
} else if (index
|
|
1155
|
+
} else if (index === 1) {
|
|
1166
1156
|
toTaBmZdField = item;
|
|
1167
1157
|
}
|
|
1168
1158
|
});
|
|
1169
1159
|
} else {
|
|
1170
|
-
if (this.szTaMb.taType
|
|
1160
|
+
if (this.szTaMb.taType === 1 && this.szTaMb.sszstBm) {
|
|
1171
1161
|
toTaBmZdEntity = this.szTaMb.sszstBm;
|
|
1172
1162
|
}
|
|
1173
1163
|
}
|
|
@@ -1197,7 +1187,7 @@ modules = {
|
|
|
1197
1187
|
confirmEntityDialog3(rows) {
|
|
1198
1188
|
if (rows.length) {
|
|
1199
1189
|
let row = rows[0];
|
|
1200
|
-
if (this.toTaBmZdEntity
|
|
1190
|
+
if (this.toTaBmZdEntity !== row.taBm) {
|
|
1201
1191
|
this.toTaBmZdEntity = row.taBm;
|
|
1202
1192
|
this.toTaBmZdField = null;
|
|
1203
1193
|
}
|
|
@@ -1225,13 +1215,13 @@ modules = {
|
|
|
1225
1215
|
if(!this.fkey)return
|
|
1226
1216
|
let oldVal = this.preValue;
|
|
1227
1217
|
let newVal = val
|
|
1228
|
-
if (row.zdType
|
|
1218
|
+
if (this.isReferenceZdType(row.zdType)) {
|
|
1229
1219
|
let referenceZd = row.referenceZd;
|
|
1230
1220
|
if (referenceZd) {
|
|
1231
1221
|
let referenceZd2 = row.referenceZd + "." + oldVal
|
|
1232
1222
|
let relationZd = row.referenceZd + "." + newVal
|
|
1233
1223
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
1234
|
-
if (referenceZd
|
|
1224
|
+
if (referenceZd === item.relationZd || referenceZd2 === item.relationZd) {
|
|
1235
1225
|
item.relationZd = relationZd;
|
|
1236
1226
|
}
|
|
1237
1227
|
});
|
|
@@ -1267,9 +1257,9 @@ modules = {
|
|
|
1267
1257
|
getHValue(row, column) {
|
|
1268
1258
|
if (row.hData && row.hData.id) {
|
|
1269
1259
|
let result = row.hData[column.property];
|
|
1270
|
-
if(column.property
|
|
1260
|
+
if(column.property === 'zdType'){
|
|
1271
1261
|
result = this.zdTypeMap[result]
|
|
1272
|
-
}else if(column.property
|
|
1262
|
+
}else if(column.property === 'treeFlag'){
|
|
1273
1263
|
result = this.treeFlagMap[result]
|
|
1274
1264
|
}
|
|
1275
1265
|
return result
|