198 lines
11 KiB
Plaintext
198 lines
11 KiB
Plaintext
<!--pages/home/session/session.wxml-->
|
||
<view class="main">
|
||
<view class="header">
|
||
<view class="left">
|
||
<view class="type">
|
||
<text>{{ pageData.standardInfo.name ? pageData.standardInfo.name : '暂无分类' }}</text>
|
||
</view>
|
||
<view>
|
||
<t-tag class="type-tag" wx:for="{{ pageData.tags }}" wx:key="index" wx:for-item="tag" variant="light" theme="warning">{{ tag }}</t-tag>
|
||
<!-- <t-tag class="type-tag" size="small" variant="light" theme="warning">反式脂肪酸</t-tag> -->
|
||
</view>
|
||
<view class="header-time">{{pageData.createTime}}</view>
|
||
</view>
|
||
<view wx:if="{{pageData.images.length != 0}}" class="right">
|
||
<t-icon class="header-icon" data-name="add-rectangle" name="add-rectangle" size="64rpx" bind:click="onAddImage" />
|
||
<t-badge count="{{pageData.images.length}}" color="#0052d9" offset="{{ [64, 8] }}">
|
||
<image class="header-image" wx:if="{{ pageData.images.length >= 1 }}" src="{{ pageData.images[0] }} " bindtap="onShowImages"></image>
|
||
</t-badge>
|
||
</view>
|
||
</view>
|
||
<view class="body">
|
||
<t-tabs t-class="body-tabs" defaultValue="{{0}}" space-evenly="{{false}}" bind:click="onTabsClick" sticky>
|
||
<t-tab-panel t-class="body-tabs-item" label="总览" value="{{ 0 }}">
|
||
<view class="total">
|
||
<view wx:if="{{pageData.sessionId != 0}}">
|
||
<view class="body-section">
|
||
<view class="body-row">
|
||
<text class="body-key">推荐指数:</text>
|
||
<view style="margin-left: 20px;">
|
||
<view class="body-rank">
|
||
<t-rate value="{{pageData.rank.level}}" icon="heart-filled" />
|
||
<text class="body-ranck-text">{{pageData.rank.level}}</text>
|
||
</view>
|
||
<view wx:if="{{pageData.rank.info.length != 0}}" class="body-rank-info">
|
||
<view wx:for="{{pageData.rank.info}}" wx:key="index" wx:for-item="item" class="body-rank-info-item">* {{item}}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="body-section">
|
||
<view class="body-row" wx:if="{{pageData.unhealthy.length != 0}}">
|
||
<text class="body-key">不健康物质:</text>
|
||
<view>
|
||
<text wx:for="{{pageData.unhealthy}}" wx:key="index" wx:for-item="item" class="body-value" style="margin-right: 5px;">{{item}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="body-row">
|
||
<text class="body-key">类别:</text>
|
||
<view>
|
||
<text class="body-value">{{pageData.standardInfo.name ? pageData.standardInfo.name : "暂无分类"}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="body-row">
|
||
<text class="body-key">食品标准号:</text>
|
||
<view>
|
||
<text class="body-value" style="color: #0052d9;" wx:if="{{pageData.standard}}" bindtap="onOpenStandard">{{pageData.standard}}</text>
|
||
<text class="body-empty" wx:else>未识别到数据</text>
|
||
<t-tag wx:if="{{pageData.standardInfo.type}}" t-class="standard-tag" variant="light" theme="primary" size="small">{{pageData.standardInfo.type}}</t-tag>
|
||
<text wx:if="{{pageData.standardInfo.isFound == 2}}" style="margin-left: 10px; color: #0052d9;">标准查询中…</text>
|
||
<text style="margin-left: 20px; color: #0052d9; font-size: 0.875rem; line-height: 1.25rem;" bindtap="onChangeStandard">修正</text>
|
||
<view wx:if="{{pageData.standardInfo.isFound == 0}}" class="comment">未查询到该标准,请前往国家标准网站查询或修正识别错误,再次查询。</view>
|
||
</view>
|
||
</view>
|
||
<view class="body-row">
|
||
<text class="body-key">生产许可证:</text>
|
||
<view>
|
||
<view class="body-value" wx:if="{{pageData.licenseCode.length}}" wx:for="{{pageData.licenseCode}}" wx:key="index" wx:for-item="item">{{item}}</view>
|
||
<text class="body-empty" wx:if="{{pageData.licenseCode.length == 0}}">未识别到数据</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="body-section">
|
||
<view class="body-row" style="margin-bottom: 10px;">
|
||
<text class="body-key body-title">添加剂:</text>
|
||
<view>
|
||
<text class="body-value" wx:if="{{pageData.additives.count}}">{{pageData.additives.count}}</text>
|
||
<t-tag wx:else variant="light" theme="success" size="small">无添加</t-tag>
|
||
<text style="margin-left: 20px; color: #0052d9; font-size: 0.875rem; line-height: 1.25rem;" bindtap="onChangeAdditive">补充</text>
|
||
</view>
|
||
</view>
|
||
<view wx:for="{{pageData.additives.items}}" wx:key="index" wx:for-item="item">
|
||
<view class="additive-item-name">{{item.name}}</view>
|
||
<view>
|
||
<text class="additive-item-function" wx:for="{{item.functions}}" wx:key="indexF" wx:for-item="itemF">{{itemF}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="body-section">
|
||
<text class="body-key body-title">生产企业</text>
|
||
<view wx:if="{{pageData.company.length == 0 && pageData.address.length == 0}}" style="margin-left: 10px;">未查询到生产企业</view>
|
||
<view wx:if="{{pageData.company.length != 0}}" class="body-company">
|
||
<t-icon class="body-company-icon" data-name="home" name="home" size="48rpx" color="#0052d9" />
|
||
<view class="body-company-box">
|
||
<view wx:for="{{pageData.company}}" wx:key="index" wx:for-item="item">
|
||
<text class="body-company-raw">{{item}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view wx:if="{{pageData.address.length != 0}}" class="body-company">
|
||
<t-icon class="body-company-icon" data-name="location" name="location" size="48rpx" color="#0052d9" />
|
||
<view class="body-company-box">
|
||
<view wx:for="{{pageData.address}}" wx:key="index" wx:for-item="item">
|
||
<text class="body-company-raw">{{item}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view wx:if="{{pageData.sessionId == 0}}">
|
||
<t-skeleton theme="paragraph" loading="{{true}}" style="margin: 20px;"></t-skeleton>
|
||
<t-skeleton theme="paragraph" loading="{{true}}" style="margin: 20px;"></t-skeleton>
|
||
</view>
|
||
</view>
|
||
</t-tab-panel>
|
||
<t-tab-panel label="添加剂" value="{{ 1 }}">
|
||
<view wx:if="{{additives.length != 0}}" class="additive">
|
||
<view class="additive-item" wx:for="{{additives}}" wx:key="index" wx:for-item="item" data-additive="{{item.additiveId}}" bindtap="onGoAdditive">
|
||
<view class="additive-title">
|
||
<view class="additive-name">{{item.name}}</view>
|
||
<view class="additive-type-box">
|
||
<text class="additive-type" wx:for="{{item.types}}" wx:key="index" wx:for-item="tag">{{tag}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="additive-standard">{{item.standard}}</view>
|
||
<view class="body-key" style="margin-bottom: 10px;" wx:if="{{item.chemicals.lenth != 0}}">所含元素:</view>
|
||
<view class="additive-chemical" wx:for="{{item.chemicals}}" wx:key="index" wx:for-item="chemical" data-chemical="{{chemical.id}}" bindtap="onGoChemical">
|
||
<view class="additive-chemical-left">
|
||
<view class="additive-chemical-name">
|
||
{{chemical.name}}
|
||
<tox-tag style="margin-left: 10px;" ghsLevel="{{chemical.GHSLevel}}" variant="light" size="small" />
|
||
</view>
|
||
<view class="additive-chemical-cas">{{chemical.cas}}</view>
|
||
</view>
|
||
<view class="additive-chemical-right">
|
||
<view class="additive-chemical-right-tags"></view>
|
||
<view class="additive-chemical-right-icon-box">
|
||
<t-icon t-class="additive-chemical-right-icon" data-name="chevron-right" name="chevron-right" size="64rpx" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</t-tab-panel>
|
||
<!-- <t-tab-panel label="相关标准" value="{{ 2 }}">
|
||
<no-data></no-data>
|
||
</t-tab-panel>
|
||
<t-tab-panel label="生产企业" value="{{ 3 }}">
|
||
<no-data></no-data>
|
||
</t-tab-panel> -->
|
||
</t-tabs>
|
||
<view class="main-comment">
|
||
注:本数据为AI识别,数据来源于公开信息或论文,仅供参考。
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<t-image-viewer closeBtn="{{true}}" showIndex="{{true}}" visible="{{visibleImages}}" images="{{pageData.images}}" bind:close="onCloseImages"></t-image-viewer>
|
||
|
||
<t-popup visible="{{standardPopupVisible}}" bind:visible-change="onVisibleChange" placement="bottom">
|
||
<view class="standard-info">
|
||
<view class="standard-info-title">
|
||
{{pageData.standardInfo.code}}
|
||
<text style="margin-left: 20px; font-size: 1rem; line-height: 1.5rem; color: #0052d9" data-path="{{pageData.standardInfo.path}}" bindtap="onGoWebPDF">点击阅读</text>
|
||
</view>
|
||
<view class="standard-info-item">
|
||
<text class="standard-info-item-title">标准名称:</text>
|
||
<text>{{pageData.standardInfo.name}}</text>
|
||
</view>
|
||
<view class="standard-info-item">
|
||
<text class="standard-info-item-title">标准类型:</text>
|
||
<text>{{pageData.standardInfo.type}}</text>
|
||
</view>
|
||
<view class="standard-info-item">
|
||
<text class="standard-info-item-title">发布机构:</text>
|
||
<text>{{pageData.standardInfo.publicBy}}</text>
|
||
</view>
|
||
<view class="standard-info-item">
|
||
<text class="standard-info-item-title">发布时间:</text>
|
||
<text>{{pageData.standardInfo.publicDate}}</text>
|
||
</view>
|
||
<view class="standard-info-item">
|
||
<text class="standard-info-item-title">终止时间:</text>
|
||
<text>{{pageData.standardInfo.abolitionDate}}</text>
|
||
</view>
|
||
<view class="standard-info-item">
|
||
<text class="standard-info-item-title">说明:</text>
|
||
<text>{{pageData.standardInfo.comment}}</text>
|
||
</view>
|
||
</view>
|
||
</t-popup>
|
||
|
||
<t-dialog visible="{{standardDialogVisible}}" title="修改标准编号" content="识别不准确,我要填写正确标准号。" confirm-btn="确定" cancel-btn="取消" bind:confirm="confirmStandardDialog" bind:cancel="closeStandardDialog">
|
||
<t-input borderless class="dialog-input" clearable slot="content" placeholder="输入标准编号" placeholder-class="placeholder" value="{{changeStandard}}" bindchange="onChangeStandardInput" />
|
||
</t-dialog>
|
||
|
||
<t-dialog visible="{{additiveDialogVisible}}" title="补充添加剂" content="识别不准确,我要补充添加剂。" confirm-btn="确定" cancel-btn="取消" bind:confirm="confirmAdditiveDialog" bind:cancel="closeAdditiveDialog">
|
||
<t-input borderless class="dialog-input" clearable slot="content" placeholder="输入添加剂名称" placeholder-class="placeholder" value="{{changeAdditive}}" bindchange="onChangeAdditiveInput" />
|
||
</t-dialog> |