Browse Source

增加是否变更选解条件的判断

kiwi-beep 2 years ago
parent
commit
b8d11dfea3
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/User.js

+ 6 - 1
src/User.js

@@ -134,11 +134,16 @@ export default class User {
       // console.log(`Got META message : \n\t${JSON.stringify(req)}`)
       let sql = req.data.sql
       let bUpdateOverSpeed = false
+      let bSolutionSelected = false
       //设置此字段为超速,server通知采集应用新的配置信息
       if (sql.indexOf('dat_setting') != -1 && sql.indexOf('over_speed') != -1)
       {
         bUpdateOverSpeed = true
       }
+      if (sql.indexOf('dat_map_zhurong') != -1 && sql.indexOf('name') != -1)
+      {
+        bSolutionSelected = true
+      }
       req = Utils.toJson(req)
       if (!req) {
         console.warn('Invalid request.', req)
@@ -147,7 +152,7 @@ export default class User {
 
       if (socket.auth) {
         this.meta.dispatch(this.socket, req)
-        if (bUpdateOverSpeed)
+        if (bUpdateOverSpeed||bSolutionSelected)
         {
           let message = {
             cmd: 'setting',