diff --git a/apps/Cube_OpenAPI.json b/apps/Cube_OpenAPI.json
new file mode 100644
index 0000000..54be61d
--- /dev/null
+++ b/apps/Cube_OpenAPI.json
@@ -0,0 +1,3267 @@
+{
+ "openapi": "3.0.4",
+ "info": {
+ "title": "魔方管理",
+ "description": "魔方提供一些常用的配套功能。<br/>配套功能:附件、地区、定时任务、应用系统管理等。",
+ "version": "6.5.2025.0605-beta1554"
+ },
+ "paths": {
+ "/Cube/App": {
+ "delete": {
+ "tags": [
+ "App"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "313139d13bc2ddc6deae2366dbbeddb9"
+ },
+ "post": {
+ "tags": [
+ "App"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "54cd76f3c274fc699cca59b672de8713"
+ },
+ "put": {
+ "tags": [
+ "App"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "01a91463c88cc5c7d487ef26fa8c3b5d"
+ },
+ "get": {
+ "tags": [
+ "App"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "0a8d064b24c67e34dfcfe174056a3a74"
+ }
+ },
+ "/Cube/App/Detail": {
+ "get": {
+ "tags": [
+ "App"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "681f6d1ada375fa4121f3010af8700aa"
+ }
+ },
+ "/Cube/App/GetFields": {
+ "get": {
+ "tags": [
+ "App"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "e20aecc77ab124865e01abd3b6eb06a1"
+ }
+ },
+ "/Cube/AppLog": {
+ "get": {
+ "tags": [
+ "AppLog"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.AppLog, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "a6cd50798871f747ed1378e459575aa6"
+ }
+ },
+ "/Cube/AppLog/Detail": {
+ "get": {
+ "tags": [
+ "AppLog"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.AppLog, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "7aa3348943320f40f6cddea3506174e3"
+ }
+ },
+ "/Cube/AppLog/GetFields": {
+ "get": {
+ "tags": [
+ "AppLog"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "e9fcdc3cb35184f3121ab25d1b2af5a9"
+ }
+ },
+ "/Cube/Area": {
+ "delete": {
+ "tags": [
+ "Area"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "fe008456e1306295e6ba0f1416e3cf61"
+ },
+ "post": {
+ "tags": [
+ "Area"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/XCode.Membership.AreaModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/XCode.Membership.AreaModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/XCode.Membership.AreaModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "9cd550d80870a42b2f5fce133c5d8239"
+ },
+ "put": {
+ "tags": [
+ "Area"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/XCode.Membership.AreaModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/XCode.Membership.AreaModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/XCode.Membership.AreaModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "5eeed1f80ce75b90b9d45e10eb9bd0a3"
+ },
+ "get": {
+ "tags": [
+ "Area"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "0e280cdfd79593eb7c6cdd94fb15fa17"
+ }
+ },
+ "/Cube/Area/Detail": {
+ "get": {
+ "tags": [
+ "Area"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "4ec16af8b5e735f57fe2782fa1cb9976"
+ }
+ },
+ "/Cube/Area/GetFields": {
+ "get": {
+ "tags": [
+ "Area"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "79119516ae2aff3bc60b956471ab8fed"
+ }
+ },
+ "/Cube/Attachment": {
+ "delete": {
+ "tags": [
+ "Attachment"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "50f068574837c723e3e1e78597bcf032"
+ },
+ "post": {
+ "tags": [
+ "Attachment"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AttachmentModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AttachmentModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AttachmentModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "81f4326df2a7ab8344a9363721fbb679"
+ },
+ "put": {
+ "tags": [
+ "Attachment"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AttachmentModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AttachmentModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AttachmentModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "c0faaa038d4d2b5db1ef1a4557c700f0"
+ },
+ "get": {
+ "tags": [
+ "Attachment"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "a79e2760962cff3c049c15bb4c9fb349"
+ }
+ },
+ "/Cube/Attachment/Detail": {
+ "get": {
+ "tags": [
+ "Attachment"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "a9e77f531c9fcbf4721e7b00f46e6402"
+ }
+ },
+ "/Cube/Attachment/GetFields": {
+ "get": {
+ "tags": [
+ "Attachment"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "cad395413d81d6d44b3d967b31693132"
+ }
+ },
+ "/Cube/CronJob/ExecuteNow": {
+ "post": {
+ "tags": [
+ "CronJob"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ },
+ "operationId": "978607ea2c99b1945593e49a617da34f"
+ }
+ },
+ "/Cube/CronJob": {
+ "delete": {
+ "tags": [
+ "CronJob"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "56e2f56e876fd5ffa8159f2264e4ff82"
+ },
+ "post": {
+ "tags": [
+ "CronJob"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJobModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJobModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJobModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "7723d655d87a46f5509426023c9344fe"
+ },
+ "put": {
+ "tags": [
+ "CronJob"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJobModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJobModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJobModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "d52737ca5b5322bf9ca9b6115b68c936"
+ },
+ "get": {
+ "tags": [
+ "CronJob"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "2259a5586f5f7da441be4a6357a6906b"
+ }
+ },
+ "/Cube/CronJob/Detail": {
+ "get": {
+ "tags": [
+ "CronJob"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "3d8a172eab1694cf01e5ce37968ae116"
+ }
+ },
+ "/Cube/CronJob/GetFields": {
+ "get": {
+ "tags": [
+ "CronJob"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "0306f4db4ae7b3336df35712acb5f4c6"
+ }
+ },
+ "/Cube/OrderManager/GetInfo": {
+ "get": {
+ "tags": [
+ "OrderManager"
+ ],
+ "parameters": [
+ {
+ "name": "codes",
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ },
+ "operationId": "b7676434ab42de9614d3f4aa0dca07b7"
+ }
+ },
+ "/Cube/OrderManager": {
+ "delete": {
+ "tags": [
+ "OrderManager"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "f16ddbd96b6b8a714a9a2f9ef852f242"
+ },
+ "post": {
+ "tags": [
+ "OrderManager"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManagerModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManagerModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManagerModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "5ee647ef2491795ddeefa61cb68bb2f4"
+ },
+ "put": {
+ "tags": [
+ "OrderManager"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManagerModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManagerModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManagerModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "3220c982dc8ba57ef01c7fc869608478"
+ },
+ "get": {
+ "tags": [
+ "OrderManager"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "c760d4914cbc853787d9d13035ecefb7"
+ }
+ },
+ "/Cube/OrderManager/Detail": {
+ "get": {
+ "tags": [
+ "OrderManager"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "dc6e409ff9f12a40876c91416d3a747a"
+ }
+ },
+ "/Cube/OrderManager/GetFields": {
+ "get": {
+ "tags": [
+ "OrderManager"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "426ef2b097a186e15a5c14000cdf4a0d"
+ }
+ },
+ "/Cube/PrincipalAgent": {
+ "delete": {
+ "tags": [
+ "PrincipalAgent"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "3f1d5370961efa6e8d40276a5a5187bf"
+ },
+ "post": {
+ "tags": [
+ "PrincipalAgent"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgentModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgentModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgentModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "80557dfdf273b202e2c4bca6585242eb"
+ },
+ "put": {
+ "tags": [
+ "PrincipalAgent"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgentModel"
+ }
+ },
+ "text/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgentModel"
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgentModel"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "ead368a866a7d30f4905184a51458583"
+ },
+ "get": {
+ "tags": [
+ "PrincipalAgent"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "c0ab55a73c88ddb2ad219e36ff5164cf"
+ }
+ },
+ "/Cube/PrincipalAgent/Detail": {
+ "get": {
+ "tags": [
+ "PrincipalAgent"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]"
+ }
+ }
+ }
+ }
+ },
+ "operationId": "47e2e0aac87b596d49db6cb44fff0945"
+ }
+ },
+ "/Cube/PrincipalAgent/GetFields": {
+ "get": {
+ "tags": [
+ "PrincipalAgent"
+ ],
+ "parameters": [
+ {
+ "name": "kind",
+ "in": "query",
+ "schema": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.ViewKinds"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.ViewModels.DataField"
+ }
+ }
+ }
+ }
+ }
+ },
+ "operationId": "ba90e8a5f82a2c2fccaaea8005ebd056"
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.App"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.App"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.AppLog, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppLog"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppLog"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.Attachment"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.Attachment"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJob"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJob"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManager"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManager"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiListResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgent"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgent"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiListResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/XCode.Membership.Area"
+ },
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "page": {
+ "$ref": "#/components/schemas/NewLife.Web.PageModel"
+ },
+ "stat": {
+ "$ref": "#/components/schemas/XCode.Membership.Area"
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.App, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.App"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.AppLog, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.AppLog"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.Attachment, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.Attachment"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.CronJob, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.CronJob"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.OrderManager, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.OrderManager"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[NewLife.Cube.Entity.PrincipalAgent, NewLife.Cube, Version=6.5.9287.28673, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.PrincipalAgent"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ApiResponse`1[[XCode.Membership.Area, XCode, Version=11.19.2025.601, Culture=neutral, PublicKeyToken=8343210f0b524456]]": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "$ref": "#/components/schemas/XCode.Membership.Area"
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.App": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "编号",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "description": "名称。AppID",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "description": "显示名",
+ "nullable": true
+ },
+ "secret": {
+ "type": "string",
+ "description": "密钥。AppSecret",
+ "nullable": true
+ },
+ "category": {
+ "type": "string",
+ "description": "类别",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "启用"
+ },
+ "homePage": {
+ "type": "string",
+ "description": "首页",
+ "nullable": true
+ },
+ "logo": {
+ "type": "string",
+ "description": "图标。附件路径",
+ "nullable": true
+ },
+ "white": {
+ "type": "string",
+ "description": "IP白名单。符合条件的来源IP才允许访问,支持*通配符,多个逗号隔开",
+ "nullable": true
+ },
+ "black": {
+ "type": "string",
+ "description": "IP黑名单。符合条件的来源IP禁止访问,支持*通配符,多个逗号隔开",
+ "nullable": true
+ },
+ "tokenExpire": {
+ "type": "integer",
+ "description": "有效期。访问令牌AccessToken的有效期,单位秒,默认使用全局设置",
+ "format": "int32"
+ },
+ "urls": {
+ "type": "string",
+ "description": "回调地址。用于限制回调地址安全性,多个地址逗号隔开",
+ "nullable": true
+ },
+ "roleIds": {
+ "type": "string",
+ "description": "授权角色。只允许这些角色登录该系统,多个角色逗号隔开,未填写时表示不限制",
+ "nullable": true
+ },
+ "scopes": {
+ "type": "string",
+ "description": "能力集合。逗号分隔,password,client_credentials",
+ "nullable": true
+ },
+ "oAuths": {
+ "type": "string",
+ "description": "三方OAuth。本系统作为OAuthServer时,该应用前来验证时可用的第三方OAuth提供商,多个逗号隔开",
+ "nullable": true
+ },
+ "expired": {
+ "type": "string",
+ "description": "过期时间。空表示永不过期",
+ "format": "date-time"
+ },
+ "auths": {
+ "type": "integer",
+ "description": "次数",
+ "format": "int32"
+ },
+ "lastAuth": {
+ "type": "string",
+ "description": "最后请求",
+ "format": "date-time"
+ },
+ "createUserID": {
+ "type": "integer",
+ "description": "创建者",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "description": "创建地址",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "description": "更新者",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "description": "更新地址",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "description": "内容",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.AppLog": {
+ "type": "object",
+ "properties": {
+ "app": {
+ "$ref": "#/components/schemas/NewLife.Cube.Entity.App"
+ },
+ "appName": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ },
+ "id": {
+ "type": "integer",
+ "description": "编号",
+ "format": "int64"
+ },
+ "appId": {
+ "type": "integer",
+ "description": "应用",
+ "format": "int32"
+ },
+ "action": {
+ "type": "string",
+ "description": "操作",
+ "nullable": true
+ },
+ "success": {
+ "type": "boolean",
+ "description": "成功"
+ },
+ "clientId": {
+ "type": "string",
+ "description": "应用标识",
+ "nullable": true
+ },
+ "redirectUri": {
+ "type": "string",
+ "description": "回调地址",
+ "nullable": true
+ },
+ "responseType": {
+ "type": "string",
+ "description": "响应类型。默认code",
+ "nullable": true
+ },
+ "scope": {
+ "type": "string",
+ "description": "授权域",
+ "nullable": true
+ },
+ "state": {
+ "type": "string",
+ "description": "状态数据",
+ "nullable": true
+ },
+ "accessToken": {
+ "type": "string",
+ "description": "访问令牌",
+ "nullable": true
+ },
+ "refreshToken": {
+ "type": "string",
+ "description": "刷新令牌",
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "description": "追踪。链路追踪,用于APM性能追踪定位,还原该事件的调用链",
+ "nullable": true
+ },
+ "createUser": {
+ "type": "string",
+ "description": "创建者。可以是设备编码等唯一使用者标识",
+ "nullable": true
+ },
+ "createIP": {
+ "type": "string",
+ "description": "创建地址",
+ "nullable": true
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "description": "更新地址",
+ "nullable": true
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "remark": {
+ "type": "string",
+ "description": "备注",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.AppModel": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "nullable": true
+ },
+ "secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "category": {
+ "type": "string",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "homePage": {
+ "type": "string",
+ "nullable": true
+ },
+ "logo": {
+ "type": "string",
+ "nullable": true
+ },
+ "white": {
+ "type": "string",
+ "nullable": true
+ },
+ "black": {
+ "type": "string",
+ "nullable": true
+ },
+ "tokenExpire": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "urls": {
+ "type": "string",
+ "nullable": true
+ },
+ "roleIds": {
+ "type": "string",
+ "nullable": true
+ },
+ "scopes": {
+ "type": "string",
+ "nullable": true
+ },
+ "oAuths": {
+ "type": "string",
+ "nullable": true
+ },
+ "expired": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "auths": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "lastAuth": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.Attachment": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "编号",
+ "format": "int64"
+ },
+ "category": {
+ "type": "string",
+ "description": "业务分类",
+ "nullable": true
+ },
+ "key": {
+ "type": "string",
+ "description": "业务主键",
+ "nullable": true
+ },
+ "title": {
+ "type": "string",
+ "description": "标题。业务内容作为附件标题,便于查看管理",
+ "nullable": true
+ },
+ "fileName": {
+ "type": "string",
+ "description": "文件名。原始文件名",
+ "nullable": true
+ },
+ "extension": {
+ "type": "string",
+ "description": "扩展名",
+ "nullable": true
+ },
+ "size": {
+ "type": "integer",
+ "description": "文件大小",
+ "format": "int64"
+ },
+ "contentType": {
+ "type": "string",
+ "description": "内容类型。用于Http响应",
+ "nullable": true
+ },
+ "filePath": {
+ "type": "string",
+ "description": "路径。本地相对路径或OSS路径,本地相对路径加上附件目录的配置,方便整体转移附件",
+ "nullable": true
+ },
+ "hash": {
+ "type": "string",
+ "description": "哈希。MD5",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "启用"
+ },
+ "uploadTime": {
+ "type": "string",
+ "description": "上传时间。附件上传时间,可用于构造文件存储路径",
+ "format": "date-time"
+ },
+ "url": {
+ "type": "string",
+ "description": "网址。链接到附件所在信息页的地址",
+ "nullable": true
+ },
+ "source": {
+ "type": "string",
+ "description": "来源。用于远程抓取的附件来源地址,本地文件不存在时自动依次抓取",
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "description": "追踪。链路追踪,用于APM性能追踪定位,还原该事件的调用链",
+ "nullable": true
+ },
+ "createUser": {
+ "type": "string",
+ "description": "创建者",
+ "nullable": true
+ },
+ "createUserID": {
+ "type": "integer",
+ "description": "创建用户",
+ "format": "int32"
+ },
+ "createIP": {
+ "type": "string",
+ "description": "创建地址",
+ "nullable": true
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "updateUser": {
+ "type": "string",
+ "description": "更新者",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "description": "更新用户",
+ "format": "int32"
+ },
+ "updateIP": {
+ "type": "string",
+ "description": "更新地址",
+ "nullable": true
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "remark": {
+ "type": "string",
+ "description": "备注",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.AttachmentModel": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "category": {
+ "type": "string",
+ "nullable": true
+ },
+ "key": {
+ "type": "string",
+ "nullable": true
+ },
+ "title": {
+ "type": "string",
+ "nullable": true
+ },
+ "fileName": {
+ "type": "string",
+ "nullable": true
+ },
+ "extension": {
+ "type": "string",
+ "nullable": true
+ },
+ "size": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "contentType": {
+ "type": "string",
+ "nullable": true
+ },
+ "filePath": {
+ "type": "string",
+ "nullable": true
+ },
+ "hash": {
+ "type": "string",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "uploadTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "url": {
+ "type": "string",
+ "nullable": true
+ },
+ "source": {
+ "type": "string",
+ "nullable": true
+ },
+ "traceId": {
+ "type": "string",
+ "nullable": true
+ },
+ "createUser": {
+ "type": "string",
+ "nullable": true
+ },
+ "createUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "createIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateUser": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "updateIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.CronJob": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "编号",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "description": "名称",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "description": "显示名",
+ "nullable": true
+ },
+ "cron": {
+ "type": "string",
+ "description": "Cron表达式。用于定时执行的Cron表达式",
+ "nullable": true
+ },
+ "method": {
+ "type": "string",
+ "description": "命令。ICubeJob类名或静态方法全名(包含一个String参数)",
+ "nullable": true
+ },
+ "argument": {
+ "type": "string",
+ "description": "参数。方法参数,时间日期、网址、SQL等",
+ "nullable": true
+ },
+ "data": {
+ "type": "string",
+ "description": "数据。作业运行中的小量数据,可传递给下一次作业执行,例如记录数据统计的时间点",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "启用"
+ },
+ "enableLog": {
+ "type": "boolean",
+ "description": "启用日志"
+ },
+ "lastTime": {
+ "type": "string",
+ "description": "最后时间。最后一次执行作业的时间",
+ "format": "date-time"
+ },
+ "nextTime": {
+ "type": "string",
+ "description": "下一次时间。下一次执行作业的时间",
+ "format": "date-time"
+ },
+ "createUserID": {
+ "type": "integer",
+ "description": "创建者",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "description": "创建地址",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "description": "更新者",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "description": "更新地址",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "description": "内容",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.CronJobModel": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "nullable": true
+ },
+ "cron": {
+ "type": "string",
+ "nullable": true
+ },
+ "method": {
+ "type": "string",
+ "nullable": true
+ },
+ "argument": {
+ "type": "string",
+ "nullable": true
+ },
+ "data": {
+ "type": "string",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "enableLog": {
+ "type": "boolean"
+ },
+ "lastTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "nextTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.OrderManager": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "编号",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "description": "指令名称",
+ "nullable": true
+ },
+ "code": {
+ "type": "string",
+ "description": "指令编号",
+ "nullable": true
+ },
+ "optCategory": {
+ "type": "string",
+ "description": "操作类型",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "启用"
+ },
+ "data": {
+ "type": "string",
+ "description": "数据,进行后续操作依赖值",
+ "nullable": true
+ },
+ "dataType": {
+ "type": "string",
+ "description": "数据类型,String、Int、Double、Decimal等",
+ "nullable": true
+ },
+ "url": {
+ "type": "string",
+ "description": "请求地址",
+ "nullable": true
+ },
+ "method": {
+ "type": "string",
+ "description": "请求方式,GET、POST、PUT、DELETE",
+ "nullable": true
+ },
+ "valueField": {
+ "type": "string",
+ "description": "值字段",
+ "nullable": true
+ },
+ "labelField": {
+ "type": "string",
+ "description": "文本字段",
+ "nullable": true
+ },
+ "createUserId": {
+ "type": "integer",
+ "description": "创建者",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "description": "创建地址",
+ "nullable": true
+ },
+ "updateUserId": {
+ "type": "integer",
+ "description": "更新者",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "description": "更新地址",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "description": "内容",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.OrderManagerModel": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "code": {
+ "type": "string",
+ "nullable": true
+ },
+ "optCategory": {
+ "type": "string",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "data": {
+ "type": "string",
+ "nullable": true
+ },
+ "dataType": {
+ "type": "string",
+ "nullable": true
+ },
+ "url": {
+ "type": "string",
+ "nullable": true
+ },
+ "method": {
+ "type": "string",
+ "nullable": true
+ },
+ "valueField": {
+ "type": "string",
+ "nullable": true
+ },
+ "labelField": {
+ "type": "string",
+ "nullable": true
+ },
+ "createUserId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateUserId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.PrincipalAgent": {
+ "type": "object",
+ "properties": {
+ "principal": {
+ "$ref": "#/components/schemas/XCode.Membership.IUser"
+ },
+ "principalName": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ },
+ "agent": {
+ "$ref": "#/components/schemas/XCode.Membership.IUser"
+ },
+ "agentName": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ },
+ "id": {
+ "type": "integer",
+ "description": "编号",
+ "format": "int32"
+ },
+ "principalId": {
+ "type": "integer",
+ "description": "委托人。把自己的身份权限委托给别人",
+ "format": "int32"
+ },
+ "agentId": {
+ "type": "integer",
+ "description": "代理人。代理获得别人身份权限",
+ "format": "int32"
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "启用"
+ },
+ "times": {
+ "type": "integer",
+ "description": "次数。可用代理次数,0表示已用完,-1表示无限制",
+ "format": "int32"
+ },
+ "expire": {
+ "type": "string",
+ "description": "有效期。截止时间之前有效,不设置表示无限制",
+ "format": "date-time"
+ },
+ "createUserId": {
+ "type": "integer",
+ "description": "创建者",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "description": "创建地址",
+ "nullable": true
+ },
+ "updateUserId": {
+ "type": "integer",
+ "description": "更新者",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "description": "更新地址",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "description": "内容",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.Entity.PrincipalAgentModel": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "principalId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "agentId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "times": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "expire": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createUserId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "createIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateUserId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ViewModels.DataField": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "nullable": true
+ },
+ "description": {
+ "type": "string",
+ "nullable": true
+ },
+ "category": {
+ "type": "string",
+ "nullable": true
+ },
+ "typeName": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ },
+ "itemType": {
+ "type": "string",
+ "nullable": true
+ },
+ "length": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "precision": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "scale": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "nullable": {
+ "type": "boolean"
+ },
+ "primaryKey": {
+ "type": "boolean"
+ },
+ "readOnly": {
+ "type": "boolean"
+ },
+ "visible": {
+ "type": "boolean"
+ },
+ "required": {
+ "type": "boolean"
+ },
+ "authority": {
+ "type": "string",
+ "nullable": true
+ },
+ "extended1": {
+ "type": "string",
+ "nullable": true
+ },
+ "extended2": {
+ "type": "string",
+ "nullable": true
+ },
+ "extended3": {
+ "type": "string",
+ "nullable": true
+ },
+ "mapField": {
+ "type": "string",
+ "nullable": true
+ },
+ "lovCode": {
+ "type": "string",
+ "nullable": true
+ },
+ "services": {
+ "type": "array",
+ "items": {},
+ "nullable": true,
+ "readOnly": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "NewLife.Cube.ViewModels.ViewKinds": {
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ "type": "integer",
+ "format": "int32"
+ },
+ "NewLife.Web.PageModel": {
+ "type": "object",
+ "properties": {
+ "pageIndex": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "pageSize": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "totalCount": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "longTotalCount": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "XCode.Membership.Area": {
+ "type": "object",
+ "properties": {
+ "parent": {
+ "$ref": "#/components/schemas/XCode.Membership.Area"
+ },
+ "parentPath": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ },
+ "path": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ },
+ "childs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/XCode.Membership.Area"
+ },
+ "nullable": true,
+ "readOnly": true
+ },
+ "isVirtual": {
+ "type": "boolean",
+ "readOnly": true
+ },
+ "id": {
+ "type": "integer",
+ "description": "编码。行政区划编码",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "description": "名称",
+ "nullable": true
+ },
+ "fullName": {
+ "type": "string",
+ "description": "全名",
+ "nullable": true
+ },
+ "parentID": {
+ "type": "integer",
+ "description": "父级",
+ "format": "int32"
+ },
+ "level": {
+ "type": "integer",
+ "description": "层级",
+ "format": "int32"
+ },
+ "kind": {
+ "type": "string",
+ "description": "类型。省市县,自治州等",
+ "nullable": true
+ },
+ "english": {
+ "type": "string",
+ "description": "英文名",
+ "nullable": true
+ },
+ "pinYin": {
+ "type": "string",
+ "description": "拼音",
+ "nullable": true
+ },
+ "jianPin": {
+ "type": "string",
+ "description": "简拼",
+ "nullable": true
+ },
+ "telCode": {
+ "type": "string",
+ "description": "区号。电话区号",
+ "nullable": true
+ },
+ "zipCode": {
+ "type": "string",
+ "description": "邮编。邮政编码",
+ "nullable": true
+ },
+ "longitude": {
+ "type": "number",
+ "description": "经度",
+ "format": "double"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "纬度",
+ "format": "double"
+ },
+ "geoHash": {
+ "type": "string",
+ "description": "地址编码。字符串前缀相同越多,地理距离越近,8位精度19米,6位610米",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "启用"
+ },
+ "createTime": {
+ "type": "string",
+ "description": "创建时间",
+ "format": "date-time"
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "更新时间",
+ "format": "date-time"
+ },
+ "remark": {
+ "type": "string",
+ "description": "备注",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "XCode.Membership.AreaModel": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "fullName": {
+ "type": "string",
+ "nullable": true
+ },
+ "parentID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "level": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "kind": {
+ "type": "string",
+ "nullable": true
+ },
+ "english": {
+ "type": "string",
+ "nullable": true
+ },
+ "pinYin": {
+ "type": "string",
+ "nullable": true
+ },
+ "jianPin": {
+ "type": "string",
+ "nullable": true
+ },
+ "telCode": {
+ "type": "string",
+ "nullable": true
+ },
+ "zipCode": {
+ "type": "string",
+ "nullable": true
+ },
+ "longitude": {
+ "type": "number",
+ "format": "double"
+ },
+ "latitude": {
+ "type": "number",
+ "format": "double"
+ },
+ "geoHash": {
+ "type": "string",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "XCode.Membership.IRole": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "isSystem": {
+ "type": "boolean"
+ },
+ "tenantId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "permission": {
+ "type": "string",
+ "nullable": true
+ },
+ "sort": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "ex1": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "ex2": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "ex3": {
+ "type": "number",
+ "format": "double"
+ },
+ "ex4": {
+ "type": "string",
+ "nullable": true
+ },
+ "ex5": {
+ "type": "string",
+ "nullable": true
+ },
+ "ex6": {
+ "type": "string",
+ "nullable": true
+ },
+ "createUser": {
+ "type": "string",
+ "nullable": true
+ },
+ "createUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "createIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updateUser": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateUserID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "updateIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "updateTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ },
+ "permissions": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/XCode.Membership.PermissionFlags"
+ },
+ "nullable": true,
+ "readOnly": true
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "nullable": true,
+ "readOnly": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "XCode.Membership.IUser": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "name": {
+ "type": "string",
+ "nullable": true
+ },
+ "password": {
+ "type": "string",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "nullable": true
+ },
+ "sex": {
+ "$ref": "#/components/schemas/XCode.Membership.SexKinds"
+ },
+ "mail": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailVerified": {
+ "type": "boolean"
+ },
+ "mobile": {
+ "type": "string",
+ "nullable": true
+ },
+ "mobileVerified": {
+ "type": "boolean"
+ },
+ "code": {
+ "type": "string",
+ "nullable": true
+ },
+ "areaId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "avatar": {
+ "type": "string",
+ "nullable": true
+ },
+ "roleID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "roleIds": {
+ "type": "string",
+ "nullable": true
+ },
+ "departmentID": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "online": {
+ "type": "boolean"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "age": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "birthday": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "logins": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "lastLogin": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "lastLoginIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "registerTime": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "registerIP": {
+ "type": "string",
+ "nullable": true
+ },
+ "onlineTime": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "ex1": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "ex2": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "ex3": {
+ "type": "number",
+ "format": "double"
+ },
+ "ex4": {
+ "type": "string",
+ "nullable": true
+ },
+ "ex5": {
+ "type": "string",
+ "nullable": true
+ },
+ "ex6": {
+ "type": "string",
+ "nullable": true
+ },
+ "remark": {
+ "type": "string",
+ "nullable": true
+ },
+ "role": {
+ "$ref": "#/components/schemas/XCode.Membership.IRole"
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/XCode.Membership.IRole"
+ },
+ "nullable": true,
+ "readOnly": true
+ },
+ "roleName": {
+ "type": "string",
+ "nullable": true,
+ "readOnly": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "XCode.Membership.PermissionFlags": {
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 4,
+ 8,
+ 4294967295
+ ],
+ "type": "integer",
+ "format": "int32"
+ },
+ "XCode.Membership.SexKinds": {
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "type": "integer",
+ "format": "int32"
+ }
+ },
+ "securitySchemes": {
+ "OAuth2": {
+ "type": "oauth2",
+ "flows": {
+ "authorizationCode": {
+ "authorizationUrl": "https://sso.newlifex.com/sso/authorize",
+ "tokenUrl": "https://sso.newlifex.com/sso/access_token",
+ "scopes": {}
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "OAuth2": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/cube-admin/src/pages/admin/menu/index.vue b/apps/cube-admin/src/pages/admin/menu/index.vue
index a4cffd2..8bbc271 100644
--- a/apps/cube-admin/src/pages/admin/menu/index.vue
+++ b/apps/cube-admin/src/pages/admin/menu/index.vue
@@ -5,7 +5,7 @@
<div class="card-header">
<h3>菜单管理</h3>
<div>
- <el-button type="success" @click="handleMoveUp" :disabled="selectedRows.length !== 1">
+ <!-- <el-button type="success" @click="handleMoveUp" :disabled="selectedRows.length !== 1">
上移
{{
selectedRows.length === 1
@@ -20,7 +20,7 @@
? `(${selectedRows[0].displayName || selectedRows[0].name})`
: ''
}}
- </el-button>
+ </el-button> -->
<el-button type="primary" @click="handleAdd">新增菜单</el-button>
</div>
</div>
diff --git a/apps/cube-cube/package.json b/apps/cube-cube/package.json
index 175592f..15fb60d 100644
--- a/apps/cube-cube/package.json
+++ b/apps/cube-cube/package.json
@@ -1,3 +1,23 @@
{
- "main": "src/main.ts"
+ "name": "cube-cube",
+ "version": "1.0.0",
+ "description": "魔方管理系统前端页面",
+ "main": "src/main.ts",
+ "scripts": {
+ "dev": "vite",
+ "build": "vue-tsc && vite build",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "vue": "^3.4.0",
+ "vue-router": "^4.2.0",
+ "element-plus": "^2.4.0",
+ "@element-plus/icons-vue": "^2.1.0"
+ },
+ "devDependencies": {
+ "@vitejs/plugin-vue": "^4.5.0",
+ "typescript": "^5.2.0",
+ "vue-tsc": "^1.8.0",
+ "vite": "^5.0.0"
+ }
}
\ No newline at end of file
diff --git a/apps/cube-cube/README.md b/apps/cube-cube/README.md
new file mode 100644
index 0000000..332874e
--- /dev/null
+++ b/apps/cube-cube/README.md
@@ -0,0 +1,81 @@
+# Cube-Cube 魔方管理系统
+
+这是基于 Cube OpenAPI 文档生成的前端页面模块,包含了魔方系统的核心功能页面。
+
+## 功能模块
+
+### 1. 应用管理 (/Cube/App)
+- 应用的增删改查
+- 应用启动配置管理
+- 应用版本管理
+
+### 2. 应用日志 (/Cube/AppLog)
+- 应用操作日志查看
+- 日志筛选和搜索
+- 日志详情查看
+
+### 3. 地区管理 (/Cube/Area)
+- 省市区县地区数据管理
+- 地区层级关系维护
+- 地区信息编辑
+
+### 4. 附件管理 (/Cube/Attachment)
+- 文件上传和管理
+- 附件分类管理
+- 文件下载统计
+
+### 5. 定时任务 (/Cube/CronJob)
+- Cron定时任务配置
+- 任务执行状态管理
+- 立即执行任务功能
+
+### 6. 订单管理 (/Cube/OrderManager)
+- 订单信息管理
+- 订单状态跟踪
+- 订单信息查询
+
+### 7. 主体代理 (/Cube/PrincipalAgent)
+- 代理主体信息管理
+- 代理类型分类
+- 联系信息维护
+
+## 技术栈
+
+- Vue 3 + TypeScript
+- Element Plus UI 组件库
+- Vue Router 路由管理
+- Vite 构建工具
+
+## API 接口对接
+
+所有页面都严格按照 `Cube_OpenAPI.json` 文档中的接口规范实现:
+
+- 使用标准的 REST API 规范
+- 支持分页查询
+- 统一的错误处理
+- 完整的 CRUD 操作
+
+## 页面特性
+
+- 响应式设计,支持各种屏幕尺寸
+- 统一的搜索和筛选功能
+- 表格分页和排序
+- 表单验证和提交
+- 详情查看和编辑对话框
+- 操作确认和反馈提示
+
+## 使用方法
+
+1. 确保核心模块 `@core` 已正确配置
+2. 导入路由配置:
+ ```typescript
+ import { routes } from 'cube-cube'
+ ```
+3. 将路由添加到主路由配置中
+
+## 注意事项
+
+- 所有接口调用都使用 `@core/utils/request` 统一的请求工具
+- 页面样式遵循 Element Plus 设计规范
+- 支持国际化(中文为主)
+- 包含完整的 TypeScript 类型定义
diff --git a/apps/cube-cube/src/main.ts b/apps/cube-cube/src/main.ts
index 2f0358f..db3923b 100644
--- a/apps/cube-cube/src/main.ts
+++ b/apps/cube-cube/src/main.ts
@@ -1 +1,3 @@
-export const routes = [];
\ No newline at end of file
+import routes from './routes';
+
+export { routes };
diff --git a/apps/cube-cube/src/pages/cube/app-log/index.vue b/apps/cube-cube/src/pages/cube/app-log/index.vue
new file mode 100644
index 0000000..86cddba
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/app-log/index.vue
@@ -0,0 +1,213 @@
+<template>
+ <div class="app-log-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>应用日志</h3>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="关键词">
+ <el-input v-model="searchForm.q" placeholder="请输入关键词" clearable />
+ </el-form-item>
+ <el-form-item label="应用">
+ <el-select v-model="searchForm.appId" placeholder="请选择应用" clearable>
+ <el-option
+ v-for="app in appOptions"
+ :key="app.id"
+ :label="app.displayName || app.name"
+ :value="app.id"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="日期范围">
+ <el-date-picker
+ v-model="searchForm.dateRange"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DDTHH:mm:ss"
+ />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ style="width: 100%"
+ v-loading="loading"
+ >
+ <el-table-column prop="id" label="ID" width="80" />
+ <el-table-column prop="appId" label="应用ID" width="80" />
+ <el-table-column prop="appName" label="应用名称" />
+ <el-table-column prop="action" label="操作" />
+ <el-table-column prop="createTime" label="创建时间" />
+ <el-table-column prop="remark" label="备注" show-overflow-tooltip />
+ <el-table-column label="状态" width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.success ? 'success' : 'danger'">
+ {{ scope.row.success ? '成功' : '失败' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
+ :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </el-card>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义日志类型接口
+interface AppLog {
+ id: number;
+ appId: number;
+ appName: string;
+ action: string;
+ success: boolean;
+ remark: string;
+ createTime: string;
+ createUser: string;
+ createIP: string;
+}
+
+// 定义应用选项接口
+interface AppOption {
+ id: number;
+ name: string;
+ displayName: string;
+}
+
+// 响应式数据
+const loading = ref(false);
+const total = ref(0);
+const tableData = ref<AppLog[]>([]);
+const appOptions = ref<AppOption[]>([]);
+
+// 分页相关
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+ appId: undefined as number | undefined,
+ dateRange: [] as string[],
+});
+
+// 加载应用选项
+const loadAppOptions = async () => {
+ try {
+ const response = await request.get('/Cube/App');
+ if (response && response.data) {
+ const data = response.data.data || response.data;
+ appOptions.value = data.rows || data.list || [];
+ }
+ } catch (error) {
+ console.error('加载应用选项失败:', error);
+ }
+};
+
+// 加载数据
+const loadData = async () => {
+ loading.value = true;
+ try {
+ const params: Record<string, unknown> = {
+ q: searchForm.q,
+ appId: searchForm.appId,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value,
+ };
+
+ // 处理日期范围
+ if (searchForm.dateRange && searchForm.dateRange.length === 2) {
+ params.startTime = searchForm.dateRange[0];
+ params.endTime = searchForm.dateRange[1];
+ }
+
+ const response = await request.get('/Cube/AppLog', { params });
+ const { list, total: totalCount } = processListResponse<AppLog>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ tableData.value = [];
+ total.value = 0;
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ searchForm.appId = undefined;
+ searchForm.dateRange = [];
+ currentPage.value = 1;
+ loadData();
+};
+
+// 页码变更处理
+const handleCurrentChange = (page: number) => {
+ currentPage.value = page;
+ loadData();
+};
+
+// 每页显示条数变更处理
+const handleSizeChange = (size: number) => {
+ pageSize.value = size;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 初始化
+onMounted(() => {
+ loadAppOptions();
+ loadData();
+});
+</script>
+
+<style scoped>
+.app-log-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 20px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/app/index.vue b/apps/cube-cube/src/pages/cube/app/index.vue
new file mode 100644
index 0000000..dd84e14
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/app/index.vue
@@ -0,0 +1,336 @@
+<template>
+ <div class="app-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>应用管理</h3>
+ <el-button type="primary" @click="handleAdd">新增应用</el-button>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="应用名称">
+ <el-input v-model="searchForm.q" placeholder="请输入应用名称" clearable />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ style="width: 100%"
+ v-loading="loading"
+ >
+ <el-table-column prop="id" label="ID" width="80" />
+ <el-table-column prop="name" label="名称" />
+ <el-table-column prop="displayName" label="显示名" />
+ <el-table-column prop="category" label="类别" />
+ <el-table-column prop="version" label="版本" />
+ <el-table-column prop="updateTime" label="更新时间" />
+ <el-table-column label="自启动" width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.autoStart ? 'success' : 'danger'">
+ {{ scope.row.autoStart ? '是' : '否' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="状态" width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.enable ? 'success' : 'danger'">
+ {{ scope.row.enable ? '启用' : '禁用' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="操作" width="180">
+ <template #default="scope">
+ <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
+ :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </el-card>
+
+ <!-- 应用表单对话框 -->
+ <el-dialog
+ v-model="dialogVisible"
+ :title="formType === 'add' ? '新增应用' : '编辑应用'"
+ width="500px"
+ >
+ <el-form ref="formRef" :model="form" :rules="formRules" label-width="100px">
+ <el-form-item label="应用名称" prop="name">
+ <el-input v-model="form.name" placeholder="请输入应用名称" />
+ </el-form-item>
+ <el-form-item label="显示名称" prop="displayName">
+ <el-input v-model="form.displayName" placeholder="请输入显示名称" />
+ </el-form-item>
+ <el-form-item label="类别" prop="category">
+ <el-input v-model="form.category" placeholder="请输入应用类别" />
+ </el-form-item>
+ <el-form-item label="版本" prop="version">
+ <el-input v-model="form.version" placeholder="请输入版本号" />
+ </el-form-item>
+ <el-form-item label="文件名" prop="fileName">
+ <el-input v-model="form.fileName" placeholder="请输入文件名" />
+ </el-form-item>
+ <el-form-item label="参数" prop="arguments">
+ <el-input v-model="form.arguments" placeholder="请输入启动参数" />
+ </el-form-item>
+ <el-form-item label="工作目录" prop="workingDirectory">
+ <el-input v-model="form.workingDirectory" placeholder="请输入工作目录" />
+ </el-form-item>
+ <el-form-item label="用户名" prop="userName">
+ <el-input v-model="form.userName" placeholder="请输入用户名" />
+ </el-form-item>
+ <el-form-item label="自启动" prop="autoStart">
+ <el-switch v-model="form.autoStart" :active-value="true" :inactive-value="false" />
+ </el-form-item>
+ <el-form-item label="启用状态" prop="enable">
+ <el-switch v-model="form.enable" :active-value="true" :inactive-value="false" />
+ </el-form-item>
+ <el-form-item label="描述" prop="description">
+ <el-input v-model="form.description" type="textarea" placeholder="请输入描述" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="dialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitForm">确定</el-button>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import type { FormInstance, FormRules } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义应用类型接口
+interface App {
+ id: number;
+ name: string;
+ displayName: string;
+ category: string;
+ version: string;
+ fileName: string;
+ arguments: string;
+ workingDirectory: string;
+ userName: string;
+ autoStart: boolean;
+ enable: boolean;
+ description: string;
+ createTime: string;
+ updateTime: string;
+}
+
+// 响应式数据
+const loading = ref(false);
+const dialogVisible = ref(false);
+const formType = ref<'add' | 'edit'>('add');
+const formRef = ref<FormInstance | null>(null);
+const total = ref(0);
+const tableData = ref<App[]>([]);
+
+// 分页相关
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+});
+
+// 应用表单
+const form = reactive<Partial<App>>({
+ name: '',
+ displayName: '',
+ category: '',
+ version: '',
+ fileName: '',
+ arguments: '',
+ workingDirectory: '',
+ userName: '',
+ autoStart: false,
+ enable: true,
+ description: '',
+});
+
+// 表单验证规则
+const formRules = reactive<FormRules>({
+ name: [
+ { required: true, message: '请输入应用名称', trigger: 'blur' }
+ ],
+ displayName: [
+ { required: true, message: '请输入显示名称', trigger: 'blur' }
+ ]
+});
+
+// 加载数据
+const loadData = async () => {
+ loading.value = true;
+ try {
+ const params = {
+ q: searchForm.q,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value,
+ };
+
+ const response = await request.get('/Cube/App', { params });
+ const { list, total: totalCount } = processListResponse<App>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+
+ console.log('加载的数据:', tableData.value);
+ console.log('总数:', total.value);
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ tableData.value = [];
+ total.value = 0;
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ currentPage.value = 1;
+ loadData();
+};
+
+// 新增
+const handleAdd = () => {
+ formType.value = 'add';
+ resetForm();
+ dialogVisible.value = true;
+};
+
+// 编辑
+const handleEdit = (row: App) => {
+ formType.value = 'edit';
+ Object.assign(form, row);
+ dialogVisible.value = true;
+};
+
+// 删除
+const handleDelete = (row: App) => {
+ ElMessageBox.confirm(
+ `确定要删除应用"${row.displayName || row.name}"吗?`,
+ '确认删除',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ ).then(async () => {
+ try {
+ await request.delete(`/Cube/App?id=${row.id}`);
+ ElMessage.success('删除成功');
+ loadData();
+ } catch (error) {
+ ElMessage.error('删除失败');
+ console.error('删除失败:', error);
+ }
+ });
+};
+
+// 重置表单
+const resetForm = () => {
+ Object.assign(form, {
+ id: undefined,
+ name: '',
+ displayName: '',
+ category: '',
+ version: '',
+ fileName: '',
+ arguments: '',
+ workingDirectory: '',
+ userName: '',
+ autoStart: false,
+ enable: true,
+ description: '',
+ });
+ formRef.value?.clearValidate();
+};
+
+// 提交表单
+const submitForm = () => {
+ if (!formRef.value) return;
+
+ formRef.value.validate(async (valid: boolean) => {
+ if (valid) {
+ try {
+ if (formType.value === 'add') {
+ await request.post('/Cube/App', form);
+ ElMessage.success('新增成功');
+ } else {
+ await request.put('/Cube/App', form);
+ ElMessage.success('更新成功');
+ }
+ dialogVisible.value = false;
+ loadData();
+ } catch (error) {
+ ElMessage.error(`${formType.value === 'add' ? '新增' : '更新'}失败`);
+ console.error('操作失败:', error);
+ }
+ }
+ });
+};
+
+// 页码变更处理
+const handleCurrentChange = (page: number) => {
+ currentPage.value = page;
+ loadData();
+};
+
+// 每页显示条数变更处理
+const handleSizeChange = (size: number) => {
+ pageSize.value = size;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 初始化
+onMounted(() => {
+ loadData();
+});
+</script>
+
+<style scoped>
+.app-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 20px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/area/index.vue b/apps/cube-cube/src/pages/cube/area/index.vue
new file mode 100644
index 0000000..bcf174b
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/area/index.vue
@@ -0,0 +1,413 @@
+<template>
+ <div class="area-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>地区管理</h3>
+ <el-button type="primary" @click="handleAdd">新增地区</el-button>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="地区名称">
+ <el-input v-model="searchForm.q" placeholder="请输入地区名称" clearable />
+ </el-form-item>
+ <el-form-item label="地区级别">
+ <el-select v-model="searchForm.level" placeholder="请选择地区级别" clearable>
+ <el-option label="省份" :value="1" />
+ <el-option label="城市" :value="2" />
+ <el-option label="区县" :value="3" />
+ <el-option label="乡镇" :value="4" />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ style="width: 100%"
+ v-loading="loading"
+ row-key="id"
+ default-expand-all
+ :tree-props="{ children: 'children' }"
+ >
+ <el-table-column prop="id" label="ID" width="80" />
+ <el-table-column prop="name" label="名称" />
+ <el-table-column prop="fullName" label="全称" />
+ <el-table-column prop="code" label="代码" />
+ <el-table-column prop="pinyin" label="拼音" />
+ <el-table-column prop="jianpin" label="简拼" />
+ <el-table-column prop="longitude" label="经度" />
+ <el-table-column prop="latitude" label="纬度" />
+ <el-table-column label="级别" width="100">
+ <template #default="scope">
+ <el-tag :type="getLevelType(scope.row.level)">
+ {{ getLevelText(scope.row.level) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="状态" width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.enable ? 'success' : 'danger'">
+ {{ scope.row.enable ? '启用' : '禁用' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="操作" width="180">
+ <template #default="scope">
+ <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
+ :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </el-card>
+
+ <!-- 地区表单对话框 -->
+ <el-dialog
+ v-model="dialogVisible"
+ :title="formType === 'add' ? '新增地区' : '编辑地区'"
+ width="600px"
+ >
+ <el-form ref="formRef" :model="form" :rules="formRules" label-width="100px">
+ <el-form-item label="地区名称" prop="name">
+ <el-input v-model="form.name" placeholder="请输入地区名称" />
+ </el-form-item>
+ <el-form-item label="全称" prop="fullName">
+ <el-input v-model="form.fullName" placeholder="请输入地区全称" />
+ </el-form-item>
+ <el-form-item label="地区代码" prop="code">
+ <el-input v-model="form.code" placeholder="请输入地区代码" />
+ </el-form-item>
+ <el-form-item label="上级地区" prop="parentId">
+ <el-select v-model="form.parentId" placeholder="请选择上级地区" clearable filterable>
+ <el-option label="无上级" :value="0" />
+ <el-option
+ v-for="area in areaOptions"
+ :key="area.id"
+ :label="area.fullName || area.name"
+ :value="area.id"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="级别" prop="level">
+ <el-select v-model="form.level" placeholder="请选择级别">
+ <el-option label="省份" :value="1" />
+ <el-option label="城市" :value="2" />
+ <el-option label="区县" :value="3" />
+ <el-option label="乡镇" :value="4" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="拼音" prop="pinyin">
+ <el-input v-model="form.pinyin" placeholder="请输入拼音" />
+ </el-form-item>
+ <el-form-item label="简拼" prop="jianpin">
+ <el-input v-model="form.jianpin" placeholder="请输入简拼" />
+ </el-form-item>
+ <el-form-item label="经度" prop="longitude">
+ <el-input-number v-model="form.longitude" placeholder="请输入经度" :precision="6" />
+ </el-form-item>
+ <el-form-item label="纬度" prop="latitude">
+ <el-input-number v-model="form.latitude" placeholder="请输入纬度" :precision="6" />
+ </el-form-item>
+ <el-form-item label="启用状态" prop="enable">
+ <el-switch v-model="form.enable" :active-value="true" :inactive-value="false" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="dialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitForm">确定</el-button>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import type { FormInstance, FormRules } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义地区类型接口
+interface Area {
+ id: number;
+ name: string;
+ fullName: string;
+ code: string;
+ parentId: number;
+ level: number;
+ pinyin: string;
+ jianpin: string;
+ longitude: number;
+ latitude: number;
+ enable: boolean;
+ createTime: string;
+ updateTime: string;
+ children?: Area[];
+}
+
+// 响应式数据
+const loading = ref(false);
+const dialogVisible = ref(false);
+const formType = ref<'add' | 'edit'>('add');
+const formRef = ref<FormInstance | null>(null);
+const total = ref(0);
+const tableData = ref<Area[]>([]);
+const areaOptions = ref<Area[]>([]);
+
+// 分页相关
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+ level: undefined as number | undefined,
+});
+
+// 地区表单
+const form = reactive<Partial<Area>>({
+ name: '',
+ fullName: '',
+ code: '',
+ parentId: 0,
+ level: 1,
+ pinyin: '',
+ jianpin: '',
+ longitude: 0,
+ latitude: 0,
+ enable: true,
+});
+
+// 表单验证规则
+const formRules = reactive<FormRules>({
+ name: [
+ { required: true, message: '请输入地区名称', trigger: 'blur' }
+ ],
+ code: [
+ { required: true, message: '请输入地区代码', trigger: 'blur' }
+ ],
+ level: [
+ { required: true, message: '请选择地区级别', trigger: 'change' }
+ ]
+});
+
+// 获取级别类型
+const getLevelType = (level: number): 'success' | 'primary' | 'warning' | 'danger' | 'info' => {
+ const types: Record<number, 'success' | 'primary' | 'warning' | 'danger' | 'info'> = {
+ 1: 'success',
+ 2: 'primary',
+ 3: 'warning',
+ 4: 'danger'
+ };
+ return types[level] || 'info';
+};
+
+// 获取级别文本
+const getLevelText = (level: number) => {
+ const texts = ['', '省份', '城市', '区县', '乡镇'];
+ return texts[level] || '未知';
+};
+
+// 加载地区选项
+const loadAreaOptions = async () => {
+ try {
+ // 获取所有地区用于下拉选择(不分页)
+ const response = await request.get('/Cube/Area', {
+ params: { pageSize: 1000, pageIndex: 1 }
+ });
+
+ console.log('地区选项响应:', response);
+
+ if (response && response.data) {
+ const { list } = processListResponse<Area>(response);
+ areaOptions.value = list;
+ console.log('地区选项数据:', areaOptions.value);
+ }
+ } catch (error) {
+ console.error('加载地区选项失败:', error);
+ }
+};
+
+// 加载表格数据(用于搜索、分页等操作)
+const loadData = async () => {
+ loading.value = true;
+ try {
+ const params = {
+ ...searchForm,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value, // 使用cube-admin的方式,不减1
+ };
+
+ console.log('表格数据请求参数:', params);
+
+ const response = await request.get('/Cube/Area', { params });
+ console.log('表格数据响应:', response);
+
+ const { list, total: totalCount } = processListResponse<Area>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+
+ console.log('表格数据:', tableData.value);
+ console.log('总数:', total.value);
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ tableData.value = [];
+ total.value = 0;
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ searchForm.level = undefined;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 新增
+const handleAdd = () => {
+ formType.value = 'add';
+ resetForm();
+ // 确保地区选项是最新的
+ if (areaOptions.value.length === 0) {
+ loadAreaOptions();
+ }
+ dialogVisible.value = true;
+};
+
+// 编辑
+const handleEdit = (row: Area) => {
+ formType.value = 'edit';
+ Object.assign(form, row);
+ // 确保地区选项是最新的
+ if (areaOptions.value.length === 0) {
+ loadAreaOptions();
+ }
+ dialogVisible.value = true;
+};
+
+// 页码变更处理
+const handleCurrentChange = (page: number) => {
+ currentPage.value = page;
+ loadData();
+};
+
+// 每页显示条数变更处理
+const handleSizeChange = (size: number) => {
+ pageSize.value = size;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 删除
+const handleDelete = (row: Area) => {
+ ElMessageBox.confirm(
+ `确定要删除地区"${row.fullName || row.name}"吗?`,
+ '确认删除',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ ).then(async () => {
+ try {
+ await request.delete(`/Cube/Area?id=${row.id}`);
+ ElMessage.success('删除成功');
+ loadData();
+ } catch (error) {
+ ElMessage.error('删除失败');
+ console.error('删除失败:', error);
+ }
+ });
+};
+
+// 重置表单
+const resetForm = () => {
+ Object.assign(form, {
+ id: undefined,
+ name: '',
+ fullName: '',
+ code: '',
+ parentId: 0,
+ level: 1,
+ pinyin: '',
+ jianpin: '',
+ longitude: 0,
+ latitude: 0,
+ enable: true,
+ });
+ formRef.value?.clearValidate();
+};
+
+// 提交表单
+const submitForm = () => {
+ if (!formRef.value) return;
+
+ formRef.value.validate(async (valid: boolean) => {
+ if (valid) {
+ try {
+ if (formType.value === 'add') {
+ await request.post('/Cube/Area', form);
+ ElMessage.success('新增成功');
+ } else {
+ await request.put('/Cube/Area', form);
+ ElMessage.success('更新成功');
+ }
+ dialogVisible.value = false;
+ loadData();
+ } catch (error) {
+ ElMessage.error(`${formType.value === 'add' ? '新增' : '更新'}失败`);
+ console.error('操作失败:', error);
+ }
+ }
+ });
+};
+
+// 初始化
+onMounted(() => {
+ loadAreaOptions(); // 加载地区选项
+ loadData(); // 加载表格数据
+});
+</script>
+
+<style scoped>
+.area-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 20px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/attachment/index.vue b/apps/cube-cube/src/pages/cube/attachment/index.vue
new file mode 100644
index 0000000..a205549
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/attachment/index.vue
@@ -0,0 +1,402 @@
+<template>
+ <div class="attachment-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>附件管理</h3>
+ <el-button type="primary" @click="handleAdd">上传附件</el-button>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="文件名">
+ <el-input v-model="searchForm.q" placeholder="请输入文件名" clearable />
+ </el-form-item>
+ <el-form-item label="分类">
+ <el-input v-model="searchForm.category" placeholder="请输入分类" clearable />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ style="width: 100%"
+ v-loading="loading"
+ >
+ <el-table-column type="selection" width="55" />
+ <el-table-column prop="id" label="ID" width="80" />
+ <el-table-column prop="fileName" label="文件名" show-overflow-tooltip />
+ <el-table-column prop="category" label="分类" />
+ <el-table-column prop="size" label="大小">
+ <template #default="scope">
+ {{ formatFileSize(scope.row.size) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="contentType" label="类型" />
+ <el-table-column prop="downloads" label="下载次数" />
+ <el-table-column prop="createTime" label="上传时间" />
+ <el-table-column prop="createUser" label="上传者" />
+ <el-table-column label="状态" width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.enable ? 'success' : 'danger'">
+ {{ scope.row.enable ? '启用' : '禁用' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="操作" width="180">
+ <template #default="scope">
+ <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
+ :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </el-card>
+
+ <!-- 附件表单对话框 -->
+ <el-dialog
+ v-model="dialogVisible"
+ :title="formType === 'add' ? '上传附件' : '编辑附件'"
+ width="600px"
+ >
+ <el-form ref="formRef" :model="form" :rules="formRules" label-width="100px">
+ <el-form-item label="文件上传" prop="file" v-if="formType === 'add'">
+ <el-upload
+ ref="uploadRef"
+ :auto-upload="false"
+ :on-change="handleFileChange"
+ :before-upload="beforeUpload"
+ drag
+ action="#"
+ :limit="1"
+ accept="*/*"
+ >
+ <el-icon class="el-icon--upload"><upload-filled /></el-icon>
+ <div class="el-upload__text">
+ 将文件拖拽到此处,或<em>点击上传</em>
+ </div>
+ <template #tip>
+ <div class="el-upload__tip">
+ 支持任意格式文件,单个文件不超过100MB
+ </div>
+ </template>
+ </el-upload>
+ </el-form-item>
+ <el-form-item label="文件名" prop="fileName">
+ <el-input v-model="form.fileName" placeholder="请输入文件名" />
+ </el-form-item>
+ <el-form-item label="显示名" prop="displayName">
+ <el-input v-model="form.displayName" placeholder="请输入显示名" />
+ </el-form-item>
+ <el-form-item label="分类" prop="category">
+ <el-input v-model="form.category" placeholder="请输入分类" />
+ </el-form-item>
+ <el-form-item label="启用状态" prop="enable">
+ <el-switch v-model="form.enable" :active-value="true" :inactive-value="false" />
+ </el-form-item>
+ <el-form-item label="描述" prop="description">
+ <el-input v-model="form.description" type="textarea" placeholder="请输入描述" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="dialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitForm" :loading="uploading">
+ {{ formType === 'add' ? '上传' : '保存' }}
+ </el-button>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import { UploadFilled } from '@element-plus/icons-vue';
+import type { FormInstance, FormRules, UploadProps, UploadFile } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义附件类型接口
+interface Attachment {
+ id: number;
+ fileName: string;
+ displayName: string;
+ category: string;
+ size: number;
+ contentType: string;
+ hash: string;
+ downloads: number;
+ enable: boolean;
+ description: string;
+ createTime: string;
+ createUser: string;
+ updateTime: string;
+}
+
+// 响应式数据
+const loading = ref(false);
+const uploading = ref(false);
+const dialogVisible = ref(false);
+const formType = ref<'add' | 'edit'>('add');
+const formRef = ref<FormInstance | null>(null);
+const uploadRef = ref();
+const total = ref(0);
+const tableData = ref<Attachment[]>([]);
+const selectedFile = ref<File | null>(null);
+
+// 分页相关
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+ category: '',
+ dateRange: null as [string, string] | null,
+});
+
+// 附件表单
+const form = reactive<Partial<Attachment>>({
+ fileName: '',
+ displayName: '',
+ category: '',
+ enable: true,
+ description: '',
+});
+
+// 表单验证规则
+const formRules = reactive<FormRules>({
+ fileName: [
+ { required: true, message: '请输入文件名', trigger: 'blur' }
+ ],
+});
+
+// 格式化文件大小
+const formatFileSize = (bytes: number) => {
+ if (bytes === 0) return '0 B';
+ const k = 1024;
+ const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
+};
+
+// 加载数据
+const loadData = async () => {
+ loading.value = true;
+ try {
+ interface QueryParams {
+ q?: string;
+ category?: string;
+ pageSize: number;
+ pageIndex: number;
+ startTime?: string;
+ endTime?: string;
+ }
+
+ const params: QueryParams = {
+ q: searchForm.q,
+ category: searchForm.category,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value,
+ };
+
+ // 处理日期范围
+ if (searchForm.dateRange) {
+ params.startTime = searchForm.dateRange[0];
+ params.endTime = searchForm.dateRange[1];
+ }
+
+ const response = await request.get('/Cube/Attachment', { params });
+ const { list, total: totalCount } = processListResponse<Attachment>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ tableData.value = [];
+ total.value = 0;
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ searchForm.category = '';
+ searchForm.dateRange = null;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 页码变更处理
+const handleCurrentChange = (page: number) => {
+ currentPage.value = page;
+ loadData();
+};
+
+// 每页显示条数变更处理
+const handleSizeChange = (size: number) => {
+ pageSize.value = size;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 文件选择变化
+const handleFileChange: UploadProps['onChange'] = (uploadFile: UploadFile) => {
+ selectedFile.value = uploadFile.raw || null;
+ if (selectedFile.value) {
+ form.fileName = selectedFile.value.name;
+ form.displayName = selectedFile.value.name;
+ }
+};
+
+// 上传前检查
+const beforeUpload = (file: File) => {
+ const isLt100M = file.size / 1024 / 1024 < 100;
+ if (!isLt100M) {
+ ElMessage.error('上传文件大小不能超过 100MB!');
+ }
+ return isLt100M;
+};
+
+// 新增
+const handleAdd = () => {
+ formType.value = 'add';
+ resetForm();
+ dialogVisible.value = true;
+};
+
+// 编辑
+const handleEdit = (row: Attachment) => {
+ formType.value = 'edit';
+ Object.assign(form, row);
+ dialogVisible.value = true;
+};
+
+// 删除
+const handleDelete = (row: Attachment) => {
+ ElMessageBox.confirm(
+ `确定要删除附件"${row.displayName || row.fileName}"吗?`,
+ '确认删除',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ ).then(async () => {
+ try {
+ await request.delete(`/Cube/Attachment?id=${row.id}`);
+ ElMessage.success('删除成功');
+ loadData();
+ } catch (error) {
+ ElMessage.error('删除失败');
+ console.error('删除失败:', error);
+ }
+ });
+};
+
+// 重置表单
+const resetForm = () => {
+ Object.assign(form, {
+ id: undefined,
+ fileName: '',
+ displayName: '',
+ category: '',
+ enable: true,
+ description: '',
+ });
+ selectedFile.value = null;
+ uploadRef.value?.clearFiles();
+ formRef.value?.clearValidate();
+};
+
+// 提交表单
+const submitForm = () => {
+ if (!formRef.value) return;
+
+ formRef.value.validate(async (valid: boolean) => {
+ if (valid) {
+ try {
+ uploading.value = true;
+
+ if (formType.value === 'add') {
+ if (!selectedFile.value) {
+ ElMessage.error('请选择文件');
+ return;
+ }
+
+ const formData = new FormData();
+ formData.append('file', selectedFile.value);
+ Object.keys(form).forEach(key => {
+ const value = form[key as keyof typeof form];
+ if (value !== undefined) {
+ formData.append(key, String(value));
+ }
+ });
+
+ await request.post('/Cube/Attachment', formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ ElMessage.success('上传成功');
+ } else {
+ await request.put('/Cube/Attachment', form);
+ ElMessage.success('更新成功');
+ }
+
+ dialogVisible.value = false;
+ loadData();
+ } catch (error) {
+ ElMessage.error(`${formType.value === 'add' ? '上传' : '更新'}失败`);
+ console.error('操作失败:', error);
+ } finally {
+ uploading.value = false;
+ }
+ }
+ });
+};
+
+// 初始化
+onMounted(() => {
+ loadData();
+});
+</script>
+
+<style scoped>
+.attachment-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 16px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/cron-job/index.vue b/apps/cube-cube/src/pages/cube/cron-job/index.vue
new file mode 100644
index 0000000..b39bc61
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/cron-job/index.vue
@@ -0,0 +1,393 @@
+<template>
+ <div class="cron-job-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>定时任务</h3>
+ <el-button type="primary" @click="handleAdd">新增任务</el-button>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="任务名称">
+ <el-input v-model="searchForm.q" placeholder="请输入任务名称" clearable />
+ </el-form-item>
+ <el-form-item label="状态">
+ <el-select v-model="searchForm.enable" placeholder="请选择状态" clearable>
+ <el-option label="启用" :value="true" />
+ <el-option label="禁用" :value="false" />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ border
+ style="width: 100%"
+ v-loading="loading"
+ >
+ <el-table-column prop="id" label="编号" width="80" />
+ <el-table-column prop="name" label="名称" min-width="150" />
+ <el-table-column prop="displayName" label="显示名" min-width="150" />
+ <el-table-column prop="cron" label="Cron表达式" min-width="120" />
+ <el-table-column prop="server" label="服务器" width="120" />
+ <el-table-column prop="mode" label="模式" width="100" />
+ <el-table-column prop="enable" label="启用" width="80">
+ <template #default="scope">
+ <el-tag :type="scope.row.enable ? 'success' : 'danger'">
+ {{ scope.row.enable ? '是' : '否' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="times" label="执行次数" width="100" />
+ <el-table-column prop="nextTime" label="下次执行" min-width="150" />
+ <el-table-column prop="updateTime" label="更新时间" min-width="150" />
+ <el-table-column label="操作" width="200" fixed="right">
+ <template #default="scope">
+ <el-button type="success" size="small" @click="handleExecute(scope.row)">立即执行</el-button>
+ <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination
+ v-model:current-page="currentPage"
+ v-model:page-size="pageSize"
+ :total="total"
+ :page-sizes="[10, 20, 50, 100]"
+ layout="total, sizes, prev, pager, next, jumper"
+ @current-change="handleCurrentChange"
+ @size-change="handleSizeChange"
+ />
+ </div>
+ </el-card>
+
+ <!-- 任务表单对话框 -->
+ <el-dialog
+ v-model="dialogVisible"
+ :title="formType === 'add' ? '新增任务' : '编辑任务'"
+ width="600px"
+ >
+ <el-form ref="formRef" :model="form" :rules="formRules" label-width="100px">
+ <el-form-item label="任务名称" prop="name">
+ <el-input v-model="form.name" placeholder="请输入任务名称" />
+ </el-form-item>
+ <el-form-item label="显示名称" prop="displayName">
+ <el-input v-model="form.displayName" placeholder="请输入显示名称" />
+ </el-form-item>
+ <el-form-item label="Cron表达式" prop="cron">
+ <el-input v-model="form.cron" placeholder="例如: 0 0/5 * * * ?" />
+ <div class="form-tip">
+ 格式: 秒 分 时 日 月 周 年(可选)<br/>
+ 示例: 0 0/5 * * * ? (每5分钟执行一次)
+ </div>
+ </el-form-item>
+ <el-form-item label="服务器" prop="server">
+ <el-input v-model="form.server" placeholder="请输入服务器名称" />
+ </el-form-item>
+ <el-form-item label="模式" prop="mode">
+ <el-select v-model="form.mode" placeholder="请选择模式">
+ <el-option label="C#" value="C#" />
+ <el-option label="Url" value="Url" />
+ <el-option label="Sql" value="Sql" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="数据" prop="data">
+ <el-input
+ v-model="form.data"
+ type="textarea"
+ :rows="4"
+ placeholder="请输入执行数据(C#类名、URL地址或SQL语句)"
+ />
+ </el-form-item>
+ <el-form-item label="开始时间" prop="start">
+ <el-date-picker
+ v-model="form.start"
+ type="datetime"
+ placeholder="开始时间"
+ format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DDTHH:mm:ss"
+ />
+ </el-form-item>
+ <el-form-item label="结束时间" prop="end">
+ <el-date-picker
+ v-model="form.end"
+ type="datetime"
+ placeholder="结束时间"
+ format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DDTHH:mm:ss"
+ />
+ </el-form-item>
+ <el-form-item label="启用状态" prop="enable">
+ <el-switch v-model="form.enable" :active-value="true" :inactive-value="false" />
+ </el-form-item>
+ <el-form-item label="描述" prop="description">
+ <el-input v-model="form.description" type="textarea" placeholder="请输入描述" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="dialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitForm">确定</el-button>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import type { FormInstance, FormRules } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义任务类型接口
+interface CronJob {
+ id: number;
+ name: string;
+ displayName: string;
+ cron: string;
+ server: string;
+ mode: string;
+ data: string;
+ start: string;
+ end: string;
+ enable: boolean;
+ times: number;
+ maxTimes: number;
+ success: number;
+ error: number;
+ maxError: number;
+ lastTime: string;
+ nextTime: string;
+ description: string;
+ createTime: string;
+ updateTime: string;
+}
+
+// 响应式数据
+const loading = ref(false);
+const dialogVisible = ref(false);
+const formType = ref<'add' | 'edit'>('add');
+const formRef = ref<FormInstance | null>(null);
+const total = ref(0);
+const tableData = ref<CronJob[]>([]);
+
+// 分页变量
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+ enable: undefined as boolean | undefined,
+});
+
+// 任务表单
+const form = reactive<Partial<CronJob>>({
+ name: '',
+ displayName: '',
+ cron: '',
+ server: '',
+ mode: 'C#',
+ data: '',
+ start: '',
+ end: '',
+ enable: true,
+ description: '',
+});
+
+// 表单验证规则
+const formRules = reactive<FormRules>({
+ name: [
+ { required: true, message: '请输入任务名称', trigger: 'blur' }
+ ],
+ displayName: [
+ { required: true, message: '请输入显示名称', trigger: 'blur' }
+ ],
+ cron: [
+ { required: true, message: '请输入Cron表达式', trigger: 'blur' }
+ ],
+ mode: [
+ { required: true, message: '请选择模式', trigger: 'change' }
+ ],
+ data: [
+ { required: true, message: '请输入执行数据', trigger: 'blur' }
+ ]
+});
+
+// 加载数据
+const loadData = async () => {
+ loading.value = true;
+ try {
+ const params = {
+ ...searchForm,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value,
+ };
+
+ const response = await request.get('/Cube/CronJob', { params });
+ const { list, total: totalCount } = processListResponse<CronJob>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ searchForm.enable = undefined;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 分页处理
+const handleCurrentChange = () => {
+ loadData();
+};
+
+const handleSizeChange = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 立即执行
+const handleExecute = async (row: CronJob) => {
+ try {
+ await request.post(`/Cube/CronJob/ExecuteNow?id=${row.id}`);
+ ElMessage.success('任务已提交执行');
+ loadData();
+ } catch (error) {
+ ElMessage.error('执行失败');
+ console.error('执行失败:', error);
+ }
+};
+
+// 新增
+const handleAdd = () => {
+ formType.value = 'add';
+ resetForm();
+ dialogVisible.value = true;
+};
+
+// 编辑
+const handleEdit = (row: CronJob) => {
+ formType.value = 'edit';
+ Object.assign(form, row);
+ dialogVisible.value = true;
+};
+
+// 删除
+const handleDelete = (row: CronJob) => {
+ ElMessageBox.confirm(
+ `确定要删除任务"${row.displayName || row.name}"吗?`,
+ '确认删除',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ ).then(async () => {
+ try {
+ await request.delete(`/Cube/CronJob?id=${row.id}`);
+ ElMessage.success('删除成功');
+ loadData();
+ } catch (error) {
+ ElMessage.error('删除失败');
+ console.error('删除失败:', error);
+ }
+ });
+};
+
+// 重置表单
+const resetForm = () => {
+ Object.assign(form, {
+ id: undefined,
+ name: '',
+ displayName: '',
+ cron: '',
+ server: '',
+ mode: 'C#',
+ data: '',
+ start: '',
+ end: '',
+ enable: true,
+ description: '',
+ });
+ formRef.value?.clearValidate();
+};
+
+// 提交表单
+const submitForm = () => {
+ if (!formRef.value) return;
+
+ formRef.value.validate(async (valid: boolean) => {
+ if (valid) {
+ try {
+ if (formType.value === 'add') {
+ await request.post('/Cube/CronJob', form);
+ ElMessage.success('新增成功');
+ } else {
+ await request.put('/Cube/CronJob', form);
+ ElMessage.success('更新成功');
+ }
+ dialogVisible.value = false;
+ loadData();
+ } catch (error) {
+ ElMessage.error(`${formType.value === 'add' ? '新增' : '更新'}失败`);
+ console.error('操作失败:', error);
+ }
+ }
+ });
+};
+
+// 初始化
+onMounted(() => {
+ loadData();
+});
+</script>
+
+<style scoped>
+.cron-job-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 20px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+
+.form-tip {
+ font-size: 12px;
+ color: #909399;
+ margin-top: 4px;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/debug/index.vue b/apps/cube-cube/src/pages/cube/debug/index.vue
new file mode 100644
index 0000000..20a939c
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/debug/index.vue
@@ -0,0 +1,105 @@
+<template>
+ <div class="debug-page">
+ <h1>微应用调试页面</h1>
+
+ <el-card style="margin-bottom: 20px">
+ <template #header>
+ <h3>路由初始化状态</h3>
+ </template>
+ <p>路由初始化状态: {{ routesInitialized ? '已初始化' : '未初始化' }}</p>
+ <p>当前路径: {{ $route.path }}</p>
+ <p>当前路由名称: {{ $route.name }}</p>
+ </el-card>
+
+ <el-card style="margin-bottom: 20px">
+ <template #header>
+ <h3>已注册路由</h3>
+ </template>
+ <el-table :data="routesList" border style="width: 100%">
+ <el-table-column prop="path" label="路径" width="200" />
+ <el-table-column prop="name" label="名称" width="180" />
+ <el-table-column prop="component" label="组件" />
+ </el-table>
+ </el-card>
+
+ <el-card>
+ <template #header>
+ <h3>微应用配置</h3>
+ </template>
+ <el-table :data="microAppsList" border style="width: 100%">
+ <el-table-column prop="name" label="应用名称" width="150" />
+ <el-table-column prop="prefix" label="前缀" width="100" />
+ <el-table-column prop="status" label="状态" width="100" />
+ <el-table-column prop="routeCount" label="路由数量" width="100" />
+ </el-table>
+ </el-card>
+
+ <div style="margin-top: 20px">
+ <el-button @click="refreshStatus">刷新状态</el-button>
+ <el-button @click="testRoute">测试路由</el-button>
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import { useRouter } from 'vue-router';
+
+const router = useRouter();
+const routesInitialized = ref(false);
+const routesList = ref<Array<{path: string, name: string | symbol | undefined, component: string}>>([]);
+const microAppsList = ref<Array<{name: string, prefix?: string, status: string, routeCount: number}>>([]);
+
+// 获取路由状态
+const refreshStatus = () => {
+ try {
+ // 检查是否有isRoutesInitialized函数
+ const microAppRouter = (window as unknown as Record<string, unknown>).microAppRouter;
+ if (microAppRouter && typeof microAppRouter === 'object' && 'isRoutesInitialized' in microAppRouter) {
+ routesInitialized.value = (microAppRouter.isRoutesInitialized as () => boolean)();
+ }
+
+ // 获取所有路由
+ const routes = router.getRoutes();
+ routesList.value = routes.map(route => ({
+ path: route.path,
+ name: route.name,
+ component: route.component ? route.component.name || 'Component' : 'No component'
+ }));
+
+ // 查找Cube相关路由
+ const cubeRoutes = routes.filter(route => route.path.startsWith('/Cube'));
+ console.log('Cube相关路由:', cubeRoutes);
+
+ } catch (error) {
+ console.error('获取路由状态失败:', error);
+ }
+};
+
+// 测试路由导航
+const testRoute = () => {
+ router.push('/Cube/Test').catch(error => {
+ console.error('路由导航失败:', error);
+ });
+};
+
+onMounted(() => {
+ refreshStatus();
+
+ // 监听路由变化
+ router.afterEach(() => {
+ refreshStatus();
+ });
+});
+</script>
+
+<style scoped>
+.debug-page {
+ padding: 20px;
+}
+
+.debug-page h1 {
+ color: #409eff;
+ margin-bottom: 20px;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/order-manager/index.vue b/apps/cube-cube/src/pages/cube/order-manager/index.vue
new file mode 100644
index 0000000..9ddc9ac
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/order-manager/index.vue
@@ -0,0 +1,437 @@
+<template>
+ <div class="order-manager-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>订单管理</h3>
+ <div>
+ <el-button type="info" @click="handleGetInfo">查询订单信息</el-button>
+ <el-button type="primary" @click="handleAdd">新增订单</el-button>
+ </div>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="订单编号">
+ <el-input v-model="searchForm.q" placeholder="请输入订单编号" clearable />
+ </el-form-item>
+ <el-form-item label="状态">
+ <el-select v-model="searchForm.status" placeholder="请选择状态" clearable>
+ <el-option label="待处理" :value="0" />
+ <el-option label="处理中" :value="1" />
+ <el-option label="已完成" :value="2" />
+ <el-option label="已取消" :value="3" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="日期范围">
+ <el-date-picker
+ v-model="searchForm.dateRange"
+ type="datetimerange"
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DDTHH:mm:ss"
+ />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ style="width: 100%"
+ v-loading="loading"
+ >
+ <el-table-column prop="id" label="编号" width="80" />
+ <el-table-column prop="code" label="订单编号" min-width="150" />
+ <el-table-column prop="name" label="订单名称" min-width="150" />
+ <el-table-column prop="amount" label="金额" width="120">
+ <template #default="scope">
+ ¥{{ scope.row.amount?.toFixed(2) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="状态" width="100">
+ <template #default="scope">
+ <el-tag :type="getStatusType(scope.row.status)">
+ {{ getStatusText(scope.row.status) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="customerName" label="客户" width="120" />
+ <el-table-column prop="createTime" label="创建时间" min-width="150" />
+ <el-table-column prop="updateTime" label="更新时间" min-width="150" />
+ <el-table-column label="操作" width="160">
+ <template #default="scope">
+ <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination
+ v-model:current-page="currentPage"
+ v-model:page-size="pageSize"
+ :page-sizes="[10, 20, 50, 100]"
+ :total="total"
+ layout="total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
+ </div>
+ </el-card>
+
+ <!-- 订单表单对话框 -->
+ <el-dialog
+ v-model="dialogVisible"
+ :title="formType === 'add' ? '新增订单' : '编辑订单'"
+ width="600px"
+ >
+ <el-form ref="formRef" :model="form" :rules="formRules" label-width="100px">
+ <el-form-item label="订单编号" prop="code">
+ <el-input v-model="form.code" placeholder="请输入订单编号" />
+ </el-form-item>
+ <el-form-item label="订单名称" prop="name">
+ <el-input v-model="form.name" placeholder="请输入订单名称" />
+ </el-form-item>
+ <el-form-item label="金额" prop="amount">
+ <el-input-number v-model="form.amount" :min="0" :precision="2" placeholder="请输入金额" />
+ </el-form-item>
+ <el-form-item label="状态" prop="status">
+ <el-select v-model="form.status" placeholder="请选择状态">
+ <el-option label="待处理" :value="0" />
+ <el-option label="处理中" :value="1" />
+ <el-option label="已完成" :value="2" />
+ <el-option label="已取消" :value="3" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="客户姓名" prop="customerName">
+ <el-input v-model="form.customerName" placeholder="请输入客户姓名" />
+ </el-form-item>
+ <el-form-item label="客户电话" prop="customerPhone">
+ <el-input v-model="form.customerPhone" placeholder="请输入客户电话" />
+ </el-form-item>
+ <el-form-item label="客户地址" prop="customerAddress">
+ <el-input v-model="form.customerAddress" placeholder="请输入客户地址" />
+ </el-form-item>
+ <el-form-item label="备注" prop="remark">
+ <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="dialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitForm">确定</el-button>
+ </template>
+ </el-dialog>
+
+ <!-- 查询订单信息对话框 -->
+ <el-dialog
+ v-model="infoDialogVisible"
+ title="查询订单信息"
+ width="500px"
+ >
+ <el-form :model="infoForm" label-width="100px">
+ <el-form-item label="订单编号">
+ <el-input v-model="infoForm.codes" placeholder="请输入订单编号,多个用逗号分隔" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="infoDialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="queryOrderInfo">查询</el-button>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import type { FormInstance, FormRules } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义订单类型接口
+interface OrderManager {
+ id: number;
+ code: string;
+ name: string;
+ amount: number;
+ status: number;
+ customerName: string;
+ customerPhone: string;
+ customerAddress: string;
+ remark: string;
+ createTime: string;
+ updateTime: string;
+ createUser: string;
+ updateUser: string;
+}
+
+// 响应式数据
+const loading = ref(false);
+const dialogVisible = ref(false);
+const infoDialogVisible = ref(false);
+const formType = ref<'add' | 'edit'>('add');
+const formRef = ref<FormInstance | null>(null);
+const total = ref(0);
+const tableData = ref<OrderManager[]>([]);
+
+// 分页变量
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+ status: undefined as number | undefined,
+ dateRange: [] as [string, string] | [],
+});
+
+// 订单表单
+const form = reactive<Partial<OrderManager>>({
+ code: '',
+ name: '',
+ amount: 0,
+ status: 0,
+ customerName: '',
+ customerPhone: '',
+ customerAddress: '',
+ remark: '',
+});
+
+// 查询信息表单
+const infoForm = reactive({
+ codes: '',
+});
+
+// 表单验证规则
+const formRules = reactive<FormRules>({
+ code: [
+ { required: true, message: '请输入订单编号', trigger: 'blur' }
+ ],
+ name: [
+ { required: true, message: '请输入订单名称', trigger: 'blur' }
+ ],
+ amount: [
+ { required: true, message: '请输入金额', trigger: 'blur' }
+ ],
+ status: [
+ { required: true, message: '请选择状态', trigger: 'change' }
+ ]
+});
+
+// 获取状态类型
+const getStatusType = (status: number): 'success' | 'primary' | 'warning' | 'danger' | 'info' => {
+ const types: Record<number, 'success' | 'primary' | 'warning' | 'danger' | 'info'> = {
+ 0: 'warning',
+ 1: 'primary',
+ 2: 'success',
+ 3: 'danger'
+ };
+ return types[status] || 'info';
+};
+
+// 获取状态文本
+const getStatusText = (status: number) => {
+ const texts = ['待处理', '处理中', '已完成', '已取消'];
+ return texts[status] || '未知';
+};
+
+// 加载数据
+const loadData = async () => {
+ loading.value = true;
+ try {
+ interface QueryParams {
+ q?: string;
+ pageSize: number;
+ pageIndex: number;
+ startTime?: string;
+ endTime?: string;
+ }
+
+ const params: QueryParams = {
+ q: searchForm.q,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value,
+ };
+
+ // 处理日期范围
+ if (searchForm.dateRange && searchForm.dateRange.length === 2) {
+ params.startTime = searchForm.dateRange[0];
+ params.endTime = searchForm.dateRange[1];
+ }
+
+ const response = await request.get('/Cube/OrderManager', { params });
+ const { list, total: totalCount } = processListResponse<OrderManager>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ tableData.value = [];
+ total.value = 0;
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ searchForm.status = undefined;
+ searchForm.dateRange = [];
+ currentPage.value = 1;
+ loadData();
+};
+
+// 分页处理
+const handleCurrentChange = () => {
+ loadData();
+};
+
+const handleSizeChange = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 查询订单信息
+const handleGetInfo = () => {
+ infoForm.codes = '';
+ infoDialogVisible.value = true;
+};
+
+// 执行查询订单信息
+const queryOrderInfo = async () => {
+ if (!infoForm.codes.trim()) {
+ ElMessage.error('请输入订单编号');
+ return;
+ }
+
+ try {
+ const response = await request.get(`/Cube/OrderManager/GetInfo?codes=${infoForm.codes}`);
+ if (response && response.data) {
+ ElMessage.success('查询成功');
+ console.log('订单信息:', response.data);
+ // 这里可以显示查询结果
+ }
+ infoDialogVisible.value = false;
+ } catch (error) {
+ ElMessage.error('查询失败');
+ console.error('查询失败:', error);
+ }
+};
+
+// 新增
+const handleAdd = () => {
+ formType.value = 'add';
+ resetForm();
+ dialogVisible.value = true;
+};
+
+// 编辑
+// 编辑
+const handleEdit = (row: OrderManager) => {
+ formType.value = 'edit';
+ Object.assign(form, row);
+ dialogVisible.value = true;
+};
+
+// 删除
+const handleDelete = (row: OrderManager) => {
+ ElMessageBox.confirm(
+ `确定要删除订单"${row.code}"吗?`,
+ '确认删除',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ ).then(async () => {
+ try {
+ await request.delete(`/Cube/OrderManager?id=${row.id}`);
+ ElMessage.success('删除成功');
+ loadData();
+ } catch (error) {
+ ElMessage.error('删除失败');
+ console.error('删除失败:', error);
+ }
+ });
+};
+
+// 重置表单
+const resetForm = () => {
+ Object.assign(form, {
+ id: undefined,
+ code: '',
+ name: '',
+ amount: 0,
+ status: 0,
+ customerName: '',
+ customerPhone: '',
+ customerAddress: '',
+ remark: '',
+ });
+ formRef.value?.clearValidate();
+};
+
+// 提交表单
+const submitForm = () => {
+ if (!formRef.value) return;
+
+ formRef.value.validate(async (valid: boolean) => {
+ if (valid) {
+ try {
+ if (formType.value === 'add') {
+ await request.post('/Cube/OrderManager', form);
+ ElMessage.success('新增成功');
+ } else {
+ await request.put('/Cube/OrderManager', form);
+ ElMessage.success('更新成功');
+ }
+ dialogVisible.value = false;
+ loadData();
+ } catch (error) {
+ ElMessage.error(`${formType.value === 'add' ? '新增' : '更新'}失败`);
+ console.error('操作失败:', error);
+ }
+ }
+ });
+};
+
+// 初始化
+onMounted(() => {
+ loadData();
+});
+</script>
+
+<style scoped>
+.order-manager-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 20px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/principal-agent/index.vue b/apps/cube-cube/src/pages/cube/principal-agent/index.vue
new file mode 100644
index 0000000..a085898
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/principal-agent/index.vue
@@ -0,0 +1,348 @@
+<template>
+ <div class="principal-agent-container">
+ <el-card class="box-card">
+ <template #header>
+ <div class="card-header">
+ <h3>主体代理</h3>
+ <el-button type="primary" @click="handleAdd">新增代理</el-button>
+ </div>
+ </template>
+
+ <el-form :inline="true" :model="searchForm" class="search-form">
+ <el-form-item label="代理名称">
+ <el-input v-model="searchForm.q" placeholder="请输入代理名称" clearable />
+ </el-form-item>
+ <el-form-item label="状态">
+ <el-select v-model="searchForm.enable" placeholder="请选择状态" clearable>
+ <el-option label="启用" :value="true" />
+ <el-option label="禁用" :value="false" />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">查询</el-button>
+ <el-button @click="resetSearch">重置</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-table
+ :data="tableData"
+ style="width: 100%"
+ v-loading="loading"
+ >
+ <el-table-column prop="id" label="编号" width="80" />
+ <el-table-column prop="name" label="名称" min-width="150" />
+ <el-table-column prop="displayName" label="显示名" min-width="150" />
+ <el-table-column prop="type" label="类型" width="120" />
+ <el-table-column prop="category" label="分类" width="120" />
+ <el-table-column prop="enable" label="启用" width="80">
+ <template #default="scope">
+ <el-tag :type="scope.row.enable ? 'success' : 'danger'">
+ {{ scope.row.enable ? '是' : '否' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="createTime" label="创建时间" min-width="150" />
+ <el-table-column prop="updateTime" label="更新时间" min-width="150" />
+ <el-table-column label="操作" width="160">
+ <template #default="scope">
+ <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination">
+ <el-pagination
+ v-model:current-page="currentPage"
+ v-model:page-size="pageSize"
+ :page-sizes="[10, 20, 50, 100]"
+ :total="total"
+ layout="total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
+ </div>
+ </el-card>
+
+ <!-- 代理表单对话框 -->
+ <el-dialog
+ v-model="dialogVisible"
+ :title="formType === 'add' ? '新增代理' : '编辑代理'"
+ width="600px"
+ >
+ <el-form ref="formRef" :model="form" :rules="formRules" label-width="100px">
+ <el-form-item label="代理名称" prop="name">
+ <el-input v-model="form.name" placeholder="请输入代理名称" />
+ </el-form-item>
+ <el-form-item label="显示名称" prop="displayName">
+ <el-input v-model="form.displayName" placeholder="请输入显示名称" />
+ </el-form-item>
+ <el-form-item label="类型" prop="type">
+ <el-select v-model="form.type" placeholder="请选择类型">
+ <el-option label="个人" value="Personal" />
+ <el-option label="企业" value="Enterprise" />
+ <el-option label="机构" value="Organization" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="分类" prop="category">
+ <el-input v-model="form.category" placeholder="请输入分类" />
+ </el-form-item>
+ <el-form-item label="联系人" prop="contactPerson">
+ <el-input v-model="form.contactPerson" placeholder="请输入联系人" />
+ </el-form-item>
+ <el-form-item label="联系电话" prop="contactPhone">
+ <el-input v-model="form.contactPhone" placeholder="请输入联系电话" />
+ </el-form-item>
+ <el-form-item label="联系邮箱" prop="contactEmail">
+ <el-input v-model="form.contactEmail" placeholder="请输入联系邮箱" />
+ </el-form-item>
+ <el-form-item label="地址" prop="address">
+ <el-input v-model="form.address" placeholder="请输入地址" />
+ </el-form-item>
+ <el-form-item label="启用状态" prop="enable">
+ <el-switch v-model="form.enable" :active-value="true" :inactive-value="false" />
+ </el-form-item>
+ <el-form-item label="备注" prop="remark">
+ <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <el-button @click="dialogVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitForm">确定</el-button>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import type { FormInstance, FormRules } from 'element-plus';
+import { request } from '@core/utils/request';
+import { processListResponse } from '@core/utils/api-helpers';
+
+// 定义主体代理类型接口
+interface PrincipalAgent {
+ id: number;
+ name: string;
+ displayName: string;
+ type: string;
+ category: string;
+ contactPerson: string;
+ contactPhone: string;
+ contactEmail: string;
+ address: string;
+ enable: boolean;
+ remark: string;
+ createTime: string;
+ updateTime: string;
+ createUser: string;
+ updateUser: string;
+}
+
+// 响应式数据
+const loading = ref(false);
+const dialogVisible = ref(false);
+const formType = ref<'add' | 'edit'>('add');
+const formRef = ref<FormInstance | null>(null);
+const total = ref(0);
+const tableData = ref<PrincipalAgent[]>([]);
+
+// 分页变量
+const currentPage = ref(1);
+const pageSize = ref(10);
+
+// 搜索表单
+const searchForm = reactive({
+ q: '',
+ enable: undefined as boolean | undefined,
+});
+
+// 代理表单
+const form = reactive<Partial<PrincipalAgent>>({
+ name: '',
+ displayName: '',
+ type: '',
+ category: '',
+ contactPerson: '',
+ contactPhone: '',
+ contactEmail: '',
+ address: '',
+ enable: true,
+ remark: '',
+});
+
+// 表单验证规则
+const formRules = reactive<FormRules>({
+ name: [
+ { required: true, message: '请输入代理名称', trigger: 'blur' }
+ ],
+ displayName: [
+ { required: true, message: '请输入显示名称', trigger: 'blur' }
+ ],
+ type: [
+ { required: true, message: '请选择类型', trigger: 'change' }
+ ],
+ contactEmail: [
+ {
+ type: 'email',
+ message: '请输入正确的邮箱地址',
+ trigger: ['blur', 'change']
+ }
+ ]
+});
+
+// 加载数据
+const loadData = async () => {
+ loading.value = true;
+ try {
+ const params = {
+ ...searchForm,
+ pageSize: pageSize.value,
+ pageIndex: currentPage.value,
+ };
+
+ const response = await request.get('/Cube/PrincipalAgent', { params });
+ const { list, total: totalCount } = processListResponse<PrincipalAgent>(response);
+
+ tableData.value = list;
+ total.value = totalCount;
+ } catch (error) {
+ ElMessage.error('加载数据失败');
+ console.error('加载数据失败:', error);
+ tableData.value = [];
+ total.value = 0;
+ } finally {
+ loading.value = false;
+ }
+};
+
+// 搜索
+const handleSearch = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 重置搜索
+const resetSearch = () => {
+ searchForm.q = '';
+ searchForm.enable = undefined;
+ currentPage.value = 1;
+ loadData();
+};
+
+// 分页处理
+const handleCurrentChange = () => {
+ loadData();
+};
+
+const handleSizeChange = () => {
+ currentPage.value = 1;
+ loadData();
+};
+
+// 新增
+const handleAdd = () => {
+ formType.value = 'add';
+ resetForm();
+ dialogVisible.value = true;
+};
+
+// 编辑
+const handleEdit = (row: PrincipalAgent) => {
+ formType.value = 'edit';
+ Object.assign(form, row);
+ dialogVisible.value = true;
+};
+
+// 删除
+const handleDelete = (row: PrincipalAgent) => {
+ ElMessageBox.confirm(
+ `确定要删除代理"${row.displayName || row.name}"吗?`,
+ '确认删除',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ ).then(async () => {
+ try {
+ await request.delete(`/Cube/PrincipalAgent?id=${row.id}`);
+ ElMessage.success('删除成功');
+ loadData();
+ } catch (error) {
+ ElMessage.error('删除失败');
+ console.error('删除失败:', error);
+ }
+ });
+};
+
+// 重置表单
+const resetForm = () => {
+ Object.assign(form, {
+ id: undefined,
+ name: '',
+ displayName: '',
+ type: '',
+ category: '',
+ contactPerson: '',
+ contactPhone: '',
+ contactEmail: '',
+ address: '',
+ enable: true,
+ remark: '',
+ });
+ formRef.value?.clearValidate();
+};
+
+// 提交表单
+const submitForm = () => {
+ if (!formRef.value) return;
+
+ formRef.value.validate(async (valid: boolean) => {
+ if (valid) {
+ try {
+ if (formType.value === 'add') {
+ await request.post('/Cube/PrincipalAgent', form);
+ ElMessage.success('新增成功');
+ } else {
+ await request.put('/Cube/PrincipalAgent', form);
+ ElMessage.success('更新成功');
+ }
+ dialogVisible.value = false;
+ loadData();
+ } catch (error) {
+ ElMessage.error(`${formType.value === 'add' ? '新增' : '更新'}失败`);
+ console.error('操作失败:', error);
+ }
+ }
+ });
+};
+
+// 初始化
+onMounted(() => {
+ loadData();
+});
+</script>
+
+<style scoped>
+.principal-agent-container {
+ padding: 20px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.search-form {
+ margin-bottom: 20px;
+}
+
+.pagination {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
+</style>
diff --git a/apps/cube-cube/src/pages/cube/test/index.vue b/apps/cube-cube/src/pages/cube/test/index.vue
new file mode 100644
index 0000000..424d3ba
--- /dev/null
+++ b/apps/cube-cube/src/pages/cube/test/index.vue
@@ -0,0 +1,39 @@
+<template>
+ <div class="test-page">
+ <h1>Cube-Cube 测试页面</h1>
+ <p>如果你能看到这个页面,说明路由配置正确</p>
+ <p>当前路径: {{ $route.path }}</p>
+ <p>当前时间: {{ currentTime }}</p>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+
+const currentTime = ref(new Date().toLocaleString());
+
+onMounted(() => {
+ console.log('Cube-Cube 测试页面已挂载');
+ // 每秒更新时间
+ setInterval(() => {
+ currentTime.value = new Date().toLocaleString();
+ }, 1000);
+});
+</script>
+
+<style scoped>
+.test-page {
+ padding: 20px;
+ text-align: center;
+}
+
+.test-page h1 {
+ color: #409eff;
+ margin-bottom: 20px;
+}
+
+.test-page p {
+ margin: 10px 0;
+ font-size: 16px;
+}
+</style>
diff --git a/apps/cube-cube/src/routes/index.ts b/apps/cube-cube/src/routes/index.ts
new file mode 100644
index 0000000..29bf73a
--- /dev/null
+++ b/apps/cube-cube/src/routes/index.ts
@@ -0,0 +1,60 @@
+import { type RouteRecordRaw } from 'vue-router';
+
+const routes: RouteRecordRaw[] = [
+ // 应用管理
+ {
+ path: '/Cube/App',
+ name: 'cube-app',
+ component: () => import('../pages/cube/app/index.vue'),
+ },
+ // 应用日志
+ {
+ path: '/Cube/AppLog',
+ name: 'cube-app-log',
+ component: () => import('../pages/cube/app-log/index.vue'),
+ },
+ // 地区管理
+ {
+ path: '/Cube/Area',
+ name: 'cube-area',
+ component: () => import('../pages/cube/area/index.vue'),
+ },
+ // 附件管理
+ {
+ path: '/Cube/Attachment',
+ name: 'cube-attachment',
+ component: () => import('../pages/cube/attachment/index.vue'),
+ },
+ // 定时任务
+ {
+ path: '/Cube/CronJob',
+ name: 'cube-cron-job',
+ component: () => import('../pages/cube/cron-job/index.vue'),
+ },
+ // 订单管理
+ {
+ path: '/Cube/OrderManager',
+ name: 'cube-order-manager',
+ component: () => import('../pages/cube/order-manager/index.vue'),
+ },
+ // 主体代理
+ {
+ path: '/Cube/PrincipalAgent',
+ name: 'cube-principal-agent',
+ component: () => import('../pages/cube/principal-agent/index.vue'),
+ },
+ // 测试页面
+ {
+ path: '/Cube/Test',
+ name: 'cube-test',
+ component: () => import('../pages/cube/test/index.vue'),
+ },
+ // 调试页面
+ {
+ path: '/Cube/Debug',
+ name: 'cube-debug',
+ component: () => import('../pages/cube/debug/index.vue'),
+ },
+];
+
+export default routes;
diff --git a/apps/cube-cube/src/simple-test.ts b/apps/cube-cube/src/simple-test.ts
new file mode 100644
index 0000000..0be9f97
--- /dev/null
+++ b/apps/cube-cube/src/simple-test.ts
@@ -0,0 +1,12 @@
+// 简化版本的测试路由 - 用于调试
+export const routes = [
+ {
+ path: '/Cube/SimpleTest',
+ name: 'cube-simple-test',
+ component: () => Promise.resolve({
+ template: '<div style="padding: 20px;"><h1>简单测试页面</h1><p>如果看到这个页面,说明路由工作正常</p></div>'
+ }),
+ }
+];
+
+console.log('cube-cube 路由已导出:', routes);
diff --git a/apps/cube-cube/src/types/cube.ts b/apps/cube-cube/src/types/cube.ts
new file mode 100644
index 0000000..660a053
--- /dev/null
+++ b/apps/cube-cube/src/types/cube.ts
@@ -0,0 +1,166 @@
+// 魔方系统相关类型定义
+
+// 应用管理
+export interface App {
+ id: number;
+ name: string;
+ displayName: string;
+ category: string;
+ version: string;
+ fileName: string;
+ arguments: string;
+ workingDirectory: string;
+ userName: string;
+ autoStart: boolean;
+ enable: boolean;
+ description: string;
+ createTime: string;
+ updateTime: string;
+ createUser: string;
+ updateUser: string;
+}
+
+// 应用日志
+export interface AppLog {
+ id: number;
+ appId: number;
+ appName: string;
+ action: string;
+ success: boolean;
+ remark: string;
+ createTime: string;
+ createUser: string;
+ createIP: string;
+ updateTime: string;
+}
+
+// 地区管理
+export interface Area {
+ id: number;
+ name: string;
+ fullName: string;
+ code: string;
+ parentId: number;
+ level: number;
+ pinyin: string;
+ jianpin: string;
+ longitude: number;
+ latitude: number;
+ enable: boolean;
+ createTime: string;
+ updateTime: string;
+ children?: Area[];
+}
+
+// 附件管理
+export interface Attachment {
+ id: number;
+ fileName: string;
+ displayName: string;
+ category: string;
+ size: number;
+ contentType: string;
+ hash: string;
+ downloads: number;
+ enable: boolean;
+ description: string;
+ createTime: string;
+ createUser: string;
+ updateTime: string;
+ updateUser: string;
+}
+
+// 定时任务
+export interface CronJob {
+ id: number;
+ name: string;
+ displayName: string;
+ cron: string;
+ server: string;
+ mode: string;
+ data: string;
+ start: string;
+ end: string;
+ enable: boolean;
+ times: number;
+ maxTimes: number;
+ success: number;
+ error: number;
+ maxError: number;
+ lastTime: string;
+ nextTime: string;
+ description: string;
+ createTime: string;
+ updateTime: string;
+ createUser: string;
+ updateUser: string;
+}
+
+// 订单管理
+export interface OrderManager {
+ id: number;
+ code: string;
+ name: string;
+ amount: number;
+ status: number;
+ customerName: string;
+ customerPhone: string;
+ customerAddress: string;
+ remark: string;
+ createTime: string;
+ updateTime: string;
+ createUser: string;
+ updateUser: string;
+}
+
+// 主体代理
+export interface PrincipalAgent {
+ id: number;
+ name: string;
+ displayName: string;
+ type: string;
+ category: string;
+ contactPerson: string;
+ contactPhone: string;
+ contactEmail: string;
+ address: string;
+ enable: boolean;
+ remark: string;
+ createTime: string;
+ updateTime: string;
+ createUser: string;
+ updateUser: string;
+}
+
+// API响应类型
+export interface ApiResponse<T> {
+ code: number;
+ message: string;
+ data: T;
+ success: boolean;
+}
+
+// 列表响应类型
+export interface ApiListResponse<T> {
+ code: number;
+ message: string;
+ data: {
+ rows: T[];
+ total: number;
+ count: number;
+ list: T[];
+ };
+ success: boolean;
+}
+
+// 分页参数
+export interface PageParams {
+ page: number;
+ pageSize: number;
+ pageIndex: number;
+}
+
+// 搜索参数基类
+export interface BaseSearchParams extends PageParams {
+ q?: string;
+}
diff --git a/apps/cube-cube/test-routes.js b/apps/cube-cube/test-routes.js
new file mode 100644
index 0000000..f1399c1
--- /dev/null
+++ b/apps/cube-cube/test-routes.js
@@ -0,0 +1,15 @@
+// 测试文件 - 验证cube-cube模块是否正确导出路由
+import { routes } from '../src/main';
+
+console.log('Cube-cube routes:', routes);
+
+// 验证路由结构
+routes.forEach((route, index) => {
+ console.log(`Route ${index}:`, {
+ path: route.path,
+ name: route.name,
+ component: route.component ? 'Component loaded' : 'No component'
+ });
+});
+
+export default routes;
diff --git a/apps/cube-cube/vite.config.ts b/apps/cube-cube/vite.config.ts
new file mode 100644
index 0000000..2683b38
--- /dev/null
+++ b/apps/cube-cube/vite.config.ts
@@ -0,0 +1,30 @@
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+import { resolve } from 'path'
+
+export default defineConfig({
+ plugins: [vue()],
+ resolve: {
+ alias: {
+ '@': resolve(__dirname, 'src'),
+ '@core': resolve(__dirname, '../../core'),
+ },
+ },
+ build: {
+ lib: {
+ entry: resolve(__dirname, 'src/main.ts'),
+ name: 'CubeCube',
+ formats: ['es'],
+ },
+ rollupOptions: {
+ external: ['vue', 'vue-router', 'element-plus'],
+ output: {
+ globals: {
+ vue: 'Vue',
+ 'vue-router': 'VueRouter',
+ 'element-plus': 'ElementPlus',
+ },
+ },
+ },
+ },
+})
diff --git a/configs/microAppConfig.json b/configs/microAppConfig.json
index 4d1894e..44694b1 100644
--- a/configs/microAppConfig.json
+++ b/configs/microAppConfig.json
@@ -2,5 +2,9 @@
{
"name": "cube-admin",
"packageName": "/apps/cube-admin"
+ },
+ {
+ "name": "cube-cube",
+ "packageName": "/apps/cube-cube"
}
]
\ No newline at end of file
diff --git a/core/router/index.ts b/core/router/index.ts
index 6cf4244..44aaa14 100644
--- a/core/router/index.ts
+++ b/core/router/index.ts
@@ -20,6 +20,14 @@ initAppRoutes(router).catch(error => {
// 全局导航守卫
router.beforeEach(async (to, from, next) => {
+ // 为了调试,在全局对象上暴露状态检查函数
+ if (typeof window !== 'undefined') {
+ (window as unknown as Record<string, unknown>).microAppRouter = {
+ isRoutesInitialized,
+ router,
+ };
+ }
+
// 先检查URL中是否有token并处理
const hashToken = getUrlHashToken();