|
|
|
|
@ -90,7 +90,7 @@
|
|
|
|
|
<el-table-column :label="t('MoldManagement.MoldOperate.moldName')" align="center" prop="moldName" width="500px" sortable />
|
|
|
|
|
<el-table-column :label="t('MoldManagement.MoldOperate.deviceName')" align="center" prop="deviceName" sortable />
|
|
|
|
|
<el-table-column :label="t('MoldManagement.MoldOperate.productionLine')" align="center" prop="lineName" sortable />
|
|
|
|
|
<el-table-column :label="t('MoldManagement.MoldOperate.creatorName')" align="center" prop="creatorName" sortable />
|
|
|
|
|
<el-table-column :label="t('MoldManagement.MoldOperate.operatorName')" align="center" :formatter="operatorNameFormatter" sortable />
|
|
|
|
|
<el-table-column :label="t('MoldManagement.MoldOperate.remark')" align="center" prop="remark" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
:label="t('MoldManagement.MoldOperate.createTime')"
|
|
|
|
|
@ -137,6 +137,7 @@ import download from '@/utils/download'
|
|
|
|
|
import { MoldOperateApi, MoldOperateVO } from '@/api/mes/moldoperate'
|
|
|
|
|
import MoldOperateForm from './MoldOperateForm.vue'
|
|
|
|
|
import { MoldBrandApi, MoldVO } from '@/api/erp/mold'
|
|
|
|
|
import { getSimpleUserList, type UserVO } from '@/api/system/user'
|
|
|
|
|
|
|
|
|
|
/** 模具上下模 列表 */
|
|
|
|
|
defineOptions({ name: 'MoldOperate' })
|
|
|
|
|
@ -159,12 +160,23 @@ const queryParams = reactive({
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
const moldList = ref<MoldVO[]>([]) // 模具列表
|
|
|
|
|
const operatorOptions = ref<UserVO[]>([]) // 操作人列表
|
|
|
|
|
|
|
|
|
|
/** 操作人 id -> 昵称 映射 */
|
|
|
|
|
const operatorNameFormatter = (row: any) => {
|
|
|
|
|
if (!operatorOptions.value.length) return ''
|
|
|
|
|
const user = operatorOptions.value.find((u) => u.id === row.operatorId)
|
|
|
|
|
return user?.nickname || ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 查询列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true
|
|
|
|
|
try {
|
|
|
|
|
moldList.value = await MoldBrandApi.getBrandList()
|
|
|
|
|
if (!operatorOptions.value.length) {
|
|
|
|
|
operatorOptions.value = (await getSimpleUserList()) ?? []
|
|
|
|
|
}
|
|
|
|
|
const data = await MoldOperateApi.getMoldOperatePage(queryParams)
|
|
|
|
|
list.value = data.list
|
|
|
|
|
total.value = data.total
|
|
|
|
|
|