allen 3 mēneši atpakaļ
vecāks
revīzija
27d284494a

+ 199 - 0
imageGen/apiServer.py

@@ -0,0 +1,199 @@
+from fastapi import FastAPI, HTTPException
+from pydantic import BaseModel
+from typing import List, Optional, Dict, Any
+from datetime import datetime
+import traceback
+import numpy as np
+import matplotlib.pyplot as plt
+from mpl_toolkits.mplot3d import Axes3D
+from io import BytesIO
+import os
+import uvicorn
+import sys
+root_path = os.getcwd()
+sys.path.append(root_path)
+
+plt.rcParams['font.sans-serif'] = ['SimHei']
+plt.rcParams['axes.unicode_minus'] = False
+app = FastAPI()
+
+
+# BRDF data item model
+class BRDFItem(BaseModel):
+    sampleModel: str
+    temperatureK: float
+    wavelengthUm: str
+    thetaIncident: float
+    phiIncident: float
+    thetaReflected: float
+    phiReflected: float
+    measurement1: float
+    measurement2: float
+    measurement3: float
+    measurement4: float
+    measurement5: float
+    meanValue: float
+    repeatabilityPct: float
+
+
+# Request payload model
+class RequestPayload(BaseModel):
+    filePath: str
+    brdfList: List[BRDFItem]
+
+
+# Response model
+class ResponseModel(BaseModel):
+    status: int
+    msg: str
+    filePath: Optional[str] = None
+
+
+# Global exception handler
+@app.exception_handler(Exception)
+async def global_exception_handler(request, exc):
+    print(f"Unhandled exception: {str(exc)}")
+    print(traceback.format_exc())
+    return {"status": 500, "msg": "Failed"}
+
+
+def sph2cart(theta: float, phi: float):
+    x = np.sin(theta) * np.cos(phi)
+    y = np.sin(theta) * np.sin(phi)
+    z = np.cos(theta)
+    return x, y, z
+
+
+def plot_all_hemispheres(brdf_list: List[BRDFItem], save_path: str):
+    os.makedirs(os.path.dirname(save_path), exist_ok=True)
+
+    # Generate hemisphere surface
+    phi = np.linspace(0, 2 * np.pi, 60)
+    theta = np.linspace(0, np.pi / 2, 30)
+    PHI, THETA = np.meshgrid(phi, theta)
+    X = np.sin(THETA) * np.cos(PHI)
+    Y = np.sin(THETA) * np.sin(PHI)
+    Z = np.cos(THETA)
+
+    # Create 3D plot
+    fig = plt.figure(figsize=(10, 8))
+    ax = fig.add_subplot(111, projection='3d')
+    ax.plot_surface(X, Y, Z, rstride=5, cstride=5, color='lightblue', alpha=0.1, edgecolor='k')
+
+    # Draw vectors for each BRDF data item
+    for i, item in enumerate(brdf_list):
+        # Convert spherical to cartesian coordinates
+        xi, yi, zi = sph2cart(np.deg2rad(item.thetaIncident), np.deg2rad(item.phiIncident))
+        xr, yr, zr = sph2cart(np.deg2rad(item.thetaReflected), np.deg2rad(item.phiReflected))
+
+        # Assign colors
+        color_i = plt.cm.tab10(i % 10)  # Incident light color
+        color_r = plt.cm.tab10((i + 5) % 10)  # Reflected light color
+
+        # Incident light - points inward (toward center)
+        ax.quiver(xi, yi, zi, -xi, -yi, -zi, color=color_i, linewidth=2, arrow_length_ratio=0.1)
+
+        # Reflected light - points outward (away from center)
+        ax.quiver(0, 0, 0, xr, yr, zr, color=color_r, linewidth=2, arrow_length_ratio=0.1)
+
+    # Set labels and limits
+    ax.set_xlim([-1, 1])
+    ax.set_ylim([-1, 1])
+    ax.set_zlim([0, 1])
+    ax.set_xlabel('sinθ·cosφ')
+    ax.set_ylabel('sinθ·sinφ')
+    ax.set_zlabel('Z')
+    ax.set_title('BRDF扫描轨迹图')
+
+    plt.tight_layout()
+    plt.savefig(save_path, format='png', dpi=300)
+    plt.close(fig)
+
+    buf = BytesIO()
+    plt.savefig(buf, format='png', dpi=300)
+    buf.seek(0)
+    return buf
+
+
+@app.post("/process_brdf", response_model=ResponseModel)
+async def process_brdf(payload: RequestPayload):
+    """
+    Process BRDF data endpoint
+
+    Parameters:
+    - filePath: File save path
+    - brdfList: List of BRDF data items
+
+    Returns:
+    - status: Status code
+    - msg: Message
+    - filePath: Saved file path
+    """
+    try:
+        if not payload.filePath:
+            return {"status": 500, "msg": "File path is empty"}
+
+        if not payload.brdfList:
+            return {"status": 500, "msg": "BRDF list is empty"}
+
+        # Plot all BRDF data
+        buf = plot_all_hemispheres(payload.brdfList, payload.filePath)
+
+        return {
+            "status": 200,
+            "msg": "Success",
+            "filePath": payload.filePath
+        }
+
+    except Exception as e:
+        print(f"Processing error: {str(e)}")
+        print(traceback.format_exc())
+        return {"status": 500, "msg": "Failed"}
+
+
+# if __name__ == "__main__":
+#     import uvicorn
+#
+#     uvicorn.run(app, host="0.0.0.0", port=8081)
+# if __name__ == "__main__":
+#     uvicorn.run("apiServer:app", host="0.0.0.0", port=8081, reload=False)
+if __name__ == "__main__":
+    # 更可靠的获取模块名方式
+    name_app = os.path.splitext(os.path.basename(__file__))[0]
+
+    # 更完整的日志配置
+    log_config = {
+        "version": 1,
+        "disable_existing_loggers": False,
+        "formatters": {
+            "default": {
+                "()": "uvicorn.logging.DefaultFormatter",
+                "fmt": "%(levelprefix)s %(asctime)s %(message)s",
+                "datefmt": "%Y-%m-%d %H:%M:%S",
+            }
+        },
+        "handlers": {
+            "default": {
+                "formatter": "default",
+                "class": "logging.StreamHandler",
+                "stream": "ext://sys.stderr",
+            },
+            "file_handler": {
+                "class": "logging.FileHandler",
+                "filename": "logfile.log",
+                "formatter": "default",
+            },
+        },
+        "root": {
+            "handlers": ["default", "file_handler"],
+            "level": "INFO",
+        },
+    }
+
+    uvicorn.run(
+        app,
+        host="0.0.0.0",
+        port=8081,
+        reload=False,
+        log_config=log_config
+    )

