diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json
index 6918715453f3c07448bdb3f60159c1ce8d1196a2..a215bf0f4baade897d592d70250497b718823fdc 100644
--- a/src/resources/assets/languages/term/en.json
+++ b/src/resources/assets/languages/term/en.json
@@ -2163,7 +2163,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 d04b9b894d02c2d0d9eb61b2060a5160539d0868..ba365bf5f7e149a10a6e81d5a1bd11514424902a 100644
--- a/src/resources/assets/languages/term/zh.json
+++ b/src/resources/assets/languages/term/zh.json
@@ -2160,7 +2160,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 039cf58a82eaf51b1a95280e5a7c6745c8ce576f..526ad7bd6ac81cfb09bfacfdf22c74e7a02ad38d 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,26 @@ 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);
+ this.$set(item, 'description', '');
+ } else {
+ this.$set(item, 'disabled', true);
+ this.$set(item, 'description', this.$t('term.deploy.batchdeployauthtip'));
+ }
+ }
+ });
+ 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())) {
diff --git a/src/views/pages/deploy/job/job-manage.vue b/src/views/pages/deploy/job/job-manage.vue
index 0a54f52693732f492f43b09a2363fb3bfa53494b..fcf76a360ffc42c8064ca5799822a5966d811747 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') }}