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. 13
      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. 13
      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. 13
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

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

@ -55,7 +55,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex mt-16px"> <div class="flex mt-16px" v-if="isShowPart">
<div <div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px" style="line-height: 32px"
@ -150,6 +150,12 @@ const props = defineProps({
required: false, required: false,
default: false default: false
}, },
//
isShowPart: {
type: Boolean,
required: false,
default: false
},
// , // ,
updatePart: { updatePart: {
type: Boolean, 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[]>([ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '维修工角色编号', label: '维修工角色',
field: 'workerRoleId', field: 'workerRoleId',
sort: 'custom', sort: 'custom',
isForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((item) => item.id == cellValue)?.name
},
},
{
label: '维修工角色',
field: 'workerRoleName',
sort: 'custom',
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { 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) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((item) => item.id == cellValue)?.name return roleList.find((account) => account.id == cellValue)?.name
}, },
}, },
{ {
label: '工程师角色编号', label: '工程师角色',
field: 'engineerRoleId', field: 'engineerRoleName',
sort: 'custom', sort: 'custom',
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -106,9 +124,9 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
] ]
} }
}, },
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { isDetail: false,
return roleList.find((account) => account.id == cellValue)?.name isTable: false,
}, isTableForm: false,
}, },
{ {
label: '班组类型', label: '班组类型',
@ -127,10 +145,11 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
}, },
{ {
label: '所属厂区编号', label: '所属厂区',
field: 'factoryAreaNumber', field: 'factoryAreaNumber',
isSearch: true, isSearch: true,
sort: 'custom', sort: 'custom',
isForm: false,
search: { search: {
show: true, show: true,
component: 'Select', component: 'Select',
@ -143,6 +162,16 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
filterable: true, filterable: true,
} }
}, },
//给列表用的
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name
},
},
{
label: '所属厂区',
field: 'factoryAreaName',
isSearch: true,
sort: 'custom',
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -161,10 +190,9 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
] ]
} }
}, },
//给列表用的 isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { isTable: false,
return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name isTableForm: false,
},
}, },
{ {
label: '创建时间', label: '创建时间',

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

@ -80,7 +80,18 @@ const tableColumns = ref(ClassType.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] 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) formRef.setValues(setV)
}) })
} }

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

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

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

@ -54,7 +54,15 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="DeviceInternalAudit.allSchemas" /> <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> </template>
<script setup lang="ts"> <script setup lang="ts">

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

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

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

@ -364,9 +364,16 @@ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
filterable: true, filterable: true,
}, },
api: () => dutyUserList, api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: string | null) => {
return dutyUserList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') 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: { form: {
component: 'Select', component: 'Select',
api: () => dutyUserList, api: () => dutyUserList,

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

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

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

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

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

@ -412,9 +412,16 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
filterable: true, filterable: true,
}, },
api: () => dutyUserList, api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: string | null) => {
return dutyUserList.filter(item => cellValue?.includes(item.id)).map(cur => cur.name).join(',') 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: { form: {
component: 'Select', component: 'Select',
api: () => dutyUserList, api: () => dutyUserList,

Loading…
Cancel
Save