Browse Source

营养评估和营养筛选

chenying2100 1 month ago
parent
commit
6f7b16cf23

+ 1 - 0
src/api/system/screeningAssessmentConfig/types.ts

@@ -49,6 +49,7 @@ export interface QuestionAttrVO {
   score?: string;
   img?: string;
   allowFillBlank?: boolean;
+  matrixFillBlank?: string;
   unit?: string;
   optionContent?: string;
   optionFlag?: boolean;

+ 272 - 54
src/views/patients/evaluation/add.vue

@@ -11,6 +11,41 @@
     </el-card>
 
     <el-card>
+      <!-- 基本信息 -->
+      <template v-if="form.baseInfo">
+        <div style="margin-bottom: 10px; padding-top: 20px;" class="zebra-row">
+          <el-row>
+            <el-col :span="24">
+              <span style="color: #f56c6c; margin-right: 4px;">*</span>
+              <span style="font-weight: bold;">{{'1. '+ form.baseInfo.title }}</span>
+            </el-col>
+          </el-row>
+          <el-row style="margin-bottom: 20px;margin-top: 8px;">
+            <el-col :span="24">
+              <el-form :inline="true" label-width="100px">
+                <template v-for="ctl,n in form.baseInfo.contentList">
+                  <el-form-item :label="ctl.label">
+                    <template v-if="ctl.nameEn=='birthDate'||ctl.nameEn=='admissionDate'">
+                      <el-date-picker v-model="ctl.value" type="date" placeholder="请选择" />
+                    </template>
+                    <template v-else-if="ctl.nameEn=='gender'">
+                      <el-select v-model="ctl.value" placeholder="请选择" :disabled="isView">
+                        <el-option v-for="dict in sys_user_sex" :key="dict.value" :label="dict.label"
+                          :value="dict.value"></el-option>
+                      </el-select>
+                    </template>
+                    <template v-else>
+                      <el-input clearable v-model="ctl.value" :disabled="isView" />
+                    </template>
+                  </el-form-item>
+                </template>
+              </el-form>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <!-- 基本信息 -->
+
       <template v-for="item,idx in form.otherInfo">
         <template v-if="item.questionChildType == 'singleChoice'">
           <template v-if="item.arrangement == '2'">
@@ -19,7 +54,7 @@
               <el-row>
                 <el-col :span="24">
                   <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                  <span style="font-weight: bold;">{{ item.title }}</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+item.title}}</span>
                 </el-col>
               </el-row>
               <el-row style="margin-bottom: 20px;">
@@ -27,12 +62,16 @@
                   <div class="radio-card">
                     <el-radio-group v-model="item.value" style="margin-top: 8px;">
                       <template v-for="ctl,i in item.contentList">
-                        <el-radio :label="ctl.label" :value="i" :disabled="isView">
+                        <el-radio :label="ctl.label" :value="i" :disabled="isView"
+                          :style="{'margin-top':ctl.img!=null?'20px':'0px'}">
                           <span class="option-content">
                             <span v-if="ctl.img" class="option-img">
                               <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
                             </span>
                             <span>{{ ctl.label }}</span>
+                            <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                              <el-input v-model="ctl.value" clearable :disabled="isView" />
+                            </span>
                           </span>
                         </el-radio>
                       </template>
@@ -48,7 +87,7 @@
               <el-row>
                 <el-col :span="24">
                   <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                  <span style="font-weight: bold;">{{ item.title }}</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                   <el-radio-group v-model="item.value" class="horizontal-radio-group" style="margin-top: 8px;">
                     <template v-for="ctl,i in item.contentList">
                       <el-radio :label="ctl.label" :value="i" :disabled="isView">
@@ -57,6 +96,9 @@
                             <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
                           </span>
                           <span>{{ ctl.label }}</span>
+                          <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                            <el-input v-model="ctl.value" clearable :disabled="isView" />
+                          </span>
                         </span>
                       </el-radio>
                     </template>
@@ -73,7 +115,7 @@
               <el-row>
                 <el-col :span="24">
                   <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                  <span style="font-weight: bold;">{{ item.title }}</span>
+                  <span style="font-weight: bold;">{{ idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+item.title }}</span>
                 </el-col>
               </el-row>
               <el-row style="margin-bottom: 20px;">
@@ -81,12 +123,16 @@
                   <div class="checkbox-vertical-card">
                     <el-checkbox-group v-model="item.value" style="margin-top: 8px;">
                       <template v-for="ctl,i in item.contentList">
-                        <el-checkbox :label="ctl.label" :value="i" :disabled="isView">
+                        <el-checkbox :label="ctl.label" :value="i" :disabled="isView"
+                          :style="{'margin-top':ctl.img!=null?'20px':'0px'}">
                           <span class="option-content">
                             <span v-if="ctl.img" class="option-img">
                               <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
                             </span>
                             <span>{{ ctl.label }}</span>
+                            <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                              <el-input v-model="ctl.value" clearable :disabled="isView" />
+                            </span>
                           </span>
                         </el-checkbox>
                       </template>
@@ -102,7 +148,7 @@
               <el-row>
                 <el-col :span="24">
                   <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                  <span style="font-weight: bold;">{{ item.title }}</span>
