midway-fatcms 0.0.1-beta.29 → 0.0.1-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +14 -14
- package/.prettierrc.js +4 -4
- package/README.md +8 -8
- package/index.d.ts +10 -10
- package/package.json +76 -76
- package/tsconfig.json +32 -32
- package/dist/config/config.default.d.ts +0 -3
- package/dist/config/config.default.js +0 -189
- package/dist/config/seed/aeskey.txt +0 -1
- package/dist/config/utils.d.ts +0 -1
- package/dist/config/utils.js +0 -23
- package/dist/configuration.d.ts +0 -7
- package/dist/configuration.js +0 -113
- package/dist/controller/base/BaseApiController.d.ts +0 -37
- package/dist/controller/base/BaseApiController.js +0 -164
- package/dist/controller/gateway/AnyApiGatewayController.d.ts +0 -13
- package/dist/controller/gateway/AnyApiGatewayController.js +0 -55
- package/dist/controller/gateway/AsyncTaskController.d.ts +0 -20
- package/dist/controller/gateway/AsyncTaskController.js +0 -181
- package/dist/controller/gateway/CrudMtdGatewayController.d.ts +0 -21
- package/dist/controller/gateway/CrudMtdGatewayController.js +0 -119
- package/dist/controller/gateway/CrudStdGatewayController.d.ts +0 -38
- package/dist/controller/gateway/CrudStdGatewayController.js +0 -137
- package/dist/controller/gateway/DocGatewayController.d.ts +0 -27
- package/dist/controller/gateway/DocGatewayController.js +0 -179
- package/dist/controller/gateway/FileController.d.ts +0 -25
- package/dist/controller/gateway/FileController.js +0 -129
- package/dist/controller/gateway/ProxyApiGatewayController.d.ts +0 -18
- package/dist/controller/gateway/ProxyApiGatewayController.js +0 -78
- package/dist/controller/gateway/PublicApiController.d.ts +0 -27
- package/dist/controller/gateway/PublicApiController.js +0 -165
- package/dist/controller/gateway/StaticController.d.ts +0 -24
- package/dist/controller/gateway/StaticController.js +0 -288
- package/dist/controller/helpers.controller.d.ts +0 -39
- package/dist/controller/helpers.controller.js +0 -188
- package/dist/controller/home.controller.d.ts +0 -9
- package/dist/controller/home.controller.js +0 -72
- package/dist/controller/manage/AnyApiMangeApi.d.ts +0 -10
- package/dist/controller/manage/AnyApiMangeApi.js +0 -98
- package/dist/controller/manage/AppLogMangeApi.d.ts +0 -10
- package/dist/controller/manage/AppLogMangeApi.js +0 -88
- package/dist/controller/manage/AppMangeApi.d.ts +0 -10
- package/dist/controller/manage/AppMangeApi.js +0 -88
- package/dist/controller/manage/AppPageMangeApi.d.ts +0 -10
- package/dist/controller/manage/AppPageMangeApi.js +0 -87
- package/dist/controller/manage/AppSchemaHistoryApi.d.ts +0 -10
- package/dist/controller/manage/AppSchemaHistoryApi.js +0 -83
- package/dist/controller/manage/CrudMethodsMangeApi.d.ts +0 -10
- package/dist/controller/manage/CrudMethodsMangeApi.js +0 -84
- package/dist/controller/manage/CrudStandardDesignApi.d.ts +0 -38
- package/dist/controller/manage/CrudStandardDesignApi.js +0 -342
- package/dist/controller/manage/DataDictManageApi.d.ts +0 -15
- package/dist/controller/manage/DataDictManageApi.js +0 -133
- package/dist/controller/manage/DeployManageApi.d.ts +0 -19
- package/dist/controller/manage/DeployManageApi.js +0 -180
- package/dist/controller/manage/DocLibManageApi.d.ts +0 -10
- package/dist/controller/manage/DocLibManageApi.js +0 -104
- package/dist/controller/manage/DocManageApi.d.ts +0 -11
- package/dist/controller/manage/DocManageApi.js +0 -130
- package/dist/controller/manage/FileManageApi.d.ts +0 -13
- package/dist/controller/manage/FileManageApi.js +0 -77
- package/dist/controller/manage/LowCodeTplManageApi.d.ts +0 -13
- package/dist/controller/manage/LowCodeTplManageApi.js +0 -86
- package/dist/controller/manage/MenuManageApi.d.ts +0 -10
- package/dist/controller/manage/MenuManageApi.js +0 -93
- package/dist/controller/manage/ProxyApiMangeApi.d.ts +0 -10
- package/dist/controller/manage/ProxyApiMangeApi.js +0 -87
- package/dist/controller/manage/SuperAdminManageApi.d.ts +0 -24
- package/dist/controller/manage/SuperAdminManageApi.js +0 -153
- package/dist/controller/manage/SysConfigMangeApi.d.ts +0 -11
- package/dist/controller/manage/SysConfigMangeApi.js +0 -126
- package/dist/controller/manage/SystemInfoManageApi.d.ts +0 -12
- package/dist/controller/manage/SystemInfoManageApi.js +0 -72
- package/dist/controller/manage/UserAccountManageApi.d.ts +0 -14
- package/dist/controller/manage/UserAccountManageApi.js +0 -129
- package/dist/controller/manage/WorkbenchMangeApi.d.ts +0 -11
- package/dist/controller/manage/WorkbenchMangeApi.js +0 -103
- package/dist/controller/myinfo/AuthController.d.ts +0 -33
- package/dist/controller/myinfo/AuthController.js +0 -136
- package/dist/controller/myinfo/MyInfoController.d.ts +0 -13
- package/dist/controller/myinfo/MyInfoController.js +0 -51
- package/dist/controller/render/AppRenderController.d.ts +0 -11
- package/dist/controller/render/AppRenderController.js +0 -92
- package/dist/controller/test.controller.d.ts +0 -8
- package/dist/controller/test.controller.js +0 -51
- package/dist/filter/default.filter.d.ts +0 -7
- package/dist/filter/default.filter.js +0 -23
- package/dist/filter/notfound.filter.d.ts +0 -5
- package/dist/filter/notfound.filter.js +0 -20
- package/dist/index.d.ts +0 -102
- package/dist/index.js +0 -120
- package/dist/interface.d.ts +0 -27
- package/dist/interface.js +0 -3
- package/dist/libs/crud-pro/CrudPro.d.ts +0 -37
- package/dist/libs/crud-pro/CrudPro.js +0 -136
- package/dist/libs/crud-pro/defaultConfigs.d.ts +0 -4
- package/dist/libs/crud-pro/defaultConfigs.js +0 -15
- package/dist/libs/crud-pro/exceptions.d.ts +0 -104
- package/dist/libs/crud-pro/exceptions.js +0 -117
- package/dist/libs/crud-pro/interfaces.d.ts +0 -163
- package/dist/libs/crud-pro/interfaces.js +0 -12
- package/dist/libs/crud-pro/models/ExecuteContext.d.ts +0 -49
- package/dist/libs/crud-pro/models/ExecuteContext.js +0 -79
- package/dist/libs/crud-pro/models/ExecuteContextFunc.d.ts +0 -38
- package/dist/libs/crud-pro/models/ExecuteContextFunc.js +0 -72
- package/dist/libs/crud-pro/models/FuncContext.d.ts +0 -18
- package/dist/libs/crud-pro/models/FuncContext.js +0 -6
- package/dist/libs/crud-pro/models/RequestCfgModel.d.ts +0 -65
- package/dist/libs/crud-pro/models/RequestCfgModel.js +0 -81
- package/dist/libs/crud-pro/models/RequestModel.d.ts +0 -25
- package/dist/libs/crud-pro/models/RequestModel.js +0 -113
- package/dist/libs/crud-pro/models/ResModel.d.ts +0 -16
- package/dist/libs/crud-pro/models/ResModel.js +0 -2
- package/dist/libs/crud-pro/models/ServiceHub.d.ts +0 -20
- package/dist/libs/crud-pro/models/ServiceHub.js +0 -2
- package/dist/libs/crud-pro/models/SqlCfgModel.d.ts +0 -22
- package/dist/libs/crud-pro/models/SqlCfgModel.js +0 -40
- package/dist/libs/crud-pro/models/SqlSegArg.d.ts +0 -6
- package/dist/libs/crud-pro/models/SqlSegArg.js +0 -12
- package/dist/libs/crud-pro/models/Transaction.d.ts +0 -29
- package/dist/libs/crud-pro/models/Transaction.js +0 -67
- package/dist/libs/crud-pro/models/TransactionMySQL.d.ts +0 -28
- package/dist/libs/crud-pro/models/TransactionMySQL.js +0 -76
- package/dist/libs/crud-pro/models/TransactionPostgres.d.ts +0 -28
- package/dist/libs/crud-pro/models/TransactionPostgres.js +0 -85
- package/dist/libs/crud-pro/models/TransactionSqlServer.d.ts +0 -34
- package/dist/libs/crud-pro/models/TransactionSqlServer.js +0 -92
- package/dist/libs/crud-pro/models/keys.d.ts +0 -106
- package/dist/libs/crud-pro/models/keys.js +0 -149
- package/dist/libs/crud-pro/services/CrudProCachedCfgService.d.ts +0 -11
- package/dist/libs/crud-pro/services/CrudProCachedCfgService.js +0 -73
- package/dist/libs/crud-pro/services/CrudProExecuteFuncService.d.ts +0 -9
- package/dist/libs/crud-pro/services/CrudProExecuteFuncService.js +0 -112
- package/dist/libs/crud-pro/services/CrudProExecuteSqlService.d.ts +0 -17
- package/dist/libs/crud-pro/services/CrudProExecuteSqlService.js +0 -225
- package/dist/libs/crud-pro/services/CrudProFieldUpdateService.d.ts +0 -9
- package/dist/libs/crud-pro/services/CrudProFieldUpdateService.js +0 -51
- package/dist/libs/crud-pro/services/CrudProFieldValidateService.d.ts +0 -13
- package/dist/libs/crud-pro/services/CrudProFieldValidateService.js +0 -148
- package/dist/libs/crud-pro/services/CrudProGenSqlCondition.d.ts +0 -24
- package/dist/libs/crud-pro/services/CrudProGenSqlCondition.js +0 -340
- package/dist/libs/crud-pro/services/CrudProGenSqlService.d.ts +0 -25
- package/dist/libs/crud-pro/services/CrudProGenSqlService.js +0 -165
- package/dist/libs/crud-pro/services/CrudProOriginToExecuteSql.d.ts +0 -32
- package/dist/libs/crud-pro/services/CrudProOriginToExecuteSql.js +0 -334
- package/dist/libs/crud-pro/services/CrudProServiceBase.d.ts +0 -24
- package/dist/libs/crud-pro/services/CrudProServiceBase.js +0 -79
- package/dist/libs/crud-pro/services/CrudProTableMetaService.d.ts +0 -9
- package/dist/libs/crud-pro/services/CrudProTableMetaService.js +0 -78
- package/dist/libs/crud-pro/services/CurdProServiceHub.d.ts +0 -32
- package/dist/libs/crud-pro/services/CurdProServiceHub.js +0 -64
- package/dist/libs/crud-pro/sql.txt +0 -120
- package/dist/libs/crud-pro/utils/CompareUtils.d.ts +0 -9
- package/dist/libs/crud-pro/utils/CompareUtils.js +0 -25
- package/dist/libs/crud-pro/utils/DatabaseName.d.ts +0 -9
- package/dist/libs/crud-pro/utils/DatabaseName.js +0 -50
- package/dist/libs/crud-pro/utils/DateTimeUtils.d.ts +0 -7
- package/dist/libs/crud-pro/utils/DateTimeUtils.js +0 -21
- package/dist/libs/crud-pro/utils/MemoryRefreshCache.d.ts +0 -19
- package/dist/libs/crud-pro/utils/MemoryRefreshCache.js +0 -47
- package/dist/libs/crud-pro/utils/MessageParseUtils.d.ts +0 -5
- package/dist/libs/crud-pro/utils/MessageParseUtils.js +0 -33
- package/dist/libs/crud-pro/utils/MixinUtils.d.ts +0 -39
- package/dist/libs/crud-pro/utils/MixinUtils.js +0 -255
- package/dist/libs/crud-pro/utils/ModelUtils.d.ts +0 -11
- package/dist/libs/crud-pro/utils/ModelUtils.js +0 -49
- package/dist/libs/crud-pro/utils/MultiKeyMap.d.ts +0 -11
- package/dist/libs/crud-pro/utils/MultiKeyMap.js +0 -63
- package/dist/libs/crud-pro/utils/SqlFuncUtils.d.ts +0 -5
- package/dist/libs/crud-pro/utils/SqlFuncUtils.js +0 -29
- package/dist/libs/crud-pro/utils/TypeUtils.d.ts +0 -40
- package/dist/libs/crud-pro/utils/TypeUtils.js +0 -166
- package/dist/libs/crud-pro/utils/ValidateUtils.d.ts +0 -3
- package/dist/libs/crud-pro/utils/ValidateUtils.js +0 -165
- package/dist/libs/crud-pro/utils/pool/MySQLUtils.d.ts +0 -3
- package/dist/libs/crud-pro/utils/pool/MySQLUtils.js +0 -19
- package/dist/libs/crud-pro/utils/pool/PostgresUtils.d.ts +0 -3
- package/dist/libs/crud-pro/utils/pool/PostgresUtils.js +0 -20
- package/dist/libs/crud-pro/utils/pool/SqlServerUtils.d.ts +0 -3
- package/dist/libs/crud-pro/utils/pool/SqlServerUtils.js +0 -20
- package/dist/libs/crud-pro/utils/sqlConvert/convertColumnName.d.ts +0 -4
- package/dist/libs/crud-pro/utils/sqlConvert/convertColumnName.js +0 -21
- package/dist/libs/crud-pro/utils/sqlConvert/convertMix.d.ts +0 -3
- package/dist/libs/crud-pro/utils/sqlConvert/convertMix.js +0 -22
- package/dist/libs/crud-pro/utils/sqlConvert/convertMsSql.d.ts +0 -2
- package/dist/libs/crud-pro/utils/sqlConvert/convertMsSql.js +0 -11
- package/dist/libs/crud-pro/utils/sqlConvert/convertPgSql.d.ts +0 -2
- package/dist/libs/crud-pro/utils/sqlConvert/convertPgSql.js +0 -11
- package/dist/libs/crud-pro/utils/sqlConvert/convertPgType.d.ts +0 -2
- package/dist/libs/crud-pro/utils/sqlConvert/convertPgType.js +0 -128
- package/dist/libs/global-config/global-config.d.ts +0 -45
- package/dist/libs/global-config/global-config.js +0 -33
- package/dist/libs/utils/common-dto.d.ts +0 -18
- package/dist/libs/utils/common-dto.js +0 -40
- package/dist/libs/utils/crypto-utils.d.ts +0 -3
- package/dist/libs/utils/crypto-utils.js +0 -46
- package/dist/libs/utils/errorToString.d.ts +0 -2
- package/dist/libs/utils/errorToString.js +0 -57
- package/dist/libs/utils/fatcms-request.d.ts +0 -30
- package/dist/libs/utils/fatcms-request.js +0 -104
- package/dist/libs/utils/functions.d.ts +0 -5
- package/dist/libs/utils/functions.js +0 -68
- package/dist/libs/utils/ordernum-utils.d.ts +0 -2
- package/dist/libs/utils/ordernum-utils.js +0 -13
- package/dist/libs/utils/parseConfig.d.ts +0 -7
- package/dist/libs/utils/parseConfig.js +0 -44
- package/dist/libs/utils/parseCreateSql.d.ts +0 -5
- package/dist/libs/utils/parseCreateSql.js +0 -86
- package/dist/libs/utils/render-utils.d.ts +0 -28
- package/dist/libs/utils/render-utils.js +0 -135
- package/dist/middleware/forbidden.middleware.d.ts +0 -10
- package/dist/middleware/forbidden.middleware.js +0 -54
- package/dist/middleware/global.middleware.d.ts +0 -10
- package/dist/middleware/global.middleware.js +0 -266
- package/dist/middleware/permission.middleware.d.ts +0 -18
- package/dist/middleware/permission.middleware.js +0 -74
- package/dist/middleware/tx.middleware.d.ts +0 -9
- package/dist/middleware/tx.middleware.js +0 -40
- package/dist/models/AsyncTaskModel.d.ts +0 -74
- package/dist/models/AsyncTaskModel.js +0 -31
- package/dist/models/RedisKeys.d.ts +0 -14
- package/dist/models/RedisKeys.js +0 -17
- package/dist/models/SystemEntities.d.ts +0 -98
- package/dist/models/SystemEntities.js +0 -2
- package/dist/models/SystemPerm.d.ts +0 -95
- package/dist/models/SystemPerm.js +0 -100
- package/dist/models/SystemTables.d.ts +0 -25
- package/dist/models/SystemTables.js +0 -28
- package/dist/models/bizmodels.d.ts +0 -97
- package/dist/models/bizmodels.js +0 -39
- package/dist/models/contextLogger.d.ts +0 -25
- package/dist/models/contextLogger.js +0 -112
- package/dist/models/devops.d.ts +0 -12
- package/dist/models/devops.js +0 -19
- package/dist/models/userSession.d.ts +0 -61
- package/dist/models/userSession.js +0 -165
- package/dist/schedule/anonymousContext.d.ts +0 -14
- package/dist/schedule/anonymousContext.js +0 -59
- package/dist/schedule/index.d.ts +0 -4
- package/dist/schedule/index.js +0 -10
- package/dist/schedule/runSchedule.d.ts +0 -12
- package/dist/schedule/runSchedule.js +0 -68
- package/dist/schedule/scheduleNames.d.ts +0 -13
- package/dist/schedule/scheduleNames.js +0 -17
- package/dist/service/AuthService.d.ts +0 -70
- package/dist/service/AuthService.js +0 -251
- package/dist/service/EnumInfoService.d.ts +0 -30
- package/dist/service/EnumInfoService.js +0 -127
- package/dist/service/FileCenterService.d.ts +0 -43
- package/dist/service/FileCenterService.js +0 -351
- package/dist/service/SysConfigService.d.ts +0 -7
- package/dist/service/SysConfigService.js +0 -47
- package/dist/service/UserAccountService.d.ts +0 -23
- package/dist/service/UserAccountService.js +0 -107
- package/dist/service/UserSessionService.d.ts +0 -37
- package/dist/service/UserSessionService.js +0 -156
- package/dist/service/VisitStatService.d.ts +0 -14
- package/dist/service/VisitStatService.js +0 -158
- package/dist/service/WorkbenchService.d.ts +0 -52
- package/dist/service/WorkbenchService.js +0 -202
- package/dist/service/anyapi/AnyApiSandboxService.d.ts +0 -15
- package/dist/service/anyapi/AnyApiSandboxService.js +0 -122
- package/dist/service/anyapi/AnyApiService.d.ts +0 -27
- package/dist/service/anyapi/AnyApiService.js +0 -181
- package/dist/service/asyncTask/AsyncTaskRunnerService.d.ts +0 -50
- package/dist/service/asyncTask/AsyncTaskRunnerService.js +0 -287
- package/dist/service/asyncTask/AsyncTaskService.d.ts +0 -7
- package/dist/service/asyncTask/AsyncTaskService.js +0 -34
- package/dist/service/asyncTask/handler/ExcelInfoModel.d.ts +0 -10
- package/dist/service/asyncTask/handler/ExcelInfoModel.js +0 -2
- package/dist/service/asyncTask/handler/ExportExcelAsyncTaskHandler.d.ts +0 -7
- package/dist/service/asyncTask/handler/ExportExcelAsyncTaskHandler.js +0 -216
- package/dist/service/asyncTask/handler/ExportExcelByInnerHttpHandler.d.ts +0 -36
- package/dist/service/asyncTask/handler/ExportExcelByInnerHttpHandler.js +0 -139
- package/dist/service/asyncTask/handler/ExportExcelByStdCrudHandler.d.ts +0 -46
- package/dist/service/asyncTask/handler/ExportExcelByStdCrudHandler.js +0 -121
- package/dist/service/base/ApiBaseService.d.ts +0 -15
- package/dist/service/base/ApiBaseService.js +0 -50
- package/dist/service/base/ApiRateLimiter.d.ts +0 -10
- package/dist/service/base/ApiRateLimiter.js +0 -51
- package/dist/service/base/BaseService.d.ts +0 -41
- package/dist/service/base/BaseService.js +0 -101
- package/dist/service/base/RedisCacheService.d.ts +0 -20
- package/dist/service/base/RedisCacheService.js +0 -57
- package/dist/service/crudstd/CrudStdActionService.d.ts +0 -17
- package/dist/service/crudstd/CrudStdActionService.js +0 -32
- package/dist/service/crudstd/CrudStdConstant.d.ts +0 -58
- package/dist/service/crudstd/CrudStdConstant.js +0 -64
- package/dist/service/crudstd/CrudStdRelationService.d.ts +0 -10
- package/dist/service/crudstd/CrudStdRelationService.js +0 -85
- package/dist/service/crudstd/CrudStdService.d.ts +0 -57
- package/dist/service/crudstd/CrudStdService.js +0 -239
- package/dist/service/curd/CrudProQuick.d.ts +0 -24
- package/dist/service/curd/CrudProQuick.js +0 -109
- package/dist/service/curd/CurdMixByAccountService.d.ts +0 -9
- package/dist/service/curd/CurdMixByAccountService.js +0 -93
- package/dist/service/curd/CurdMixByDictService.d.ts +0 -13
- package/dist/service/curd/CurdMixByDictService.js +0 -114
- package/dist/service/curd/CurdMixByLinkToCustomService.d.ts +0 -31
- package/dist/service/curd/CurdMixByLinkToCustomService.js +0 -203
- package/dist/service/curd/CurdMixBySysConfigService.d.ts +0 -9
- package/dist/service/curd/CurdMixBySysConfigService.js +0 -80
- package/dist/service/curd/CurdMixByWorkbenchService.d.ts +0 -10
- package/dist/service/curd/CurdMixByWorkbenchService.js +0 -78
- package/dist/service/curd/CurdMixService.d.ts +0 -27
- package/dist/service/curd/CurdMixService.js +0 -100
- package/dist/service/curd/CurdMixUtils.d.ts +0 -51
- package/dist/service/curd/CurdMixUtils.js +0 -275
- package/dist/service/curd/CurdProService.d.ts +0 -32
- package/dist/service/curd/CurdProService.js +0 -210
- package/dist/service/curd/fixCfgModel.d.ts +0 -3
- package/dist/service/curd/fixCfgModel.js +0 -107
- package/dist/service/proxyapi/ProxyApiLoadService.d.ts +0 -21
- package/dist/service/proxyapi/ProxyApiLoadService.js +0 -167
- package/dist/service/proxyapi/ProxyApiService.d.ts +0 -60
- package/dist/service/proxyapi/ProxyApiService.js +0 -260
- package/dist/service/proxyapi/ProxyApiUtils.d.ts +0 -15
- package/dist/service/proxyapi/ProxyApiUtils.js +0 -34
- package/dist/service/proxyapi/RouteHandler.d.ts +0 -5
- package/dist/service/proxyapi/RouteHandler.js +0 -9
- package/dist/service/proxyapi/RouteTrie.d.ts +0 -12
- package/dist/service/proxyapi/RouteTrie.js +0 -63
- package/dist/service/proxyapi/WeightedRandom.d.ts +0 -9
- package/dist/service/proxyapi/WeightedRandom.js +0 -31
- package/dist/service/proxyapi/WeightedRoundRobin.d.ts +0 -8
- package/dist/service/proxyapi/WeightedRoundRobin.js +0 -32
- package/dist/views/404_app.html +0 -31
- package/dist/views/404_workbench.html +0 -34
- package/dist/views/static/favicon.ico +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Context } from '@midwayjs/koa';
|
|
2
|
-
import { BaseApiController } from '../base/BaseApiController';
|
|
3
|
-
export declare class DataDictManageApi extends BaseApiController {
|
|
4
|
-
protected ctx: Context;
|
|
5
|
-
getDataDictList(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
6
|
-
getDataDictOne(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
7
|
-
createDataDict(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
8
|
-
updateDataDict(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
9
|
-
deleteDataDict(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
10
|
-
getDataDictItemList(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
11
|
-
getDataDictItemOne(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
12
|
-
createDataDictItem(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
13
|
-
updateDataDictItem(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
14
|
-
deleteDataDictItem(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
15
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DataDictManageApi = void 0;
|
|
13
|
-
const core_1 = require("@midwayjs/core");
|
|
14
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
15
|
-
const BaseApiController_1 = require("../base/BaseApiController");
|
|
16
|
-
const permission_middleware_1 = require("../../middleware/permission.middleware");
|
|
17
|
-
const SystemPerm_1 = require("../../models/SystemPerm");
|
|
18
|
-
let DataDictManageApi = class DataDictManageApi extends BaseApiController_1.BaseApiController {
|
|
19
|
-
async getDataDictList() {
|
|
20
|
-
return this.executeSysSimpleSQL('sys_data_dict', keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_PAGE);
|
|
21
|
-
}
|
|
22
|
-
async getDataDictOne() {
|
|
23
|
-
return this.executeSysSimpleSQL('sys_data_dict', keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_ONE);
|
|
24
|
-
}
|
|
25
|
-
async createDataDict() {
|
|
26
|
-
return this.executeSysSimpleSQL('sys_data_dict', keys_1.KeysOfSimpleSQL.SIMPLE_INSERT, {
|
|
27
|
-
validateCfg: {
|
|
28
|
-
'data.dict_code': [keys_1.KeysOfValidators.REQUIRED],
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
async updateDataDict() {
|
|
33
|
-
return this.executeSysSimpleSQL('sys_data_dict', keys_1.KeysOfSimpleSQL.SIMPLE_UPDATE, {
|
|
34
|
-
validateCfg: {
|
|
35
|
-
'condition.id': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.NUMERIC],
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
async deleteDataDict() {
|
|
40
|
-
return this.executeSysSimpleSQL('sys_data_dict', keys_1.KeysOfSimpleSQL.SIMPLE_DELETE, {
|
|
41
|
-
validateCfg: {
|
|
42
|
-
'condition.dict_code': [keys_1.KeysOfValidators.REQUIRED],
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
async getDataDictItemList() {
|
|
47
|
-
return this.executeSysSimpleSQL('sys_data_dict_item', keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_PAGE);
|
|
48
|
-
}
|
|
49
|
-
async getDataDictItemOne() {
|
|
50
|
-
return this.executeSysSimpleSQL('sys_data_dict_item', keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_ONE);
|
|
51
|
-
}
|
|
52
|
-
async createDataDictItem() {
|
|
53
|
-
return this.executeSysSimpleSQL('sys_data_dict_item', keys_1.KeysOfSimpleSQL.SIMPLE_INSERT);
|
|
54
|
-
}
|
|
55
|
-
async updateDataDictItem() {
|
|
56
|
-
return this.executeSysSimpleSQL('sys_data_dict_item', keys_1.KeysOfSimpleSQL.SIMPLE_UPDATE);
|
|
57
|
-
}
|
|
58
|
-
async deleteDataDictItem() {
|
|
59
|
-
return this.executeSysSimpleSQL('sys_data_dict_item', keys_1.KeysOfSimpleSQL.SIMPLE_DELETE, {
|
|
60
|
-
validateCfg: {
|
|
61
|
-
'condition.dict_code': [keys_1.KeysOfValidators.REQUIRED],
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, core_1.Inject)(),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], DataDictManageApi.prototype, "ctx", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, core_1.Post)('/getDataDictList'),
|
|
72
|
-
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", []),
|
|
74
|
-
__metadata("design:returntype", Promise)
|
|
75
|
-
], DataDictManageApi.prototype, "getDataDictList", null);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, core_1.Post)('/getDataDictOne'),
|
|
78
|
-
__metadata("design:type", Function),
|
|
79
|
-
__metadata("design:paramtypes", []),
|
|
80
|
-
__metadata("design:returntype", Promise)
|
|
81
|
-
], DataDictManageApi.prototype, "getDataDictOne", null);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, core_1.Post)('/createDataDict', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeWrite)] }),
|
|
84
|
-
__metadata("design:type", Function),
|
|
85
|
-
__metadata("design:paramtypes", []),
|
|
86
|
-
__metadata("design:returntype", Promise)
|
|
87
|
-
], DataDictManageApi.prototype, "createDataDict", null);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, core_1.Post)('/updateDataDict', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeWrite)] }),
|
|
90
|
-
__metadata("design:type", Function),
|
|
91
|
-
__metadata("design:paramtypes", []),
|
|
92
|
-
__metadata("design:returntype", Promise)
|
|
93
|
-
], DataDictManageApi.prototype, "updateDataDict", null);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, core_1.Post)('/deleteDataDict', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeWrite)] }),
|
|
96
|
-
__metadata("design:type", Function),
|
|
97
|
-
__metadata("design:paramtypes", []),
|
|
98
|
-
__metadata("design:returntype", Promise)
|
|
99
|
-
], DataDictManageApi.prototype, "deleteDataDict", null);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, core_1.Post)('/getDataDictItemList'),
|
|
102
|
-
__metadata("design:type", Function),
|
|
103
|
-
__metadata("design:paramtypes", []),
|
|
104
|
-
__metadata("design:returntype", Promise)
|
|
105
|
-
], DataDictManageApi.prototype, "getDataDictItemList", null);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, core_1.Post)('/getDataDictItemOne'),
|
|
108
|
-
__metadata("design:type", Function),
|
|
109
|
-
__metadata("design:paramtypes", []),
|
|
110
|
-
__metadata("design:returntype", Promise)
|
|
111
|
-
], DataDictManageApi.prototype, "getDataDictItemOne", null);
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, core_1.Post)('/createDataDictItem', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeWrite)] }),
|
|
114
|
-
__metadata("design:type", Function),
|
|
115
|
-
__metadata("design:paramtypes", []),
|
|
116
|
-
__metadata("design:returntype", Promise)
|
|
117
|
-
], DataDictManageApi.prototype, "createDataDictItem", null);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, core_1.Post)('/updateDataDictItem', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeWrite)] }),
|
|
120
|
-
__metadata("design:type", Function),
|
|
121
|
-
__metadata("design:paramtypes", []),
|
|
122
|
-
__metadata("design:returntype", Promise)
|
|
123
|
-
], DataDictManageApi.prototype, "updateDataDictItem", null);
|
|
124
|
-
__decorate([
|
|
125
|
-
(0, core_1.Post)('/deleteDataDictItem', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeWrite)] }),
|
|
126
|
-
__metadata("design:type", Function),
|
|
127
|
-
__metadata("design:paramtypes", []),
|
|
128
|
-
__metadata("design:returntype", Promise)
|
|
129
|
-
], DataDictManageApi.prototype, "deleteDataDictItem", null);
|
|
130
|
-
DataDictManageApi = __decorate([
|
|
131
|
-
(0, core_1.Controller)('/ns/api/manage/dataDict', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DataDictMangeRead)] })
|
|
132
|
-
], DataDictManageApi);
|
|
133
|
-
exports.DataDictManageApi = DataDictManageApi;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Context } from '@midwayjs/koa';
|
|
2
|
-
import { BaseApiController } from '../base/BaseApiController';
|
|
3
|
-
import { CommonResult } from '../../libs/utils/common-dto';
|
|
4
|
-
export declare class DeployManageApi extends BaseApiController {
|
|
5
|
-
protected ctx: Context;
|
|
6
|
-
private fileCenterService;
|
|
7
|
-
private workbenchService;
|
|
8
|
-
/**
|
|
9
|
-
* 资源文件上传
|
|
10
|
-
* @param files
|
|
11
|
-
* @param fields
|
|
12
|
-
* @param queryData
|
|
13
|
-
*/
|
|
14
|
-
uploadAssets(files: any, fields: any, queryData: any): Promise<CommonResult>;
|
|
15
|
-
/**
|
|
16
|
-
* 资源文件让其生效
|
|
17
|
-
*/
|
|
18
|
-
releaseAssets(): Promise<CommonResult>;
|
|
19
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.DeployManageApi = void 0;
|
|
16
|
-
const core_1 = require("@midwayjs/core");
|
|
17
|
-
const BaseApiController_1 = require("../base/BaseApiController");
|
|
18
|
-
const permission_middleware_1 = require("../../middleware/permission.middleware");
|
|
19
|
-
const SystemPerm_1 = require("../../models/SystemPerm");
|
|
20
|
-
const common_dto_1 = require("../../libs/utils/common-dto");
|
|
21
|
-
const bizmodels_1 = require("../../models/bizmodels");
|
|
22
|
-
const devops_1 = require("../../models/devops");
|
|
23
|
-
const FileCenterService_1 = require("../../service/FileCenterService");
|
|
24
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
25
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
26
|
-
const WorkbenchService_1 = require("../../service/WorkbenchService");
|
|
27
|
-
const global_config_1 = require("../../libs/global-config/global-config");
|
|
28
|
-
function toAssetsSchema(fileList) {
|
|
29
|
-
for (let i = 0; i < fileList.length; i++) {
|
|
30
|
-
const fileListElement = fileList[i];
|
|
31
|
-
fileListElement.settingKey = 'assets' + i;
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
schema: [
|
|
35
|
-
{
|
|
36
|
-
title: '资源配置',
|
|
37
|
-
name: 'fileList',
|
|
38
|
-
type: 'array',
|
|
39
|
-
properties: {
|
|
40
|
-
fileUrl: { label: '文件URL', component: 'Input', xProps: { hasClear: true }, width: 500 },
|
|
41
|
-
fileType: {
|
|
42
|
-
label: '文件类型',
|
|
43
|
-
component: 'Select',
|
|
44
|
-
enums: [
|
|
45
|
-
{ label: 'js', value: 'js' },
|
|
46
|
-
{ label: 'css', value: 'css' },
|
|
47
|
-
],
|
|
48
|
-
xProps: {
|
|
49
|
-
hasClear: true,
|
|
50
|
-
},
|
|
51
|
-
width: 500,
|
|
52
|
-
},
|
|
53
|
-
isModule: {
|
|
54
|
-
label: 'isModule',
|
|
55
|
-
component: 'Select',
|
|
56
|
-
enums: [
|
|
57
|
-
{ label: 'true', value: true },
|
|
58
|
-
{ label: 'false', value: false },
|
|
59
|
-
],
|
|
60
|
-
xProps: {
|
|
61
|
-
hasClear: true,
|
|
62
|
-
},
|
|
63
|
-
width: 500,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
data: {
|
|
69
|
-
fileList: fileList,
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
let DeployManageApi = class DeployManageApi extends BaseApiController_1.BaseApiController {
|
|
74
|
-
/**
|
|
75
|
-
* 资源文件上传
|
|
76
|
-
* @param files
|
|
77
|
-
* @param fields
|
|
78
|
-
* @param queryData
|
|
79
|
-
*/
|
|
80
|
-
async uploadAssets(files, fields, queryData) {
|
|
81
|
-
const accessType = bizmodels_1.AccessType.open;
|
|
82
|
-
const referer = this.ctx.req.headers.referer;
|
|
83
|
-
if (!fields.uploadPath) {
|
|
84
|
-
throw new devops_1.BizException('uploadPath不能为空');
|
|
85
|
-
}
|
|
86
|
-
const { fileKey, filename, storageUrl } = await this.fileCenterService.uploadFileToOSS(files, accessType, referer, {
|
|
87
|
-
uploadCategoryType: bizmodels_1.UploadCategoryType.assets,
|
|
88
|
-
uploadPath: fields.uploadPath,
|
|
89
|
-
});
|
|
90
|
-
const origin = this.ctx.request.origin;
|
|
91
|
-
const downloadUrls = (0, FileCenterService_1.toDownloadPaths)(origin, fileKey);
|
|
92
|
-
const data = {
|
|
93
|
-
fileKey,
|
|
94
|
-
filename,
|
|
95
|
-
storageUrl,
|
|
96
|
-
...downloadUrls,
|
|
97
|
-
};
|
|
98
|
-
return common_dto_1.CommonResult.successRes(data);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* 资源文件让其生效
|
|
102
|
-
*/
|
|
103
|
-
async releaseAssets() {
|
|
104
|
-
const params = this.ctx.request.body;
|
|
105
|
-
if (!params.packageName) {
|
|
106
|
-
throw new devops_1.BizException('packageName参数不存在');
|
|
107
|
-
}
|
|
108
|
-
if (params.packageName.length < 5) {
|
|
109
|
-
throw new devops_1.BizException('packageName参数小于5');
|
|
110
|
-
}
|
|
111
|
-
const cdnResources = params.cdnResources;
|
|
112
|
-
if (!Array.isArray(cdnResources) || cdnResources.length === 0) {
|
|
113
|
-
throw new devops_1.BizException('cdnResources参数不存在');
|
|
114
|
-
}
|
|
115
|
-
const { SystemDbName, SystemDbType } = global_config_1.GLOBAL_STATIC_CONFIG.getConfig();
|
|
116
|
-
const workbench = await this.curdMixService.executeCrudByCfg({
|
|
117
|
-
data: {
|
|
118
|
-
package_assets: JSON.stringify(toAssetsSchema(cdnResources)),
|
|
119
|
-
},
|
|
120
|
-
condition: {
|
|
121
|
-
package_name: params.packageName,
|
|
122
|
-
},
|
|
123
|
-
}, {
|
|
124
|
-
sqlTable: SystemTables_1.SystemTables.sys_workbench,
|
|
125
|
-
sqlDatabase: SystemDbName,
|
|
126
|
-
sqlDbType: SystemDbType,
|
|
127
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_UPDATE,
|
|
128
|
-
});
|
|
129
|
-
const app = await this.curdMixService.executeCrudByCfg({
|
|
130
|
-
data: {
|
|
131
|
-
package_assets: JSON.stringify(toAssetsSchema(cdnResources)),
|
|
132
|
-
},
|
|
133
|
-
condition: {
|
|
134
|
-
package_name: params.packageName,
|
|
135
|
-
},
|
|
136
|
-
}, {
|
|
137
|
-
sqlTable: SystemTables_1.SystemTables.sys_app,
|
|
138
|
-
sqlDatabase: SystemDbName,
|
|
139
|
-
sqlDbType: SystemDbType,
|
|
140
|
-
sqlSimpleName: keys_1.KeysOfSimpleSQL.SIMPLE_UPDATE,
|
|
141
|
-
});
|
|
142
|
-
this.workbenchService.clearCache();
|
|
143
|
-
const workbenchAffected = workbench.getResModelItem('affected') || {};
|
|
144
|
-
const appAffected = app.getResModelItem('affected') || {};
|
|
145
|
-
const result = common_dto_1.CommonResult.successRes({ workbenchAffected, appAffected });
|
|
146
|
-
result.message = `${cdnResources.length}个文件,更新到${workbenchAffected.affectedRows}个站点模版;更新到${appAffected.affectedRows}个应用模版,`;
|
|
147
|
-
return result;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
__decorate([
|
|
151
|
-
(0, core_1.Inject)(),
|
|
152
|
-
__metadata("design:type", Object)
|
|
153
|
-
], DeployManageApi.prototype, "ctx", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
(0, core_1.Inject)(),
|
|
156
|
-
__metadata("design:type", FileCenterService_1.FileCenterService)
|
|
157
|
-
], DeployManageApi.prototype, "fileCenterService", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, core_1.Inject)(),
|
|
160
|
-
__metadata("design:type", WorkbenchService_1.WorkbenchService)
|
|
161
|
-
], DeployManageApi.prototype, "workbenchService", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, core_1.Post)('/uploadAssets', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.AppMangeWrite)] }),
|
|
164
|
-
__param(0, (0, core_1.Files)()),
|
|
165
|
-
__param(1, (0, core_1.Fields)()),
|
|
166
|
-
__param(2, (0, core_1.Query)()),
|
|
167
|
-
__metadata("design:type", Function),
|
|
168
|
-
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
169
|
-
__metadata("design:returntype", Promise)
|
|
170
|
-
], DeployManageApi.prototype, "uploadAssets", null);
|
|
171
|
-
__decorate([
|
|
172
|
-
(0, core_1.Post)('/releaseAssets', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.AppMangeWrite)] }),
|
|
173
|
-
__metadata("design:type", Function),
|
|
174
|
-
__metadata("design:paramtypes", []),
|
|
175
|
-
__metadata("design:returntype", Promise)
|
|
176
|
-
], DeployManageApi.prototype, "releaseAssets", null);
|
|
177
|
-
DeployManageApi = __decorate([
|
|
178
|
-
(0, core_1.Controller)('/ns/api/manage/deploy', { middleware: [(0, permission_middleware_1.checkPermission)([SystemPerm_1.SystemFuncCode.AppMangeRead, SystemPerm_1.SystemFuncCode.WorkbenchMangeRead])] })
|
|
179
|
-
], DeployManageApi);
|
|
180
|
-
exports.DeployManageApi = DeployManageApi;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Context } from '@midwayjs/koa';
|
|
2
|
-
import { BaseApiController } from '../base/BaseApiController';
|
|
3
|
-
export declare class DocLibManageApi extends BaseApiController {
|
|
4
|
-
ctx: Context;
|
|
5
|
-
getDocLibList(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
6
|
-
getDocLibOne(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
7
|
-
createDocLib(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
8
|
-
updateDocLib(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
9
|
-
deleteDocLib(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
10
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DocLibManageApi = void 0;
|
|
13
|
-
const core_1 = require("@midwayjs/core");
|
|
14
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
15
|
-
const BaseApiController_1 = require("../base/BaseApiController");
|
|
16
|
-
const permission_middleware_1 = require("../../middleware/permission.middleware");
|
|
17
|
-
const SystemPerm_1 = require("../../models/SystemPerm");
|
|
18
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
19
|
-
const bizmodels_1 = require("../../models/bizmodels");
|
|
20
|
-
let DocLibManageApi = class DocLibManageApi extends BaseApiController_1.BaseApiController {
|
|
21
|
-
async getDocLibList() {
|
|
22
|
-
return this.executeSysSimpleSQL(SystemTables_1.SystemTables.sys_doc_lib, keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_PAGE, {
|
|
23
|
-
updateCfg: {
|
|
24
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
async getDocLibOne() {
|
|
29
|
-
return this.executeSysSimpleSQL(SystemTables_1.SystemTables.sys_doc_lib, keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_ONE, {
|
|
30
|
-
updateCfg: {
|
|
31
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
async createDocLib() {
|
|
36
|
-
return this.executeSysSimpleSQL(SystemTables_1.SystemTables.sys_doc_lib, keys_1.KeysOfSimpleSQL.SIMPLE_INSERT, {
|
|
37
|
-
validateCfg: {
|
|
38
|
-
'data.title': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.STRING],
|
|
39
|
-
},
|
|
40
|
-
updateCfg: {
|
|
41
|
-
'data.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
async updateDocLib() {
|
|
46
|
-
return this.executeSysSimpleSQL(SystemTables_1.SystemTables.sys_doc_lib, keys_1.KeysOfSimpleSQL.SIMPLE_UPDATE, {
|
|
47
|
-
validateCfg: {
|
|
48
|
-
'condition.id': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.NUMERIC],
|
|
49
|
-
'data.title': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.STRING],
|
|
50
|
-
},
|
|
51
|
-
updateCfg: {
|
|
52
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
async deleteDocLib() {
|
|
57
|
-
return this.executeSysSimpleSQL(SystemTables_1.SystemTables.sys_doc_lib, keys_1.KeysOfSimpleSQL.SIMPLE_DELETE, {
|
|
58
|
-
validateCfg: {
|
|
59
|
-
'condition.id': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.NUMERIC],
|
|
60
|
-
},
|
|
61
|
-
updateCfg: {
|
|
62
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, core_1.Inject)(),
|
|
69
|
-
__metadata("design:type", Object)
|
|
70
|
-
], DocLibManageApi.prototype, "ctx", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, core_1.Post)('/getDocLibList'),
|
|
73
|
-
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", []),
|
|
75
|
-
__metadata("design:returntype", Promise)
|
|
76
|
-
], DocLibManageApi.prototype, "getDocLibList", null);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, core_1.Post)('/getDocLibOne'),
|
|
79
|
-
__metadata("design:type", Function),
|
|
80
|
-
__metadata("design:paramtypes", []),
|
|
81
|
-
__metadata("design:returntype", Promise)
|
|
82
|
-
], DocLibManageApi.prototype, "getDocLibOne", null);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, core_1.Post)('/createDocLib', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeWrite)] }),
|
|
85
|
-
__metadata("design:type", Function),
|
|
86
|
-
__metadata("design:paramtypes", []),
|
|
87
|
-
__metadata("design:returntype", Promise)
|
|
88
|
-
], DocLibManageApi.prototype, "createDocLib", null);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, core_1.Post)('/updateDocLib', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeWrite)] }),
|
|
91
|
-
__metadata("design:type", Function),
|
|
92
|
-
__metadata("design:paramtypes", []),
|
|
93
|
-
__metadata("design:returntype", Promise)
|
|
94
|
-
], DocLibManageApi.prototype, "updateDocLib", null);
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, core_1.Post)('/deleteDocLib', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeWrite)] }),
|
|
97
|
-
__metadata("design:type", Function),
|
|
98
|
-
__metadata("design:paramtypes", []),
|
|
99
|
-
__metadata("design:returntype", Promise)
|
|
100
|
-
], DocLibManageApi.prototype, "deleteDocLib", null);
|
|
101
|
-
DocLibManageApi = __decorate([
|
|
102
|
-
(0, core_1.Controller)('/ns/api/manage/docLib', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeRead)] })
|
|
103
|
-
], DocLibManageApi);
|
|
104
|
-
exports.DocLibManageApi = DocLibManageApi;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Context } from '@midwayjs/koa';
|
|
2
|
-
import { BaseApiController } from '../base/BaseApiController';
|
|
3
|
-
export declare class DocManageApi extends BaseApiController {
|
|
4
|
-
ctx: Context;
|
|
5
|
-
getDocList(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
6
|
-
getDocOne(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
7
|
-
setReleaseData(): boolean;
|
|
8
|
-
createDoc(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
9
|
-
updateDoc(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
10
|
-
deleteDoc(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
11
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DocManageApi = void 0;
|
|
13
|
-
const core_1 = require("@midwayjs/core");
|
|
14
|
-
const keys_1 = require("../../libs/crud-pro/models/keys");
|
|
15
|
-
const BaseApiController_1 = require("../base/BaseApiController");
|
|
16
|
-
const permission_middleware_1 = require("../../middleware/permission.middleware");
|
|
17
|
-
const SystemPerm_1 = require("../../models/SystemPerm");
|
|
18
|
-
const SystemTables_1 = require("../../models/SystemTables");
|
|
19
|
-
const bizmodels_1 = require("../../models/bizmodels");
|
|
20
|
-
const publishUpdateCfg = {
|
|
21
|
-
'data.last_publish_by': { contextAsString: bizmodels_1.CTX_VISITOR_ID },
|
|
22
|
-
'data.last_publish_at': { const: { $sqlFunc: 'NOW' } },
|
|
23
|
-
};
|
|
24
|
-
let DocManageApi = class DocManageApi extends BaseApiController_1.BaseApiController {
|
|
25
|
-
async getDocList() {
|
|
26
|
-
return this.executeSysSimpleSQL(SystemTables_1.SystemTables.sys_doc, keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_PAGE, {
|
|
27
|
-
validateCfg: {
|
|
28
|
-
// 'condition.doc_lib_id': [KeysOfValidators.REQUIRED, KeysOfValidators.INTEGER],
|
|
29
|
-
},
|
|
30
|
-
updateCfg: {
|
|
31
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
async getDocOne() {
|
|
36
|
-
return this.executeSysSimpleSQL('sys_doc', keys_1.KeysOfSimpleSQL.SIMPLE_QUERY_ONE, {
|
|
37
|
-
updateCfg: {
|
|
38
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
setReleaseData() {
|
|
43
|
-
const body = this.ctx.request.body;
|
|
44
|
-
const dataObj = body.data || {};
|
|
45
|
-
dataObj.workbench_code = this.ctx.workbenchInfo.workbench_code;
|
|
46
|
-
// 发布动作,需要前端给一个 is_publish_action 这个字段
|
|
47
|
-
if (dataObj.is_publish_action === true) {
|
|
48
|
-
dataObj.title_release = dataObj.title;
|
|
49
|
-
dataObj.content_release = dataObj.content;
|
|
50
|
-
dataObj.content_release_lake = dataObj.content_lake;
|
|
51
|
-
dataObj.is_publish = 'Y';
|
|
52
|
-
delete dataObj.is_publish_action;
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
delete dataObj.is_publish_action;
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
async createDoc() {
|
|
59
|
-
const isPublish = this.setReleaseData();
|
|
60
|
-
return this.executeSysSimpleSQL('sys_doc', keys_1.KeysOfSimpleSQL.SIMPLE_INSERT, {
|
|
61
|
-
validateCfg: {
|
|
62
|
-
'data.doc_lib_id': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.INTEGER],
|
|
63
|
-
'data.title': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.STRING],
|
|
64
|
-
'data.content': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.STRING],
|
|
65
|
-
},
|
|
66
|
-
updateCfg: isPublish ? publishUpdateCfg : {},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
async updateDoc() {
|
|
70
|
-
const isPublish = this.setReleaseData();
|
|
71
|
-
const updateCfg = isPublish ? publishUpdateCfg : {};
|
|
72
|
-
return this.executeSysSimpleSQL('sys_doc', keys_1.KeysOfSimpleSQL.SIMPLE_UPDATE, {
|
|
73
|
-
validateCfg: {
|
|
74
|
-
'condition.id': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.NUMERIC],
|
|
75
|
-
},
|
|
76
|
-
updateCfg: {
|
|
77
|
-
...updateCfg,
|
|
78
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
async deleteDoc() {
|
|
83
|
-
return this.executeSysSimpleSQL('sys_doc', keys_1.KeysOfSimpleSQL.SIMPLE_DELETE, {
|
|
84
|
-
validateCfg: {
|
|
85
|
-
'condition.id': [keys_1.KeysOfValidators.REQUIRED, keys_1.KeysOfValidators.NUMERIC],
|
|
86
|
-
},
|
|
87
|
-
updateCfg: {
|
|
88
|
-
'condition.workbench_code': { contextAsString: bizmodels_1.CTX_WORKBENCH_CODE },
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, core_1.Inject)(),
|
|
95
|
-
__metadata("design:type", Object)
|
|
96
|
-
], DocManageApi.prototype, "ctx", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
(0, core_1.Post)('/getDocList'),
|
|
99
|
-
__metadata("design:type", Function),
|
|
100
|
-
__metadata("design:paramtypes", []),
|
|
101
|
-
__metadata("design:returntype", Promise)
|
|
102
|
-
], DocManageApi.prototype, "getDocList", null);
|
|
103
|
-
__decorate([
|
|
104
|
-
(0, core_1.Post)('/getDocOne'),
|
|
105
|
-
__metadata("design:type", Function),
|
|
106
|
-
__metadata("design:paramtypes", []),
|
|
107
|
-
__metadata("design:returntype", Promise)
|
|
108
|
-
], DocManageApi.prototype, "getDocOne", null);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, core_1.Post)('/createDoc', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeWrite)] }),
|
|
111
|
-
__metadata("design:type", Function),
|
|
112
|
-
__metadata("design:paramtypes", []),
|
|
113
|
-
__metadata("design:returntype", Promise)
|
|
114
|
-
], DocManageApi.prototype, "createDoc", null);
|
|
115
|
-
__decorate([
|
|
116
|
-
(0, core_1.Post)('/updateDoc', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeWrite)] }),
|
|
117
|
-
__metadata("design:type", Function),
|
|
118
|
-
__metadata("design:paramtypes", []),
|
|
119
|
-
__metadata("design:returntype", Promise)
|
|
120
|
-
], DocManageApi.prototype, "updateDoc", null);
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, core_1.Post)('/deleteDoc', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeWrite)] }),
|
|
123
|
-
__metadata("design:type", Function),
|
|
124
|
-
__metadata("design:paramtypes", []),
|
|
125
|
-
__metadata("design:returntype", Promise)
|
|
126
|
-
], DocManageApi.prototype, "deleteDoc", null);
|
|
127
|
-
DocManageApi = __decorate([
|
|
128
|
-
(0, core_1.Controller)('/ns/api/manage/doc', { middleware: [(0, permission_middleware_1.checkPermission)(SystemPerm_1.SystemFuncCode.DocMangeRead)] })
|
|
129
|
-
], DocManageApi);
|
|
130
|
-
exports.DocManageApi = DocManageApi;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Context } from '@midwayjs/koa';
|
|
2
|
-
import { BaseApiController } from '../base/BaseApiController';
|
|
3
|
-
export declare class FileMangeApi extends BaseApiController {
|
|
4
|
-
ctx: Context;
|
|
5
|
-
private fileCenterService;
|
|
6
|
-
getFileList(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
7
|
-
getFileOne(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
8
|
-
/**
|
|
9
|
-
* 更新文件属性
|
|
10
|
-
*/
|
|
11
|
-
updateFile(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
12
|
-
deleteFile(): Promise<import("../../libs/crud-pro/models/ExecuteContext").ExecuteContext>;
|
|
13
|
-
}
|