From c6d8c5e62f6744c65f10e8cde6a78b71c436b493 Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Thu, 28 Mar 2024 10:07:18 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E6=8C=87=E6=A0=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/basic/basciYearEquipment/index.ts | 52 +++
.../eam/basic/basicMonthEquipment/index.ts | 54 +++
.../ImportForm/src/SYMonthImportForm.vue | 335 ++++++++++++++++++
src/utils/dict.ts | 2 +
.../basciYearEquipment.data.ts | 98 +++++
.../eam/basic/basciYearEquipment/index.vue | 270 ++++++++++++++
.../basicMonthEquipment.data.ts | 71 ++++
.../eam/basic/basicMonthEquipment/index.vue | 242 +++++++++++++
8 files changed, 1124 insertions(+)
create mode 100644 src/api/eam/basic/basciYearEquipment/index.ts
create mode 100644 src/api/eam/basic/basicMonthEquipment/index.ts
create mode 100644 src/components/ImportForm/src/SYMonthImportForm.vue
create mode 100644 src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts
create mode 100644 src/views/eam/basic/basciYearEquipment/index.vue
create mode 100644 src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts
create mode 100644 src/views/eam/basic/basicMonthEquipment/index.vue
diff --git a/src/api/eam/basic/basciYearEquipment/index.ts b/src/api/eam/basic/basciYearEquipment/index.ts
new file mode 100644
index 0000000..342b7ae
--- /dev/null
+++ b/src/api/eam/basic/basciYearEquipment/index.ts
@@ -0,0 +1,52 @@
+import request from '@/config/axios'
+
+export interface BasciYearEquipmentVO {
+ id: number
+ name: string
+ type: string
+ factoryType: string
+ yearIndex: Date
+ goal: number
+ actual: number
+}
+
+// 查询首页年设备指标列表
+export const getBasciYearEquipmentPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/eam/basci-year-equipment/senior', data })
+ } else {
+ return await request.get({ url: `/eam/basci-year-equipment/page`, params })
+ }
+}
+
+// 查询首页年设备指标详情
+export const getBasciYearEquipment = async (id: number) => {
+ return await request.get({ url: `/eam/basci-year-equipment/get?id=` + id })
+}
+
+// 新增首页年设备指标
+export const createBasciYearEquipment = async (data: BasciYearEquipmentVO) => {
+ return await request.post({ url: `/eam/basci-year-equipment/create`, data })
+}
+
+// 修改首页年设备指标
+export const updateBasciYearEquipment = async (data: BasciYearEquipmentVO) => {
+ return await request.put({ url: `/eam/basci-year-equipment/update`, data })
+}
+
+// 删除首页年设备指标
+export const deleteBasciYearEquipment = async (id: number) => {
+ return await request.delete({ url: `/eam/basci-year-equipment/delete?id=` + id })
+}
+
+// 导出首页年设备指标 Excel
+export const exportBasciYearEquipment = async (params) => {
+ return await request.download({ url: `/eam/basci-year-equipment/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/eam/basci-year-equipment/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/api/eam/basic/basicMonthEquipment/index.ts b/src/api/eam/basic/basicMonthEquipment/index.ts
new file mode 100644
index 0000000..a0a3bff
--- /dev/null
+++ b/src/api/eam/basic/basicMonthEquipment/index.ts
@@ -0,0 +1,54 @@
+import request from '@/config/axios'
+
+export interface BasicMonthEquipmentVO {
+ id: number
+ name: string
+ type: string
+ factoryType: string
+ monthIndex: string
+ actual: string
+ siteId: string
+ available: string
+ concurrencyStamp: number
+}
+
+// 查询首页月设备实现指标列表
+export const getBasicMonthEquipmentPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/eam/basic-month-equipment/senior', data })
+ } else {
+ return await request.get({ url: `/eam/basic-month-equipment/page`, params })
+ }
+}
+
+// 查询首页月设备实现指标详情
+export const getBasicMonthEquipment = async (id: number) => {
+ return await request.get({ url: `/eam/basic-month-equipment/get?id=` + id })
+}
+
+// 新增首页月设备实现指标
+export const createBasicMonthEquipment = async (data: BasicMonthEquipmentVO) => {
+ return await request.post({ url: `/eam/basic-month-equipment/create`, data })
+}
+
+// 修改首页月设备实现指标
+export const updateBasicMonthEquipment = async (data: BasicMonthEquipmentVO) => {
+ return await request.put({ url: `/eam/basic-month-equipment/update`, data })
+}
+
+// 删除首页月设备实现指标
+export const deleteBasicMonthEquipment = async (id: number) => {
+ return await request.delete({ url: `/eam/basic-month-equipment/delete?id=` + id })
+}
+
+// 导出首页月设备实现指标 Excel
+export const exportBasicMonthEquipment = async (params) => {
+ return await request.download({ url: `/eam/basic-month-equipment/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/eam/basic-month-equipment/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/components/ImportForm/src/SYMonthImportForm.vue b/src/components/ImportForm/src/SYMonthImportForm.vue
new file mode 100644
index 0000000..8e86271
--- /dev/null
+++ b/src/components/ImportForm/src/SYMonthImportForm.vue
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index f49c322..4bcbdde 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -302,5 +302,7 @@ export enum DICT_TYPE {
ITEM_SUBJECT = 'item_subject', //备件的科目
TURN_TYPE = 'turn_type', //转移类型
ORDER_COMPLETE_RESULT = 'order_complete_result', //维修工单完成结果
+ FACTORY_TYPE = 'factory_type',//厂区类别
+ EQUIPMENT_INDEX_NAME = 'equipment_index_name'//设备年度目标指标名称分类字段
}
diff --git a/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts b/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts
new file mode 100644
index 0000000..60305d5
--- /dev/null
+++ b/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts
@@ -0,0 +1,98 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const BasciYearEquipmentRules = reactive({
+ // name: [required],
+ type: [required],
+ factoryType: [required],
+ yearIndex: [required],
+ goal: [required]
+})
+
+export const BasciYearEquipment = useCrudSchemas(reactive([
+ {
+ label: 'id',
+ field: 'id',
+ sort: 'custom',
+ isForm: false,
+ isTable:false
+ },
+ // {
+ // label: '名称',
+ // field: 'name',
+ // sort: 'custom',
+ // form:{
+ // componentProps:{disabled:true},//属性
+ // // component:'Select' 展示什么类型输入框之类的
+ // }
+ // },
+ {
+ label: '类型名称',
+ field: 'type',
+ sort: 'custom',
+ dictType: DICT_TYPE.EQUIPMENT_INDEX_NAME,
+ dictClass: 'string',
+ form: {
+ component: 'Select'
+ }
+ },
+ {
+ label: '厂区类型',
+ field: 'factoryType',
+ sort: 'custom',
+ dictType: DICT_TYPE.FACTORY_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ form: {
+ component: 'Select'
+ }
+ },
+ {
+ label: '年指标',
+ field: 'yearIndex',
+ sort: 'custom',
+ form:{
+ component:'DatePicker',
+ componentProps:{
+ valueFormat:'YYYY',//格式化后端数据年
+ format:'YYYY'//格式化显示时间为年
+ }
+ }
+ },
+ {
+ label: '目标值',
+ field: 'goal',
+ sort: 'custom',
+ form:{
+ component:'InputNumber',
+
+ }
+ },
+ {
+ label: '实际值',
+ field: 'actual',
+ sort: 'custom',
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isForm: false
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
diff --git a/src/views/eam/basic/basciYearEquipment/index.vue b/src/views/eam/basic/basciYearEquipment/index.vue
new file mode 100644
index 0000000..1e9aa76
--- /dev/null
+++ b/src/views/eam/basic/basciYearEquipment/index.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.goal+"%" }}
+
+
+ {{ row.goal==null?"":row.goal+"%" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts b/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts
new file mode 100644
index 0000000..44e5e90
--- /dev/null
+++ b/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts
@@ -0,0 +1,71 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const BasicMonthEquipmentRules = reactive({
+ type: [required],
+ factoryType: [required],
+ monthIndex: [required],
+})
+
+export const BasicMonthEquipment = useCrudSchemas(reactive([
+ {
+ label: 'id',
+ field: 'id',
+ sort: 'custom',
+ isTable: false,
+ isForm: false,
+ },
+ // {
+ // label: '名称',
+ // field: 'name',
+ // sort: 'custom',
+ // },
+ {
+ label: '类型',
+ field: 'type',
+ dictType: DICT_TYPE.EQUIPMENT_INDEX_NAME,
+ dictClass: 'string',
+ sort: 'custom',
+ form: {
+ component: 'Select'
+ },
+ },
+ {
+ label: '厂区',
+ field: 'factoryType',
+ dictType: DICT_TYPE.FACTORY_TYPE,
+ dictClass: 'string',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'Select'
+ },
+ },
+ {
+ label: '年月',
+ field: 'monthIndex',
+ sort: 'custom',
+ },
+ {
+ label: '实际值',
+ field: 'actual',
+ sort: 'custom',
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isForm: false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
diff --git a/src/views/eam/basic/basicMonthEquipment/index.vue b/src/views/eam/basic/basicMonthEquipment/index.vue
new file mode 100644
index 0000000..c7deb1d
--- /dev/null
+++ b/src/views/eam/basic/basicMonthEquipment/index.vue
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.type=='0'?row.actual+"%":row.actual }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From c34dbec88ea0502e6b265893cb220b290a3df448 Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Thu, 28 Mar 2024 10:28:45 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=8C=E7=BB=B4?=
=?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=8310.62.139.32?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.production | 8 ++++----
nginx.conf | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.env.production b/.env.production
index 3baf54e..edd9cb1 100644
--- a/.env.production
+++ b/.env.production
@@ -4,10 +4,10 @@ NODE_ENV=test
VITE_DEV=false
# 请求路径
-VITE_BASE_URL='http://10.62.193.15:25100/api'
+VITE_BASE_URL='http://10.62.139.32:80/api'
# 上传路径
-VITE_UPLOAD_URL='http://10.62.193.15:25100/api/admin-api/infra/file/upload'
+VITE_UPLOAD_URL='http://10.62.139.32:80/api/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=
@@ -31,7 +31,7 @@ VITE_BASE_PATH=/
VITE_OUT_DIR=eam
# 自定义接口路径
-VITE_INTERFACE_URL='http://10.62.193.15:25110/magic/web/index.html'
+VITE_INTERFACE_URL='http://10.62.139.32:80/magic/web/index.html'
# 积木报表请求路径
-VITE_JMREPORT_BASE_URL='http://10.62.193.15:25110'
+VITE_JMREPORT_BASE_URL='http://10.62.139.32:80'
diff --git a/nginx.conf b/nginx.conf
index d5aa0a2..2679b86 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -27,10 +27,10 @@ http {
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
upstream eam {
- server localhost:25210 weight=10 max_fails=3 fail_timeout=10s;
+ server localhost:90 weight=10 max_fails=3 fail_timeout=10s;
}
server {
- listen 25200;
+ listen 80;
server_name_in_redirect off;
server_name dev.ccwin-in.com;
location /api/ {