diff --git a/config.js b/config.js
index 91ebe71..2265b7a 100644
--- a/config.js
+++ b/config.js
@@ -1,7 +1,7 @@
// 应用全局配置
module.exports = {
- // baseUrl: 'https://vue.ruoyi.vip/prod-api',
- baseUrl: 'http://localhost:9002/api',
+ // baseUrl: 'http://192.168.0.109:9102',
+ baseUrl: location.origin, // 'http://202.102.20.34:9002'
// 应用信息
appInfo: {
// 应用名称
diff --git a/pages/index.vue b/pages/index.vue
index e013782..9e12ccf 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -87,6 +87,7 @@
+
@@ -125,14 +126,16 @@
lable: 2,
}
- }, {
- name: '审核通过',
- badge: {
- value: 0,
- lable: 3,
- }
+ },
+ // {
+ // name: '审核通过',
+ // badge: {
+ // value: 0,
+ // lable: 3,
+ // }
- }, ],
+ // },
+ ],
massEventsObj: {
msgType: "1", //事件类型编码【群体事件】1【同人同诉】2【紧急事件】3【重点人员】4【一人多诉】5
isReport: null, //为未通过 2为已办结 3为作废
@@ -153,6 +156,19 @@
}, {
count: 0
}, ],
+ msgTypecountTwo: [{
+ count: 0
+ }, {
+ count: 0
+ }, {
+ count: 0
+ }, {
+ count: 0
+ }, {
+ count: 0
+ }, ],
+ innerAudioContext:null,
+ Time:null,
}
},
@@ -164,6 +180,10 @@
this.massEventsObj.current = 1
this.massEventsObj.title = ""
this.getList()
+ clearInterval(this.Time)
+ this.Time = setInterval(()=>{
+ this.geteventPageCount()
+ },5000)
// console.log(e);
},
//搜索
@@ -182,6 +202,10 @@
//navbarValue 头部标题
//tabscurrent 区分待审核0, 已上报1 重训练2
// item
+ clearInterval(this.Time)
+ this.Time = setInterval(()=>{
+ this.geteventPageCount()
+ },5000)
uni.navigateTo({
url: `/views/jiashicangshenhe/jiashicangshenhe?navbarValue=${this.navbarValue}&tabscurrent=${this.tabscurrent}&innerEventId=${item.innerEventId}`
})
@@ -203,7 +227,11 @@
this.tabscurrent = 0
this.geteventPageCount()
await this.getList();
- this.goTop()
+ this.goTop();
+ clearInterval(this.Time)
+ this.Time = setInterval(()=>{
+ this.geteventPageCount()
+ },5000)
},
scroll(e) {
//记录scroll 位置
@@ -262,16 +290,40 @@
// console.log(res);
this.list1[0].badge.value = res.data
})
+
fiveEventCount().then(res => {
- this.msgTypecount = res.data
+ this.msgTypecount = [...res.data]
this.msgTypecount = this.msgTypecount.sort((a, b) => {
return a.msgType - b.msgType;
});
-
-
-
+ this.isDingdong()
})
- }
+ },
+ isDingdong(){
+ if(this.msgTypecountTwo[0].count == 0) {
+ this.msgTypecountTwo = [...this.msgTypecount]
+ this.msgTypecountTwo = this.msgTypecountTwo.sort((a, b) => {
+ return a.msgType - b.msgType;
+ });
+ } else {
+ console.log(this.msgTypecountTwo,"msgTypecountTwo");
+ console.log(this.msgTypecount,"msgTypecount");
+ // const isDD = this.msgTypecount.some((obj1, index) => obj1.count !== this.msgTypecountTwo[index].count)
+ let arr = []
+ for (let i = 0; i < this.msgTypecount.length; i++) {
+ if (this.msgTypecount[i].count > this.msgTypecountTwo[i].count) {
+ arr.push({index:i})
+ }
+ }
+ if(arr.length > 0) {
+ this.msgTypecountTwo = [...this.msgTypecount]
+ this.msgTypecountTwo = this.msgTypecountTwo.sort((a, b) => {
+ return a.msgType - b.msgType;
+ });
+ this.innerAudioContext.play()
+ }
+ }
+ },
},
// onLoad: function() {
@@ -284,12 +336,25 @@
// },
onShow() {
login("admin","Suanfa@2024//**...").then(res=>{
- setToken(res.token)
+ setToken(res.token);
+ let src = require("../static/dingdong.mp3")
+ this.innerAudioContext = uni.createInnerAudioContext();
+ this.innerAudioContext.autoplay = true;
+ this.innerAudioContext.src = require("../static/dingdong.mp3");
this.getList()
this.geteventPageCount()
this.$store.dispatch("Deletestate")
})
- }
+ },
+ beforeDestroy() {
+ // 页面销毁时销毁音频上下文
+ if (this.innerAudioContext) {
+ this.innerAudioContext.destroy();
+ }
+ if(this.Time) {
+ clearInterval(this.Time)
+ }
+ },
}
diff --git a/static/dingdong.mp3 b/static/dingdong.mp3
new file mode 100644
index 0000000..118f9de
Binary files /dev/null and b/static/dingdong.mp3 differ
diff --git a/views/jiashicangshenhe/jiashicangshenhe.vue b/views/jiashicangshenhe/jiashicangshenhe.vue
index 499f794..68037aa 100644
--- a/views/jiashicangshenhe/jiashicangshenhe.vue
+++ b/views/jiashicangshenhe/jiashicangshenhe.vue
@@ -110,20 +110,21 @@
+ >
+
重新上报驾驶舱
+ >
+
退回算法重训练
-
-
审核通过
-
+ -->