+ 23 - 0
imageGen/requirements.txt

@@ -0,0 +1,23 @@
+anyio==3.6.2
+asgiref==3.4.1
+certifi==2021.5.30
+charset-normalizer==2.0.12
+click==8.0.4
+colorama==0.4.5
+contextlib2==21.6.0
+contextvars==2.4
+dataclasses==0.8
+fastapi==0.83.0
+h11==0.13.0
+idna==3.10
+immutables==0.19
+importlib-metadata==4.8.3
+pydantic==1.9.2
+requests==2.27.1
+sniffio==1.2.0
+starlette==0.19.1
+typing_extensions==4.1.1
+urllib3==1.26.20
+uvicorn==0.16.0
+wincertstore==0.2
+zipp==3.6.0

+ 79 - 0
imageGen/testClient.py

@@ -0,0 +1,79 @@
+import json
+import requests
+from typing import Dict, Any
+import os
+
+
+def load_json_file(file_path: str) -> Dict[str, Any]:
+    """从JSON文件加载数据"""
+    if not os.path.exists(file_path):
+        raise FileNotFoundError(f"文件不存在: {file_path}")
+
+    with open(file_path, 'r', encoding='utf-8') as f:
+        try:
+            return json.load(f)
+        except json.JSONDecodeError as e:
+            raise ValueError(f"JSON解析错误: {str(e)}")
+
+
+def send_to_server(api_url: str, payload: Dict[str, Any]) -> None:
+    """发送数据到服务器并处理响应"""
+    headers = {'Content-Type': 'application/json'}
+
+    try:
+        response = requests.post(
+            api_url,
+            json=payload,
+            headers=headers,
+            timeout=10
+        )
+
+        # 解析响应
+        resp_data = response.json()
+        print("\n服务器响应:")
+        print(f"状态码: {response.status_code}")
+        print(f"响应内容: {resp_data}")
+
+        # 检查响应格式
+        if not isinstance(resp_data, dict) or 'status' not in resp_data or 'msg' not in resp_data:
+            print("警告: 服务器返回了非标准响应格式")
+
+        if response.status_code == 200 and resp_data.get('status') == 200:
+            print("请求处理成功!")
+        else:
+            print("请求处理失败!")
+
+    except requests.exceptions.RequestException as e:
+        print(f"\n请求失败: {str(e)}")
+        if hasattr(e, 'response') and e.response is not None:
+            print(f"错误响应: {e.response.text}")
+
+
+def main():
+    # 配置参数
+    config = {
+        "server_url": "http://127.0.0.1:8081/process_brdf/",
+        "json_file": "test_data.json"
+    }
+
+    print("=== BRDF 测试客户端 ===")
+    print(f"服务器地址: {config['server_url']}")
+    print(f"测试数据文件: {config['json_file']}")
+
+    try:
+        # 1. 加载测试数据
+        print("\n正在加载测试数据...")
+        payload = load_json_file(config['json_file'])
+        print("测试数据加载成功!")
+        print(json.dumps(payload, indent=2, ensure_ascii=False))
+
+        # 2. 发送到服务器
+        print("\n正在发送数据到服务器...")
+        send_to_server(config['server_url'], payload)
+
+    except Exception as e:
+        print(f"\n发生错误: {str(e)}")
+
+
+if __name__ == "__main__":
+    main()