+                  <span style="font-weight: bold;">{{ idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+item.title }}</span>
                   <el-checkbox-group v-model="item.value" class="horizontal-checkbox-group" style="margin-top: 8px;">
                     <template v-for="ctl,i in item.contentList">
                       <el-checkbox :label="ctl.label" :value="i" :disabled="isView">
@@ -111,6 +157,9 @@
                             <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
                           </span>
                           <span>{{ ctl.label }}</span>
+                          <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                            <el-input v-model="ctl.value" clearable :disabled="isView" />
+                          </span>
                         </span>
                       </el-checkbox>
                     </template>
@@ -121,27 +170,25 @@
           </template>
         </template>
 
-
-        <!-- //////////////////////////////////////////////////////////////////// -->
-        <!-- <template v-if="item.questionChildType == 'fillBlanks'">
+        <template v-if="item.questionChildType == 'fillBlanks'">
           <template v-if="item.arrangement == '2'">
             <div style="margin-bottom: 10px; padding-top: 20px;"
               :style="{'border-top':idx==0?'none':'1px dashed #e5e7eb'}" class="zebra-row">
               <el-row>
                 <el-col :span="24">
                   <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                  <span style="font-weight: bold;">{{ item.title }}</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                 </el-col>
               </el-row>
-              <el-row style="margin-bottom: 20px;">
-                <el-col :span="24">
-                  <el-form>
-                    <el-form-item prop="patientNo" label="姓名/门诊号/住院号">
-                      <el-input placeholder="姓名/门诊号/住院号" clearable />
-                    </el-form-item>
-                    <el-form-item prop="patientNo" label="姓名/门诊号/住院号">
-                      <el-input placeholder="姓名/门诊号/住院号" clearable />
-                    </el-form-item>
+              <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                <el-col :span="8">
+                  <el-form label-width="100px">
+                    <template v-for="ctl,n in item.contentList">
+                      <el-form-item :label="ctl.label">
+                        <el-input clearable v-model="ctl.value" :disabled="isView" />
+                        <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
+                      </el-form-item>
+                    </template>
                   </el-form>
                 </el-col>
               </el-row>
@@ -153,32 +200,25 @@
               <el-row>
                 <el-col :span="24">
                   <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                  <span style="font-weight: bold;">{{ item.title }}</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                 </el-col>
               </el-row>
-              <el-row style="margin-bottom: 20px;">
+              <el-row style="margin-bottom: 20px;margin-top: 8px;">
                 <el-col :span="24">
-                  <el-form  :inline="true" label-width="150px">
-                    <el-form-item label="A">
-                      <el-input placeholder="姓名/门诊号/住院号" clearable />
-                    </el-form-item>
-                    <el-form-item label="B">
-                      <el-input placeholder="姓名/门诊号/住院号" clearable />
-                    </el-form-item>
-                    <el-form-item label="C">
-                      <el-input placeholder="姓名/门诊号/住院号" clearable />
-                    </el-form-item>
-                    <el-form-item label="D">
-                      <el-input placeholder="姓名/门诊号/住院号" clearable />
-                    </el-form-item>
+                  <el-form :inline="true" label-width="100px">
+                    <template v-for="ctl,n in item.contentList">
+                      <el-form-item :label="ctl.label">
+                        <el-input clearable v-model="ctl.value" :disabled="isView" />
+                        <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
+                      </el-form-item>
+                    </template>
                   </el-form>
                 </el-col>
               </el-row>
             </div>
           </template>
-        </template> -->
+        </template>
 
-        <!-- //////////////////////////////////////////////////////////////////// -->
 
         <template v-if="item.questionChildType == 'scaleQuestions'">
           <div style="margin-bottom: 10px;  padding-top: 20px;"
@@ -186,11 +226,11 @@
             <el-row>
               <el-col :span="24">
                 <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                <span style="font-weight: bold;">{{ item.title }}</span>
+                <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                 <div style="overflow-x: scroll;margin-top: 8px;margin-left: 30px;">
                   <div class="custom-radio-grid">
                     <div v-for="ctl,n in item.contentList" :key="n" @click="selectScaleQuestions(idx,n)"
-                      :class="['custom-radio-cell', {'is-selected':ctl.value!=null,'cell': item.contentList.length === n+1, 'is-last': n+1 > 1 }]">
+                      :class="['custom-radio-cell', {'my-selected':ctl.value!=null,'cell': item.contentList.length === n+1, 'is-last': n+1 > 1 }]">
                       {{ n+1 }}
                     </div>
                   </div>
@@ -213,7 +253,7 @@
             <el-row>
               <el-col :span="24">
                 <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                <span style="font-weight: bold;">{{ item.title }}</span>
+                <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                 <div style="border-bottom: 1px solid #e5e7eb;width: 98%;margin-left: 30px;">
                   <el-row :gutter="10" class="mb8">
                     <el-col :span="3" style="margin-top: 30px;">
@@ -243,6 +283,11 @@
                           </template>
                         </el-col>
                       </template>
+                      <el-col :span="3" style="margin-top: 10px;">
+                        <span v-if="clt.allowFillBlank">
+                          <el-input v-model="clt.matrixFillBlank" clearable :disabled="isView" />
+                        </span>
+                      </el-col>
                     </el-row>
                   </template>
                 </div>
@@ -251,6 +296,133 @@
           </div>
         </template>
 
