diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue index 952e4d8..b4ae78e 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attributeCard.vue @@ -10,7 +10,10 @@
{{ valueTypeMap[property.value_type] }}
-
+
@@ -47,7 +50,7 @@ - + @@ -56,7 +59,7 @@ + + + + + + + \ No newline at end of file diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/index.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/index.vue index 3275e67..89241c6 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/index.vue @@ -25,47 +25,71 @@ class="ops-button-primary" >分组 - - + 属性库 - 导入 - - 导出 + + + + + + 导入 + + + + + + 导出 + + + +
- {{ g.name || '其他' }} + {{ g.name || '其他' }} ({{ g.ci_types.length }})
- + @@ -102,9 +126,9 @@
{{ ci.alias || ci.name }} - - - + + +
@@ -185,8 +209,12 @@
- 正序 - 倒序 + + 正序 + + + 倒序 +
@@ -230,6 +258,7 @@ + @@ -257,6 +286,7 @@ import IconArea from './iconArea.vue' import SplitPane from '@/components/SplitPane' import CMDBGrant from '../../components/cmdbGrant' import { ops_move_icon as OpsMoveIcon } from '@/core/icons' +import AttrbuteStore from './attrbuteStore.vue' export default { name: 'CITypes', @@ -270,6 +300,7 @@ export default { IconArea, SplitPane, OpsMoveIcon, + AttrbuteStore, }, data() { return { @@ -589,7 +620,6 @@ export default { } }, async handleChangeCITypes(e, g) { - console.log(111, g) if (g.id && g.id !== -1) { putCITypeGroupByGId(g.id, { name: g.name, type_ids: g.ci_types.map((i) => i.id) }) .then(() => { @@ -613,7 +643,6 @@ export default { const { type_id } = await createCIType(data).catch(() => { this.loading = false }) - console.log(111) this.$message.success(`添加成功`) if (this.selectGroup && this.selectGroup.id && this.selectGroup.id !== -1) { const ids = this.selectGroup.ci_types.map((i) => i.id) diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/newCiTypeAttrModal.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/newCiTypeAttrModal.vue index 46dcb1e..33981da 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/newCiTypeAttrModal.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/newCiTypeAttrModal.vue @@ -91,13 +91,8 @@ export default { }) }, }, - beforeMount() { - this.loadTotalAttrs() - }, methods: { async handleSubmit(isCloseModal = true) { - console.log(this.targetKeys) - if (this.activeKey === '2') { if (this.targetKeys.length) { this.confirmLoading = true @@ -125,6 +120,7 @@ export default { this.visible = true this.currentGroup = group this.activeKey = '1' + this.loadTotalAttrs() this.$nextTick(() => { this.$refs.createNewAttribute.checkCanDefineComputed() }) diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/triggerForm.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/triggerForm.vue index 9125d6d..5c84d13 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/triggerForm.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/triggerForm.vue @@ -90,7 +90,12 @@ export default { ) }, }, - inject: ['refresh'], + inject: { + refresh: { + from: 'refresh', + default: null, + }, + }, methods: { createFromTriggerTable(canAddTriggerAttr) { this.visible = true @@ -163,7 +168,9 @@ export default { await addTrigger(this.CITypeId, params) } this.handleCancel() - this.refresh() + if (this.refresh) { + this.refresh() + } } }) }, @@ -176,7 +183,9 @@ export default { deleteTrigger(that.CITypeId, that.triggerId).then(() => { that.$message.success('删除成功!') that.handleCancel() - that.refresh() + if (that.refresh) { + that.refresh() + } }) }, })