diff --git a/src/resources/api/cmdb/resource/applicationManage/applicationManage.js b/src/resources/api/cmdb/resource/applicationManage/applicationManage.js
index ec520e3f0d95b8f61b0925968fdf195621c6c13c..b8a9f4996c8dca2a44c84b3fe9cb620e95a631cd 100644
--- a/src/resources/api/cmdb/resource/applicationManage/applicationManage.js
+++ b/src/resources/api/cmdb/resource/applicationManage/applicationManage.js
@@ -39,6 +39,18 @@ const applicationManage = {
getAppmoduleById(params) {
// 根据模块id,获取模块信息
return axios.post('api/rest/resourcecenter/appmodule/get', params);
+ },
+ getApplicationlistSetting() { //获取应用清单显示设置
+ return axios.post('/api/rest/resourcecenter/applicationlist/display/get', {});
+ },
+ saveApplicationlistSetting(params) { //保存应用清单显示设置
+ return axios.post('/api/rest/resourcecenter/applicationlist/display/save', params);
+ },
+ getAppResourceList(params) {
+ return axios.post('/api/rest/resourcecenter/app/resource/list', params);
+ },
+ getAppAssetTheadlist() {
+ return axios.post('/api/rest/resourcecenter/app/assetlist/theadlist', {});
}
};
export default applicationManage;
diff --git a/src/resources/api/cmdb/resource/resourceentity/resourceentity.js b/src/resources/api/cmdb/resource/resourceentity/resourceentity.js
index d0a043521a117efd53abcb39d755356c5faf7c20..cd4416dd2f5a4b1a5d91580f76c282318ec0e513 100644
--- a/src/resources/api/cmdb/resource/resourceentity/resourceentity.js
+++ b/src/resources/api/cmdb/resource/resourceentity/resourceentity.js
@@ -14,6 +14,18 @@ const resourceentity = {
},
getResourceEntityViewDataList(params) {
return axios.post('/api/rest/resourcecenter/resourceentity/viewdata/list', params);
+ },
+ getAssetlist() {
+ return axios.post('/api/rest/resourcecenter/assetlist/display/get', {});
+ },
+ getResourcetypeTree(params) {
+ return axios.post('/api/rest/resourcecenter/resourcetype/listtree', params);
+ },
+ saveAssetlistData(params) {
+ return axios.post('/api/rest/resourcecenter/assetlist/display/save', params);
+ },
+ deleteResourceentityData(params) {
+ return axios.post('/api/rest/resourcecenter/resourceentity/delete', params);
}
};
export default resourceentity;
diff --git a/src/resources/api/inspect/applicationInspect/applicationInspect.js b/src/resources/api/inspect/applicationInspect/applicationInspect.js
index 1b5de9dde3123788b544571f30c607ce3ae5070b..d63548137e7d1efa9ad9dd651b44f9c6eb990300 100644
--- a/src/resources/api/inspect/applicationInspect/applicationInspect.js
+++ b/src/resources/api/inspect/applicationInspect/applicationInspect.js
@@ -5,6 +5,10 @@ const applicationInspect = {
// 获取应用巡检列表
return axios.post('/api/rest/inspect/appmodule/report/search', params);
},
+ getNewapplicationInspectList(params) {
+ // 获取新的应用巡检列表
+ return axios.post('/api/rest/inspect/app/resource/list', params);
+ },
getResourceTypeList(params) {
// 发起应用巡检
return axios.post('/api/rest/resourcecenter/appmodule/resource/type/list', params);
diff --git a/src/resources/assets/css/theme.less b/src/resources/assets/css/theme.less
index 8e600bb3a5d396aa4da6893f12073ac404f6d35e..1e11750b45e84ee48c75bae3c0f03fb5cf0f7ff9 100644
--- a/src/resources/assets/css/theme.less
+++ b/src/resources/assets/css/theme.less
@@ -3393,6 +3393,8 @@
//Tabs
.@{iv-prev}tabs {
+ border-spacing: 0px; //表格组件边框间距问题
+
.@{iv-prev}tabs-bar {
border-color: var(--dividing-color, @dividing-color);
}
diff --git a/src/resources/plugins/TsForm/TsFormTree.vue b/src/resources/plugins/TsForm/TsFormTree.vue
index 0b5947666839ca9c17b7ba2213877c2c4a7b8bb2..83ced231ff22e4effcfba86156e1735f7267320b 100755
--- a/src/resources/plugins/TsForm/TsFormTree.vue
+++ b/src/resources/plugins/TsForm/TsFormTree.vue
@@ -441,7 +441,7 @@ export default {
let label = this.multiple ? this.selectedList.map(s => s[this.textName])
: this.selectedList.length > 0 ? this.selectedList[0][this.textName] : '';
let valueObject = this.selectedList.map((item) => {
- return { 'value': item[this.valueName], 'text': item[this.textName] };
+ return { ...item || {}, 'value': item[this.valueName], 'text': item[this.textName] };
});
valueObject = this.multiple ? valueObject : (valueObject[0] || {});
this.$emit('change', this.currentValue, valueObject);
diff --git a/src/views/pages/cmdb/application/application-manage.vue b/src/views/pages/cmdb/application/application-manage.vue
index 4558fa4520ad2c6d9ff4d39ab14b296dc23eddec..9fb6c635346babe517bc7ed46a516f22da4eaec7 100644
--- a/src/views/pages/cmdb/application/application-manage.vue
+++ b/src/views/pages/cmdb/application/application-manage.vue
@@ -5,6 +5,7 @@
{{ $t('page.apply') }}
{{ $t('page.module') }}
+ {{ $t('page.setting') }}
@@ -31,6 +32,7 @@
+
+
diff --git a/src/views/pages/cmdb/asset/components/tree-edit.vue b/src/views/pages/cmdb/asset/components/tree-edit.vue
index 05f909f60010662a9ca87fbcc7de41494cc63a7f..cb25c3c7fd80121fc832a45c6edcb6ba9ce362bc 100644
--- a/src/views/pages/cmdb/asset/components/tree-edit.vue
+++ b/src/views/pages/cmdb/asset/components/tree-edit.vue
@@ -1,14 +1,20 @@
-
-
+
-
-
{{ $t('term.cmdb.resourcetypetreenosettingdesc') }}
-
-
{{ $t('term.cmdb.gotoresourceentitymanagepage') }}
+
-
-
@@ -20,7 +26,8 @@
export default {
name: '',
components: {
- TsForm: () => import('@/resources/plugins/TsForm/TsForm')
+ TsFormTree: () => import('@/resources/plugins/TsForm/TsFormTree'),
+ TsFormItem: () => import('@/resources/plugins/TsForm/TsFormItem')
},
props: {
ciId: {
@@ -28,58 +35,46 @@ export default {
}
},
data() {
- const _this = this;
return {
- formData: {
- ciId: this.ciId
- },
- topCi: {
- id: null,
- name: null,
- label: null
- },
+ isReady: false,
+ isSaveLoading: false,
+ id: null,
+ formData: {},
dialogConfig: {
title: this.$t('page.setting'),
type: 'modal',
maskClose: false,
isShow: true,
- width: 'small'
+ width: 'medium'
},
- formConfig: [
- {
- name: 'ciId',
- _belong: 'realci',
- type: 'tree',
- label: this.$t('term.cmdb.ci'),
- value: this.ciId,
- width: '100%',
- validateList: ['required'],
- url: 'api/rest/cmdb/ci/listtree',
- params: { rootCiId: null },
- valueName: 'id',
- textName: 'label',
- transfer: true,
- showPath: true,
- desc: '',
- onChange: name => {
- if (name) {
- this.$set(_this.formData, 'ciId', name);
- } else {
- this.$set(_this.formData, 'ciId', null);
- }
- }
- }
- ]
+ treeConfig: {
+ name: 'rootCiName',
+ type: 'tree',
+ placeholder: '选择根模型',
+ width: '100%',
+ validateList: ['required'],
+ value: '',
+ dataList: [],
+ valueName: 'name',
+ textName: 'label',
+ transfer: true,
+ showPath: true,
+ search: true,
+ border: 'border'
+ }
};
},
beforCreate() {
},
- async created() {
- await this.getResourceEntity();
- },
+ created() {},
beforeMount() {},
- mounted() {
-
+ async mounted() {
+ await this.getResourcetypeTree();
+ if (!this.$utils.isEmpty(this.tbodyList)) {
+ this.getResourceEntity();
+ } else {
+ this.isReady = true;
+ }
},
beforedUpdate() {},
updated() {},
@@ -88,41 +83,53 @@ export default {
beforeDestroy() {},
destroyed() {},
methods: {
- async getResourceEntity() {
- await this.$api.cmdb.resourceentity.getResourceEntity('scence_ipobject_detail').then(res => {
+ getResourcetypeTree() {
+ return this.$api.cmdb.resourceentity.getResourcetypeTree().then(res => {
if (res.Status == 'OK') {
- this.topCi = res.Return?.ci;
- if (this.topCi) {
- if (this.topCi.id) {
- this.$set(this.formConfig[0].params, 'rootCiId', this.topCi.id);
- if (this.ciId == null) {
- this.$set(this.formConfig[0], 'value', this.topCi.id);
- this.$set(this.formData, 'ciId', this.topCi.id);
- }
- }
- this.$set(this.formConfig[0], 'desc', this.$t('term.cmdb.resourcetypetreesettingdesc'));
- // this.$set(this.formConfig[0], 'desc', this.$t('term.cmdb.resourcetypetreesettingdesc', { label: this.topCi.label, name: this.topCi.name }));
- }
+ this.tbodyList = res.Return.tbodyList || [];
+ this.treeConfig.dataList = this.tbodyList;
}
});
},
+ getResourceEntity() {
+ this.$api.cmdb.resourceentity.getAssetlist().then(res => {
+ if (res.Status == 'OK' && res.Return) {
+ this.id = res.Return.id;
+ this.$set(this.formData, 'rootCiName', res.Return.rootCiName || '');
+ }
+ }).finally(() => {
+ this.$nextTick(() => {
+ this.isReady = true;
+ });
+ });
+ },
close(action) {
this.$emit('close', action);
},
save() {
- const form = this.$refs['form'];
- if (!form.valid()) {
- return false;
- }
- if (this.ciId == this.formData.ciId) {
- this.close();
+ const formItems = this.$refs;
+ let isValid = true;
+ Object.keys(formItems).forEach(key => {
+ if (formItems[key].valid && !formItems[key].valid()) {
+ isValid = false;
+ }
+ });
+ if (!isValid) {
return false;
}
- this.$api.cmdb.asset.saveResourceType(this.formData).then(res => {
+ this.isSaveLoading = true;
+ let data = {
+ id: this.id,
+ rootCiName: this.formData.rootCiName,
+ config: {}
+ };
+ this.$api.cmdb.resourceentity.saveAssetlistData(data).then(res => {
if (res.Status == 'OK') {
this.$Message.success(this.$t('message.savesuccess'));
this.close('refresh');
}
+ }).finally(() => {
+ this.isSaveLoading = false;
});
},
gotoResourceentityManagePage() {
diff --git a/src/views/pages/cmdb/resourceentity/ci/ci-setting.vue b/src/views/pages/cmdb/resourceentity/ci/ci-setting.vue
new file mode 100644
index 0000000000000000000000000000000000000000..a4d70e38bf458ea50969c217c319284500831050
--- /dev/null
+++ b/src/views/pages/cmdb/resourceentity/ci/ci-setting.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+ {
+ changeCiName(selectItem, cd);
+ }"
+ >
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/cmdb/resourceentity/ci/ci-tree.vue b/src/views/pages/cmdb/resourceentity/ci/ci-tree.vue
new file mode 100644
index 0000000000000000000000000000000000000000..70ee5408eaa5cf47b7c9bbc3c5e4f2a2bf02c64c
--- /dev/null
+++ b/src/views/pages/cmdb/resourceentity/ci/ci-tree.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+ {
+ changeCiName(selectItem, cd);
+ }"
+ >
+
+
+
+
+
+ - 下级
+ - {{ $t('page.delete') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/cmdb/resourceentity/mapping-setting.vue b/src/views/pages/cmdb/resourceentity/mapping-setting.vue
index 9577b4f6f1d78a7a9b526271f72fc44c51724dda..9ef78a7cb67c94be24c464241e3f64e270237743 100644
--- a/src/views/pages/cmdb/resourceentity/mapping-setting.vue
+++ b/src/views/pages/cmdb/resourceentity/mapping-setting.vue
@@ -27,6 +27,7 @@
ref="item"
:item="item"
:mainCi="mainCi"
+ :ciList="ciList"
@change="(val,attr)=>{setConfig(val, attr, item)}"
>
@@ -44,10 +45,14 @@ export default {
TsFormTree: () => import('@/resources/plugins/TsForm/TsFormTree')
},
props: {
- data: Object,
+ resourceEntityData: Object,
mainCi: {
type: String,
default: ''
+ },
+ ciList: {
+ type: Array,
+ default: () => []
}
},
data() {
@@ -71,6 +76,10 @@ export default {
text: this.$t('term.cmdb.globalattr'),
value: 'globalAttr'
},
+ {
+ text: '新关系',
+ value: 'newRel'
+ },
{
text: this.$t('term.expression.empty'),
value: 'empty'
@@ -95,11 +104,11 @@ export default {
methods: {
init() {
this.list = [];
- if (this.data) {
- this.fieldList = this.data.fieldList || [];
- if (this.data.config && !this.$utils.isEmpty(this.data.config.fieldMappingList)) {
+ if (this.resourceEntityData) {
+ this.fieldList = this.resourceEntityData.fieldList || [];
+ if (this.resourceEntityData.config && !this.$utils.isEmpty(this.resourceEntityData.config.fieldMappingList)) {
this.fieldList.forEach(item => {
- let findItem = this.data.config.fieldMappingList.find(f => f.field === item.value);
+ let findItem = this.resourceEntityData.config.fieldMappingList.find(f => f.field === item.value);
if (findItem) {
this.list.push(findItem);
} else {
@@ -145,7 +154,29 @@ export default {
type: ''
});
});
+ },
+ updatedNewRelItem() { //更新新关系字段时更新list
+ if (!this.$utils.isEmpty(this.list)) {
+ this.list = this.list.map(item => {
+ if (item.type === 'newRel') {
+ return {
+ field: item.field,
+ type: ''
+ };
+ } else {
+ return item;
+ }
+ });
+ this.list.forEach(item => {
+ if (item.type === 'newRel') {
+ this.$set(item, 'ci', '');
+ this.$set(item, 'rel', '');
+ this.$set(item, 'attr', '');
+ }
+ });
+ }
}
+
},
filter: {},
computed: {
@@ -153,7 +184,7 @@ export default {
return (name) => {
let text = '';
if (this.fieldList) {
- let findItem = this.data.fieldList.find(item => item.value === name);
+ let findItem = this.resourceEntityData.fieldList.find(item => item.value === name);
if (findItem) {
text = findItem.text;
}
@@ -180,6 +211,15 @@ export default {
}
},
immediate: true
+ },
+ ciList: {
+ handler(val) {
+ if (!this.$utils.isSame(val, this.initCiList)) {
+ this.initCiList = this.$utils.deepClone(val);
+ this.updatedNewRelItem();
+ }
+ },
+ deep: true
}
}
};
diff --git a/src/views/pages/cmdb/resourceentity/resourceentity-edit.vue b/src/views/pages/cmdb/resourceentity/resourceentity-edit.vue
index 9732628f1c1d0ab90cb953c1dfb2455636c99a3c..02592a0f870661b5cc807f1bf00afbe33e99a5de 100644
--- a/src/views/pages/cmdb/resourceentity/resourceentity-edit.vue
+++ b/src/views/pages/cmdb/resourceentity/resourceentity-edit.vue
@@ -4,6 +4,7 @@
@on-close="close()"
>
+
-->
+
+ {
+ changeSceneTemplateName(selectItem);
+ }"
+ >
+
-
-
+
+
@@ -45,12 +53,18 @@ export default {
components: {
TsForm: () => import('@/resources/plugins/TsForm/TsForm'),
// TsCodemirror:()=>import('@/resources/plugins/TsCodemirror/TsCodemirror.vue'),
- TsFormTree: () => import('@/resources/plugins/TsForm/TsFormTree'),
- MappingSetting: () => import('./mapping-setting.vue')
+ TsFormSelect: () => import('@/resources/plugins/TsForm/TsFormSelect'),
+ MappingSetting: () => import('./mapping-setting.vue'),
+ CiSetting: () => import('./ci/ci-setting.vue')
+ },
+ props: {
+ name: {type: String},
+ isCopy: {type: Boolean}
},
- props: {name: {type: String}},
data() {
return {
+ loadingShow: true,
+ isReady: false,
resourceEntityData: {},
dialogConfig: {
title: this.$t('term.cmdb.viewsetting'),
@@ -63,7 +77,8 @@ export default {
name: 'name',
label: this.$t('term.cmdb.view'),
type: 'text',
- readonly: true
+ readonly: true,
+ validateList: ['required', 'unique_ident', { name: 'searchUrl', url: '/api/rest/resourcecenter/resourceentity/save', key: 'name' }]
},
{
name: 'label',
@@ -82,6 +97,12 @@ export default {
// label: this.$t('page.config'),
// type: 'slot'
// },
+ {
+ name: 'sceneTemplateName',
+ label: this.$t('page.template'),
+ type: 'slot',
+ validateList: ['required']
+ },
{
name: 'mainCi',
label: this.$t('term.cmdb.mainci'),
@@ -96,7 +117,16 @@ export default {
transfer: true,
showPath: true,
validateList: ['required']
- }
+ },
+ sceneTemplateNameConfig: {
+ dynamicUrl: '/api/rest/resourcecenter/suportmultipleview/scenetemplate',
+ rootName: 'tbodyList',
+ textName: 'label',
+ valueName: 'name',
+ validateList: ['required'],
+ transfer: true
+ },
+ ciList: []
};
},
beforeCreate() {},
@@ -113,19 +143,78 @@ export default {
methods: {
getResourceEntityData() {
if (this.name) {
+ this.formConfig.forEach(item => {
+ if (item.hasOwnProperty('readonly') && (['label', 'description'].includes(item.name) || this.isCopy)) {
+ this.$set(item, 'readonly', false);
+ }
+ });
this.$api.cmdb.resourceentity.getResourceEntity(this.name).then(res => {
this.resourceEntityData = res.Return || {};
if (!this.resourceEntityData.config) {
this.$set(this.resourceEntityData, 'config', {});
this.$set(this.resourceEntityData.config, 'mainCi', '');
+ this.ciList = [];
+ } else {
+ if (!this.$utils.isEmpty(this.resourceEntityData.config.relNode)) {
+ this.ciList = [{
+ ...this.resourceEntityData.config.relNode
+ }];
+ } else if (this.resourceEntityData.config.mainCi) {
+ this.ciList = [{
+ uuid: this.$utils.setUuid(),
+ ciName: this.resourceEntityData.config.mainCi,
+ ciLabel: this.resourceEntityData.config.mainCi,
+ children: []
+ }];
+ } else {
+ this.ciList = [];
+ }
+ }
+ if (!this.resourceEntityData.isMultiple) {
+ let findItem = this.formConfig.find(item => item.name === 'sceneTemplateName');
+ if (findItem) {
+ this.$set(findItem, 'isHidden', true);
+ }
+ }
+ if (this.isCopy) {
+ this.$set(this.resourceEntityData, 'name', this.resourceEntityData.name + '_copy');
}
+ }).finally(() => {
+ this.isReady = true;
+ this.loadingShow = false;
});
+ } else {
+ //新增
+ this.formConfig.forEach(item => {
+ if (item.hasOwnProperty('readonly')) {
+ this.$set(item, 'readonly', false);
+ }
+ });
+ this.resourceEntityData = {
+ name: '',
+ label: '',
+ description: '',
+ fieldList: [],
+ config: {
+ sceneTemplateName: '',
+ mainCi: '',
+ fieldMappingList: []
+ }
+ };
+ this.ciList = [{
+ uuid: this.$utils.setUuid(),
+ ciName: '',
+ ciLabel: '',
+ children: []
+ }];
+ this.isReady = true;
+ this.loadingShow = false;
}
},
save() {
// console.log(JSON.stringify(this.resourceEntityData, null, 2));
let isValid = true;
- isValid = this.$refs.mainCi.valid() && isValid;
+ isValid = this.$refs.ciSetting.valid() && isValid;
isValid = this.$refs.mappingSetting.valid() && isValid;
if (!isValid) {
return;
@@ -139,6 +228,7 @@ export default {
}
});
this.$set(this.resourceEntityData.config, 'fieldMappingList', fieldMappingList);
+ this.$set(this.resourceEntityData.config, 'relNode', this.ciList[0]);
this.$api.cmdb.resourceentity.saveResourceEntity(this.resourceEntityData).then(res => {
if (res.Status == 'OK') {
this.$Message.success(this.$t('message.savesuccess'));
@@ -148,6 +238,18 @@ export default {
},
close(needRefresh) {
this.$emit('close', needRefresh);
+ },
+ updateCiList(list) {
+ this.$set(this.resourceEntityData.config, 'mainCi', list[0].ciName);
+ this.ciList = this.$utils.deepClone(list);
+ },
+ changeSceneTemplateName(selectItem) {
+ this.isReady = false;
+ this.$set(this.resourceEntityData, 'fieldList', selectItem && selectItem.fieldList || []);
+ this.$set(this.resourceEntityData.config, 'fieldMappingList', []);
+ this.$nextTick(() => {
+ this.isReady = true;
+ });
}
},
filter: {},
diff --git a/src/views/pages/cmdb/resourceentity/resourceentity-manage.vue b/src/views/pages/cmdb/resourceentity/resourceentity-manage.vue
index c0233670bbd841781ab73c9fc356318f8e7f6bb6..c2f9991aaa8ca3909e64c7d22e533348e9d9cd67 100644
--- a/src/views/pages/cmdb/resourceentity/resourceentity-manage.vue
+++ b/src/views/pages/cmdb/resourceentity/resourceentity-manage.vue
@@ -1,159 +1,200 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ row.name }}
-
-
- {{ $t('page.exception') }}
-
-
-
-
- {{ row.error }}
-
-
-
- {{ $t('page.pending') }}
- {{ $t('page.notbuild') }}
-
-
-
-
- - {{ $t('page.viewdata') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ $t('term.cmdb.view') }}
+
+
+
+
+
+
+
+ {{ row.name }}
+
+
+ {{ $t('page.exception') }}
+
+
+
+
+ {{ row.error }}
+
+
+
+ {{ $t('page.pending') }}
+ {{ $t('page.notbuild') }}
+
+
+
+
+ - {{ $t('page.copy') }}
+ - {{ $t('page.delete') }}
+ - {{ $t('page.viewdata') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/index.js b/src/views/pages/cmdb/resourceentity/typecomponent/index.js
index 6561dd993ff7512d27da596de01bbf7fb0e511b9..9d0429dcbc59b66fffc74393fae9837294f4b403 100644
--- a/src/views/pages/cmdb/resourceentity/typecomponent/index.js
+++ b/src/views/pages/cmdb/resourceentity/typecomponent/index.js
@@ -2,9 +2,11 @@ import constType from './const-type.vue';
import attrType from './attr-type.vue';
import relType from './rel-type.vue';
import globalAttrType from './globalattr-type.vue';
+import newRelType from './newrel-type.vue';
export default {
constType,
attrType,
relType,
- globalAttrType
+ globalAttrType,
+ newRelType
};
diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/newrel-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/newrel-type.vue
new file mode 100644
index 0000000000000000000000000000000000000000..44a8827017f94e8e9221944484898a4886cf1e43
--- /dev/null
+++ b/src/views/pages/cmdb/resourceentity/typecomponent/newrel-type.vue
@@ -0,0 +1,156 @@
+
+
+ {
+ changeCi(selectItem, item);
+ }"
+ >
+
+
+
+
+
+
+
diff --git a/src/views/pages/inspect/application/application-manage.vue b/src/views/pages/inspect/application/application-manage.vue
index eb0fbd31e342ccf13e4376d8679b4c0cd0322004..d44fa355d1467f4dc9eb136433e30c5ca22195ac 100644
--- a/src/views/pages/inspect/application/application-manage.vue
+++ b/src/views/pages/inspect/application/application-manage.vue
@@ -151,9 +151,9 @@ export default {
AppModuleEditDialog: () => import('@/views/pages/cmdb/application/appmodule-edit-dialog.vue'),
DeleteCiEntityDialog: () => import('@/views/pages/cmdb/cientity/cientity-delete-dialog.vue'),
InspectionScheduleDialog: () => import('./inspection-schedule-dialog.vue'),
- InspectionAssetsManage: () => import('@/views/pages/inspect/application/inspection-assets-manage'), // 资产清单
AppModuleTree: () => import('@/views/pages/cmdb/application/app-module-tree'), // 应用模块树
LatestQuestionsManage: () => import('./latest-questions-manage'), // 最新问题
+ InspectionAssetsManage: () => import('./inspection-assets-manage'), // 资产清单
BatchSystemInspectionDialog: () => import('./batch-system-inspection-dialog'), // 批量应用巡检
BatchModuleInspectionDialog: () => import('./batch-module-inspection-dialog') // 批量模块巡检
},
diff --git a/src/views/pages/inspect/application/inspection-assets-manage.vue b/src/views/pages/inspect/application/inspection-assets-manage.vue
index de243cacc1a082b63596182c8e7653909c63ca4a..718e948372955eb85c317a2651df3dbcd407c443 100644
--- a/src/views/pages/inspect/application/inspection-assets-manage.vue
+++ b/src/views/pages/inspect/application/inspection-assets-manage.vue
@@ -1,337 +1,457 @@
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
{{ item.type.label }}
-
changeCurrent(currentPage, item, index)"
- @changePageSize="(pageSize) => changePageSize(pageSize,item, index)"
- >
-
-
- {{ row.ip }}
- :{{ row.port }}
-
-
-
-
-
- {{ row.monitorStatusJson.text }}
-
- {{ handleTimes(row.monitorTime) | formatTimeCost({unitNumber: 1, language: 'zh',unit: 'minute'}) }} {{ $t('page.before') }}
-
-
-
- -
-
-
-
-
-
- {{ row.inspectStatusJson.text }}
-
- {{ handleTimes(row.inspectTime) | formatTimeCost({unitNumber: 1, language: 'zh',unit: 'minute'}) }} {{ $t('page.before') }}
-
-
- -
-
-
-
-
-
-
-
-
-
- {{ row.clusterName }}
-
-
-
-
- - {{ $t('term.inspect.jobdetail') }}
- - {{ $t('term.inspect.inspect') }}
- - {{ $t('term.inspect.thresholdrule') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
{{ item.viewLabel }}
+
changeCurrent(currentPage, item, index)"
+ @changePageSize="(pageSize) => changePageSize(pageSize,item, index)"
+ >
+
+
+ {{ row.ip.ip }}
+ :{{ row.ip.port }}
+
+
+
+
+
+ {{ v.name }}
+
+
+
+
+
+
+
+
+ {{ row.lcd | formatDate }}
+
+
+
+
+
+ {{ row.fcd | formatDate }}
+
+
+
+
+ {{ row.monitor.text }}
+
+ {{ handleTimes(row.monitor.time) | formatTimeCost({unitNumber: 1, language: 'zh',unit: 'minute'}) }} {{ $t('page.before') }}
+
+
+
+
+
+
+
+ {{ row.inspect.text }}
+
+ {{ handleTimes(row.inspect.time) | formatTimeCost({unitNumber: 1, language: 'zh',unit: 'minute'}) }} {{ $t('page.before') }}
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+ {{ row.vendor.name }}
+
+
+
+
+
+
+ {{ row.appModule.name }}
+
+
+
+
+ {{ row.appEnvironment.value }}
+
+
+
+
+
+
+ {{ row.appSystem.name }}
+
+
+
+
+
+ {{ o.name }}
+
+
+
+
+
+
+
+ {{ b.name }}
+
+
+
+
+
+
+
+ {{ row.state.name }}
+
+
+
+
+
+ {{ row.dataCenter.name }}
+
+
+
+
+
+
+
+ {{ row.ci.label }}
+
+
+
+
+
+ - {{ $t('term.inspect.jobdetail') }}
+ - {{ $t('term.inspect.inspect') }}
+ - {{ $t('term.inspect.thresholdrule') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/inspect/application/latest-questions-manage.vue b/src/views/pages/inspect/application/latest-questions-manage.vue
index e88a1fe7ffae6f3cffed069a79815c151edc0d84..7d9d840ad242d366a372e30006b2c69e2955c0a1 100644
--- a/src/views/pages/inspect/application/latest-questions-manage.vue
+++ b/src/views/pages/inspect/application/latest-questions-manage.vue
@@ -1,577 +1,719 @@
-
-
-
-
-
- {{ $t('page.packup') }}
- {{ $t('page.expand') }}
-
- {{ $t('page.refresh') }}
- {{ $t('page.export') }}
-
-
- {{ $t('page.export') }}
-
- {{ $t('page.mail') }}
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
{{ item.type.label }}
-
-
changeCurrent(currentPage, item, tIndex)"
- @changePageSize="(pageSize) => changePageSize(pageSize, item, tIndex)"
- >
-
-
- {{ row.ip }}
- :{{ row.port }}
-
-
-
-
-
- {{ row.monitorStatusJson.text }}
- {{ handleTime(row.monitorTime) | formatTimeCost({ unitNumber: 1, language: 'zh', unit: 'minute' }) }}{{ $t('page.before') }}
-
-
- -
-
-
-
-
- -
-
-
-
-
- {{ row.inspectStatusJson.text }}
- {{ handleTime(row.inspectTime) | formatTimeCost({ unitNumber: 1, language: 'zh', unit: 'minute' }) }}{{ $t('page.before') }}
-
-
- -
-
-
-
-
-
-
-
-
- - {{ $t('term.inspect.thresholdrule') }}
- - {{ $t('term.inspect.jobdetail') }}
- - {{ $t('term.cmdb.viewcientity') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ $t('page.packup') }}
+ {{ $t('page.expand') }}
+
+ {{ $t('page.refresh') }}
+ {{ $t('page.export') }}
+
+
+ {{ $t('page.export') }}
+
+ {{ $t('page.mail') }}
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
{{ item.viewLabel }}
+
+
changeCurrent(currentPage, item, tIndex)"
+ @changePageSize="(pageSize) => changePageSize(pageSize, item, tIndex)"
+ >
+
+
+ {{ row.ip.ip }}
+ :{{ row.ip.port }}
+
+
+
+
+
+ {{ v.name }}
+
+
+
+
+
+
+
+ {{ row.monitor.text }}
+
+ {{ handleTime(row.monitor.time) | formatTimeCost({unitNumber: 1, language: 'zh',unit: 'minute'}) }} {{ $t('page.before') }}
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ {{ row.inspect.text }}
+
+ {{ handleTime(row.inspect.time) | formatTimeCost({unitNumber: 1, language: 'zh',unit: 'minute'}) }} {{ $t('page.before') }}
+
+
+
+ -
+
+
+
+
+
+
+ {{ row.lcd | formatDate }}
+
+
+
+
+
+ {{ row.fcd | formatDate }}
+
+
+
+
+
+ {{ row.vendor.name }}
+
+
+
+
+
+
+
+ {{ row.appSystem.name }}
+
+
+
+
+
+
+ {{ row.appModule.name }}
+
+
+
+
+
+ {{ row.appEnvironment.value }}
+
+
+
+
+
+ {{ row.state.name }}
+
+
+
+
+
+ {{ o.name }}
+
+
+
+
+
+
+
+ {{ b.name }}
+
+
+
+
+
+
+
+
+ {{ row.ci.label }}
+
+
+
+
+
+ {{ row.dataCenter.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+ - {{ $t('term.inspect.thresholdrule') }}
+ - {{ $t('term.inspect.jobdetail') }}
+ - {{ $t('term.cmdb.viewcientity') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/inspect/application/threshold/rule-of-threshold-dialog.vue b/src/views/pages/inspect/application/threshold/rule-of-threshold-dialog.vue
index 68adaa5d4518cc1bedd1757a7572f88bbc7f5353..bc3940ff9d4f38c19d48d0f63cec3b6afceca5b3 100644
--- a/src/views/pages/inspect/application/threshold/rule-of-threshold-dialog.vue
+++ b/src/views/pages/inspect/application/threshold/rule-of-threshold-dialog.vue
@@ -41,7 +41,7 @@ export default {
components: {},
props: {
resourceId: {
- type: Number
+ type: [Number, String]
}
},
data() {