+ 885 - 0
imageGen/test_data - 副本.json

@@ -0,0 +1,885 @@
+{
+  "filePath": "d://mirs/upload/2025/05/06/brdfImage20250506113006111.png",
+  "brdfList": [
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 209,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.375,
+      "measurement2": 0.375,
+      "measurement3": 0.377,
+      "measurement4": 0.376,
+      "measurement5": 0.376,
+      "meanValue": 0.376,
+      "repeatabilityPct": 0.21
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 210,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 60,
+      "phiReflected": 0,
+      "measurement1": 0.052,
+      "measurement2": 0.052,
+      "measurement3": 0.052,
+      "measurement4": 0.052,
+      "measurement5": 0.052,
+      "meanValue": 0.052,
+      "repeatabilityPct": 0.487
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 211,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 120,
+      "measurement1": 0.443,
+      "measurement2": 0.443,
+      "measurement3": 0.443,
+      "measurement4": 0.443,
+      "measurement5": 0.443,
+      "meanValue": 0.443,
+      "repeatabilityPct": 0.055
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 212,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 240,
+      "measurement1": 0.375,
+      "measurement2": 0.374,
+      "measurement3": 0.374,
+      "measurement4": 0.373,
+      "measurement5": 0.375,
+      "meanValue": 0.374,
+      "repeatabilityPct": 0.157
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 213,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.249,
+      "measurement2": 0.249,
+      "measurement3": 0.248,
+      "measurement4": 0.249,
+      "measurement5": 0.249,
+      "meanValue": 0.249,
+      "repeatabilityPct": 0.223
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 214,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 60,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.049,
+      "measurement2": 0.049,
+      "measurement3": 0.049,
+      "measurement4": 0.049,
+      "measurement5": 0.049,
+      "meanValue": 0.049,
+      "repeatabilityPct": 0.156
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 215,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 30,
+      "phiIncident": 120,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.239,
+      "measurement2": 0.24,
+      "measurement3": 0.24,
+      "measurement4": 0.24,
+      "measurement5": 0.24,
+      "meanValue": 0.24,
+      "repeatabilityPct": 0.126
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 216,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 30,
+      "phiIncident": 240,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.383,
+      "measurement2": 0.383,
+      "measurement3": 0.383,
+      "measurement4": 0.382,
+      "measurement5": 0.383,
+      "meanValue": 0.383,
+      "repeatabilityPct": 0.164
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 217,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.266,
+      "measurement2": 0.266,
+      "measurement3": 0.266,
+      "measurement4": 0.266,
+      "measurement5": 0.265,
+      "meanValue": 0.266,
+      "repeatabilityPct": 0.199
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 218,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 60,
+      "phiReflected": 0,
+      "measurement1": 0.064,
+      "measurement2": 0.064,
+      "measurement3": 0.064,
+      "measurement4": 0.063,
+      "measurement5": 0.063,
+      "meanValue": 0.064,
+      "repeatabilityPct": 0.355
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 219,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 120,
+      "measurement1": 0.441,
+      "measurement2": 0.441,
+      "measurement3": 0.441,
+      "measurement4": 0.441,
+      "measurement5": 0.441,
+      "meanValue": 0.441,
+      "repeatabilityPct": 0.069
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 220,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 240,
+      "measurement1": 0.38,
+      "measurement2": 0.381,
+      "measurement3": 0.38,
+      "measurement4": 0.38,
+      "measurement5": 0.379,
+      "meanValue": 0.38,
+      "repeatabilityPct": 0.304
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 221,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.217,
+      "measurement2": 0.218,
+      "measurement3": 0.217,
+      "measurement4": 0.217,
+      "measurement5": 0.217,
+      "meanValue": 0.217,
+      "repeatabilityPct": 0.208
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 222,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 60,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.074,
+      "measurement2": 0.073,
+      "measurement3": 0.073,
+      "measurement4": 0.073,
+      "measurement5": 0.072,
+      "meanValue": 0.073,
+      "repeatabilityPct": 1.047
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 223,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 30,
+      "phiIncident": 120,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.268,
+      "measurement2": 0.268,
+      "measurement3": 0.268,
+      "measurement4": 0.268,
+      "measurement5": 0.268,
+      "meanValue": 0.268,
+      "repeatabilityPct": 0.118
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 224,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 30,
+      "phiIncident": 240,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.404,
+      "measurement2": 0.404,
+      "measurement3": 0.404,
+      "measurement4": 0.404,
+      "measurement5": 0.404,
+      "meanValue": 0.404,
+      "repeatabilityPct": 0.082
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 225,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.159,
+      "measurement2": 0.159,
+      "measurement3": 0.158,
+      "measurement4": 0.156,
+      "measurement5": 0.158,
+      "meanValue": 0.158,
+      "repeatabilityPct": 0.687
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 226,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.327,
+      "measurement2": 0.327,
+      "measurement3": 0.325,
+      "measurement4": 0.326,
+      "measurement5": 0.326,
+      "meanValue": 0.326,
+      "repeatabilityPct": 0.235
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 227,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.087,
+      "measurement2": 0.088,
+      "measurement3": 0.091,
+      "measurement4": 0.094,
+      "measurement5": 0.088,
+      "meanValue": 0.09,
+      "repeatabilityPct": 4.902
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 228,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 45,
+      "phiReflected": 0,
+      "measurement1": 0.377,
+      "measurement2": 0.373,
+      "measurement3": 0.376,
+      "measurement4": 0.373,
+      "measurement5": 0.378,
+      "meanValue": 0.375,
+      "repeatabilityPct": 0.681
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 229,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.284,
+      "measurement2": 0.288,
+      "measurement3": 0.285,
+      "measurement4": 0.283,
+      "measurement5": 0.286,
+      "meanValue": 0.285,
+      "repeatabilityPct": 0.971
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 230,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.514,
+      "measurement2": 0.525,
+      "measurement3": 0.521,
+      "measurement4": 0.515,
+      "measurement5": 0.518,
+      "meanValue": 0.519,
+      "repeatabilityPct": 1.21
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 231,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.115,
+      "measurement2": 0.108,
+      "measurement3": 0.111,
+      "measurement4": 0.106,
+      "measurement5": 0.116,
+      "meanValue": 0.111,
+      "repeatabilityPct": 4.337
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 232,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 45,
+      "phiReflected": 0,
+      "measurement1": 0.563,
+      "measurement2": 0.555,
+      "measurement3": 0.561,
+      "measurement4": 0.56,
+      "measurement5": 0.561,
+      "meanValue": 0.56,
+      "repeatabilityPct": 0.571
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 233,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.205,
+      "measurement2": 0.203,
+      "measurement3": 0.209,
+      "measurement4": 0.207,
+      "measurement5": 0.206,
+      "meanValue": 0.206,
+      "repeatabilityPct": 1.617
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 234,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.479,
+      "measurement2": 0.456,
+      "measurement3": 0.481,
+      "measurement4": 0.497,
+      "measurement5": 0.479,
+      "meanValue": 0.478,
+      "repeatabilityPct": 3.871
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 235,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.103,
+      "measurement2": 0.108,
+      "measurement3": 0.109,
+      "measurement4": 0.109,
+      "measurement5": 0.106,
+      "meanValue": 0.107,
+      "repeatabilityPct": 1.881
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 236,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 45,
+      "phiReflected": 0,
+      "measurement1": 0.548,
+      "measurement2": 0.537,
+      "measurement3": 0.544,
+      "measurement4": 0.562,
+      "measurement5": 0.56,
+      "meanValue": 0.55,
+      "repeatabilityPct": 2.096
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 237,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.029,
+      "measurement2": 0.03,
+      "measurement3": 0.027,
+      "measurement4": 0.029,
+      "measurement5": 0.028,
+      "meanValue": 0.028,
+      "repeatabilityPct": 4.398
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 238,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.055,
+      "measurement2": 0.052,
+      "measurement3": 0.052,
+      "measurement4": 0.054,
+      "measurement5": 0.054,
+      "meanValue": 0.054,
+      "repeatabilityPct": 3.007
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 239,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.024,
+      "measurement2": 0.024,
+      "measurement3": 0.023,
+      "measurement4": 0.023,
+      "measurement5": 0.023,
+      "meanValue": 0.023,
+      "repeatabilityPct": 2.967
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 240,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "3~5",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 45,
+      "phiReflected": 0,
+      "measurement1": 0.068,
+      "measurement2": 0.066,
+      "measurement3": 0.067,
+      "measurement4": 0.067,
+      "measurement5": 0.067,
+      "meanValue": 0.067,
+      "repeatabilityPct": 1.111
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 241,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.044,
+      "measurement2": 0.046,
+      "measurement3": 0.046,
+      "measurement4": 0.045,
+      "measurement5": 0.045,
+      "meanValue": 0.045,
+      "repeatabilityPct": 2.532
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 242,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.078,
+      "measurement2": 0.08,
+      "measurement3": 0.081,
+      "measurement4": 0.081,
+      "measurement5": 0.08,
+      "meanValue": 0.08,
+      "repeatabilityPct": 1.777
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 243,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.034,
+      "measurement2": 0.035,
+      "measurement3": 0.034,
+      "measurement4": 0.034,
+      "measurement5": 0.035,
+      "meanValue": 0.034,
+      "repeatabilityPct": 2.717
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 244,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "5~9",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 45,
+      "phiReflected": 0,
+      "measurement1": 0.102,
+      "measurement2": 0.105,
+      "measurement3": 0.107,
+      "measurement4": 0.108,
+      "measurement5": 0.105,
+      "meanValue": 0.106,
+      "repeatabilityPct": 2.576
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 245,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.066,
+      "measurement2": 0.06,
+      "measurement3": 0.065,
+      "measurement4": 0.062,
+      "measurement5": 0.062,
+      "meanValue": 0.063,
+      "repeatabilityPct": 4.693
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 246,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 30,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.082,
+      "measurement2": 0.086,
+      "measurement3": 0.087,
+      "measurement4": 0.088,
+      "measurement5": 0.084,
+      "meanValue": 0.085,
+      "repeatabilityPct": 3.195
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 247,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 0,
+      "phiReflected": 0,
+      "measurement1": 0.059,
+      "measurement2": 0.056,
+      "measurement3": 0.058,
+      "measurement4": 0.055,
+      "measurement5": 0.057,
+      "meanValue": 0.057,
+      "repeatabilityPct": 2.83
+    },
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 248,
+      "sampleModel": "MA956",
+      "temperatureK": 1500,
+      "wavelengthUm": "8~14",
+      "thetaIncident": 45,
+      "phiIncident": 0,
+      "thetaReflected": 45,
+      "phiReflected": 0,
+      "measurement1": 0.112,
+      "measurement2": 0.114,
+      "measurement3": 0.113,
+      "measurement4": 0.114,
+      "measurement5": 0.114,
+      "meanValue": 0.113,
+      "repeatabilityPct": 0.574
+    }
+  ]
+}

