fix: ,支持通过组织、部门、应用标签查询并选择虚拟机
parent
c936768441
commit
798c3694f3
|
|
@ -157,3 +157,17 @@ export function getLbListen(params) {
|
||||||
export function getRegionCondition(params) {
|
export function getRegionCondition(params) {
|
||||||
return request.get('/ims/v1/regions/condition', { params: { condition: JSON.stringify(params) } })
|
return request.get('/ims/v1/regions/condition', { params: { condition: JSON.stringify(params) } })
|
||||||
}
|
}
|
||||||
|
// 标签
|
||||||
|
const labelUrl = '/ims/v1/tags'
|
||||||
|
export function getLabel(params) {
|
||||||
|
return request.get(labelUrl, {
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 部门
|
||||||
|
const departUrl = '/sms/v1/departments'
|
||||||
|
export function getDepart(params) {
|
||||||
|
return request.get(departUrl, {
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { getCloudVendor } from 'services/platform/index'
|
import { getCloudVendor, getLabel, getDepart } from 'services/platform/index'
|
||||||
|
import { getProject } from 'services/system/project'
|
||||||
|
|
||||||
export const columns = [
|
export const columns = [
|
||||||
{
|
{
|
||||||
|
|
@ -38,6 +39,27 @@ export const searchConfigs = [
|
||||||
},
|
},
|
||||||
{ label: 'IP地址', value: 'ip', type: 'Input' },
|
{ label: 'IP地址', value: 'ip', type: 'Input' },
|
||||||
{ label: '主机名', value: 'name', type: 'Input' },
|
{ label: '主机名', value: 'name', type: 'Input' },
|
||||||
|
{
|
||||||
|
label: '标签',
|
||||||
|
value: 'label',
|
||||||
|
type: 'Cascade',
|
||||||
|
props: { value: 'content', label: 'name', children: 'children', checkStrictly: false },
|
||||||
|
data: [],
|
||||||
|
service: {
|
||||||
|
api: getLabel,
|
||||||
|
params: { simple: true },
|
||||||
|
attr: 'data.rows'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ label: '项目', value: 'projectId', type: 'Select', data: [], service: { api: getProject, params: { simple: true }, attr: 'data.rows' } },
|
||||||
|
{
|
||||||
|
label: '部门',
|
||||||
|
value: 'departId',
|
||||||
|
type: 'Cascade',
|
||||||
|
props: { value: 'id', label: 'name', children: 'children', checkStrictly: false },
|
||||||
|
data: [],
|
||||||
|
service: { api: getDepart, params: { parentId: 0 }, attr: 'data' }
|
||||||
|
},
|
||||||
{ value: 'catalog', type: 'Const', initValue: 'Computer' },
|
{ value: 'catalog', type: 'Const', initValue: 'Computer' },
|
||||||
{ value: 'osCategory', type: 'Const', initValue: '' }
|
{ value: 'osCategory', type: 'Const', initValue: '' }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue