From 3cf56a6b4c65590b602e87ed903ddd9aa1cbe5a9 Mon Sep 17 00:00:00 2001 From: zhoutianchi <1305666981@qq.com> Date: Tue, 6 Jan 2026 22:09:04 +0800 Subject: [PATCH 1/3] 1 --- package.json | 1 - src/excel/Export2Excel.js | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 7dc922b..936b248 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "driver.js": "^0.9.8", "echarts": "^5.4.1", "element-plus": "2.5.5", - "file-saver": "^2.0.5", "form-create-designer": "3.2.11-oem", "highlight.js": "^11.7.0", "html-to-image": "^1.11.13", diff --git a/src/excel/Export2Excel.js b/src/excel/Export2Excel.js index 33c6493..6babf2f 100644 --- a/src/excel/Export2Excel.js +++ b/src/excel/Export2Excel.js @@ -1,6 +1,6 @@ /* eslint-disable */ -import { saveAs } from 'file-saver' -import * as XLSX from 'xlsx' +// import { saveAs } from 'file-saver' +// import * as XLSX from 'xlsx' // 现代浏览器已原生支持 Blob,不需要 polyfill // 如果需要支持旧浏览器,可以取消下面的注释 // import '/@/excel/Blob.js' @@ -62,21 +62,21 @@ function sheet_from_array_of_arrays(data, opts) { if (range.e.c < C) range.e.c = C; var cell = {v: data[R][C]}; if (cell.v == null) continue; - var cell_ref = XLSX.utils.encode_cell({c: C, r: R}); + // var cell_ref = XLSX.utils.encode_cell({c: C, r: R}); if (typeof cell.v === 'number') cell.t = 'n'; else if (typeof cell.v === 'boolean') cell.t = 'b'; else if (cell.v instanceof Date) { - cell.t = 'n'; - cell.z = XLSX.SSF._table[14]; - cell.v = datenum(cell.v); + // cell.t = 'n'; + // cell.z = XLSX.SSF._table[14]; + // cell.v = datenum(cell.v); } else cell.t = 's'; ws[cell_ref] = cell; } } - if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range); + // if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range); return ws; } @@ -114,9 +114,9 @@ export function export_table_to_excel(id) { wb.SheetNames.push(ws_name); wb.Sheets[ws_name] = ws; - var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); + // var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); - saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx") + // saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx") } function formatJson(jsonData) { @@ -137,7 +137,7 @@ export function export_json_to_excel(th, jsonData, defaultTitle) { wb.SheetNames.push(ws_name); wb.Sheets[ws_name] = ws; - var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); + // var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); var title = defaultTitle || '列表' saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx") } From 747f6e7f76f5e018860096d3932550eb8bed2df1 Mon Sep 17 00:00:00 2001 From: wangdongjun Date: Tue, 6 Jan 2026 22:34:41 +0800 Subject: [PATCH 2/3] 1 --- src/views/gen/table/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/gen/table/index.vue b/src/views/gen/table/index.vue index 9ceb0c2..574318c 100644 --- a/src/views/gen/table/index.vue +++ b/src/views/gen/table/index.vue @@ -82,7 +82,7 @@ import { list } from '/@/api/gen/datasource'; import { useMessage } from '/@/hooks/message'; import { useI18n } from 'vue-i18n'; import { validateNull } from '/@/utils/validate'; -import BatchGenDialog from './BatchGenDialog.vue'; +import BatchGenDialog from './batchGenDialog.vue'; import { ElMessage } from 'element-plus'; // 定义变量内容 From 3fd6a0ac27134b808db668b70ee21b3af775ea9e Mon Sep 17 00:00:00 2001 From: wangdongjun Date: Tue, 6 Jan 2026 22:38:23 +0800 Subject: [PATCH 3/3] 1 --- nginx/deploy.conf | 80 ++++++++++++++++++++++++++++++++++++++++++++ nginx/developer.conf | 80 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 nginx/deploy.conf create mode 100644 nginx/developer.conf diff --git a/nginx/deploy.conf b/nginx/deploy.conf new file mode 100644 index 0000000..ccb4eb4 --- /dev/null +++ b/nginx/deploy.conf @@ -0,0 +1,80 @@ +client_body_buffer_size 10M; +large_client_header_buffers 4 8M; +server { + + listen 80; + server_name localhost; + client_max_body_size 100M; + + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + #add_header X-Frame-Options SAMEORIGIN; + add_header Cache-Control no-store,max-age:0; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Content-Type-Options nosniff; + add_header Content-Security-Policy DENY; + add_header Referrer-Policy no-referrer; + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; + add_header X-Permitted-Cross-Domain-Policies "master-only"; + add_header X-Download-Options "noopen" always; + add_header 'Referrer-Policy' 'origin'; + gzip_vary on; + gzip_disable "MSIE [1-6]\.(?!.*SV1)"; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + gzip on; + gzip_min_length 1k; + gzip_buffers 4 16k; + gzip_http_version 1.1; + gzip_comp_level 9; + gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json; + gzip_disable "MSIE [1-6]\."; + gzip_vary on; + gzip_static on; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + + + + location ^~/api/ { + proxy_pass http://cloud-gateway-service:8001/; + proxy_connect_timeout 60s; + proxy_read_timeout 120s; + proxy_send_timeout 120s; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto http; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + } + + # 屏蔽所有敏感路径,不用改代码配置开关,双重保护 + location ~* ^/(actuator|swagger-ui|v3/api-docs|swagger-resources|webjars|doc.html) { + return 403; # 禁止访问 + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # 避免端点安全问题 + location ~ .*\/actuator.* { + deny all; # 这样配置返回403 + } + + # 避免接口暴露问题 + location ~ .*\/api-docs.* { + deny all; # 这样配置返回403 + } + + } diff --git a/nginx/developer.conf b/nginx/developer.conf new file mode 100644 index 0000000..ccb4eb4 --- /dev/null +++ b/nginx/developer.conf @@ -0,0 +1,80 @@ +client_body_buffer_size 10M; +large_client_header_buffers 4 8M; +server { + + listen 80; + server_name localhost; + client_max_body_size 100M; + + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + #add_header X-Frame-Options SAMEORIGIN; + add_header Cache-Control no-store,max-age:0; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Content-Type-Options nosniff; + add_header Content-Security-Policy DENY; + add_header Referrer-Policy no-referrer; + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; + add_header X-Permitted-Cross-Domain-Policies "master-only"; + add_header X-Download-Options "noopen" always; + add_header 'Referrer-Policy' 'origin'; + gzip_vary on; + gzip_disable "MSIE [1-6]\.(?!.*SV1)"; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + gzip on; + gzip_min_length 1k; + gzip_buffers 4 16k; + gzip_http_version 1.1; + gzip_comp_level 9; + gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json; + gzip_disable "MSIE [1-6]\."; + gzip_vary on; + gzip_static on; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + + + + location ^~/api/ { + proxy_pass http://cloud-gateway-service:8001/; + proxy_connect_timeout 60s; + proxy_read_timeout 120s; + proxy_send_timeout 120s; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto http; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + } + + # 屏蔽所有敏感路径,不用改代码配置开关,双重保护 + location ~* ^/(actuator|swagger-ui|v3/api-docs|swagger-resources|webjars|doc.html) { + return 403; # 禁止访问 + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # 避免端点安全问题 + location ~ .*\/actuator.* { + deny all; # 这样配置返回403 + } + + # 避免接口暴露问题 + location ~ .*\/api-docs.* { + deny all; # 这样配置返回403 + } + + }