|
@ -90,6 +90,7 @@ import * as DeviceMaintenanceApi from '@/api/eam/basic/deviceMaintenance' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
import { updateForm } from '@/api/bpm/form' |
|
|
import { updateForm } from '@/api/bpm/form' |
|
|
|
|
|
import * as DeptApi from '@/api/system/dept' |
|
|
const userStore = useUserStore() // 用户信息 |
|
|
const userStore = useUserStore() // 用户信息 |
|
|
|
|
|
|
|
|
defineOptions({ name: 'DeviceMaintenance' }) |
|
|
defineOptions({ name: 'DeviceMaintenance' }) |
|
@ -109,13 +110,38 @@ const updateFormValue = reactive({ |
|
|
const openDataOld = ref() |
|
|
const openDataOld = ref() |
|
|
const openDataNew = ref() |
|
|
const openDataNew = ref() |
|
|
const operatType = ref('') |
|
|
const operatType = ref('') |
|
|
|
|
|
const tzDeptId = ref() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
|
|
if(formField == 'deviceNumber' && val[0].factoryAreaNumber == tzDeptId.value){ |
|
|
|
|
|
DeviceMaintenance.allSchemas.formSchema.find(item=>{ |
|
|
|
|
|
return item.field == 'executionCycle' |
|
|
|
|
|
}).componentProps.disabled = true |
|
|
|
|
|
DeviceMaintenance.allSchemas.formSchema.find(item=>{ |
|
|
|
|
|
return item.field == 'executionCycleMonth' |
|
|
|
|
|
}).componentProps.disabled = false |
|
|
|
|
|
DeviceMaintenance.allSchemas.formSchema.find(item=>{ |
|
|
|
|
|
return item.field == 'executionCycleWeek' |
|
|
|
|
|
}).componentProps.disabled = false |
|
|
|
|
|
}else{ |
|
|
|
|
|
DeviceMaintenance.allSchemas.formSchema.find(item=>{ |
|
|
|
|
|
return item.field == 'executionCycle' |
|
|
|
|
|
}).componentProps.disabled = false |
|
|
|
|
|
DeviceMaintenance.allSchemas.formSchema.find(item=>{ |
|
|
|
|
|
return item.field == 'executionCycleMonth' |
|
|
|
|
|
}).componentProps.disabled = true |
|
|
|
|
|
DeviceMaintenance.allSchemas.formSchema.find(item=>{ |
|
|
|
|
|
return item.field == 'executionCycleWeek' |
|
|
|
|
|
}).componentProps.disabled = true |
|
|
|
|
|
} |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
setV['executionCycle'] = null |
|
|
|
|
|
setV['executionCycleMonth'] = null |
|
|
|
|
|
setV['executionCycleWeek'] = null |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -186,6 +212,13 @@ const basicFormRef = ref() |
|
|
const openForm = (type: string, row?: any) => { |
|
|
const openForm = (type: string, row?: any) => { |
|
|
openDataOld.value = row |
|
|
openDataOld.value = row |
|
|
updateFormValue.remark = '' |
|
|
updateFormValue.remark = '' |
|
|
|
|
|
DeptApi.getSimpleDeptList().then(res=>{ |
|
|
|
|
|
res.forEach(item=>{ |
|
|
|
|
|
if(item.busiType == 'TZ'){ |
|
|
|
|
|
tzDeptId.value = item.id |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
basicFormRef.value.open(type, row) |
|
|
basicFormRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|