From dc1393411c5cc7d43d349ce720dca789e8f224b0 Mon Sep 17 00:00:00 2001
From: puhui999 发起人:${processInstance.value.startUser.nickname} 部门:${processInstance.value.startUser.deptName} 创建时间:${parseTime(processInstance.value.createTime)}`
+ 创建时间:${formatDate(processInstance.value.createTime)}`
} else if (element.value.type === 'bpmn:UserTask') {
// debugger
let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
@@ -297,26 +297,26 @@ const elementHover = (element) => {
html = ` 审批人:${task.assigneeUser.nickname} 部门:${task.assigneeUser.deptName} 结果:${dataResult} 创建时间:${parseTime(task.createTime)} 创建时间:${formatDate(task.createTime)} 审批人:${task.assigneeUser.nickname} 部门:${task.assigneeUser.deptName} 结果:${getIntDictOptions(
// DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
// task.result
// )} 创建时间:${parseTime(task.createTime)} 创建时间:${formatDate(task.createTime)} 结束时间:${parseTime(task.endTime)} 结束时间:${formatDate(task.endTime)} 审批建议:${task.reason} 创建时间:${parseTime(activity.startTime)} 创建时间:${formatDate(activity.startTime)} 结束时间:${parseTime(activity.endTime)} 结束时间:${formatDate(activity.endTime)}
结束时间:${parseTime(processInstance.value.endTime)}
` + html += `结束时间:${formatDate(processInstance.value.endTime)}
` } } console.log(html, 'html111111111111111') @@ -348,50 +348,6 @@ const elementOut = (element) => { toRaw(overlays.value).remove({ element }) elementOverlayIds.value[element.id] = null } -const parseTime = (time) => { - if (!time) { - return null - } - const format = '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if (typeof time === 'string' && /^[0-9]+$/.test(time)) { - time = parseInt(time) - } else if (typeof time === 'string') { - time = time - .replace(new RegExp(/-/gm), '/') - .replace('T', ' ') - .replace(new RegExp(/\.[\d]{3}/gm), '') - } - if (typeof time === 'number' && time.toString().length === 10) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { - let value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { - return ['日', '一', '二', '三', '四', '五', '六'][value] - } - if (result.length > 0 && value < 10) { - value = '0' + value - } - return value || 0 - }) - return time_str -} onMounted(() => { xml.value = props.value diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue index 4ac85860..d42a51c0 100644 --- a/src/layout/components/Message/src/Message.vue +++ b/src/layout/components/Message/src/Message.vue @@ -1,5 +1,5 @@