监管端上传委托书功能

2024年2月22日v1.0.55^2
liujun 2024-02-04 13:41:56 +08:00
parent e4c0609ac5
commit 352f4cf84d
4 changed files with 66 additions and 20 deletions

View File

@ -0,0 +1,16 @@
export default async function useDownloadFile(url) {
if (!url) throw new Error('没有下载地址')
fetch(config.fileUrl + url)
.then((res) => res.blob())
.then((blob) => {
const a = document.createElement('a')
document.body.appendChild(a)
a.style.display = 'none'
const url = window.URL.createObjectURL(blob)
a.href = url
a.download = url.substring(url.lastIndexOf('/') + 1)
a.click()
document.body.removeChild(a)
window.URL.revokeObjectURL(url)
})
}

View File

@ -7,7 +7,7 @@
title="审批流程" title="审批流程"
width="60%"> width="60%">
<el-steps :space="200" :active="list.length" direction="vertical" finish-status="success"> <el-steps :space="200" :active="list.length" direction="vertical" finish-status="success">
<el-step v-for="item in list" :key="item.FLOW_DETAIL_ID" :value="item.FLOW_DETAIL_ID" :title="item.SORT"> <el-step v-for="item in list" :key="item.FLOW_DETAIL_ID" :value="item.FLOW_DETAIL_ID" :title="item.SORT+''">
<template slot="description"> <template slot="description">
<el-card class="box-card a" style="width: 900px;"> <el-card class="box-card a" style="width: 900px;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
@ -15,23 +15,30 @@
</div> </div>
<div> <div>
<el-row> <el-row>
<el-col v-if="item.APPROVER_NAME"> <el-col :span="12">
审批人{{ item.APPROVER_NAME }} <el-row>
<el-col v-if="item.APPROVER_NAME">
审批人{{ item.APPROVER_NAME }}
</el-col>
<el-col>
审批状态{{ item.PASS_FLAG === '1' ? '同意' : '不同意' }}
</el-col>
<el-col>
审批人归属公司{{ item.APPROVER_CORPINFO_NAME }}
</el-col>
<el-col>
审批时间{{ item.APPROVER_TIME }}
</el-col>
<el-col v-if="item.APPROVER_OPINION">
审批意见{{ item.APPROVER_OPINION }}
</el-col>
<el-col v-if="item.END_FLAG === '1'" style="color: red; font-weight: bold;font-size: large">
审批结束
</el-col>
</el-row>
</el-col> </el-col>
<el-col> <el-col v-if="item.APPOINT_ANNEX" :span="12">
审批状态{{ item.PASS_FLAG === '1' ? '同意' : '不同意' }} <el-button icon="el-icon-download" type="primary" @click = "download(item)">下载附件</el-button>
</el-col>
<el-col>
审批人归属公司{{ item.APPROVER_CORPINFO_NAME }}
</el-col>
<el-col>
审批时间{{ item.APPROVER_TIME }}
</el-col>
<el-col v-if="item.APPROVER_OPINION">
审批意见{{ item.APPROVER_OPINION }}
</el-col>
<el-col v-if="item.END_FLAG === '1'" style="color: red; font-weight: bold;font-size: large">
审批结束
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -47,6 +54,7 @@
<script> <script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import useDownloadFile from '../../../../utils/useDownloadFile'
export default { export default {
props: { props: {
@ -77,6 +85,9 @@ export default {
}, },
closeWindow() { closeWindow() {
this.handleClose() this.handleClose()
},
download(item) {
useDownloadFile(item.APPOINT_ANNEX)
} }
} }
} }

View File

@ -137,6 +137,22 @@
<td>{{ formatLabel(userDetailForm.ISFLOW) }}</td> <td>{{ formatLabel(userDetailForm.ISFLOW) }}</td>
</tr> </tr>
</table> </table>
<div v-if="userDetailForm.ANNEX" style="padding-bottom: 10px">
<div class="level-title">
<h1>承诺书</h1>
</div>
<div>
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ANNEX)">下载附件</el-button>
</div>
</div>
<div v-if="userDetailForm.ATTORNEY" style="padding-bottom: 10px">
<div class="level-title">
<h1>委托书</h1>
</div>
<div>
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ATTORNEY)">下载附件</el-button>
</div>
</div>
<div> <div>
<div class="level-title"> <div class="level-title">
<h1>培训记录</h1> <h1>培训记录</h1>
@ -317,6 +333,7 @@
import vueQr from 'vue-qr' import vueQr from 'vue-qr'
import dateformat from '@/utils/dateformat' import dateformat from '@/utils/dateformat'
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import useDownloadFile from '@/utils/useDownloadFile'
export default { export default {
components: { vueQr }, components: { vueQr },
@ -347,7 +364,6 @@ export default {
}, },
methods: { methods: {
init(e) { init(e) {
console.log(e)
this.visible = true this.visible = true
this.heirloom = JSON.parse(JSON.stringify(e)) this.heirloom = JSON.parse(JSON.stringify(e))
this.getUserInfoById(this.heirloom) this.getUserInfoById(this.heirloom)
@ -402,6 +418,9 @@ export default {
} else { } else {
return '' return ''
} }
},
download(item) {
useDownloadFile(item)
} }
} }
} }

View File

@ -42,8 +42,8 @@
<el-table-column label="操作" align="center" width="350"> <el-table-column label="操作" align="center" width="350">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button>
<el-button v-if="false" type="primary" icon="el-icon-edit" size="mini" @click="handleShowStep(row)"></el-button> <el-button v-if="true" type="primary" icon="el-icon-edit" size="mini" @click="handleShowStep(row)"></el-button>
<el-button v-if="false" type="primary" icon="el-icon-edit" size="mini" @click="handleShowFlow(row)"></el-button> <el-button v-if="true" type="primary" icon="el-icon-edit" size="mini" @click="handleShowFlow(row)"></el-button>
<el-button v-if="row.power_flag === '1'" type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])"></el-button> <el-button v-if="row.power_flag === '1'" type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])"></el-button>
<el-button v-if="row.power_flag === '1' && row.FLOWS_STEP === 2" type="primary" icon="el-icon-s-claim" size="mini" @click="entrust([row])"></el-button> <el-button v-if="row.power_flag === '1' && row.FLOWS_STEP === 2" type="primary" icon="el-icon-s-claim" size="mini" @click="entrust([row])"></el-button>
<el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)"></el-button> <el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)"></el-button>