Browse Source

修复测试bug

master
ljlong_2630 1 month ago
parent
commit
85a0cd528d
  1. 8
      src/components/ImportForm/src/ImportForm.vue
  2. 52
      src/views/eam/basic/classType/classType.data.ts
  3. 11
      src/views/eam/basic/classType/index.vue
  4. 50
      src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
  5. 10
      src/views/eam/device/deviceInternalAudit/index.vue
  6. 5
      src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
  7. 11
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  8. 2
      src/views/eam/item/transaction/transaction.data.ts
  9. 5
      src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
  10. 11
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

8
src/components/ImportForm/src/ImportForm.vue

@ -55,7 +55,7 @@
</div>
</div>
</div>
<div class="flex mt-16px">
<div class="flex mt-16px" v-if="isShowPart">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
@ -150,6 +150,12 @@ const props = defineProps({
required: false,
default: false
},
//
isShowPart: {
type: Boolean,
required: false,
default: false
},
// ,
updatePart: {
type: Boolean,

52
src/views/eam/basic/classType/classType.data.ts

@ -59,9 +59,18 @@ console.log('roleList',roleList);
]))
export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '维修工角色编号',
label: '维修工角色',
field: 'workerRoleId',
sort: 'custom',
isForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((item) => item.id == cellValue)?.name
},
},
{
label: '维修工角色',
field: 'workerRoleName',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -80,13 +89,22 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
]
}
},
isDetail: false,
isTable: false,
isTableForm: false,
},
{
label: '工程师角色',
field: 'engineerRoleId',
sort: 'custom',
isForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((item) => item.id == cellValue)?.name
return roleList.find((account) => account.id == cellValue)?.name
},
},
{
label: '工程师角色编号',
field: 'engineerRoleId',
label: '工程师角色',
field: 'engineerRoleName',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
@ -106,9 +124,9 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
]
}
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((account) => account.id == cellValue)?.name
},
isDetail: false,
isTable: false,
isTableForm: false,
},
{
label: '班组类型',
@ -127,10 +145,11 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
},
{
label: '所属厂区编号',
label: '所属厂区',
field: 'factoryAreaNumber',
isSearch: true,
sort: 'custom',
isForm: false,
search: {
show: true,
component: 'Select',
@ -143,6 +162,16 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
filterable: true,
}
},
//给列表用的
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name
},
},
{
label: '所属厂区',
field: 'factoryAreaName',
isSearch: true,
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -161,10 +190,9 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
]
}
},
//给列表用的
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name
},
isDetail: false,
isTable: false,
isTableForm: false,
},
{
label: '创建时间',

11
src/views/eam/basic/classType/index.vue

@ -80,7 +80,18 @@ const tableColumns = ref(ClassType.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'workerRoleName') {
setV['workerRoleId'] = val[0][searchField]
setV['workerRoleName'] = val[0]['name']
} else if (formField == 'engineerRoleName') {
setV['engineerRoleId'] = val[0][searchField]
setV['engineerRoleName'] = val[0]['name']
} else if (formField == 'factoryAreaName') {
setV['factoryAreaNumber'] = val[0][searchField]
setV['factoryAreaName'] = val[0]['name']
} else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}

50
src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts

@ -278,31 +278,31 @@ export const DeviceInternalAudit = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '创建时间',
field: 'createTime',

10
src/views/eam/device/deviceInternalAudit/index.vue

@ -54,7 +54,15 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="DeviceInternalAudit.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/record/device-internal-audit/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/eam/device-internal-audit/import"
:importTemplateData="importTemplateData"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
@success="importSuccess"
/>
</template>
<script setup lang="ts">

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

@ -202,7 +202,10 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
},table: {
width: '150',
},
isForm:false
isForm:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '操作',

11
src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts

@ -364,8 +364,15 @@ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
filterable: true,
},
api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return dutyUserList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',')
formatter: (_: Recordable, __: TableColumn, cellValue: string | null) => {
if (!cellValue) {
return '';
}
return dutyUserList.filter(item => {
const parts = cellValue.split(',');
const flag = parts.some(part => part === item.id.toString());
return flag;
}).map(cur => cur.name).join(',');
},
form: {
component: 'Select',

2
src/views/eam/item/transaction/transaction.data.ts

@ -57,6 +57,8 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inventoryStatus',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
form: {
component: 'Radio'
},

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

@ -202,7 +202,10 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
},table: {
width: '150',
},
isForm:false
isForm:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '操作',

11
src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

@ -412,8 +412,15 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
filterable: true,
},
api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return dutyUserList.filter(item => cellValue?.includes(item.id)).map(cur => cur.name).join(',')
formatter: (_: Recordable, __: TableColumn, cellValue: string | null) => {
if (!cellValue) {
return '';
}
return dutyUserList.filter(item => {
const parts = cellValue.split(',');
const flag = parts.some(part => part === item.id.toString());
return flag;
}).map(cur => cur.name).join(',');
},
form: {
component: 'Select',

Loading…
Cancel
Save