yuwandanmian 1 year ago
parent
commit
43e13cab6e
1 changed files with 24 additions and 3 deletions
  1. 24 3
      src/views/search/components/ProfessionSearch.vue

+ 24 - 3
src/views/search/components/ProfessionSearch.vue

@@ -123,10 +123,10 @@
                 </el-input>
               </el-form-item>
               <el-form-item label="体温">
-                <el-input placeholder="起始体温" v-model="formInline2.AAC04_start" style="width: 180px; margin-right: 10px;">
+                <el-input placeholder="起始体温" v-model="formInline2.TIWEN_START" style="width: 180px; margin-right: 10px;">
                   <template slot="append">℃</template>
                 </el-input>
-                <el-input placeholder="终止体温" v-model="formInline2.AAC04_end" style="width: 180px; margin-right: 10px;">
+                <el-input placeholder="终止体温" v-model="formInline2.TIWEN_END" style="width: 180px; margin-right: 10px;">
                   <template slot="append">℃</template>
                 </el-input>
                 <el-cascader
@@ -202,6 +202,7 @@ export default {
         ageType: 2,
         TIWEN_START: '',
         TIWEN_END: '',
+        TIWEN_FIELD: '',
         field: [{
           select_type: 0,
           key: '',
@@ -243,7 +244,26 @@ export default {
     },
     // 搜索
     onSearch() {
-      const { ageType, ageStart, ageEnd } = this.formInline2
+      const { ageType, ageStart, ageEnd, TIWEN_START, TIWEN_END } = this.formInline2
+      if (TIWEN_START) {
+        if (TIWEN_START <0 || TIWEN_START > 60) {
+          this.$message.error('体温开始温度(不能小于0,不能大于60)')
+          return
+        }
+      }
+      if (TIWEN_END) {
+        if (TIWEN_END <0 || TIWEN_END > 60) {
+          this.$message.error('体温结束温度(不能小于0,不能大于60)')
+          return
+        }
+      }
+      console.log(TIWEN_START, TIWEN_END, Number(TIWEN_START) > Number(TIWEN_END))
+      if (TIWEN_START && TIWEN_END) {
+        if (Number(TIWEN_START) > Number(TIWEN_END)) {
+          this.$message.error('体温开始温度不能大于结束温度')
+          return
+        }
+      }
       if (ageType === 1) {
         this.formInline2.AAA40_START = ageStart
         this.formInline2.AAA40_END = ageEnd
@@ -294,6 +314,7 @@ export default {
         ageType: 2,
         TIWEN_START: '',
         TIWEN_END: '',
+        TIWEN_FIELD: '',
         field: [{
           select_type: 0,
           key: '',