From af19e15417c331cac29587ac4ce76336f755dcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Sat, 14 Sep 2024 15:17:14 +0800 Subject: [PATCH] 1 --- src/views/paintLabManagement/dataBatch.vue | 966 +++++++++--------- .../paintLabManagement/dataRawMaterial.vue | 787 +++++++------- src/views/paintLabManagement/dataTest.vue | 876 ++++++++-------- src/views/qualityManagement/FQC/flex/index.js | 179 ---- .../FQC/qualityStatistics.vue | 1 - 5 files changed, 1356 insertions(+), 1453 deletions(-) delete mode 100644 src/views/qualityManagement/FQC/flex/index.js diff --git a/src/views/paintLabManagement/dataBatch.vue b/src/views/paintLabManagement/dataBatch.vue index e9a88ea..c7f30b8 100644 --- a/src/views/paintLabManagement/dataBatch.vue +++ b/src/views/paintLabManagement/dataBatch.vue @@ -4,22 +4,37 @@
- + - + + + + - + - 导入数据 + 导入数据 导出数据
- +
@@ -52,84 +73,101 @@
- - - + + - - + + + + - - + + + + + + + - + + + - + + + - + + + - + - - - + + - + + + + + {{ formatSex(row.value07) }} + - - - + + + + + + + - + - + - + - + @@ -138,72 +176,67 @@ - + + + - + + + - + + + - + + + + {{ formatName(row.value19) }} + - + - 确定增加一组数据 - - 取 消 - 确 定 - + 确定增加一组数据 + + 取 消 + 确 定 + - \ No newline at end of file + diff --git a/src/views/paintLabManagement/dataRawMaterial.vue b/src/views/paintLabManagement/dataRawMaterial.vue index 0c23098..92e2e5a 100644 --- a/src/views/paintLabManagement/dataRawMaterial.vue +++ b/src/views/paintLabManagement/dataRawMaterial.vue @@ -4,11 +4,26 @@
- + - + @@ -17,9 +32,9 @@ - + + + - 导入数据 + 导入数据 导出数据 -
- +
@@ -59,109 +79,117 @@
- - - + + - - + + + + - - + + + + + + + - + + + - + + + - + + + - + - - + + + + + + - + + + - + + + - + - + - - 确定增加一组数据 - - 取 消 - 确 定 - + 确定增加一组数据 + + 取 消 + 确 定 + - - \ No newline at end of file + diff --git a/src/views/paintLabManagement/dataTest.vue b/src/views/paintLabManagement/dataTest.vue index 681b898..dd0248e 100644 --- a/src/views/paintLabManagement/dataTest.vue +++ b/src/views/paintLabManagement/dataTest.vue @@ -4,22 +4,37 @@
- + - + + + + - + - 导入数据 + 导入数据 导出数据 -
- +
@@ -59,85 +79,101 @@
- - - + + - - + + + + - - + + + + + + + - + + + - + + + - + + + - + - - + + + + + + + {{ formatSex(row.value07) }} + - - - - + + + + + + + - + - + - + - + @@ -146,52 +182,43 @@ - + + + - + + + - - 确定增加一组数据 - - 取 消 - 确 定 - + 确定增加一组数据 + + 取 消 + 确 定 + - - \ No newline at end of file + diff --git a/src/views/qualityManagement/FQC/flex/index.js b/src/views/qualityManagement/FQC/flex/index.js deleted file mode 100644 index da481eb..0000000 --- a/src/views/qualityManagement/FQC/flex/index.js +++ /dev/null @@ -1,179 +0,0 @@ -/// ===================== 大屏宽高自定义(百度搜索结果) ============================ -import { - getCurrentInstance, - onMounted, - onUnmounted, - ref, - watch -} from 'vue'; -const { - proxy -} = getCurrentInstance() -const screenWidth = ref(null) -const screenHeight = ref(null) -onMounted(() => { - proxy.$nextTick(() => { - // 监控屏幕尺寸变化 - var bodyStyle = document.createElement('style') - // 这里根据具体的设计稿尺寸来定 - bodyStyle.innerHTML = `body{width:1920px; height:1080px!important;}` - document.documentElement.firstElementChild.appendChild(bodyStyle) - screenWidth.value = document.body.clientWidth - screenHeight.value = document.body.clientHeight - window.onresize = () => { - return (() => { - screenWidth.value = document.documentElement.clientWidth - screenHeight.value = document.documentElement.clientHeight - })() - } - document.addEventListener('keydown', (e) => { - if (e.code == 'F11') { - screenWidth.value = document.documentElement.clientWidth - screenHeight.value = document.documentElement.clientHeight - } - }) - }) -}) -watch( - screenWidth, - (newValue, oldValue) => { - // console.log("val", val); - let docWidth = document.documentElement.clientWidth - let docHeight = document.documentElement.clientHeight - var designWidth = 1920, // 这里根据具体的设计稿尺寸来定 - designHeight = 1080, // 这里根据具体的设计稿尺寸来定 - widthRatio = docWidth / designWidth, - heightRatio = docHeight / designHeight - document.body.style = - `transform:scale(${widthRatio},${heightRatio});transform-origin:left top;overflow: hidden;` - // 应对浏览器全屏切换前后窗口因短暂滚动条问题出现未占满情况 - setTimeout(function() { - var lateWidth = document.documentElement.clientWidth, - lateHeight = document.documentElement.clientHeight - if (lateWidth === docWidth) return - - widthRatio = lateWidth / designWidth - heightRatio = lateHeight / designHeight - document.body.style = 'transform:scale(' + widthRatio + ',' + heightRatio + - ');transform-origin:left top;overflow: hidden;' - }, 0) - }, { - immediate: true, - deep: true - } -) -watch( - screenHeight, - (newValue, oldValue) => { - // console.log("val", val); - let docWidth = document.documentElement.clientWidth - let docHeight = document.documentElement.clientHeight - var designWidth = 1920, // 这里根据具体的设计稿尺寸来定 - designHeight = 1080, // 这里根据具体的设计稿尺寸来定 - widthRatio = docWidth / designWidth, - heightRatio = docHeight / designHeight - document.body.style = - `transform:scale(${widthRatio},${heightRatio});transform-origin:left top;overflow: hidden;` - // 应对浏览器全屏切换前后窗口因短暂滚动条问题出现未占满情况 - setTimeout(function() { - var lateWidth = document.documentElement.clientWidth, - lateHeight = document.documentElement.clientHeight - if (lateWidth === docWidth) return - - widthRatio = lateWidth / designWidth - heightRatio = lateHeight / designHeight - document.body.style = 'transform:scale(' + widthRatio + ',' + heightRatio + - ');transform-origin:left top;overflow: hidden;' - }, 0) - }, { - immediate: true, - deep: true - } -) -window.addEventListener('resize', () => { - window.location.reload() -}) -/// ================================================================ - - - - - - -/// ===================== AI智能优化自适应结果(1.0) =========================== -import { - getCurrentInstance, - onMounted, - onUnmounted, - ref -} from 'vue'; -const { - proxy -} = getCurrentInstance(); -const screenWidth = ref(null); -const screenHeight = ref(null); -const resizeObserver = new ResizeObserver((entries) => { - if (entries.length > 0) { - const { - width, - height - } = entries[0].contentRect; - // 更新屏幕尺寸 - screenWidth.value = width; - screenHeight.value = height; - - // 调用debounce函数 - updateStyleDebounced(); - } -}); -// debounce函数 -const resizeTimeout = ref(null); - -function debounce(func, wait) { - return function() { - clearTimeout(resizeTimeout.value); - resizeTimeout.value = setTimeout(func, wait); - }; -} -// 用于更新页面的transform样式 -function updateStyle() { - const docWidth = document.documentElement.clientWidth; - const docHeight = document.documentElement.clientHeight; - const designWidth = 1920; // 设计稿宽度 - const designHeight = 1080; // 设计稿高度 - const widthRatio = docWidth / designWidth; - const heightRatio = docHeight / designHeight; - document.body.style.transform = `scale(${widthRatio},${heightRatio})`; - document.body.style.transformOrigin = 'left top'; - document.body.style.overflow = 'hidden'; - // 处理浏览器全屏切换前后窗口因短暂滚动条问题出现未占满情况 - setTimeout(function() { - const lateWidth = document.documentElement.clientWidth; - const lateHeight = document.documentElement.clientHeight; - if (lateWidth !== docWidth) { - const lateWidthRatio = lateWidth / designWidth; - const lateHeightRatio = lateHeight / designHeight; - document.body.style.transform = `scale(${lateWidthRatio},${lateHeightRatio})`; - } - }, 10); -} -const updateStyleDebounced = debounce(updateStyle, 150); -onMounted(() => { - proxy.$nextTick(() => { - // 监控屏幕尺寸变化 - resizeObserver.observe(document.documentElement); - - // 初始化屏幕尺寸 - screenWidth.value = document.documentElement.clientWidth; - screenHeight.value = document.documentElement.clientHeight; - }); -}); -onUnmounted(() => { - // 清除监听 - resizeObserver.disconnect(); - // 清除debounce函数中设置的timeout - clearTimeout(resizeTimeout.value); - // resizeObserver.unobserve(document.documentElement); -}); - -/// =============================================================== \ No newline at end of file diff --git a/src/views/qualityManagement/FQC/qualityStatistics.vue b/src/views/qualityManagement/FQC/qualityStatistics.vue index a050933..bdfb231 100644 --- a/src/views/qualityManagement/FQC/qualityStatistics.vue +++ b/src/views/qualityManagement/FQC/qualityStatistics.vue @@ -496,7 +496,6 @@ export default { data.isShowDetail = isShowDetail let fileName = this.reportType_options[this.search.reportType].label + (isShowDetail ? '-缺陷详情' : '-日生产报表') + '.xlsx' downloadStatisticsTableExcel(data).then((res) => { - console.log(res) let blobURL = URL.createObjectURL(res.data) //创建标签 let link = document.createElement('a')