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