From 96932a76a0e793b16d4ef41217c11285e1964d37 Mon Sep 17 00:00:00 2001 From: dengbf Date: Fri, 4 Jul 2025 11:53:06 +0800 Subject: [PATCH 1/5] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BD=9C=E4=B8=9A=E6=9D=83=E9=99=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/deploy/job/add-batch-job-dialog.vue | 41 +++++++++++++++---- src/views/pages/deploy/job/job-manage.vue | 2 +- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/views/pages/deploy/job/add-batch-job-dialog.vue b/src/views/pages/deploy/job/add-batch-job-dialog.vue index ede76ae3..ddc13c28 100644 --- a/src/views/pages/deploy/job/add-batch-job-dialog.vue +++ b/src/views/pages/deploy/job/add-batch-job-dialog.vue @@ -64,13 +64,10 @@ export default { { value: 'custom', text: this.$t('term.deploy.directcreation') }, { value: 'pipeline', text: this.$t('term.deploy.superpipeline') } ], - value: 'custom', + value: 'pipeline', validateList: ['required'], onChange: val => { - this.createMethod = val; - this.$set(this.formConfig.name, 'isHidden', !(val === 'custom')); - this.$set(this.formConfig.pipelineId, 'isHidden', val === 'custom'); - this.handlePipelineId('appsystem'); + this.changeCreateMethod(val); } }, name: { @@ -135,7 +132,9 @@ export default { created() { }, beforeMount() {}, - mounted() {}, + mounted() { + this.init(); + }, beforeUpdate() {}, updated() {}, activated() {}, @@ -143,6 +142,24 @@ export default { beforeDestroy() {}, destroyed() {}, methods: { + init() { + this.formConfig.createMethod.dataList.forEach(item => { + if (item.value === 'custom') { + if (this.$AuthUtils.hasRole(['BATCHDEPLOY_MODIFY'])) { + this.$set(item, 'disabled', false); + } else { + this.$set(item, 'disabled', true); + } + } + }); + this.changeCreateMethod('pipeline'); + }, + changeCreateMethod(val) { + this.createMethod = val; + this.$set(this.formConfig.name, 'isHidden', !(val === 'custom')); + this.$set(this.formConfig.pipelineId, 'isHidden', val === 'custom'); + this.handlePipelineId('appsystem'); + }, nextStep() { const dialogForm = this.$refs['dialogForm']; if ((dialogForm && !dialogForm.valid())) { @@ -159,7 +176,17 @@ export default { const dialogForm = this.$refs['dialogForm']; const pipelineForm = this.$refs['pipelineForm']; const pipelineFormConfig = this.$refs['pipelineFormConfig']; - if ((dialogForm && !dialogForm.valid()) || (pipelineForm && !pipelineForm.validateForm() && (pipelineFormConfig && !pipelineFormConfig.valid()))) { + let isValid = true; + if (dialogForm && !dialogForm.valid()) { + isValid = false; + } + if (pipelineForm && !pipelineForm.validateForm()) { + isValid = false; + } + if (pipelineFormConfig && !pipelineFormConfig.valid()) { + isValid = false; + } + if (!isValid) { return false; } let data = { diff --git a/src/views/pages/deploy/job/job-manage.vue b/src/views/pages/deploy/job/job-manage.vue index 0a54f526..fcf76a36 100644 --- a/src/views/pages/deploy/job/job-manage.vue +++ b/src/views/pages/deploy/job/job-manage.vue @@ -63,7 +63,7 @@ - {{ $t('term.deploy.batchjob') }} + {{ $t('term.deploy.batchjob') }} {{ $t('term.autoexec.resourcelock') }} -- Gitee From bb5ddc727921329af2806b9072f04e98038ef8eb Mon Sep 17 00:00:00 2001 From: dengbf Date: Fri, 4 Jul 2025 12:01:17 +0800 Subject: [PATCH 2/5] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BD=9C=E4=B8=9A=E6=9D=83=E9=99=90=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/term/en.json | 3 ++- src/resources/assets/languages/term/zh.json | 3 ++- src/views/pages/deploy/job/add-batch-job-dialog.vue | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index 1f4d07ac..482d9922 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -2162,7 +2162,8 @@ "testrunnerdesc": "If not specified, actuators will be automatically assigned based on IP matching of actuator groups according to network segments", "jobcount": "Number of published assignments", "jobrecord": "Publish homework records", - "notapplyallexecuteauth": "You do not have the execution permission for the current application" + "notapplyallexecuteauth": "You do not have the execution permission for the current application", + "batchdeployauthtip": "The current user lacks the 'Batch Publishing Management Permission' permission. Please contact the administrator" }, "inspect": { "alarmprompt": "Alarm Prompt", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 7e901aa7..aef780e3 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -2159,7 +2159,8 @@ "testrunnerdesc": "如果不指定则会通过ip根据网段匹配执行器组自动分配执行器", "jobcount": "发布作业数", "jobrecord": "发布作业记录", - "notapplyallexecuteauth": "您没有当前应用的执行权限" + "notapplyallexecuteauth": "您没有当前应用的执行权限", + "batchdeployauthtip": "当前用户缺少“批量发布管理权限”权限,请联系管理员" }, "inspect": { "alarmprompt": "告警提示", diff --git a/src/views/pages/deploy/job/add-batch-job-dialog.vue b/src/views/pages/deploy/job/add-batch-job-dialog.vue index ddc13c28..0083f727 100644 --- a/src/views/pages/deploy/job/add-batch-job-dialog.vue +++ b/src/views/pages/deploy/job/add-batch-job-dialog.vue @@ -147,8 +147,10 @@ export default { if (item.value === 'custom') { if (this.$AuthUtils.hasRole(['BATCHDEPLOY_MODIFY'])) { this.$set(item, 'disabled', false); + this.$set(item, 'description', ''); } else { this.$set(item, 'disabled', true); + this.$set(item, 'description', this.$t('term.deploy.batchdeployauthtip')); } } }); -- Gitee From 3c80454d4627535f6d5f0742edb645cb5a9d5059 Mon Sep 17 00:00:00 2001 From: dengbf Date: Fri, 4 Jul 2025 17:20:08 +0800 Subject: [PATCH 3/5] commit --- src/views/pages/deploy/job/add-batch-job-dialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pages/deploy/job/add-batch-job-dialog.vue b/src/views/pages/deploy/job/add-batch-job-dialog.vue index 0083f727..2840677b 100644 --- a/src/views/pages/deploy/job/add-batch-job-dialog.vue +++ b/src/views/pages/deploy/job/add-batch-job-dialog.vue @@ -145,7 +145,7 @@ export default { init() { this.formConfig.createMethod.dataList.forEach(item => { if (item.value === 'custom') { - if (this.$AuthUtils.hasRole(['BATCHDEPLOY_MODIFY'])) { + if (this.$AuthUtils.hasRole('BATCHDEPLOY_MODIFY')) { this.$set(item, 'disabled', false); this.$set(item, 'description', ''); } else { -- Gitee From c5bc2bf63395e50aa6c968adbe47e7a7cfd11210 Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 12 Aug 2025 17:58:30 +0800 Subject: [PATCH 4/5] commit --- .gitignore | 2 +- README.md | 40 +++++++++++++++++++++++----------------- package.json | 6 +++--- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index ec16ca6d..e3dc850f 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ yarn.lock /.idea /.lh /.vscode -# /src/commercial-module/* +/src/commercial-module/* *.code-workspace pnpm-lock.yaml public/version.md diff --git a/README.md b/README.md index 2b1416b1..61954d64 100755 --- a/README.md +++ b/README.md @@ -11,46 +11,52 @@ vue/cli 5.x,webpack 5.x npm install -g @vue/cli ``` -# 初始化依赖 +# 设置淘宝镜像源 ``` -npm install --registry=https://registry.npm.taobao.org +npm config set registry https://registry.npmmirror.com/ ``` -> 如果启动时发现大量不明报错,可能原因是npm install阶段加载的依赖包不完整导致,可以对npm进行降级再次install,目前测试v18的npm可以正常install。或者通过cnpm install加载依赖包也可以。cnpm版本也不能太高,建议使用v8.2.0。建议使用nvm管理多版本的node,使用v18.x版本的node会比较稳定。 +# 初始化依赖 ``` -sudo npm install -g cnpm@8.2.0 --registry=https://registry.npm.taobao.org - -cnpm install +npm install ``` +> 如果启动时发现大量不明报错,可能原因是npm install阶段加载的依赖包不完整导致,可以对npm进行降级再次install,目前测试v18的npm可以正常install。建议使用nvm管理多版本的node,使用v18.x版本的node会比较稳定。 + + # 构建打包项目代码 ``` -cnpm run build +npm run build ``` # 本地开发环境运行项目 >需修改apiconfig.json配置文件,将tenantName的值修改为在用的租户(如果使用的是官方提供的用例数据,则租户就是demo),urlPrefix改成neatlogic后端tomcat服务的http://ip:port -## 通过cnpm启动项目 +## 通过npm启动项目 ``` -cnpm run serve +npm run serve ``` ## 自动纠正文件里不符合eslint的语法 ``` -cnpm run lint +npm run lint ``` ## 设置自动eslintrc https://www.cnblogs.com/weilai-info/p/10988829.html +# 支持pnpm +```js + 📌" 研发环境建议使用pnpm效率更高,生产出包使用npm。pnpm需自行科普使用" +``` + -## 设置vscode的个人配置 +# 设置vscode的个人配置 为了统一代码风格,多人开发时不会出现格式错乱,进行二开时请使用相同的代码风格配置。 -#### 安装插件 +## 安装插件 EsLint、vetur、Prettier - Code formatter、i18nhelper(自动进行i18n键值替换和多语言翻译) -#### 设置>命令面板>输入“setting”>选择“首选项:打开设置”>打开 settings.json +### 设置>命令面板>输入“setting”>选择“首选项:打开设置”>打开 settings.json ``` { "gitlens.views.repositories.files.layout": "list", @@ -132,15 +138,15 @@ EsLint、vetur、Prettier - Code formatter、i18nhelper(自动进行i18n键值 ``` -## FAQ常见问题 -### npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired +# FAQ常见问题 +## npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired ``` npm config set strict-ssl false ``` # 其他 ## 更新某个依赖 ``` -cnpm update 依赖包名字 +npm update 依赖包名字 -eg:cnpm update neatlogic-ui +eg:npm update neatlogic-ui ``` \ No newline at end of file diff --git a/package.json b/package.json index a30537fb..b3743f0b 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", -- Gitee From 8d9d1bd84d7acb4d049ac19ee757e1011cffc67c Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 12 Aug 2025 17:59:27 +0800 Subject: [PATCH 5/5] commit --- apiconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiconfig.json b/apiconfig.json index f7135049..a3880ef6 100644 --- a/apiconfig.json +++ b/apiconfig.json @@ -1,4 +1,4 @@ { "tenantName": "develop", - "urlPrefix": "http://192.168.0.25:8282" + "urlPrefix": "http://localhost:8080" } -- Gitee