Przeglądaj źródła

随访管理里的随访任务,没到开始时间上面方框有和没有选不了,但是留言可以输入,舌面舌下图片能上传。

张田田 8 miesięcy temu
rodzic
commit
c9885546b8
1 zmienionych plików z 29 dodań i 9 usunięć
  1. 29 9
      src/components/Follow.vue

+ 29 - 9
src/components/Follow.vue

@@ -35,7 +35,7 @@ onBeforeMount(() => {
 });
 const activeKey = ref<number>();
 const activeIndex = ref<number>();
-const activeObj = ref({ fillin: {}, symptomsData: [] });
+const activeObj = ref<any>({ fillin: {}, symptomsData: [] });
 // 切换侧边栏任务
 const changeTab = (data: any, index: number) => {
   activeKey.value = data.id;
@@ -276,12 +276,12 @@ const previewImg = ref<string>('');
             <!-- 症状选择器 -->
             <div class="symptom-container flex flex-wrap">
               <div v-for="item in activeObj?.symptomsData" :key="item.name" class="symptom-item">
-                <div class="symptom-button" @click="handleParentClick(item.name)">
+                <div class="symptom-button" @click="activeObj.progress !== '0' ? handleParentClick(item.name) : ''" :class="{ 'disabled': activeObj.progress === '0' }">
                   <span>{{ item.name }}</span>
                   <span v-if="item.selectedValue" class="selected-value">: {{ item.selectedValue }}</span>
                 </div>
                 <div v-show="symptomsValue.parent === item.name" class="symptom-options">
-                  <a-radio-group :model-value="item.selectedId" @change="handleChildChange" class="flex flex-wrap">
+                  <a-radio-group :model-value="item.selectedId" @change="activeObj.progress !== '0' ? handleChildChange : ''" class="flex flex-wrap" :disabled="activeObj.progress === '0'">
                     <a-radio :value="tag.value" v-for="tag in item.child" :key="tag.value" class="mr-4">
                       {{ tag.label }}
                     </a-radio>
@@ -309,7 +309,7 @@ const previewImg = ref<string>('');
           <div class="mb-8 ml-4 flex">
             <div v-for="symptoms in selectSymptomsData" :key="symptoms.name" class="mr-4" @click="activeObj?.progress === '1' ? changeTag(symptoms) : ''">
               <div>
-                <div class="border-solid b-1 w-20 text-center" :class="activeObj.fillin.isHaveNewSyndrome === symptoms.id ? 'bg-blue text-#fff' : ''">
+                <div class="border-solid b-1 w-20 text-center" :class="[activeObj.fillin.isHaveNewSyndrome === symptoms.id ? 'bg-blue text-#fff' : '', activeObj.progress === '0' ? 'disabled' : '']">
                   {{ symptoms.name }}
                 </div>
               </div>
@@ -320,14 +320,14 @@ const previewImg = ref<string>('');
         <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2" v-if="activeObj.fillin?.isHaveNewSyndrome === 'Y'">
           <div class="mb-3">3、请描述新的症状</div>
           <div class="mb-4 ml-4">
-            <a-input v-model:value="activeObj.fillin.newSyndrome" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="activeObj.progress === '2'" />
+            <a-input v-model:value="activeObj.fillin.newSyndrome" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="activeObj.progress === '2' || activeObj.progress === '0'" />
           </div>
         </div>
         <!--      第四个-->
         <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2">
           <div class="mb-3">4、如果有其他情况,请留言</div>
           <div class="mb-4 ml-4">
-            <a-input v-model:value="activeObj.fillin.otherDesc" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="activeObj.progress === '2'" />
+            <a-input v-model:value="activeObj.fillin.otherDesc" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="activeObj.progress === '2' || activeObj.progress === '0'" />
           </div>
         </div>
         <!--      第五个-->
@@ -345,7 +345,7 @@ const previewImg = ref<string>('');
                   @preview="handlePreview"
                   :maxCount="1"
                   :customRequest="customUpload"
-                  :disabled="activeObj.progress === '2'"
+                  :disabled="activeObj.progress === '2' || activeObj.progress === '0'"
                 >
                   <div v-if="upImgList.length < 1">
                     <plus-outlined />
@@ -362,7 +362,7 @@ const previewImg = ref<string>('');
                   @preview="handlePreview"
                   :maxCount="1"
                   :customRequest="customUpload"
-                  :disabled="activeObj.progress === '2'"
+                  :disabled="activeObj.progress === '2' || activeObj.progress === '0'"
                 >
                   <div v-if="downImageList.length < 1">
                     <plus-outlined />
@@ -379,7 +379,7 @@ const previewImg = ref<string>('');
                   @preview="handlePreview"
                   :maxCount="1"
                   :customRequest="customUpload"
-                  :disabled="activeObj.progress === '2'"
+                  :disabled="activeObj.progress === '2' || activeObj.progress === '0'"
                 >
                   <div v-if="faceImageList.length < 1">
                     <plus-outlined />
@@ -628,4 +628,24 @@ const previewImg = ref<string>('');
 .font-bold {
   font-weight: 600;
 }
+
+// 禁用状态样式
+.disabled {
+  opacity: 0.5;
+  cursor: not-allowed !important;
+  pointer-events: none;
+}
+
+.symptom-button.disabled {
+  background-color: #f5f5f5;
+  color: #999;
+  border-color: #d9d9d9;
+  cursor: not-allowed;
+}
+
+.symptom-button.disabled:hover {
+  border-color: #d9d9d9;
+  color: #999;
+  background-color: #f5f5f5;
+}
 </style>