|
@@ -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;
|