|
@@ -302,6 +302,13 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
sendMsg() {
|
|
sendMsg() {
|
|
|
|
|
|
|
|
+
|
|
|
|
+ this.cardNewsInfo = {}
|
|
|
|
+ this.msgObj = {
|
|
|
|
+ newsTitle: '',
|
|
|
|
+ newsContent: '',
|
|
|
|
+ }
|
|
|
|
+ this.selectList = []
|
|
this.isShowMsg = true
|
|
this.isShowMsg = true
|
|
},
|
|
},
|
|
/** 查询用户管理列表 */
|
|
/** 查询用户管理列表 */
|
|
@@ -314,26 +321,39 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
submitMsg() {
|
|
submitMsg() {
|
|
- let _array = []
|
|
|
|
- if (this.selectList.length == 0) {
|
|
|
|
- this.msgObj.allFlag = 1
|
|
|
|
- } else {
|
|
|
|
- this.msgObj.cardNewsInfoList = []
|
|
|
|
- for (let i = 0; i < this.selectList.length; i++) {
|
|
|
|
- _array.push({ receiveId: this.selectList[i].id })
|
|
|
|
- }
|
|
|
|
- this.msgObj.cardNewsInfoList = _array
|
|
|
|
- }
|
|
|
|
- userSendMsg(this.msgObj).then(response => {
|
|
|
|
- console.log("response", response)
|
|
|
|
- if (response.data) {
|
|
|
|
- this.msgSuccess("发送成功");
|
|
|
|
- this.isShowMsg = false;
|
|
|
|
|
|
+ let that = this
|
|
|
|
+ this.$confirm('确定发送消息', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let _array = []
|
|
|
|
+ if (this.selectList.length == 0) {
|
|
|
|
+ this.msgObj.allFlag = 1
|
|
} else {
|
|
} else {
|
|
- this.msgError(response.msg);
|
|
|
|
|
|
+ this.msgObj.cardNewsInfoList = []
|
|
|
|
+ for (let i = 0; i < this.selectList.length; i++) {
|
|
|
|
+ _array.push({ receiveId: this.selectList[i].id })
|
|
|
|
+ }
|
|
|
|
+ this.msgObj.cardNewsInfoList = _array
|
|
}
|
|
}
|
|
|
|
+ userSendMsg(this.msgObj).then(response => {
|
|
|
|
+ console.log("response", response)
|
|
|
|
+ if (response.data) {
|
|
|
|
+ this.msgSuccess("发送成功");
|
|
|
|
+ this.isShowMsg = false;
|
|
|
|
+ } else {
|
|
|
|
+ this.msgError(response.msg);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消'
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
+
|
|
},
|
|
},
|
|
cancelMsg() {
|
|
cancelMsg() {
|
|
this.isShowMsg = false;
|
|
this.isShowMsg = false;
|