init
This commit is contained in:
BIN
wcs/qd/src/assets/js/lodop/CLodop_Setup_for_Win32NT.exe
Normal file
BIN
wcs/qd/src/assets/js/lodop/CLodop_Setup_for_Win32NT.exe
Normal file
Binary file not shown.
49
wcs/qd/src/assets/js/lodop/LodopFuncs.js
Normal file
49
wcs/qd/src/assets/js/lodop/LodopFuncs.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import { MessageBox } from 'element-ui'
|
||||
|
||||
// ====页面动态加载C-Lodop云打印必须的文件CLodopfuncs.js====
|
||||
var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement
|
||||
var oscript = document.createElement('script')
|
||||
// 让本机的浏览器打印(更优先一点):
|
||||
oscript = document.createElement('script')
|
||||
oscript.src = 'http://localhost:8000/CLodopfuncs.js?priority=2'
|
||||
head.insertBefore(oscript, head.firstChild)
|
||||
// 加载双端口(8000和18000)避免其中某个端口被占用:
|
||||
oscript = document.createElement('script')
|
||||
oscript.src = 'http://localhost:18000/CLodopfuncs.js?priority=1'
|
||||
head.insertBefore(oscript, head.firstChild)
|
||||
|
||||
// 下载loadLodop
|
||||
function loadLodop() {
|
||||
window.open('./CLodop_Setup_for_Win32NT.exe')
|
||||
}
|
||||
|
||||
// ====获取LODOP对象的主过程:====
|
||||
function getLodop() {
|
||||
var LODOP
|
||||
try {
|
||||
LODOP = getCLodop()
|
||||
if (!LODOP && document.readyState !== 'complete') {
|
||||
MessageBox.alert('C-Lodop打印控件还没准备好,请稍后再试!')
|
||||
return
|
||||
}
|
||||
//设置打印版权
|
||||
LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
|
||||
LODOP.SET_SHOW_MODE('SETUP_ENABLESS', '10000000000000')
|
||||
return LODOP
|
||||
} catch (err) {
|
||||
MessageBox({
|
||||
title: '温馨提示',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
message: '您还未安装打印控件,点击确定下载打印控件,安装成功后刷新页面即可进行打印',
|
||||
callback: res => {
|
||||
if (res === 'confirm') {
|
||||
loadLodop()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export { getLodop }
|
||||
|
||||
BIN
wcs/qd/src/assets/js/lodop/install_lodop32.exe
Normal file
BIN
wcs/qd/src/assets/js/lodop/install_lodop32.exe
Normal file
Binary file not shown.
BIN
wcs/qd/src/assets/js/lodop/install_lodop64.exe
Normal file
BIN
wcs/qd/src/assets/js/lodop/install_lodop64.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user