diff --git a/src/App.vue b/src/App.vue index 65e950c..891da9b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,7 +7,6 @@ - + + diff --git a/src/components/common/TestDiv.vue b/src/components/common/TestDiv.vue new file mode 100644 index 0000000..41f00bb --- /dev/null +++ b/src/components/common/TestDiv.vue @@ -0,0 +1,284 @@ + + + + + diff --git a/src/components/common/item.vue b/src/components/common/item.vue new file mode 100644 index 0000000..5e94c59 --- /dev/null +++ b/src/components/common/item.vue @@ -0,0 +1,156 @@ + + + diff --git a/src/components/fzq/fxq.vue b/src/components/fzq/fxq.vue index a10d5b0..c148cb1 100644 --- a/src/components/fzq/fxq.vue +++ b/src/components/fzq/fxq.vue @@ -64,7 +64,6 @@ const startDrag = (e) => { // 处理移动 const handleMove = (e) => { if (!isDragging.value) return; - let clientX, clientY; if (e.type === 'mousemove') { clientX = e.clientX; diff --git a/src/layout/index.vue b/src/layout/index.vue index b1bedf8..ee9e917 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -11,6 +11,7 @@ + @@ -20,6 +21,7 @@ import NavBar from "./components/NavBar"; import SideBar from "./components/SideBar/index"; import AppMain from "./components/AppMain"; import TagsView from "./components/TagsView"; +import TestDiv from "@/components/common/TestDiv.vue"; \ No newline at end of file + diff --git a/src/utils/webSocket.js b/src/utils/webSocket.js index 9abf504..4dd86b0 100644 --- a/src/utils/webSocket.js +++ b/src/utils/webSocket.js @@ -1,5 +1,5 @@ // let url = "ws://89.40.9.89:2109/mosty-api/mosty-websocket/socket/"; //线上 -let url = "wss://sg.lz.dsj.xz/websocket/mosty-websocket/socket/"; //线上 +let url = "ws://89.40.9.93:50039/mosty-websocket/socket/"; //线上 if (process.env.NODE_ENV === 'development') { url = "ws://47.108.232.77:9537/mosty-api/mosty-websocket/socket/"; //本地 @@ -86,8 +86,6 @@ class WebSoketClass { if (fun) fun(true); }; this.ws.onclose = (e) => { - console.log(e); - console.log('WebSocket连接已关闭,关闭码:', e.code, '原因:', e.reason); // 如果是正常关闭(1000)或手动关闭(1001),不进行重连 if (e.code !== 1000 && e.code !== 1001) { @@ -165,7 +163,6 @@ class WebSoketClass { // 接收发送消息 getMessage() { this.ws.onmessage = (e) => { - console.log(e); try { if (e.data) { @@ -175,6 +172,9 @@ class WebSoketClass { // 触发音频播放 console.log('触发音频播放'); emitter.emit('openYp', newsDate.data); // 传递消息数据 + } else { + + emitter.emit('webSocketMessage', { data: newsDate.data, type: newsDate.type }); } // else if (newsDate.type === 'ALARM_STOP' || newsDate.type === 'warning_stop') { // // 触发音频停止 @@ -187,7 +187,7 @@ class WebSoketClass { // emitter.emit('statusUpdate', newsDate.data); // } // // 通用消息事件 - // emitter.emit('webSocketMessage', newsDate); + } } catch (error) { console.error('处理WebSocket消息失败:', error); diff --git a/src/views/backOfficeSystem/HumanIntelligence/appraisalManagement/components/addForm.vue b/src/views/backOfficeSystem/HumanIntelligence/appraisalManagement/components/addForm.vue index 2735387..cbd7da4 100644 --- a/src/views/backOfficeSystem/HumanIntelligence/appraisalManagement/components/addForm.vue +++ b/src/views/backOfficeSystem/HumanIntelligence/appraisalManagement/components/addForm.vue @@ -3,27 +3,58 @@
工作考核{{ title }}
- 保存 + 保存 关闭
- + + + + + + + +
diff --git a/src/views/backOfficeSystem/ResearchJudgment/InformationFlows/InstructionInformation/index.vue b/src/views/backOfficeSystem/ResearchJudgment/InformationFlows/InstructionInformation/index.vue index db26543..2df3620 100644 --- a/src/views/backOfficeSystem/ResearchJudgment/InformationFlows/InstructionInformation/index.vue +++ b/src/views/backOfficeSystem/ResearchJudgment/InformationFlows/InstructionInformation/index.vue @@ -58,8 +58,8 @@ > - + @@ -71,7 +71,8 @@ import Search from "@/components/aboutTable/Search.vue"; import DetailForm from "./components/detailForm.vue"; import Fk from "./components/fk.vue"; import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js"; -import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue"; +import { useRoute } from "vue-router"; +import { reactive, ref, onMounted, getCurrentInstance, nextTick, watch } from "vue"; import { getItem } from '@/utils/storage' const { proxy } = getCurrentInstance(); const {D_GS_XS_SJLY,D_GS_XS_ZLLX,D_GS_ZDQT_FXDJ,D_GS_XS_CZZT} = proxy.$dict('D_GS_XS_SJLY','D_GS_XS_ZLLX','D_GS_ZDQT_FXDJ','D_GS_XS_CZZT') @@ -110,14 +111,20 @@ const pageData = reactive({ { label: '是否反馈', prop: 'sffk', showSolt: true }, { label: '是否签收', prop: 'sfqs', showSolt: true }, ] - }); +}); + const route=useRoute() const userInfo=ref(); onMounted(() => { + if (route.query.id) { + addEdit('detail', {id:route.query.id}); + } userInfo.value=getItem('deptId')[0] getList() tabHeightFn(); }); + + // 搜索 const onSearch = (val) =>{ queryFrom.value = {...val} @@ -166,6 +173,12 @@ const addEdit = (type, row) => { detailDiloag.value.init(type, row); }) }; + +watch(() => route.query.id, (val) => { + if (val) { + addEdit('detail', {id:route.query.id}); + } +},{deep:true}) // 签收 const signRow = (row) =>{ proxy.$confirm("确定要签收", "警告", {type: "warning"}).then(() => { @@ -189,8 +202,6 @@ const fkRow = (row) => { } const showBtn = (row) => { let item = row.xfbmList.find(v => v.ssbmdm == userInfo.value.deptCode) - console.log(item); - return item?true:false // // if (item) { // // return item.zlzt == '01' ? 'sign' : item.zlzt == '02' ? 'feedback' : '' diff --git a/src/views/home/components/qxsqDialog.vue b/src/views/home/components/qxsqDialog.vue index 828cf82..7150aa8 100644 --- a/src/views/home/components/qxsqDialog.vue +++ b/src/views/home/components/qxsqDialog.vue @@ -1,6 +1,6 @@ @@ -164,15 +164,14 @@ import { bm, centralPoint } from '@/views/backOfficeSystem/IntelligentControl/De import Judgment from './model/judgment.vue' import { tbYjxxGetList } from '@/api/zdr.js' import GeneralWindow from './model/generalWindow.vue' -import WebSoketClass from '@/utils/webSocket.js' import { timeValidate } from '@/utils/tools.js' import Statistics from './model/statistics.vue' import MyCase from './model/myCase.vue' // 导入音频播放器工具类 import audioPlayer from '@/utils/audioPlayer' +import TestDiv from "@/components/common/TestDiv.vue"; const { proxy } = getCurrentInstance(); const { D_BZ_JQDJ } = proxy.$dict('D_BZ_JQDJ') -const webSoket = new WebSoketClass() const modelWarning = ref(true) const modelQbsb = ref(true) const searchText = ref('') @@ -346,7 +345,6 @@ onMounted(() => { getTbYjxxGetList() // 初始化音频播放器 initAudioPlayer() - webSoket.connect() // 监听音频播放事件,获取WebSocket消息数据 emitter.on("openYp", (newsDate) => { // 使用工具类播放音频,自动处理静音切换 @@ -462,10 +460,6 @@ onUnmounted(() => { if (audioPlayer) { audioPlayer.destroy() } - // 组件卸载时关闭WebSocket连接 - if (webSoket) { - webSoket.closeConnection() - } })