From c0e5e60bef3b8171941a05a5f3cff2a1cfc9b01d Mon Sep 17 00:00:00 2001 From: 2183691628 <2183691628@qq.com> Date: Thu, 23 Dec 2021 09:56:57 +0800 Subject: [PATCH] =?UTF-8?q?IMPROVEMENT=20-=20=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BE=8B=E5=A4=96=E5=92=8C=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++++-- src/utils/model.js | 4 ++-- src/views/off-limits-manage/alarm-query/index.vue | 11 +++++++++-- .../off-limits-manage/user-exception/index.vue | 13 ++++++++++--- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 03bbe7c..afbd6e7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -111,4 +111,10 @@ IMPROVEMENT ## v1.1.2F `2021年12月22日` IMPROVEMENT -- 优化 通用和用户例外 状态显示方式 \ No newline at end of file +- 优化 通用和用户例外 状态显示方式 + + +## v1.1.3F +`2021年12月23日` +IMPROVEMENT +- 优化 用户例外和告警查询的搜索条件 \ No newline at end of file diff --git a/src/utils/model.js b/src/utils/model.js index e0f16c7..2e40364 100644 --- a/src/utils/model.js +++ b/src/utils/model.js @@ -1,8 +1,8 @@ /* * @Date: 2021-11-30 15:09:25 * @LastEditors: JinxuChen - * @LastEditTime: 2021-12-22 18:29:45 + * @LastEditTime: 2021-12-23 09:56:31 * @FilePath: \GpsCardAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.1.2'; \ No newline at end of file +export const VersionModel = '1.1.3'; \ No newline at end of file diff --git a/src/views/off-limits-manage/alarm-query/index.vue b/src/views/off-limits-manage/alarm-query/index.vue index afd2652..326af6b 100644 --- a/src/views/off-limits-manage/alarm-query/index.vue +++ b/src/views/off-limits-manage/alarm-query/index.vue @@ -1,7 +1,7 @@ @@ -128,7 +128,7 @@ export default { let reqBody = { pageNumber: this.page, begNumber: this.limit, - imei: this.searchValue + imei: this.checkIsNumber(this.searchValue) ? this.searchValue : this.searchValue, }; APIAlarmQuery.getAlarmQuery(reqBody).then(res => { this.list = res.data.map(m => { @@ -151,6 +151,13 @@ export default { onClear() { this.$refs["pages"].currentPage = 1; this.getList(); + }, + // 判断是否是数字并且是15位 + checkIsNumber(value) { + let reg = /^[0-9]+.?[0-9]*$/; + if(value.length >= 15 && reg.test(value)) { + return true + } } }, mounted() { diff --git a/src/views/off-limits-manage/user-exception/index.vue b/src/views/off-limits-manage/user-exception/index.vue index 511ae46..ed546c9 100644 --- a/src/views/off-limits-manage/user-exception/index.vue +++ b/src/views/off-limits-manage/user-exception/index.vue @@ -1,7 +1,7 @@ @@ -374,8 +374,8 @@ export default { pageNumber: this.page, begNumber: this.limit, type: "system", - imei: this.searchValue.length === 15 ? this.searchValue : "", - keyword: this.searchValue.length === 15 ? "" :this.searchValue + imei: this.checkIsNumber(this.searchValue) ? this.searchValue : "", + keyword: this.checkIsNumber(this.searchValue) ? "" : this.searchValue }; APIExceptionUser.getRecognitionUser(reqBody).then(res => { this.list = res.data.map(m => { @@ -419,6 +419,13 @@ export default { onClear() { this.$refs["pages"].currentPage = 1; this.getList(); + }, + // 判断是否是数字并且是15位 + checkIsNumber(value) { + let reg = /^[0-9]+.?[0-9]*$/; + if(value.length >= 15 && reg.test(value)) { + return true + } } }, mounted() {