|
@@ -14,7 +14,7 @@
|
|
|
v-for="(item, index) in fileData"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <div class="content flcard" @tab="openFile(item)">
|
|
|
+ <view class="content flcard" @tap="openFile(item)">
|
|
|
<view
|
|
|
class="demo-layout bg-purple-light"
|
|
|
style="margin-bottom: 20rpx"
|
|
@@ -53,8 +53,8 @@
|
|
|
>上传时间</view
|
|
|
>
|
|
|
</view>
|
|
|
- </div>
|
|
|
- <div class="btnClass">
|
|
|
+ </view>
|
|
|
+ <view class="btnClass">
|
|
|
<u-button
|
|
|
class="btn"
|
|
|
type="primary"
|
|
@@ -90,7 +90,7 @@
|
|
|
text="删除"
|
|
|
@click="showmodal(item)"
|
|
|
></u-button>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</u-list-item>
|
|
|
</u-list>
|
|
|
<!-- 审批详情 -->
|
|
@@ -142,7 +142,13 @@
|
|
|
<view class="table-cell">{{ item.createTime }}</view>
|
|
|
<view class="table-cell">{{ item.endTime }}</view>
|
|
|
<view class="table-cell">{{ item.comment }}</view>
|
|
|
- <view class="table-cell">{{ item.status }}</view>
|
|
|
+ <view class="table-cell">
|
|
|
+ <template>
|
|
|
+ <span v-if="item.assignees[0].isExecutor"> 已处理 </span>
|
|
|
+ <!-- 如果没有审批人,可以显示空或占位符 -->
|
|
|
+ <span v-else> 待处理</span>
|
|
|
+ </template></view
|
|
|
+ >
|
|
|
<!-- ... 根据需要添加更多单元格 -->
|
|
|
</view>
|
|
|
</view>
|
|
@@ -314,20 +320,19 @@ export default {
|
|
|
.downloadFile(params)
|
|
|
.then((response) => {
|
|
|
if (response.statusCode == 200) {
|
|
|
- uni.downloadFile({
|
|
|
- url: response.config.baseUrl + response.config.url,
|
|
|
- success: function (res) {
|
|
|
- console.log(res);
|
|
|
- var filePath = res.tempFilePath;
|
|
|
- uni.openDocument({
|
|
|
- filePath: filePath,
|
|
|
- success: function (res) {
|
|
|
- console.log("打开文档成功");
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- });
|
|
|
- console.log(response);
|
|
|
+ console.log(response, "111");
|
|
|
+ // const blob = new Blob([response.data], {
|
|
|
+ // type: "charset=UTF-8",
|
|
|
+ // }); // 构造一个blob对象来处理数据
|
|
|
+ // if ("download" in document.createElement("a")) {
|
|
|
+ // // 支持a标签download的浏览器
|
|
|
+ // const link = document.createElement("a"); // 创建a标签
|
|
|
+ // link.href = URL.createObjectURL(blob);
|
|
|
+ // document.body.appendChild(link);
|
|
|
+ // link.click(); // 执行下载
|
|
|
+ // URL.revokeObjectURL(link.href); //
|
|
|
+ // document.body.removeChild(link); //
|
|
|
+ // }
|
|
|
} else {
|
|
|
// console.log("请求下载文件失败:", err);
|
|
|
}
|