diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index 799e3091001bf161445163f6c0caadca4680268e..6dd26b8094410cbcddb35e890423eafd643aca50 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -163,7 +163,17 @@ "gotoresourcetypetreesetting": "Please set the root directory in Configuration Management - Asset List", "resourcebatchsearchtooltip": "Batch search is a keyword fuzzy search, in which the wildcard * is supported for batch search of IP, matching any character, such as 192.168.1.1, 192.168.12.1, and 192.168.123.1", "onlybackbone": "Show only backbone relationships", - "showallrel": "Show all branch relationships" + "showallrel": "Show all branch relationships", + "modemapping": "Model Mapping", + "ciconfignumber": "Number of configuration items", + "relaction": "Relationship strategy", + "attrmapping": "Attribute Mapping", + "addonedata": "Add a piece of data", + "addmoredata": "Add multiple pieces of data", + "addonerel": "Add a single relationship", + "addmorerel": "Add multiple relationships", + "rerunsteptosync": "Fallback Resync", + "rerunsteptosynctip": "After the process is rolled back, when it flows back to the current step, resynchronize" }, "process": { "workordercenter": "Work Center", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 6a20e01db81b2f086fa6923718bf9e4ccb111eb6..28f0280582e969349ce6b996463ebddc1354c424 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -163,7 +163,17 @@ "gotoresourcetypetreesetting": "请到配置管理-资产清单中设置根目录", "resourcebatchsearchtooltip": "批量搜索是关键字模糊搜索,其中批量搜索ip时,支持通配符*,匹配任意个字符,例如192.168.*.1可匹配192.168.1.1、192.168.12.1、192.168.123.1", "onlybackbone": "只显示主干关系", - "showallrel": "显示所有分支关系" + "showallrel": "显示所有分支关系", + "modemapping": "模型映射", + "ciconfignumber": "配置项数量", + "relaction": "关系策略", + "attrmapping": "属性映射", + "addonedata": "添加一条数据", + "addmoredata": "添加多条数据", + "addonerel": "添加单个关系", + "addmorerel": "添加多个关系", + "rerunsteptosync": "回退重新同步", + "rerunsteptosynctip": "流程回退后,再次流转至当前步骤时,重新同步" }, "process": { "workordercenter": "工单中心", diff --git a/src/resources/components/FormMaker/formedit/view/select.vue b/src/resources/components/FormMaker/formedit/view/select.vue index edf0a2b2fdbac013b4d1fa2bdd3a1991b3eb407c..1fdd13b4d1e2df51464cb9896787689392fbb3cf 100755 --- a/src/resources/components/FormMaker/formedit/view/select.vue +++ b/src/resources/components/FormMaker/formedit/view/select.vue @@ -107,7 +107,7 @@ export default { let param = { matrixUuid: config.matrixUuid, keywordColumn: config.mapping.text, - valueField: setting.mapping.value, + valueField: config.mapping.value, textField: config.mapping.text, needPage: false }; diff --git a/src/views/pages/cmdb/cientity/history-detail.vue b/src/views/pages/cmdb/cientity/history-detail.vue index d8cd0a21194614d139515905b875c50be40fef3e..87ef30e27ee3e88fb002a685ac6632567d4e53f7 100644 --- a/src/views/pages/cmdb/cientity/history-detail.vue +++ b/src/views/pages/cmdb/cientity/history-detail.vue @@ -97,7 +97,11 @@ export default { transactionId: { type: Number }, ciId: { type: Number }, ciEntityId: { type: Number }, - isShow: { type: Boolean } + isShow: { type: Boolean }, + isOpenNewPage: { //是否需要打开新窗口查看详情 + type: Boolean, + default: false + } }, data() { return { @@ -192,7 +196,11 @@ export default { }); }, toCiEntity(ciEntityId, ciId) { - this.$router.push({ path: '/ci/' + ciId + '/cientity-view/' + ciEntityId }); + if (this.isOpenNewPage) { + window.open(HOME + '/cmdb.html#/ci/' + ciId + '/cientity-view/' + ciEntityId, '_blank'); + } else { + this.$router.push({ path: '/ci/' + ciId + '/cientity-view/' + ciEntityId }); + } }, getAttrByCiId() { this.$api.cmdb.ci.getAttrByCiId(this.ciId).then(res => { diff --git a/src/views/pages/cmdb/flow/node/cmdbsync.vue b/src/views/pages/cmdb/flow/node/cmdbsync.vue new file mode 100644 index 0000000000000000000000000000000000000000..88c28f6f83b839a6c6774d2a72cf02843f2c093e --- /dev/null +++ b/src/views/pages/cmdb/flow/node/cmdbsync.vue @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/pages/cmdb/flow/node/index.js b/src/views/pages/cmdb/flow/node/index.js index f5eafcb8cdde05202f8fedb0f3789c1364845c68..9902aa71c6e6deffe6cf7281590a97b67a71b5ba 100644 --- a/src/views/pages/cmdb/flow/node/index.js +++ b/src/views/pages/cmdb/flow/node/index.js @@ -1,5 +1,6 @@ import cientitysync from './cientitysync.vue'; - +import cmdbsync from './cmdbsync.vue'; export default { - cientitysync + cientitysync, + cmdbsync }; diff --git a/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/cmdbsync-dialog.vue b/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/cmdbsync-dialog.vue new file mode 100644 index 0000000000000000000000000000000000000000..65bdfd320d00a36e475130fec69f5afb00882e5c --- /dev/null +++ b/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/cmdbsync-dialog.vue @@ -0,0 +1,705 @@ + + + + + + + + + + + + + {{ entity.ciLabel }}({{ entity.ciName }}) + + + + + {{ entity.ciLabel }}({{ entity.ciName }}) + + + + {{ entity.ciLabel }}({{ entity.ciName }}) + + + + + + + + + + + + + + + + + { + changePolicy(val) + }" + > + + + { + setConfig(val,'action') + }" + > + + + + { + setBatchDataSource(val,'attributeUuid') + }" + > + + + setBatchDataSource(val,'filterList')" + > + + + + + + + + + + + + + + {{ $t('page.cancel') }} + {{ $t('page.confirm') }} + {{ $t('page.save') }} + + + + + + diff --git a/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/cmdbsync-edit.vue b/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/cmdbsync-edit.vue new file mode 100644 index 0000000000000000000000000000000000000000..a9a651e6103cc4b58d1e78271ab2dbc822cf902e --- /dev/null +++ b/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/cmdbsync-edit.vue @@ -0,0 +1,654 @@ + + + + + + + {{ elementType.label }} + + + + + + + {{ e.element.direction === 'from' ? e.element.toLabel : e.element.fromLabel }} + + + + + {{ e.element.label }} + + + + + + + + + {{ $t('page.choose') }} + + + + + + + + + + + {{ relci.label }} + + + + + + + + { + element.stopPropagation(); + editNewRelEntity(relentity, e.element); + } + " + @on-close="delRelEntity('rel' + e.element.direction + '_' + e.element.id, relentity, ciEntityData || '')" + > + {{ relentity.ciEntityName }} + + + + + + { + changeMappingMode(val,e) + setConfig(val,'mappingMode',e) + }" + > + + + + + + + + { + if (opt) { + setGlobalAttrData(e.element, [opt], e); + } else { + setGlobalAttrData(e.element, [], e); + } + } + " + > + setGlobalAttrData(e.element, opt, e)" + > + + + setConfig(val,'valueList',e)" + > + + + + setConfig(val,'valueList',e)" + > + + + + + setConfig(val,'valueList',e)" + > + + + + setConfig(val,'column',e)" + > + + + + {{ $t('message.process.jobpolicycolumn') }} + + + + + A + + + B + + + C + + + + + + [A,B,C] + + + + + + + + + + + + setConfig(val,'filterList', e)" + > + + + + + + + + + + + + + diff --git a/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/filter-list.vue b/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/filter-list.vue new file mode 100644 index 0000000000000000000000000000000000000000..03b71101af23536d8f81d53fa7906988c0427aac --- /dev/null +++ b/src/views/pages/cmdb/flow/node/nodesetting/cmdbpolicy/filter-list.vue @@ -0,0 +1,157 @@ + + + + {{ $t('term.dashboard.datafilter') }} + + + + + + + + + + + + + + + + + + + diff --git a/src/views/pages/cmdb/flow/node/nodesetting/cmdbsync-setting.vue b/src/views/pages/cmdb/flow/node/nodesetting/cmdbsync-setting.vue new file mode 100644 index 0000000000000000000000000000000000000000..1f1142c5d89e0240fb6fc22d4ab2a61320079a61 --- /dev/null +++ b/src/views/pages/cmdb/flow/node/nodesetting/cmdbsync-setting.vue @@ -0,0 +1,176 @@ + + + + + + {{ $t('term.cmdb.rerunsteptosync') }} + + + + + + + + + + + + {{ $t('page.failurestrategy') }} + + + + + + + + {{ $t('term.cmdb.modemapping') }} + + {{ $t('page.edit') }} + + + {{ startCiEntity.ciLabel }} + ({{ startCiEntity.ciName }}) + + + {{ $t('form.validate.required', { target: $t('term.cmdb.modemapping') }) }} + + + + + + + diff --git a/src/views/pages/process/flow/flow-valid.js b/src/views/pages/process/flow/flow-valid.js index 574f3af65f972ce85a0c72f47356708ce6d65c19..60bef187025f7d98409d0168529a340d80a093f1 100644 --- a/src/views/pages/process/flow/flow-valid.js +++ b/src/views/pages/process/flow/flow-valid.js @@ -246,6 +246,26 @@ let valid = { } return validList; }, + cmdbsync(nodeConfig, d, that) { //cmdb + let validList = []; + let nodeData = nodeConfig.stepConfig || {}; + let ciEntityConfig = nodeData.ciEntityConfig || {}; + if (nodeConfig.handler === 'cmdbsync') { + if (!ciEntityConfig.failPolicy) { + validList.push({ + name: $t('form.validate.required', { target: $t('page.failurestrategy') }), + href: '#ciEntityConfig' + }); + } + if (that.$utils.isEmpty(ciEntityConfig.configList)) { + validList.push({ + name: $t('form.validate.required', { target: $t('term.cmdb.modemapping') }), + href: '#ciEntityConfig' + }); + } + } + return validList; + }, autoexec(nodeConfig, d, that) { //自动化节点 let validList = []; let nodeData = nodeConfig.stepConfig || {}; diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/notice-setting.vue b/src/views/pages/process/flow/flowedit/components/nodesetting/notice-setting.vue index 53db2073ed91f8d8db2014a3528fcafedfe7df90..3abe153ab921b900f5a583bbd350518b1ed9a1fe 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/notice-setting.vue +++ b/src/views/pages/process/flow/flowedit/components/nodesetting/notice-setting.vue @@ -213,7 +213,7 @@ export default { paramMappingList: this.notifyPolicyConfig.paramMappingList || [], excludeTriggerList: this.notifyPolicyConfig.excludeTriggerList || [] }; - if (this.notifyPolicyConfig.hasOwnProperty('policyId')) { + if (this.notifyPolicyConfig.hasOwnProperty('policyId') && this.notifyPolicyConfig.policyId) { this.$set(data, 'policyId', this.notifyPolicyConfig.policyId); } if (this.notifyPolicyConfig.hasOwnProperty('policyName')) { diff --git a/src/views/pages/process/task/processdetail/index.js b/src/views/pages/process/task/processdetail/index.js index c4b086911e489fe82fb3cbed3fc721e06ccba4d0..09733d7199c27c21e438092945e38a91834fa282 100644 --- a/src/views/pages/process/task/processdetail/index.js +++ b/src/views/pages/process/task/processdetail/index.js @@ -5,6 +5,7 @@ import changehandle from './process-changehandle'; import event from './process-event'; //事件 import autoexec from './process-autoexec'; import timer from './process-timer'; +import cmdbsync from './process-cmdbsync'; export default { omnipotent, automatic, @@ -12,5 +13,6 @@ export default { changehandle, event, autoexec, - timer + timer, + cmdbsync }; diff --git a/src/views/pages/process/task/processdetail/process-cmdbsync.vue b/src/views/pages/process/task/processdetail/process-cmdbsync.vue new file mode 100644 index 0000000000000000000000000000000000000000..24c4da06611cf1e0d81311f8f481b6ec560fb43f --- /dev/null +++ b/src/views/pages/process/task/processdetail/process-cmdbsync.vue @@ -0,0 +1,635 @@ + + + + + + {{ $getFromPage(prevPath.name) }} + + + + + + + + {{ actionConfig.start }} + + + {{ actionConfig.accept }} + + + {{ actionConfig.save }} + + + {{ actionConfig.transfer }} + + + {{ actionConfig.pause }} + + {{ actionConfig.recover }} + + + + + + + + + + + + + + + + + + + + + + + {{ actionConfig.retreat }} + + + + + {{ actionConfig.tranferreport }} + + + + {{ actionConfig.abortprocessTask }} + + + + + {{ actionConfig.recoverprocessTask }} + + + + + {{ actionConfig.urge }} + + + + + {{ actionConfig.copyprocesstask }} + + + + + + + + {{ actionConfig.back }} + + + {{ actionConfig.back }} + + + + + + {{ actionConfig.complete }} + + + {{ nextStepList[0].aliasName || actionConfig.complete }} + + + + + + {{ actionConfig.redo }} + + + + + + + + + + + + + taskAlertHeight = taskHeight"> + + + + + { + isDisableCommet = val + }" + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('page.validate') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('term.process.pleselectprioritystep') }} + + {{ st.name }} + + + + + + + + + + + {selecStep(val, 'back')}"> + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue b/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue index 10f52999db5d27c36efa72a4df544fe64bf27041..dee0aaeb906bc85ebf1e144ccf94b592c6d9d548 100644 --- a/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue +++ b/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue @@ -129,6 +129,19 @@ + + + + + + + + + + {{ item.label }} + + + + + + {{ item.label }} @@ -444,7 +466,8 @@ export default { reportingHistory: true, changeDetails: true, autoexec: true, - automatic: true // 自动处理节点 + automatic: true, // 自动处理节点 + cmdbsync: true }, loadingShow: false, // 解决固定页面之后,tab的顺序改变了,不是渲染前的顺序 fixedPageList: [], diff --git a/src/views/pages/process/task/processdetail/workorder/activity/item/cmdbsyncmessage-handler.vue b/src/views/pages/process/task/processdetail/workorder/activity/item/cmdbsyncmessage-handler.vue new file mode 100644 index 0000000000000000000000000000000000000000..49466e004800422b13397c4d0edcde01a6ab44a3 --- /dev/null +++ b/src/views/pages/process/task/processdetail/workorder/activity/item/cmdbsyncmessage-handler.vue @@ -0,0 +1,46 @@ + + + + + + + diff --git a/src/views/pages/process/task/processdetail/workorder/activity/item/index.js b/src/views/pages/process/task/processdetail/workorder/activity/item/index.js index d030ef3d7d462b6736dd21516d821f81af597ac6..4c604232e1e4f2b31ad966264b3f7a9080e0fb22 100644 --- a/src/views/pages/process/task/processdetail/workorder/activity/item/index.js +++ b/src/views/pages/process/task/processdetail/workorder/activity/item/index.js @@ -17,6 +17,7 @@ import changestepinfoHandler from './list-handler'; import eventinfoHandler from './list-handler'; import focususerHandler from './focususer-handler'; import automaticinfoHandler from './automaticinfo-handler'; +import cmdbsyncmessageHandler from './cmdbsyncmessage-handler'; export default { defaultHandler, //默认活动展示 @@ -37,5 +38,6 @@ export default { changestepinfoHandler, //变更步骤 eventinfoHandler, //事件 focususerHandler, //修改工单关注人 - automaticinfoHandler + automaticinfoHandler, + cmdbsyncmessageHandler }; diff --git a/src/views/pages/process/task/processdetail/workorder/cmdbsync/cmdbsync-detail.vue b/src/views/pages/process/task/processdetail/workorder/cmdbsync/cmdbsync-detail.vue new file mode 100644 index 0000000000000000000000000000000000000000..1cb29806f1300d0f3cd079476631dd60719995f8 --- /dev/null +++ b/src/views/pages/process/task/processdetail/workorder/cmdbsync/cmdbsync-detail.vue @@ -0,0 +1,147 @@ + + + + + + {{ $t('dialog.title.createtarget',{'target':$t('page.fail')}) }}:{{ e.error.length > 500 && !e.isMore? e.error.slice(0,500) : e.error }} + {{ !e.isMore?$t('page.viewmore'):$t('page.packup') }} + + + + + + + + + + {{ row.ciLabel }} + ({{ row.ciName }}) + + + + + + + + + {{ row.statusText }} + {{ row.statusText }} + + + + + {{ row.createTime | formatDate }} + + + + + + + + + + + {{ row.commitTime | formatDate }} + + + + + + + + + + + 配置项详情 + + + + + + + + + diff --git a/src/views/pages/process/task/processdetail/workorder/taskstep/item/cmdbsync.vue b/src/views/pages/process/task/processdetail/workorder/taskstep/item/cmdbsync.vue new file mode 100644 index 0000000000000000000000000000000000000000..6f9e6b862d3650f8d0fac80ceaa55b7bd5fb3af4 --- /dev/null +++ b/src/views/pages/process/task/processdetail/workorder/taskstep/item/cmdbsync.vue @@ -0,0 +1,73 @@ + + + + + {{ time | formatDate }} + + + + + + + + {{ t.time | formatDate }} + + + + + + + + + + + + + diff --git a/src/views/pages/process/task/processdetail/workorder/taskstep/item/index.js b/src/views/pages/process/task/processdetail/workorder/taskstep/item/index.js index 7b9563de1436349958f93b04aa9c067fe7e884a9..ab7545501d1a52c5a01fd5a268203168ab5d54c0 100644 --- a/src/views/pages/process/task/processdetail/workorder/taskstep/item/index.js +++ b/src/views/pages/process/task/processdetail/workorder/taskstep/item/index.js @@ -2,10 +2,11 @@ import common from './common.vue'; import automatic from './automatic.vue'; import stepLogCommon from './step-log-common.vue'; import cmdb from '@/views/pages/cmdb/task/processdetail/workorder/taskstep/index.js'; - +import cmdbsync from './cmdbsync.vue'; export default { common, automatic, ...cmdb, - stepLogCommon + stepLogCommon, + cmdbsync }; diff --git a/src/views/pages/process/task/processdispatch/workorder/base-setting.vue b/src/views/pages/process/task/processdispatch/workorder/base-setting.vue index 468ed5fca8f61ed950fa10d1888eec66fa390598..18fb76b6e694642c7e39e64bfd232ccca9a2c414 100644 --- a/src/views/pages/process/task/processdispatch/workorder/base-setting.vue +++ b/src/views/pages/process/task/processdispatch/workorder/base-setting.vue @@ -253,8 +253,6 @@ export default { if (res.Status == 'OK') { this.knowledgeList = res.Return.dataList; } - }).catch(error => { - this.$Message.error(this.$t('message.failed'), {taregt: this.$t('term.process.relateknowledge')}); }); }, createContent(index, title) {
{{ $t('page.validate') }}
{{ $t('term.process.pleselectprioritystep') }}