交办时间年月日,整改时回显整改人

This commit is contained in:
王利强
2026-06-23 16:58:40 +08:00
parent cc94d3e3e9
commit d4897284e8
588 changed files with 1551 additions and 1393 deletions

View File

@@ -160,7 +160,7 @@
const details = (item) => {
uni.navigateTo({
url: `/pages/hiddendanger/view?hazardId=${item.hazardId}&assignId=${item.assignId}`
url: `/pages/hiddendanger/detail2?hazardId=${item.hazardId}&assignId=${item.assignId || ''}`
})
}
@@ -169,6 +169,12 @@
if (item.deadline) {
url += `&deadline=${encodeURIComponent(item.deadline)}`
}
if (item.assigneeId) {
url += `&assigneeId=${item.assigneeId}`
}
if (item.assigneeName) {
url += `&assigneeName=${encodeURIComponent(item.assigneeName)}`
}
uni.navigateTo({ url })
}

View File

@@ -76,7 +76,7 @@
<up-datetime-picker
:show="showDatePicker"
v-model="dateValue"
mode="datetime"
mode="date"
@confirm="onDateConfirm"
@cancel="showDatePicker = false"
@close="showDatePicker = false"
@@ -204,17 +204,13 @@
}
};
// 日期时间选择确认
// 日期选择确认
const onDateConfirm = (e) => {
console.log('选择的日期时间:', e);
const date = new Date(e.value);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
selectedDate.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
selectedDate.value = `${year}-${month}-${day}`;
showDatePicker.value = false;
};

View File

@@ -446,6 +446,22 @@
}
};
const applyAssigneeFromOptions = (assigneeId, assigneeName) => {
if (!assigneeId) return;
const id = String(assigneeId);
const name = assigneeName ? decodeURIComponent(String(assigneeName)).trim() : '';
const exists = detailPersonPool.value.some((user) => String(user.userId) === id);
if (!exists) {
detailPersonPool.value.push({
userId: assigneeId,
nickName: name,
deptName: ''
});
}
selectedUserIds.value = [id];
syncSelectedUsersFromIds(selectedUserIds.value);
};
const parseIdList = (raw) => {
if (raw === null || raw === undefined || raw === '') return [];
if (Array.isArray(raw)) {
@@ -1212,6 +1228,10 @@
if (options.assignId) {
assignId.value = options.assignId;
}
if (!options.rectifyId && options.assigneeId) {
applyAssigneeFromOptions(options.assigneeId, options.assigneeName);
}
// 在hazardId赋值后调用确保有值
if (!options.rectifyId) fetchPersonnelLists();