From 32107ca1dd2c3930dcedf768e3dff163ff3bca35 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 09 二月 2023 11:56:29 +0800
Subject: [PATCH] 封装选择部门组件
---
src/views/operate/message/myIndex/update/index.vue | 75 +++++++++++++++++++++++++++++--------
1 files changed, 59 insertions(+), 16 deletions(-)
diff --git a/src/views/operate/message/myIndex/update/index.vue b/src/views/operate/message/myIndex/update/index.vue
index fe819ed..6d8400a 100644
--- a/src/views/operate/message/myIndex/update/index.vue
+++ b/src/views/operate/message/myIndex/update/index.vue
@@ -138,7 +138,7 @@
import MyEditor from "@/components/edit";
import MyColumnAdd from "@/views/operate/message/mycontrol/createUser";
import MyColView from "../messageView";
-import { sendMessage, updateMessage, getMessageById } from "@/api/operate/messageManagement";
+import { sendMessage, updateMessage, getMessageById,saveMessage } from "@/api/operate/messageManagement";
export default {
components: { MyEditor, MyColumnAdd, MyColView },
@@ -213,7 +213,7 @@
if (this.type !== 'create') {
this.$refs.edit.editor.txt.append(this.myDataRow.body);
}
-
+
},
methods: {
// 鍏抽棴寮圭獥
@@ -227,7 +227,7 @@
async getColumnList() {
await this.$axios({
method: "get",
- url: "sccg/message_column/getShowColumn",
+ url: "sccg/message_column/show ",
}).then((res) => {
this.colList = res.data;
});
@@ -287,7 +287,8 @@
this.role.body = this.$refs.edit.editor.txt.html();
this.$refs.user.validate((valid) => {
if (valid) {
- const { body, head, messageType, channelCode } = this.role;
+ if(mystatus==1){
+ const { body, head, messageType, channelCode } = this.role;
const params = {
body,
head,
@@ -325,6 +326,48 @@
})
);
}
+ }
+ if(mystatus==0){
+ const { body, head, messageType, channelCode } = this.role;
+ const params = {
+ body,
+ head,
+ messageType,
+ channelCode: `${channelCode}`,
+ sendTime: new Date(),
+ targetTo: this.checkedList.join(","),
+ status: mystatus,
+ };
+ if (this.role.channelCode === '03') {
+ delete params.messageType;
+ }
+ if (this.type === "create") {
+ saveMessage(params)
+ .then(() => {
+ this.$emit("closeMyDialog");
+ this.$message({ type: "success", message: "鎿嶄綔鎴愬姛" });
+ })
+ .catch((err) =>
+ this.$message({
+ type: "error",
+ message: err.data || err.message,
+ })
+ );
+ } else {
+ updateMessage({ id: this.myDataRow.id, ...params })
+ .then(() => {
+ this.$emit("closeMyDialog");
+ this.$message({ type: "success", message: "鎿嶄綔鎴愬姛" });
+ })
+ .catch((err) =>
+ this.$message({
+ type: "error",
+ message: err.data || err.message,
+ })
+ );
+ }
+ }
+
} else {
this.$message.error({ type: "warning", message: "璇锋鏌ュ繀濉」" });
}
@@ -380,28 +423,28 @@
<style lang="scss" scoped>
.createUser {
border-radius: 1px;
- background-color: #09152f;
+ background-color: white;
main {
text-align: left;
padding: 0 55px;
- background-color: #09152f;
+ background-color: white;
.mainContent {
display: flex;
justify-content: center;
padding-top: 50px;
&:deep(.el-dialog__title) {
- color: #4b9bb7;
+ //color: #4b9bb7;
}
&::v-deep .el-form-item__label {
- color: #4b9bb7;
+ //color: #4b9bb7;
}
&::v-deep .el-input__inner {
width: 400px;
- background-color: #09152f;
- border: 1px solid #17324c;
+ //background-color: #09152f;
+ //border: 1px solid #17324c;
}
.message-item__left {
@@ -427,7 +470,7 @@
span {
margin-left: 20px;
- color: #4b9bb7;
+ color: #606266;
}
}
@@ -439,10 +482,10 @@
width: 400px;
}
- &::v-deep .el-textarea__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // &::v-deep .el-textarea__inner {
+ // //background-color: #09152f;
+ // //border: 1px solid #17324c;
+ // }
.el-form-item__content {
width: 400px;
@@ -476,4 +519,4 @@
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0