|
@@ -121,19 +121,11 @@
|
|
<el-button
|
|
<el-button
|
|
v-if="scope.row.publishStatus == 'DRAFT'"
|
|
v-if="scope.row.publishStatus == 'DRAFT'"
|
|
size="mini"
|
|
size="mini"
|
|
- type="warning"
|
|
|
|
|
|
+ type="primary"
|
|
icon="el-icon-message"
|
|
icon="el-icon-message"
|
|
- @click="sendMsg(scope.row.id, 'TO_BE_PUBLISHED')"
|
|
|
|
|
|
+ @click="sendMsg(scope.row.id)"
|
|
>发送</el-button
|
|
>发送</el-button
|
|
>
|
|
>
|
|
- <el-button
|
|
|
|
- v-if="scope.row.publishStatus == 'PUBLISHED'"
|
|
|
|
- size="mini"
|
|
|
|
- type="danger"
|
|
|
|
- icon="el-icon-back"
|
|
|
|
- @click="sendMsg(scope.row.id, 'DRAFT')"
|
|
|
|
- >撤回</el-button
|
|
|
|
- >
|
|
|
|
<el-dropdown
|
|
<el-dropdown
|
|
style="margin-left: 10px"
|
|
style="margin-left: 10px"
|
|
:disabled="scope.row.publishStatus != 'DRAFT'"
|
|
:disabled="scope.row.publishStatus != 'DRAFT'"
|
|
@@ -163,6 +155,16 @@
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.publishStatus == 'PUBLISHED'"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="warning"
|
|
|
|
+ icon="el-icon-back"
|
|
|
|
+ @click="recallMsg(scope.row.id)"
|
|
|
|
+ >撤回</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
</div>
|
|
</div>
|
|
@@ -892,15 +894,19 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- sendMsg(id, status) {
|
|
|
|
- let msg = "发送成功";
|
|
|
|
- if (status === "DRAFT") {
|
|
|
|
- msg = "撤回成功";
|
|
|
|
- }
|
|
|
|
|
|
+ sendMsg(id) {
|
|
|
|
+ this.$httpWithMsg
|
|
|
|
+ .get(EXAM_WORK_API + "/notice/sendMsg/" + id)
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.success("发送成功");
|
|
|
|
+ this.searchForm();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ recallMsg(id) {
|
|
this.$httpWithMsg
|
|
this.$httpWithMsg
|
|
- .get(EXAM_WORK_API + "/notice/sendMsg/" + status + "/" + id)
|
|
|
|
|
|
+ .get(EXAM_WORK_API + "/notice/recallMsg/" + id)
|
|
.then(() => {
|
|
.then(() => {
|
|
- this.success(msg);
|
|
|
|
|
|
+ this.success("撤回成功");
|
|
this.searchForm();
|
|
this.searchForm();
|
|
});
|
|
});
|
|
},
|
|
},
|