Browse Source

添加新冠抗原检测

lighter 2 years ago
parent
commit
c3fa69e179
1 changed files with 5 additions and 47 deletions
  1. 5 47
      src/views/hospital-service/covid-exam/SelectCovidBranch.vue

+ 5 - 47
src/views/hospital-service/covid-exam/SelectCovidBranch.vue

@@ -10,12 +10,7 @@
         核酸检测(单人单管)(<span style="color: darkorange">黄码</span>)
       </template>
     </van-cell>
-    <van-cell v-if="openMultipleExam" title="核酸检测自助开单(混检)" :value="timeLimit.limitValueForDisplay"
-              center is-link @click="handleClickExamOption(2)">
-      <template #label>
-        <span style="color: green; font-weight: bold">仅限绿码,</span><span style="color: orange">黄码请选择单人单管。</span>
-      </template>
-    </van-cell>
+    <van-cell title="新型冠状病毒抗原检测" is-link @click="handleClickExamOption(2)"></van-cell>
     <van-cell title="查询检测结果" is-link :to="'/checkCovidExamResult/' + patientId"></van-cell>
     <van-dialog v-model:show="showTips" title="核酸检测须知">
       <div style="padding: 12px">
@@ -28,11 +23,9 @@
 </template>
 
 <script>
-import {Dialog} from 'vant'
 import {useRouter} from 'vue-router'
-import {hasDoneCovidAssessment, getMultipleExamTimeLimit, savePrescription} from '../../../api/order-covid-exam'
-import {onMounted, ref} from 'vue'
-import {getHourMinute} from '../../../utils/date'
+import {savePrescription} from '../../../api/order-covid-exam'
+import {ref} from 'vue'
 
 export default {
   setup() {
@@ -41,51 +34,16 @@ export default {
     const patientId = router.currentRoute.value.params.patientId
     const timeLimit = ref({})
 
-    const validateMultipleExamTime = (flag) => {
-      return new Promise((resolve, reject) => {
-        if (flag !== 2) {
-          resolve()
-        } else {
-          const nowtime = getHourMinute();
-          if (nowtime < timeLimit.value.beginLimit || nowtime > timeLimit.value.endLimit) {
-            const message = '混检仅在 ' + timeLimit.value.limitValueForDisplay + ' 开放。'
-            Dialog.alert({
-              title: '提示',
-              message,
-            });
-            reject(message);
-          } else {
-            resolve();
-          }
-        }
-      })
-    }
-
     const handleClickExamOption = (flag) => {
-      validateMultipleExamTime(flag).then(() => {
-        savePrescription(patientId, flag).then(() => {
-          router.push(`/unPaidList/${patientId}`)
-        })
-      }).catch((message) => {
-        console.error(message)
+      savePrescription(patientId, flag).then(() => {
+        router.push(`/unPaidList/${patientId}`)
       })
     }
 
-    const openMultipleExam = ref(true)
-    onMounted(() => {
-      getMultipleExamTimeLimit().then(res => {
-        timeLimit.value = res
-        if (res.beginLimit === res.endLimit) {
-          openMultipleExam.value = false
-        }
-      })
-    })
-
     return {
       patientId,
       showTips,
       timeLimit,
-      openMultipleExam,
       handleClickExamOption,
     }
   },