Parcourir la source

feature_20250926_数字题型&单行文本题型

zhujindu il y a 1 mois
Parent
commit
a4d1402efd
1 fichiers modifiés avec 37 ajouts et 78 suppressions
  1. 37 78
      src/views/deviceWithin/addStoreVisit.vue

+ 37 - 78
src/views/deviceWithin/addStoreVisit.vue

@@ -261,10 +261,8 @@
             <van-field
               v-model="item.answerValue"
               :placeholder="item.collectionOptionList[0].collectionOption"
-              @blur="SZsizeComparison(item, 'A')"></van-field>
-            <p v-if="item.ruleMessage" class="ruleMessage">
-              {{ item.ruleMessage }}
-            </p>
+              @blur="SZsizeComparison(item, 'A')"
+              :error-message="item.ruleMessage"></van-field>
             <delete-upload-img
               :photoIdentifyType="photoIdentifyType"
               :imgs="item.fileInfoList"></delete-upload-img>
@@ -453,21 +451,13 @@
               v-model="item.answerValue"
               :formatter="dhwbFormatter"
               @blur="DHWBsizeComparison(item, 'A')"
-              :placeholder="item.collectionOptionList[0].collectionOption"></van-field>
-            <p v-if="item.ruleMessage" class="ruleMessage">
-              {{ item.ruleMessage }}
-            </p>
+              :placeholder="item.collectionOptionList[0].collectionOption"
+              :error-message="item.ruleMessage"></van-field>
             <p
-              style="
-                color: #444;
-                font-size: 12px;
-                margin: 0;
-                text-align: right;
-                position: relative;
-              ">
+              style="color: #444; font-size: 12px; margin: 0; text-align: right; position: relative"
+              v-if="item.showHistory == 1">
               <span
                 style="color: #00afff; position: absolute; top: 8px; right: 0px"
-                v-if="item.showHistory == 1"
                 @click="getCollectionShowHistory(item)"
                 >回显历史</span
               >
@@ -767,12 +757,8 @@
                         v-model="childitem.collectionOptionList[0].answerValue"
                         :formatter="dhwbFormatter"
                         @blur="DHWBsizeComparison(childitem)"
-                        :placeholder="
-                          childitem.collectionOptionList[0].collectionOption
-                        "></van-field>
-                      <p v-if="childitem.collectionOptionList[0].ruleMessage" class="ruleMessage">
-                        {{ childitem.collectionOptionList[0].ruleMessage }}
-                      </p>
+                        :placeholder="childitem.collectionOptionList[0].collectionOption"
+                        :error-message="childitem.collectionOptionList[0].ruleMessage"></van-field>
                       <p
                         style="
                           color: #444;
@@ -780,10 +766,10 @@
                           margin: 0;
                           text-align: right;
                           position: relative;
-                        ">
+                        "
+                        v-if="childitem.showHistory == 1">
                         <span
                           style="color: #00afff; position: absolute; top: 8px; right: 0px"
-                          v-if="childitem.showHistory == 1"
                           @click="getCollectionShowHistory(childitem)"
                           >回显历史</span
                         >
@@ -819,10 +805,8 @@
                       <van-field
                         v-model="childitem.collectionOptionList[0].answerValue"
                         :placeholder="childitem.collectionOptionList[0].collectionOption"
-                        @blur="SZsizeComparison(childitem)"></van-field>
-                      <p v-if="childitem.collectionOptionList[0].ruleMessage" class="ruleMessage">
-                        {{ childitem.collectionOptionList[0].ruleMessage }}
-                      </p>
+                        @blur="SZsizeComparison(childitem)"
+                        :error-message="childitem.collectionOptionList[0].ruleMessage"></van-field>
                       <delete-upload-img
                         :photoIdentifyType="photoIdentifyType"
                         :imgs="childitem.fileInfoList"></delete-upload-img>
@@ -1187,14 +1171,10 @@
                                   v-model="childitem1.collectionOptionList[0].answerValue"
                                   :formatter="dhwbFormatter"
                                   @blur="DHWBsizeComparison(childitem1)"
-                                  :placeholder="
-                                    childitem1.collectionOptionList[0].collectionOption
+                                  :placeholder="childitem1.collectionOptionList[0].collectionOption"
+                                  :error-message="
+                                    childitem1.collectionOptionList[0].ruleMessage
                                   "></van-field>
-                                <p
-                                  v-if="childitem1.collectionOptionList[0].ruleMessage"
-                                  class="ruleMessage">
-                                  {{ childitem1.collectionOptionList[0].ruleMessage }}
-                                </p>
                                 <p
                                   style="
                                     color: #444;
@@ -1202,10 +1182,10 @@
                                     margin: 0;
                                     text-align: right;
                                     position: relative;
