qa-prevention-gwj-first-app/pages/basics/documentation/documentation.vue

118 lines
2.3 KiB
Vue
Raw Permalink Normal View History

2023-11-07 09:43:46 +08:00
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">体系文件</block>
</cu-custom>
<scroll-view scroll-y>
<!-- <view class="padding-sm text-grey">
双控相关文件
</view> -->
<uni-collapse v-for="item in listVal">
<uni-collapse-item :title="item.name" :number="item.count">
<view class="de-files-info" v-for="sonItem in item.sonList" :key="item.id" @click="$noMultipleClicks(goToOpen,sonItem.filePath)" >
<view class="title">
<text>{{sonItem.name}}</text>
</view>
<view class="info">
<text class="time">{{sonItem.ctime}}</text>
<text class="size">{{sonItem.fileSize}}k</text>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</scroll-view>
</view>
</template>
<script>
import {
basePath,corpinfoId,loginSession,baseImgPath
} from '@/common/tool.js';
export default {
data() {
return {
noClick:true,
listVal :[],
}
},
onLoad() {
this.getData();
loginSession();
},
methods: {
//跳转事件
goToEdit(e) {
uni.navigateTo({
url: '/pages/application/basic-info-manage/basic-information/basic-information-edit'
});
},
goToOpen(e) {
var url=e;
plus.runtime.openURL(baseImgPath + url, function(res) {
console.log(res);
});
},
getData() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/mfolder/list',
method: 'POST',
dataType: 'json',
header:{
'Content-type':'application/x-www-form-urlencoded'
},
data: {
CORPINFO_ID: corpinfoId,
},
success: (res) => {
uni.hideLoading();//结束加载中动画
var result = res.data.result;
if ("success" == result) {
_this.listVal = res.data.varList;
}
}
});
},
}
}
</script>
<style>
.de-files-info {
padding: 15upx;
border-bottom: 1upx solid #e5e5e5;
margin-left: 60upx;
}
.de-files-info:last-child {
border: none;
}
.de-files-info .title {
font-size: 26upx;
color: #888;
line-height: 1.6;
}
.de-files-info .info {
font-size: 24upx;
color: #ccc;
line-height: 1.4;
}
.time {
padding-right: 10upx;
border-right: 1upx solid #ccc;
}
.size {
padding-left: 10upx;
}
</style>