This commit is contained in:
2025-12-18 18:24:16 +08:00
6 changed files with 499 additions and 243 deletions

View File

@ -0,0 +1,53 @@
import request from "@/utils/request";
const api = "/mosty-api/mosty-websocket";
/**
* 获取在线用户数
* @param {Object} params - 查询参数
* @returns {Promise<Array<SysUser>>} 返回在线用户数组
*
* @typedef {Object} SysUser 在线用户对象
* @property {string} [avatar] - 头像
* @property {string} [beginTime] - 用户有效开始时间,默认为当前日期(用户可改)
* @property {string} [birthday] - 出生日期
* @property {string} [bz] - 备注
* @property {string} [email] - 用户邮箱
* @property {string} [endTime] - 用户有效结束时间,默认空
* @property {number} [id] - 用户ID
* @property {string} [idEntityCard] - 身份证号
* @property {string} [inDustRialId] - 行业号码(如:警号)
* @property {string} [isVirtualUser] - 是否虚拟用户1、是 2、不是
* @property {string} [loginName] - 登录账号
* @property {number} [managerOrgId] - 管理部门ID
* @property {string} [managerOrgName] - 管理部门名称
* @property {string} [marital] - 婚姻状态
* @property {string} [mk] - -
* @property {string} [mobile] - 移动电话
* @property {string} [nation] - 民族
* @property {string} [password] - 密码
* @property {string} [politic] - 政治面貌
* @property {number} [positionId] - 岗位ID
* @property {string} [positionName] - 岗位名称
* @property {string} [sex] - 用户性别0男 1女 2未知
* @property {string} [sfrh] - -
* @property {string} [telePhone] - 电话号码
* @property {string} [type] - 人员类别
* @property {string} [typeName] - 人员类别中文
* @property {string} [userId] - -
* @property {string} [userName] - 用户昵称
* @property {string} [userType] - 用户类型00系统用户 01注册用户
* @property {string} [whcd] - 文化程度
* @property {number} [xzcs] - 选择次数
*/
export const socketCurrentUser = (params) => {
return request({
url: api + "/socket/currentUser",
method: "get",
params
});
};
// import {socketCurrentUser} from "@/api/dataWatch/onlineUser.js"

View File

@ -1,4 +1,9 @@
const url = "ws://80.155.0.82:8006/mosty-api/mosty-websocket/socket/"; //线上
// let url = "ws://80.155.0.82:8006/mosty-api/mosty-websocket/socket/"; //线上
let url = "ws://155.240.22.30:2109/mosty-api/mosty-websocket/socket/"; //线上
if(process.env.NODE_ENV === 'development') {
url = "ws://47.108.232.77:9537/mosty-api/mosty-websocket/socket/"; //本地
}
import {
getItem
} from "@/utils/storage";

View File

@ -1,4 +1,9 @@
const url = "ws://89.40.9.89:2109/mosty-api/mosty-websocket/socket/"; //线上
// let url = "ws://89.40.9.89:2109/mosty-api/mosty-websocket/socket/"; //线上
let url = "ws://155.240.22.30:2109/mosty-api/mosty-websocket/socket/"; //线上
if(process.env.NODE_ENV === 'development') {
url = "ws://47.108.232.77:9537/mosty-api/mosty-websocket/socket/"; //本地
}
import {
getItem
} from "@/utils/storage";

View File

