From 006cc67aa111e4ef604c78ecb33f2bfd6824d0dd Mon Sep 17 00:00:00 2001 From: monkeyhouyi Date: Wed, 24 Jul 2024 16:43:54 +0800 Subject: [PATCH] 巡查上报 --- src/views/DisposalSuggestions/Form.vue | 81 +++++++++++---------------------------------------------------------------------- src/views/baseInspectionReport/Form.vue | 447 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/views/baseSystemInfo/InspectForm.vue | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/views/baseSystemInfo/index.vue | 48 ++++++++++++++++++++++++++++++++++++++++-------- src/views/homePage/HomePage.vue | 22 +++++++++++++++------- src/views/homePage/components/news/NewsDialog.vue | 14 +++++++++++--- src/views/homePage/components/news/index.vue | 35 +++++++++++++++++------------------ 7 files changed, 560 insertions(+), 315 deletions(-) create mode 100644 src/views/baseSystemInfo/InspectForm.vue diff --git a/src/views/DisposalSuggestions/Form.vue b/src/views/DisposalSuggestions/Form.vue index c537361..61c8378 100644 --- a/src/views/DisposalSuggestions/Form.vue +++ b/src/views/DisposalSuggestions/Form.vue @@ -7,59 +7,46 @@ - + - - - - - - - - + - + - + - + - - - - - - - + - {{item.fullName}} + {{item.fullName || '--'}} - + - + - + - + @@ -75,43 +62,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 判研建议 @@ -156,24 +106,15 @@ visible: false, isDetail: true, dataForm: { - id:'', id:undefined, - source:undefined, platformName:undefined, platformType:undefined, - department:undefined, questionType:undefined, questionClass:undefined, questionContent:undefined, link:undefined, obtainEvidence:[], annex:[], - disposalSuggestions:undefined, - stage:undefined, - creatorUserId:undefined, - creatorTime:undefined, - lastModifyUserId:undefined, - lastModifyTime:undefined, }, rules: { }, diff --git a/src/views/baseInspectionReport/Form.vue b/src/views/baseInspectionReport/Form.vue index a71961a..5a35cb5 100644 --- a/src/views/baseInspectionReport/Form.vue +++ b/src/views/baseInspectionReport/Form.vue @@ -1,214 +1,243 @@  diff --git a/src/views/baseSystemInfo/InspectForm.vue b/src/views/baseSystemInfo/InspectForm.vue new file mode 100644 index 0000000..520a784 --- /dev/null +++ b/src/views/baseSystemInfo/InspectForm.vue @@ -0,0 +1,228 @@ + + diff --git a/src/views/baseSystemInfo/index.vue b/src/views/baseSystemInfo/index.vue index 5e82db8..0d105e4 100644 --- a/src/views/baseSystemInfo/index.vue +++ b/src/views/baseSystemInfo/index.vue @@ -131,6 +131,9 @@ @@ -207,6 +204,11 @@ 确 定 + @@ -216,9 +218,14 @@ import { getInfoList } from "@/api/baseData/info"; import { applnyChageArea } from "@/api/baseData/info"; import infoMixin from "@/mixins/info"; +import InspectionForm from "./InspectForm.vue"; + export default { name: "SystemInfo", mixins: [infoMixin], + components: { + InspectionForm, + }, data() { return { loading: false, @@ -254,6 +261,9 @@ export default { }, }, activeSystemId: "", + + // 上报 + InspectionFormVisible: false, }; }, created() { @@ -275,6 +285,19 @@ export default { this.query.systemClass = ""; this.initSystemClassList(val); }, + + reset() { + for (let key in this.query) { + this.query[key] = undefined; + } + this.listQuery = { + currentPage: 1, + pageSize: 20, + sort: "desc", + sidx: "", + }; + this.initList(); + }, search() { this.listQuery = { pageIndex: 1, @@ -313,7 +336,16 @@ export default { }); }, // 上报 - toDetail(row) {}, + toInspection(row) { + this.InspectionFormVisible = true; + this.$nextTick(() => { + this.$refs.InspectionForm.init(row); + }); + }, + refresh(isrRefresh) { + this.InspectionFormVisible = false; + if (isrRefresh) this.reset(); + }, async toChangeArea(row) { this.areaChangeVisible = true; this.areaDialogLoading = true; diff --git a/src/views/homePage/HomePage.vue b/src/views/homePage/HomePage.vue index c51fe89..e2587d3 100644 --- a/src/views/homePage/HomePage.vue +++ b/src/views/homePage/HomePage.vue @@ -27,7 +27,7 @@ >
- +
@@ -53,8 +53,12 @@ export default { searchKeyword: "", }; }, - created() {}, - mounted() {}, + created() { + }, + mounted() { + console.log(this.$route.path, 'this.$router'); + + }, watch: { // $route: { // handler: function (route) { @@ -66,10 +70,14 @@ export default { computed: {}, methods: { toSearchInfoList() { - this.$router.push({ - path: "/baseSystemInfo/index.vue", - query: { keyword: this.searchKeyword }, - }); + if(this.$route.path == '/baseSystemInfo/index.vue') { + this.$refs.info.search(); + } else { + this.$router.push({ + path: "/baseSystemInfo/index.vue", + query: { keyword: this.searchKeyword }, + }); + } }, }, }; diff --git a/src/views/homePage/components/news/NewsDialog.vue b/src/views/homePage/components/news/NewsDialog.vue index b4ee51f..7fa840d 100644 --- a/src/views/homePage/components/news/NewsDialog.vue +++ b/src/views/homePage/components/news/NewsDialog.vue @@ -3,7 +3,7 @@
我的消息
- 标记全部已读 + 标记全部已读
@@ -18,7 +18,9 @@
发送人:{{v.creatorUser}}
-
时间:{{v.lastModifyTime}}
+
+
+
时间:{{ncc.dateFormat(v.lastModifyTime)}}
@@ -61,11 +63,17 @@ export default { this.loading = true; getMessageList(this.searchList).then(({data}) => { this.messageList = this.messageList.concat(data.list); - console.log(this.messageList); this.total = data.pagination.total; this.loading = false; + this.searchList.pageIndex += 1 + this.$emit('changeMagNum', data.pagination.total); }); }, + toReadAll() { + MessageAllRead().then(() => { + this.load(); + }) + } }, }; diff --git a/src/views/homePage/components/news/index.vue b/src/views/homePage/components/news/index.vue index baf833c..5b18e14 100644 --- a/src/views/homePage/components/news/index.vue +++ b/src/views/homePage/components/news/index.vue @@ -4,16 +4,14 @@ placement="left" width="300" trigger="click" - v-for="(item, index) in itemList" - :key="index" > - -
+ +
-
- +
+
- +
@@ -27,10 +25,7 @@ export default { components: { NewsDialog }, data() { return { - itemList: [ - // { icon: "el-icon-s-order", title: "我的待办", hasInfo: false }, - { icon: "el-icon-message-solid", title: "我的消息", hasInfo: true }, - ], + isHaveMsg: false }; }, created() { @@ -38,15 +33,19 @@ export default { }, computed: {}, mounted() {}, + watch: {}, destroyed() { if (this.socket) { //离开路由之后断开websocket连接 - this.socket.close() - this.socket = null - this.$store.commit('SET_SOCKET', this.socket) + this.socket.close(); + this.socket = null; + this.$store.commit("SET_SOCKET", this.socket); } }, methods: { + changeMagNum(val) { + this.isHaveMsg = val ? true : false; + }, initWebSocket() { this.socket = this.$store.getters.socket || null; if ("WebSocket" in window) { @@ -79,7 +78,7 @@ export default { } //消息推送(消息公告用的) if (data.method == "messagePush") { - console.log('messagePush', '消息推送(消息公告用的)', data); + console.log("messagePush", "消息推送(消息公告用的)", data); this.messageCount += data.unreadNoticeCount; if (this.$refs.MessageList.visible) this.$refs.MessageList.init(); } @@ -98,7 +97,7 @@ export default { } //接收对方发送的消息 if (data.method == "receiveMessage") { - console.log('receiveMessage', '接收对方发送的消息', data); + console.log("receiveMessage", "接收对方发送的消息", data); //判断是否打开窗口 if ( this.$refs.UserList && @@ -132,7 +131,7 @@ export default { } //显示自己发送的消息 if (data.method == "sendMessage") { - console.log('sendMessage', '显示自己发送的消息', data); + console.log("sendMessage", "显示自己发送的消息", data); if (this.$refs.UserList.$refs.NCCIm.info.id !== data.toUserId) return; //添加到客户端 @@ -147,7 +146,7 @@ export default { } //消息列表 if (data.method == "messageList") { - console.log('messageList', '消息列表', data); + console.log("messageList", "消息列表", data); this.$refs.UserList.$refs.NCCIm.getList(data); } }; -- libgit2 0.21.4