+
+        <!-- 其他:人体测量、膳食状况、营养生化检查 -->
+        <template v-if="item.questionChildType == 'anthropometry'">
+          <template v-if="item.lastType == '1'||item.lastType == '3'">
+            <div style="margin-bottom: 10px; padding-top: 20px;"
+              :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+              <el-row>
+                <el-col :span="24">
+                  <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                </el-col>
+              </el-row>
+              <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                <el-col :span="24">
+                  <el-form :inline="true" label-width="120px">
+                    <template v-for="ctl,n in item.contentList">
+                      <el-form-item :label="ctl.label">
+                        <el-input clearable v-model="ctl.value" :disabled="isView" />
+                      </el-form-item>
+                    </template>
+                  </el-form>
+                </el-col>
+              </el-row>
+            </div>
+          </template>
+          <template v-else>
+            <div style="margin-bottom: 10px; padding-top: 20px;"
+              :style="{'border-top':idx==0?'none':'1px dashed #e5e7eb'}" class="zebra-row">
+              <el-row>
+                <el-col :span="24">
+                  <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                  <el-radio-group v-model="item.value" class="horizontal-radio-group" style="margin-top: 8px;">
+                    <template v-for="ctl,i in item.contentList">
+                      <el-radio :label="ctl.label" :value="i" :disabled="isView">
+                        <span class="option-content">
+                          <span v-if="ctl.img" class="option-img">
+                            <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
+                          </span>
+                          <span>{{ ctl.label }}</span>
+                          <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                            <el-input v-model="ctl.value" clearable :disabled="isView" />
+                          </span>
+                        </span>
+                      </el-radio>
+                    </template>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+          </template>
+        </template>
+
+
+        <template v-if="item.questionChildType == 'dietaryStatus'">
+          <template v-if="item.lastType != '2'">
+            <div style="margin-bottom: 10px; padding-top: 20px;"
+              :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+              <el-row>
+                <el-col :span="24">
+                  <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                </el-col>
+              </el-row>
+              <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                <el-col :span="24">
+                  <el-form :inline="true" label-width="120px">
+                    <template v-for="ctl,n in item.contentList">
+                      <el-form-item :label="ctl.label">
+                        <el-input clearable v-model="ctl.value" :disabled="isView" />
+                      </el-form-item>
+                    </template>
+                  </el-form>
+                </el-col>
+              </el-row>
+            </div>
+          </template>
+          <template v-else>
+            <div style="margin-bottom: 10px; padding-top: 20px;"
+              :style="{'border-top':idx==0?'none':'1px dashed #e5e7eb'}" class="zebra-row">
+              <el-row>
+                <el-col :span="24">
+                  <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                  <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                  <el-radio-group v-model="item.value" class="horizontal-radio-group" style="margin-top: 8px;">
+                    <template v-for="ctl,i in item.contentList">
+                      <el-radio :label="ctl.label" :value="i" :disabled="isView">
+                        <span class="option-content">
+                          <span v-if="ctl.img" class="option-img">
+                            <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true" />
+                          </span>
+                          <span>{{ ctl.label }}</span>
+                          <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                            <el-input v-model="ctl.value" clearable :disabled="isView" />
+                          </span>
+                        </span>
+                      </el-radio>
+                    </template>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+          </template>
+        </template>
+
+
+        <template v-if="item.questionChildType == 'nutritionalBiochemical'">
+          <div style="margin-bottom: 10px; padding-top: 20px;"
+            :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+            <el-row>
+              <el-col :span="24">
+                <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+              </el-col>
+            </el-row>
+            <el-row style="margin-bottom: 20px;margin-top: 8px;">
+              <el-col :span="24">
+                <el-form :inline="true" label-width="120px">
+                  <el-form-item :label="item.title">
+                    <el-input clearable v-model="item.value" :disabled="isView" />
+                  </el-form-item>
+                </el-form>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <!-- 其他:人体测量、膳食状况、营养生化检查 -->
       </template>
     </el-card>
 
@@ -273,6 +445,7 @@ import {  getScreeningAssessmentConfig } from '@/api/system/screeningAssessmentC
 import {ScreeningAssessmentConfigForm} from '@/api/system/screeningAssessmentConfig/types';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
 
 let paramForm = ref<EvaluationForm>({});
  
