Merge branch 'developer' of ssh://code.cyweb.top:30033/scj/zhxy/v3/cloud-ui into developer
This commit is contained in:
80
nginx/deploy.conf
Normal file
80
nginx/deploy.conf
Normal file
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
80
nginx/developer.conf
Normal file
80
nginx/developer.conf
Normal file
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
// 定义变量内容
|
||||
|
||||
Reference in New Issue
Block a user