|
@@ -102,10 +102,57 @@
|
|
|
@close="detailClose"
|
|
|
>
|
|
|
<view>
|
|
|
- <u--textarea
|
|
|
- v-model="value1"
|
|
|
- placeholder="请输入撤回原因"
|
|
|
- ></u--textarea>
|
|
|
+ <view class="title">
|
|
|
+ <span class="firetext">流程审批进度历史</span>
|
|
|
+ </view>
|
|
|
+ <view class="table-container">
|
|
|
+ <view class="table">
|
|
|
+ <view class="table-header">
|
|
|
+ <view class="table-cell">序号</view>
|
|
|
+ <view class="table-cell">当前环节</view>
|
|
|
+ <view class="table-cell">审批人</view>
|
|
|
+ <view class="table-cell">审批结果</view>
|
|
|
+ <view class="table-cell">审批开始时间</view>
|
|
|
+ <view class="table-cell">审批结束时间</view>
|
|
|
+ <view class="table-cell">处理意见</view>
|
|
|
+ <view class="table-cell">状态</view>
|
|
|
+ <!-- ... 根据需要添加更多表头 -->
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="table-row"
|
|
|
+ v-for="(item, index) in tableData"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <view class="table-cell"
|
|
|
+ ><template>
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template></view
|
|
|
+ >
|
|
|
+ <view class="table-cell">{{ item.name }}</view>
|
|
|
+ <view class="table-cell">
|
|
|
+ <template>
|
|
|
+ <span v-if="item.assignees && item.assignees.length > 0">
|
|
|
+ {{ item.assignees[0].username }}
|
|
|
+ </span>
|
|
|
+ <!-- 如果没有审批人,可以显示空或占位符 -->
|
|
|
+ <span v-else> - </span>
|
|
|
+ </template></view
|
|
|
+ >
|
|
|
+ <view class="table-cell">{{ item.deleteReason }}</view>
|
|
|
+ <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>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view class="title">
|
|
|
+ <span class="firetext">实时流程图</span>
|
|
|
+ </view>
|
|
|
+ <image style="width: 100%" :src="imageUrl" alt="" />
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
<!-- 删除 -->
|
|
@@ -120,7 +167,7 @@
|
|
|
<!-- 提交 -->
|
|
|
<u-picker
|
|
|
:show="commitShow"
|
|
|
- :columns="columns"
|
|
|
+ :columns="[columns]"
|
|
|
title="选择审批"
|
|
|
@confirm="confirmCommit"
|
|
|
@cancel="cancelCommit"
|
|
@@ -128,7 +175,7 @@
|
|
|
<!-- 撤回 -->
|
|
|
<u-popup
|
|
|
:show="showretract"
|
|
|
- closeable="true"
|
|
|
+ :closeable="true"
|
|
|
:round="10"
|
|
|
mode="bottom"
|
|
|
@close="close"
|
|
@@ -158,7 +205,6 @@
|
|
|
<script>
|
|
|
import api from "@/api/api";
|
|
|
import configService from "../../common/service/config.service";
|
|
|
-import { computed } from "uview-ui/libs/mixin/mixin";
|
|
|
export default {
|
|
|
components: {},
|
|
|
name: "filecenter",
|
|
@@ -185,6 +231,9 @@ export default {
|
|
|
columns: [],
|
|
|
commitItem: "", //提交文件
|
|
|
selectFile: [],
|
|
|
+ tableData: [], //审批内容
|
|
|
+ detailItem: "", //详情文件
|
|
|
+ imageUrl: "",
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -259,28 +308,26 @@ export default {
|
|
|
var fileiId = params.id;
|
|
|
var params = {
|
|
|
id: fileiId,
|
|
|
- responseType: "blob", // 期望的响应类型是Blob
|
|
|
};
|
|
|
new Promise((resolve, reject) => {
|
|
|
api
|
|
|
.downloadFile(params)
|
|
|
.then((response) => {
|
|
|
- if (response.data.code == 200) {
|
|
|
- const blob = response.data;
|
|
|
- const fileName = params.fileName; // 替换为你的文件名和扩展名
|
|
|
- // 使用uni.saveFile保存文件
|
|
|
- uni.saveFile({
|
|
|
- tempFilePath: response.tempFilePath,
|
|
|
- content: blob,
|
|
|
- success: (saveRes) => {
|
|
|
- console.log("saved file path:", saveRes.savedFilePath);
|
|
|
- // 可以使用 uni.openDocument 打开文件(如果支持)
|
|
|
- // 或者引导用户去文件管理器中查找
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- console.error("save file fail:", err);
|
|
|
+ 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);
|
|
|
} else {
|
|
|
// console.log("请求下载文件失败:", err);
|
|
|
}
|
|
@@ -330,8 +377,8 @@ export default {
|
|
|
cancelRetract() {
|
|
|
this.showretract = false;
|
|
|
},
|
|
|
- confirmRetract(e) {
|
|
|
- console.log(e);
|
|
|
+ confirmRetract() {
|
|
|
+ this.value1 = "";
|
|
|
var fileiId = this.cancelItem.id;
|
|
|
var params = {
|
|
|
tableId: fileiId,
|
|
@@ -359,8 +406,52 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 详情
|
|
|
- detailmodal() {
|
|
|
+ detailmodal(data) {
|
|
|
this.detailShow = true;
|
|
|
+ var fileiId = data.id;
|
|
|
+ var tablename = data.tableName;
|
|
|
+ var params = {
|
|
|
+ tableId: fileiId,
|
|
|
+ tableName: tablename,
|
|
|
+ };
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ api
|
|
|
+ .gethistoricFlowNew(params)
|
|
|
+ .then((response) => {
|
|
|
+ if (response.data.code == 200) {
|
|
|
+ var detailData = response.data;
|
|
|
+ this.tableData = detailData.result;
|
|
|
+ } else {
|
|
|
+ // console.log("请求下载文件失败:", err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ reject(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.getDetailImg(data);
|
|
|
+ },
|
|
|
+ getDetailImg(data) {
|
|
|
+ var fileiId = data.id;
|
|
|
+ var tablename = data.tableName;
|
|
|
+ var params = {
|
|
|
+ tableId: fileiId,
|
|
|
+ tableName: tablename,
|
|
|
+ };
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ api
|
|
|
+ .getHighlightImgNew(params)
|
|
|
+ .then((response) => {
|
|
|
+ if (response.statusCode == 200) {
|
|
|
+ this.imageUrl = response.config.baseUrl + response.config.url;
|
|
|
+ } else {
|
|
|
+ // console.log("请求下载文件失败:", err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ reject(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
detailClose() {
|
|
|
this.detailShow = false;
|
|
@@ -401,9 +492,11 @@ export default {
|
|
|
},
|
|
|
confirmCommit() {
|
|
|
var fileiId = this.commitItem.id;
|
|
|
+ var reqDefId = this.columns[0];
|
|
|
var params = {
|
|
|
tableId: fileiId,
|
|
|
- procDefId: this.columns,
|
|
|
+ procDefId: reqDefId,
|
|
|
+ firstGateway: true,
|
|
|
};
|
|
|
new Promise((resolve, reject) => {
|
|
|
api
|
|
@@ -548,4 +641,43 @@ button {
|
|
|
rgba(60, 161, 237, 0.08)
|
|
|
);
|
|
|
}
|
|
|
+.title {
|
|
|
+ width: 100%;
|
|
|
+ height: 50rpx;
|
|
|
+ background: url(/static/warndata/title.png);
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: flex; /* 将父级元素设置为 Flex 容器 */
|
|
|
+ align-items: center; /* 垂直居中子元素 */
|
|
|
+}
|
|
|
+.firetext {
|
|
|
+ margin: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+.custom-header-class {
|
|
|
+ background-color: #f8f8f8;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.table-container {
|
|
|
+ overflow-x: auto; /* 允许横向滚动 */
|
|
|
+}
|
|
|
+.table {
|
|
|
+ width: 100%;
|
|
|
+ margin: 10px;
|
|
|
+ width: max-content; /* 或者设置一个足够大的宽度以容纳所有列 */
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+.table-header,
|
|
|
+.table-row {
|
|
|
+ display: flex; /* 启用Flex布局 */
|
|
|
+}
|
|
|
+
|
|
|
+.table-cell {
|
|
|
+ padding: 8px;
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #ccc; /* 底部边框 */
|
|
|
+}
|
|
|
</style>
|