Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
91fa68ae0c
  1. 6
      .env.hella15
  2. 4
      .env.hella16
  3. 24
      nginx_prod.conf
  4. 7
      src/api/eam/basicDocumentType/index.ts
  5. 7
      src/api/eam/basicFaultCause/index.ts
  6. 7
      src/api/eam/basicFaultType/index.ts
  7. 7
      src/api/eam/equipmentMainPart/index.ts
  8. 7
      src/api/eam/inspectionItem/index.ts
  9. 8
      src/api/eam/spotCheckItem/index.ts
  10. 20
      src/views/eam/basicDocumentType/basicDocumentType.data.ts
  11. 15
      src/views/eam/basicFaultCause/basicFaultCause.data.ts
  12. 15
      src/views/eam/basicFaultType/basicFaultType.data.ts
  13. 2
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts
  14. 2
      src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts
  15. 25
      src/views/eam/equipmentMainPart/equipmentMainPart.data.ts
  16. 12
      src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts
  17. 33
      src/views/eam/equipmentManufacturer/index.vue
  18. 12
      src/views/eam/equipmentSupplier/equipmentSupplier.data.ts
  19. 32
      src/views/eam/equipmentSupplier/index.vue
  20. 15
      src/views/eam/inspectionItem/index.vue
  21. 12
      src/views/eam/spotCheckItem/index.vue

6
.env.hella15

@ -4,10 +4,10 @@ NODE_ENV=production
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='http://172.21.32.15/api' VITE_BASE_URL='https://172.21.32.15:55563/api'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://172.21.32.15/api/admin-api/infra/file/upload' VITE_UPLOAD_URL='https://172.21.32.15:55563/api/admin-api/infra/file/upload'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH= VITE_API_BASEPATH=
@ -37,4 +37,4 @@ VITE_INTERFACE_URL='http://172.21.32.15:90/magic/web/index.html'
VITE_JMREPORT_BASE_URL='http://172.21.32.15:90' VITE_JMREPORT_BASE_URL='http://172.21.32.15:90'
# 租户配置 # 租户配置
VITE_TENANT='["长春"]' VITE_TENANT='["长春","成都"]'

4
.env.hella16

@ -4,10 +4,10 @@ NODE_ENV=production
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='http://172.21.32.16/api' VITE_BASE_URL='https://172.21.32.16:55563/api'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://172.21.32.16/api/admin-api/infra/file/upload' VITE_UPLOAD_URL='https://172.21.32.16:55563/api/admin-api/infra/file/upload'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH= VITE_API_BASEPATH=

24
nginx_prod.conf

@ -49,5 +49,29 @@ http {
index index.html index.htm; index index.html index.htm;
} }
} }
server {
listen 55563 ssl;
server_name_in_redirect off;
server_name _;
ssl_certificate /opt/faway-hella/faway-hella.com.pem;
ssl_certificate_key /opt/faway-hella/faway-hella.com.key;
location /api/ {
proxy_pass http://sfms3.0/;
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
}
location /profile/ {
alias /opt/profile/;
index index.html index.htm;
}
location / {
try_files $uri $uri/ /index.html;
root /opt/sfms3.0;
index index.html index.htm;
}
}
} }

7
src/api/eam/basicDocumentType/index.ts

