From c6678a4eeb30cd29ecb3729d969222fb67459747 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Fri, 22 Dec 2023 18:48:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=85=8D=E7=BD=AE=E8=B5=84=E4=BA=A7=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86=E7=9A=84=E4=BF=AE=E6=94=B9=20#[1044?= =?UTF-8?q?873413623808]=E8=87=AA=E5=8A=A8=E5=8C=96--=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=85=8D=E7=BD=AE=E8=B5=84=E4=BA=A7=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86=E7=9A=84=E4=BF=AE=E6=94=B9=20http:/?= =?UTF-8?q?/192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/?= =?UTF-8?q?939050947543042/1044873413623808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/page/en.json | 8 ++++- src/resources/assets/languages/page/zh.json | 10 +++++-- .../common/addTarget/add-filters.vue | 4 ++- .../components/common/addTarget/add-input.vue | 4 ++- .../components/common/addTarget/add-node.vue | 11 ++++--- .../common/addTarget/target-detail.vue | 6 +++- .../pages/autoexec/detail/action-detail.vue | 30 ++++++++++++++++++- .../detail/actionDetail/basic-info.vue | 9 ++++++ .../detail/actionDetail/execute-setting.vue | 4 ++- .../pages/autoexec/manage/action-manage.vue | 17 +++++++++++ 10 files changed, 91 insertions(+), 12 deletions(-) diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index 9274c92a..809db45c 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -958,5 +958,11 @@ "importoverdescrition": "The following associated objects already exist in the system. If you want to overwrite them, please check the objects you want to overwrite and click the [Import] button below to complete the import.", "uploadurlmustrequired": "The upload address cannot be empty", "existiscoverimport": "{type}【{target}】 already exists. Do you want to continue importing and overwrite it", - "userauthfailedpleaselogin": "authentication failed, please log in" + "userauthfailedpleaselogin": "authentication failed, please log in", + "combop": { + "optype": "Operation classification", + "editinfo": { + "optypetip": "Query class: Only assets with read-only permissions in the resource center can be used as execution targets; Operations: Only assets with 'automated operations' permissions in the resource center and group management can be used as execution targets;" + } + } } \ 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 206155f6..8caa161b 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -960,5 +960,11 @@ "importoverdescrition": "以下关联的对象,在系统中已经存在,如需覆盖,请勾选需要覆盖的对象后,点击下方[导入]按钮,完成导入。", "uploadurlmustrequired": "上传地址不能为空", "existiscoverimport": "{type}【{target}】已存在,是否继续导入并覆盖", - "userauthfailedpleaselogin": "认证失败,请重新登录" -} + "userauthfailedpleaselogin": "认证失败,请重新登录", + "combop": { + "optype": "操作分类", + "editinfo": { + "optypetip": "查询类:在配置管理,具备‘只读’权限的资产,才可以作为执行目标;\n操作类:在配置管理,团体管理中具备‘自动化操作’权限的资产,才可以作为执行目标;" + } + } +} \ No newline at end of file diff --git a/src/views/pages/autoexec/components/common/addTarget/add-filters.vue b/src/views/pages/autoexec/components/common/addTarget/add-filters.vue index f1b48e9f..4892880b 100644 --- a/src/views/pages/autoexec/components/common/addTarget/add-filters.vue +++ b/src/views/pages/autoexec/components/common/addTarget/add-filters.vue @@ -36,7 +36,9 @@ export default { filters: { }, mixins: [addtargetmixin], - props: {}, + props: { + opType: String + }, data() { return { searchVal: {} diff --git a/src/views/pages/autoexec/components/common/addTarget/add-input.vue b/src/views/pages/autoexec/components/common/addTarget/add-input.vue index 6a19a942..4f990055 100644 --- a/src/views/pages/autoexec/components/common/addTarget/add-input.vue +++ b/src/views/pages/autoexec/components/common/addTarget/add-input.vue @@ -83,7 +83,9 @@ export default { }, filtes: {}, mixins: [addtargetmixin], - props: {}, + props: { + opType: String + }, data() { return { showNumber: 15, diff --git a/src/views/pages/autoexec/components/common/addTarget/add-node.vue b/src/views/pages/autoexec/components/common/addTarget/add-node.vue index 8370d2f3..f4f847b4 100644 --- a/src/views/pages/autoexec/components/common/addTarget/add-node.vue +++ b/src/views/pages/autoexec/components/common/addTarget/add-node.vue @@ -95,7 +95,8 @@ export default { //展示文件数 type: Number, default: 4 - } + }, + opType: String }, data() { return { @@ -146,7 +147,8 @@ export default { searchNodeList(param) { let data = { currentPage: this.currentPage, - pageSize: this.pageSize + pageSize: this.pageSize, + cmdbGroupType: this.opType }; if (param) { Object.assign(data, param); @@ -164,7 +166,8 @@ export default { type == 'pageSize' && (this.pageSize = value); let param = { currentPage: type == 'currentPage' ? value : this.currentPage, - pageSize: type == 'pageSize' ? value : this.pageSize + pageSize: type == 'pageSize' ? value : this.pageSize, + cmdbGroupType: this.opType }; param = Object.assign(param, this.searchVal); this.searchNodeList(param); @@ -232,7 +235,7 @@ export default { }, advancedModeSearch(searchVal) { // 复杂模式搜索 - let params = Object.assign({currentPage: 1, pageSize: 10}, searchVal); + let params = Object.assign({currentPage: 1, pageSize: 10, cmdbGroupType: this.opType}, searchVal); this.loadingShow = true; this.$api.autoexec.action.searchResourceCustomList(params).then(res => { if (res.Status == 'OK') { diff --git a/src/views/pages/autoexec/components/common/addTarget/target-detail.vue b/src/views/pages/autoexec/components/common/addTarget/target-detail.vue index a68cdbff..8bd49cec 100644 --- a/src/views/pages/autoexec/components/common/addTarget/target-detail.vue +++ b/src/views/pages/autoexec/components/common/addTarget/target-detail.vue @@ -25,6 +25,7 @@ :defaultValue="executeNodeConfig.filter" :canEdit="canEdit" :defaultSearchValue="defaultSearchValue" + :opType="opType" > @@ -334,6 +335,7 @@ export default { showBasicInfoEditDialog: false, editBasicInfo: { name: '', + opType: 'readonly', typeId: '', owner: '', viewAuthorityList: '', @@ -358,6 +360,17 @@ export default { label: this.$t('page.name'), validateList: ['required', 'name-special', { name: 'searchUrl', url: 'api/rest/autoexec/combop/basic/info/save', key: 'name' }] }, + opType: { + type: 'radio', + label: this.$t('page.combop.optype'), + value: '', + dataList: [], + validateList: ['required'], + onChange: (value, opt) => { + _this.opTypeName = opt.text; + }, + tooltip: this.$t('page.combop.editinfo.optypetip') + }, typeId: { type: 'select', name: 'typeId', @@ -483,7 +496,8 @@ export default { loading: true, isShowTestDialog: false, configExpired: 0, - configExpiredReason: {} + configExpiredReason: {}, + opType: 'readonly' //操作类型 }; }, beforeCreate() {}, @@ -501,6 +515,7 @@ export default { if (this.$route.query.versionStatus) { this.versionStatus = this.$route.query.versionStatus; } + this.getOpType(); }, beforeMount() {}, async mounted() { @@ -562,6 +577,7 @@ export default { this.operationType = result.operationType; this.$set(this.basicInfo, 'name', result.name); this.$set(this.basicInfo, 'typeName', result.typeName); + this.$set(this.basicInfo, 'opTypeName', result.opTypeName); this.$set(this.basicInfo, 'owner', result.owner); this.$set(this.basicInfo, 'viewAuthorityList', result.viewAuthorityList); this.$set(this.basicInfo, 'editAuthorityList', result.editAuthorityList); @@ -571,6 +587,7 @@ export default { this.activeVersionId = result.activeVersionId; this.versionName = result.name; this.versionId = result.specifyVersionId; + this.opType = result.opType; } }); if (this.versionId != null) { @@ -1367,6 +1384,7 @@ export default { const result = res.Return; this.$set(this.editBasicInfo, 'name', result.name); this.$set(this.editBasicInfo, 'typeId', result.typeId); + this.$set(this.editBasicInfo, 'opType', result.opType); this.$set(this.editBasicInfo, 'owner', result.owner); this.$set(this.editBasicInfo, 'viewAuthorityList', result.viewAuthorityList); this.$set(this.editBasicInfo, 'editAuthorityList', result.editAuthorityList); @@ -1388,6 +1406,7 @@ export default { } this.$set(this.editBasicInfo, 'id', this.id); this.$set(this.editBasicInfo, 'typeName', this.typeName); + this.$set(this.editBasicInfo, 'opTypeName', this.opTypeName); const notifyPolicyConfig = noticeSetting.getData(); if (notifyPolicyConfig?.policyId) { this.editBasicInfo.config.invokeNotifyPolicyConfig = notifyPolicyConfig; @@ -1398,6 +1417,7 @@ export default { if (res.Status == 'OK') { this.$set(this.basicInfo, 'name', this.editBasicInfo.name); this.$set(this.basicInfo, 'typeName', this.editBasicInfo.typeName); + this.$set(this.basicInfo, 'opTypeName', this.editBasicInfo.opTypeName); this.$set(this.basicInfo, 'owner', this.editBasicInfo.owner); this.$set(this.basicInfo, 'viewAuthorityList', this.editBasicInfo.viewAuthorityList); this.$set(this.basicInfo, 'editAuthorityList', this.editBasicInfo.editAuthorityList); @@ -1444,6 +1464,14 @@ export default { }); } this.isShowTestDialog = false; + }, + getOpType() { + let data = { enumClass: 'neatlogic.framework.autoexec.constvalue.AutoexecCombopOpType' }; + this.$api.autoexec.action.getParamsTypeLit(data).then(res => { + if (res.Status == 'OK') { + this.editBasicInfoForm.opType.dataList = res.Return; + } + }); } }, computed: { diff --git a/src/views/pages/autoexec/detail/actionDetail/basic-info.vue b/src/views/pages/autoexec/detail/actionDetail/basic-info.vue index 08632217..20d79baf 100644 --- a/src/views/pages/autoexec/detail/actionDetail/basic-info.vue +++ b/src/views/pages/autoexec/detail/actionDetail/basic-info.vue @@ -47,6 +47,15 @@ export default { width: '100%', readonly: true }, + opTypeName: { + type: 'text', + name: 'opTypeName', + value: '', + maxlength: 50, + label: this.$t('page.combop.optype'), + width: '100%', + readonly: true + }, typeName: { type: 'text', name: 'typeName', diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index 01828b1c..e8acc8f3 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -48,6 +48,7 @@ :canEdit="isEditSetting" :type="settingConfig.whenToSpecify" :required="true" + :opType="opType" > @@ -107,7 +108,8 @@ export default { default: () => {} }, runtimeParamList: Array, - isEditSetting: Boolean + isEditSetting: Boolean, + opType: String }, data() { let _this = this; diff --git a/src/views/pages/autoexec/manage/action-manage.vue b/src/views/pages/autoexec/manage/action-manage.vue index 2e2db793..88c1303f 100644 --- a/src/views/pages/autoexec/manage/action-manage.vue +++ b/src/views/pages/autoexec/manage/action-manage.vue @@ -218,6 +218,13 @@ export default { label: this.$t('page.name'), validateList: ['required', 'name-special', { name: 'searchUrl', url: 'api/rest/autoexec/combop/basic/info/save', key: 'name' }] }, + opType: { + type: 'radio', + label: this.$t('page.combop.optype'), + value: '', + dataList: [], + validateList: ['required'] + }, typeId: { type: 'select', name: 'typeId', @@ -346,6 +353,7 @@ export default { this.$set(this.searchVal, 'typeId', typeId); } this.searchAction(); + this.getOpType(); }, beforeMount() {}, mounted() {}, @@ -409,6 +417,7 @@ export default { initActionConfig() { return { name: '', + opType: 'readonly', typeId: '', viewAuthorityList: ['common#alluser'], editAuthorityList: ['common#alluser'], @@ -581,6 +590,14 @@ export default { if (versionStatus == 'passed') { this.theadList[index++] = { title: ' ', key: 'action', align: 'right', width: 10 }; } + }, + getOpType() { + let data = { enumClass: 'neatlogic.framework.autoexec.constvalue.AutoexecCombopOpType' }; + this.$api.autoexec.action.getParamsTypeLit(data).then(res => { + if (res.Status == 'OK') { + this.addActionForm.opType.dataList = res.Return; + } + }); } }, computed: { -- Gitee From 8352c8b776dc95c659727631ea6c764b952f698b Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Mon, 25 Dec 2023 17:03:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96--=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=B5=84=E4=BA=A7=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9=20#[1044873413623808]=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96--=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=B5=84=E4=BA=A7=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E4=BF=AE=E6=94=B9=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/story-detail/939050947543040/939050947543042/10?= =?UTF-8?q?44873413623808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/page/en.json | 8 +------- src/resources/assets/languages/page/zh.json | 8 +------- src/resources/assets/languages/term/en.json | 13 +++++++++++-- src/resources/assets/languages/term/zh.json | 13 +++++++++++-- .../components/common/addTarget/add-input.vue | 3 ++- .../components/common/executionMode/filters.vue | 5 ++++- .../pages/autoexec/components/param/edit/node.vue | 4 +++- .../components/param/edit/node/node-dialog.vue | 4 +++- src/views/pages/autoexec/detail/action-detail.vue | 11 +++++++++-- .../autoexec/detail/actionDetail/basic-info.vue | 6 ++++-- .../detail/actionDetail/execute-setting.vue | 11 +++++++++-- .../autoexec/detail/actionDetail/params-setting.vue | 4 +++- .../detail/actionDetail/params/param-detail.vue | 4 +++- .../autoexec/detail/runnerDetail/add-target.vue | 3 ++- src/views/pages/cmdb/group/group-edit.vue | 10 +++++++++- 15 files changed, 75 insertions(+), 32 deletions(-) diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index 809db45c..9274c92a 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -958,11 +958,5 @@ "importoverdescrition": "The following associated objects already exist in the system. If you want to overwrite them, please check the objects you want to overwrite and click the [Import] button below to complete the import.", "uploadurlmustrequired": "The upload address cannot be empty", "existiscoverimport": "{type}【{target}】 already exists. Do you want to continue importing and overwrite it", - "userauthfailedpleaselogin": "authentication failed, please log in", - "combop": { - "optype": "Operation classification", - "editinfo": { - "optypetip": "Query class: Only assets with read-only permissions in the resource center can be used as execution targets; Operations: Only assets with 'automated operations' permissions in the resource center and group management can be used as execution targets;" - } - } + "userauthfailedpleaselogin": "authentication failed, please log in" } \ 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 8caa161b..68d69444 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -960,11 +960,5 @@ "importoverdescrition": "以下关联的对象,在系统中已经存在,如需覆盖,请勾选需要覆盖的对象后,点击下方[导入]按钮,完成导入。", "uploadurlmustrequired": "上传地址不能为空", "existiscoverimport": "{type}【{target}】已存在,是否继续导入并覆盖", - "userauthfailedpleaselogin": "认证失败,请重新登录", - "combop": { - "optype": "操作分类", - "editinfo": { - "optypetip": "查询类:在配置管理,具备‘只读’权限的资产,才可以作为执行目标;\n操作类:在配置管理,团体管理中具备‘自动化操作’权限的资产,才可以作为执行目标;" - } - } + "userauthfailedpleaselogin": "认证失败,请重新登录" } \ 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 cb85e4a1..2a7d4058 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -182,7 +182,10 @@ "directoryname": "Catalog Name", "noaddcidirectory": "No model directory added,", "currentcatalogcitenodeletedescrition": "The current directory node has been referenced. Please remove the reference and delete it", - "autoexec": "Automated operations" + "autoexec": "Automated operations", + "grouptypedescreadonly": "Read only: View configuration items, which can be used as the execution target for the query class combination tool in automation.", + "grouptypedescmaintain": "Maintenance: Add modifications to configuration items based on read-only permissions.", + "grouptypedescautoexec": "Automated operations: On the basis of read-only permissions, add execution targets that can be used as a combination tool for operations in automation" }, "process": { "workordercenter": "Work Center", @@ -767,7 +770,13 @@ "targetjoberror": "{target} Failed to create job", "toolparamstooltip": "Tool parameters are a set of parameters for associated tools. Parameters from custom tool libraries can be added, deleted, and modified, while parameters from tool libraries cannot be added, deleted, or modified.", "combophasexpired": "The combination tool has expired", - "pleasereedit": "Please re edit and submit for review" + "pleasereedit": "Please re edit and submit for review", + "combop": { + "optype": "Operation classification", + "editinfo": { + "optypetip": "Query class: Only assets with read-only permissions in the resource center can be used as execution targets; Operations: Only assets with 'automated operations' permissions in the resource center and group management can be used as execution targets;" + } + } }, "framework": { "roleauth": "Authorize immediately after creating the role", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index e6505a39..df97e600 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -182,7 +182,10 @@ "directoryname": "目录名称", "noaddcidirectory": "未添加模型目录,", "currentcatalogcitenodeletedescrition": "当前目录节点已被引用,请解除引用后删除", - "autoexec": "自动化操作" + "autoexec": "自动化操作", + "grouptypedescreadonly": "只读:查看配置项,可作为自动化中,【查询类】组合工具的执行目标。", + "grouptypedescmaintain": "维护:在只读权限的基础上,增加对配置项进行修改。", + "grouptypedescautoexec": "自动化操作:在只读权限基础上,增加可作为自动化中,【操作类】组合工具的执行目标" }, "process": { "workordercenter": "工单中心", @@ -766,7 +769,13 @@ "targetjoberror": "{target}创建作业失败", "toolparamstooltip": "工具参数是已关联的工具的参数集合。来源于自定义工具库的参数可增加、删除和修改,来源于工具库的参数无法增加、删除和修改。", "combophasexpired": "组合工具已失效", - "pleasereedit": "请重新编辑后,提交审核" + "pleasereedit": "请重新编辑后,提交审核", + "combop": { + "optype": "操作分类", + "editinfo": { + "optypetip": "查询类:在配置管理,具备‘只读’权限的资产,才可以作为执行目标;\n操作类:在配置管理,团体管理中具备‘自动化操作’权限的资产,才可以作为执行目标;" + } + } }, "framework": { "roleauth": "创建完角色立即授权", diff --git a/src/views/pages/autoexec/components/common/addTarget/add-input.vue b/src/views/pages/autoexec/components/common/addTarget/add-input.vue index 4f990055..c5186a22 100644 --- a/src/views/pages/autoexec/components/common/addTarget/add-input.vue +++ b/src/views/pages/autoexec/components/common/addTarget/add-input.vue @@ -200,7 +200,8 @@ export default { validinputnodelist(list) { let data = { filter: this.defaultSearchValue, - inputNodeList: list + inputNodeList: list, + cmdbGroupType: opType }; return this.$api.autoexec.action.validinputnodelist(data).then(res => { if (res.Status == 'OK') { diff --git a/src/views/pages/autoexec/components/common/executionMode/filters.vue b/src/views/pages/autoexec/components/common/executionMode/filters.vue index c27b41b2..c2b456ae 100644 --- a/src/views/pages/autoexec/components/common/executionMode/filters.vue +++ b/src/views/pages/autoexec/components/common/executionMode/filters.vue @@ -94,7 +94,8 @@ export default { bgOp: { type: Boolean, default: true - } + }, + opType: String }, data() { return { @@ -158,6 +159,7 @@ export default { if (!this.$utils.isEmpty(this.defaultSearchValue)) { Object.assign(data, this.defaultSearchValue); } + data.cmdbGroupType = this.opType; this.$api.autoexec.action.getNodeList(data).then(res => { if (res.Status == 'OK') { this.tableData = res.Return; @@ -189,6 +191,7 @@ export default { advancedModeSearch(searchVal) { // 复杂模式搜索 let params = Object.assign({currentPage: 1, pageSize: 10}, searchVal); + params.cmdbGroupType = this.opType; this.complexModeSearchValue = searchVal; this.loadingShow = true; this.$api.autoexec.action.searchResourceCustomList(params).then(res => { diff --git a/src/views/pages/autoexec/components/param/edit/node.vue b/src/views/pages/autoexec/components/param/edit/node.vue index 047d6df5..caa716d8 100644 --- a/src/views/pages/autoexec/components/param/edit/node.vue +++ b/src/views/pages/autoexec/components/param/edit/node.vue @@ -32,6 +32,7 @@ :visible="showDialog" :config="config" :disabled="disabled || readonly" + :opType="opType" @on-ok="onOk" @close="endAdd" > @@ -63,7 +64,8 @@ export default { event: 'change' }, props: { - desc: String + desc: String, + opType: String }, data() { return { diff --git a/src/views/pages/autoexec/components/param/edit/node/node-dialog.vue b/src/views/pages/autoexec/components/param/edit/node/node-dialog.vue index c7f0a6fe..f9a7209f 100644 --- a/src/views/pages/autoexec/components/param/edit/node/node-dialog.vue +++ b/src/views/pages/autoexec/components/param/edit/node/node-dialog.vue @@ -127,7 +127,8 @@ export default { disabled: { type: Boolean, default: false - } + }, + opType: String }, data() { let _this = this; @@ -210,6 +211,7 @@ export default { }, searchNodeList() { let data = Object.assign({}, this.searchParams, this.searchVal); + data.cmdbGroupType = this.opType; this.$api.autoexec.action.getNodeList(data).then(res => { if (res.Status == 'OK') { this.tableData = res.Return; diff --git a/src/views/pages/autoexec/detail/action-detail.vue b/src/views/pages/autoexec/detail/action-detail.vue index 81a5a12d..20002734 100644 --- a/src/views/pages/autoexec/detail/action-detail.vue +++ b/src/views/pages/autoexec/detail/action-detail.vue @@ -171,6 +171,7 @@
@@ -362,14 +364,15 @@ export default { }, opType: { type: 'radio', - label: this.$t('page.combop.optype'), + label: this.$t('term.autoexec.combop.optype'), value: '', dataList: [], validateList: ['required'], onChange: (value, opt) => { _this.opTypeName = opt.text; }, - tooltip: this.$t('page.combop.editinfo.optypetip') + tooltip: this.$t('term.autoexec.combop.editinfo.optypetip'), + isHidden: true }, typeId: { type: 'select', @@ -575,6 +578,8 @@ export default { this.name = result.name; this.isActive = result.isActive; this.operationType = result.operationType; + this.isResourcecenterAuth = result.isResourcecenterAuth; + this.$set(this.editBasicInfoForm.opType, 'isHidden', result.isResourcecenterAuth === '0'); this.$set(this.basicInfo, 'name', result.name); this.$set(this.basicInfo, 'typeName', result.typeName); this.$set(this.basicInfo, 'opTypeName', result.opTypeName); @@ -1382,6 +1387,8 @@ export default { this.$api.autoexec.action.getActionBasicInfo(data).then(res => { if (res.Status == 'OK') { const result = res.Return; + this.$set(this.editBasicInfoForm.opType, 'isHidden', result.isResourcecenterAuth === '0'); + this.$set(this.editBasicInfo, 'name', result.isResourcecenterAuth); this.$set(this.editBasicInfo, 'name', result.name); this.$set(this.editBasicInfo, 'typeId', result.typeId); this.$set(this.editBasicInfo, 'opType', result.opType); diff --git a/src/views/pages/autoexec/detail/actionDetail/basic-info.vue b/src/views/pages/autoexec/detail/actionDetail/basic-info.vue index 20d79baf..29dc91a0 100644 --- a/src/views/pages/autoexec/detail/actionDetail/basic-info.vue +++ b/src/views/pages/autoexec/detail/actionDetail/basic-info.vue @@ -32,7 +32,8 @@ export default { }, filters: {}, props: { - dataConfig: {type: Object, default: () => {}} + dataConfig: {type: Object, default: () => {}}, + isResourcecenterAuth: Boolean }, data() { let _this = this; @@ -54,7 +55,8 @@ export default { maxlength: 50, label: this.$t('page.combop.optype'), width: '100%', - readonly: true + readonly: true, + isHidden: this.isResourcecenterAuth }, typeName: { type: 'text', diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index e8acc8f3..ea3ba475 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -54,7 +54,12 @@
- +
@@ -65,6 +70,7 @@ :defaultValue="settingConfig.executeNodeConfig.paramList" :paramList="nodeTypeParamList" :canEdit="isEditSetting" + :opType="opType" >
@@ -251,7 +257,8 @@ export default { executeUser: null, filter: executeNodeConfig.filter || {}, selectNodeList: executeNodeConfig.selectNodeList || [], - inputNodeList: executeNodeConfig.inputNodeList || [] + inputNodeList: executeNodeConfig.inputNodeList || [], + cmdbGroupType: this.opType }; if (this.$refs.executeUser) { this.$set(this.settingConfig, 'executeUser', this.$refs.executeUser.save()); diff --git a/src/views/pages/autoexec/detail/actionDetail/params-setting.vue b/src/views/pages/autoexec/detail/actionDetail/params-setting.vue index b503b400..cd454657 100644 --- a/src/views/pages/autoexec/detail/actionDetail/params-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/params-setting.vue @@ -20,6 +20,7 @@ :typeList="paramsTypeList" :isEdit="isEditSetting" :setValidComponentsList="setValidComponentsList" + :opType="opType" > [] - } + }, + opType: String }, data() { let _this = this; diff --git a/src/views/pages/autoexec/detail/actionDetail/params/param-detail.vue b/src/views/pages/autoexec/detail/actionDetail/params/param-detail.vue index 7db12728..c21b024f 100644 --- a/src/views/pages/autoexec/detail/actionDetail/params/param-detail.vue +++ b/src/views/pages/autoexec/detail/actionDetail/params/param-detail.vue @@ -77,6 +77,7 @@ :disabled="!isEdit" :setValidComponentsList="setValidComponentsList" :isRequired="item.isRequired && !item.editable" + :opType="opType" @getConfig="(config)=>{getParamConfig(index,config)}" > @@ -151,7 +152,8 @@ export default { type: Boolean, default: true }, - setValidComponentsList: Array + setValidComponentsList: Array, + opType: String }, data() { return { diff --git a/src/views/pages/autoexec/detail/runnerDetail/add-target.vue b/src/views/pages/autoexec/detail/runnerDetail/add-target.vue index 4c304b30..0907e18c 100644 --- a/src/views/pages/autoexec/detail/runnerDetail/add-target.vue +++ b/src/views/pages/autoexec/detail/runnerDetail/add-target.vue @@ -330,7 +330,8 @@ export default { //true不需要提示校验信息 let data = { protocolId: this.executeValue.protocolId ? this.executeValue.protocolId : null, - executeUser: null + executeUser: null, + cmdbGroupType: opType }; if (this.executeValue.executeUser && this.executeValue.executeUser.value) { if (this.executeValue.executeUser.mappingMode === 'constant') { diff --git a/src/views/pages/cmdb/group/group-edit.vue b/src/views/pages/cmdb/group/group-edit.vue index 7c2b9325..2391c07e 100644 --- a/src/views/pages/cmdb/group/group-edit.vue +++ b/src/views/pages/cmdb/group/group-edit.vue @@ -252,7 +252,7 @@ export default { type: { type: 'radio', label: this.$t('page.type'), - desc: '只读:查看配置项,可作为自动化中,【查询类】组合工具的执行目标。维护:在只读权限的基础上,增加对配置项进行修改。自动化操作:在只读权限基础上,增加可作为自动化中,【操作类】组合工具的执行目标', + desc: this.$t('term.cmdb.grouptypedescreadonly') + this.$t('term.cmdb.grouptypedescmaintain') + this.$t('term.cmdb.grouptypedescautoexec'), dataList: [ { value: 'readonly', text: this.$t('page.readonly') }, { value: 'maintain', text: this.$t('page.maintain') }, @@ -310,6 +310,14 @@ export default { this.isLoading = false; this.groupData = res.Return; for (let key in this.formConfig) { + //系统配置-》配置信息管理 is.resourcecenter.auth 控制是否显示 “操作类” + if (key === 'type' && this.groupData.isResourcecenterAuth !== '1') { + var typeDataList = this.formConfig[key].dataList.filter(item => { + return item.value !== 'autoexec'; + }); + this.formConfig[key].dataList = typeDataList; + this.formConfig[key].desc = this.$t('term.cmdb.grouptypedescreadonly') + this.$t('term.cmdb.grouptypedescmaintain'); + } this.formConfig[key].value = this.groupData[key]; } if (this.groupData.ciGroupList && this.groupData.ciGroupList.length > 0) { -- Gitee From a6aa36a343b2b7f9ec238775b9ca77c4864ffebe Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Mon, 8 Jan 2024 11:18:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96--=E7=BB=84?= =?UTF-8?q?=E5=90=88=E5=B7=A5=E5=85=B7=E9=85=8D=E7=BD=AE=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86=E7=9A=84=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20#[1044873413623808]=E8=87=AA=E5=8A=A8=E5=8C=96--=E7=BB=84?= =?UTF-8?q?=E5=90=88=E5=B7=A5=E5=85=B7=E9=85=8D=E7=BD=AE=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86=E7=9A=84=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20http://192.168.0.96:8090/demo/rdm.html#/story-detail/9390509?= =?UTF-8?q?47543040/939050947543042/1044873413623808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/page/en.json | 3 ++- src/resources/assets/languages/page/zh.json | 3 ++- src/resources/assets/languages/term/en.json | 8 +------- src/resources/assets/languages/term/zh.json | 8 +------- src/views/pages/autoexec/detail/action-detail.vue | 4 ++-- .../pages/autoexec/detail/actionDetail/basic-info.vue | 2 +- src/views/pages/autoexec/manage/action-manage.vue | 2 +- 7 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index 4be6117e..9128dd02 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -960,5 +960,6 @@ "existiscoverimport": "{type}【{target}】 already exists. Do you want to continue importing and overwrite it", "userauthfailedpleaselogin": "authentication failed, please log in", "partial": "local", - "rolerule": "The request for login authentication needs to carry a header as a rule expression. If the value of the expression after execution is true, the role will take effect, otherwise it will not take effect. For example: \"${DATA.env}\"==\"sit\"ß&&(\"${DATA.test}\"=\"1\" | | \"${DATA.test2}\"==\"aaa\")" + "rolerule": "The request for login authentication needs to carry a header as a rule expression. If the value of the expression after execution is true, the role will take effect, otherwise it will not take effect. For example: \"${DATA.env}\"==\"sit\"ß&&(\"${DATA.test}\"=\"1\" | | \"${DATA.test2}\"==\"aaa\")", + "autoexeccombopeditinfooptypetip":"Query class: Only assets with read-only permissions in the resource center can be used as execution targets; Operations: Only assets with 'automated operations' permissions in the resource center and group management can be used as execution targets;" } \ 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 cf21b6d1..6951ef40 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -962,5 +962,6 @@ "existiscoverimport": "{type}【{target}】已存在,是否继续导入并覆盖", "userauthfailedpleaselogin": "认证失败,请重新登录", "partial": "局部", - "rolerule": "登录认证的请求需要携带Header做规则表达式(注意表达式中header参数全小写),如果表达式执行后的值为true则该角色生效,false和语法异常都不生效 。 如:\"${DATA.env}\"==\"sit\"&&(\"${DATA.test}\"==\"1\"||\"${DATA.test2}\"==\"aaa\")" + "rolerule": "登录认证的请求需要携带Header做规则表达式(注意表达式中header参数全小写),如果表达式执行后的值为true则该角色生效,false和语法异常都不生效 。 如:\"${DATA.env}\"==\"sit\"&&(\"${DATA.test}\"==\"1\"||\"${DATA.test2}\"==\"aaa\")", + "autoexeccombopeditinfooptypetip":"查询类:在配置管理,具备‘只读’权限的资产,才可以作为执行目标;\n操作类:在配置管理,团体管理中具备‘自动化操作’权限的资产,才可以作为执行目标;" } \ 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 46bc173f..833939a5 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -782,13 +782,7 @@ "targetjoberror": "{target} Failed to create job", "toolparamstooltip": "Tool parameters are a set of parameters for associated tools. Parameters from custom tool libraries can be added, deleted, and modified, while parameters from tool libraries cannot be added, deleted, or modified.", "combophasexpired": "The combination tool has expired", - "pleasereedit": "Please re edit and submit for review", - "combop": { - "optype": "Operation classification", - "editinfo": { - "optypetip": "Query class: Only assets with read-only permissions in the resource center can be used as execution targets; Operations: Only assets with 'automated operations' permissions in the resource center and group management can be used as execution targets;" - } - } + "pleasereedit": "Please re edit and submit for review" }, "framework": { "roleauth": "Authorize immediately after creating the role", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 7745d0ba..b462b01d 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -781,13 +781,7 @@ "targetjoberror": "{target}创建作业失败", "toolparamstooltip": "工具参数是已关联的工具的参数集合。来源于自定义工具库的参数可增加、删除和修改,来源于工具库的参数无法增加、删除和修改。", "combophasexpired": "组合工具已失效", - "pleasereedit": "请重新编辑后,提交审核", - "combop": { - "optype": "操作分类", - "editinfo": { - "optypetip": "查询类:在配置管理,具备‘只读’权限的资产,才可以作为执行目标;\n操作类:在配置管理,团体管理中具备‘自动化操作’权限的资产,才可以作为执行目标;" - } - } + "pleasereedit": "请重新编辑后,提交审核" }, "framework": { "roleauth": "创建完角色立即授权", diff --git a/src/views/pages/autoexec/detail/action-detail.vue b/src/views/pages/autoexec/detail/action-detail.vue index 20002734..85acb2eb 100644 --- a/src/views/pages/autoexec/detail/action-detail.vue +++ b/src/views/pages/autoexec/detail/action-detail.vue @@ -364,14 +364,14 @@ export default { }, opType: { type: 'radio', - label: this.$t('term.autoexec.combop.optype'), + label: this.$t('page.actiontype'), value: '', dataList: [], validateList: ['required'], onChange: (value, opt) => { _this.opTypeName = opt.text; }, - tooltip: this.$t('term.autoexec.combop.editinfo.optypetip'), + tooltip: this.$t('page.autoexeccombopeditinfooptypetip'), isHidden: true }, typeId: { diff --git a/src/views/pages/autoexec/detail/actionDetail/basic-info.vue b/src/views/pages/autoexec/detail/actionDetail/basic-info.vue index 29dc91a0..f1b07ab8 100644 --- a/src/views/pages/autoexec/detail/actionDetail/basic-info.vue +++ b/src/views/pages/autoexec/detail/actionDetail/basic-info.vue @@ -53,7 +53,7 @@ export default { name: 'opTypeName', value: '', maxlength: 50, - label: this.$t('page.combop.optype'), + label: this.$t('page.actiontype'), width: '100%', readonly: true, isHidden: this.isResourcecenterAuth diff --git a/src/views/pages/autoexec/manage/action-manage.vue b/src/views/pages/autoexec/manage/action-manage.vue index 88c1303f..cfffb58f 100644 --- a/src/views/pages/autoexec/manage/action-manage.vue +++ b/src/views/pages/autoexec/manage/action-manage.vue @@ -220,7 +220,7 @@ export default { }, opType: { type: 'radio', - label: this.$t('page.combop.optype'), + label: this.$t('page.actiontype'), value: '', dataList: [], validateList: ['required'] -- Gitee