diff --git a/.env.dev b/.env.dev index 16e36043..233c342e 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2023-12-13 15:33:20 + # @LastEditTime: 2023-12-13 16:52:10 # @LastEditors: zhp # @Description: ### @@ -20,8 +20,8 @@ VUE_APP_TITLE = MES系统 # VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.1.56:48082' -# VUE_APP_BASE_API = 'http://192.168.4.159:48080' -VUE_APP_BASE_API = 'http://192.168.1.78:48082' +# VUE_APP_BASE_API = 'http://192.168.1.62:48082' + # 积木报表指向地址 VUE_APP_JIMU_API = 'http://192.168.0.33:48082' diff --git a/src/api/base/energyQuantityManual.js b/src/api/base/energyQuantityManual.js new file mode 100644 index 00000000..d919b5a3 --- /dev/null +++ b/src/api/base/energyQuantityManual.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' + +// 获得分页数据 +export function energyQuantityManualPage(data) { + return request({ + url: '/base/energy-quantity-manual/page', + method: 'post', + data: data + }) +} + +// 创建 +export function energyQuantityManualCreate(data) { + return request({ + url: '/base/energy-quantity-manual/create', + method: 'post', + data: data + }) +} + +// 更新 +export function energyQuantityManualUpdate(data) { + return request({ + url: '/base/energy-quantity-manual/update', + method: 'put', + data: data + }) +} + +//获得能源抄表(手动) +export function energyQuantityManualGet(query) { + return request({ + url: '/base/energy-quantity-manual/get', + method: 'get', + params: query + }) +} + +//删除 +export function energyQuantityManualDelete(query) { + return request({ + url: '/base/energy-quantity-manual/delete', + method: 'delete', + params: query + }) +} + +//导出 +export function energyQuantityManualExport(data) { + return request({ + url: '/base/energy-quantity-manual/export-excel', + method: 'post', + data: data, + responseType: 'blob' + }) +} \ No newline at end of file diff --git a/src/api/cost/costEneryAutoReport.js b/src/api/cost/costEneryAutoReport.js new file mode 100644 index 00000000..4cfe8633 --- /dev/null +++ b/src/api/cost/costEneryAutoReport.js @@ -0,0 +1,78 @@ +/* + * @Author: zwq + * @Date: 2023-11-23 14:57:00 + * @LastEditors: zwq + * @LastEditTime: 2023-12-07 09:37:18 + * @Description: + */ +import request from '@/utils/request' + +// 创建能源自动记录报 +export function createCostEneryAutoReport(data) { + return request({ + url: '/extend/cost-enery-auto-report/create', + method: 'post', + data: data + }) +} + +// 更新能源自动记录报 +export function updateCostEneryAutoReport(data) { + return request({ + url: '/extend/cost-enery-auto-report/update', + method: 'put', + data: data + }) +} + +// 删除能源自动记录报 +export function deleteCostEneryAutoReport(id) { + return request({ + url: '/extend/cost-enery-auto-report/delete?id=' + id, + method: 'delete' + }) +} + +// 获得能源自动记录报 +export function getCostEneryAutoReport(id) { + return request({ + url: '/extend/cost-enery-auto-report/get?id=' + id, + method: 'get' + }) +} + +// 获得能源自动记录报分页历史 +export function getCostEneryAutoReportPage(data) { + return request({ + url: '/extend/cost-enery-auto-report/page', + method: 'post', + data: data + }) +} +// 获得能源查询 +export function getCostEneryAutoPage(data) { + return request({ + url: '/extend/cost-energy-search/getData', + method: 'post', + data: data + }) +} +// 导出能源自动记录报 Excel +export function exportCostEneryAutoReportExcel(data) { + return request({ + url: '/extend/cost-enery-auto-report/export-excel', + method: 'post', + data: data, + responseType: 'blob' + }) +} + +// 导出能源自动记录报 Excel 查询 +export function exportCostEneryExcel(data) { + return request({ + url: '/extend/cost-energy-search/export-excel', + method: 'post', + data: data, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costMaterialAutoReport.js b/src/api/cost/costMaterialAutoReport.js new file mode 100644 index 00000000..32a58dc1 --- /dev/null +++ b/src/api/cost/costMaterialAutoReport.js @@ -0,0 +1,73 @@ +import request from '@/utils/request' + +// 创建原料成本自动统计报 +export function createCostMaterialAutoReport(data) { + return request({ + url: '/extend/cost-material-auto-report/create', + method: 'post', + data: data + }) +} + +// 更新原料成本自动统计报 +export function updateCostMaterialAutoReport(data) { + return request({ + url: '/extend/cost-material-auto-report/update', + method: 'put', + data: data + }) +} + +// 删除原料成本自动统计报 +export function deleteCostMaterialAutoReport(id) { + return request({ + url: '/extend/cost-material-auto-report/delete?id=' + id, + method: 'delete' + }) +} + +// 获得原料成本自动统计报 +export function getCostMaterialAutoReport(id) { + return request({ + url: '/extend/cost-material-auto-report/get?id=' + id, + method: 'get' + }) +} + +// 获得原料成本自动统计报分页历史 +export function getCostMaterialAutoReportPage(data) { + return request({ + url: '/extend/cost-material-auto-report/page', + method: 'post', + data: data + }) +} + +// 获得原料成本查询 +export function getCostMaterialSearchPage(data) { + return request({ + url: '/extend/cost-material-search/getData', + method: 'post', + data: data + }) +} + +// 导出原料成本自动统计报 Excel +export function exportCostMaterialAutoReportExcel(data) { + return request({ + url: '/extend/cost-material-auto-report/export-excel', + method: 'post', + data: data, + responseType: 'blob' + }) +} + +// 导出原料成本自动统计报 Excel查询 +export function exportCostMaterialSearch(data) { + return request({ + url: '/extend/cost-material-search/export-excel', + method: 'post', + data: data, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costMaterialSet.js b/src/api/cost/costMaterialSet.js new file mode 100644 index 00000000..6d825d33 --- /dev/null +++ b/src/api/cost/costMaterialSet.js @@ -0,0 +1,61 @@ +/* + * @Author: zwq + * @Date: 2023-11-15 09:24:30 + * @LastEditors: zwq + * @LastEditTime: 2023-12-05 14:38:48 + * @Description: + */ +import request from '@/utils/request' + +// 创建原料价位配置 +export function createCostMaterialSet(data) { + return request({ + url: '/extend/cost-material-set/create', + method: 'post', + data: data + }) +} + +// 更新原料价位配置 +export function updateCostMaterialSet(data) { + return request({ + url: '/extend/cost-material-set/update', + method: 'put', + data: data + }) +} + +// 删除原料价位配置 +export function deleteCostMaterialSet(id) { + return request({ + url: '/extend/cost-material-set/delete?id=' + id, + method: 'delete' + }) +} + +// 获得原料价位配置 +export function getCostMaterialSet(id) { + return request({ + url: '/extend/cost-material-set/get?id=' + id, + method: 'get' + }) +} + +// 获得原料价位配置分页 +export function getCostMaterialSetPage(data) { + return request({ + url: '/extend/cost-material-set/page', + method: 'POST', + data: data + }) +} + +// 导出原料价位配置 Excel +export function exportCostMaterialSetExcel(query) { + return request({ + url: '/extend/cost-material-set/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/safetyEnvironmental/environmental.js b/src/api/safetyEnvironmental/environmental.js new file mode 100644 index 00000000..355d0f89 --- /dev/null +++ b/src/api/safetyEnvironmental/environmental.js @@ -0,0 +1,92 @@ +import request from '@/utils/request' + +// 获得环保检测指标实时数据 +export function environmentalCheckRealtime(query) { + return request({ + url: '/base/environmental-check/realtime', + method: 'get', + params: query + }) +} + +// 获得环保检测指标趋势数据 +export function environmentalCheckRealtimeTrend(data) { + return request({ + url: '/base/environmental-check-record/trend', + method: 'post', + data: data + }) +} + +// 获得环保检测指标分页 +export function environmentalCheckPage(query) { + return request({ + url: '/base/environmental-check/page', + method: 'get', + params: query + }) +} + +// 创建环保检测指标 +export function environmentalCheckCreate(data) { + return request({ + url: '/base/environmental-check/create', + method: 'post', + data: data + }) +} + +// 更新环保检测指标 +export function environmentalCheckUpdate(data) { + return request({ + url: '/base/environmental-check/update', + method: 'put', + data: data + }) +} + +// 获得环保检测指标 +export function environmentalCheckGet(query) { + return request({ + url: '/base/environmental-check/get', + method: 'get', + params: query + }) +} + +// 删除环保检测指标 +export function environmentalCheckDelete(query) { + return request({ + url: '/base/environmental-check/delete', + method: 'delete', + params: query + }) +} + +// 获得环保检测记录分页 +export function environmentalCheckRecordPage(data) { + return request({ + url: '/base/environmental-check-record/page', + method: 'post', + data: data + }) +} + +// 导出环保检测记录 Excel +export function environmentalCheckRecordExport(data) { + return request({ + url: '/base/environmental-check-record/export-excel', + method: 'post', + data: data, + responseType: 'blob' + }) +} + +// 获取环保检测指标code +export function getEnvironmentalCheckCode(query) { + return request({ + url: '/base/environmental-check/getCode', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/assets/images/choicepart/Cost.png b/src/assets/images/choicepart/Cost.png new file mode 100644 index 00000000..76cf8538 Binary files /dev/null and b/src/assets/images/choicepart/Cost.png differ diff --git a/src/assets/images/choicepart/Databoard.png b/src/assets/images/choicepart/Databoard.png new file mode 100644 index 00000000..d9bc3d0c Binary files /dev/null and b/src/assets/images/choicepart/Databoard.png differ diff --git a/src/assets/images/choicepart/SafetyEnvironmental.png b/src/assets/images/choicepart/SafetyEnvironmental.png new file mode 100644 index 00000000..ef6e9085 Binary files /dev/null and b/src/assets/images/choicepart/SafetyEnvironmental.png differ diff --git a/src/assets/images/detectionData.png b/src/assets/images/detectionData.png new file mode 100644 index 00000000..7142140d Binary files /dev/null and b/src/assets/images/detectionData.png differ diff --git a/src/utils/dict.js b/src/utils/dict.js index ecaafb16..7030db51 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -94,6 +94,8 @@ export const DICT_TYPE = { OBJECT_TYPE: 'object_type', STATISTIC_TYPE: 'statistic_type', TIME_DIM: 'time_dim', + TABLE_NAME: 'table_name', + METHOD: 'method', // ============== ORDER - 订单模块 ============= ORDER_STATUS: 'order_status', @@ -104,6 +106,9 @@ export const DICT_TYPE = { // ============== EQUIPMENT - 设备模块 ============= MAINTAIN_TYPE: 'maintain_type', FAULT_LEVEL: 'fault-level', + + // ============== ENVIRONMENTAL - 环保模块 ============= + ENVIRONMENT_CHECK_UNIT: 'environment_check_unit' } /** diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index 3b4e5256..5d875af0 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -5,7 +5,7 @@ const baseURL = process.env.VUE_APP_BASE_API -// 日期格式化 +// 日期格式化(通用) export function parseTime(time, pattern) { if (arguments.length === 0 || !time) { return null @@ -48,6 +48,51 @@ export function parseTime(time, pattern) { return time_str } +// 日期格式化(仅适用表格) +export function parseTimeTable(pattern) { + return function(time){ + if (arguments.length === 0 || !time) { + return null + } + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),''); + } + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { + return ['日', '一', '二', '三', '四', '五', '六'][value] + } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return time_str + } +} + // 表单重置 export function resetForm(refName) { if (this.$refs[refName]) { diff --git a/src/views/choicePart/index.vue b/src/views/choicePart/index.vue index f77cef0d..add8d8bd 100644 --- a/src/views/choicePart/index.vue +++ b/src/views/choicePart/index.vue @@ -2,7 +2,7 @@
-
+
0) { for (let i = 0; i < menuList.length; i ++) { - for (let k = 0; k < 7; k++) { + for (let k = 0; k < 8; k++) { if (menuList[i].name === this.menuArr1[k].name) { this.menuArr1[k].visible = true this.menuArr1[k].id = menuList[i].id @@ -185,7 +209,7 @@ export default { this.menuArr1[k].meta = menuList[i].meta } } - for (let j = 0; j < 6; j++) { + for (let j = 0; j < 7; j++) { if (menuList[i].name === this.menuArr2[j].name) { this.menuArr2[j].visible = true this.menuArr2[j].id = menuList[i].id diff --git a/src/views/cost/energyCost/index.vue b/src/views/cost/energyCost/index.vue new file mode 100644 index 00000000..a0e122aa --- /dev/null +++ b/src/views/cost/energyCost/index.vue @@ -0,0 +1,162 @@ + + + + diff --git a/src/views/cost/energyCostHis/index.vue b/src/views/cost/energyCostHis/index.vue new file mode 100644 index 00000000..952eb8f1 --- /dev/null +++ b/src/views/cost/energyCostHis/index.vue @@ -0,0 +1,173 @@ + + + + diff --git a/src/views/cost/mixins/basic-add.js b/src/views/cost/mixins/basic-add.js new file mode 100644 index 00000000..7538902f --- /dev/null +++ b/src/views/cost/mixins/basic-add.js @@ -0,0 +1,121 @@ +/* + * @Author: zwq + * @Date: 2022-08-24 11:19:43 + * @LastEditors: zwq + * @LastEditTime: 2023-11-02 15:33:39 + * @Description: + */ +import { listData } from "@/api/system/dict/data"; +export default { + data() { + /* eslint-disable */ + return { + urlOptions: { + createURL: '', + updateURL: '', + infoURL: '', + codeURL: '', + getOption: false, //是否加载获取下拉框方法 + isGetCode: false, //是否加载获取code方法 + getDictList: false, //是否加载获取数据字典方法 + optionArrUrl: [], //需要获取下拉框的方法数组 + optionArr: {}, //需要获取下拉框的方法数组的返回结果 + dictList: {}, //需要获取数据字典的方法数组的返回结果 + }, + visible: false, + setData: false + } + }, + created() { + }, + activated() { + }, + methods: { + init(id) { + this.dataForm.id = id || ""; + this.visible = true; + if (this.urlOptions.getOption) { + this.getArr() + } + if (this.urlOptions.getDictList) { + this.getDict() + } + this.$nextTick(() => { + this.$refs["dataForm"].resetFields(); + if (this.dataForm.id) { + this.urlOptions.infoURL(id).then(response => { + this.dataForm = response.data; + if (this.setData) { + this.setDataForm() + } + }); + } else { + if (this.urlOptions.isGetCode) { + this.getCode() + } + } + }); + }, + getCode() { + this.urlOptions.codeURL() + .then(({ data: res }) => { + this.dataForm.code = res; + }) + .catch(() => {}); + }, + getArr() { + const params = { + pageSize: 100, + pageNo: 1, + } + this.urlOptions.optionArrUrl.forEach((item, index) => { + item(params).then(({ data: res }) => { + this.$set(this.urlOptions.optionArr, `arr${index}`, res.list) + }) + .catch(() => { + }); + }); + }, + /** 查询字典数据列表 */ + getDict() { + this.nameList.forEach((item,index)=>{ + const queryParams = { + pageNo: 1, + pageSize: 99, + dictType: item, + } + listData(queryParams).then(response => { + this.$set(this.urlOptions.dictList, `dict${index}`, response.data.list) + }); + }) + }, + // 表单提交 + dataFormSubmit() { + this.$refs["dataForm"].validate((valid) => { + if (!valid) { + return false; + } + // 修改的提交 + if (this.dataForm.id) { + this.urlOptions.updateURL(this.dataForm).then(response => { + this.$modal.msgSuccess("修改成功"); + this.visible = false; + this.$emit("refreshDataList"); + }); + return; + } + // 添加的提交 + this.urlOptions.createURL(this.dataForm).then(response => { + this.$modal.msgSuccess("新增成功"); + this.visible = false; + this.$emit("refreshDataList"); + }); + }); + }, + formClear() { + if (this.$refs.dataForm!==undefined) { + this.$refs.dataForm.resetFields(); + } + } + } +} diff --git a/src/views/cost/mixins/basic-page.js b/src/views/cost/mixins/basic-page.js new file mode 100644 index 00000000..89069ad4 --- /dev/null +++ b/src/views/cost/mixins/basic-page.js @@ -0,0 +1,172 @@ +/* + * @Author: zwq + * @Date: 2022-08-24 11:19:43 + * @LastEditors: zwq + * @LastEditTime: 2023-12-07 09:35:33 + * @Description: + */ +export default { + data() { + /* eslint-disable */ + return { + urlOptions: { + getDataListURL: '', + deleteURL: '', + statusUrl: '', + exportURL: '' + }, + tableData: [], + listQuery: { + pageSize: 10, + pageNo: 1, + total: 1, + }, + exportLoading: false, + dataListLoading: false, + addOrEditTitle: '', + addOrUpdateVisible: false, + addOrUpdate:'addOrUpdate' + } + }, + created() { + }, + mounted() { + this.getDataList() + }, + methods: { + // 获取数据列表 + getDataList() { + this.dataListLoading = true; + this.urlOptions.getDataListURL(this.listQuery).then(response => { + if(response.hasOwnProperty('data')){ + this.tableData = response.data.list; + this.listQuery.total = response.data.total; + } + this.dataListLoading = false; + }); + }, + // 每页数 + sizeChangeHandle(val) { + this.listQuery.pageSize = val; + this.listQuery.pageNo = 1; + this.getDataList(); + }, + // 当前页 + currentChangeHandle(val) { + this.listQuery.pageNo = val; + this.getDataList(); + }, + // 新增 / 修改 + addOrUpdateHandle(id) { + this.addOrUpdateVisible = true; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(id); + }); + }, + cancel(id) { + this.$refs["popover-" + id].showPopper = false; + }, + //改变状态 + changeStatus(id) { + this.$http + .post(this.urlOptions.statusUrl, { id }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.$refs["popover-" + id].showPopper = false; + this.$message({ + message: this.$t("prompt.success"), + type: "success", + duration: 500, + onClose: () => { + this.getDataList(); + }, + }); + }) + .catch(() => { }); + }, + //tableBtn点击 + handleClick(val) { + if (val.type === "edit") { + this.addOrUpdateVisible = true; + this.addOrEditTitle = "编辑"; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(val.data.id); + }); + } else if (val.type === "delete") { + this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex) + } else if (val.type === "change") { + this.changeStatus(val.data.id) + } else { + this.otherMethods(val) + } + }, + // 删除 + deleteHandle(id, name, index) { + this.$confirm(`是否确认删除${name ? '名称为"' + name + '"' : '序号为"' + index + '"'}的数据项?`, "系统提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.urlOptions.deleteURL(id).then(({ data }) => { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.getDataList(); + }, + }); + }); + }) + .catch(() => { }); + }, + //search-bar点击 + buttonClick(val) { + switch (val.btnName) { + case "search": + this.listQuery.xm1 = val.xm1; + this.listQuery.xm2 = val.xm2; + this.listQuery.pageNo = 1; + this.getDataList(); + break; + case "add": + this.addOrEditTitle = '新增' + this.addOrUpdateVisible = true; + this.addOrUpdateHandle() + break; + default: + console.log(val) + } + }, + handleCancel() { + this.$refs[this.addOrUpdate].formClear() + this.addOrUpdateVisible = false + this.addOrEditTitle = '' + this.addOrUpdate = 'addOrUpdate' + }, + handleConfirm() { + this.$refs[this.addOrUpdate].dataFormSubmit() + }, + successSubmit() { + this.handleCancel() + this.getDataList() + }, + /** 导出按钮操作 */ + handleExport(data) { + // 处理查询参数 + let params = data?{ ...data }:{ ...this.listQuery }; + params.pageNo = undefined; + params.pageSize = undefined; + this.$modal.confirm('是否确认导出所有数据项?').then(() => { + this.exportLoading = true; + return this.urlOptions.exportURL(params); + }).then(response => { + this.$download.excel(response, '报表.xls'); + this.exportLoading = false; + }).catch(() => { }); + } + } +} diff --git a/src/views/cost/mixins/code-filter.js b/src/views/cost/mixins/code-filter.js new file mode 100644 index 00000000..e6725c28 --- /dev/null +++ b/src/views/cost/mixins/code-filter.js @@ -0,0 +1,79 @@ + +/* + * @Date: 2020-12-29 16:49:28 + * @LastEditors: zwq + * @LastEditTime: 2023-12-07 10:00:51 + * @FilePath: \basic-admin\src\filters\basicData\index.js + * @Description: + */ + +const table = { + lineStatus: { + 1: '生产中', + 2: '停止', + 3: '未知', + }, + deactivate: { + 1: '启用', + 0: '停用', + }, + wareType: { + 1: '缓存', + 2: '活动', + 3: '其它', + }, + reportType: { + 2: '日', + 3: '周', + 4: '月', + 5: '年', + }, +} + +// 日期格式化 +export function parseTime(time, pattern) { + if (arguments.length === 0 || !time) { + return null + } + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),''); + } + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { + return ['日', '一', '二', '三', '四', '五', '六'][value] + } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return time_str +} +export default function (dictTable) { + return function (val) { + return table?.[dictTable]?.[val] + } +} diff --git a/src/views/cost/mixins/connectTime.vue b/src/views/cost/mixins/connectTime.vue new file mode 100644 index 00000000..4ecde04b --- /dev/null +++ b/src/views/cost/mixins/connectTime.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/views/cost/rawMaterialConfig/add-or-updata.vue b/src/views/cost/rawMaterialConfig/add-or-updata.vue new file mode 100644 index 00000000..6de75d00 --- /dev/null +++ b/src/views/cost/rawMaterialConfig/add-or-updata.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/views/cost/rawMaterialConfig/index.vue b/src/views/cost/rawMaterialConfig/index.vue new file mode 100644 index 00000000..462fa142 --- /dev/null +++ b/src/views/cost/rawMaterialConfig/index.vue @@ -0,0 +1,186 @@ + + + diff --git a/src/views/cost/rawMaterialCost/index.vue b/src/views/cost/rawMaterialCost/index.vue new file mode 100644 index 00000000..fdeeb275 --- /dev/null +++ b/src/views/cost/rawMaterialCost/index.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/views/cost/rawMaterialCostHis/index.vue b/src/views/cost/rawMaterialCostHis/index.vue new file mode 100644 index 00000000..f865cf4b --- /dev/null +++ b/src/views/cost/rawMaterialCostHis/index.vue @@ -0,0 +1,170 @@ + + + + diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue index e742441d..f957f7b3 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue @@ -221,18 +221,30 @@ export default { timeSelect() { switch (this.queryParams.timeDim) { case '1': + if (!this.timeValue) { + this.$modal.msgError('时间范围不能为空') + return false + } if (this.timeValue[1] - this.timeValue[0] > 7*24*3600000) { this.$modal.msgError('最大时间范围为7天,请重新选择') this.timeValue = [] } break case '2': + if (!this.dateValue) { + this.$modal.msgError('时间范围不能为空') + return false + } if (this.dateValue[1] - this.dateValue[0] > 29*24*3600000) { this.$modal.msgError('最大时间范围为30天,请重新选择') // 自动选择默认是0:00:00要求是23:59:59 this.dateValue = [] } break case '4': + if (!this.monthValue) { + this.$modal.msgError('时间范围不能为空') + return false + } if (this.monthValue[1] - this.monthValue[0] > 729*24*3600000) { this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面 this.monthValue = [] @@ -338,7 +350,7 @@ export default { } switch (this.queryParams.timeDim) { case '1': - if (this.timeValue.length > 0) { + if (this.timeValue && this.timeValue.length > 0) { this.queryParams.startTime = this.timeValue[0] this.queryParams.endTime = this.timeValue[1] // 不用转 } else { diff --git a/src/views/energy/analysis/trendAnalysis/components/lineChart.vue b/src/views/energy/analysis/trendAnalysis/components/lineChart.vue index 82c8c900..e564a745 100644 --- a/src/views/energy/analysis/trendAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/trendAnalysis/components/lineChart.vue @@ -8,7 +8,6 @@ \ No newline at end of file diff --git a/src/views/energy/base/energyQuantityManual/index.vue b/src/views/energy/base/energyQuantityManual/index.vue new file mode 100644 index 00000000..39d25b8b --- /dev/null +++ b/src/views/energy/base/energyQuantityManual/index.vue @@ -0,0 +1,309 @@ + + + diff --git a/src/views/energy/base/energyType/components/InnerTable.vue b/src/views/energy/base/energyType/components/InnerTable.vue index 4dba190d..5eab7af9 100644 --- a/src/views/energy/base/energyType/components/InnerTable.vue +++ b/src/views/energy/base/energyType/components/InnerTable.vue @@ -1,12 +1,13 @@ @@ -91,6 +111,7 @@ export default { return { form: { id: '', + method: '1', objectId: '', objectType: '', energyTypeId: '', @@ -103,7 +124,8 @@ export default { objIds: [],// 回显数组 isEdit: false, //是否是编辑 rules: { - objectId: [{ required: true, message: '对象不能为空', trigger: 'change' }], + method: [{ required: true, message: '抄表方式不能为空', trigger: 'change' }], + objectId: [{ required: true, message: '监控对象不能为空', trigger: 'change' }], energyTypeId: [{ required: true, message: '能源类型不能为空', trigger: 'change' }], type: [{ required: true, message: '监控模式不能为空', trigger: 'change' }], limitType: [{ required: true, message: '指标类型不能为空', trigger: 'change' }] @@ -120,6 +142,7 @@ export default { if (res.code === 0) { this.form = res.data this.form.plcParamId = res.data.plcParamId || '' + this.form.method = this.form.method ? this.form.method + '' : '' this.form.limitType = this.form.limitType ? this.form.limitType + '' : '' this.objIds = this.changeDetSelect(this.form.objectId, this.objList) if (this.form.type === 2) { @@ -132,6 +155,14 @@ export default { this.form.id = '' } }, + // 切换方式 + changeMethod() { + if(this.form.method === '2'){ + this.form.limitType = "2" + }else{ + this.form.limitType = '' + } + }, // 监控详细参数 getDetailList() { getEnergyParamList({ diff --git a/src/views/energy/monitoring/energyLimit/index.vue b/src/views/energy/monitoring/energyLimit/index.vue index 1b82ab8b..d72aede2 100644 --- a/src/views/energy/monitoring/energyLimit/index.vue +++ b/src/views/energy/monitoring/energyLimit/index.vue @@ -51,6 +51,11 @@ import { getTree } from '@/api/base/factory' import { publicFormatter } from '@/utils/dict' import EnergyLimitAdd from './components/energyLimitAdd' const tableProps = [ + { + prop: 'method', + label: '抄表方式', + filter: publicFormatter('method') + }, { prop: 'objName', label: '监控对象' @@ -59,6 +64,11 @@ const tableProps = [ prop: 'objCode', label: '对象编码' }, + { + prop: 'tableName', + label: '水/气表名', + filter: publicFormatter('table_name') + }, { prop: 'energyType', label: '能源类型' diff --git a/src/views/energy/monitoring/energyOverlimitLog/index.vue b/src/views/energy/monitoring/energyOverlimitLog/index.vue index f748592c..1cffef1e 100644 --- a/src/views/energy/monitoring/energyOverlimitLog/index.vue +++ b/src/views/energy/monitoring/energyOverlimitLog/index.vue @@ -1,5 +1,5 @@ - +