7a2db79b by renchao@pashanhoo.com

Merge branch 'dev'

2 parents e1de1a15 5265bc92
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-15 09:32:40
* @LastEditTime: 2024-05-16 09:23:43
*/
import request from '@/utils/request'
import { log } from 'bpmn-js-token-simulation'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 添加补录记录
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-05-16 09:23:47
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 上传电子签名
* @param {*} data
* @author: renchao
*/
export function dzqmUpload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/dzqm/upload',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -21,3 +21,17 @@ export function upload (data) {
data
})
}
/**
* @description: 上传电子签名
* @param {*} data
* @author: renchao
*/
export function uploaddzqm (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/dzqm',
method: 'post',
data
})
}
......
<template>
<div class="from-clues">
<!-- 表单部分 -->
<div class="from-clues-header">
<el-form :model="ruleForm" label-width="100px">
<el-row>
<el-col :span="6">
<el-form-item label="用户名称:">
{{ruleForm.name}}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="组织机构:">
{{ruleForm.organizationName}}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="部门:">
{{ruleForm.departmentName}}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="签名路径:">
<img :src="ruleForm.dzqmurl" class="signature-image">
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-upload
class="upload-demo"
action=""
:limit="1"
multiple
:key="key"
:auto-upload="false"
accept=".jpg, .png, .jpeg"
:on-change="handleChange"
:before-upload="beforeUpload"
:show-file-list="false"
drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将图片拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过5MB</div>
</el-upload>
<!-- 表格 -->
</div>
</template>
<script>
import { dzqmUpload } from '@/api/dzqm'
import { getUserInfo } from '@/api/user'
export default {
name: "dzqm",
data () {
return {
ruleForm: {},
key: 0,
}
},
mounted () {
this.getUserInfo()
},
methods: {
async getUserInfo () {
let res = await getUserInfo()
this.ruleForm = res.result
},
beforeUpload (file) {
this.files = file;
const allowedExtensions = ['jpg', 'jpeg', 'png'];
const maxFileSizeMB = 5;
const extension = allowedExtensions.includes(file.name.split('.').pop().toLowerCase());
const isLt5M = file.size / 1024 / 1024 < maxFileSizeMB;
if (!extension) {
this.$message.warning('上传模板只能是 jpg、jpeg、png 格式!');
} else if (!isLt5M) {
this.$message.warning(`上传模板大小不能超过 ${maxFileSizeMB}MB!`);
}
return extension && isLt5M;
},
async handleChange (file) {
var formdata = new FormData();
formdata.append("file", file.raw);
dzqmUpload(formdata).then(res => {
if (res.code == 200) {
this.$message({
message: '上传成功!',
type: 'success'
})
this.key++
this.ruleForm.dzqmurl = res.message
}
})
}
}
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
.signature-image {
width: 100%;
max-height: 360px;
object-fit: contain;
}
</style>
\ No newline at end of file
......@@ -50,6 +50,14 @@ class data extends filter {
// }
// },
{
label: "流程状态",
width: '80',
render: (h, scope) => {
return <div >完结</div>
}
},
{
label: "业务号",
width: '110',
render: (h, scope) => {
......