ljlong_2630 7 months ago
parent
commit
cbb18b3989
  1. 58
      src/views/eam/basic/basciYearEquipment/index.vue
  2. 1
      src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
  3. 2
      src/views/eam/device/deviceSpotInspectionRecordMain/index.vue
  4. 2
      src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
  5. 10
      src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
  6. 24
      src/views/home/index.vue

58
src/views/eam/basic/basciYearEquipment/index.vue

@ -38,10 +38,10 @@
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" /> <ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
<template #goal="{ row }"> <template #goal="{ row }">
<span>{{ row.goal+"%" }}</span> <span>{{ row.type=='0'?row.goal+"%":row.goal }}</span>
</template> </template>
<template #actual="{ row }"> <template #actual="{ row }">
<span>{{ row.goal==null?"":row.goal+"%" }}</span> <span>{{ row.actual==null||row.actual==""||row.type!='0'?row.actual:row.actual+"%" }}</span>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -170,37 +170,41 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if (type == 'update') { // if (type == 'update') {
console.log("123",BasciYearEquipment.allSchemas.formSchema); // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factoryType').componentProps.disabled = true//
BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factoryType').componentProps.disabled = true// // // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factory_type').componentProps.disabled = true//
// BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factory_type').componentProps.disabled = true// // //BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'year_index').componentProps.disabled = true//
//BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'year_index').componentProps.disabled = true// // }else{
} // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factoryType').componentProps.disabled = false//
// }
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
// form // form
const formsSuccess = async (formType, data) => { const formsSuccess = async (formType, data) => {
var isHave = BasciYearEquipment.allSchemas.formSchema.some(function (item) { try {
return item.field === 'activeTime' || item.field === 'expireTime' var isHave = BasciYearEquipment.allSchemas.formSchema.some(function (item) {
}) return item.field === 'activeTime' || item.field === 'expireTime'
if (isHave) { })
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) { if (isHave) {
message.error('失效时间要大于生效时间') if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
return message.error('失效时间要大于生效时间')
return
}
} }
} if (data.activeTime == 0) data.activeTime = null
if (data.activeTime == 0) data.activeTime = null if (data.expireTime == 0) data.expireTime = null
if (data.expireTime == 0) data.expireTime = null if (formType === 'create') {
if (formType === 'create') { await BasciYearEquipmentApi.createBasciYearEquipment(data)
await BasciYearEquipmentApi.createBasciYearEquipment(data) message.success(t('common.createSuccess'))
message.success(t('common.createSuccess')) } else {
} else { await BasciYearEquipmentApi.updateBasciYearEquipment(data)
await BasciYearEquipmentApi.updateBasciYearEquipment(data) message.success(t('common.updateSuccess'))
message.success(t('common.updateSuccess')) }
} basicFormRef.value.dialogVisible = false
basicFormRef.value.dialogVisible = false getList()
getList() }catch{
basicFormRef.value.dialogVisible = false}
} }
/** 详情操作 */ /** 详情操作 */

1
src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts

@ -255,6 +255,7 @@ export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive<CrudSche
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable: false, isTable: false,
isDetail:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

2
src/views/eam/device/deviceSpotInspectionRecordMain/index.vue

@ -77,6 +77,7 @@
:apiPage="DeviceSpotInspectionRecordDetailApi.getDeviceSpotInspectionRecordDetailPage" :apiPage="DeviceSpotInspectionRecordDetailApi.getDeviceSpotInspectionRecordDetailPage"
:apiDelete="DeviceSpotInspectionRecordDetailApi.deleteDeviceSpotInspectionRecordDetail" :apiDelete="DeviceSpotInspectionRecordDetailApi.deleteDeviceSpotInspectionRecordDetail"
:Echo="Echo" :Echo="Echo"
:isShowAddBtn="false"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@ -523,6 +524,7 @@ const onSubmit = async (status: string) => {
getList(); getList();
} finally { } finally {
formRef.value.formLoading = false; formRef.value.formLoading = false;
updateFormValue.value.approveOpinion = "";
} }
} }

2
src/views/eam/mold/moldSpotInspectionRecordMain/index.vue

@ -77,6 +77,7 @@
:apiPage="DeviceSpotInspectionRecordDetailApi.getDeviceSpotInspectionRecordDetailPage" :apiPage="DeviceSpotInspectionRecordDetailApi.getDeviceSpotInspectionRecordDetailPage"
:apiDelete="DeviceSpotInspectionRecordDetailApi.deleteDeviceSpotInspectionRecordDetail" :apiDelete="DeviceSpotInspectionRecordDetailApi.deleteDeviceSpotInspectionRecordDetail"
:Echo="Echo" :Echo="Echo"
:isShowAddBtn="false"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@ -538,6 +539,7 @@ const onSubmit = async (status: string) => {
getList(); getList();
} finally { } finally {
formRef.value.formLoading = false; formRef.value.formLoading = false;
updateFormValue.value.approveOpinion = "";
} }
} }

10
src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts

