diff --git a/package.json b/package.json index a30537fbd758f9127eee8235cc13b8c862b46bf9..b3743f0b96a93bef6155dbd4647eedd06d34111e 100755 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "particles.vue": "^2.42.2", "qs": "^6.11.2", "save": "^2.4.0", + "v-code-diff": "^1.13.1", "vue": "^2.7.16", "vue-codemirror": "^4.0.6", "vue-cropper": "^0.5.6", @@ -82,15 +83,14 @@ "vue-loader": "^17.4.0", "vue-router": "^3.5.4", "vuedraggable": "^2.23.2", - "vuex": "^3.0.1", - "xlsx": "^0.18.5" + "vuex": "^3.0.1" }, "devDependencies": { "@babel/core": "^7.24.5", "@babel/eslint-parser": "^7.12.16", "@babel/plugin-transform-runtime": "^7.24.3", "@babel/preset-env": "^7.24.5", - "@rsbuild/core": "^1.2.4", + "@rsbuild/core": "^1.4.6", "@rsbuild/plugin-less": "^1.1.0", "@rsbuild/plugin-vue2": "^1.0.2", "@vue/cli-plugin-babel": "~5.0.6", diff --git a/src/resources/api/cmdb/cientity/cientity.js b/src/resources/api/cmdb/cientity/cientity.js index 7c5789d3afcd4246610e1de8fdd9fd2149bd8723..c73a733f5a40f31d4d558a45e8f1dfd160b79a76 100644 --- a/src/resources/api/cmdb/cientity/cientity.js +++ b/src/resources/api/cmdb/cientity/cientity.js @@ -73,9 +73,11 @@ const cientity = { getCiEntityBaseInfoByIdList(idList) { return axios.post('/api/rest/cmdb/cientity/baseinfo/list', { idList: idList }); }, + /*已删除 getCiEntityByIdList(ciId, idList) { return axios.post('/api/rest/cmdb/cientity/list', { ciId: ciId, idList: idList }); }, + */ getCiEntityTopoData(params) { return axios.post('/api/rest/cmdb/topo/cientity', params); }, diff --git a/src/resources/assets/css/theme.less b/src/resources/assets/css/theme.less index 5b3fc45e98b037b0d949679020539dba0ddd20f9..a4f2decf7c690170454bd6e6574470347130e612 100644 --- a/src/resources/assets/css/theme.less +++ b/src/resources/assets/css/theme.less @@ -4119,6 +4119,71 @@ } } } + + // code-diff 对比样式 + .code-diff-view { + border: 1px solid var(--border-color, @border-color-base); + background-color: @op-color; + .file-header { + background-color: @background-color; + border-bottom: 1px solid var(--border-color, @border-color-base); + .file-info { + .info-left, + .info-right { + color: @text-color; + } + } + } + .file-diff-split { + .blob-code + .blob-num { + border-left: 1px solid var(--border-color, @border-color-base); + } + } + .diff-table { + .blob-num-deletion, + .blob-code-deletion { + background-color: #fdd; + } + .blob-code-deletion, + .blob-code-addition { + .hljs-regexp, + .hljs-attr, + .hljs-attribute, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-string, + .hljs-operator, + .hljs-variable, + .hljs-punctuation, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-id { + color: #212121 !important; // 新增删除高亮行保持黑色,确保字体可见 + } + } + .blob-code { + .blob-code-inner { + color: @text-color; + } + } + } + .hljs-regexp, + .hljs-attr, + .hljs-attribute, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-string, + .hljs-operator, + .hljs-variable, + .hljs-punctuation, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-id { + color: @text-color !important; + } + } } .theme-dark { diff --git a/src/resources/assets/js/util.js b/src/resources/assets/js/util.js index e81b3b329d5273bb5c643937a298cc0e8f1bf6f2..21b03e3f6f7cdc0e2584b5d5a33c8e3825f5e51b 100644 --- a/src/resources/assets/js/util.js +++ b/src/resources/assets/js/util.js @@ -1243,5 +1243,32 @@ const methods = { } return result; }, + isValidTimeString(timeStr) { //校验时间字符串 + if(!timeStr || typeof timeStr !== 'string') { + return false; + } + const parts = timeStr.split(':'); + if (parts.length === 2) { + const [h, m] = parts.map(Number); + return h >= 0 && h < 24 && m >= 0 && m < 60; + } else if (parts.length === 3) { + const [h, m, s] = parts.map(Number); + return h >= 0 && h < 24 && m >= 0 && m < 60 && s >= 0 && s; + } + return false; + }, + isValidDateTime(dateStr) { //校验日期时间字符串 + // 检查是否为Date对象实例 + if (dateStr instanceof Date) { + return !isNaN(dateStr.getTime()); + } + // 检查是否为可解析的日期字符串 + if (typeof dateStr === 'string') { + // 尝试解析为Date对象 + const date = new Date(dateStr); + return !isNaN(date.getTime()); + } + return false; + } }; export default methods; diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index aa34785c660052a328bab9cae9d57ee8f8515db6..4fa43bc3ff91681456a084895e5d029a6907f7c5 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -1078,5 +1078,6 @@ "autoexecparallel": "Concurrent settings", "paramkeyword": "Participate in search", "loglevel": "log level", - "bluegreen": "Blue green execution" + "bluegreen": "Blue green execution", + "mailserver": "mail serve" } \ No newline at end of file diff --git a/src/resources/assets/languages/page/zh.json b/src/resources/assets/languages/page/zh.json index 6a19d149c036c093d5083f92a5cf8b4a1a4ee5b2..7c447c9a2238bdff96d4b01e6de63146a04beed9 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -1080,5 +1080,6 @@ "autoexecparallel": "并发设置", "paramkeyword": "入参搜索", "loglevel": "日志级别", - "bluegreen": "蓝绿执行" + "bluegreen": "蓝绿执行", + "mailserver": "邮件服务" } \ No newline at end of file diff --git a/src/resources/assets/languages/router/en.json b/src/resources/assets/languages/router/en.json index 22778a4b8228a6d573ee6710c0f950453b350db5..9e4a22acb2030b9e13d5d0acbaae9afa18a54708 100644 --- a/src/resources/assets/languages/router/en.json +++ b/src/resources/assets/languages/router/en.json @@ -156,7 +156,7 @@ "tenantconfigmanage": "Configuration information management", "threaddump": "Thread snapshot", "sqldump": "SQL Monitoring", - "servermanage": "Server management", + "servermanage": "Server instance status", "databasefragment": "Database Fragmentation", "licensemanage": "Licenses", "batchoperation": "Batch Operation", @@ -164,7 +164,7 @@ "message": "Messages and Announcements", "integration": "Data and Integration", "notify": "Notification and Subscription", - "job": "Timed job", + "agent": "Agent & Runner", "others": "Basic Services", "healthcheck": "Health Check", "license": "License Management", @@ -309,4 +309,4 @@ "catalogdetail": "Catalog Detail", "diagramdetail": "Diagram Detail" } -} \ No newline at end of file +} diff --git a/src/resources/assets/languages/router/zh.json b/src/resources/assets/languages/router/zh.json index 0e70111e70dc26e17bacafb9fe3b6ceaab5ea4f3..c3b0f5a2b0a8a21c733465ea58a9e7eb25e95ccc 100644 --- a/src/resources/assets/languages/router/zh.json +++ b/src/resources/assets/languages/router/zh.json @@ -156,7 +156,7 @@ "tenantconfigmanage": "系统参数", "threaddump": "线程快照", "sqldump": "SQL监控", - "servermanage": "服务器管理", + "servermanage": "服务节点状态", "databasefragment": "数据库碎片整理", "licensemanage": "查看许可", "batchoperation": "批量操作", @@ -164,7 +164,7 @@ "message": "消息和公告", "integration": "数据和集成", "notify": "通知和订阅", - "job": "定时作业", + "agent": "代理和执行器", "others": "基础服务", "healthcheck": "健康检查", "license": "许可管理", @@ -309,4 +309,4 @@ "catalogdetail": "目录详情", "diagramdetail": "架构图详情" } -} \ No newline at end of file +} diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index 1f4d07ac5207ae2f2932f128f7101001c49ed735..6918715453f3c07448bdb3f60159c1ce8d1196a2 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -246,7 +246,8 @@ "pause": "stop it", "cientityisnotfound": "Configuration item does not exist", "testaccount": "test result", - "repeataccount": "The same protocol and username cannot bind multiple accounts with the same protocol and username to the same asset." + "repeataccount": "The same protocol and username cannot bind multiple accounts with the same protocol and username to the same asset.", + "datadetail": "Data Details" }, "process": { "workordercenter": "Work Center", @@ -2858,7 +2859,28 @@ "alert": "give an alarm", "isnormalattr": "As a regular attribute display", "closesuccess": "Close successfully", - "istop": "topped" + "istop": "topped", + "onlysearchparentalert": "Only search for parent alarms", + "searchallalert": "Search for all alarms", + "closeselectedalert": "Close selected alarms", + "openselectedalert": "Open the selected alarm", + "deletematchalert": "Delete matching alarm", + "allalert": "All Alarms", + "alerttopo": "Alarm topology", + "alertdetail": "Alarm details", + "applychildalert": "Simultaneously apply sub alarms", + "transferworker": "Transfer to the handler", + "transferteam": "Transfer to processing team", + "reportdata": "reported data", + "eventaudit": "Event record", + "alertnotexists": "Alarm does not exist or has been deleted", + "childalert": "Sub alarm", + "dealresult": "Processing results", + "createalert": "Create an alarm", + "defaultstatus": "Defaults on", + "joinalert": "Merge into alarms", + "uniquekey": "unique", + "alertsign": "Alarm features" }, "runnergroup": { "ruletips": "The request for login authentication needs to carry a header as a rule expression (note that the header parameter in the expression is all lowercase). If the value of the expression after execution is true, the executor group will take effect, and false and syntax exceptions will not take effect. For example: ${env}==\\ bit \\&&(${test}==\\ 1 \\ | | ${test2}==\\ aaa \\)" diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 7e901aa7d39119a7e4f8df7e761c831168510fb1..d04b9b894d02c2d0d9eb61b2060a5160539d0868 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -247,7 +247,8 @@ "pause": "停止", "cientityisnotfound": "配置项不存在", "testaccount": "测试结果", - "repeataccount": "协议相同且用户名相同,同一资产不可绑定多个协议相同且用户名相同的账号。" + "repeataccount": "协议相同且用户名相同,同一资产不可绑定多个协议相同且用户名相同的账号。", + "datadetail": "数据明细" }, "process": { "workordercenter": "工单中心", @@ -2858,6 +2859,27 @@ "alert": "告警", "isnormalattr": "作为普通属性展示", "closesuccess": "关闭成功", - "istop": "是否置顶" + "istop": "是否置顶", + "onlysearchparentalert": "只搜索父告警", + "searchallalert": "搜索所有告警", + "closeselectedalert": "关闭选中告警", + "openselectedalert": "打开选中告警", + "deletematchalert": "删除匹配告警", + "allalert": "所有告警", + "alerttopo": "告警拓扑", + "alertdetail": "告警详情", + "applychildalert": "同时应用子告警", + "transferworker": "转交处理人", + "transferteam": "转交处理组", + "reportdata": "上报数据", + "eventaudit": "事件记录", + "alertnotexists": "告警不存在或已被删除", + "childalert": "子告警", + "dealresult": "处理结果", + "createalert": "创建告警", + "defaultstatus": "默认状态", + "joinalert": "归并到告警", + "uniquekey": "唯一键", + "alertsign": "告警特征" } } \ No newline at end of file diff --git a/src/resources/mixins/formMixins.js b/src/resources/mixins/formMixins.js index c00deb1a0fcdcb01996b2315c82708af08e886e3..d4b039ce26fa9a754d7020c074887cd082262807 100644 --- a/src/resources/mixins/formMixins.js +++ b/src/resources/mixins/formMixins.js @@ -120,8 +120,8 @@ export default { if (Array.isArray(value)) { let valueList = []; value.forEach(v => { - if (v != false && !this.$utils.isEmpty(v)) { - if (this.isCustomValue && v[this.valueName]) { + if (!this.$utils.isEmpty(v)) { // 兼容为0的情况检验不通过的问题 + if (this.isCustomValue && !this.$utils.isEmpty(v[this.valueName])) { // 数组对象类型 valueList.push(v?.[this.valueName]); } else { diff --git a/src/resources/plugins/TsSheet/form-item.vue b/src/resources/plugins/TsSheet/form-item.vue index 57439642ff452751a2ae4fe492387954887eba8a..3ddef96fa837e0b216920ff5ae8f7a207b4301c3 100644 --- a/src/resources/plugins/TsSheet/form-item.vue +++ b/src/resources/plugins/TsSheet/form-item.vue @@ -2,7 +2,7 @@
-
+
@@ -50,7 +50,7 @@
{{ formItem.label }}