diff --git a/src/assets/images/system/19/bg1.png b/src/assets/images/system/19/bg1.png new file mode 100644 index 0000000..15baff4 Binary files /dev/null and b/src/assets/images/system/19/bg1.png differ diff --git a/src/assets/images/system/19/btn.png b/src/assets/images/system/19/btn.png new file mode 100644 index 0000000..102a579 Binary files /dev/null and b/src/assets/images/system/19/btn.png differ diff --git a/src/assets/images/system/19/header.png b/src/assets/images/system/19/header.png new file mode 100644 index 0000000..c1150c7 Binary files /dev/null and b/src/assets/images/system/19/header.png differ diff --git a/src/assets/images/system/19/left.png b/src/assets/images/system/19/left.png new file mode 100644 index 0000000..06092c3 Binary files /dev/null and b/src/assets/images/system/19/left.png differ diff --git a/src/assets/images/system/19/right.png b/src/assets/images/system/19/right.png new file mode 100644 index 0000000..d4ab205 Binary files /dev/null and b/src/assets/images/system/19/right.png differ diff --git a/src/assets/images/system/19/yes.png b/src/assets/images/system/19/yes.png new file mode 100644 index 0000000..3985785 Binary files /dev/null and b/src/assets/images/system/19/yes.png differ diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 3dd26f0..22f55ea 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -562,7 +562,8 @@ export default { }, // 下载图片 downloadPic (i) { - this.$refs['picLink' + i][0].click() + util.downloadPic('运行结果.png', this.picSrcList[i]) + // this.$refs['picLink' + i][0].click() }, // 导出运行结果 exportResult () { @@ -572,7 +573,7 @@ export default { // }) var FileSaver = require('file-saver'); var blob = new Blob([str], { type: "text/plain;charset=utf-8" }); - FileSaver.saveAs(blob, 'result.docx') + FileSaver.saveAs(blob, 'result.csv') }, // 获取正式答案 getTips () { diff --git a/src/config/index.js b/src/config/index.js index 1e7ceee..c9cb09b 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -5,7 +5,7 @@ const isDev = process.env.NODE_ENV === 'development' //是否本地 const isHh = url.includes('10.196.131.73') //是否是河海版本 const isPro = url.includes('occupationlab.com') //是否职站生产 const isZxy = url.includes('izhixinyun.com') //是否智信云 -let vscodeUrl = 'http://121.37.12.51:8088/?folder=/home/coder' +let vscodeUrl = 'http://121.37.12.51:8088' let host = location.origin + '/' let bankPath = `${location.origin}/banksystem` // 银行系统 // 121.37.12.51 | 192.168.31.151 @@ -18,10 +18,11 @@ if (isDev) { } else if (isPro) { host = 'https://occupationlab.com/' bankPath = `https://www.huorantech.cn/banksystem` - vscodeUrl = 'https://vscode.occupationlab.com/' + vscodeUrl = 'https://vscode.occupationlab.com' } else if (isZxy) { vscodeUrl = 'https://vscode.izhixinyun.com' } +vscodeUrl += `?folder=/home/coder/workspace` const systemId = Cookie.get('admin-systemId') export default { /** diff --git a/src/main.js b/src/main.js index c8b564e..556c132 100644 --- a/src/main.js +++ b/src/main.js @@ -37,6 +37,8 @@ if (systemId.includes(',')) { import('@/styles/theme/theme10.scss') } else if (systemId == 18) { import('@/styles/theme/theme10.scss') + } else if (systemId == 19) { + import('@/styles/theme/theme10.scss') } } import api from './api'; diff --git a/src/util/index.js b/src/util/index.js index d28a1eb..3b1f7b5 100644 --- a/src/util/index.js +++ b/src/util/index.js @@ -68,6 +68,30 @@ export default { } x.send() }, + // 下载图片 + downloadPic(fileName, src) { + const canvas = document.createElement('canvas') + const img = document.createElement('img') + // 解决跨域 Canvas 污染问题 + img.setAttribute('crossOrigin', 'anonymous') + //将资源链接赋值过去,才能触发img.onload事件 + img.src = src + img.onload = function (e) { + canvas.width = img.width + canvas.height = img.height + const context = canvas.getContext('2d') + //绘制图片 + context.drawImage(img, 0, 0, img.width, img.height) + canvas.getContext('2d').drawImage(img, 0, 0, img.width, img.height) + //将canvas转base64码,然后创建一个a连接自动下载图片 + canvas.toBlob((blob) => { + const link = document.createElement('a') + link.href = window.URL.createObjectURL(blob) + link.download = fileName + link.click() + }) + } + }, // 传入文件名和数据,下载文件 downloadFileDirect(fileName,data) { if ('download' in document.createElement('a')) { // 非IE下载