@ -48,7 +48,12 @@ export const deleteDocumentType = async (id: number) => {
// 导出文档类型 Excel // 导出文档类型 Excel
export const exportDocumentType = async (params) => { export const exportDocumentType = async (params) => {
return await request.download({ url: `/eam/document-type/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/document-type/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/document-type/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

7
src/api/eam/basicFaultCause/index.ts

@ -49,7 +49,12 @@ export const deleteBasicFaultCause = async (id: number) => {
// 导出故障原因 Excel // 导出故障原因 Excel
export const exportBasicFaultCause = async (params) => { export const exportBasicFaultCause = async (params) => {
return await request.download({ url: `/eam/basic-fault-cause/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/basic-fault-cause/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/basic-fault-cause/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

7
src/api/eam/basicFaultType/index.ts

@ -48,7 +48,12 @@ export const deleteBasicFaultType = async (id: number) => {
// 导出故障类型 Excel // 导出故障类型 Excel
export const exportBasicFaultType = async (params) => { export const exportBasicFaultType = async (params) => {
return await request.download({ url: `/eam/basic-fault-type/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/basic-fault-type/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/basic-fault-type/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

7
src/api/eam/equipmentMainPart/index.ts

@ -48,7 +48,12 @@ export const deleteEquipmentMainPart = async (id: number) => {
// 导出主要部件 Excel // 导出主要部件 Excel
export const exportEquipmentMainPart = async (params) => { export const exportEquipmentMainPart = async (params) => {
return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/equipment-main-part/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/equipment-main-part/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

7
src/api/eam/inspectionItem/index.ts

@ -48,7 +48,12 @@ export const deleteInspectionItem = async (id: number) => {
// 导出巡检项 Excel // 导出巡检项 Excel
export const exportInspectionItem = async (params) => { export const exportInspectionItem = async (params) => {
return await request.download({ url: `/eam/basic/inspection-item/export-excel`, params }) if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/eam/basic/inspection-item/export-excel-senior`, data })
} else {
return await request.download({ url: `/eam/basic/inspection-item/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

8
src/api/eam/spotCheckItem/index.ts

@ -47,7 +47,13 @@ export const deleteSpotCheckItem = async (id: number) => {
// 导出点检项 Excel // 导出点检项 Excel
export const exportSpotCheckItem = async (params) => { export const exportSpotCheckItem = async (params) => {
return await request.download({ url: `/eam/basic/spot-check-item/export-excel`, params }) if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.downloadPost({ url: `/eam/basic/spot-check-item/export-excel-senior`, data })
} else {
return await request.download({ url: `/eam/basic/spot-check-item/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

20
src/views/eam/basicDocumentType/basicDocumentType.data.ts

@ -35,7 +35,12 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
label: '类型设备', label: '类型设备',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: {
component: 'Select'
}
}, },
{ {
label: '创建时间', label: '创建时间',
@ -81,14 +86,13 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
form: { dictType: DICT_TYPE.TRUE_FALSE,
component: 'Switch', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
value: 'TRUE', isTable: true,
componentProps: { isDetail: false,
inactiveValue: 'FALSE', isSearch: false,
activeValue: 'TRUE' isTableForm: false,
} isForm: false,
},
}, },
{ {
label: '删除时间', label: '删除时间',

15
src/views/eam/basicFaultCause/basicFaultCause.data.ts

@ -92,14 +92,13 @@ export const BasicFaultCause = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
form: { dictType: DICT_TYPE.TRUE_FALSE,
component: 'Switch', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
value: 'TRUE', isTable: true,
componentProps: { isDetail: false,
inactiveValue: 'FALSE', isSearch: false,
activeValue: 'TRUE' isTableForm: false,
} isForm: false,
},
}, },
{ {
label: '删除时间', label: '删除时间',

15
src/views/eam/basicFaultType/basicFaultType.data.ts

@ -79,14 +79,13 @@ export const BasicFaultType = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
form: { dictType: DICT_TYPE.TRUE_FALSE,
component: 'Switch', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
value: 'TRUE', isTable: true,
componentProps: { isDetail: false,
inactiveValue: 'FALSE', isSearch: false,
activeValue: 'TRUE' isTableForm: false,
} isForm: false,
},
}, },
{ {
label: '删除时间', label: '删除时间',

2
src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

@ -51,7 +51,7 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '来源于类型配置', label: '巡检项',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

2
src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts

@ -51,7 +51,7 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '来源于类型配置', label: '保养项',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

25
src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

@ -31,10 +31,15 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '设备工装枚举', label: '类型',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: {
component: 'Select'
}
}, },
{ {
label: '创建时间', label: '创建时间',
@ -77,18 +82,16 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isDetail:false, isDetail:false,
}, },
{ {
label: '是否用', label: '是否用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true, dictType: DICT_TYPE.TRUE_FALSE,
form: { dictClass: 'string', // 默认都是字符串类型其他暂不考虑
component: 'Switch', isTable: true,
value: 'TRUE', isDetail: false,
componentProps: { isSearch: false,
inactiveValue: 'FALSE', isTableForm: false,
activeValue: 'TRUE' isForm: false,
}
},
}, },
{ {
label: '删除时间', label: '删除时间',

12
src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts

@ -96,6 +96,18 @@ export const EquipmentManufacturer = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

33
src/views/eam/equipmentManufacturer/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -90,6 +90,15 @@ const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const judgeStatus = (row) =>{
if(row.available === 'TRUE'){
return true
}else{
return false
}
}
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: EquipmentManufacturerApi.getEquipmentManufacturerPage // getListApi: EquipmentManufacturerApi.getEquipmentManufacturerPage //
}) })
@ -132,10 +141,13 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = [ const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-manufacturer:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-manufacturer:update'}), //
defaultButtons.mainListEnableBtn({hasPermi:'eam:inspection-item:enable',hide: judgeStatus(row)}), //
defaultButtons.mainListDisableBtn({hasPermi:'eam:inspection-item:disable',hide: !judgeStatus(row)}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-manufacturer:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-manufacturer:delete'}), //
] ]}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'enable') { //
handleEnable(row,'TRUE')
}else if (val == 'disable') {//
handleEnable(row,'FALSE')
} }
} }
@ -235,6 +251,17 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const handleEnable = (row,enable) =>{
message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
row.available = enable
EquipmentManufacturerApi.updateEquipmentManufacturer(row).then(res => {
message.success(t('common.updateSuccess'))
getList()
})
})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

