Procházet zdrojové kódy

😎1、升级依赖 2、更新前端接口请求文件 3、代码清理格式化

zuohuaijun před 1 rokem
rodič
revize
b3c1621b83

+ 2 - 2
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -17,7 +17,7 @@
     <PackageReference Include="AngleSharp" Version="1.1.2" />
     <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
     <PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
-    <PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.9" />
+    <PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.10" />
     <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.16" />
     <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.16" />
     <PackageReference Include="Furion.Pure" Version="4.9.5.16" />
@@ -39,7 +39,7 @@
     <PackageReference Include="SqlSugarCore" Version="5.1.4.169" />
     <PackageReference Include="SSH.NET" Version="2024.1.0" />
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.6" />
-    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1104" />
+    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1106" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
   </ItemGroup>

+ 69 - 69
Admin.NET/Admin.NET.Core/Entity/SysPrint.cs

@@ -1,75 +1,75 @@
-// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
-//
-// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
-//
-// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
-
-namespace Admin.NET.Core;
-
-/// <summary>
-/// 系统打印模板表
-/// </summary>
-[SugarTable(null, "系统打印模板表")]
-[SysTable]
-[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
-public partial class SysPrint : EntityTenant
-{
-    /// <summary>
-    /// 名称
-    /// </summary>
-    [SugarColumn(ColumnDescription = "名称", Length = 64)]
-    [Required, MaxLength(64)]
-    public virtual string Name { get; set; }
-
-    /// <summary>
-    /// 打印模板
-    /// </summary>
-    [SugarColumn(ColumnDescription = "打印模板", ColumnDataType = StaticConfig.CodeFirst_BigString)]
-    [Required]
-    public virtual string Template { get; set; }
-
-    /// <summary>
-    /// 打印类型
-    /// </summary>
-    [SugarColumn(ColumnDescription = "打印类型")]
-    [Required]
-    public virtual PrintTypeEnum? PrintType { get; set; }
-
-    /// <summary>
-    /// 客户端服务地址
-    /// </summary>
-    [SugarColumn(ColumnDescription = "客户端服务地址", Length = 128)]
-    [MaxLength(128)]
-    public virtual string? ClientServiceAddress { get; set; }
-
-    /// <summary>
-    /// 打印参数
-    /// </summary>
-    [SugarColumn(ColumnDescription = "打印参数", ColumnDataType = StaticConfig.CodeFirst_BigString)]
-    public virtual string? PrintParam { get; set; }
-
-    /// <summary>
-    /// 排序
-    /// </summary>
-    [SugarColumn(ColumnDescription = "排序")]
-    public int OrderNo { get; set; } = 100;
-
-    /// <summary>
-    /// 状态
-    /// </summary>
-    [SugarColumn(ColumnDescription = "状态")]
-    public StatusEnum Status { get; set; } = StatusEnum.Enable;
-
-    /// <summary>
-    /// 备注
-    /// </summary>
-    [SugarColumn(ColumnDescription = "备注", Length = 128)]
-    [MaxLength(128)]
+// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
+//
+// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
+//
+// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
+
+namespace Admin.NET.Core;
+
+/// <summary>
+/// 系统打印模板表
+/// </summary>
+[SugarTable(null, "系统打印模板表")]
+[SysTable]
+[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
+public partial class SysPrint : EntityTenant
+{
+    /// <summary>
+    /// 名称
+    /// </summary>
+    [SugarColumn(ColumnDescription = "名称", Length = 64)]
+    [Required, MaxLength(64)]
+    public virtual string Name { get; set; }
+
+    /// <summary>
+    /// 打印模板
+    /// </summary>
+    [SugarColumn(ColumnDescription = "打印模板", ColumnDataType = StaticConfig.CodeFirst_BigString)]
+    [Required]
+    public virtual string Template { get; set; }
+
+    /// <summary>
+    /// 打印类型
+    /// </summary>
+    [SugarColumn(ColumnDescription = "打印类型")]
+    [Required]
+    public virtual PrintTypeEnum? PrintType { get; set; }
+
+    /// <summary>
+    /// 客户端服务地址
+    /// </summary>
+    [SugarColumn(ColumnDescription = "客户端服务地址", Length = 128)]
+    [MaxLength(128)]
+    public virtual string? ClientServiceAddress { get; set; }
+
+    /// <summary>
+    /// 打印参数
+    /// </summary>
+    [SugarColumn(ColumnDescription = "打印参数", ColumnDataType = StaticConfig.CodeFirst_BigString)]
+    public virtual string? PrintParam { get; set; }
+
+    /// <summary>
+    /// 排序
+    /// </summary>
+    [SugarColumn(ColumnDescription = "排序")]
+    public int OrderNo { get; set; } = 100;
+
+    /// <summary>
+    /// 状态
+    /// </summary>
+    [SugarColumn(ColumnDescription = "状态")]
+    public StatusEnum Status { get; set; } = StatusEnum.Enable;
+
+    /// <summary>
+    /// 备注
+    /// </summary>
+    [SugarColumn(ColumnDescription = "备注", Length = 128)]
+    [MaxLength(128)]
     public string? Remark { get; set; }
 
     /// <summary>
     /// 打印预览测试数据
-    /// </summary>
+    /// </summary>
     [SugarColumn(ColumnDescription = "打印预览测试数据", ColumnDataType = StaticConfig.CodeFirst_BigString)]
-    public string ? PrintDataDemo { get; set; }
+    public string? PrintDataDemo { get; set; }
 }

+ 8 - 8
Web/package.json

@@ -2,7 +2,7 @@
 	"name": "admin.net",
 	"type": "module",
 	"version": "2.4.33",
-	"lastBuildTime": "2024.10.13",
+	"lastBuildTime": "2024.10.17",
 	"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
 	"author": "zuohuaijun",
 	"license": "MIT",
@@ -33,7 +33,7 @@
 		"echarts-gl": "^2.0.9",
 		"echarts-wordcloud": "^2.1.0",
 		"element-plus": "^2.8.5",
-		"ezuikit-js": "^8.0.12-alpha.3",
+		"ezuikit-js": "^8.0.12",
 		"js-cookie": "^3.0.5",
 		"js-table2excel": "^1.1.2",
 		"jsplumb": "^2.15.6",
@@ -74,22 +74,22 @@
 		"@types/node": "^20.16.10",
 		"@types/nprogress": "^0.2.3",
 		"@types/sortablejs": "^1.15.8",
-		"@typescript-eslint/eslint-plugin": "^8.8.1",
-		"@typescript-eslint/parser": "^8.8.1",
+		"@typescript-eslint/eslint-plugin": "^8.9.0",
+		"@typescript-eslint/parser": "^8.9.0",
 		"@vitejs/plugin-vue": "^5.1.4",
 		"@vitejs/plugin-vue-jsx": "^4.0.1",
 		"@vue/compiler-sfc": "^3.5.12",
-		"code-inspector-plugin": "^0.17.0",
+		"code-inspector-plugin": "^0.17.2",
 		"eslint": "^9.12.0",
 		"eslint-plugin-vue": "^9.29.0",
 		"globals": "^15.11.0",
 		"less": "^4.2.0",
 		"prettier": "^3.3.3",
 		"rollup-plugin-visualizer": "^5.12.0",
-		"sass": "^1.79.5",
-		"terser": "^5.34.1",
+		"sass": "^1.80.1",
+		"terser": "^5.36.0",
 		"typescript": "^5.6.3",
-		"vite": "^5.4.8",
+		"vite": "^5.4.9",
 		"vite-plugin-cdn-import": "^1.0.1",
 		"vite-plugin-compression2": "^1.3.0",
 		"vite-plugin-vue-setup-extend": "^0.4.0",

+ 76 - 0
Web/src/api-services/apis/sys-job-api.ts

@@ -19,6 +19,7 @@ import { Configuration } from '../configuration';
 import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
 import { AddJobDetailInput } from '../models';
 import { AddJobTriggerInput } from '../models';
+import { AdminResultListString } from '../models';
 import { AdminResultListSysJobCluster } from '../models';
 import { AdminResultListSysJobTrigger } from '../models';
 import { AdminResultSqlSugarPagedListJobDetailOutput } from '../models';
@@ -411,6 +412,49 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
                 options: localVarRequestOptions,
             };
         },
+        /**
+         * 
+         * @summary 获取作业组名称集合 ⏰
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        apiSysJobListJobGroupPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/api/sysJob/listJobGroup`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+            // http bearer authentication required
+            if (configuration && configuration.accessToken) {
+                const accessToken = typeof configuration.accessToken === 'function'
+                    ? await configuration.accessToken()
+                    : await configuration.accessToken;
+                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
+            }
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
         /**
          * 
          * @summary 获取作业分页列表 ⏰
@@ -1091,6 +1135,19 @@ export const SysJobApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
+        /**
+         * 
+         * @summary 获取作业组名称集合 ⏰
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysJobListJobGroupPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).apiSysJobListJobGroupPost(options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
         /**
          * 
          * @summary 获取作业分页列表 ⏰
@@ -1343,6 +1400,15 @@ export const SysJobApiFactory = function (configuration?: Configuration, basePat
         async apiSysJobJobTriggerListGet(jobId?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysJobTrigger>> {
             return SysJobApiFp(configuration).apiSysJobJobTriggerListGet(jobId, options).then((request) => request(axios, basePath));
         },
+        /**
+         * 
+         * @summary 获取作业组名称集合 ⏰
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysJobListJobGroupPost(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
+            return SysJobApiFp(configuration).apiSysJobListJobGroupPost(options).then((request) => request(axios, basePath));
+        },
         /**
          * 
          * @summary 获取作业分页列表 ⏰
@@ -1556,6 +1622,16 @@ export class SysJobApi extends BaseAPI {
     public async apiSysJobJobTriggerListGet(jobId?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysJobTrigger>> {
         return SysJobApiFp(this.configuration).apiSysJobJobTriggerListGet(jobId, options).then((request) => request(this.axios, this.basePath));
     }
+    /**
+     * 
+     * @summary 获取作业组名称集合 ⏰
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async apiSysJobListJobGroupPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
+        return SysJobApiFp(this.configuration).apiSysJobListJobGroupPost(options).then((request) => request(this.axios, this.basePath));
+    }
     /**
      * 
      * @summary 获取作业分页列表 ⏰

+ 30 - 30
Web/src/api-services/models/code-gen-input.ts

@@ -83,116 +83,116 @@ export interface CodeGenInput {
     descStr?: string | null;
 
     /**
-     * 作者姓
+     * 数据库表
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    authorName?: string | null;
+    tableName?: string | null;
 
     /**
-     * 类名
+     * 业务名(业务代码包名称)
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    className?: string | null;
+    busName?: string | null;
 
     /**
-     * 是否移除表前缀
+     * 命名空间
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    tablePrefix?: string | null;
+    nameSpace?: string | null;
 
     /**
-     * 库定位器
+     * 作者姓
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    configId?: string | null;
+    authorName?: string | null;
 
     /**
-     * 数据库名(保留字段)
+     * 生成方式
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    dbName?: string | null;
+    generateType?: string | null;
 
     /**
-     * 数据库类型
+     * 是否生成菜单
      *
-     * @type {string}
+     * @type {boolean}
      * @memberof CodeGenInput
      */
-    dbType?: string | null;
+    generateMenu?: boolean;
 
     /**
-     * 数据库链接
+     * 类名
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    connectionString?: string | null;
+    className?: string | null;
 
     /**
-     * 生成方式
+     * 是否移除表前缀
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    generateType?: string | null;
+    tablePrefix?: string | null;
 
     /**
-     * 数据库表
+     * 库定位器
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    tableName?: string | null;
+    configId?: string | null;
 
     /**
-     * 命名空间
+     * 数据库名(保留字段)
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    nameSpace?: string | null;
+    dbName?: string | null;
 
     /**
-     * 业务名(业务代码包名称)
+     * 数据库类型
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    busName?: string | null;
+    dbType?: string | null;
 
     /**
-     * 功能名(数据库表名称)
+     * 数据库链接
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    tableComment?: string | null;
+    connectionString?: string | null;
 
     /**
-     * 菜单应用分类(应用编码
+     * 功能名(数据库表名称
      *
      * @type {string}
      * @memberof CodeGenInput
      */
-    menuApplication?: string | null;
+    tableComment?: string | null;
 
     /**
-     * 是否生成菜单
+     * 菜单应用分类(应用编码)
      *
-     * @type {boolean}
+     * @type {string}
      * @memberof CodeGenInput
      */
-    generateMenu?: boolean;
+    menuApplication?: string | null;
 
     /**
      * 菜单父级

+ 8 - 0
Web/src/api-services/models/page-job-detail-input.ts

@@ -90,6 +90,14 @@ export interface PageJobDetailInput {
      */
     jobId?: string | null;
 
+    /**
+     * 组名称
+     *
+     * @type {string}
+     * @memberof PageJobDetailInput
+     */
+    groupName?: string | null;
+
     /**
      * 描述信息
      *

+ 6 - 6
Web/src/api-services/models/sys-region.ts

@@ -30,20 +30,20 @@ export interface SysRegion {
     id?: number;
 
     /**
-     * 父Id
+     * 名称
      *
-     * @type {number}
+     * @type {string}
      * @memberof SysRegion
      */
-    pid?: number;
+    name: string;
 
     /**
-     * 名称
+     * 父Id
      *
-     * @type {string}
+     * @type {number}
      * @memberof SysRegion
      */
-    name: string;
+    pid?: number;
 
     /**
      * 简称

+ 8 - 8
Web/src/api-services/models/sys-schedule.ts

@@ -93,6 +93,14 @@ export interface SysSchedule {
      */
     tenantId?: number | null;
 
+    /**
+     * 日程内容
+     *
+     * @type {string}
+     * @memberof SysSchedule
+     */
+    content: string;
+
     /**
      * 用户Id
      *
@@ -125,14 +133,6 @@ export interface SysSchedule {
      */
     endTime?: string | null;
 
-    /**
-     * 日程内容
-     *
-     * @type {string}
-     * @memberof SysSchedule
-     */
-    content: string;
-
     /**
      * @type {FinishStatusEnum}
      * @memberof SysSchedule

+ 1 - 1
Web/src/views/system/job/component/editJobTrigger.vue

@@ -293,4 +293,4 @@ defineExpose({ openDialog });
 		min-width: 300px;
 	}
 }
-</style>
+</style>

+ 2 - 2
Web/src/views/system/print/component/editPrint.vue

@@ -153,8 +153,8 @@ const templateCancel = () => {
 
 // 模板设置提交
 const templateSubmit = async () => {
-	let templateJson=hiprintDesignRef.value?.hiprintTemplate.getJson();
-	templateJson.panels[0].index=hiprintDesignRef.value?.mode;
+	let templateJson = hiprintDesignRef.value?.hiprintTemplate.getJson();
+	templateJson.panels[0].index = hiprintDesignRef.value?.mode;
 	state.ruleForm.template = JSON.stringify(templateJson);
 	const printDataDemo = hiprintDesignRef.value?.printDataDemo;
 	state.ruleForm.printDataDemo = printDataDemo;

+ 13 - 12
Web/src/views/system/print/component/hiprint/index.vue

@@ -92,7 +92,7 @@
 				</el-tab-pane>
 				<el-tab-pane label="测试数据">
 					<el-input v-model="printDataDemo" type="textarea" style="width: 100%" rows="30" placeholder="对整个文档的完整测试数据"></el-input>
-					<el-button @click="formatPrintDataDemo()" style="margin-top: 10px; width:100%" type="success">格式化字符串</el-button>
+					<el-button @click="formatPrintDataDemo()" style="margin-top: 10px; width: 100%" type="success">格式化字符串</el-button>
 				</el-tab-pane>
 			</el-tabs>
 		</el-col>
@@ -127,7 +127,7 @@ var props = defineProps({
 let hiprintTemplate = ref();
 let mode = ref(0); // 模板选择
 
-const printDataDemo = ref("");
+const printDataDemo = ref('');
 const preViewRef = ref();
 const state = reactive({
 	modeList: [] as any,
@@ -163,11 +163,11 @@ const state = reactive({
 			width: 250,
 			height: 175.6,
 		},
-		"4R": {
+		'4R': {
 			width: 152,
 			height: 102,
 		},
-		"6R": {
+		'6R': {
 			width: 203,
 			height: 152,
 		},
@@ -322,9 +322,10 @@ const otherPaper = () => {
 const preView = () => {
 	let { width } = state.curPaper;
 	let printData = null;
-	try {printData = JSON.parse(printDataDemo.value);}
-	catch(e){
-		console.log("出错:" + e)
+	try {
+		printData = JSON.parse(printDataDemo.value);
+	} catch (e) {
+		console.log('出错:' + e);
 	}
 	if (printData == null) {
 		printData = printDataDefault;
@@ -366,19 +367,19 @@ const initPaper = () => {
 };
 
 // 设置预览测试数据
-const setPrintDataDemo = (strData: string|null|undefined) => {
+const setPrintDataDemo = (strData: string | null | undefined) => {
 	printDataDemo.value = strData as string;
-}
+};
 
 // 格式化打印测试数据
 const formatPrintDataDemo = () => {
-	try{
+	try {
 		const obj = JSON.parse(printDataDemo.value);
 		printDataDemo.value = JSON.stringify(obj, null, 2);
 	} catch (e) {
-		ElMessageBox.alert("出错:" + e);
+		ElMessageBox.alert('出错:' + e);
 	}
-}
+};
 // 导出对象
 defineExpose({ hiprintTemplate, printDataDemo, setPrintDataDemo, initPaper, mode });
 </script>