From ad09ede70a92af2d1af5977f7b100cf1bb1847ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Sun, 17 Sep 2023 18:10:31 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../project_checkDetection/info/index.js | 28 +++++-
.../pageage/project_insurance/info/index.js | 7 +-
.../pageage/project_insurance/info/index.wxml | 2 +-
.../project_materialSeal/info/index.js | 98 ++++++++++---------
.../project_materialSeal/info/index.wxml | 2 +-
.../pageage/project_special/info/index.js | 2 +-
.../pageage/project_train/info/index.js | 2 +-
.../approveLeaveTask/index.wxml | 76 +++++++-------
.../project_flowable/approveTask/index.js | 22 +++++
.../project_flowable/approveTask/index.wxml | 72 +++++++-------
.../pages/project_flowable/await/index.wxml | 6 +-
.../detailLeaveTask/index.wxml | 70 ++++++-------
.../project_flowable/detailTask/index.js | 22 +++++
.../project_flowable/detailTask/index.wxml | 68 ++++++-------
.../project_flowable/editLeaveTask/index.wxml | 2 +-
.../pages/project_flowable/editTask/index.js | 4 +-
.../project_flowable/editTask/index.wxml | 8 +-
.../project_flowable/finished/index.wxml | 2 +-
.../project_flowable/initLeaveTask/index.wxml | 2 +-
.../project_flowable/initTask/index.wxml | 4 +-
.../myFlowDefinition/index.wxml | 2 +-
.../project_flowable/myProcessIns/index.wxml | 2 +-
22 files changed, 293 insertions(+), 210 deletions(-)
diff --git a/miniprogram/pageage/project_checkDetection/info/index.js b/miniprogram/pageage/project_checkDetection/info/index.js
index 2f28621..a37d98e 100644
--- a/miniprogram/pageage/project_checkDetection/info/index.js
+++ b/miniprogram/pageage/project_checkDetection/info/index.js
@@ -14,6 +14,7 @@ Page({
detectionImageList:[],
minDetectionFileImages:[],
detectionFiles:[],
+ fileUrls:[],
request:app.globalData.reqUrl
},
@@ -55,6 +56,7 @@ Page({
let imageUrls = [];
let minImageUrls = [];
let fileUrls = [];
+ let fileNames = [];
//判断附件
if(res.data.detectionFile){
res.data.detectionFile.split(',').forEach(element => {
@@ -65,6 +67,8 @@ Page({
imageUrls.push(that.data.request+element);
minImageUrls.push(that.data.request+element+'.min.jpg');
}else{
+ let it = element.split('/');
+ fileNames.push(it[it.length-1]);
fileUrls.push(element);
}
});
@@ -73,7 +77,8 @@ Page({
infoData:res.data,
detectionImageList:imageUrls,
minDetectionFileImages:minImageUrls,
- detectionFiles:fileUrls,
+ detectionFiles:fileNames,
+ fileUrls,
loadShow:false
})
//判断当前能否删除
@@ -132,6 +137,27 @@ Page({
})
},
+ downFile:function(e){
+ let that = this;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[0],
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail:function(res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
+ },
+
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
diff --git a/miniprogram/pageage/project_insurance/info/index.js b/miniprogram/pageage/project_insurance/info/index.js
index ac7bf16..ee9b542 100644
--- a/miniprogram/pageage/project_insurance/info/index.js
+++ b/miniprogram/pageage/project_insurance/info/index.js
@@ -100,13 +100,12 @@ Page({
}
})
},
-
+
downFile:function(e){
- let idx = e.currentTarget.dataset['index'];
let that = this;
wx.downloadFile({
// 示例 url,并非真实存在
- url: that.data.request+that.imageList[idx],
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.infoData.insuranceFile,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
@@ -122,7 +121,7 @@ Page({
})
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
},
-
+
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
diff --git a/miniprogram/pageage/project_insurance/info/index.wxml b/miniprogram/pageage/project_insurance/info/index.wxml
index 75095c5..3e38e0c 100644
--- a/miniprogram/pageage/project_insurance/info/index.wxml
+++ b/miniprogram/pageage/project_insurance/info/index.wxml
@@ -30,7 +30,7 @@
保险合同
-
+
下载附件
diff --git a/miniprogram/pageage/project_materialSeal/info/index.js b/miniprogram/pageage/project_materialSeal/info/index.js
index f062615..8b3d422 100644
--- a/miniprogram/pageage/project_materialSeal/info/index.js
+++ b/miniprogram/pageage/project_materialSeal/info/index.js
@@ -19,6 +19,8 @@ Page({
alterationFileNames:[],
minAlterationFileImages:[],
alterationFileImages:[],
+ fileUrls:[],
+ fileUrls2:[],
request:app.globalData.reqUrl
},
@@ -68,6 +70,7 @@ Page({
let fileNames = [];
let minFileImages = [];
let fileImages = [];
+ let fileUrls = [];
//判断附件
if(res.data.signFiles){
res.data.signFiles.split(',').forEach(element => {
@@ -78,13 +81,16 @@ Page({
fileImages.push(that.data.request+element);
minFileImages.push(that.data.request+element+'.min.jpg');
}else{
- fileNames.push(element);
+ let it = element.split('/');
+ fileNames.push(it[it.length-1]);
+ fileUrls.push(element);
}
});
}
let fileNames2 = [];
let minFileImages2 = [];
let fileImages2 = [];
+ let fileUrls2 = [];
//判断附件
if(res.data.alterationFiles){
res.data.alterationFiles.split(',').forEach(element => {
@@ -95,11 +101,15 @@ Page({
fileImages2.push(that.data.request+element);
minFileImages2.push(that.data.request+element+'.min.jpg');
}else{
- fileNames2.push(element);
+ let it = element.split('/');
+ fileNames2.push(it[it.length-1]);
+ fileUrls2.push(element);
}
});
}
that.setData({
+ fileUrls,
+ fileUrls2,
signFileNames:fileNames,
minSignFileImages:minFileImages,
signFileImages:fileImages,
@@ -186,49 +196,49 @@ Page({
})
},
- downFile:function(e){
- let idx = e.currentTarget.dataset['index'];
- let that = this;
- wx.downloadFile({
- // 示例 url,并非真实存在
- url: that.data.request+that.data.signFileNames[idx],
- success: function (res) {
- const filePath = res.tempFilePath
- wx.openDocument({
- filePath: filePath,
- success: function (res) {
- console.log('打开文档成功')
- },
- fail:function(res) {
- console.log(res)
- }
- })
- }
- })
- //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
- },
+ downFile:function(e){
+ let idx = e.currentTarget.dataset['index'];
+ let that = this;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail:function(res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
+ },
- downFile2:function(e){
- let idx = e.currentTarget.dataset['index'];
- let that = this;
- wx.downloadFile({
- // 示例 url,并非真实存在
- url: that.data.request+that.alterationFileNames[idx],
- success: function (res) {
- const filePath = res.tempFilePath
- wx.openDocument({
- filePath: filePath,
- success: function (res) {
- console.log('打开文档成功')
- },
- fail:function(res) {
- console.log(res)
- }
- })
- }
- })
- //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
- },
+ downFile2:function(e){
+ let idx = e.currentTarget.dataset['index'];
+ let that = this;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls2[idx],
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail:function(res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
+ },
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
diff --git a/miniprogram/pageage/project_materialSeal/info/index.wxml b/miniprogram/pageage/project_materialSeal/info/index.wxml
index 13aa6ca..af71fa1 100644
--- a/miniprogram/pageage/project_materialSeal/info/index.wxml
+++ b/miniprogram/pageage/project_materialSeal/info/index.wxml
@@ -82,7 +82,7 @@
- 下载附件
+ 下载附件
diff --git a/miniprogram/pageage/project_special/info/index.js b/miniprogram/pageage/project_special/info/index.js
index 6ac1743..85031bd 100644
--- a/miniprogram/pageage/project_special/info/index.js
+++ b/miniprogram/pageage/project_special/info/index.js
@@ -127,7 +127,7 @@ Page({
let that = this;
wx.downloadFile({
// 示例 url,并非真实存在
- url: that.data.request+that.imageList[idx],
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.imageList[idx],
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
diff --git a/miniprogram/pageage/project_train/info/index.js b/miniprogram/pageage/project_train/info/index.js
index 3b0208c..b2c291f 100644
--- a/miniprogram/pageage/project_train/info/index.js
+++ b/miniprogram/pageage/project_train/info/index.js
@@ -185,7 +185,7 @@ Page({
let that = this;
wx.downloadFile({
// 示例 url,并非真实存在
- url: app.globalData.uploadUrl+'/common/upload/'+that.fileUrls[idx],
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
diff --git a/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml b/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml
index f5e0f2f..03c9c85 100644
--- a/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml
@@ -11,8 +11,8 @@
-
-
+
+
{{projectName}}
@@ -52,55 +52,55 @@
-
- 发起单位
-
- {{deptName}}
-
+
+
+ 发起单位
+ {{deptName}}
+
-
- 发起用户
-
- {{nickName}}
-
+
+
+ 发起用户
+ {{nickName}}
+
-
- 审批事项
-
- {{procDefName}}
-
+
+
+ 审批事项
+ {{procDefName}}
+
-
- 申请日期
-
- {{infoData.date}}
-
+
+
+ 申请日期
+ {{infoData.date}}
+
-
- 请假时间
-
- {{infoData.beginDate}}至{{infoData.endDate}}
-
+
+
+ 请假时间
+ {{infoData.beginDate}}至{{infoData.endDate}}
+
-
- 请假事由
-
- {{infoData.remark}}
-
+
+
+ 请假事由
+ {{infoData.remark}}
+
共请假{{' '+infoData.day+' '}}天
-
- 审批意见
-
+
+ 审批意见
+
-
- 退回节点
-
+
+ 退回节点
+
diff --git a/miniprogram/pages/project_flowable/approveTask/index.js b/miniprogram/pages/project_flowable/approveTask/index.js
index 5c83702..f11044a 100644
--- a/miniprogram/pages/project_flowable/approveTask/index.js
+++ b/miniprogram/pages/project_flowable/approveTask/index.js
@@ -521,6 +521,28 @@ Page({
})
},
+ downFile:function(e){
+ let idx = e.currentTarget.dataset['index'];
+ let that = this;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail:function(res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
+ },
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/miniprogram/pages/project_flowable/approveTask/index.wxml b/miniprogram/pages/project_flowable/approveTask/index.wxml
index 623bec5..ae54f26 100644
--- a/miniprogram/pages/project_flowable/approveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/approveTask/index.wxml
@@ -11,8 +11,8 @@
-
-
+
+
{{projectName}}
@@ -52,48 +52,50 @@
-
- 发起单位
-
- {{deptName}}
-
+
+
+ 发起单位
+ {{deptName}}
+
-
- 发起用户
-
- {{nickName}}
-
+
+
+ 发起用户
+ {{nickName}}
+
-
- 审批事项
-
- {{procDefName}}
-
+
+
+ 审批事项
+ {{procDefName}}
+
-
- 审批内容
-
-
- {{item}}
-
-
+
+
+ 审批内容
+
+
+ {{item}}
+
+
+
-
- 申请说明
-
- {{infoData.remark}}
-
+
+
+ 申请说明
+ {{infoData.remark}}
+
-
- 审批意见
-
+
+ 审批意见
+
-
- 退回节点
-
+
+ 退回节点
+
diff --git a/miniprogram/pages/project_flowable/await/index.wxml b/miniprogram/pages/project_flowable/await/index.wxml
index f051bc8..c6fa530 100644
--- a/miniprogram/pages/project_flowable/await/index.wxml
+++ b/miniprogram/pages/project_flowable/await/index.wxml
@@ -5,7 +5,7 @@
-
+
@@ -17,7 +17,7 @@
- 发起流程
+ 发起审批
@@ -48,7 +48,7 @@
- 项目名称:{{item.businessKeyName}}
+ 项目名称:{{item.businessKeyName}}
审批事项:{{item.procDefName}}
接收时间:{{item.createTime}}
申请用户:{{item.startUserName}}
diff --git a/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml b/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml
index bd76b0b..02a4c4e 100644
--- a/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml
@@ -6,13 +6,13 @@
-
+
-
+
{{projectName}}
@@ -52,48 +52,48 @@
-
- 发起单位
-
- {{deptName}}
-
+
+
+ 发起单位
+ {{deptName}}
+
-
- 发起用户
-
- {{nickName}}
-
+
+
+ 发起用户
+ {{nickName}}
+
-
- 审批事项
-
- {{procDefName}}
-
+
+
+ 审批事项
+ {{procDefName}}
+
-
- 申请日期
-
- {{infoData.date}}
-
+
+
+ 申请日期
+ {{infoData.date}}
+
-
- 请假时间
-
- {{infoData.beginDate}}至{{infoData.endDate}}
-
+
+
+ 请假时间
+ {{infoData.beginDate}}至{{infoData.endDate}}
+
-
- 请假事由
-
- {{infoData.remark}}
-
+
+
+ 请假事由
+ {{infoData.remark}}
+
共请假{{' '+infoData.day+' '}}天
-
- 终止原因
-
+
+ 终止原因
+
diff --git a/miniprogram/pages/project_flowable/detailTask/index.js b/miniprogram/pages/project_flowable/detailTask/index.js
index 6561e20..bb38337 100644
--- a/miniprogram/pages/project_flowable/detailTask/index.js
+++ b/miniprogram/pages/project_flowable/detailTask/index.js
@@ -474,6 +474,28 @@ Page({
}
},
+ downFile:function(e){
+ let idx = e.currentTarget.dataset['index'];
+ let that = this;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail:function(res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
+ },
+
//终止原因
commentblur: function (options) {
this.data.comment = options.detail.value;
diff --git a/miniprogram/pages/project_flowable/detailTask/index.wxml b/miniprogram/pages/project_flowable/detailTask/index.wxml
index 0b35026..d348acd 100644
--- a/miniprogram/pages/project_flowable/detailTask/index.wxml
+++ b/miniprogram/pages/project_flowable/detailTask/index.wxml
@@ -6,13 +6,13 @@
-
+
-
-
+
+
{{projectName}}
@@ -52,41 +52,43 @@
-
- 发起单位
-
- {{deptName}}
-
+
+
+ 发起单位
+ {{deptName}}
+
-
- 发起用户
-
- {{nickName}}
-
+
+
+ 发起用户
+ {{nickName}}
+
-
- 审批事项
-
- {{procDefName}}
-
+
+
+ 审批事项
+ {{procDefName}}
+
-
- 审批内容
-
-
- {{item}}
-
-
+
+
+ 审批内容
+
+
+ {{item}}
+
+
+
-
- 申请说明
-
- {{infoData.remark}}
-
+
+
+ 申请说明
+ {{infoData.remark}}
+
-
- 终止原因
-
+
+ 终止原因
+
diff --git a/miniprogram/pages/project_flowable/editLeaveTask/index.wxml b/miniprogram/pages/project_flowable/editLeaveTask/index.wxml
index 80a6840..f4aa1b7 100644
--- a/miniprogram/pages/project_flowable/editLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/editLeaveTask/index.wxml
@@ -6,7 +6,7 @@
-
+
diff --git a/miniprogram/pages/project_flowable/editTask/index.js b/miniprogram/pages/project_flowable/editTask/index.js
index bb952ee..aef4a9c 100644
--- a/miniprogram/pages/project_flowable/editTask/index.js
+++ b/miniprogram/pages/project_flowable/editTask/index.js
@@ -199,7 +199,9 @@ Page({
that.setData({
fileNames,
fileUrls,
- fileUrlArray
+ fileUrlArray,
+ remark:res.data.remark,
+ filesData:fileUrlArray
})
}else{
app.toast(res.msg);
diff --git a/miniprogram/pages/project_flowable/editTask/index.wxml b/miniprogram/pages/project_flowable/editTask/index.wxml
index f024426..c653662 100644
--- a/miniprogram/pages/project_flowable/editTask/index.wxml
+++ b/miniprogram/pages/project_flowable/editTask/index.wxml
@@ -6,7 +6,7 @@
-
+
@@ -74,10 +74,8 @@
审批内容
[可上传PDF/图片/WORD/PPT/XLS格式]
-
-
-
-
+
+
diff --git a/miniprogram/pages/project_flowable/finished/index.wxml b/miniprogram/pages/project_flowable/finished/index.wxml
index abb0596..98cd657 100644
--- a/miniprogram/pages/project_flowable/finished/index.wxml
+++ b/miniprogram/pages/project_flowable/finished/index.wxml
@@ -5,7 +5,7 @@
-
+
diff --git a/miniprogram/pages/project_flowable/initLeaveTask/index.wxml b/miniprogram/pages/project_flowable/initLeaveTask/index.wxml
index e1dfb0f..f922830 100644
--- a/miniprogram/pages/project_flowable/initLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/initLeaveTask/index.wxml
@@ -6,7 +6,7 @@
-
+
diff --git a/miniprogram/pages/project_flowable/initTask/index.wxml b/miniprogram/pages/project_flowable/initTask/index.wxml
index b3475e3..5430243 100644
--- a/miniprogram/pages/project_flowable/initTask/index.wxml
+++ b/miniprogram/pages/project_flowable/initTask/index.wxml
@@ -6,7 +6,7 @@
-
+
@@ -47,7 +47,7 @@
审批内容
[可上传PDF/图片/WORD/PPT/XLS格式]
-
+
diff --git a/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml b/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
index e08c38d..e693a92 100644
--- a/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
+++ b/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
@@ -5,7 +5,7 @@
-
+
diff --git a/miniprogram/pages/project_flowable/myProcessIns/index.wxml b/miniprogram/pages/project_flowable/myProcessIns/index.wxml
index 435eef6..3e328df 100644
--- a/miniprogram/pages/project_flowable/myProcessIns/index.wxml
+++ b/miniprogram/pages/project_flowable/myProcessIns/index.wxml
@@ -5,7 +5,7 @@
-
+