|
@@ -92,7 +92,7 @@
|
|
|
</view>
|
|
|
<view class="section white-wrap" v-if="radioVal==='上传附件'">
|
|
|
<view class="section-title require">附件上传</view>
|
|
|
- <image :src="img" mode="aspectFill" style="width: 102rpx;height: 120rpx;margin:0 10rpx 10rpx 0" v-for="img in fileUrlArr" :key="img"></image>
|
|
|
+ <image :src="img.img" mode="aspectFill" style="width: 102rpx;height: 120rpx;margin:0 10rpx 10rpx 0" v-for="img in fileUrlArr" :key="img"></image>
|
|
|
<image @click="handleUpload" src="../static/upload-icon.png" mode="aspectFill" style="width: 102rpx;height: 120rpx;margin:0 10rpx 10rpx 0"></image>
|
|
|
</view>
|
|
|
|
|
@@ -178,7 +178,7 @@
|
|
|
<script>
|
|
|
import steps from '../components/steps.vue'
|
|
|
import {apiFlowDetail,apiSealAdd,apiSearchCustome,apiSearchContract} from '@/api/approve/seal.js'
|
|
|
- import {uploadImg} from '@/utils/uploadFile.js'
|
|
|
+ import {uploadImg,uploadFiles} from '@/utils/uploadFile.js'
|
|
|
export default{
|
|
|
components:{
|
|
|
steps
|
|
@@ -223,8 +223,24 @@
|
|
|
methods: {
|
|
|
//上传附件
|
|
|
async handleUpload(){
|
|
|
- const res=await uploadImg()
|
|
|
- this.fileUrlArr=res
|
|
|
+ const res=await uploadFiles({type:'all'})
|
|
|
+ const reg = /\.(pdf)$/;
|
|
|
+ let temarr=res.map((item) => {
|
|
|
+ if (reg.test(item)) {
|
|
|
+ return {
|
|
|
+ type: "pdf",
|
|
|
+ url: item,
|
|
|
+ img: require("@/pages-approve/static/pdf.png"),
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ type: "img",
|
|
|
+ url: item,
|
|
|
+ img: item,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.fileUrlArr=[...this.fileUrlArr,...temarr]
|
|
|
},
|
|
|
|
|
|
// 客户搜索
|
|
@@ -320,7 +336,7 @@
|
|
|
|
|
|
let res=await apiFlowDetail({FlowId:id})
|
|
|
if(res.code===200){
|
|
|
- this.processData=res.data||[]
|
|
|
+ this.processData=res.data||null
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -330,7 +346,7 @@
|
|
|
if(this.radioVal==='系统合同'){
|
|
|
fileUrl=this.ContractfileUrl
|
|
|
}else{
|
|
|
- fileUrl=this.fileUrlArr.join('#')
|
|
|
+ fileUrl=this.fileUrlArr.map(item=>item.url).join('#')
|
|
|
}
|
|
|
|
|
|
let params={
|