{{ $L("汇报类型") }}
@@ -77,11 +85,20 @@ export default {
return {
loadIng: 0,
columns: [{
- title: this.$L("名称"),
+ title: this.$L("标题"),
key: 'title',
minWidth: 180,
render: (h, {row}) => {
- return h('AutoTip', row.title);
+ const displayTitle = `${row.title || ""}`.replace(/(\[([^\[\]]*)\]\s*){0,2}$/, '');
+ return h('AutoTip', displayTitle);
+ }
+ }, {
+ title: this.$L("时间"),
+ key: 'time',
+ sortable: true,
+ minWidth: 180,
+ render: (h, {row}) => {
+ return h('AutoTip', $A.reportExtractTime(row.title) || '-');
}
}, {
title: this.$L("类型"),
diff --git a/resources/assets/js/pages/manage/components/ReportReceive.vue b/resources/assets/js/pages/manage/components/ReportReceive.vue
index 91a2ddc76..fb3fd27f1 100644
--- a/resources/assets/js/pages/manage/components/ReportReceive.vue
+++ b/resources/assets/js/pages/manage/components/ReportReceive.vue
@@ -10,6 +10,25 @@
+
{{ $L("汇报类型") }}
@@ -113,7 +132,8 @@ export default {
sortable: true,
minWidth: 180,
render: (h, {row}) => {
- let arr = []
+ const displayTitle = `${row.title || ""}`.replace(/(\[([^\[\]]*)\]\s*){0,2}$/, '');
+ const arr = []
const myUser = row.receives_user.find(({userid}) => userid == this.userId)
if (myUser && myUser.pivot.read == 0) {
arr.push(
@@ -125,11 +145,11 @@ export default {
flexShrink: 0,
}
}, this.$L("未读")),
- h('AutoTip', row.title)
+ h('AutoTip', displayTitle)
)
} else {
arr.push(
- h('AutoTip', row.title)
+ h('AutoTip', displayTitle)
)
}
return h('div', {
@@ -139,6 +159,14 @@ export default {
}
}, arr)
}
+ }, {
+ title: this.$L("时间"),
+ key: 'time',
+ sortable: true,
+ minWidth: 180,
+ render: (h, {row}) => {
+ return h('AutoTip', $A.reportExtractTime(row.title) || '-');
+ }
}, {
title: this.$L("类型"),
key: 'type',
@@ -209,10 +237,13 @@ export default {
{value: "unread", label: this.$L('仅未读')},
{value: "read", label: this.$L('仅已读')},
],
+
+ departmentList: [],
}
},
- mounted() {
+ async mounted() {
this.getLists();
+ this.departmentList = await this.$store.dispatch("getDepartmentList")
},
watch: {
keyIs(v) {