-
+
@@ -21,7 +21,10 @@ import defaultSettings from '@/settings'
import useAppStore from '@/store/modules/app'
import useSettingsStore from '@/store/modules/settings'
+import { initWebSocket } from '@/utils/webSocket'
+import { useCommonStore } from '@/store/modules/commonStore'
+const mbStore = useCommonStore();
const settingsStore = useSettingsStore()
const theme = computed(() => settingsStore.theme);
const sideTheme = computed(() => settingsStore.sideTheme);
@@ -60,11 +63,17 @@ const settingRef = ref(null);
function setLayout() {
settingRef.value.openSetting();
}
+
+onMounted(() => {
+ // 初始化socket
+ const url = `ws://47.97.125.165:8904/ws/msgserver/${mbStore.fingerprint}`
+ initWebSocket({ fullUrl: url })
+})
- `
-
- // 1. 创建隐藏iframe
- const iframe = document.createElement('iframe')
- iframe.style.width = '0px'
- iframe.style.height = '0px'
- iframe.style.position = 'absolute'
- iframe.style.left = '-9999px'
- document.body.appendChild(iframe)
-
- // 2. 写入完整打印页面内容
- const iframeDoc = iframe.contentDocument
- iframeDoc.open()
- iframeDoc.write(`
-
-
-
-
-
报表打印
- ${printStyle}
-
-
- ${printHtml}
-
-
- `)
- iframeDoc.close()
-
- // 3. 等待DOM渲染完成后打印
- setTimeout(() => {
- iframe.contentWindow.print()
- // 打印弹窗关闭后销毁iframe
- setTimeout(() => {
- document.body.removeChild(iframe)
- }, 1000)
- }, 600)
+ // classCom.printBase64PDF()
}
@@ -386,6 +292,8 @@ const getParams = () => {
prop: item.paramCode,
dictType: item.remark,
paramSequence: item.paramSequence,
+ paramWidth: item.paramWidth,
+ paramOptiontype: item.paramOptiontype,
}
}) //显示列 (item.paramType == '1' || item.paramType == '6') && item.paramSequence > 0
@@ -416,22 +324,6 @@ onMounted(() => {
})