From e237737830d5b7132122bb4ae44366547601de05 Mon Sep 17 00:00:00 2001 From: zwq Date: Tue, 10 Sep 2024 15:19:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 14 +- .env.prod | 15 +- package.json | 4 +- src/api/base/equipmentConfig.js | 53 + src/api/base/productionLine.js | 17 +- src/api/cost/costDeepRatioHis.js | 55 + src/api/cost/costEnergy.js | 19 + src/api/cost/costEnergyDeep.js | 22 +- src/api/cost/costMaterial.js | 22 +- src/api/cost/costOriginRatioHis.js | 10 + src/api/cost/costOthercostHis.js | 19 + src/api/cost/costOthercostHisDeep.js | 21 +- src/api/cost/costOthercostLog.js | 4 +- src/api/cost/costOthercostLogDeep.js | 2 +- src/api/cost/deepCostStatistics.js | 53 + src/api/cost/rawCostStatistics.js | 54 + src/components/ButtonNav/index.vue | 132 + src/filter/code-filter.js | 19 +- src/router/index.js | 3 +- .../components/BasicDrawer.vue | 6 +- .../equipmentGroup/components/BasicDrawer.vue | 6 +- src/views/base/equipmentGroupAlarm/index.vue | 2 +- .../base/equipmentPlcConnect/TableConfig.vue | 388 + .../equipmentPlcConnect/add-or-updata.vue | 151 + .../components-old/BasicDrawer.vue | 574 + .../components/BasicDrawer.vue | 253 +- .../components/basic-add.js | 100 + .../base/equipmentPlcConnect/index-old.vue | 535 + src/views/base/equipmentPlcConnect/index.vue | 249 +- src/views/bpm/form/formEditor.vue | 2 +- src/views/bpm/oa/leave/detail.vue | 2 +- src/views/bpm/processInstance/detail.vue | 4 +- .../equipment/components/AssetsUpload.vue | 4 +- .../equipment/components/EquipmentDrawer.vue | 6 +- src/views/core/base/equipment/index.vue | 3 +- src/views/core/mixins/basic-page.js | 2 +- src/views/core/monitoring/auto/index.vue | 7 +- src/views/core/monitoring/data/index.vue | 7 +- .../monitoring/sectionStatistics/index.vue | 7 +- .../sectionStatisticsSearch/index.vue | 5 +- src/views/cost/costAnalysis/index.vue | 0 .../cost/costStatistics/add-or-updata.vue | 114 + src/views/cost/costStatistics/index.vue | 346 + src/views/cost/costStatistics/typeRule.vue | 23 + .../cost/deep/24hourCostMonitor/index.vue | 104 + .../deep/costDeepEnergy/add-or-updata.vue | 3 +- src/views/cost/deep/costDeepEnergy/index.vue | 193 +- .../costDeepOthercostHis/add-or-updata.vue | 4 +- .../cost/deep/costDeepOthercostHis/index.vue | 190 +- .../costDeepOthercostLog/add-or-updata.vue | 3 +- .../cost/deep/costDeepOthercostLog/index.vue | 37 +- .../costDeepOthercostRule/add-or-updata.vue | 6 +- .../deep/costDeepRatioHis/add-or-updata.vue | 132 + .../cost/deep/costDeepRatioHis/index.vue | 376 + .../deep/costStatistics/add-or-updata.vue | 160 + src/views/cost/deep/costStatistics/index.vue | 440 + .../cost/deep/costStatistics/typeRule.vue | 23 + .../cost/raw/24hourCostMonitor/index.vue | 104 + .../cost/raw/costEnergy/add-or-updata.vue | 41 +- src/views/cost/raw/costEnergy/index.vue | 193 +- .../cost/raw/costMaterial/add-or-updata.vue | 25 +- src/views/cost/raw/costMaterial/index.vue | 207 +- .../raw/costOriginRatioHis/add-or-updata.vue | 133 +- .../cost/raw/costOriginRatioHis/index.vue | 46 +- .../raw/costOthercostHis/add-or-updata.vue | 4 +- src/views/cost/raw/costOthercostHis/index.vue | 179 +- .../raw/costOthercostLog/add-or-updata.vue | 3 +- src/views/cost/raw/costOthercostLog/index.vue | 37 +- .../raw/costOthercostRule/add-or-updata.vue | 6 +- .../cost/raw/costStatistics/add-or-updata.vue | 149 + src/views/cost/raw/costStatistics/index.vue | 439 + .../cost/raw/costStatistics/typeRule.vue | 23 + .../base/energyQuantityRealtime/index.vue | 3 +- .../energy/monitoring/energyReport/index.vue | 3 +- .../monitoring/energyReportSearch/index.vue | 3 +- .../equipment/timing-diagram/output/index.vue | 6 +- .../equipment/timing-diagram/status/index.vue | 8 +- .../components/groupUpperLower.vue | 5 +- src/views/infra/build/FormDrawer.vue | 6 +- src/views/infra/build/JsonDrawer.vue | 2 +- src/views/infra/build/index.vue | 2 +- src/views/login.vue | 2 +- src/views/mp/autoReply/index.vue | 2 +- .../mp/components/wx-editor/WxEditor.vue | 4 +- src/views/mp/components/wx-reply/main.vue | 18 +- src/views/mp/draft/index.vue | 8 +- src/views/mp/freePublish/index.vue | 2 +- src/views/mp/material/index.vue | 16 +- src/views/mp/message/index.vue | 2 +- src/views/mp/statistics/index.vue | 4 +- src/views/mp/tag/index.vue | 2 +- src/views/mp/user/index.vue | 2 +- .../pay/app/components/aliPayChannelForm.vue | 4 +- .../pay/app/components/wechatChannelForm.vue | 4 +- src/views/pay/order/index.vue | 2 +- src/views/pay/order/submit.vue | 8 +- src/views/pay/refund/index.vue | 2 +- sync_line.bat | 68 + yarn.lock | 17082 ++++++++-------- 99 files changed, 14597 insertions(+), 9267 deletions(-) create mode 100644 src/api/base/equipmentConfig.js create mode 100644 src/api/cost/costDeepRatioHis.js create mode 100644 src/api/cost/deepCostStatistics.js create mode 100644 src/api/cost/rawCostStatistics.js create mode 100644 src/components/ButtonNav/index.vue create mode 100644 src/views/base/equipmentPlcConnect/TableConfig.vue create mode 100644 src/views/base/equipmentPlcConnect/add-or-updata.vue create mode 100644 src/views/base/equipmentPlcConnect/components-old/BasicDrawer.vue create mode 100644 src/views/base/equipmentPlcConnect/components/basic-add.js create mode 100644 src/views/base/equipmentPlcConnect/index-old.vue create mode 100644 src/views/cost/costAnalysis/index.vue create mode 100644 src/views/cost/costStatistics/add-or-updata.vue create mode 100644 src/views/cost/costStatistics/index.vue create mode 100644 src/views/cost/costStatistics/typeRule.vue create mode 100644 src/views/cost/deep/24hourCostMonitor/index.vue create mode 100644 src/views/cost/deep/costDeepRatioHis/add-or-updata.vue create mode 100644 src/views/cost/deep/costDeepRatioHis/index.vue create mode 100644 src/views/cost/deep/costStatistics/add-or-updata.vue create mode 100644 src/views/cost/deep/costStatistics/index.vue create mode 100644 src/views/cost/deep/costStatistics/typeRule.vue create mode 100644 src/views/cost/raw/24hourCostMonitor/index.vue create mode 100644 src/views/cost/raw/costStatistics/add-or-updata.vue create mode 100644 src/views/cost/raw/costStatistics/index.vue create mode 100644 src/views/cost/raw/costStatistics/typeRule.vue create mode 100644 sync_line.bat diff --git a/.env.dev b/.env.dev index 2f15db72..f863fa20 100644 --- a/.env.dev +++ b/.env.dev @@ -1,20 +1,20 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2023-10-16 09:22:52 - # @LastEditors: DY - # @Description: -### + # @LastEditTime: 2024-09-10 14:43:39 + # @LastEditors: zwq + # @Description: +### # 开发环境配置 ENV = 'development' # 页面标题 -VUE_APP_TITLE = 产线监控系统 +VUE_APP_TITLE = 成本管理系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://192.168.1.49:48080' -# VUE_APP_BASE_API = 'http://192.168.1.8:48080' -VUE_APP_BASE_API = 'http://192.168.0.33:48080' +VUE_APP_BASE_API = 'http://line.kszny.picaiba.com' +# VUE_APP_BASE_API = 'http://192.168.1.40:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080' # 路由懒加载 diff --git a/.env.prod b/.env.prod index 7ac2b7f1..724977ea 100644 --- a/.env.prod +++ b/.env.prod @@ -1,15 +1,24 @@ +### + # @Author: zwq + # @Date: 2024-03-27 15:49:55 + # @LastEditors: zwq + # @LastEditTime: 2024-09-10 15:19:19 + # @Description: +### # 生产环境配置 ENV = 'production' # 页面标题 -VUE_APP_TITLE = 产线监控系统 +VUE_APP_TITLE = 成本管理系统 # 芋道管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = '' # 根据服务器或域名修改 # PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/' -PUBLIC_PATH = 'http://192.168.0.33:8888/' +# PUBLIC_PATH = 'http://192.168.0.33:8888/' +PUBLIC_PATH = '' # 二级部署路径 VUE_APP_APP_NAME ='yudao-admin' diff --git a/package.json b/package.json index 08d55ea0..d715cd55 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "license": "MIT", "scripts": { "local": "vue-cli-service serve --mode local", - "dev": "vue-cli-service serve --mode dev", + "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev", "front": "vue-cli-service serve --mode front", - "build:prod": "vue-cli-service build --mode prod", + "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod", "build:stage": "vue-cli-service build --mode stage", "build:dev": "vue-cli-service build --mode dev", "build:static": "vue-cli-service build --mode static", diff --git a/src/api/base/equipmentConfig.js b/src/api/base/equipmentConfig.js new file mode 100644 index 00000000..c5fe331d --- /dev/null +++ b/src/api/base/equipmentConfig.js @@ -0,0 +1,53 @@ +/* + * @Author: Do not edit + * @Date: 2024-02-21 13:43:02 + * @LastEditTime: 2024-04-30 10:07:59 + * @LastEditors: zwq + * @Description: + */ +import request from '@/utils/request' + +// 获得关联表名 +export function getplcAllList(query) { + return request({ + url: '/base/equipment-plc/listAll', + method: 'get', + params: query + }) +} + +// 获得设备 +export function getEquipmentList(query) { + return request({ + url: '/base/core-equipment/page', + method: 'get', + params: query + }) +} + +// 根据产线获得工段 +export function listByParentId(query) { + return request({ + url: '/base/core-workshop-section/listByParentId', + method: 'get', + params: query + }) +} + +// 获得产线工段设备树形结构 +export function getTree(query) { + return request({ + url: '/base/factory/getTree', + method: 'get', + params: query + }) +} + +// 获得设备分组列表 +export function getgroupAllList(query) { + return request({ + url: '/base/equipment-group/listAll', + method: 'get', + params: query + }) +} diff --git a/src/api/base/productionLine.js b/src/api/base/productionLine.js index 7fade9c9..5a226e94 100644 --- a/src/api/base/productionLine.js +++ b/src/api/base/productionLine.js @@ -1,3 +1,10 @@ +/* + * @Author: zwq + * @Date: 2024-03-27 15:49:55 + * @LastEditors: zwq + * @LastEditTime: 2024-09-10 14:36:19 + * @Description: + */ import request from '@/utils/request' // 获得所有工厂产线列表 export function getLineAll() { @@ -5,4 +12,12 @@ export function getLineAll() { url: '/base/production-line/listAll', method: 'get' }) -} \ No newline at end of file +} +// 获得产线分页 +export function getLinePage(query) { + return request({ + url: '/base/production-line/page', + method: 'get', + params: query + }) +} diff --git a/src/api/cost/costDeepRatioHis.js b/src/api/cost/costDeepRatioHis.js new file mode 100644 index 00000000..c273e5df --- /dev/null +++ b/src/api/cost/costDeepRatioHis.js @@ -0,0 +1,55 @@ +/* + * @Author: zwq + * @Date: 2024-04-18 16:53:17 + * @LastEditors: zwq + * @LastEditTime: 2024-09-06 15:00:09 + * @Description: + */ + +import request from '@/utils/request' +// 更新深加工良品率 +export function updateDeepRatioHis(data) { + return request({ + url: '/monitoring/cost-deep-ratio-his/update', + method: 'put', + data: data + }) +} +// 获得深加工产线良品率 +export function getDeepPDRatioHisPage(query) { + return request({ + url: '/monitoring/cost-deep-ratio-his/page-pd', + method: 'get', + params: query + }) +} +// 获得深加工工段良品率 +export function getDeepWSRatioHisPage(query) { + return request({ + url: '/monitoring/cost-deep-ratio-his/page-ws', + method: 'get', + params: query + }) +} + +// 导出深加工工段良品率 Excel +export function exportDeepWSRatioHisExcel(query) { + return request({ + url: '/monitoring/cost-deep-ratio-his/export-excel-ws', + method: 'get', + params: query, + responseType: 'blob' + }) +} + + +// 导出深加工产线良品率 Excel +export function exportDeepPDRatioHisExcel(query) { + return request({ + url: '/monitoring/cost-deep-ratio-his/export-excel-pd', + method: 'get', + params: query, + responseType: 'blob' + }) +} + diff --git a/src/api/cost/costEnergy.js b/src/api/cost/costEnergy.js index 7831ae34..38546f0d 100644 --- a/src/api/cost/costEnergy.js +++ b/src/api/cost/costEnergy.js @@ -32,3 +32,22 @@ export function getEnergyRealtimePage(query) { params: query }) } +// 导出能源成本成本查询 Excel +export function exportEnergyRealtimeExcel(query) { + return request({ + url: '/monitoring/cost-energy-realtime/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 导出能源成本历史 Excel +export function exportEnergyHisExcel(query) { + return request({ + url: '/monitoring/cost-energy-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costEnergyDeep.js b/src/api/cost/costEnergyDeep.js index adadc91a..081578a4 100644 --- a/src/api/cost/costEnergyDeep.js +++ b/src/api/cost/costEnergyDeep.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2024-04-18 16:53:17 * @LastEditors: zwq - * @LastEditTime: 2024-04-22 14:51:14 + * @LastEditTime: 2024-09-06 15:19:24 * @Description: */ @@ -32,3 +32,23 @@ export function getEnergyRealtimePage(query) { params: query }) } + +// 导出深加工能源成本成本查询 Excel +export function exportEnergyRealtimeExcel(query) { + return request({ + url: '/monitoring/cost-deep-energy-realtime/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 导出深加工能源成本历史 Excel +export function exportEnergyHisExcel(query) { + return request({ + url: '/monitoring/cost-deep-energy-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costMaterial.js b/src/api/cost/costMaterial.js index 9cf72cea..150dad07 100644 --- a/src/api/cost/costMaterial.js +++ b/src/api/cost/costMaterial.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2024-04-18 16:53:17 * @LastEditors: zwq - * @LastEditTime: 2024-04-19 16:12:14 + * @LastEditTime: 2024-09-05 13:55:30 * @Description: */ @@ -32,3 +32,23 @@ export function getMaterialRealtimePage(query) { params: query }) } + +// 导出原料成本成本查询 Excel +export function exportMaterialRealtimeExcel(query) { + return request({ + url: '/monitoring/cost-material-realtime/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 导出原料成本历史 Excel +export function exportMaterialHisExcel(query) { + return request({ + url: '/monitoring/cost-material-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costOriginRatioHis.js b/src/api/cost/costOriginRatioHis.js index f4a43db7..0f0343b3 100644 --- a/src/api/cost/costOriginRatioHis.js +++ b/src/api/cost/costOriginRatioHis.js @@ -24,3 +24,13 @@ export function getcostOriginRatioHisPage(query) { }) } +// 导出原片良品率 Excel +export function exportcostOriginRatioHisExcel(query) { + return request({ + url: '/monitoring/cost-origin-ratio-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + diff --git a/src/api/cost/costOthercostHis.js b/src/api/cost/costOthercostHis.js index ee3f1695..d305affa 100644 --- a/src/api/cost/costOthercostHis.js +++ b/src/api/cost/costOthercostHis.js @@ -32,3 +32,22 @@ export function getRawOthercostSunPage(query) { params: query }) } +// 导出原片其他成本-成本查询 Excel +export function exportRawOthercostSunExcel(query) { + return request({ + url: '/monitoring/cost-othercost-log/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 导出原片其他成本-历史 Excel +export function exportRawOthercostHisExcel(query) { + return request({ + url: '/monitoring/cost-othercost-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costOthercostHisDeep.js b/src/api/cost/costOthercostHisDeep.js index fdf06342..8bc73c95 100644 --- a/src/api/cost/costOthercostHisDeep.js +++ b/src/api/cost/costOthercostHisDeep.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2024-04-18 16:53:17 * @LastEditors: zwq - * @LastEditTime: 2024-04-22 15:15:18 + * @LastEditTime: 2024-09-06 15:13:20 * @Description: */ @@ -32,3 +32,22 @@ export function getRawOthercostSunPage(query) { params: query }) } +// 导出深加工其他成本-成本查询 Excel +export function exportRawOthercostSunExcel(query) { + return request({ + url: '/monitoring/cost-deep-othercost-log/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 导出深加工其他成本-历史 Excel +export function exportRawOthercostHisExcel(query) { + return request({ + url: '/monitoring/cost-deep-othercost-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/cost/costOthercostLog.js b/src/api/cost/costOthercostLog.js index 553d4cd0..bff532e8 100644 --- a/src/api/cost/costOthercostLog.js +++ b/src/api/cost/costOthercostLog.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2024-04-15 17:01:20 * @LastEditors: zwq - * @LastEditTime: 2024-04-18 15:40:27 + * @LastEditTime: 2024-09-06 14:12:09 * @Description: */ import request from '@/utils/request' @@ -53,7 +53,7 @@ export function getRawOthercostLogPage(query) { // 导出原片其他成本-记录 Excel export function exportRawOthercostLogExcel(query) { return request({ - url: '/monitoring/cost-othercost-log/export-excel', + url: '/monitoring/cost-othercost-log/export-log-excel', method: 'get', params: query, responseType: 'blob' diff --git a/src/api/cost/costOthercostLogDeep.js b/src/api/cost/costOthercostLogDeep.js index bfdcb0d2..e0f86046 100644 --- a/src/api/cost/costOthercostLogDeep.js +++ b/src/api/cost/costOthercostLogDeep.js @@ -53,7 +53,7 @@ export function getRawOthercostLogPage(query) { // 导出深加工其他成本-记录 Excel export function exportRawOthercostLogExcel(query) { return request({ - url: '/monitoring/cost-deep-othercost-log/export-excel', + url: '/monitoring/cost-deep-othercost-log/export-log-excel', method: 'get', params: query, responseType: 'blob' diff --git a/src/api/cost/deepCostStatistics.js b/src/api/cost/deepCostStatistics.js new file mode 100644 index 00000000..7c86e852 --- /dev/null +++ b/src/api/cost/deepCostStatistics.js @@ -0,0 +1,53 @@ +/* + * @Author: zwq + * @Date: 2024-04-18 16:53:17 + * @LastEditors: zwq + * @LastEditTime: 2024-09-02 14:43:30 + * @Description: + */ + +import request from '@/utils/request' + +// 获得深加工成本分页 +export function getDeepCostStatisticsPage(query) { + return request({ + url: '/monitoring/cost-deep-cost-his/page', + method: 'get', + params: query + }) +} +// 更新深加工成本-历史 +export function updateDeepCostStatistics(data) { + return request({ + url: '/monitoring/cost-deep-cost-his/update', + method: 'put', + data: data + }) +} +// 获得深加工成本统计成本查询分页 +export function getDeepCostStatisticsRealtimePage(query) { + return request({ + url: '/monitoring/cost-deep-cost-realtime/page', + method: 'get', + params: query + }) +} + +// 导出深加工成本统计成本查询 Excel +export function exportDeepStatisticsRealtimeExcel(query) { + return request({ + url: '/monitoring/cost-deep-cost-realtime/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} +// 导出深加工成本统计-历史成本 Excel +export function exportDeepCostStatisticsHisExcel(query) { + return request({ + url: '/monitoring/cost-deep-cost-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/cost/rawCostStatistics.js b/src/api/cost/rawCostStatistics.js new file mode 100644 index 00000000..c93ce7ec --- /dev/null +++ b/src/api/cost/rawCostStatistics.js @@ -0,0 +1,54 @@ +/* + * @Author: zwq + * @Date: 2024-04-18 16:53:17 + * @LastEditors: zwq + * @LastEditTime: 2024-09-06 14:35:13 + * @Description: + */ + +import request from '@/utils/request' + +// 获得原片成本分页 +export function getRawCostStatisticsPage(query) { + return request({ + url: '/monitoring/cost-origincost-his/page', + method: 'get', + params: query + }) +} +// 更新原片成本-历史 +export function updateRawCostStatistics(data) { + return request({ + url: '/monitoring/cost-origincost-his/update', + method: 'put', + data: data + }) +} +// 获得原片成本统计成本查询分页 +export function getRawCostStatisticsRealtimePage(query) { + return request({ + url: '/monitoring/cost-origin-cost-realtime/page', + method: 'get', + params: query + }) +} + +// 导出原片成本统计成本查询 Excel +export function exportRawStatisticsRealtimeExcel(query) { + return request({ + url: '/monitoring/cost-origin-cost-realtime/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 导出原片成本统计-历史成本 Excel +export function exportRawCostStatisticsHisExcel(query) { + return request({ + url: '/monitoring/cost-origincost-his/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/components/ButtonNav/index.vue b/src/components/ButtonNav/index.vue new file mode 100644 index 00000000..c3bc57aa --- /dev/null +++ b/src/components/ButtonNav/index.vue @@ -0,0 +1,132 @@ + + + + + + + + + diff --git a/src/filter/code-filter.js b/src/filter/code-filter.js index 23c4b8b1..8297f577 100644 --- a/src/filter/code-filter.js +++ b/src/filter/code-filter.js @@ -2,7 +2,7 @@ /* * @Date: 2020-12-29 16:49:28 * @LastEditors: zwq - * @LastEditTime: 2023-12-07 10:00:51 + * @LastEditTime: 2024-09-10 15:15:21 * @FilePath: \basic-admin\src\filters\basicData\index.js * @Description: */ @@ -47,7 +47,7 @@ export function parseTime(time, pattern) { 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),''); + 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 @@ -61,14 +61,25 @@ export function parseTime(time, pattern) { h: date.getHours(), i: date.getMinutes(), s: date.getSeconds(), - a: date.getDay() + a: date.getDay(), + w: '', } - const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { + const time_str = format.replace(/{([ymdhisaw])+}/g, (result, key) => { let value = formatObj[key] // Note: getDay() returns 0 on Sunday if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } + if (key === 'w') { + const current = new Date(time); + current.setHours(0, 0, 0); + current.setDate(current.getDate() + 4 - (current.getDay() || 7)); + const firstThursday = new Date(current.getFullYear(), 0, 4); + firstThursday.setDate(firstThursday.getDate() + 4 - (firstThursday.getDay() || 7)); + const time1 = current.getTime() - firstThursday.getTime(); + const weeks = Math.ceil(time1 / (7 * 24 * 3600 * 1000)); + return (weeks + 1) + } if (result.length > 0 && value < 10) { value = '0' + value } diff --git a/src/router/index.js b/src/router/index.js index 9ac00be5..509a429c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -76,9 +76,10 @@ export const constantRoutes = [ children: [ { path: "index", - component: (resolve) => require(["@/views/index"], resolve), + component: (resolve) => require(["@/views/cost/raw/costMaterial/index"], resolve), name: "首页", meta: { title: "首页", icon: "dashboard", affix: true }, + hidden: true }, ], }, diff --git a/src/views/base/equipmentBindGroup/components/BasicDrawer.vue b/src/views/base/equipmentBindGroup/components/BasicDrawer.vue index 3bfb196c..cb47e181 100644 --- a/src/views/base/equipmentBindGroup/components/BasicDrawer.vue +++ b/src/views/base/equipmentBindGroup/components/BasicDrawer.vue @@ -1,8 +1,8 @@ -