-                                  ">
+                                  "
+                                  v-if="childitem1.showHistory == 1">
                                   <span
                                     style="color: #00afff; position: absolute; top: 8px; right: 0px"
-                                    v-if="childitem1.showHistory == 1"
                                     @click="getCollectionShowHistory(childitem1)"
                                     >回显历史</span
                                   >
@@ -1617,12 +1597,10 @@
                                             @blur="DHWBsizeComparison(child33item1)"
                                             :placeholder="
                                               child33item1.collectionOptionList[0].collectionOption
+                                            "
+                                            :error-message="
+                                              child33item1.collectionOptionList[0].ruleMessage
                                             "></van-field>
-                                          <p
-                                            v-if="child33item1.collectionOptionList[0].ruleMessage"
-                                            class="ruleMessage">
-                                            {{ child33item1.collectionOptionList[0].ruleMessage }}
-                                          </p>
                                           <p
                                             style="
                                               color: #444;
@@ -1630,7 +1608,8 @@
                                               margin: 0;
                                               text-align: right;
                                               position: relative;
-                                            ">
+                                            "
+                                            v-if="child33item1.showHistory == 1">
                                             <span
                                               style="
                                                 color: #00afff;
@@ -1923,12 +1902,10 @@
                                             :placeholder="
                                               child33item1.collectionOptionList[0].collectionOption
                                             "
-                                            @blur="SZsizeComparison(child33item1)"></van-field>
-                                          <p
-                                            v-if="child33item1.collectionOptionList[0].ruleMessage"
-                                            class="ruleMessage">
-                                            {{ child33item1.collectionOptionList[0].ruleMessage }}
-                                          </p>
+                                            @blur="SZsizeComparison(child33item1)"
+                                            :error-message="
+                                              child33item1.collectionOptionList[0].ruleMessage
+                                            "></van-field>
                                           <delete-upload-img
                                             :photoIdentifyType="photoIdentifyType"
                                             :imgs="child33item1.fileInfoList"></delete-upload-img>
@@ -2382,18 +2359,11 @@
                                                       :placeholder="
                                                         child44item1.collectionOptionList[0]
                                                           .collectionOption
-                                                      "></van-field>
-                                                    <p
-                                                      v-if="
-                                                        child44item1.collectionOptionList[0]
-                                                          .ruleMessage
                                                       "
-                                                      class="ruleMessage">
-                                                      {{
+                                                      :error-message="
                                                         child44item1.collectionOptionList[0]
                                                           .ruleMessage
-                                                      }}
-                                                    </p>
+                                                      "></van-field>
                                                     <p
                                                       style="
                                                         color: #444;
@@ -2401,7 +2371,8 @@
                                                         margin: 0;
                                                         text-align: right;
                                                         position: relative;
-                                                      ">
+                                                      "
+                                                      v-if="child44item1.showHistory == 1">
                                                       <span
                                                         style="
                                                           color: #00afff;
@@ -2409,7 +2380,6 @@
                                                           top: 8px;
                                                           right: 0px;
                                                         "
-                                                        v-if="child44item1.showHistory == 1"
                                                         @click="
                                                           getCollectionShowHistory(child44item1)
                                                         "
@@ -2727,20 +2697,11 @@
                                                         child44item1.collectionOptionList[0]
                                                           .collectionOption
                                                       "
-                                                      @blur="
-                                                        SZsizeComparison(child44item1)
-                                                      "></van-field>
-                                                    <p
-                                                      v-if="
+                                                      @blur="SZsizeComparison(child44item1)"
+                                                      :error-message="
                                                         child44item1.collectionOptionList[0]
                                                           .ruleMessage
-                                                      "
-                                                      class="ruleMessage">
-                                                      {{
-                                                        child44item1.collectionOptionList[0]
-                                                          .ruleMessage
-                                                      }}
-                                                    </p>
+                                                      "></van-field>
                                                     <delete-upload-img
                                                       :photoIdentifyType="photoIdentifyType"
                                                       :imgs="
@@ -3133,12 +3094,10 @@
                                 <van-field
                                   v-model="childitem1.collectionOptionList[0].answerValue"
                                   :placeholder="childitem1.collectionOptionList[0].collectionOption"
-                                  @blur="SZsizeComparison(childitem1)"></van-field>
-                                <p
-                                  v-if="childitem1.collectionOptionList[0].ruleMessage"
-                                  class="ruleMessage">
-                                  {{ childitem1.collectionOptionList[0].ruleMessage }}
-                                </p>
+                                  @blur="SZsizeComparison(childitem1)"
+                                  :error-message="
+                                    childitem1.collectionOptionList[0].ruleMessage
+                                  "></van-field>
                                 <delete-upload-img
                                   :photoIdentifyType="photoIdentifyType"
                                   :imgs="childitem1.fileInfoList"></delete-upload-img>