|
|
@@ -4407,7 +4407,7 @@ export default {
|
|
|
this.$set(itemData, 'answerValue', value);
|
|
|
if (value) {
|
|
|
// 最大值
|
|
|
- let maxValue = item.collectionOptionList[0].maxValue;
|
|
|
+ let maxValue = item.collectionOptionList[0].maxValue.toString();
|
|
|
if (maxValue && maxValue != '') {
|
|
|
if (value > Number(maxValue)) {
|
|
|
this.$set(itemData, 'ruleMessage', '最大值为:' + maxValue);
|
|
|
@@ -4418,7 +4418,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
//最小值
|
|
|
- let minValue = item.collectionOptionList[0].minValue;
|
|
|
+ let minValue = item.collectionOptionList[0].minValue.toString();
|
|
|
if (minValue && minValue != '') {
|
|
|
if (value < Number(minValue)) {
|
|
|
this.$set(itemData, 'ruleMessage', '最小值为:' + minValue);
|
|
|
@@ -5666,6 +5666,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 递归遍历所有表单项
|
|
|
+ traverseCollectionItems(items) {
|
|
|
+ // 处理一层子项(如果有)
|
|
|
+ if (items.collectionOptionList && items.collectionOptionList.length > 0) {
|
|
|
+ if(items.answerValue == items.collectionOptionList[0].collectionOptionId ){
|
|
|
+ items.collectionOptionList.forEach((item) => {
|
|
|
+ // 处理二层子项(如果有)
|
|
|
+ if (item.collectionItems && item.collectionItems.length > 0) {
|
|
|
+ item.collectionItems.forEach((option) => {
|
|
|
+ this.filterCollectionInfos(option);
|
|
|
+ this.traverseCollectionItems(option);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
onSubmit() {
|
|
|
this.validatorFlag = true;
|
|
|
var checkUnManage = 'Y';
|
|
|
@@ -5707,6 +5725,8 @@ export default {
|
|
|
if (this.$route.query.taskType == 1 || this.$route.query.taskType == 4) {
|
|
|
for (var b = 0; b < this.collectionItemList.length; b++) {
|
|
|
this.filterCollectionInfos(this.collectionItemList[b], 'A');
|
|
|
+ const collectionItem = this.collectionItemList[b];
|
|
|
+ this.traverseCollectionItems(collectionItem);
|
|
|
if (
|
|
|
this.collectionItemList[b].answerType == 'sz' ||
|
|
|
this.collectionItemList[b].answerType == 'sm' ||
|