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 }}

- -