vscode固定目录,添加系统19

openf12
yujialong 1 year ago
parent ca1a111524
commit e58f0cc376
  1. BIN
      src/assets/images/system/19/bg1.png
  2. BIN
      src/assets/images/system/19/btn.png
  3. BIN
      src/assets/images/system/19/header.png
  4. BIN
      src/assets/images/system/19/left.png
  5. BIN
      src/assets/images/system/19/right.png
  6. BIN
      src/assets/images/system/19/yes.png
  7. 5
      src/components/codemirror.vue
  8. 5
      src/config/index.js
  9. 2
      src/main.js
  10. 24
      src/util/index.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

@ -562,7 +562,8 @@ export default {
}, },
// //
downloadPic (i) { downloadPic (i) {
this.$refs['picLink' + i][0].click() util.downloadPic('运行结果.png', this.picSrcList[i])
// this.$refs['picLink' + i][0].click()
}, },
// //
exportResult () { exportResult () {
@ -572,7 +573,7 @@ export default {
// }) // })
var FileSaver = require('file-saver'); var FileSaver = require('file-saver');
var blob = new Blob([str], { type: "text/plain;charset=utf-8" }); var blob = new Blob([str], { type: "text/plain;charset=utf-8" });
FileSaver.saveAs(blob, 'result.docx') FileSaver.saveAs(blob, 'result.csv')
}, },
// //
getTips () { getTips () {

@ -5,7 +5,7 @@ const isDev = process.env.NODE_ENV === 'development' //是否本地
const isHh = url.includes('10.196.131.73') //是否是河海版本 const isHh = url.includes('10.196.131.73') //是否是河海版本
const isPro = url.includes('occupationlab.com') //是否职站生产 const isPro = url.includes('occupationlab.com') //是否职站生产
const isZxy = url.includes('izhixinyun.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 host = location.origin + '/'
let bankPath = `${location.origin}/banksystem` // 银行系统 let bankPath = `${location.origin}/banksystem` // 银行系统
// 121.37.12.51 | 192.168.31.151 // 121.37.12.51 | 192.168.31.151
@ -18,10 +18,11 @@ if (isDev) {
} else if (isPro) { } else if (isPro) {
host = 'https://occupationlab.com/' host = 'https://occupationlab.com/'
bankPath = `https://www.huorantech.cn/banksystem` bankPath = `https://www.huorantech.cn/banksystem`
vscodeUrl = 'https://vscode.occupationlab.com/' vscodeUrl = 'https://vscode.occupationlab.com'
} else if (isZxy) { } else if (isZxy) {
vscodeUrl = 'https://vscode.izhixinyun.com' vscodeUrl = 'https://vscode.izhixinyun.com'
} }
vscodeUrl += `?folder=/home/coder/workspace`
const systemId = Cookie.get('admin-systemId') const systemId = Cookie.get('admin-systemId')
export default { export default {
/** /**

@ -37,6 +37,8 @@ if (systemId.includes(',')) {
import('@/styles/theme/theme10.scss') import('@/styles/theme/theme10.scss')
} else if (systemId == 18) { } else if (systemId == 18) {
import('@/styles/theme/theme10.scss') import('@/styles/theme/theme10.scss')
} else if (systemId == 19) {
import('@/styles/theme/theme10.scss')
} }
} }
import api from './api'; import api from './api';

@ -68,6 +68,30 @@ export default {
} }
x.send() 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) { downloadFileDirect(fileName,data) {
if ('download' in document.createElement('a')) { // 非IE下载 if ('download' in document.createElement('a')) { // 非IE下载

Loading…
Cancel
Save