|
@@ -256,6 +256,83 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
+ <!-- 益生菌种 -->
|
|
|
|
|
+ <view class="card" v-if="payload.probioticSpecies && payload.probioticSpecies.length">
|
|
|
|
|
+ <view class="card-title">益生菌种 ({{ payload.probioticSpecies.length }})</view>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.probioticSpecies" :key="idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.probioticSpecies[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.probioticSpecies[idx].abundance" />
|
|
|
|
|
+ <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
|
|
|
|
|
+ {{ statusText(flora.status) }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Taxonomy 分类(纲/目/科/属/种) -->
|
|
|
|
|
+ <view class="card" v-if="hasTaxonomyData()">
|
|
|
|
|
+ <view class="card-title">菌群分类组成 ({{ taxonomyTotalCount }})</view>
|
|
|
|
|
+ <view class="taxonomy-group" v-if="payload.taxonomyClass && payload.taxonomyClass.length">
|
|
|
|
|
+ <text class="taxonomy-group-label">菌纲 (Class)</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.taxonomyClass" :key="'c'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.taxonomyClass[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.taxonomyClass[idx].abundance" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="taxonomy-group" v-if="payload.taxonomyOrder && payload.taxonomyOrder.length">
|
|
|
|
|
+ <text class="taxonomy-group-label">菌目 (Order)</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.taxonomyOrder" :key="'o'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.taxonomyOrder[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.taxonomyOrder[idx].abundance" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="taxonomy-group" v-if="payload.taxonomyFamily && payload.taxonomyFamily.length">
|
|
|
|
|
+ <text class="taxonomy-group-label">菌科 (Family)</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.taxonomyFamily" :key="'f'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.taxonomyFamily[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.taxonomyFamily[idx].abundance" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="taxonomy-group" v-if="payload.taxonomyGenus && payload.taxonomyGenus.length">
|
|
|
|
|
+ <text class="taxonomy-group-label">菌属 (Genus)</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.taxonomyGenus" :key="'g'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.taxonomyGenus[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.taxonomyGenus[idx].abundance" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="taxonomy-group" v-if="payload.taxonomySpecies && payload.taxonomySpecies.length">
|
|
|
|
|
+ <text class="taxonomy-group-label">菌种 (Species)</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.taxonomySpecies" :key="'s'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.taxonomySpecies[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.taxonomySpecies[idx].abundance" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 病原菌 -->
|
|
|
|
|
+ <view class="card" v-if="hasPathogenData()">
|
|
|
|
|
+ <view class="card-title">病原菌 ({{ pathogenTotalCount }})</view>
|
|
|
|
|
+ <view class="pathogen-group" v-if="payload.pathogenGenus && payload.pathogenGenus.length">
|
|
|
|
|
+ <text class="pathogen-group-label">病原菌属</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.pathogenGenus" :key="'pg'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.pathogenGenus[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.pathogenGenus[idx].abundance" />
|
|
|
|
|
+ <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
|
|
|
|
|
+ {{ statusText(flora.status) }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="pathogen-group" v-if="payload.pathogenDetection && payload.pathogenDetection.length">
|
|
|
|
|
+ <text class="pathogen-group-label">病原菌检出</text>
|
|
|
|
|
+ <view class="flora-item" v-for="(flora, idx) in payload.pathogenDetection" :key="'pd'+idx">
|
|
|
|
|
+ <input class="flora-name" v-model="payload.pathogenDetection[idx].name" />
|
|
|
|
|
+ <input class="flora-abundance" type="digit" v-model="payload.pathogenDetection[idx].abundance" />
|
|
|
|
|
+ <view class="status-tag" :class="'status-' + _cssClass(flora.status)">
|
|
|
|
|
+ {{ statusText(flora.status) }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
|
<view class="action-row">
|
|
<view class="action-row">
|
|
|
<view class="btn-discard" @click="doDiscard">
|
|
<view class="btn-discard" @click="doDiscard">
|
|
@@ -287,6 +364,13 @@ export default {
|
|
|
indicators: [],
|
|
indicators: [],
|
|
|
gutFlora: [],
|
|
gutFlora: [],
|
|
|
probioticSpecies: [],
|
|
probioticSpecies: [],
|
|
|
|
|
+ taxonomyClass: [],
|
|
|
|
|
+ taxonomyOrder: [],
|
|
|
|
|
+ taxonomyFamily: [],
|
|
|
|
|
+ taxonomyGenus: [],
|
|
|
|
|
+ taxonomySpecies: [],
|
|
|
|
|
+ pathogenGenus: [],
|
|
|
|
|
+ pathogenDetection: [],
|
|
|
foods: [],
|
|
foods: [],
|
|
|
diseaseRisks: []
|
|
diseaseRisks: []
|
|
|
},
|
|
},
|
|
@@ -384,6 +468,19 @@ export default {
|
|
|
if (this.isAbnormalStatus(list[i].status)) count++
|
|
if (this.isAbnormalStatus(list[i].status)) count++
|
|
|
}
|
|
}
|
|
|
return count
|
|
return count
|
|
|
|
|
+ },
|
|
|
|
|
+ taxonomyTotalCount() {
|
|
|
|
|
+ var total = 0
|
|
|
|
|
+ total += (this.payload.taxonomyClass || []).length
|
|
|
|
|
+ total += (this.payload.taxonomyOrder || []).length
|
|
|
|
|
+ total += (this.payload.taxonomyFamily || []).length
|
|
|
|
|
+ total += (this.payload.taxonomyGenus || []).length
|
|
|
|
|
+ total += (this.payload.taxonomySpecies || []).length
|
|
|
|
|
+ return total
|
|
|
|
|
+ },
|
|
|
|
|
+ pathogenTotalCount() {
|
|
|
|
|
+ return (this.payload.pathogenGenus || []).length +
|
|
|
|
|
+ (this.payload.pathogenDetection || []).length
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad: function(options) {
|
|
onLoad: function(options) {
|
|
@@ -399,6 +496,13 @@ export default {
|
|
|
indicators: [],
|
|
indicators: [],
|
|
|
gutFlora: [],
|
|
gutFlora: [],
|
|
|
probioticSpecies: [],
|
|
probioticSpecies: [],
|
|
|
|
|
+ taxonomyClass: [],
|
|
|
|
|
+ taxonomyOrder: [],
|
|
|
|
|
+ taxonomyFamily: [],
|
|
|
|
|
+ taxonomyGenus: [],
|
|
|
|
|
+ taxonomySpecies: [],
|
|
|
|
|
+ pathogenGenus: [],
|
|
|
|
|
+ pathogenDetection: [],
|
|
|
foods: [],
|
|
foods: [],
|
|
|
diseaseRisks: []
|
|
diseaseRisks: []
|
|
|
}, parsed)
|
|
}, parsed)
|
|
@@ -682,6 +786,12 @@ export default {
|
|
|
goBack() {
|
|
goBack() {
|
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
|
},
|
|
},
|
|
|
|
|
+ hasTaxonomyData() {
|
|
|
|
|
+ return this.taxonomyTotalCount > 0
|
|
|
|
|
+ },
|
|
|
|
|
+ hasPathogenData() {
|
|
|
|
|
+ return this.pathogenTotalCount > 0
|
|
|
|
|
+ },
|
|
|
// 舌诊指标标签映射
|
|
// 舌诊指标标签映射
|
|
|
indicatorLabel(code) {
|
|
indicatorLabel(code) {
|
|
|
var map = {
|
|
var map = {
|
|
@@ -1165,6 +1275,34 @@ export default {
|
|
|
border-radius: 6rpx;
|
|
border-radius: 6rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.taxonomy-group {
|
|
|
|
|
+ margin-bottom: 16rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.taxonomy-group:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+}
|
|
|
|
|
+.taxonomy-group-label {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ padding: 8rpx 4rpx 6rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.pathogen-group {
|
|
|
|
|
+ margin-bottom: 16rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.pathogen-group:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+}
|
|
|
|
|
+.pathogen-group-label {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: #D32F2F;
|
|
|
|
|
+ padding: 8rpx 4rpx 6rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.risk-item {
|
|
.risk-item {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
flex-direction: row;
|