Browse Source

台账代码补充

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
3bf08732bd
  1. 144
      src/components/Detail/src/DetailLedger.vue
  2. 7
      src/utils/dict.ts
  3. 72
      src/views/eam/equipmentAccounts/index.vue
  4. 98
      src/views/eam/equipmentInspectionRecordDetail/equipmentInspectionRecordDetail.data.ts
  5. 120
      src/views/eam/equipmentInspectionRecordMain/equipmentInspectionRecordMain.data.ts
  6. 96
      src/views/eam/equipmentMaintenanceRecordDetail/equipmentMaintenanceRecordDetail.data.ts
  7. 122
      src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts
  8. 86
      src/views/eam/equipmentRepairRecordDetail/equipmentRepairRecordDetail.data.ts
  9. 156
      src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
  10. 114
      src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts
  11. 126
      src/views/eam/equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data.ts

144
src/components/Detail/src/DetailLedger.vue

@ -55,12 +55,6 @@
v-model:currentPage="tableObjectRef.currentPage" v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort" v-model:sort="tableObjectRef.sort"
> >
<!-- <template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
/>
</template> -->
</Table> </Table>
<Table <Table
v-if="!isBasic && fromeWhere != 'countPlan'" v-if="!isBasic && fromeWhere != 'countPlan'"
@ -97,7 +91,56 @@
</template> </template>
</DetailTable> </DetailTable>
</ContentWrap> </ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<el-tabs class="demo-tabs" v-model="fileParmas.fileBusiType" @tab-change="handleTabsChange">
<el-tab-pane
v-for="item in subTabsList"
:key="item.value"
:label="item.label"
:name="item.value"
/>
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<AnnexLedger
:annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
:key="count"
@saveEdit="saveEdit"
/>
</ElScrollbar>
</el-tabs>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='操作记录'" :style="{height:remarkHeight+'px'}">
<el-tabs class="demo-tabs" v-model="operationRecordType" @tab-change="handleOperationTabsChange">
<el-tab-pane
v-for="item in operationRecordList"
:key="item.value"
:label="item.label"
:name="item.value"
/>
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Table
:columns="detailAllSchemasRef?.tableColumns?.filter(column => column.field !== 'action')"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDialog(row, '编号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
</Table>
</ElScrollbar>
</el-tabs>
</ContentWrap>
<!-- 附件/备注/变更记录 --> <!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}"> <ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<el-tabs class="demo-tabs" v-model="fileParmas.fileBusiType" @tab-change="handleTabsChange"> <el-tabs class="demo-tabs" v-model="fileParmas.fileBusiType" @tab-change="handleTabsChange">
@ -144,25 +187,7 @@
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='拓展属性'" :style="{height:remarkHeight+'px'}"> <ContentWrap class="w-[100%]" v-show="tabsList[current].label=='拓展属性'" :style="{height:remarkHeight+'px'}">
<!-- 拓展属性 --> <!-- 拓展属性 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- <el-form :model="form" :rules="rules" ref="expandPropsFormRef">
<el-row v-for="(field, index) in fields" :key="index" :gutter="20">
<el-col :span="8">
<el-form-item :label="field.code.label" :prop="field.code.prop">
<el-input v-model="form[field.code.prop]" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="field.value.label" :prop="field.value.prop">
<el-input v-model="form[field.value.prop]" />
</el-form-item>
</el-col>
<el-col :span="2">
<el-button type="danger" icon="el-icon-delete" @click="removeFields(index)">删除</el-button>
</el-col>
</el-row>
<el-button type="primary" @click="submitExpandPropsForm">提交</el-button>
<el-button @click="addFields">添加字段</el-button>
</el-form> -->
<AutoIncrementField :initialData="initialData" :codeLabelPrefix="codeLabelPrefix" :valueLabelPrefix="valueLabelPrefix" @submit="submitExpandPropsForm"/> <AutoIncrementField :initialData="initialData" :codeLabelPrefix="codeLabelPrefix" :valueLabelPrefix="valueLabelPrefix" @submit="submitExpandPropsForm"/>
</ElScrollbar> </ElScrollbar>
</ContentWrap> </ContentWrap>
@ -390,6 +415,21 @@ const props = defineProps({
required: false, required: false,
default: '' default: ''
}, },
operationRecordList: {
type: Array,
required: false,
default: () => []
},
dialogApiPage: {
type: Function,
required: false,
default: null
},
dialogAllSchemas: {
type: Object,
required: false,
default: null
},
// //
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
@ -400,6 +440,8 @@ const fileParmas = ref({
funcCode: props.funcCode, funcCode: props.funcCode,
fileBusiType: '' fileBusiType: ''
}) })
const operationRecordType = ref()
const operationRecordList = ref(props.operationRecordList)
if (props.isBasic == true) { if (props.isBasic == true) {
if (tabsList.value && tabsList.value.length > 0) { if (tabsList.value && tabsList.value.length > 0) {
tabsList.value.unshift({ tabsList.value.unshift({
@ -585,6 +627,10 @@ const change = (item, index) => {
} }
if(item.prop == 'ExpandProps'){ if(item.prop == 'ExpandProps'){
getExtendedPropsList() getExtendedPropsList()
}else if(item.prop == 'OperationRecord'){
if(props.operationRecordList){
operationRecordType.value = props.operationRecordList[0]?.value
}
} }
} }
@ -738,7 +784,6 @@ const detailAllSchemasRef = ref()
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage // getListApi: props.apiPage //
}) })
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods tableMethodsRef.value = tableMethods
detailAllSchemasRef.value = props.detailAllSchemas detailAllSchemasRef.value = props.detailAllSchemas
@ -919,7 +964,8 @@ const emit = defineEmits([
'onBlur', 'onBlur',
'detailBasicFormOnChange', 'detailBasicFormOnChange',
'formFormDateChange', 'formFormDateChange',
'buttonBaseClick' 'buttonBaseClick',
'handleOperationTabsChange'
]) ])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {
@ -1061,6 +1107,47 @@ const getExtendedPropsList = async () => {
}); });
} }
const handleOperationTabsChange = async (val) => {
emit("handleOperationTabsChange",val)
}
const dialogVisible = ref(false)
const dialogTitle = ref()
const dialogAllSchemasRef = ref()
const dialogTableObjectRef = ref()
const dialogTableMethodsRef = ref()
const dialogUploadTitle = ref('文件上传')
const dialogUploadVisible = ref(false)
const dialogUploadNumber = ref()
const dialogUploadBusiCode = ref()
const dialogFormKey = ref(0)
const openDialog = async(row: any, titleName: any, titleValue: any) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.dialogApiPage, //
defaultParams: getDialogParams(row)
})
dialogVisible.value = true
dialogTitle.value = getDialogName()
dialogAllSchemasRef.value = props.dialogAllSchemas
dialogTableObjectRef.value = tableObject
dialogTableMethodsRef.value = tableMethods
dialogTableObjectRef.value.tableList = []
const { getList } = tableMethods
await getList()
updateKey.value += 1
}
function getDialogParams(row: any) {
return {
number: row.number
}
}
function getDialogName(){
// return operationRecordList.value.find(element=>element.value == operationRecordType)?.value
}
// //
watch( watch(
@ -1082,6 +1169,7 @@ watch(
getList() getList()
} }
) )
</script> </script>
<style lang="scss"> <style lang="scss">
.el-drawer__body { .el-drawer__body {

7
src/utils/dict.ts

@ -348,5 +348,10 @@ export enum DICT_TYPE {
SUBJECT = 'subject', //科目 SUBJECT = 'subject', //科目
REGION = 'region', //区域 REGION = 'region', //区域
PART_CLASS = 'part_class', //备件分类 PART_CLASS = 'part_class', //备件分类
MAINTENANCE_CYCLE ='maintenance_cycle' // 保养周期 MAINTENANCE_CYCLE = 'maintenance_cycle', // 保养周期
FAILURE_DEGREE = 'failure_degree', // 紧急程度
FAILURE_REASON = 'failure_reason', //故障类型
REPAIR_DEGREE = 'repair_degree', //
REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成
} }

72
src/views/eam/equipmentAccounts/index.vue

@ -51,7 +51,19 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<DetailLedger ref="detailRef" :isBasic="true" :allSchemas="EquipmentAccounts.allSchemas" :subTabs="subTabList" funcCode="device_mould_picture"/> <DetailLedger
ref="detailRef"
:isBasic="true"
:allSchemas="EquipmentAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
funcCode="device_mould_picture"
/>
<!-- 主要部件 --> <!-- 主要部件 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="submitEquipmentMainPartRelation" /> <SearchTable ref="searchTableRef" @searchTableSuccess="submitEquipmentMainPartRelation" />
<!-- 备件 --> <!-- 备件 -->
@ -76,6 +88,25 @@ import { SparePart,SparePartRules } from '../sparePart/sparePart.data'
import * as SparePartApi from '@/api/eam/sparePart' import * as SparePartApi from '@/api/eam/sparePart'
import { EquipmentToolSparePart,EquipmentToolSparePartRules } from '../equipmentToolSparePart/equipmentToolSparePart.data' import { EquipmentToolSparePart,EquipmentToolSparePartRules } from '../equipmentToolSparePart/equipmentToolSparePart.data'
import * as EquipmentToolSparePartApi from '@/api/eam/equipmentToolSparePart' import * as EquipmentToolSparePartApi from '@/api/eam/equipmentToolSparePart'
import { EquipmentReportRepairRequest,EquipmentReportRepairRequestRules } from '../equipmentReportRepairRequest/equipmentReportRepairRequest.data'
import * as EquipmentReportRepairRequestApi from '@/api/eam/equipmentReportRepairRequest'
import { EquipmentSpotCheckRecordMain,EquipmentSpotCheckRecordMainRules } from '../equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data'
import * as EquipmentSpotCheckRecordMainApi from '@/api/eam/equipmentSpotCheckRecordMain'
import { EquipmentSpotCheckRecordDetail,EquipmentSpotCheckRecordDetailRules } from '../equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data'
import * as EquipmentSpotCheckRecordDetailApi from '@/api/eam/equipmentSpotCheckRecordDetail'
import { EquipmentInspectionRecordMain,EquipmentInspectionRecordMainRules } from '../equipmentInspectionRecordMain/equipmentInspectionRecordMain.data'
import * as EquipmentInspectionRecordMainApi from '@/api/eam/equipmentInspectionRecordMain'
import { EquipmentInspectionRecordDetail,EquipmentInspectionRecordDetailRules } from '../equipmentInspectionRecordDetail/equipmentInspectionRecordDetail.data'
import * as EquipmentInspectionRecordDetailApi from '@/api/eam/equipmentInspectionRecordDetail'
import { EquipmentRepairRecordMain,EquipmentRepairRecordMainRules } from '../equipmentRepairRecordMain/equipmentRepairRecordMain.data'
import * as EquipmentRepairRecordMainApi from '@/api/eam/equipmentRepairRecordMain'
import { EquipmentRepairRecordDetail,EquipmentRepairRecordDetailRules } from '../equipmentRepairRecordDetail/equipmentRepairRecordDetail.data'
import * as EquipmentRepairRecordDetailApi from '@/api/eam/equipmentRepairRecordDetail'
import { EquipmentMaintenanceRecordMain,EquipmentMaintenanceRecordMainRules } from '../equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data'
import * as EquipmentMaintenanceRecordMainApi from '@/api/eam/equipmentMaintenanceRecordMain'
import { EquipmentMaintenanceRecordDetail,EquipmentMaintenanceRecordDetailRules } from '../equipmentMaintenanceRecordDetail/equipmentMaintenanceRecordDetail.data'
import * as EquipmentMaintenanceRecordDetailApi from '@/api/eam/equipmentMaintenanceRecordDetail'
defineOptions({ name: 'EquipmentAccounts' }) defineOptions({ name: 'EquipmentAccounts' })
@ -89,6 +120,10 @@ routeName.value = route.name
const tableColumns = ref(EquipmentAccounts.allSchemas.tableColumns) const tableColumns = ref(EquipmentAccounts.allSchemas.tableColumns)
const tabs = ref<{ label: string; prop: string; }[]>([]) const tabs = ref<{ label: string; prop: string; }[]>([])
const subTabList = ref([]); const subTabList = ref([]);
const detailAllSchemas = ref()
const apiPage = ref()
const dialogApiPage = ref()
const dialogAllSchemas = ref()
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -98,6 +133,15 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}) })
} }
const operationRecordList = ref([
{label:'报修记录',value:'report'},
{label:'维修记录',value:'repair'},
{label:'保养记录',value:'maintenance'},
{label:'巡检记录',value:'inspection'},
{label:'点检记录',value:'spot_check'},
])
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -342,6 +386,32 @@ const submitEquipmentMainPartRelation = (formField, searchField, val, formRef, r
getList() getList()
}) })
} }
const handleOperationTabsChange = (val) => {
if(val == 'report'){
apiPage.value = EquipmentReportRepairRequestApi.getEquipmentReportRepairRequestPage
detailAllSchemas.value = EquipmentReportRepairRequest.allSchemas
}else if(val == 'repair'){
apiPage.value = EquipmentRepairRecordMainApi.getEquipmentRepairRecordMainPage
detailAllSchemas.value = EquipmentRepairRecordMain.allSchemas
dialogApiPage.value = EquipmentRepairRecordDetailApi.getEquipmentRepairRecordDetailPage
dialogAllSchemas.value = EquipmentRepairRecordDetail.allSchemas
}else if(val == 'maintenance'){
apiPage.value = EquipmentMaintenanceRecordMainApi.getEquipmentMaintenanceRecordMainPage
detailAllSchemas.value = EquipmentMaintenanceRecordMain.allSchemas
dialogApiPage.value = EquipmentMaintenanceRecordDetailApi.getEquipmentMaintenanceRecordDetailPage
dialogAllSchemas.value = EquipmentMaintenanceRecordDetail.allSchemas
}else if(val == 'inspection'){
apiPage.value = EquipmentInspectionRecordMainApi.getEquipmentInspectionRecordMainPage
detailAllSchemas.value = EquipmentInspectionRecordMain.allSchemas
dialogApiPage.value = EquipmentInspectionRecordDetailApi.getEquipmentInspectionRecordDetailPage
dialogAllSchemas.value = EquipmentInspectionRecordDetail.allSchemas
}else if(val == 'spot_check'){
apiPage.value = EquipmentSpotCheckRecordMainApi.getEquipmentSpotCheckRecordMainPage
detailAllSchemas.value = EquipmentSpotCheckRecordMain.allSchemas
dialogApiPage.value = EquipmentSpotCheckRecordDetailApi.getEquipmentSpotCheckRecordDetailPage
dialogAllSchemas.value = EquipmentSpotCheckRecordDetail.allSchemas
}
}
const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) => { const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) => {
const equipmentToolSparePartRelList = val.map((element) => ({ const equipmentToolSparePartRelList = val.map((element) => ({

98
src/views/eam/equipmentInspectionRecordDetail/equipmentInspectionRecordDetail.data.ts

@ -10,12 +10,6 @@ export const EquipmentInspectionRecordDetailRules = reactive({
}) })
export const EquipmentInspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentInspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{ {
label: '巡检工单号', label: '巡检工单号',
field: 'number', field: 'number',
@ -64,21 +58,21 @@ export const EquipmentInspectionRecordDetail = useCrudSchemas(reactive<CrudSchem
label: '结果枚举', label: '结果枚举',
field: 'result', field: 'result',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.IS_COMPLETED, dictType: DICT_TYPE.IS_COMPLETED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '名称来源于巡检项', label: '名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{ {
label: '巡检内容来源于巡检项', label: '巡检内容',
field: 'content', field: 'content',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
@ -90,94 +84,28 @@ export const EquipmentInspectionRecordDetail = useCrudSchemas(reactive<CrudSchem
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true, isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
} }
}, },
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

120
src/views/eam/equipmentInspectionRecordMain/equipmentInspectionRecordMain.data.ts

@ -15,13 +15,7 @@ export const EquipmentInspectionRecordMainRules = reactive({
export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: '巡检工单编号',
field: 'id',
sort: 'custom',
isForm: false
},
{
label: '巡检工单编号唯一标识',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
@ -39,22 +33,22 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
isSearch: true isSearch: true
}, },
{ {
label: '类型设备或工装', label: '类型',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '是否拍照', label: '是否拍照',
field: 'isPictures', field: 'isPictures',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'Radio' component: 'Radio'
@ -158,12 +152,12 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
label: '班组', label: '班组',
field: 'classType', field: 'classType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.BASIC_TEAM_TYPE, dictType: DICT_TYPE.BASIC_TEAM_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '验证人', label: '验证人',
@ -265,7 +259,7 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
} }
}, },
{ {
label: '流程状态枚举0:待派工1:已逾期2:已退单3:待接单4:待执行5:执行中6:待验证7:已完成8:已作废', label: '流程状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.JOB_STATUS, dictType: DICT_TYPE.JOB_STATUS,
@ -310,9 +304,9 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '所属厂区编号', label: '所属厂区编号',
@ -332,94 +326,28 @@ export const EquipmentInspectionRecordMain = useCrudSchemas(reactive<CrudSchema[
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true, isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
} }
}, },
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

96
src/views/eam/equipmentMaintenanceRecordDetail/equipmentMaintenanceRecordDetail.data.ts

@ -11,12 +11,6 @@ export const EquipmentMaintenanceRecordDetailRules = reactive({
}) })
export const EquipmentMaintenanceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentMaintenanceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{ {
label: '保养工单号', label: '保养工单号',
field: 'number', field: 'number',
@ -101,12 +95,12 @@ export const EquipmentMaintenanceRecordDetail = useCrudSchemas(reactive<CrudSche
label: '结果枚举', label: '结果枚举',
field: 'result', field: 'result',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.IS_COMPLETED, dictType: DICT_TYPE.IS_COMPLETED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '保养名称', label: '保养名称',
@ -133,28 +127,6 @@ export const EquipmentMaintenanceRecordDetail = useCrudSchemas(reactive<CrudSche
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -162,65 +134,21 @@ export const EquipmentMaintenanceRecordDetail = useCrudSchemas(reactive<CrudSche
isSearch: true isSearch: true
}, },
{ {
label: '地点', label: '是否可用',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用默认TRUE',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true, isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
} }
}, },
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

122
src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts

@ -13,13 +13,7 @@ export const EquipmentMaintenanceRecordMainRules = reactive({
export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: '保养编号',
field: 'id',
sort: 'custom',
isForm: false
},
{
label: '保养工单编号唯一标识',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
@ -40,26 +34,26 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '设备类别', label: '设备类别',
field: 'category', field: 'category',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '班次枚举', label: '班次枚举',
field: 'classes', field: 'classes',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.SHIFT_TYPE, dictType: DICT_TYPE.SHIFT_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '保养计划工单', label: '保养计划工单',
field: 'planNumber', field: 'planNumber',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
@ -68,12 +62,12 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '故障类型枚举', label: '故障类型枚举',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON, dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '保养周期', label: '保养周期',
@ -128,7 +122,7 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
isSearch: true isSearch: true
}, },
{ {
label: '结果枚举临时措施、完成', label: '结果枚举',
field: 'completeResult', field: 'completeResult',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
@ -190,28 +184,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -219,65 +191,21 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
isSearch: true isSearch: true
}, },
{ {
label: '地点', label: '是否可用',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用默认TRUE',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true, isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
} }
}, },
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

