|
@@ -1,11 +1,6 @@
|
|
|
<template name="filecenter">
|
|
|
<view class="container">
|
|
|
- <u-navbar
|
|
|
- title="文件中心"
|
|
|
- :safeAreaInsetTop="true"
|
|
|
- leftIcon=""
|
|
|
- >
|
|
|
- </u-navbar>
|
|
|
+ <u-navbar title="文件中心" :safeAreaInsetTop="true" leftIcon=""> </u-navbar>
|
|
|
<view class="main">
|
|
|
<u-subsection
|
|
|
:list="list"
|
|
@@ -19,48 +14,44 @@
|
|
|
v-for="(item, index) in fileData"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <view class="">
|
|
|
- <view class="content flcard">
|
|
|
- <view
|
|
|
- class="demo-layout bg-purple-light"
|
|
|
- style="margin-bottom: 20rpx"
|
|
|
- >
|
|
|
- <view style="margin-top: 10rpx">
|
|
|
- <text class="text-style1">{{ item.fileName }}</text>
|
|
|
- </view>
|
|
|
+ <view class="content flcard" @click="openFile(item.id)" v-if="item.bpmStatus == 1">
|
|
|
+ <view
|
|
|
+ class="demo-layout bg-purple-light"
|
|
|
+ style="margin-bottom: 20rpx"
|
|
|
+ >
|
|
|
+ <view style="margin-top: 10rpx">
|
|
|
+ <text class="text-style1">{{ item.fileName }}</text>
|
|
|
</view>
|
|
|
- <view class="datacard laiyuan">
|
|
|
- <view style="margin: 20rpx 20rpx">
|
|
|
- <text class="text-style">{{ item.fileSource }}</text>
|
|
|
- </view>
|
|
|
- <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
- >文件来源</view
|
|
|
- >
|
|
|
+ </view>
|
|
|
+ <view class="datacard laiyuan">
|
|
|
+ <view style="margin: 20rpx 20rpx">
|
|
|
+ <text class="text-style">{{ item.fileSource }}</text>
|
|
|
</view>
|
|
|
- <view class="datacard zhuangtai">
|
|
|
- <view style="margin: 20rpx 20rpx">
|
|
|
- <text class="text-style">{{ item.bpmStatus_dictText }}</text>
|
|
|
- </view>
|
|
|
- <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
- >审批状态</view
|
|
|
- >
|
|
|
+ <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
+ >文件来源</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view class="datacard zhuangtai">
|
|
|
+ <view style="margin: 20rpx 20rpx">
|
|
|
+ <text class="text-style">{{ item.bpmStatus_dictText }}</text>
|
|
|
</view>
|
|
|
- <view class="datacard user">
|
|
|
- <view style="margin: 20rpx 20rpx">
|
|
|
- <text class="text-style">{{ item.createBy }}</text>
|
|
|
- </view>
|
|
|
- <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
- >创建人</view
|
|
|
- >
|
|
|
+ <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
+ >审批状态</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view class="datacard user">
|
|
|
+ <view style="margin: 20rpx 20rpx">
|
|
|
+ <text class="text-style">{{ item.createBy }}</text>
|
|
|
</view>
|
|
|
- <view class="datacard time">
|
|
|
- <view style="margin: 20rpx 20rpx">
|
|
|
- <text class="text-style">{{ item.createTime }}</text>
|
|
|
- </view>
|
|
|
- <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
- >上传时间</view
|
|
|
- >
|
|
|
+ <view style="margin: 20rpx 20rpx; font-size: small">创建人</view>
|
|
|
+ </view>
|
|
|
+ <view class="datacard time">
|
|
|
+ <view style="margin: 20rpx 20rpx">
|
|
|
+ <text class="text-style">{{ item.createTime }}</text>
|
|
|
</view>
|
|
|
+ <view style="margin: 20rpx 20rpx; font-size: small"
|
|
|
+ >上传时间</view
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-list-item>
|
|
@@ -80,6 +71,7 @@ export default {
|
|
|
list: [{ name: "全部" }, { name: "待审批" }, { name: "已审批" }],
|
|
|
curNow: 0,
|
|
|
fileData: [],
|
|
|
+ bpmStatus:1,//1处理中 2 已完成 3 已驳回
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -117,6 +109,25 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ openFile(ID) {
|
|
|
+ var params = {
|
|
|
+ id: ID,
|
|
|
+ };
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ api
|
|
|
+ .getFilePreview(params)
|
|
|
+ .then((response) => {
|
|
|
+ if (response.data.code == 200) {
|
|
|
+ } else {
|
|
|
+ reject(response);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.log("catch===>response", response);
|
|
|
+ reject(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -124,8 +135,10 @@ export default {
|
|
|
<style scoped>
|
|
|
.main {
|
|
|
/* margin-top: 100rpx; */
|
|
|
+ margin-top: 80px;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+ margin-top: 80px; /* 内容区域顶部留出导航栏的高度 */
|
|
|
}
|
|
|
|
|
|
.itemback {
|