diff --git a/.env b/.env index 0110ec0..e7c214e 100644 --- a/.env +++ b/.env @@ -1,11 +1,11 @@ # port -VITE_PORT = 3100 +VITE_PORT = 3106 # 网站标题 VITE_GLOB_APP_TITLE = 磐石市智慧供热监管平台 # 简称,此变量只能是字符/下划线 -VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro +VITE_GLOB_APP_SHORT_NAME = 供热监管平台 # 单点登录服务端地址 VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas diff --git a/.env.development b/.env.development index 5560e19..4f618ae 100644 --- a/.env.development +++ b/.env.development @@ -6,10 +6,10 @@ VITE_PUBLIC_PATH = / # 跨域代理,您可以配置多个 ,请注意,没有换行符 -VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] +VITE_PROXY = [["/jeecgboot","http://localhost:8086/jeecg-boot"],["/upload","http://localhost:3300/upload"]] #后台接口全路径地址(必填) -VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot +VITE_GLOB_DOMAIN_URL=http://localhost:8086/jeecg-boot #后台接口父地址(必填) VITE_GLOB_API_URL=/jeecgboot diff --git a/src/views/base/waterFlowConfig/BlWaterFlowConfig.api.ts b/src/views/base/waterFlowConfig/BlWaterFlowConfig.api.ts new file mode 100644 index 0000000..e4ca77c --- /dev/null +++ b/src/views/base/waterFlowConfig/BlWaterFlowConfig.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/waterFlowConfig/blWaterFlowConfig/list', + save='/waterFlowConfig/blWaterFlowConfig/add', + edit='/waterFlowConfig/blWaterFlowConfig/edit', + deleteOne = '/waterFlowConfig/blWaterFlowConfig/delete', + deleteBatch = '/waterFlowConfig/blWaterFlowConfig/deleteBatch', + importExcel = '/waterFlowConfig/blWaterFlowConfig/importExcel', + exportXls = '/waterFlowConfig/blWaterFlowConfig/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/base/waterFlowConfig/BlWaterFlowConfig.data.ts b/src/views/base/waterFlowConfig/BlWaterFlowConfig.data.ts new file mode 100644 index 0000000..b6bd165 --- /dev/null +++ b/src/views/base/waterFlowConfig/BlWaterFlowConfig.data.ts @@ -0,0 +1,46 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: 'SN', + align: "center", + dataIndex: 'sn' + }, + { + title: '公司名称', + align: "center", + dataIndex: 'companyCompanyId_dictText' + }, + { + title: '热源名称', + align: "center", + dataIndex: 'sourceSourceId_dictText' + }, + // { + // title: '换热站名称', + // align: "center", + // dataIndex: 'stationStationId_dictText' + // }, + { + title: '注册设备时间', + align: "center", + dataIndex: 'occurtime', + customRender:({text}) =>{ + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + return text; + }, + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + sn: {title: 'sn',order: 0,view: 'text', type: 'string',}, + occurtime: {title: '注册设备时间',order: 1,view: 'date', type: 'string',}, + companyCompanyId: {title: '公司名称',order: 2,view: 'number', type: 'number',dictTable: "bl_thermalcompany", dictCode: 'id', dictText: 'company_name',}, + sourceSourceId: {title: '热源名称',order: 3,view: 'number', type: 'number',dictTable: "bl_heatsource", dictCode: 'id', dictText: 'source_name',}, + stationStationId: {title: '换热站名称',order: 4,view: 'number', type: 'number',dictTable: "bl_heatsourcestation", dictCode: 'id', dictText: 'station_name',}, +}; diff --git a/src/views/base/waterFlowConfig/BlWaterFlowConfigList.vue b/src/views/base/waterFlowConfig/BlWaterFlowConfigList.vue new file mode 100644 index 0000000..c12a293 --- /dev/null +++ b/src/views/base/waterFlowConfig/BlWaterFlowConfigList.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/src/views/base/waterFlowConfig/BlWaterFlowConfigList2.vue b/src/views/base/waterFlowConfig/BlWaterFlowConfigList2.vue new file mode 100644 index 0000000..f98dfdc --- /dev/null +++ b/src/views/base/waterFlowConfig/BlWaterFlowConfigList2.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/src/views/base/waterFlowConfig/components/BlWaterFlowConfigForm.vue b/src/views/base/waterFlowConfig/components/BlWaterFlowConfigForm.vue new file mode 100644 index 0000000..9157c62 --- /dev/null +++ b/src/views/base/waterFlowConfig/components/BlWaterFlowConfigForm.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/base/waterFlowConfig/components/BlWaterFlowConfigModal.vue b/src/views/base/waterFlowConfig/components/BlWaterFlowConfigModal.vue new file mode 100644 index 0000000..9546c33 --- /dev/null +++ b/src/views/base/waterFlowConfig/components/BlWaterFlowConfigModal.vue @@ -0,0 +1,77 @@ + + + + + +