Browse Source

检查内部编号

lipengtao 6 years ago
parent
commit
d317f0d973

+ 4 - 4
src/views/baseInfoManage/boxesConfig/index.vue

@ -101,7 +101,7 @@ export default {
101 101
          return
102 102
        }
103 103
        if (this.edit) {
104
          checkDeviceInternalCode({ seq: value, id: this.edit, serverId: this.ruleForm2.serverId }).then(response => {
104
          checkDeviceInternalCode({ seq: value, id: this.edit, serverId: this.ruleForm2.serverId, active: 1 }).then(response => {
105 105
            if (response.data) {
106 106
              callback(new Error('内部编号已存在,请重新输入'))
107 107
            } else {
@ -109,7 +109,7 @@ export default {
109 109
            }
110 110
          })
111 111
        } else {
112
          checkDeviceInternalCode({ seq: value, serverId: this.ruleForm2.serverId }).then(response => {
112
          checkDeviceInternalCode({ seq: value, serverId: this.ruleForm2.serverId, active: 1 }).then(response => {
113 113
            if (response.data) {
114 114
              callback(new Error('内部编号已存在,请重新输入'))
115 115
            } else {
@ -124,7 +124,7 @@ export default {
124 124
        callback(new Error('请输入采集盒编号'))
125 125
      } else {
126 126
        if (this.edit) {
127
          checkDeviceCode({ code: value, id: this.edit }).then(response => {
127
          checkDeviceCode({ code: value, id: this.edit, active: 1 }).then(response => {
128 128
            if (response.data) {
129 129
              callback(new Error('采集盒编号已存在,请重新输入'))
130 130
            } else {
@ -132,7 +132,7 @@ export default {
132 132
            }
133 133
          })
134 134
        } else {
135
          checkDeviceCode({ code: value }).then(response => {
135
          checkDeviceCode({ code: value, active: 1 }).then(response => {
136 136
            if (response.data) {
137 137
              callback(new Error('采集盒编号已存在,请重新输入'))
138 138
            } else {

+ 4 - 4
src/views/baseInfoManage/sensorsConfig/index.vue

@ -122,7 +122,7 @@ export default {
122 122
          return
123 123
        }
124 124
        if (this.edit) {
125
          checkDeviceInternalCode({ seq: value, id: this.edit, deviceId: this.ruleForm2.deviceId }).then(response => {
125
          checkDeviceInternalCode({ seq: value, id: this.edit, deviceId: this.ruleForm2.deviceId, active: 1 }).then(response => {
126 126
            if (response.data) {
127 127
              callback(new Error('内部编号已存在,请重新输入'))
128 128
            } else {
@ -130,7 +130,7 @@ export default {
130 130
            }
131 131
          })
132 132
        } else {
133
          checkDeviceInternalCode({ seq: value, deviceId: this.ruleForm2.deviceId }).then(response => {
133
          checkDeviceInternalCode({ seq: value, deviceId: this.ruleForm2.deviceId, active: 1 }).then(response => {
134 134
            if (response.data) {
135 135
              callback(new Error('内部编号已存在,请重新输入'))
136 136
            } else {
@ -145,7 +145,7 @@ export default {
145 145
        callback(new Error('请输入传感器编号'))
146 146
      } else {
147 147
        if (this.edit) {
148
          checkDeviceCode({ code: value, id: this.edit }).then(response => {
148
          checkDeviceCode({ code: value, id: this.edit, active: 1 }).then(response => {
149 149
            if (response.data) {
150 150
              callback(new Error('传感器编号已存在,请重新输入'))
151 151
            } else {
@ -153,7 +153,7 @@ export default {
153 153
            }
154 154
          })
155 155
        } else {
156
          checkDeviceCode({ code: value }).then(response => {
156
          checkDeviceCode({ code: value, active: 1 }).then(response => {
157 157
            if (response.data) {
158 158
              callback(new Error('传感器编号已存在,请重新输入'))
159 159
            } else {

+ 4 - 4
src/views/baseInfoManage/serversConfig/index.vue

@ -101,7 +101,7 @@ export default {
101 101
          return
102 102
        }
103 103
        if (this.edit) {
104
          checkDeviceInternalCode({ seq: value, id: this.edit, bridgeId: this.ruleForm2.bridgeId }).then(response => {
104
          checkDeviceInternalCode({ seq: value, id: this.edit, bridgeId: this.ruleForm2.bridgeId, active: 1 }).then(response => {
105 105
            if (response.data) {
106 106
              callback(new Error('内部编号已存在,请重新输入'))
107 107
            } else {
@ -109,7 +109,7 @@ export default {
109 109
            }
110 110
          })
111 111
        } else {
112
          checkDeviceInternalCode({ seq: value, bridgeId: this.ruleForm2.bridgeId }).then(response => {
112
          checkDeviceInternalCode({ seq: value, bridgeId: this.ruleForm2.bridgeId, active: 1 }).then(response => {
113 113
            if (response.data) {
114 114
              callback(new Error('内部编号已存在,请重新输入'))
115 115
            } else {
@ -124,7 +124,7 @@ export default {
124 124
        callback(new Error('请输入服务器编号'))
125 125
      } else {
126 126
        if (this.edit) {
127
          checkDeviceCode({ code: value, id: this.edit }).then(response => {
127
          checkDeviceCode({ code: value, id: this.edit, active: 1 }).then(response => {
128 128
            if (response.data) {
129 129
              callback(new Error('服务器编号已存在,请重新输入'))
130 130
            } else {
@ -132,7 +132,7 @@ export default {
132 132
            }
133 133
          })
134 134
        } else {
135
          checkDeviceCode({ code: value }).then(response => {
135
          checkDeviceCode({ code: value, active: 1 }).then(response => {
136 136
            if (response.data) {
137 137
              callback(new Error('服务器编号已存在,请重新输入'))
138 138
            } else {