From 8ac4dd4f42712754b8fa7b571427c3ec50be46fc Mon Sep 17 00:00:00 2001 From: linfso Date: Fri, 24 May 2024 09:49:45 +0800 Subject: [PATCH] md --- src/directive/dialog/fullScreen.js | 51 ++ src/directive/dialog/fullScreen_old.js | 57 ++ .../emisQuotePrice/vipTransQuotePriceForm.vue | 628 ++++++++++++++++++ .../emisQuotePrice/vipTransQuotePriceList.vue | 516 ++++++++++++++ .../emis/emisWaybill/recordScanStatistics.vue | 546 +++++++++++++++ 5 files changed, 1798 insertions(+) create mode 100644 src/directive/dialog/fullScreen.js create mode 100644 src/directive/dialog/fullScreen_old.js create mode 100644 src/views/emis/emisQuotePrice/vipTransQuotePriceForm.vue create mode 100644 src/views/emis/emisQuotePrice/vipTransQuotePriceList.vue create mode 100644 src/views/emis/emisWaybill/recordScanStatistics.vue diff --git a/src/directive/dialog/fullScreen.js b/src/directive/dialog/fullScreen.js new file mode 100644 index 00000000..4a303407 --- /dev/null +++ b/src/directive/dialog/fullScreen.js @@ -0,0 +1,51 @@ + +function handleFullScreen (dialog, isFullScreen, marginTop, width) { + if (!dialog) return false + if (isFullScreen) { + dialog.style.marginTop = '0' + dialog.style.position = 'absolute' + dialog.style.top = '0px' + dialog.style.bottom = '0px' + dialog.style.left = '0px' + dialog.style.width = '100%' + } else { + dialog.style.marginTop = marginTop + dialog.style.width = width + dialog.style.position = 'relative' + } +} + +export default { + bind(el, binding, vnode, oldVnode) { + let isFullScreen = false + + const dialog = el.querySelector('.el-dialog') + const header = el.querySelector('.el-dialog__header') + if (!header || !dialog || !vnode) return + header.style.paddingRight = '43px' + header.style.boxShadow = '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)' + const { width, top } = vnode.componentInstance + + const fullScreenBtn = document.createElement('button') + fullScreenBtn.type = 'button' + fullScreenBtn.style = 'float:right;padding:0;background: 0 0;border:0;outline:0;cursor:pointer;font-size:16px;' + + const fullScreenIcon = document.createElement('i') + fullScreenIcon.className = 'el-icon el-icon-full-screen' + fullScreenBtn.append(fullScreenIcon) + + fullScreenBtn.addEventListener('click', () => { + isFullScreen = !isFullScreen + handleFullScreen(dialog, isFullScreen, top, width) + return false + }) + + header.append(fullScreenBtn) + + header.addEventListener('dblclick', () => { + isFullScreen = !isFullScreen + handleFullScreen(dialog, isFullScreen, top, width) + return false + }) + } +}; diff --git a/src/directive/dialog/fullScreen_old.js b/src/directive/dialog/fullScreen_old.js new file mode 100644 index 00000000..024679b2 --- /dev/null +++ b/src/directive/dialog/fullScreen_old.js @@ -0,0 +1,57 @@ +/** + * 全屏 + */ +function handleFullScreen (dialog, isFullScreen, marginTop, width) { + if (!dialog) return false + if (isFullScreen) { + dialog.style.marginTop = '0' + dialog.style.position = 'absolute' + dialog.style.top = '0px' + dialog.style.bottom = '0px' + dialog.style.left = '0px' + dialog.style.width = '100%' + } else { + dialog.style.marginTop = marginTop + dialog.style.width = width + dialog.style.position = 'relative' + } +} + +const fullScreenDirective = Vue => { + Vue.directive('fullScreen', { + bind: function (el, binding, vnode) { + let isFullScreen = false + + const dialog = el.querySelector('.el-dialog') + const header = el.querySelector('.el-dialog__header') + if (!header || !dialog || !vnode) return + header.style.paddingRight = '43px' + header.style.boxShadow = '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)' + const { width, top } = vnode.componentInstance + + const fullScreenBtn = document.createElement('button') + fullScreenBtn.type = 'button' + fullScreenBtn.style = 'float:right;padding:0;background: 0 0;border:0;outline:0;cursor:pointer;font-size:16px;' + + const fullScreenIcon = document.createElement('i') + fullScreenIcon.className = 'el-icon el-icon-full-screen' + fullScreenBtn.append(fullScreenIcon) + + fullScreenBtn.addEventListener('click', () => { + isFullScreen = !isFullScreen + handleFullScreen(dialog, isFullScreen, top, width) + return false + }) + + header.append(fullScreenBtn) + + header.addEventListener('dblclick', () => { + isFullScreen = !isFullScreen + handleFullScreen(dialog, isFullScreen, top, width) + return false + }) + } + }) +} + +export default fullScreenDirective diff --git a/src/views/emis/emisQuotePrice/vipTransQuotePriceForm.vue b/src/views/emis/emisQuotePrice/vipTransQuotePriceForm.vue new file mode 100644 index 00000000..9fba7dc6 --- /dev/null +++ b/src/views/emis/emisQuotePrice/vipTransQuotePriceForm.vue @@ -0,0 +1,628 @@ + + + + + diff --git a/src/views/emis/emisQuotePrice/vipTransQuotePriceList.vue b/src/views/emis/emisQuotePrice/vipTransQuotePriceList.vue new file mode 100644 index 00000000..01f21d27 --- /dev/null +++ b/src/views/emis/emisQuotePrice/vipTransQuotePriceList.vue @@ -0,0 +1,516 @@ + + + + + diff --git a/src/views/emis/emisWaybill/recordScanStatistics.vue b/src/views/emis/emisWaybill/recordScanStatistics.vue new file mode 100644 index 00000000..6b90f256 --- /dev/null +++ b/src/views/emis/emisWaybill/recordScanStatistics.vue @@ -0,0 +1,546 @@ + + + + +