+ 27 - 0
imageGen/test_data.json

@@ -0,0 +1,27 @@
+{
+  "filePath": "d://mirs/upload/2025/05/06/brdfImage20250506113006111.jpeg",
+  "brdfList": [
+    {
+      "createBy": "",
+      "createTime": null,
+      "updateBy": "",
+      "updateTime": null,
+      "remark": null,
+      "id": 209,
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 30,
+      "phiReflected": 0,
+      "measurement1": 0.375,
+      "measurement2": 0.375,
+      "measurement3": 0.377,
+      "measurement4": 0.376,
+      "measurement5": 0.376,
+      "meanValue": 0.376,
+      "repeatabilityPct": 0.21
+    }
+  ]
+}

+ 50 - 0
imageGen/说明.txt

@@ -0,0 +1,50 @@
+文件说明
+apiServer.py---用于生成图片的代码文件
+testClient.py---用于测试apiServer.py调用的代码文件
+test_data.json---testClient.py发送给apiServer.py的测试数据
+requirements.txt---环境依赖的库和版本
+特别说明,python版本3.6
+
+apiServer调用入参说明:
+{
+  "filePath": "d://mirs/upload/2025/05/06/brdfImage20250506113006111.png",  // 生成的图片路径
+  "brdfList": [
+    {
+      "sampleModel": "MA956", //样片型号
+      "temperatureK": 300, //温度(K)
+      "wavelengthUm": "10.6",  //光谱(μm)
+      "thetaIncident": 0,  //入射天顶角θi
+      "phiIncident": 0,  //入射方位角φi
+      "thetaReflected": 30,  //反射天顶角θr
+      "phiReflected": 0,  //反射方位角φr
+      "measurement1": 0.375,  //重复测量1
+      "measurement2": 0.375,  //重复测量2
+      "measurement3": 0.377,  //重复测量3
+      "measurement4": 0.376,  //重复测量4
+      "measurement5": 0.376,  //重复测量5
+      "meanValue": 0.376,  //均值
+      "repeatabilityPct": 0.21  //重复性%
+    },
+    {
+      "sampleModel": "MA956",
+      "temperatureK": 300,
+      "wavelengthUm": "10.6",
+      "thetaIncident": 0,
+      "phiIncident": 0,
+      "thetaReflected": 60,
+      "phiReflected": 0,
+      "measurement1": 0.052,
+      "measurement2": 0.052,
+      "measurement3": 0.052,
+      "measurement4": 0.052,
+      "measurement5": 0.052,
+      "meanValue": 0.052,
+      "repeatabilityPct": 0.487
+    }
+]
+
+打包exe
+安装打包依赖
+pip install pyinstaller
+打包命令
+Pyinstaller -F apiServer.py

+ 5 - 5
mirs-admin/src/main/resources/application-druid.yml

@@ -6,12 +6,12 @@ spring:
         druid:
             # 主库数据源
             master:
-#                url: jdbc:mysql://101.126.133.7:9006/mirs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-#                username: root
-#                password: 404cf3eae29df38f
-                url: jdbc:mysql://127.0.0.1:3306/mirs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://101.126.133.7:9006/mirs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
-                password: 123456
+                password: 404cf3eae29df38f
+#                url: jdbc:mysql://127.0.0.1:3306/mirs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                username: root
+#                password: 123456
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 2 - 2
mirs-ui/.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = XXX红外基础参数数据管理系统
+VUE_APP_TITLE = 典型航发材料红外基础参数(红外发射率和BRDF)数据库
 
 # 开发环境配置
 ENV = 'development'
 
-# XXX红外基础参数数据管理系统/开发环境
+# 典型航发材料红外基础参数(红外发射率和BRDF)数据库/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 2 - 2
mirs-ui/.env.production

@@ -1,8 +1,8 @@
 # 页面标题
-VUE_APP_TITLE = XXX红外基础参数数据管理系统
+VUE_APP_TITLE = 典型航发材料红外基础参数(红外发射率和BRDF)数据库
 
 # 生产环境配置
 ENV = 'production'
 
-# XXX红外基础参数数据管理系统/生产环境
+# 典型航发材料红外基础参数(红外发射率和BRDF)数据库/生产环境
 VUE_APP_BASE_API = '/prod-api'

+ 2 - 2
mirs-ui/.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = XXX红外基础参数数据管理系统
+VUE_APP_TITLE = 典型航发材料红外基础参数(红外发射率和BRDF)数据库
 
 BABEL_ENV = production
 
@@ -8,5 +8,5 @@ NODE_ENV = production
 # 测试环境配置
 ENV = 'staging'
 
-# XXX红外基础参数数据管理系统/测试环境
+# 典型航发材料红外基础参数(红外发射率和BRDF)数据库/测试环境
 VUE_APP_BASE_API = '/stage-api'

+ 2 - 2
mirs-ui/package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.8.9",
-  "description": "XXX红外基础参数数据管理系统",
+  "description": "典型航发材料红外基础参数(红外发射率和BRDF)数据库",
   "author": "若依",
   "license": "MIT",
   "scripts": {
@@ -89,4 +89,4 @@
     "> 1%",
     "last 2 versions"
   ]
-}
+}

