|
@@ -53,7 +53,7 @@
|
|
|
<view class="char_css">{{item.appendixName}}</view>
|
|
|
<view class="img_size">{{item.appendixSize}}</view>
|
|
|
</view>
|
|
|
- <view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
|
|
|
+ <view style="color: #22C572;" class="img_dowload" @click="openDownload(item)">
|
|
|
下载
|
|
|
</view>
|
|
|
</view>
|
|
@@ -109,6 +109,11 @@
|
|
|
<view v-if='item.auditMind' class="right-content">
|
|
|
{{item.auditMind}}
|
|
|
</view>
|
|
|
+ <view class="flex audit_img">
|
|
|
+ <view v-for="(items,indexs) in item.fileUrl" class="url_css">
|
|
|
+ <image :src="items" mode="" class="url_img" @click="auditFile(items)"></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view v-if='item.commonStaffs1' class="right">
|
|
|
<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
|
|
@@ -146,6 +151,12 @@
|
|
|
<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
|
|
|
maxlength="1000" />
|
|
|
</view>
|
|
|
+ <view class="upload_css">
|
|
|
+ 上传附件
|
|
|
+ <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="2"
|
|
|
+ :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
|
|
|
+ @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
|
|
|
+ </view>
|
|
|
<view @click='close()' class="cancel">取消</view>
|
|
|
<view @click='passSubmit()' class="confirm">确定</view>
|
|
|
</view>
|
|
@@ -159,7 +170,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import upload from '@/components/upload.vue';
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ upload
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
id:'',
|
|
@@ -168,7 +183,10 @@
|
|
|
auditMind:'',
|
|
|
title:'',
|
|
|
imglist:[],
|
|
|
- auditList:[]
|
|
|
+ auditList:[],
|
|
|
+ action: this.$uploadUrl,
|
|
|
+ maxSize: 50 * 1024 * 1024, //限制文件大小 50M,
|
|
|
+ fileUrl:[]
|
|
|
}
|
|
|
},
|
|
|
onLoad(options){
|
|
@@ -182,6 +200,63 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ openDownload(item){
|
|
|
+ uni.downloadFile({
|
|
|
+ url: item.appendixPath,
|
|
|
+ success: function(res) {
|
|
|
+ var filePath = res.tempFilePath;
|
|
|
+ uni.openDocument({
|
|
|
+ filePath: filePath,
|
|
|
+ showMenu: true,
|
|
|
+ success: function(res) {
|
|
|
+ console.log('打开文档成功');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ filterFileType(index, lists) {
|
|
|
+ if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
|
+ lists.splice(index, 1);
|
|
|
+ // 当前文件不支持
|
|
|
+ uni.showModal({
|
|
|
+ title: '暂不支持当前图片类型',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.isAdd = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ auditFile(src) {
|
|
|
+ uni.downloadFile({
|
|
|
+ url: src,
|
|
|
+ success: function(res) {
|
|
|
+ var filePath = res.tempFilePath;
|
|
|
+ uni.openDocument({
|
|
|
+ filePath: filePath,
|
|
|
+ showMenu: true,
|
|
|
+ success: function(res) {
|
|
|
+ console.log('打开文档成功');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getImgUrl(res) {
|
|
|
+ this.fileUrl.push(res)
|
|
|
+ },
|
|
|
+ onError(error) {
|
|
|
+ alert(error)
|
|
|
+ console.log('------------error-----------')
|
|
|
+ console.log(error)
|
|
|
+ },
|
|
|
+ onProgress(e) {
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
+ onRemove(index) {
|
|
|
+ this.fileUrl.splice(index, 1)
|
|
|
+ },
|
|
|
pass() {
|
|
|
this.show = true
|
|
|
this.title = '审核意见(通过)'
|
|
@@ -235,10 +310,14 @@
|
|
|
title: "审核中"
|
|
|
})
|
|
|
let that = this
|
|
|
+ var info = that.auditMind
|
|
|
+ if (that.fileUrl.length > 0) {
|
|
|
+ info = that.auditMind + "##" + that.fileUrl.toString()
|
|
|
+ }
|
|
|
this.$api.doRequest('post', '/newWorkflow/api/handle', {
|
|
|
taskId: list.taskId,
|
|
|
approved: status,
|
|
|
- auditMind: this.auditMind ,
|
|
|
+ auditMind: info?info:"",
|
|
|
needReapply: status2 != undefined ? true : false,
|
|
|
}).then(res => {
|
|
|
if (status == true) {
|
|
@@ -353,8 +432,14 @@
|
|
|
.getTime()
|
|
|
response.data.data[i].updateDate = this.$u.timeFormat(
|
|
|
time, 'mm.dd hh:MM')
|
|
|
- response.data.data[i].auditMind = response.data.data[i]
|
|
|
- .workflowHistoricTasks[len].auditMind
|
|
|
+ // response.data.data[i].auditMind = response.data.data[i]
|
|
|
+ // .workflowHistoricTasks[len].auditMind
|
|
|
+ if (response.data.data[i].workflowHistoricTasks[len].auditMind && response.data.data[i].workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
|
|
|
+ response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[0]
|
|
|
+ response.data.data[i].fileUrl = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
|
|
|
+ }else{
|
|
|
+ response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$set(response.data.data[i], 'status', 'question')
|
|
|
// response.data.data[i].status='question'
|
|
@@ -532,6 +617,23 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .audit_img {
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin: 0 20rpx;
|
|
|
+
|
|
|
+ .url_css {
|
|
|
+ border: 1px solid #999999;
|
|
|
+ border-radius: 10px;
|
|
|
+ margin-top: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
+
|
|
|
+ .url_img {
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -589,7 +691,7 @@
|
|
|
border: 1px solid #EEEEEE;
|
|
|
padding: 10rpx 20rpx;
|
|
|
position: relative;
|
|
|
- height:240px;
|
|
|
+ height:165px;
|
|
|
/deep/.uni-textarea-textarea{
|
|
|
width: 80%;
|
|
|
}
|
|
@@ -676,7 +778,7 @@
|
|
|
margin: auto;
|
|
|
background: #fff;
|
|
|
width: calc(100% - 198rpx);
|
|
|
- height: 700rpx;
|
|
|
+ height: 820rpx;
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
.alert-top {
|
|
@@ -697,6 +799,9 @@
|
|
|
position: absolute;
|
|
|
right: 33rpx;
|
|
|
}
|
|
|
+ .upload_css {
|
|
|
+ margin-left: 20rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|