@ -190,6 +190,9 @@ const isShowTransferMerchantTc = ref(false)
const isShow = ref(false)
const searchConfiger = ref([
{ label: "开始时间", prop: "startTime", placeholder: "请选择开始时间", showType: "date" },
{ label: "结束时间", prop: "endTime", placeholder: "请选择结束时间", showType: "date" },
{ label: "所属单位", prop: "ssbmdm", placeholder: "请选择所属单位", showType: "department" },
{ label: "情报标题", prop: 'qbmc', placeholder: "请输入情报标题", showType: "input" },
{ label: "标签级别", prop: 'qbjb', placeholder: "请选择标签级别", showType: "select", options: D_BZ_BQJB },
{ label: "情报处置状态", prop: 'lczt', placeholder: "请选择处置状态", showType: "select", options: D_BZ_LCZT },
@ -570,8 +573,8 @@ const isShowBtn = (btnName, row = {}) => {
const lczt = row.lczt
/** 按钮权限 */
const buttonPermissions = {
"市情指领导": ["肯定", "采纳", "回退", "分组", "转线索", "转合成", "转会商","打标签", "修改", "详情","关注部门"],
"市情指挥人员": ["采纳", "回退", "分组", "转线索", "转合成", "转会商","打标签", "修改", "详情","关注部门"],
"市情指领导": ["肯定", "采纳", "回退", "分组", "转线索", "转合成", "转会商", "打标签", "修改", "详情", "关注部门"],
"市情指挥人员": ["采纳", "回退", "分组", "转线索", "转合成", "转会商", "打标签", "修改", "详情", "关注部门"],
"县情指人员": ["上报", "回退", "修改", "详情"],
"部门": ["上报", "新增", "修改", "续报", "详情"]
};

View File

@ -2,7 +2,9 @@
<div class="titleBox">
<PageTitle title="网上会议室">
<el-button type="primary" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
</PageTitle>
@ -29,7 +31,7 @@
</div>
</div>
<div class="right">
<el-button type="primary" size="small" @click="joinMeeting(item,'会议')">加入会议</el-button>
<el-button type="primary" size="small" @click="joinMeeting(item, '会议')">加入会议</el-button>
<el-button type="primary" size="small">反馈情况</el-button>
<el-button type="primary" size="small">处置下发</el-button>
</div>
@ -38,29 +40,33 @@
<div class="bottom">
<el-popover placement="top" :visible="item.visible" :width="400" trigger="click">
<template #reference>
<el-link type="primary"><el-icon><ChatDotSquare /></el-icon>评论</el-link>
<el-link type="primary"><el-icon>
<ChatDotSquare />
</el-icon>评论</el-link>
</template>
<MOSTY.Other filterable style="width: 100%;" v-model="comments" type="textarea" rows="3" clearable placeholder="发表评论"/>
<MOSTY.Other filterable style="width: 100%;" v-model="comments" type="textarea" rows="3" clearable
placeholder="发表评论" />
<div class="mt10 flex just-center">
<el-button size="small" type="primary" @click.stop="handleSumbit(item)">发送</el-button>
</div>
</el-popover>
<el-link type="primary" ><el-icon><VideoPlay /></el-icon>会议回放</el-link>
<el-link type="primary" @click="addEdit('edit', item)"><el-icon><Edit /></el-icon>编辑</el-link>
<el-link type="danger" @click="delDictItem(item.id)"><el-icon><Delete /></el-icon>删除</el-link>
<el-link type="primary"><el-icon>
<VideoPlay />
</el-icon>会议回放</el-link>
<el-link type="primary" @click="addEdit('edit', item)"><el-icon>
<Edit />
</el-icon>编辑</el-link>
<el-link type="danger" @click="delDictItem(item.id)"><el-icon>
<Delete />
</el-icon>删除</el-link>
</div>
</li>
<MOSTY.Empty :show="!pageData.loading && pageData.list.length <= 0"></MOSTY.Empty>
</ul>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" @updateDate="getList" />
@ -73,26 +79,26 @@
</template>
<script setup>
import MeetingView from '@/components/Consultation/demo.vue'
import { ElMessageBox } from "element-plus";
import * as MOSTY from "@/components/MyComponents/index";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/detailForm.vue";
import RoomDetail from "./components/roomDetail.vue";
import { useRoute, useRouter } from 'vue-router';
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance,nextTick } from "vue";
import ConferenceRoom from "./components/Communications/conferenceRoom.vue";
const router = useRouter();
const route = useRoute();
const { proxy } = getCurrentInstance();
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const openMeeting = ref(false); // 打开会议窗口
const refMeetingView = ref()
const searchConfiger = ref([
import MeetingView from '@/components/Consultation/demo.vue'
import { ElMessageBox } from "element-plus";
import * as MOSTY from "@/components/MyComponents/index";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/detailForm.vue";
import RoomDetail from "./components/roomDetail.vue";
import { useRoute, useRouter } from 'vue-router';
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import ConferenceRoom from "./components/Communications/conferenceRoom.vue";
const router = useRouter();
const route = useRoute();
const { proxy } = getCurrentInstance();
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const openMeeting = ref(false); // 打开会议窗口
const refMeetingView = ref()
const searchConfiger = ref([
{
label: "会议主题",
prop: "hsbt",
@ -104,10 +110,10 @@
prop: "daterange",
showType: "datetimerange"
},
]);
const comments = ref(''); // 评论内容
const queryFrom = ref({});
const pageData = reactive({
]);
const comments = ref(''); // 评论内容
const queryFrom = ref({});
const pageData = reactive({
list: [],
loading: false,
total: 0,
@ -115,22 +121,22 @@
pageSize: 20,
pageCurrent: 1
},
});
const jsonData = ref('')
onMounted(() => {
});
const jsonData = ref('')
onMounted(() => {
jsonData.value = require('@/components/Consultation/components/zh_CN.json');
getList();
tabHeightFn();
});
});
const updateItem = (item) => {
qcckPost(item,'/mosty-gsxt/wshs/update').then(res=>{
const updateItem = (item) => {
qcckPost(item, '/mosty-gsxt/wshs/update').then(res => {
getList();
})
}
}
// 搜索
const onSearch = (val) => {
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
if (val.daterange && val.daterange.length > 0) {
queryFrom.value.startTime = val.daterange[0];
@ -141,24 +147,24 @@
}
pageData.pageConfiger.pageCurrent = 1;
getList();
};
};
const changeNo = (val) => {
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
getList();
};
const changeSize = (val) => {
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
};
// 获取列表
const getList = () => {
// 获取列表
const getList = () => {
pageData.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
delete data.daterange; // 删除daterange字段
if(route.query.tsypid) data.tsypid = route.query.tsypid;
qcckGet(data,'/mosty-gsxt/wshs/selectPage').then(res=>{
if (route.query.tsypid) data.tsypid = route.query.tsypid;
qcckGet(data, '/mosty-gsxt/wshs/selectPage').then(res => {
let arr = res.records || [];
arr.forEach(item => {
item.chry = item.chryList ? item.chryList.map(el => el.chryxm).join('、') : '';
@ -167,77 +173,83 @@
pageData.list = arr;
pageData.total = res.total;
pageData.loading = false;
}).catch(()=>{ pageData.loading = false; })
};
}).catch(() => { pageData.loading = false; })
};
// 提交评论
const handleSumbit = (item) => {
// 提交评论
const handleSumbit = (item) => {
if (!comments.value) return proxy.$message({ type: "warning", message: "评论内容不能为空" });
proxy.$message({ type: "success", message: "评论已发送" });
qcckPost({id:item.id,plnr:comments.value},'/mosty-gsxt/wshs/addWshyPl').then((res)=>{
qcckPost({ id: item.id, plnr: comments.value }, '/mosty-gsxt/wshs/addWshyPl').then((res) => {
getList();
item.visible = false; // 关闭评论弹窗
comments.value = ''; // 清空评论内容
})
};
// 加入会议
const joinMeeting = (item,type) => {
};
// 加入会议
const joinMeeting = (item, type) => {
item.number = item.hybh;
refMeetingView.value.openInit(item,type)
};
refMeetingView.value.openInit(item, type)
};
// 删除
const delDictItem = (id) =>{
proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
qcckPost({id},'/mosty-gsxt/wshs/delete').then(()=>{
// 删除
const delDictItem = (id) => {
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
qcckPost({ id }, '/mosty-gsxt/wshs/delete').then(() => {
proxy.$message({ type: "success", message: "删除成功" });
getList();
})
}).catch(() => {});
}).catch(() => { });
}
// 详情
const addEdit = (type, row) => {
// 详情
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
};
};
// 表格高度计算
const tabHeightFn = () => {
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
window.onresize = function() {
tabHeightFn();
};
};
// 会议详情弹窗
// 会议详情弹窗
const conferenceRoomVisible = ref(false);
</script>
<style lang="scss" scoped>
.el-loading-mask {
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
.tabBox {
}
.tabBox {
.pageSearch {
margin-bottom: 0 !important;
.box {
align-items: center !important;
}
}
:deep(.pageSearch .box .item) {
margin-bottom: 0 !important;
}
}
.btns {
}
.btns {
padding: 10px 20px;
}
.list {
}
.list {
height: calc(100% - 10px);
gap: 10px;
margin: 0 15px;
overflow: auto;
.list-item {
display: inline-block;
border: 1px solid #ccc;
@ -247,28 +259,34 @@ const conferenceRoomVisible = ref(false);
border-radius: 5px;
padding: 10px;
margin: 10px 5px;
&:hover {
border-color: rgb(124, 195, 253);
background-color: rgba(190, 233, 255, 0.582);
}
&:hover .mid {
border-color: rgb(124, 195, 253);
}
&:hover .desc {
background-color: rgb(190, 233, 255);
}
.title {
color: black;
font-size: 14px;
font-weight: 700;
margin-bottom: 5px;
}
.info {
color: #a5a1a1;
font-size: 12px;
line-height: 1.5;
}
.desc {
margin-top: 5px;
background-color: rgb(242, 242, 242);
@ -279,6 +297,7 @@ const conferenceRoomVisible = ref(false);
overflow: hidden;
overflow-y: auto;
}
.mid {
border: 1px dashed rgb(124, 195, 253);
border-left: 0;
@ -286,13 +305,16 @@ const conferenceRoomVisible = ref(false);
padding: 10px 0;
display: flex;
justify-content: space-between;
.left {
width: calc(100% - 80px);
.title {
font-size: 14px;
color: black;
margin-bottom: 5px;
}
.info {
font-size: 12px;
color: #a5a1a1;
@ -302,15 +324,18 @@ const conferenceRoomVisible = ref(false);
.right {
width: 80px;
.el-button + .el-button {
.el-button+.el-button {
margin-left: 0;
margin-top: 5px;
}
}
}
.bottom {
display: flex;
justify-content: flex-end;
:deep(.el-link--inner) {
display: flex;
align-items: center;
@ -318,5 +343,5 @@ const conferenceRoomVisible = ref(false);
}
}
}
}
}
</style>

View File

@ -1,5 +1,170 @@
<template>
<div>
开发中
<div class="titleBox">
<PageTitle title="在线用户监控">
</PageTitle>
</div>
<!-- 搜索 -->
<!-- <div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
</div> -->
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #sex="{ row }">
<dict-tag :options="D_BZ_XB" :value="row.sex" :tag="false" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="primary" @click="addEdit('edit', row)">详情</el-link>
</template>
</MyTable>
<!-- <Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages> -->
</div>
<!-- 编辑详情 -->
<!-- <EditAddForm v-if="show" ref="detailDiloag" :dic="{ JQLB,JQLX,JQXL,JQZL,D_BZ_JQLY,D_BZ_JQFL,JQLB_DP,D_BZ_JQBQ,D_GS_SSYJ }"
@updateDate="getList" /> -->
</div>
</template>
<script setup>
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
// import EditAddForm from "./components/editAddForm.vue";
// import { socketCurrentUser } from '@/api/HumanIntelligence/integralList.js'
import { socketCurrentUser } from "@/api/dataWatch/onlineUser.js"
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
// import { jflylxTypes } from "./dict.js"
const { proxy } = getCurrentInstance();
const { D_BZ_XB, } = proxy.$dict("D_BZ_XB",); //获取字典数据
const detailDiloag = ref();
const show = ref(false)
const userTypeArr = [
{ label: '系统用户', value: '00' },
{ label: '注册用户', value: '01' }
]
const searchConfiger = ref([
{
label: "用户昵称",
prop: "userName",
placeholder: "请输入用户昵称",
showType: "input"
},
{
label: "用户类型",
prop: "userType",
placeholder: "请选择用户类型",
showType: "select",
options: userTypeArr
},
]);
const searchBox = ref(); //搜索框
const pageData = reactive({
tableData: [], //表格数据
keyCount: 0,
tableConfiger: {
haveControls: false, //不显示【操作列】
rowHieght: 61,
showSelectType: "null",
loading: false,
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 160, //操作栏宽度
tableColumn: [
{ label: "用户昵称", prop: "userName" },
{ label: "登录账号", prop: "loginName" },
{ label: "用户类型", prop: "userType_cname" },
{ label: "性别", prop: "sex", showSolt: true },
{ label: "移动电话", prop: "mobile" },
{ label: "邮箱", prop: "email" },
{ label: "管理部门", prop: "managerOrgName" },
{ label: "岗位名称", prop: "positionName" },
{ label: "行业号码", prop: "inDustRialId" },
{ label: "备注", prop: "bz", showOverflowTooltip: true },
]
});
onMounted(() => {
tabHeightFn();
getList()
});
const listQuery = ref({})
// 搜索
const onSearch = (val) => {
listQuery.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList()
}
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
getList()
}
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList()
}
const getUserTypeName = (val) => {
const userTypeObj = userTypeArr.find(item => item.value === val)
return userTypeObj ? userTypeObj.label : ''
}
const getList = () => {
pageData.tableConfiger.loading = true;
const params = {
...listQuery.value
}
socketCurrentUser(params).then(res => {
// socketCurrentUser 返回的是数组格式,不是分页对象
pageData.tableData = Array.isArray(res) ? res : [];
pageData.tableData = pageData.tableData.map(item => {
item.userType_cname = getUserTypeName(item.userType);
return item;
})
pageData.total = Array.isArray(res) ? res.length : 0;
}).finally(() => {
pageData.tableConfiger.loading = false;
})
}
// 新增
const addEdit = (type, row) => {
show.value = true;
nextTick(() => {
detailDiloag.value.init(type, row,);
})
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - (searchBox.value?.offsetHeight || 0) - 250;
window.onresize = function() {
tabHeightFn();
};
};
</script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>