diff --git a/.env.dev b/.env.dev index 8ef6dd7c..9e1d10f4 100644 --- a/.env.dev +++ b/.env.dev @@ -5,7 +5,8 @@ ENV = 'development' VUE_APP_TITLE = 芋道管理系统 # 芋道管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.0.33:48080' +# VUE_APP_BASE_API = 'http://192.168.0.33:48080' +VUE_APP_BASE_API = 'http://192.168.1.188:48080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/base/energyType.js b/src/api/base/energyType.js new file mode 100644 index 00000000..b6dbe552 --- /dev/null +++ b/src/api/base/energyType.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 创建能源类型 +export function createEnergyType(data) { + return request({ + url: '/base/energy-type/create', + method: 'post', + data: data + }) +} + +// 更新能源类型 +export function updateEnergyType(data) { + return request({ + url: '/base/energy-type/update', + method: 'put', + data: data + }) +} + +// 删除能源类型 +export function deleteEnergyType(id) { + return request({ + url: '/base/energy-type/delete?id=' + id, + method: 'delete' + }) +} + +// 获得能源类型 +export function getEnergyType(id) { + return request({ + url: '/base/energy-type/get?id=' + id, + method: 'get' + }) +} + +// 获得能源类型分页 +export function getEnergyTypePage(data) { + return request({ + url: '/base/energy-type/page', + method: 'post', + data: data + }) +} + +// 获得能源类型编码 +export function getEnergyTypeCode() { + return request({ + url: '/base/energy-type/getCode', + method: 'get' + }) +} + +// 导出能源类型 Excel +export function exportEnergyTypeExcel(query) { + return request({ + url: '/base/energy-type/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/utils/dict.js b/src/utils/dict.js index a3a47222..aa6c9f58 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -86,6 +86,9 @@ export const DICT_TYPE = { // ============== PRODUCT - 产品模块 ============= UNIT_DICT: 'unit_dict', PRODUCT_TYPE: 'product_type', + + // ============== ENERGY - 能源模块 ============= + ENERGY_UNIT: 'energy_unit' } /** @@ -95,7 +98,7 @@ export const DICT_TYPE = { * @returns {*|Array} 数据字典数组 */ export function getDictDatas(dictType) { - console.log('---> ', dictType, store.getters.dict_datas) + // console.log('---> ', dictType, store.getters.dict_datas) return store.getters.dict_datas[dictType] || [] } @@ -145,3 +148,15 @@ export function getDictDataLabel(dictType, value) { const dict = getDictData(dictType, value); return dict ? dict.label : ''; } + +// table中用来过滤字典 +export function publicFormatter(dictTable) { + const dictDatas = getDictDatas(dictTable) + return function (val) { + const arr = {} + dictDatas.map((item) => { + arr[item.value] = item.label + }) + return arr?.[val] + } +} diff --git a/src/views/energy/base/energyType/components/InnerTable.vue b/src/views/energy/base/energyType/components/InnerTable.vue new file mode 100644 index 00000000..ff3adce7 --- /dev/null +++ b/src/views/energy/base/energyType/components/InnerTable.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/views/energy/base/energyType/components/InputArea.vue b/src/views/energy/base/energyType/components/InputArea.vue new file mode 100644 index 00000000..94088653 --- /dev/null +++ b/src/views/energy/base/energyType/components/InputArea.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/views/energy/base/energyType/components/TimePickerArea.vue b/src/views/energy/base/energyType/components/TimePickerArea.vue new file mode 100644 index 00000000..d3b6810b --- /dev/null +++ b/src/views/energy/base/energyType/components/TimePickerArea.vue @@ -0,0 +1,43 @@ + + + diff --git a/src/views/energy/base/energyType/components/energyTypeAdd.vue b/src/views/energy/base/energyType/components/energyTypeAdd.vue new file mode 100644 index 00000000..ea64c5c8 --- /dev/null +++ b/src/views/energy/base/energyType/components/energyTypeAdd.vue @@ -0,0 +1,332 @@ + + diff --git a/src/views/energy/base/energyType/index.vue b/src/views/energy/base/energyType/index.vue new file mode 100644 index 00000000..c3c10dd4 --- /dev/null +++ b/src/views/energy/base/energyType/index.vue @@ -0,0 +1,217 @@ + + + diff --git a/src/views/group/base/groupTeam/index.vue b/src/views/group/base/groupTeam/index.vue index 5af98769..b692c247 100644 --- a/src/views/group/base/groupTeam/index.vue +++ b/src/views/group/base/groupTeam/index.vue @@ -87,14 +87,14 @@ export default { formConfig: [ { type: 'input', - label: '名称', - placeholder: '名称', + label: '班次名称', + placeholder: '班次名称', param: 'name' }, { type: 'input', - label: '编码', - placeholder: '编码', + label: '班次编码', + placeholder: '班次编码', param: 'code' }, {