同步6/16
This commit is contained in:
@@ -147,18 +147,22 @@ const { queryParams, form } = toRefs(data);
|
||||
// TODO 设备维修记录 用户id有,用户信息没有
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listDeviceRepair(queryParams.value);
|
||||
deviceRepairList.value = res.rows;
|
||||
deviceRepairList.value.forEach((item) => {
|
||||
if (item.maintainUserList && item.maintainUserList.length > 0) {
|
||||
item.maintainUserNames = item.maintainUserList
|
||||
.map((i) => i.nickName)
|
||||
.filter((i) => i)
|
||||
.join(',');
|
||||
}
|
||||
});
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
listDeviceRepair(queryParams.value)
|
||||
.then((res) => {
|
||||
deviceRepairList.value = res.rows;
|
||||
deviceRepairList.value.forEach((item) => {
|
||||
if (item.maintainUserList && item.maintainUserList.length > 0) {
|
||||
item.maintainUserNames = item.maintainUserList
|
||||
.map((i) => i.nickName)
|
||||
.filter((i) => i)
|
||||
.join(',');
|
||||
}
|
||||
});
|
||||
total.value = res.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
@@ -202,10 +206,12 @@ const handleAdd = () => {
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: DeviceRepairVO) => {
|
||||
const _ids = row?.id || ids.value[0];
|
||||
|
||||
router.push({
|
||||
path: '/equipment/editEquipmentRepair',
|
||||
query: {
|
||||
id: row.id
|
||||
id: _ids
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user