Commit 2419c8b7 authored by 以墨为白's avatar 以墨为白 🎧
parents 09ada74c 9a640bea
......@@ -32,4 +32,9 @@ export const getListUnread = (chatRoomId, userId) => {
//获取图片库照片
export const getFileUrl = (bucket, name) => {
return get(`api/rest/file/viewPicture/${bucket}?objectName=${name}`);
}
//审批大群公告
export const updateStatus = (id,status) => {
return get(`api/rest/chat/approvalPending/updateStatus?id=${id}&status=${status}`);
}
\ No newline at end of file
......@@ -96,7 +96,7 @@
<script>
import goBack from '@/assets/img/xjs/4.png';
import { getRecordsByPaging } from '@/api/chat/chatRecords';
import { getRecordsByPaging, updateStatus } from '@/api/chat/chatRecords';
import { getChatRoomInfo } from "@/api/chat/chatRoom";
import { getTime_extent } from '@/util/http_util.js';
import NoticeDialog from '@/view/ddkz/components/noticeDialog.vue';
......@@ -121,6 +121,7 @@ export default {
publicNoticeList: [],
stompClient: { connected: false },
peopleList: [],
notifications: []
// status:false
}
},
......@@ -134,19 +135,29 @@ export default {
this.$router.push({ name: '导调控制模块' });
},
listChatroom(item) {
//取消群聊的订阅
//取消大群聊的订阅和导演部的订阅
for (const sub in this.stompClient.subscriptions) {
if (sub.startsWith("multicastMeeting")) {
if (sub.startsWith("multicastMeeting") || sub.startsWith("multicastApproveNotice")) {
this.stompClient.unsubscribe(sub);
}
}
//订阅聊天室主题,订阅功能中设置ID:
//取消导演部审批
//订阅大群主题,订阅功能中设置ID:
this.stompClient.subscribe(item.address, res => {
this.getRecordsByPagingFn(item);
this.$nextTick(() => {
this.$refs.myNotice.handleClose();
})
}, { id: "multicastMeeting" + item.id + new Date().getTime() });
//判断次用户是否为导演部成员
if (item.approvalPendingAddress) {
//订阅导演部成员,订阅功能中设置ID:
this.stompClient.subscribe(item.approvalPendingAddress, res => {
this.openApprove(JSON.parse(res.body));
}, { id: "multicastApproveNotice" + item.id + new Date().getTime() });
}
},
//分页查询群聊天记录
getRecordsByPagingFn(item) {
......@@ -230,6 +241,68 @@ export default {
},
showLiterature(url) {
window.open("api/rest/file/download/CHAT/" + url);
},
openApprove(item) {
const h = this.$createElement;
const agreeButton = h('el-button', {
props: {
type: 'success',
size: "mini"
},
on: {
//为按钮绑定点击事件
click: () => {
this.approvalNotice(item.id, 'PASS')
}
},
style: {
border: "none",
textAlign: "center",
// width:"20%",
margin: "5% 0 0 0 ",
}
}, '同意');
const rejectButton = h('el-button', {
props: {
type: 'danger',
size: "mini"
},
on: {
//为按钮绑定点击事件
click: () => {
this.approvalNotice(item.id, 'REJECT')
}
},
style: {
border: "none",
textAlign: "center",
margin: "5% 0 0 20px ",
}
}, '驳回');
const contentDiv = h('div', {}, `内容:${item.content}`);
const fileDiv = h('div', {}, `测试.png`);
const divTemplate = h('div', { style: { textAlign: 'center' } }, [agreeButton, rejectButton])
let myNotify = this.$notify({
title: item.title,
dangerouslyUseHTMLString: true,
duration: 0,
message: h('div', {
style: {}
},
[contentDiv, fileDiv, divTemplate]
)
});
this.notifications[item.id] = myNotify
},
approvalNotice(id, state) {
updateStatus(id, state).then(res => {
this.$message.success(res);
this.notifications[id].close();
delete this.notifications[id];
}).catch(error => {
this.$message.error(error);
})
}
},
watch: {
......
......@@ -30,6 +30,7 @@
import { upLoadFiles } from '../../../api/chat/chatRoom';
import { format_file } from '../../../util/http_util';
import elDragDialog from "@/util/directive/el-dragDialog";
// import { h } from 'vue';
export default {
data() {
return {
......@@ -82,7 +83,8 @@ export default {
this.form.fileList = [];
},
sendNotice() {
this.myStompClient.send(`/app/sendToChatRoom/${this.currentChatRoom.id}/${this.currentChatRoom.teamId}`, {}, JSON.stringify(this.form));
// this.myStompClient.send(`/app/sendToChatRoom/${this.currentChatRoom.id}/${this.currentChatRoom.teamId}`, {}, JSON.stringify(this.form));
this.myStompClient.send(`/app/sendToApprovalPending/${this.currentChatRoom.id}/${this.currentChatRoom.teamId}`, {}, JSON.stringify(this.form));
this.form = {
title: '',
content: '',
......
......@@ -6,7 +6,7 @@
</el-form-item>
<el-form-item label="演习主持人">
<!-- <el-input v-model="formData.chatroomOwner"></el-input> -->
<el-select v-model="formData.chatroomOwner" placeholder="请选择">
<el-select v-model="formData.director" multiple placeholder="请选择">
<el-option v-for="item in allData" :key="item.account" :label="item.account" :value="item.account">
</el-option>
</el-select>
......@@ -22,12 +22,13 @@
<el-form-item label="队伍名称">
<el-input v-model="item.teamName"></el-input>
</el-form-item>
<el-form-item label="参会立场">
<el-select v-model="item.teamType" placeholder="请选择">
<!-- <el-form-item label="参会立场"> -->
<!-- <el-input v-model="formData.teamType"></el-input> -->
<!-- <el-select v-model="item.teamType" placeholder="请选择">
<el-option v-for="item in teamType" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-select> -->
<!-- </el-form-item> -->
<el-form-item label="参会人员">
<div class="PackView_transfer">
<div class="ta-transfer">
......@@ -93,6 +94,13 @@
</div>
</el-form-item>
<el-form-item label="组长" v-if="item.wpinfo.length>0">
<el-select v-model="item.leader" placeholder="请选择组长">
<el-option v-for="item in item.wpinfo" :key="item.account" :label="item.account"
:value="item.account">
</el-option>
</el-select>
</el-form-item>
</el-form>
</el-form-item>
<el-form-item>
......@@ -110,16 +118,17 @@ export default {
data() {
return {
formData: {
chatroomOwner: '',
chatroomOwner: null,
conRemark: '',
nickname: '',
director:[],
chatroomHeadPic: '',
teams: [
{
createTime: '',
member: [],
teamName: '',
teamType: '',
teamType: null,
invoking: {
checkedCities: [],
selected_num: 0,
......@@ -133,7 +142,8 @@ export default {
selected_num: 0,
dataAll: []
},
wpinfo: []
wpinfo: [],
leader: null
}
]
},
......@@ -146,7 +156,7 @@ export default {
],
// dataAll: [],
allData: [],
tmpArr:[],
tmpArr: [],
bgData: [
{
invoking: {
......@@ -175,7 +185,7 @@ export default {
createTime: '',
member: [],
teamName: '',
teamType: '',
teamType: null,
invoking: {
checkedCities: [],
selected_num: 0,
......@@ -189,7 +199,8 @@ export default {
selected_num: 0,
dataAll: []
},
wpinfo: []
wpinfo: [],
leader: null
}
);
},
......@@ -229,7 +240,7 @@ export default {
// ----------------------------
handleCheckAllChange(val, index, falg) { //点击全选
let tmpArr = [];
this.allData.forEach(item=>{
this.allData.forEach(item => {
tmpArr.push(item.id);
});
if (falg) {
......@@ -274,6 +285,7 @@ export default {
})
},
createMeeting() {
this.formData.chatroomOwner = this.userInfo.account;
this.formData.teams.forEach(item => {
item.createTime = getTime_extent(0).currentDate;
item.wpinfo.forEach(item1 => {
......@@ -289,13 +301,22 @@ export default {
})
}
},
computed: {
userInfo() {
if (this.$store.getters.userInfo) {
return this.$store.getters.userInfo;
} else {
return { account: "" };
}
}
},
watch: {
'formData.chatroomOwner'(newVal, oldVal) {
let tmp = this.tmpArr.filter(item => { return item.account == oldVal });
if (tmp.length>0) {
this.allData.push(tmp[0]);
'formData.director'(newVal, oldVal) {
let tmp = this.tmpArr.filter(item => { return oldVal.includes(item.account) });
if (tmp.length > 0) {
this.allData = this.allData.concat(tmp);
}
this.allData = this.allData.filter(item => { return item.account != newVal });
this.allData = this.allData.filter(item => { return newVal.includes(item.account) == false });
}
},
mounted() {
......@@ -322,8 +343,10 @@ export default {
}
.el-select {
width: 40%;
.el-input__inner {
width: 200px;
width: 100%;
}
}
......@@ -331,6 +354,7 @@ export default {
.yhf {
width: 48%;
height: 570px;
float: left;
margin-top: 2%;
margin-left: 1%;
......@@ -339,8 +363,8 @@ export default {
box-sizing: border-box;
border-radius: 4px;
&>div:first-child,
&>:nth-child(2) {
&>div:first-child
{
margin-top: 10px;
display: flex;
......@@ -363,7 +387,7 @@ export default {
.ta-transfer {
width: 100%;
height: 400px;
height: 300px;
margin-bottom: 50px;
box-sizing: border-box;
display: flex;
......
<template>
<div class="yxsp">
<div class="yxspCondition">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="form.dateRange" type="daterange" range-separator="至"
start-placeholder="开始时间" end-placeholder="结束时间" :default-time="['00:00:00', '23:59:59']">
</el-date-picker>
<el-input class="myInput" v-model="form.chatRoomName" placeholder="请输入聊天室名称" clearable></el-input>
<el-select style="margin-left: 10px;" v-model="form.status" placeholder="请选择审批状态" clearable>
<el-option v-for="item in stateList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<div class="searchButton" @click="searchChatList">搜索</div>
</div>
<div class="yxspContent">
<el-table :data="meetingList" tooltip-effect="dark" style="width: 100%;" height="calc(100% - 60px)">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="nickname" label="演习标题" align="center"></el-table-column>
<el-table-column prop="conRemark" label="演习方" align="center"></el-table-column>
<el-table-column prop="createTime" label="发送标题" align="center"></el-table-column>
<el-table-column prop="status.name" label="发送内容" align="center"></el-table-column>
<el-table-column prop="createTime" label="发送附件" align="center"></el-table-column>
<el-table-column prop="createTime" label="开始时间" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="500">
<template slot-scope="scope">
<el-button size="mini" type="primary">详情</el-button>
<el-button v-if="scope.row.status.name == '审核中'" size="mini" type="danger"
@click="rejectNotice(scope.row)">驳回</el-button>
<el-button v-if="scope.row.status.name == '待开始'" size="mini" type="success"
@click="passNotice(scope.row)">审核通过</el-button>
<el-tag v-if="scope.row.status.name == '审核通过'" type="success" effect="dark">已通过</el-tag>
<el-tag v-if="scope.row.status.name == '审核未通过'" type="danger" effect="dark">未通过</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
\ No newline at end of file
</template>
<script>
export default {
data() {
return {
form: {
dateRange: [],
chatRoomName: null,
status: null
},
stateList: [
{ label: '审核通过', value: 'PASSED' },
{ label: '审核未通过', value: 'REJECT' },
{ label: '审核中', value: 'INREVIEW' },
],
meetingList: []
}
},
methods: {
rejectNotice(item) {
},
passNotice(item) {
},
searchChatList() {
if (this.form.dateRange.length == 2) {
this.queryChatRoomListFn({ startTime: this.form.dateRange[0], endTime: this.form.dateRange[1], userId: this.userInfo.account, status: this.form.status == '' ? null : this.form.status, chatRoomName: this.form.chatRoomName == '' ? null : this.form.chatRoomName })
} else {
this.queryChatRoomListFn({ userId: this.userInfo.account, status: this.form.status == '' ? null : this.form.status, chatRoomName: this.form.chatRoomName == '' ? null : this.form.chatRoomName })
}
}
}
}
</script>
<style lang="scss">
.yxsp {
width: 100%;
height: 100%;
.yxspCondition {
width: 100%;
height: 80px;
display: flex;
.el-date-editor {
background: none;
span {
color: white;
}
.el-range-input {
color: white;
background: none;
}
}
.el-input {
float: left;
width: 200px;
margin-left: 10px;
.el-input__inner {
background: none;
color: #ffff;
border: 1px solid #3a5f94c9 !important;
}
}
.el-input__inner {
border: 1px solid #3a5f94c9 !important;
}
.searchButton {
width: 80px;
height: 30px;
line-height: 30px;
margin-top: 4px;
margin-left: 20px;
font-size: 14px;
text-align: center;
// background-image: url(../../../assets/img/fzjc/7.png);
background-size: 100% 100%;
background-repeat: no-repeat;
border: 1px solid #3a5f94c9 !important;
border-radius: 5px;
cursor: pointer;
}
}
.yxspContent {
width: 100%;
height: calc(100% - 50px);
overflow-y: auto;
.el-table tr {
background-color: transparent !important;
color: #ffffffc7;
}
.el-table thead tr {
height: 40px;
background: url(../../../assets/img/setting/tr1.png) no-repeat;
background-size: 100% 100%;
}
.el-table th {
background-color: transparent;
}
tbody tr {
border-bottom: 1px solid #252631;
}
.el-table td {
border-bottom: 1px solid #252631;
border-right: unset;
}
.el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #82848a78;
}
.el-table th {
border: unset;
}
.el-table--fit {
background: none !important;
border: unset;
}
.el-icon-delete-solid {
color: red;
cursor: pointer;
font-size: 18px;
}
.el-icon-edit {
color: #1172d8;
cursor: pointer;
font-size: 20px;
}
.el-icon-view {
color: #00ffff;
font-size: 20px;
cursor: pointer;
}
.el-table--group::after,
.el-table--border::after,
.el-table::before {
background-color: unset;
}
.pagination-div {
width: 100%;
height: 50px;
.el-pagination {
margin-top: 9px;
text-align: right;
.el-pagination__total {
color: white;
}
.el-pagination__jump {
color: white;
}
}
.myPagination.is-background .el-pager li:not(.disabled).active {
color: #fff;
border: 1px solid #146a80;
box-shadow: 0 0 10px #1b6097;
background-color: #1d2d46;
}
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment