Commit ffedd710 by Jaxon

fix(residentManage): 修复住户管理任务中心详情页相关问题

更新详情页权限ID为912300101
补充if语句缺失的大括号避免逻辑错误
添加dayjs加载检查,异常时输出错误日志
1 parent 3163fbc8
...@@ -1512,7 +1512,7 @@ export const routerName = { ...@@ -1512,7 +1512,7 @@ export const routerName = {
name: "residentManageTaskCenterDetail", name: "residentManageTaskCenterDetail",
meta: { meta: {
title: "详情", title: "详情",
authId: "9123001", authId: "912300101",
parentId: "91230", parentId: "91230",
activePath: "/resident-manage/task-center", activePath: "/resident-manage/task-center",
}, },
......
...@@ -6,13 +6,17 @@ import DescriptionImageList from "@/components/descriptions/components/imageList ...@@ -6,13 +6,17 @@ import DescriptionImageList from "@/components/descriptions/components/imageList
import { statusOptions } from "@/views/residentManage/taskCenter/constant"; import { statusOptions } from "@/views/residentManage/taskCenter/constant";
import "dayjs/locale/zh-cn"; import "dayjs/locale/zh-cn";
if (typeof dayjs === "undefined") {
console.error("[cover2Descriptions] dayjs 未加载,请检查 CDN 顺序");
}
dayjs.extend(isSameOrBefore); dayjs.extend(isSameOrBefore);
dayjs.extend(isSameOrAfter); dayjs.extend(isSameOrAfter);
dayjs.extend(customParseFormat); dayjs.extend(customParseFormat);
function parseDatetime(value) { function parseDatetime(value) {
if (!value) if (!value) {
return "-"; return "-";
}
const formats = [ const formats = [
"YYYY-MM-DDTHH:mm:ss", "YYYY-MM-DDTHH:mm:ss",
...@@ -124,8 +128,9 @@ function renderLink() { ...@@ -124,8 +128,9 @@ function renderLink() {
}, },
render: (h, { data, schemaItem, schema }) => { render: (h, { data, schemaItem, schema }) => {
const { fieldValue, linkAlias } = schemaItem.meta; const { fieldValue, linkAlias } = schemaItem.meta;
if (!fieldValue) if (!fieldValue) {
return h("span", "-"); return h("span", "-");
}
const linkProps = { const linkProps = {
class: "link-type", class: "link-type",
...@@ -195,8 +200,9 @@ function renderAttachment() { ...@@ -195,8 +200,9 @@ function renderAttachment() {
style: { marginLeft: "8px", lineHeight: 1 }, style: { marginLeft: "8px", lineHeight: 1 },
on: { on: {
click: (e) => { click: (e) => {
if (!fileUrl) if (!fileUrl) {
return; return;
}
e.preventDefault(); e.preventDefault();
window.open(fileUrl, "_blank"); window.open(fileUrl, "_blank");
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!