cyx-ament-wechat/miniprogram/pages/workReport/workReport.wxml

100 lines
4.0 KiB
Plaintext

<!--pages/workReport/workReport.wxml-->
<view class="report_wrap">
<view class="search_list">
<van-cell-group wx:if="{{!isRadio}}">
<van-field
label="类型"
value="{{ searchForm.type }}"
placeholder="请选择类型"
border="{{ true }}"
readonly="{{true}}"
bindtap="handleTypeOpen"
/>
</van-cell-group>
<van-cell-group wx:if="{{!isRadio}}">
<van-field
label="指标"
value="{{ searchForm.shotName }}"
placeholder="请选择指标"
border="{{ true }}"
readonly="{{true}}"
bindtap="handleTargetOpen"
/>
</van-cell-group>
<view class="report_detail">
<view wx:if="{{isRadio}}">考核类型:{{detailData.type?detailData.type:'暂无'}}</view>
<view wx:if="{{isRadio}}">考核指标:{{detailData.target?detailData.target:'暂无'}}</view>
<view>提交人:{{detailData.header?detailData.header:'暂无'}}</view>
<view>提交时间:{{detailData.updateTime?detailData.updateTime:'暂无'}}</view>
<view>考核要求:{{detailData.method?detailData.method:'暂无'}}</view>
<view>督办科室:{{detailData.deptName?detailData.deptName:'暂无'}}</view>
<view>评分办法:{{detailData.detailed?detailData.detailed:'暂无'}}</view>
</view>
</view>
<view class="upload_file_wrap">
<view class="file_title">
<view>附件上传</view>
<view class="file_btn">
<van-uploader
accept="all"
use-before-read="{{true}}"
bind:before-read="handleBeforeUpload"
bind:after-read="handleUploadFile"
>
<van-button icon="plus" size="small" type="info">上传附件</van-button>
</van-uploader>
</view>
</view>
<view class="file_list">
<view class="file_list_content" hidden="{{fileList.length === 0}}">
<view
wx:for="{{fileList}}"
wx:key="id"
class="list_item"
data-url="{{item.url}}"
bindtap="handlePreView"
>
<view class="list_item_left">({{item.index+1}}). {{item.name}}</view>
<view class="list_item_right" data-index="{{item.index}}" catchtap="handleDelFile">删除</view>
</view>
</view>
<view hidden="{{fileList.length !== 0}}" class="file_no_data">暂无数据</view>
</view>
<view class="submit_btn">
<van-button custom-style="width:80%" type="info" bindtap="handleSubmit">保存</van-button>
</view>
</view>
</view>
<!--类型选择-->
<van-popup
show="{{ typeShow }}"
position="bottom"
bind:close="handleTypeClose"
>
<van-radio-group value="{{ searchForm.type }}" bind:change="handleTypeChange">
<van-cell-group>
<van-cell wx:for="{{typeOpt}}" wx:key="id" title="{{item.text}}" clickable data-name="{{item.text}}" bind:click="handleTypeClick">
<van-radio slot="right-icon" name="{{item.text}}" />
</van-cell>
</van-cell-group>
</van-radio-group>
</van-popup>
<!--指标选择-->
<van-popup
show="{{ targetShow }}"
position="bottom"
bind:close="handleTargetClose"
>
<view class="target_wrap" wx:if="{{targetOpt.length > 0}}">
<van-tree-select
items="{{ targetOpt }}"
main-active-index="{{ mainActiveIndex }}"
active-id="{{ activeId }}"
bind:click-nav="handleTargetNav"
bind:click-item="handleTargettem"
/>
</view>
<view class="no_data" wx:else>暂无数据(请先选择类型)</view>
</van-popup>