123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <!-- 离线资料 -->
- <template>
- <scroll-view scroll-y class="DrawerPage" >
- <cu-custom bgColor="bg-blue" :isBack="true">
- <block slot="backText">离线文件</block>
- <block slot="content"></block>
- <block slot="right">
- <view class=" flex justify-center">
- <!-- <button class="margin-top-ssm cu-btn round bg-blue text-blue"><text class="cuIcon-add"></text></button> -->
- </view>
- </block>
- </cu-custom>
- <!-- 内容 -->
- <view class="cu-card article no-card ">
- <view class="cu-item shadow solid-bottom-type" style="padding-bottom: 0px;" v-for="item in data" :key="item.data.nodeId">
- <view class="cu-item_1">
- <!-- <image class="cu-item_img" src="/static/task/noTask.png"></image> -->
- <view class="cu-item_right">
- <view class="cu-item_name">
- [{{item.data.fileName}}]
- </view>
- <view class="cu-item_timer margin-top">
- {{item.data.name}}
- </view>
- </view>
- </view>
- <view class="cu-item_2">
- <text class="cu-item_timer">{{item.createTime}} </text>
- <view class="cu-item_button">
- <button class="bg-blue" @click="navTo(item.data)">编辑</button>
- <!-- <button class="bg-yellow" @click="navTo(item)">导入填报</button> -->
- </view>
- </view>
- </view>
- </view>
- <view v-if="data.length!=0" style="padding: 60rpx 0 120rpx;text-align: center;font-size: 26rpx;color: #AEAEAE;">没有更多内容了~</view>
- <view v-else style="padding: 60rpx 0 120rpx;text-align: center;font-size: 26rpx;color: #AEAEAE;">暂时没有离线文件~</view>
- </scroll-view>
- </template>
- <script>
- export default {
- data() {
- return {
- userId:"",
- data:[],
- }
- },
- onLoad() {
- this.userId=uni.getStorageSync("userInfo").id;
-
- },
- onShow() {
- this.findFile();
- },
- /* 监听头部搜索框 */
- onNavigationBarSearchInputChanged(e) {
- console.log("输入的信息为:"+e.text)
- },
- methods: {
- navTo(data){
- var that =this;
- /* console.log(data);return; */
- uni.navigateTo({
- url:"/pages/personBaseIndex/OfflineReport/OfflineReport?processId="+data.nodeId
- })
- },
- findFile(){
- var that =this;
- that.http.request("/app/OfflineFile",{userId:that.userId}).then(res=>{
- that.data=res.datas;
- that.data.forEach(item=>{
- var name = item.data.name.split("/");
- item.data.fileName =name[name.length-2]+"/"+name[name.length-1];
- })
- console.log(that.data)
- })
- }
- },
- filters: {
- timeStamp: function(value) {
- if (!value) return '';
- var now = new Date(value);
- var year = now.getFullYear();
- var month = now.getMonth() + 1;
- var hour = now.getHours() >=10 ? now.getHours() : "0"+now.getHours() ;
- var minutes = now.getMinutes() >=10 ? now.getMinutes() : "0"+now.getMinutes();
- var time = hour+":"+minutes;
- if (month < 10) {
- month = '0' + month
- }
- var date = now.getDate();
- if (date < 10) {
- date = '0' + date
- }
- return year + "-" + month + "-" + date +" "+time
- }
- }
- }
- </script>
- <style>
- page{
- background-color: white;
- }
- .solid-bottom-type{
- border-bottom: 2rpx solid #eee;
- }
- .menuImageTask{
- height: 70rpx;
- width: 100rpx;
- }
- .cu-btn.lg {
- padding: 0 17px;
- font-size: 13px;
- height: 30px;
- }
- .text-black{
- color:#101010;
- }
- .cu-item_1{display: flex;padding: 28rpx 24rpx;}
- .cu-item_img{width: 140rpx;height: 140rpx;margin-right: 22rpx;}
- .cu-item_right{width: 100%;}
- .cu-item_name{font-size: 30rpx;color: #101010;overflow: hidden;text-overflow: ellipsis; -o-text-overflow: ellipsis;white-space:nowrap;}
- .cu-item_tex{font-size: 26rpx;color: #101010;margin-top: 16rpx;}
- .cu-item_2{display: flex;justify-content: space-between;align-items: center;padding: 0rpx 24rpx 22rpx;}
- .cu-item_timer{
- font-size: 30rpx;
- color: #8A8A8A;
- overflow:hidden;
- text-overflow:ellipsis;
- display:-webkit-box;
- -webkit-box-orient:vertical;
- -webkit-line-clamp:2;
- }
- .cu-item_button {display: flex;}
- .cu-item_button button{width: 140rpx;height: 60rpx;padding: 0;font-size: 24rpx;color: #fff;border-radius: 60rpx;margin-left: 20rpx;}
- </style>
|