pdf 预览问题

master
张同海 11 months ago
parent abdb6ca33a
commit d620e737ed

@ -12,7 +12,7 @@ import { axios } from '@/utils/request'
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGeneratePage (parameter) { export function codeGeneratePage(parameter) {
return axios({ return axios({
url: '/codeGenerate/page', url: '/codeGenerate/page',
method: 'get', method: 'get',
@ -26,7 +26,7 @@ export function codeGeneratePage (parameter) {
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGenerateAdd (parameter) { export function codeGenerateAdd(parameter) {
return axios({ return axios({
url: '/codeGenerate/add', url: '/codeGenerate/add',
method: 'post', method: 'post',
@ -40,7 +40,7 @@ export function codeGenerateAdd (parameter) {
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGenerateEdit (parameter) { export function codeGenerateEdit(parameter) {
return axios({ return axios({
url: '/codeGenerate/edit', url: '/codeGenerate/edit',
method: 'post', method: 'post',
@ -54,7 +54,7 @@ export function codeGenerateEdit (parameter) {
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGenerateDelete (parameter) { export function codeGenerateDelete(parameter) {
return axios({ return axios({
url: '/codeGenerate/delete', url: '/codeGenerate/delete',
method: 'post', method: 'post',
@ -68,7 +68,7 @@ export function codeGenerateDelete (parameter) {
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGenerateInformationList (parameter) { export function codeGenerateInformationList(parameter) {
return axios({ return axios({
url: '/codeGenerate/InformationList', url: '/codeGenerate/InformationList',
method: 'get', method: 'get',
@ -83,7 +83,7 @@ export function codeGenerateInformationList (parameter) {
* @param {*} tableName 表名 * @param {*} tableName 表名
* @return {*} * @return {*}
*/ */
export function codeGenerateColumnList (tableName) { export function codeGenerateColumnList(tableName) {
return axios({ return axios({
url: `/codeGenerate/ColumnList/${tableName}`, url: `/codeGenerate/ColumnList/${tableName}`,
method: 'get' method: 'get'
@ -96,7 +96,7 @@ export function codeGenerateColumnList (tableName) {
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGenerateRunLocal (parameter) { export function codeGenerateRunLocal(parameter) {
return axios({ return axios({
url: '/codeGenerate/runLocal', url: '/codeGenerate/runLocal',
method: 'post', method: 'post',
@ -110,7 +110,7 @@ export function codeGenerateRunLocal (parameter) {
* @author yubaoshan * @author yubaoshan
* @date 2020/12/23 15:00 * @date 2020/12/23 15:00
*/ */
export function codeGenerateRunDown (parameter) { export function codeGenerateRunDown(parameter) {
return axios({ return axios({
url: '/codeGenerate/runDown', url: '/codeGenerate/runDown',
method: 'get', method: 'get',

@ -309,7 +309,8 @@ export function DownloadFile(parameter) {
return axios({ return axios({
url: '/TaskManageBC/DownloadFile', url: '/TaskManageBC/DownloadFile',
method: 'get', method: 'get',
params: parameter params: parameter,
responseType: 'arraybuffer'
}) })
} }
export function TransferTask(parameter) { export function TransferTask(parameter) {

@ -592,8 +592,8 @@ export default {
UserId: '', UserId: '',
value: '', value: '',
formItemLayout: { formItemLayout: {
labelCol1: { span: 5 }, labelCol1: { span: 6 },
wrapperCol1: { span: 19 }, wrapperCol1: { span: 18 },
labelCol2: { span: 8 }, labelCol2: { span: 8 },
wrapperCol2: { span: 16 }, wrapperCol2: { span: 16 },
labelCol3: { span: 4 }, labelCol3: { span: 4 },
@ -721,6 +721,8 @@ export default {
}) })
DownloadFile(ApiData).then(res => { DownloadFile(ApiData).then(res => {
this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' })) this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' }))
// this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'text/plain;charset=utf-8' }))
console.log(this.pdfUrl)
}) })
GetSysUserPage().then(res => { GetSysUserPage().then(res => {
this.UserList = res.data this.UserList = res.data

Loading…
Cancel
Save