86
src/views/eam/equipmentRepairRecordDetail/equipmentRepairRecordDetail.data.ts

@ -8,12 +8,6 @@ export const EquipmentRepairRecordDetailRules = reactive({
}) })
export const EquipmentRepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentRepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{ {
label: '维修工单号', label: '维修工单号',
field: 'number', field: 'number',
@ -54,28 +48,6 @@ export const EquipmentRepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -83,65 +55,21 @@ export const EquipmentRepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
isSearch: true isSearch: true
}, },
{ {
label: '地点', label: '是否可用',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用默认TRUE',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
} }
}, },
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

156
src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts

@ -15,12 +15,6 @@ export const EquipmentRepairRecordMainRules = reactive({
}) })
export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{ {
label: '维修编号', label: '维修编号',
field: 'number', field: 'number',
@ -28,15 +22,15 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '设备或工装字典', label: '类型',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '报修工单申请号', label: '报修工单申请号',
@ -45,7 +39,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '来源字典0:报修工单1:临时工单', label: '来源字典',
field: 'sources', field: 'sources',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
@ -59,26 +53,26 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '紧急程度字典0:紧急故障1:重要故障2:一般故障', label: '紧急程度',
field: 'urgency', field: 'urgency',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.REPAIR_DEGREE, dictType: DICT_TYPE.REPAIR_DEGREE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '维修级别0:大修1:中修2:小修', label: '维修级别',
field: 'level', field: 'level',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.REPAIR_LEVEL, dictType: DICT_TYPE.REPAIR_LEVEL,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '设备编号', label: '设备编号',
@ -87,18 +81,18 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '是否停机1不停机0停机', label: '是否停机',
field: 'shutDown', field: 'shutDown',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'Radio' component: 'Radio'
} }
}, },
{ {
label: '维修开始时间手输', label: '维修开始时间',
field: 'startTime', field: 'startTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
@ -120,7 +114,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '维修结束时间手输', label: '维修结束时间',
field: 'endTime', field: 'endTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
@ -142,7 +136,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '维修时间自动计算分钟', label: '维修时间',
field: 'totalMinutes', field: 'totalMinutes',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
@ -209,15 +203,15 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '结果枚举临时措施、完成', label: '结果枚举',
field: 'completeResult', field: 'completeResult',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '完成时间', label: '完成时间',
@ -296,18 +290,18 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '故障类型关联基础数据', label: '故障类型',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON, dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '流程状态枚举0:待派工1:已逾期2:已退单3:待接单4:待执行5:执行中6:待验证7:已完成8:已作废', label: '流程状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
@ -344,9 +338,9 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'classType', field: 'classType',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '所属厂区编号', label: '所属厂区编号',
@ -366,28 +360,6 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -395,57 +367,13 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '地点ID', label: '是否可用',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用默认TRUE',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true isSearch: true
}, },
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