@ -2,6 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { selectAllFactoryArea } from '@/api/system/dept' import { selectAllFactoryArea } from '@/api/system/dept'
import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
import * as MOldAccountsApi from '@/api/eam/mold/moldAccounts'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { selecUserByType } from '@/api/system/dept' import { selecUserByType } from '@/api/system/dept'
import { ItemSearchTable } from '../../basic/item/item.data' import { ItemSearchTable } from '../../basic/item/item.data'
@ -14,8 +15,8 @@ const factoryList = await selectAllFactoryArea()
const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({})
const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 })
const userListAll = await UserApi.getSimpleUserList() const userListAll = await UserApi.getSimpleUserList()
const deviceListNoPage = await DeviceAccountsApi.getDeviceAccountsAllNoPage({}) const deviceListNoPage = await MOldAccountsApi.getMoldAccountsAllNoPage({})
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'DEVICE') const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD')
const deviceDeviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE) const deviceDeviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const isConformList = [{ const isConformList = [{
label:'是', label:'是',
@ -211,7 +212,7 @@ export const DeviceSpotInspectionRecordDetailRules = reactive({
export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '检修工单号', label: '巡检点检工单号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
@ -254,7 +255,8 @@ export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive<CrudSche
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable: true, isTable: false,
isDetail:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

24
src/views/home/index.vue

@ -127,7 +127,7 @@
</ul> </ul>
<ul class="table ul-body"> <ul class="table ul-body">
<li class="one">平均故障恢复时间(MTTR/min)</li> <li class="one">平均故障恢复时间(MTTR/min)</li>
<li class="two orange">{{ yearTarget.zsHFGoal || '0%' }}</li> <li class="two orange">{{ yearTarget.zsHFGoal || '0' }}</li>
<li <li
class="three" class="three"
:class=" :class="
@ -135,12 +135,12 @@
? 'red' ? 'red'
: 'green' : 'green'
" "
>{{ yearTarget.zsHFActual || '0%' }}</li >{{ yearTarget.zsHFActual || '0' }}</li
> >
</ul> </ul>
<ul class="table ul-body"> <ul class="table ul-body">
<li class="one">平均故障间隔时间(H)</li> <li class="one">平均故障间隔时间(H)</li>
<li class="two orange">{{ yearTarget.zsJGGoal || '0%' }}</li> <li class="two orange">{{ yearTarget.zsJGGoal || '0' }}</li>
<li <li
class="three" class="three"
:class=" :class="
@ -148,7 +148,7 @@
? 'red' ? 'red'
: 'green' : 'green'
" "
>{{ yearTarget.zsJGActual || '0%' }}</li >{{ yearTarget.zsJGActual || '0' }}</li
> >
</ul> </ul>
</div> </div>
@ -178,7 +178,7 @@
</ul> </ul>
<ul class="table ul-body"> <ul class="table ul-body">
<li class="one">平均故障恢复时间(MTTR/min)</li> <li class="one">平均故障恢复时间(MTTR/min)</li>
<li class="two orange">{{ yearTarget.zpHFGoal || '0%' }}</li> <li class="two orange">{{ yearTarget.zpHFGoal || '0' }}</li>
<li <li
class="three" class="three"
:class=" :class="
@ -186,12 +186,12 @@
? 'red' ? 'red'
: 'green' : 'green'
" "
>{{ yearTarget.zpHFActual || '0%' }}</li >{{ yearTarget.zpHFActual || '0' }}</li
> >
</ul> </ul>
<ul class="table ul-body"> <ul class="table ul-body">
<li class="one">平均故障间隔时间(H)</li> <li class="one">平均故障间隔时间(H)</li>
<li class="two orange">{{ yearTarget.zpJGGoal || '0%' }}</li> <li class="two orange">{{ yearTarget.zpJGGoal || '0' }}</li>
<li <li
class="three" class="three"
:class=" :class="
@ -199,7 +199,7 @@
? 'red' ? 'red'
: 'green' : 'green'
" "
>{{ yearTarget.zpJGActual || '0%' }}</li >{{ yearTarget.zpJGActual || '0' }}</li
> >
</ul> </ul>
</div> </div>
@ -229,7 +229,7 @@
</ul> </ul>
<ul class="table ul-body"> <ul class="table ul-body">
<li class="one">平均故障恢复时间(MTTR/min)</li> <li class="one">平均故障恢复时间(MTTR/min)</li>
<li class="two orange">{{ yearTarget.tzHFGoal || '0%' }}</li> <li class="two orange">{{ yearTarget.tzHFGoal || '0' }}</li>
<li <li
class="three" class="three"
:class=" :class="
@ -237,12 +237,12 @@
? 'red' ? 'red'
: 'green' : 'green'
" "
>{{ yearTarget.tzHFActual || '0%' }}</li >{{ yearTarget.tzHFActual || '0' }}</li
> >
</ul> </ul>
<ul class="table ul-body"> <ul class="table ul-body">
<li class="one">平均故障间隔时间(H)</li> <li class="one">平均故障间隔时间(H)</li>
<li class="two orange">{{ yearTarget.tzJGGoal || '0%' }}</li> <li class="two orange">{{ yearTarget.tzJGGoal || '0' }}</li>
<li <li
class="three" class="three"
:class=" :class="
@ -250,7 +250,7 @@
? 'red' ? 'red'
: 'green' : 'green'
" "
>{{ yearTarget.tzJGActual || '0%' }}</li >{{ yearTarget.tzJGActual || '0' }}</li
> >
</ul> </ul>
</div> </div>

Loading…
Cancel
Save