+ 1 - 1
mirs-ui/src/views/login.vue

@@ -6,7 +6,7 @@
       :rules="loginRules"
       class="login-form"
     >
-      <h3 class="title">XXX红外基础参数数据管理系统</h3>
+      <h3 class="title">典型航发材料红外基础参数(红外发射率和BRDF)数据库</h3>
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"

+ 75 - 74
mirs-ui/vue.config.js

@@ -1,15 +1,17 @@
-'use strict'
-const path = require('path')
+"use strict";
+const path = require("path");
 
 function resolve(dir) {
-  return path.join(__dirname, dir)
+  return path.join(__dirname, dir);
 }
 
-const CompressionPlugin = require('compression-webpack-plugin')
+const CompressionPlugin = require("compression-webpack-plugin");
 
-const name = process.env.VUE_APP_TITLE || 'XXX红外基础参数数据管理系统' // 网页标题
+const name =
+  process.env.VUE_APP_TITLE ||
+  "典型航发材料红外基础参数(红外发射率和BRDF)数据库"; // 网页标题
 
-const port = process.env.port || process.env.npm_config_port || 80 // 端口
+const port = process.env.port || process.env.npm_config_port || 80; // 端口
 
 // vue.config.js 配置说明
 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@@ -20,17 +22,17 @@ module.exports = {
   // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
   publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
   // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
-  outputDir: 'dist',
+  outputDir: "dist",
   // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
-  assetsDir: 'static',
+  assetsDir: "static",
   // 是否开启eslint保存检测,有效值:ture | false | 'error'
-  lintOnSave: process.env.NODE_ENV === 'development',
+  lintOnSave: process.env.NODE_ENV === "development",
   // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
   productionSourceMap: false,
-  transpileDependencies: ['quill'],
+  transpileDependencies: ["quill"],
   // webpack-dev-server 相关配置
   devServer: {
-    host: '0.0.0.0',
+    host: "0.0.0.0",
     port: port,
     open: true,
     proxy: {
@@ -39,93 +41,92 @@ module.exports = {
         target: `http://localhost:8080`,
         changeOrigin: true,
         pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
-        }
-      }
+          ["^" + process.env.VUE_APP_BASE_API]: "",
+        },
+      },
     },
