diff --git a/src/api/sys/other.ts b/src/api/sys/other.ts index 059cf551..9456844f 100644 --- a/src/api/sys/other.ts +++ b/src/api/sys/other.ts @@ -70,6 +70,20 @@ export function deleteDevice(device, mode: ErrorMessageMode = 'none') { }, ) } + +/** + * @description:产业数据列表 + */ +export function getKeywordsIndustry(mode: ErrorMessageMode = 'none') { + return defHttp.get( + { + url: '/api/keywords-industry', + }, + { + errorMessageMode: mode, + }, + ) +} /** * @description:基地数据列表 */ diff --git a/src/views/base/base-data/base.data.ts b/src/views/base/base-data/base.data.ts index 0ee0aa3e..6cdb4431 100644 --- a/src/views/base/base-data/base.data.ts +++ b/src/views/base/base-data/base.data.ts @@ -1,11 +1,16 @@ import { BasicColumn } from '/@/components/Table' import { FormSchema } from '/@/components/Table' import { getcrops, getTownAgriculturalBasic } from '/@/api/sys/user' +import { getKeywordsIndustry } from '/@/api/sys/other' export const columns: BasicColumn[] = [ { title: '基地名称', dataIndex: 'name', }, + { + title: '农业类型', + dataIndex: 'industry_label', + }, { title: '排序', dataIndex: 'sort', @@ -76,6 +81,20 @@ export const accountFormSchema: FormSchema[] = [ return !!values.id }, }, + { + field: 'industry_key', + label: '产业类型', + required: true, + component: 'ApiSelect', + componentProps: { + api: async () => { + const res = await getKeywordsIndustry() + return res + }, + labelField: 'name', + valueField: 'key', + }, + }, { field: 'name', label: '基地名称', diff --git a/src/views/visualization/components/Map.vue b/src/views/visualization/components/Map.vue index 6e9bd78a..07b59f71 100644 --- a/src/views/visualization/components/Map.vue +++ b/src/views/visualization/components/Map.vue @@ -1,8 +1,8 @@