@@ -312,23 +485,68 @@ const close = async () => {
 
 /** 提交按钮 */
 const submitForm = async () => {
-    for (let i = 0, len = form.value.otherInfo.length; i < len; i++) {
-        let item = form.value.otherInfo[i];
-        if (item.required && (item.value == null || item.value == undefined)) {
-            proxy?.$modal.msgError("请确保必填项(第" + (i + 1) + "题)不为空");
-            return;
-        }
+  if (form.value.baseInfo) {
+    for (let i = 0, len = form.value.baseInfo.contentList.length; i < len; i++) {
+      let item = form.value.baseInfo.contentList[i];       
+      if (item.value == null || item.value == undefined) {        
+        proxy?.$modal.msgError(item.label+"不为空");
+        return;
+      }
     }
+  }
 
-    buttonLoading.value = true;    
-    paramForm.value.content = JSON.stringify(form.value);
-    if (paramForm.value.id) {
-        await updateEvaluation(paramForm.value).finally(() => buttonLoading.value = false);
-    } else {
-        await addEvaluation(paramForm.value).finally(() => buttonLoading.value = false);
+  if (form.value.otherInfo) {
+        for (let i = 0, len = form.value.otherInfo.length; i < len; i++) {
+            let item = form.value.otherInfo[i];
+            if (item.questionType == 'otherInfo') {
+                if (item.questionChildType == 'anthropometry') {
+                    if (item.lastType == '1' || item.lastType == '3') {
+                        for (let k = 0, len = item.contentList.length; k < len; k++) {
+                            if (item.contentList[k].value == null || item.contentList[k].value == undefined) {
+                                proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)[" + item.contentList[k].label + "]不为空");
+                                return;
+                            }
+                        }
+                    } else if (item.value == null || item.value == undefined) {
+                        proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                        return;
+                    }
+                } else if (item.questionChildType == 'dietaryStatus') {
+                    if (item.lastType != '2') {
+                        for (let k = 0, len = item.contentList.length; k < len; k++) {
+                            if (item.contentList[k].value == null || item.contentList[k].value == undefined) {
+                                proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)[" + item.contentList[k].label + "]不为空");
+                                return;
+                            }
+                        }
+                    } else if (item.value == null || item.value == undefined) {
+                        proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                        return;
+                    }
+                } else {
+                    if (item.value == null || item.value == undefined) {
+                        proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                        return;
+                    }
+                }
+            } else {
+                if (item.required && (item.value == null || item.value == undefined)) {
+                    proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                    return;
+                }
+            }
+        }
     }
-    proxy?.$modal.msgSuccess("操作成功");
-    close();
+
+  buttonLoading.value = true;
+  paramForm.value.content = JSON.stringify(form.value);
+  if (paramForm.value.id) {
+    await updateEvaluation(paramForm.value).finally(() => buttonLoading.value = false);
+  } else {
+    await addEvaluation(paramForm.value).finally(() => buttonLoading.value = false);
+  }
+  proxy?.$modal.msgSuccess("操作成功");
+  close();
 }
 
  
@@ -506,7 +724,7 @@ onMounted(() => {
 }
 
 
-.is-selected {
+.my-selected {
   background-color: #ccf0a4;   /* Element Plus 主色 */
   color: #fff;  
   border-radius: 6px;

+ 319 - 33
src/views/patients/screening/add.vue

@@ -12,6 +12,41 @@
         </el-card>
 
         <el-card>
+            <!-- 基本信息 -->
+            <template v-if="form.baseInfo">
+                <div style="margin-bottom: 10px; padding-top: 20px;" class="zebra-row">
+                    <el-row>
+                        <el-col :span="24">
+                            <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                            <span style="font-weight: bold;">{{'1. '+  form.baseInfo.title }}</span>
+                        </el-col>
+                    </el-row>
+                    <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                        <el-col :span="24">
+                            <el-form :inline="true" label-width="100px">
+                                <template v-for="ctl,n in form.baseInfo.contentList">
+                                    <el-form-item :label="ctl.label">
+                                        <template v-if="ctl.nameEn=='birthDate'||ctl.nameEn=='admissionDate'">
+                                            <el-date-picker v-model="ctl.value" type="date" placeholder="请选择" :disabled="isView"/>
+                                        </template>
+                                        <template v-else-if="ctl.nameEn=='gender'">
+                                            <el-select v-model="ctl.value" placeholder="请选择" :disabled="isView">
+                                                <el-option v-for="dict in sys_user_sex" :key="dict.value"
+                                                    :label="dict.label" :value="dict.value"></el-option>
+                                            </el-select>
+                                        </template>
+                                        <template v-else>
+                                            <el-input clearable v-model="ctl.value" :disabled="isView" />
+                                        </template>
+                                    </el-form-item>
+                                </template>
+                            </el-form>
+                        </el-col>
+                    </el-row>
+                </div>
+            </template>
+            <!-- 基本信息 -->
+
             <template v-for="item,idx in form.otherInfo">
                 <template v-if="item.questionChildType == 'singleChoice'">
                     <template v-if="item.arrangement == '2'">
@@ -20,7 +55,7 @@
                             <el-row>
                                 <el-col :span="24">
                                     <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                                    <span style="font-weight: bold;">{{ item.title }}</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                                 </el-col>
                             </el-row>
                             <el-row style="margin-bottom: 20px;">
@@ -35,6 +70,10 @@
                                                                 :disabled="true" />
                                                         </span>
                                                         <span>{{ ctl.label }}</span>
+                                                        <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                                                            <el-input v-model="ctl.value" clearable
+                                                                :disabled="isView" />
+                                                        </span>
                                                     </span>
                                                 </el-radio>
                                             </template>
@@ -50,18 +89,21 @@
                             <el-row>
                                 <el-col :span="24">
                                     <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                                    <span style="font-weight: bold;">{{ item.title }}</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                                     <el-radio-group v-model="item.value" class="horizontal-radio-group"
                                         style="margin-top: 8px;">
                                         <template v-for="ctl,i in item.contentList">
                                             <el-radio :label="ctl.label" :value="i" :disabled="isView">
                                                 <span class="option-content">
-                                                        <span v-if="ctl.img" class="option-img">
-                                                            <miniImageUpload :limit="1" v-model="ctl.img"
-                                                                :disabled="true" />
-                                                        </span>
-                                                        <span>{{ ctl.label }}</span>
+                                                    <span v-if="ctl.img" class="option-img">
+                                                        <miniImageUpload :limit="1" v-model="ctl.img"
+                                                            :disabled="true" />
                                                     </span>
+                                                    <span>{{ ctl.label }}</span>
+                                                    <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                                                        <el-input v-model="ctl.value" clearable :disabled="isView" />
+                                                    </span>
+                                                </span>
                                             </el-radio>
                                         </template>
                                     </el-radio-group>
@@ -77,7 +119,7 @@
                             <el-row>
                                 <el-col :span="24">
                                     <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                                    <span style="font-weight: bold;">{{ item.title }}</span>
+                                    <span style="font-weight: bold;">{{ idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+item.title }}</span>
                                 </el-col>
                             </el-row>
                             <el-row style="margin-bottom: 20px;">
@@ -92,6 +134,10 @@
                                                                 :disabled="true" />
                                                         </span>
                                                         <span>{{ ctl.label }}</span>
+                                                        <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                                                            <el-input v-model="ctl.value" clearable
+                                                                :disabled="isView" />
+                                                        </span>
                                                     </span>
                                                 </el-checkbox>
                                             </template>
@@ -107,18 +153,21 @@
                             <el-row>
                                 <el-col :span="24">
                                     <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                                    <span style="font-weight: bold;">{{ item.title }}</span>
+                                    <span style="font-weight: bold;">{{ idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+item.title }}</span>
                                     <el-checkbox-group v-model="item.value" class="horizontal-checkbox-group"
                                         style="margin-top: 8px;">
                                         <template v-for="ctl,i in item.contentList">
                                             <el-checkbox :label="ctl.label" :value="i" :disabled="isView">
                                                 <span class="option-content">
-                                                        <span v-if="ctl.img" class="option-img">
-                                                            <miniImageUpload :limit="1" v-model="ctl.img"
-                                                                :disabled="true" />
-                                                        </span>
-                                                        <span>{{ ctl.label }}</span>
+                                                    <span v-if="ctl.img" class="option-img">
+                                                        <miniImageUpload :limit="1" v-model="ctl.img"
+                                                            :disabled="true" />
+                                                    </span>
+                                                    <span>{{ ctl.label }}</span>
+                                                    <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                                                        <el-input v-model="ctl.value" clearable :disabled="isView" />
                                                     </span>
+                                                </span>
                                             </el-checkbox>
                                         </template>
                                     </el-checkbox-group>
@@ -128,18 +177,71 @@
                     </template>
                 </template>
 
+
+                <template v-if="item.questionChildType == 'fillBlanks'">
+                    <template v-if="item.arrangement == '2'">
+                        <div style="margin-bottom: 10px; padding-top: 20px;"
+                            :style="{'border-top':idx==0?'none':'1px dashed #e5e7eb'}" class="zebra-row">
+                            <el-row>
+                                <el-col :span="24">
+                                    <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                                </el-col>
+                            </el-row>
+                            <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                                <el-col :span="8">
+                                    <el-form label-width="100px">
+                                        <template v-for="ctl,n in item.contentList">
+                                            <el-form-item :label="ctl.label">
+                                                <el-input clearable v-model="ctl.value" :disabled="isView" />
+                                                <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true"
+                                                    v-if="ctl.img" />
+                                            </el-form-item>
+                                        </template>
+                                    </el-form>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </template>
+                    <template v-else>
+                        <div style="margin-bottom: 10px; padding-top: 20px;"
+                            :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+                            <el-row>
+                                <el-col :span="24">
+                                    <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                                </el-col>
+                            </el-row>
+                            <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                                <el-col :span="24">
+                                    <el-form :inline="true" label-width="100px">
+                                        <template v-for="ctl,n in item.contentList">
+                                            <el-form-item :label="ctl.label">
+                                                <el-input clearable v-model="ctl.value" :disabled="isView" />
+                                                <miniImageUpload :limit="1" v-model="ctl.img" :disabled="true"
+                                                    v-if="ctl.img" />
+                                            </el-form-item>
+                                        </template>
+                                    </el-form>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </template>
+                </template>
+
+
                 <template v-if="item.questionChildType == 'scaleQuestions'">
                     <div style="margin-bottom: 10px;  padding-top: 20px;"
                         :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
                         <el-row>
                             <el-col :span="24">
                                 <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                                <span style="font-weight: bold;">{{ item.title }}</span>
+                                <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                                 <div style="overflow-x: scroll;margin-top: 8px;margin-left: 30px;">
                                     <div class="custom-radio-grid">
                                         <div v-for="ctl,n in item.contentList" :key="n"
                                             @click="selectScaleQuestions(idx,n)"
-                                            :class="['custom-radio-cell', {'is-selected':ctl.value!=null,'cell': item.contentList.length === n+1, 'is-last': n+1 > 1 }]">
+                                            :class="['custom-radio-cell', {'my-selected':ctl.value!=null,'cell': item.contentList.length === n+1, 'is-last': n+1 > 1 }]">
                                             {{ n+1 }}
                                         </div>
                                     </div>
@@ -162,7 +264,7 @@
                         <el-row>
                             <el-col :span="24">
                                 <span style="color: #f56c6c; margin-right: 4px;" v-show="item.required">*</span>
-                                <span style="font-weight: bold;">{{ item.title }}</span>
+                                <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
                                 <div style="border-bottom: 1px solid #e5e7eb;width: 98%;margin-left: 30px;">
                                     <el-row :gutter="10" class="mb8">
                                         <el-col :span="3" style="margin-top: 30px;">
@@ -185,14 +287,18 @@
                                                 </template>
                                             </el-col>
                                             <template v-for="clt2, i2 in item.contentList">
-                                                <el-col :span="1" align="center" style="margin-left: 15px;">
-                                                    <template v-if="clt2.optionFlag && clt.labelFlag">
-                                                        <el-radio-group v-model="clt.value" :disabled="isView">
-                                                            <el-radio :value="(i1+1)*1000+i2" size="large" />
-                                                        </el-radio-group>
-                                                    </template>
+                                                <el-col :span="1" align="center" style="margin-left: 15px;"
+                                                    v-if="clt2.optionFlag && clt.labelFlag">
+                                                    <el-radio-group v-model="clt.value" :disabled="isView">
+                                                        <el-radio :value="(i1 + 1) * 1000 + i2" size="large" />
+                                                    </el-radio-group>
                                                 </el-col>
                                             </template>
+                                            <el-col :span="3" style="margin-top: 10px;">
+                                                <span v-if="clt.allowFillBlank">
+                                                    <el-input v-model="clt.matrixFillBlank" clearable :disabled="isView" />
+                                                </span>
+                                            </el-col>
                                         </el-row>
                                     </template>
                                 </div>
@@ -201,6 +307,137 @@
                     </div>
                 </template>
 
+                <!-- 其他:人体测量、膳食状况、营养生化检查 -->
+                <template v-if="item.questionChildType == 'anthropometry'">
+                    <template v-if="item.lastType == '1'||item.lastType == '3'">
+                        <div style="margin-bottom: 10px; padding-top: 20px;"
+                            :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+                            <el-row>
+                                <el-col :span="24">
+                                    <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                                </el-col>
+                            </el-row>
+                            <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                                <el-col :span="24">
+                                    <el-form :inline="true" label-width="120px">
+                                        <template v-for="ctl,n in item.contentList">
+                                            <el-form-item :label="ctl.label">
+                                                <el-input clearable v-model="ctl.value" :disabled="isView" />
+                                            </el-form-item>
+                                        </template>
+                                    </el-form>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </template>
+                    <template v-else>
+                        <div style="margin-bottom: 10px; padding-top: 20px;"
+                            :style="{'border-top':idx==0?'none':'1px dashed #e5e7eb'}" class="zebra-row">
+                            <el-row>
+                                <el-col :span="24">
+                                    <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                                    <el-radio-group v-model="item.value" class="horizontal-radio-group"
+                                        style="margin-top: 8px;">
+                                        <template v-for="ctl,i in item.contentList">
+                                            <el-radio :label="ctl.label" :value="i" :disabled="isView">
+                                                <span class="option-content">
+                                                    <span v-if="ctl.img" class="option-img">
+                                                        <miniImageUpload :limit="1" v-model="ctl.img"
+                                                            :disabled="true" />
+                                                    </span>
+                                                    <span>{{ ctl.label }}</span>
+                                                    <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                                                        <el-input v-model="ctl.value" clearable :disabled="isView" />
+                                                    </span>
+                                                </span>
+                                            </el-radio>
+                                        </template>
+                                    </el-radio-group>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </template>
+                </template>
+
+
+                <template v-if="item.questionChildType == 'dietaryStatus'">
+                    <template v-if="item.lastType != '2'">
+                        <div style="margin-bottom: 10px; padding-top: 20px;"
+                            :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+                            <el-row>
+                                <el-col :span="24">
+                                    <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                                </el-col>
+                            </el-row>
+                            <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                                <el-col :span="24">
+                                    <el-form :inline="true" label-width="120px">
+                                        <template v-for="ctl,n in item.contentList">
+                                            <el-form-item :label="ctl.label">
+                                                <el-input clearable v-model="ctl.value" :disabled="isView" />
+                                            </el-form-item>
+                                        </template>
+                                    </el-form>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </template>
+                    <template v-else>
+                        <div style="margin-bottom: 10px; padding-top: 20px;"
+                            :style="{'border-top':idx==0?'none':'1px dashed #e5e7eb'}" class="zebra-row">
+                            <el-row>
+                                <el-col :span="24">
+                                    <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                                    <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                                    <el-radio-group v-model="item.value" class="horizontal-radio-group"
+                                        style="margin-top: 8px;">
+                                        <template v-for="ctl,i in item.contentList">
+                                            <el-radio :label="ctl.label" :value="i" :disabled="isView">
+                                                <span class="option-content">
+                                                    <span v-if="ctl.img" class="option-img">
+                                                        <miniImageUpload :limit="1" v-model="ctl.img"
+                                                            :disabled="true" />
+                                                    </span>
+                                                    <span>{{ ctl.label }}</span>
+                                                    <span v-if="ctl.allowFillBlank" style="margin-left: 10px;">
+                                                        <el-input v-model="ctl.value" clearable :disabled="isView" />
+                                                    </span>
+                                                </span>
+                                            </el-radio>
+                                        </template>
+                                    </el-radio-group>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </template>
+                </template>
+
+
+                <template v-if="item.questionChildType == 'nutritionalBiochemical'">
+                    <div style="margin-bottom: 10px; padding-top: 20px;"
+                        :style="{ 'border-top': idx == 0 ? 'none' : '1px dashed #e5e7eb' }" class="zebra-row">
+                        <el-row>
+                            <el-col :span="24">
+                                <span style="color: #f56c6c; margin-right: 4px;">*</span>
+                                <span style="font-weight: bold;">{{idx + 1 + (form.baseInfo&&form.baseInfo.contentList&&form.baseInfo.contentList.length>0?1:0) +'. '+ item.title }}</span>
+                            </el-col>
+                        </el-row>
+                        <el-row style="margin-bottom: 20px;margin-top: 8px;">
+                            <el-col :span="24">
+                                <el-form :inline="true" label-width="120px">
+                                    <el-form-item :label="item.title">
+                                        <el-input clearable v-model="item.value" :disabled="isView" />
+                                    </el-form-item>
+                                </el-form>
+                            </el-col>
+                        </el-row>
+                    </div>
+                </template>
+                <!-- 其他:人体测量、膳食状况、营养生化检查 -->
+
             </template>
         </el-card>
 
@@ -224,6 +461,7 @@
   let paramForm = ref<ScreeningForm>({});
 
   const { proxy } = getCurrentInstance() as ComponentInternalInstance; 
+  const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
  
   const screeningName = ref(''); 
   const { patientInfo } = defineProps<{ patientInfo: any }>()
@@ -260,15 +498,63 @@ const close = async () => {
   
 /** 提交按钮 */
 const submitForm = async () => {
-    for (let i = 0, len = form.value.otherInfo.length; i < len; i++) {
-        let item = form.value.otherInfo[i];
-        if (item.required && (item.value == null || item.value == undefined)) {
-            proxy?.$modal.msgError("请确保必填项(第" + (i + 1) + "题)不为空");
-            return;
+    if (form.value.baseInfo) {
+        for (let i = 0, len = form.value.baseInfo.contentList.length; i < len; i++) {
+            let item = form.value.baseInfo.contentList[i];
+            if (item.value == null || item.value == undefined) {
+                proxy?.$modal.msgError(item.label + "不为空");
+                return;
+            }
+        }
+    }
+
+    if (form.value.otherInfo) {
+        for (let i = 0, len = form.value.otherInfo.length; i < len; i++) {
+            let item = form.value.otherInfo[i];
+            if (item.questionType == 'otherInfo') {
+                if (item.questionChildType == 'anthropometry') {
+                    if (item.lastType == '1' || item.lastType == '3') {
+                        for (let k = 0, len = item.contentList.length; k < len; k++) {
+                            if (item.contentList[k].value == null || item.contentList[k].value == undefined) {
+                                proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)[" + item.contentList[k].label + "]不为空");
+                                return;
+                            }
+                        }
+                    } else if (item.value == null || item.value == undefined) {
+                        proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                        return;
+                    }
+                } else if (item.questionChildType == 'dietaryStatus') {
+                    if (item.lastType != '2') {
+                        for (let k = 0, len = item.contentList.length; k < len; k++) {
+                            if (item.contentList[k].value == null || item.contentList[k].value == undefined) {
+                                proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)[" + item.contentList[k].label + "]不为空");
+                                return;
+                            }
+                        }
+                    } else if (item.value == null || item.value == undefined) {
+                        proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                        return;
+                    }
+                } else {
+                    if (item.value == null || item.value == undefined) {
+                        proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                        return;
+                    }
+                }
+            } else {
+                if (item.required && (item.value == null || item.value == undefined)) {
+                    proxy?.$modal.msgError("请确保必填项(第" + (i + 1 + (form.value.baseInfo ? 1 : 0)) + "题)不为空");
+                    return;
+                }
+            }
         }
     }
 
-    buttonLoading.value = true;    
+
+    
+
+    buttonLoading.value = true;
     paramForm.value.content = JSON.stringify(form.value);
     if (paramForm.value.id) {
         await updateScreening(paramForm.value).finally(() => buttonLoading.value = false);
@@ -280,7 +566,7 @@ const submitForm = async () => {
 }
  
 
-const selectScaleQuestions = async (idx:number, n:number) => {
+const selectScaleQuestions = async (idx:number, n:number) => {    
     if(isView.value){
         return;
     }
@@ -289,12 +575,12 @@ const selectScaleQuestions = async (idx:number, n:number) => {
         other.value = [];
     }
 
-    let ctl = other.contentList[n];
+    let ctl = other.contentList[n];     
     if (ctl.value!=null) {
         ctl.value = null;
         let newList=[];
         for (let i = 0, len = other.value.length; i < len; i++) {             
-            if (other.value[i] != n) {                
+            if (other.value[i] != n) {
                 newList.push(other.value[i]);
             }
         }
@@ -452,7 +738,7 @@ const selectScaleQuestions = async (idx:number, n:number) => {
 }
 
 
-.is-selected {
+.my-selected{
   background-color: #ccf0a4;   /* Element Plus 主色 */
   color: #fff;  
   border-radius: 6px;

+ 42 - 14
src/views/system/screeningAssessmentConfig/add.vue

@@ -212,7 +212,7 @@
                 <template v-if="other.questionType != 'questionTypeSelection'">
                   <el-row :gutter="10" class="mb8">
                     <el-col :span="12">
-                      <el-form-item :label="(index + 1 + baseInfo.contentList.length) + '. 标题:'" required>
+                      <el-form-item :label="(index + 1 + (baseInfo.contentList.length>0?1:0)) + '. 标题:'" required>
                         <el-input readonly style="width: 100%;" v-model="other.title" size="large" />
                       </el-form-item>
                     </el-col>
@@ -229,7 +229,7 @@
                 <template v-if="other.questionType == 'questionTypeSelection'">
                   <el-row :gutter="10" class="mb8">
                     <el-col :span="12">
-                      <el-form-item :label="(index + 1 + baseInfo.contentList.length) + '. 标题:'" required>
+                      <el-form-item :label="(index + 1 + (baseInfo.contentList.length>0?1:0)) + '. 标题:'" required>
                         <el-input style="width: 100%;" v-model="other.title" placeholder="请输入标题" size="large"
                           show-word-limit maxlength="150" />
                       </el-form-item>
@@ -604,6 +604,7 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import { listScreeningAssessmentConfig, getScreeningAssessmentConfig, delScreeningAssessmentConfig, addScreeningAssessmentConfig, updateScreeningAssessmentConfig } from '@/api/system/screeningAssessmentConfig';
 import { ScreeningAssessmentConfigVO, ScreeningAssessmentConfigQuery, ScreeningAssessmentConfigForm, QuestionAttrVO, QuestionVO } from '@/api/system/screeningAssessmentConfig/types';
+import { fa } from 'element-plus/es/locale/index.mjs';
 
 const route = useRoute();
 const showSystemParam = ref(true);
@@ -701,7 +702,10 @@ const getList = async () => {
       baseInfo.value = res.data.baseInfo;
     }
     if(res.data.otherInfo){
-      otherInfo.value = res.data.otherInfo;
+      otherInfo.value = res.data.otherInfo;      
+      otherInfo.value.forEach(item=>{
+        item.increment = item.contentList.length;                 
+      });
     }
   loading.value = false;
   }
@@ -768,18 +772,23 @@ const submitForm = () => {
       let lineNum=0;
       for (let item of otherInfo.value) {
         lineNum++;
-        if (!item.title || item.title.trim().length < 1) {       
-          proxy?.$modal.msgError("第"+(baseNum+lineNum)+"行标题为空");
+        if (!item.title || item.title.trim().length < 1) {
+          proxy?.$modal.msgError("第" + (baseNum + lineNum) + "行标题为空");
           return;
         }
+
         for (let ch of item.contentList) {
-          if (!ch.label || ch.label.trim().length < 1) {
-            proxy?.$modal.msgError("第"+(baseNum+lineNum)+"行标题的选项有空值");
-            return;
-          }
-          if (item.questionChildType=='matrixScale'&&(!ch.optionContent || ch.optionContent.trim().length < 1)) {
-            proxy?.$modal.msgError("第"+(baseNum+lineNum)+"行标题的选项内容为空");
-            return;
+          if (item.questionChildType == 'matrixScale') {
+            if ((ch.optionFlag && (!ch.optionContent || ch.optionContent.trim().length < 1))
+              || (ch.labelFlag && (!ch.label || ch.label.trim().length < 1))) {
+              proxy?.$modal.msgError("第" + (baseNum + lineNum) + "行标题的选项内容为空");
+              return;
+            }
+          } else {
+            if (!ch.label || ch.label.trim().length < 1) {
+              proxy?.$modal.msgError("第" + (baseNum + lineNum) + "行标题的选项有空值");
+              return;
+            }
           }
         }
       }
@@ -1431,12 +1440,12 @@ function handleMatrixScaleDelete(index: number, childIndex: number, isLeft: bool
   let other = otherInfo.value[index];
   let child = other.contentList[childIndex];
 
-  if (other.contentList.length == 0) {
+  if (other.contentList.length == 1) {
     if (isLeft) {
       if (!child.optionFlag) {
         other.contentList = [];
       } else {
-        child.label = undefined;
+        child.labelFlag = false;     
       }
     } else {
       if (!child.labelFlag) {
@@ -1448,6 +1457,25 @@ function handleMatrixScaleDelete(index: number, childIndex: number, isLeft: bool
     return;
   }
 
+  if (other.contentList.length == childIndex + 1) {
+    if (isLeft) {
+      if (!child.optionFlag) {
+        other.contentList.pop();
+      } else {
+        child.labelFlag = false;
+        child.label = undefined;
+      }
+    } else {
+      if (!child.labelFlag) {
+        other.contentList.pop();
+      } else {
+        child.optionFlag = false;
+        child.optionContent = undefined;
+      }
+    }
+    return;
+  }
+
   for (let i = childIndex + 1, len = other.contentList.length; i < len; i++) {
     let childPre = other.contentList[i - 1];
     child = other.contentList[i];

+ 1 - 1
vite.config.ts

@@ -29,7 +29,7 @@ export default defineConfig(({ mode, command }) => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          target: 'http://localhost:8080',
+          target: 'http://localhost:8081',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')