123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import request from '@/utils/request'
- const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
- import { download, downloadPdf } from '@/utils/request'
- // 查询合格证列表
- export function listCertificate(query) {
- return request({
- url: baseUrl + '/business/certificate/list',
- method: 'get',
- params: query
- })
- }
- // 查询合格证详细
- export function getCertificate(id) {
- return request({
- url: baseUrl + '/business/certificate/' + id,
- method: 'get'
- })
- }
- // 新增合格证
- export function addCertificate(data) {
- return request({
- url: baseUrl + '/business/certificate',
- method: 'post',
- data: data
- })
- }
- // 修改合格证
- export function updateCertificate(data) {
- return request({
- url: baseUrl + '/business/certificate',
- method: 'put',
- data: data
- })
- }
- // 删除合格证
- export function delCertificate(id) {
- return request({
- url: baseUrl + '/business/certificate/' + id,
- method: 'delete'
- })
- }
- export function generateQrCode(data) {
- return request({
- url: baseUrl + '/business/certificate/generate',
- method: 'post',
- data: data
- })
- }
- export function printPdf(data) {
- downloadPdf(
- baseUrl + "/business/certificate/printPdf",
- {
- ...data
- },
- `合格证_${new Date().getTime()}.pdf`
- )
- }
|