12
src/views/eam/equipmentSupplier/equipmentSupplier.data.ts

@ -102,6 +102,18 @@ export const EquipmentSupplier = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

32
src/views/eam/equipmentSupplier/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -90,6 +90,15 @@ const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const judgeStatus = (row) =>{
if(row.available === 'TRUE'){
return true
}else{
return false
}
}
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: EquipmentSupplierApi.getEquipmentSupplierPage // getListApi: EquipmentSupplierApi.getEquipmentSupplierPage //
}) })
@ -132,10 +141,13 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = [ const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-supplier:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-supplier:update'}), //
defaultButtons.mainListEnableBtn({hasPermi:'eam:inspection-item:enable',hide: judgeStatus(row)}), //
defaultButtons.mainListDisableBtn({hasPermi:'eam:inspection-item:disable',hide: !judgeStatus(row)}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-supplier:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-supplier:delete'}), //
] ]}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'enable') { //
handleEnable(row,'TRUE')
}else if (val == 'disable') {//
handleEnable(row,'FALSE')
} }
} }
@ -235,6 +251,16 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const handleEnable = (row,enable) =>{
message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
row.available = enable
EquipmentSupplierApi.updateEquipmentSupplier(row).then(res => {
message.success(t('common.updateSuccess'))
getList()
})
})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

15
src/views/eam/inspectionItem/index.vue

@ -253,16 +253,15 @@ const searchFormClick = (searchData) => {
} }
const handleEnable = (row,enable) =>{ const handleEnable = (row,enable) =>{
row.available = enable message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
InspectionItemApi.updateInspectionItem(row).then(res => { row.available = enable
message.success(t('common.updateSuccess')) InspectionItemApi.updateInspectionItem(row).then(res => {
getList() message.success(t('common.updateSuccess'))
}) getList()
})
})
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

12
src/views/eam/spotCheckItem/index.vue

@ -252,11 +252,13 @@ const searchFormClick = (searchData) => {
const handleEnable = (row,enable) =>{ const handleEnable = (row,enable) =>{
row.available = enable message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
SpotCheckItemApi.updateSpotCheckItem(row).then(res => { row.available = enable
message.success(t('common.updateSuccess')) SpotCheckItemApi.updateSpotCheckItem(row).then(res => {
getList() message.success(t('common.updateSuccess'))
}) getList()
})
})
} }
/** 初始化 **/ /** 初始化 **/

Loading…
Cancel
Save