mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 15:26:48 +08:00
发布公告
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
</span>
|
||||
</div>
|
||||
<template v-if="noticeChecked">
|
||||
<p>公告内容</p>
|
||||
<p>当前公告内容</p>
|
||||
<!-- 预览 -->
|
||||
<template v-if="!editOn">
|
||||
<div class="txt-content">
|
||||
{{ noticeContent ? noticeContent : "暂无公告" }}
|
||||
{{ noticeContent1 ? noticeContent1 : "暂无公告" }}
|
||||
</div>
|
||||
<div class="btn-content">
|
||||
<a-button type="primary" @click="handleEdit">编辑</a-button>
|
||||
@@ -23,13 +23,12 @@
|
||||
</template>
|
||||
<!-- 编辑 -->
|
||||
<template v-if="editOn">
|
||||
<div class="txt-contain">
|
||||
<span>预览:</span>
|
||||
|
||||
<div class="txt-content">
|
||||
{{ noticeContent }}
|
||||
</div>
|
||||
{{ noticeContent1 ? noticeContent1 : "暂无公告" }}
|
||||
|
||||
</div>
|
||||
<p>编辑:</p>
|
||||
<p>编辑新公告:</p>
|
||||
<a-textarea
|
||||
v-model:value="noticeContent"
|
||||
:maxlength="150"
|
||||
@@ -65,14 +64,15 @@ export default {
|
||||
const state = reactive({
|
||||
noticeChecked: true,
|
||||
projectInfo: {},
|
||||
noticeContent1: "",
|
||||
noticeContent: "",
|
||||
|
||||
editOn: false,
|
||||
});
|
||||
const getTaskInfo = () => {
|
||||
getTask({ projectId: props.projectId }).then((res) => {
|
||||
console.log("公告获取项目", res.data.data.projectInfo);
|
||||
state.projectInfo = res.data.data.projectInfo;
|
||||
state.noticeContent1 = state.projectInfo.notice;
|
||||
state.noticeContent = state.projectInfo.notice;
|
||||
});
|
||||
};
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
message.success("发布成功", res);
|
||||
state.noticeContent = res.data.data.notice;
|
||||
state.noticeContent1 = res.data.data.notice==""?"暂无公告":res.data.data.notice;
|
||||
handleCancel();
|
||||
emitter.emit("setNotice", false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user