From d25c3760a1c50c084fe9092c98a6063caa864cba Mon Sep 17 00:00:00 2001 From: wang-liang0615 Date: Thu, 31 Aug 2023 10:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=B8=8A=E4=BC=A0=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmdb-ui/src/api/company.js | 8 +- cmdb-ui/src/api/file.js | 31 ++ .../src/components/CustomIconSelect/index.vue | 268 ++++++++++++++++-- cmdb-ui/src/components/Menu/menu.js | 3 + cmdb-ui/src/modules/cmdb/views/ci/index.vue | 41 ++- .../modules/ciDetailRelationTopo/index.less | 5 +- .../ci/modules/ciDetailRelationTopo/node.js | 6 +- .../ci/modules/createInstanceFormByGroup.vue | 21 +- .../src/modules/cmdb/views/ci_types/index.vue | 45 +-- .../cmdb/views/ci_types/preValueTag.vue | 17 +- .../cmdb/views/discovery/discoveryCard.vue | 7 +- .../modules/cmdb/views/discoveryCI/index.vue | 27 +- .../modules/cmdb/views/preference/index.vue | 46 ++- .../cmdb/views/relation_views/index.vue | 54 +++- .../relation_views/modules/ContextMenu.vue | 21 +- .../modules/cmdb/views/tree_views/index.vue | 71 +++-- .../src/views/setting/companyInfo/index.vue | 3 +- cmdb-ui/src/views/setting/person/index.vue | 5 +- 18 files changed, 554 insertions(+), 125 deletions(-) create mode 100644 cmdb-ui/src/api/file.js diff --git a/cmdb-ui/src/api/company.js b/cmdb-ui/src/api/company.js index 2b80af0..cae4bde 100644 --- a/cmdb-ui/src/api/company.js +++ b/cmdb-ui/src/api/company.js @@ -20,13 +20,7 @@ export function putCompanyInfo(id, parameter) { data: parameter, }) } -export function postImageFile(parameter) { - return axios({ - url: '/common-setting/v1/file', - method: 'post', - data: parameter, - }) -} + export function getDepartmentList(params) { // ?department_parent_id=-1 查询第一级部门,下面的id根据实际的传 return axios({ diff --git a/cmdb-ui/src/api/file.js b/cmdb-ui/src/api/file.js new file mode 100644 index 0000000..e53e681 --- /dev/null +++ b/cmdb-ui/src/api/file.js @@ -0,0 +1,31 @@ +import { axios } from '@/utils/request' + +export function postImageFile(parameter) { + return axios({ + url: '/common-setting/v1/file', + method: 'post', + data: parameter, + }) +} + +export function getFileData(data_type) { + return axios({ + url: `/common-setting/v1/data/${data_type}`, + method: 'get', + }) +} + +export function addFileData(data_type, data) { + return axios({ + url: `/common-setting/v1/data/${data_type}`, + method: 'post', + data, + }) +} + +export function deleteFileData(data_type, id) { + return axios({ + url: `/common-setting/v1/data/${data_type}/${id}`, + method: 'delete', + }) +} diff --git a/cmdb-ui/src/components/CustomIconSelect/index.vue b/cmdb-ui/src/components/CustomIconSelect/index.vue index beac81f..dceaa8f 100644 --- a/cmdb-ui/src/components/CustomIconSelect/index.vue +++ b/cmdb-ui/src/components/CustomIconSelect/index.vue @@ -15,31 +15,117 @@ > {{ item.label }} +
+ 自定义 +
+ + 添加 +
-
-

{{ category.label }}

- -