-    disableHostCheck: true
+    disableHostCheck: true,
   },
   css: {
     loaderOptions: {
       sass: {
-        sassOptions: { outputStyle: "expanded" }
-      }
-    }
+        sassOptions: { outputStyle: "expanded" },
+      },
+    },
   },
   configureWebpack: {
     name: name,
     resolve: {
       alias: {
-        '@': resolve('src')
-      }
+        "@": resolve("src"),
+      },
     },
     plugins: [
       // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
       new CompressionPlugin({
-        cache: false,                                  // 不启用文件缓存
-        test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i,  // 压缩文件格式
-        filename: '[path][base].gz[query]',            // 压缩后的文件名
-        algorithm: 'gzip',                             // 使用gzip压缩
-        minRatio: 0.8,                                 // 压缩比例,小于 80% 的文件不会被压缩
-        deleteOriginalAssets: false                    // 压缩后删除原文件
-      })
+        cache: false, // 不启用文件缓存
+        test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式
+        filename: "[path][base].gz[query]", // 压缩后的文件名
+        algorithm: "gzip", // 使用gzip压缩
+        minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩
+        deleteOriginalAssets: false, // 压缩后删除原文件
+      }),
     ],
   },
   chainWebpack(config) {
-    config.plugins.delete('preload') // TODO: need test
-    config.plugins.delete('prefetch') // TODO: need test
+    config.plugins.delete("preload"); // TODO: need test
+    config.plugins.delete("prefetch"); // TODO: need test
 
     // set svg-sprite-loader
+    config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end();
     config.module
-      .rule('svg')
-      .exclude.add(resolve('src/assets/icons'))
-      .end()
-    config.module
-      .rule('icons')
+      .rule("icons")
       .test(/\.svg$/)
-      .include.add(resolve('src/assets/icons'))
+      .include.add(resolve("src/assets/icons"))
       .end()
-      .use('svg-sprite-loader')
-      .loader('svg-sprite-loader')
+      .use("svg-sprite-loader")
+      .loader("svg-sprite-loader")
       .options({
-        symbolId: 'icon-[name]'
+        symbolId: "icon-[name]",
       })
-      .end()
+      .end();
 
-    config.when(process.env.NODE_ENV !== 'development', config => {
-          config
-            .plugin('ScriptExtHtmlWebpackPlugin')
-            .after('html')
-            .use('script-ext-html-webpack-plugin', [{
+    config.when(process.env.NODE_ENV !== "development", (config) => {
+      config
+        .plugin("ScriptExtHtmlWebpackPlugin")
+        .after("html")
+        .use("script-ext-html-webpack-plugin", [
+          {
             // `runtime` must same as runtimeChunk name. default is `runtime`
-              inline: /runtime\..*\.js$/
-            }])
-            .end()
+            inline: /runtime\..*\.js$/,
+          },
+        ])
+        .end();
 
-          config.optimization.splitChunks({
-            chunks: 'all',
-            cacheGroups: {
-              libs: {
-                name: 'chunk-libs',
-                test: /[\\/]node_modules[\\/]/,
-                priority: 10,
-                chunks: 'initial' // only package third parties that are initially dependent
-              },
-              elementUI: {
-                name: 'chunk-elementUI', // split elementUI into a single package
-                test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
-                priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
-              },
-              commons: {
-                name: 'chunk-commons',
-                test: resolve('src/components'), // can customize your rules
-                minChunks: 3, //  minimum common number
-                priority: 5,
-                reuseExistingChunk: true
-              }
-            }
-          })
-          config.optimization.runtimeChunk('single')
-    })
-  }
-}
+      config.optimization.splitChunks({
+        chunks: "all",
+        cacheGroups: {
+          libs: {
+            name: "chunk-libs",
+            test: /[\\/]node_modules[\\/]/,
+            priority: 10,
+            chunks: "initial", // only package third parties that are initially dependent
+          },
+          elementUI: {
+            name: "chunk-elementUI", // split elementUI into a single package
+            test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
+            priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+          },
+          commons: {
+            name: "chunk-commons",
+            test: resolve("src/components"), // can customize your rules
+            minChunks: 3, //  minimum common number
+            priority: 5,
+            reuseExistingChunk: true,
+          },
+        },
+      });
+      config.optimization.runtimeChunk("single");
+    });
+  },
+};

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
 
     <name>mirs</name>
     <url>http://www.ruoyi.vip</url>
-    <description>XXX红外基础参数数据管理系统</description>
+    <description>典型航发材料红外基础参数(红外发射率和BRDF)数据库</description>
     
     <properties>
         <mirs.version>3.8.9</mirs.version>