177 lines
9.4 KiB
Plaintext
177 lines
9.4 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 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 defaultValue="{{0}}" space-evenly="{{false}}" bind:click="onTabsClick" sticky>
|
||
<t-tab-panel 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;">
|
||
<t-rate value="{{pageData.rate.level}}" icon="heart-filled" />
|
||
<view wx:if="{{pageData.rate.text != ''}}" :style="margin-top: 5px;">{{pageData.rate.text}}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="body-section">
|
||
<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: 10px; color: #0052d9;" 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>
|
||
<text class="body-value" wx:if="{{pageData.licenseCode.length}}" wx:for="{{pageData.licenseCode}}" wx:key="index" wx:for-item="item">{{item}}</text>
|
||
<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>
|
||
</view>
|
||
</view>
|
||
<t-grid column="{{2}}" align="left">
|
||
<t-grid-item wx:for="{{pageData.additives.kinds}}" wx:key="index" wx:for-item="item">
|
||
<view class="body-additive-row" style="margin: 0;">
|
||
<text class="body-key">{{item.name}}:</text>
|
||
<text class="body-value">{{item.count}}</text>
|
||
</view>
|
||
</t-grid-item>
|
||
</t-grid>
|
||
<!-- <view class="body-additive-row" wx:for="{{pageData.additives.kinds}}" wx:key="index" wx:for-item="item">
|
||
</view> -->
|
||
</view>
|
||
<view class="body-section">
|
||
<text class="body-key body-title">生产企业</text>
|
||
<view 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 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>
|
||
<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}}</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">
|
||
<t-icon data-name="chevron-right-double" name="chevron-right-double" size="64rpx" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<no-data wx:else></no-data>
|
||
</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>
|
||
</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}}</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> |