|
@@ -8,17 +8,16 @@
|
|
<div class="username">
|
|
<div class="username">
|
|
<div class="users">
|
|
<div class="users">
|
|
<span class="name">{{ groupDetail.username }}</span>
|
|
<span class="name">{{ groupDetail.username }}</span>
|
|
- <span class="tag">{{ formatJobType(groupDetail.jobType) }}</span>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="userTime">
|
|
<div class="userTime">
|
|
<span class="time">{{ groupDetail.createTime }}</span>
|
|
<span class="time">{{ groupDetail.createTime }}</span>
|
|
- <span class="tag" v-if="groupDetail.topFlag">置顶</span>
|
|
|
|
|
|
+ <span class="tag" v-if="groupDetail.isTop">置顶</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<n-popover
|
|
<n-popover
|
|
v-if="isAuth"
|
|
v-if="isAuth"
|
|
- trigger="click"
|
|
|
|
|
|
+ trigger="hover"
|
|
ref="popoverRef"
|
|
ref="popoverRef"
|
|
:to="false"
|
|
:to="false"
|
|
placement="bottom-end"
|
|
placement="bottom-end"
|
|
@@ -27,14 +26,15 @@
|
|
class="popoverContainer"
|
|
class="popoverContainer"
|
|
>
|
|
>
|
|
<template #trigger>
|
|
<template #trigger>
|
|
- <i class="iconMorePoint iconMore"></i>
|
|
|
|
|
|
+ <span class="iconMore"><i class="iconMorePoint "></i></span>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
<div class="p-list">
|
|
<div class="p-list">
|
|
<div class="p-item" @click="onOperation(groupDetail, 'edit')">
|
|
<div class="p-item" @click="onOperation(groupDetail, 'edit')">
|
|
编辑公告
|
|
编辑公告
|
|
</div>
|
|
</div>
|
|
<div class="p-item" @click="onOperation(groupDetail, 'top')">
|
|
<div class="p-item" @click="onOperation(groupDetail, 'top')">
|
|
- 设为置顶
|
|
|
|
|
|
+ {{ groupDetail.isTop ? '取消置顶' : '设为置顶' }}
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
class="p-item p-red"
|
|
class="p-item p-red"
|
|
@@ -116,9 +116,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="input-section">
|
|
<div class="input-section">
|
|
<div class="input-title input-slider">
|
|
<div class="input-title input-slider">
|
|
- <span>设置为置顶</span>
|
|
|
|
|
|
+ <span>设为置顶</span>
|
|
|
|
|
|
- <Slider :open="topFlag" @change="onTopFlag" />
|
|
|
|
|
|
+ <Slider :open="isTop" @change="onisTop" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
@@ -172,7 +172,7 @@ const ManageNotification = defineComponent({
|
|
id: "",
|
|
id: "",
|
|
title: "",
|
|
title: "",
|
|
input: "",
|
|
input: "",
|
|
- topFlag: true, // 是否置顶
|
|
|
|
|
|
+ isTop: true, // 是否置顶
|
|
loading: false,
|
|
loading: false,
|
|
groupDetail: {},
|
|
groupDetail: {},
|
|
isEdit: false,
|
|
isEdit: false,
|
|
@@ -204,15 +204,6 @@ const ManageNotification = defineComponent({
|
|
getNotification();
|
|
getNotification();
|
|
});
|
|
});
|
|
|
|
|
|
- const formatJobType = (jobType: string) => {
|
|
|
|
- const template = {
|
|
|
|
- TEACHER: "音乐老师",
|
|
|
|
- ADMIN: "管理员",
|
|
|
|
- HEADMASTER: "校长",
|
|
|
|
- } as any;
|
|
|
|
- return template[jobType];
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
|
|
|
|
const onOperation = async (item: any, type: string) => {
|
|
const onOperation = async (item: any, type: string) => {
|
|
try {
|
|
try {
|
|
@@ -221,25 +212,35 @@ const ManageNotification = defineComponent({
|
|
data.isEdit = true;
|
|
data.isEdit = true;
|
|
data.title = item.title;
|
|
data.title = item.title;
|
|
data.input = item.content;
|
|
data.input = item.content;
|
|
- data.topFlag = item.topFlag;
|
|
|
|
|
|
+ data.isTop = item.isTop;
|
|
data.id = item.id;
|
|
data.id = item.id;
|
|
} else if (type === "top") {
|
|
} else if (type === "top") {
|
|
await imGroupNoticeUpdate({
|
|
await imGroupNoticeUpdate({
|
|
imGroupId: data.groupProfile.groupID,
|
|
imGroupId: data.groupProfile.groupID,
|
|
- topFlag: true,
|
|
|
|
|
|
+ isTop: item.isTop ? false : true,
|
|
id: item.id,
|
|
id: item.id,
|
|
});
|
|
});
|
|
getNotification();
|
|
getNotification();
|
|
|
|
+ TUIMessage({
|
|
|
|
+ message: item.topFlag ? '取消置顶成功' : '设为置顶成功',
|
|
|
|
+ isH5: false,
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
} else if (type === "delete") {
|
|
} else if (type === "delete") {
|
|
await imGroupNoticeRemove({
|
|
await imGroupNoticeRemove({
|
|
id: item.id,
|
|
id: item.id,
|
|
});
|
|
});
|
|
|
|
+ TUIMessage({
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ isH5: false,
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
ctx.emit("changeStatus", "deleteDetail");
|
|
ctx.emit("changeStatus", "deleteDetail");
|
|
} else if (type === "add") {
|
|
} else if (type === "add") {
|
|
data.isEdit = true;
|
|
data.isEdit = true;
|
|
data.title = "";
|
|
data.title = "";
|
|
data.input = "";
|
|
data.input = "";
|
|
- data.topFlag = true;
|
|
|
|
|
|
+ data.isTop = true;
|
|
data.id = "";
|
|
data.id = "";
|
|
ctx.emit("changeStatus", "addDetail");
|
|
ctx.emit("changeStatus", "addDetail");
|
|
}
|
|
}
|
|
@@ -263,7 +264,7 @@ const ManageNotification = defineComponent({
|
|
if (data.id) {
|
|
if (data.id) {
|
|
await imGroupNoticeUpdate({
|
|
await imGroupNoticeUpdate({
|
|
imGroupId: data.groupProfile.groupID,
|
|
imGroupId: data.groupProfile.groupID,
|
|
- topFlag: data.topFlag,
|
|
|
|
|
|
+ isTop: data.isTop,
|
|
title: data.title,
|
|
title: data.title,
|
|
content: data.input,
|
|
content: data.input,
|
|
id: data.id,
|
|
id: data.id,
|
|
@@ -273,10 +274,15 @@ const ManageNotification = defineComponent({
|
|
imGroupId: data.groupProfile.groupID,
|
|
imGroupId: data.groupProfile.groupID,
|
|
title: data.title,
|
|
title: data.title,
|
|
content: data.input,
|
|
content: data.input,
|
|
- topFlag: data.topFlag,
|
|
|
|
|
|
+ isTop: data.isTop,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ TUIMessage({
|
|
|
|
+ message: '发布成功',
|
|
|
|
+ isH5: false,
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
data.isEdit = false;
|
|
data.isEdit = false;
|
|
ctx.emit("changeStatus", "submitDetail");
|
|
ctx.emit("changeStatus", "submitDetail");
|
|
data.page = 1;
|
|
data.page = 1;
|
|
@@ -292,9 +298,9 @@ const ManageNotification = defineComponent({
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
- const onTopFlag = (val: any) => {
|
|
|
|
- console.log(val, 'onTopFlag')
|
|
|
|
- data.topFlag = val
|
|
|
|
|
|
+ const onisTop = (val: any) => {
|
|
|
|
+ console.log(val, 'onisTop')
|
|
|
|
+ data.isTop = val
|
|
}
|
|
}
|
|
|
|
|
|
const onCloseEdit = () => {
|
|
const onCloseEdit = () => {
|
|
@@ -308,9 +314,8 @@ const ManageNotification = defineComponent({
|
|
return {
|
|
return {
|
|
...toRefs(data),
|
|
...toRefs(data),
|
|
popoverRef,
|
|
popoverRef,
|
|
- formatJobType,
|
|
|
|
onMore,
|
|
onMore,
|
|
- onTopFlag,
|
|
|
|
|
|
+ onisTop,
|
|
// updateProfile,
|
|
// updateProfile,
|
|
onOperation,
|
|
onOperation,
|
|
onSubmit,
|
|
onSubmit,
|
|
@@ -326,14 +331,13 @@ export default ManageNotification;
|
|
.notification {
|
|
.notification {
|
|
position: relative;
|
|
position: relative;
|
|
flex: 1;
|
|
flex: 1;
|
|
- background: #ffffff;
|
|
|
|
- overflow-y: auto;
|
|
|
|
- overflow-x: hidden;
|
|
|
|
- height: 100%;
|
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ overflow-x: hidden;
|
|
|
|
+ height: 100%;
|
|
// padding: 20px;
|
|
// padding: 20px;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- background: #f8f9fc;
|
|
|
|
|
|
+ background: rgb(244, 245, 249) !important;
|
|
|
|
|
|
&.overflowHidden {
|
|
&.overflowHidden {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
@@ -369,12 +373,26 @@ export default ManageNotification;
|
|
}
|
|
}
|
|
|
|
|
|
.iconMore {
|
|
.iconMore {
|
|
- width: 23px;
|
|
|
|
- height: 17px;
|
|
|
|
|
|
+ width: 25px;
|
|
|
|
+ height: 25px;
|
|
position: absolute;
|
|
position: absolute;
|
|
right: 0;
|
|
right: 0;
|
|
top: 5px;
|
|
top: 5px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+
|
|
|
|
+ .iconMorePoint {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 23px;
|
|
|
|
+ height: 17px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ background: #f2f2f2;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.users {
|
|
.users {
|
|
@@ -382,7 +400,7 @@ export default ManageNotification;
|
|
align-items: center;
|
|
align-items: center;
|
|
.name {
|
|
.name {
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
color: #333333;
|
|
color: #333333;
|
|
line-height: 22px;
|
|
line-height: 22px;
|
|
}
|
|
}
|
|
@@ -419,14 +437,14 @@ export default ManageNotification;
|
|
.section-content {
|
|
.section-content {
|
|
h2 {
|
|
h2 {
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
color: #333333;
|
|
color: #333333;
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
word-wrap: break-word;
|
|
word-wrap: break-word;
|
|
word-break: break-all;
|
|
word-break: break-all;
|
|
}
|
|
}
|
|
.content {
|
|
.content {
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
color: #777777;
|
|
color: #777777;
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
word-wrap: break-word;
|
|
word-wrap: break-word;
|
|
@@ -459,7 +477,7 @@ export default ManageNotification;
|
|
}
|
|
}
|
|
|
|
|
|
p {
|
|
p {
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
color: #aaaaaa;
|
|
color: #aaaaaa;
|
|
line-height: 22px;
|
|
line-height: 22px;
|
|
}
|
|
}
|
|
@@ -488,20 +506,21 @@ export default ManageNotification;
|
|
.input-title {
|
|
.input-title {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
color: #333333;
|
|
color: #333333;
|
|
- line-height: 22px;
|
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ line-height: 20px;
|
|
padding-bottom: 10px;
|
|
padding-bottom: 10px;
|
|
.iconNotifit1,
|
|
.iconNotifit1,
|
|
.iconNotifit2 {
|
|
.iconNotifit2 {
|
|
- width: 22px;
|
|
|
|
- height: 22px;
|
|
|
|
|
|
+ width: 20px;
|
|
|
|
+ height: 20px;
|
|
margin-right: 6px;
|
|
margin-right: 6px;
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
span {
|
|
span {
|
|
line-height: 1;
|
|
line-height: 1;
|
|
- padding-bottom: 4px;
|
|
|
|
|
|
+ padding-bottom: 2px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -559,11 +578,11 @@ export default ManageNotification;
|
|
margin-top: 8px !important;
|
|
margin-top: 8px !important;
|
|
|
|
|
|
.p-item {
|
|
.p-item {
|
|
- margin-bottom: 8px;
|
|
|
|
- font-size: 16px;
|
|
|
|
|
|
+ margin-bottom: 6px;
|
|
|
|
+ font-size: 14px;
|
|
color: #131415;
|
|
color: #131415;
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
- padding: 12px 0;
|
|
|
|
|
|
+ padding: 8px 0;
|
|
text-align: center;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
&:hover {
|
|
&:hover {
|