114
src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts

@ -14,27 +14,21 @@ export const EquipmentReportRepairRequestRules = reactive({
export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: '报修编号',
field: 'id',
sort: 'custom',
isForm: false
},
{
label: '编号唯一标识',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{ {
label: '设备或工装字典', label: '类型',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '设备或工装编号', label: '设备或工装编号',
@ -43,23 +37,23 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
isSearch: true isSearch: true
}, },
{ {
label: '紧急程度字典0:紧急故障1:重要故障2:一般故障', label: '紧急程度',
field: 'urgency', field: 'urgency',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.FAILURE_DEGREE, dictType: DICT_TYPE.FAILURE_DEGREE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true isSearch: true
}, },
{ {
label: '故障类型枚举', label: '故障类型枚举',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON, dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '故障描述', label: '故障描述',
@ -68,18 +62,18 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
isSearch: true isSearch: true
}, },
{ {
label: '是否停机1不停机0停机', label: '是否停机',
field: 'shutDown', field: 'shutDown',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'Radio' component: 'Radio'
} }
}, },
{ {
label: '报修图片最多三张', label: '报修图片',
field: 'images', field: 'images',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
@ -119,7 +113,7 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
isSearch: true isSearch: true
}, },
{ {
label: '报修状态0:待审核1:已撤回2:审核中3:已通过4:已驳回5:已创建6:已确认', label: '报修状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
@ -190,28 +184,6 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -219,57 +191,13 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
isSearch: true isSearch: true
}, },
{ {
label: '地点', label: '是否可用',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用默认TRUE',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true isSearch: true
}, },
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

126
src/views/eam/equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data.ts

@ -14,12 +14,6 @@ export const EquipmentSpotCheckRecordMainRules = reactive({
}) })
export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{ {
label: '点检编号', label: '点检编号',
field: 'number', field: 'number',
@ -42,12 +36,12 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '类型设备或工装', label: '类型设备或工装',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '计划工单号', label: '计划工单号',
@ -147,12 +141,12 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '故障类型枚举', label: '故障类型枚举',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.FAILURE_REASON, dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '验证人', label: '验证人',
@ -265,11 +259,11 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
{ {
label: '流程状态枚举0:待派工1:已逾期2:已退单3:待接单4:待执行5:执行中6:待验证7:已完成8:已作废', label: '流程状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.JOB_STATUS, dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'Radio' component: 'Radio'
@ -303,12 +297,12 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
label: '班组类型', label: '班组类型',
field: 'classType', field: 'classType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.BASIC_TEAM_TYPE, dictType: DICT_TYPE.BASIC_TEAM_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
} }
}, },
{ {
label: '所属厂区编号', label: '所属厂区编号',
@ -322,100 +316,28 @@ export const EquipmentSpotCheckRecordMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
} }
}, },
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

Loading…
Cancel
Save