diff --git a/README.md b/README.md
index e7da36a..03bbe7c 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -105,4 +105,10 @@ IMPROVEMENT
- 优化 首页样式
- 统一 输入框长度
- 统一 状态判断
-- 修复 新增/修改用户例外报错的问题
\ No newline at end of file
+- 修复 新增/修改用户例外报错的问题
+
+
+## v1.1.2F
+`2021年12月22日`
+IMPROVEMENT
+- 优化 通用和用户例外 状态显示方式
\ No newline at end of file
diff --git a/src/utils/checkout-status-to-num.js b/src/utils/checkout-status-to-num.js
index f4c07cd..abe71a1 100644
--- a/src/utils/checkout-status-to-num.js
+++ b/src/utils/checkout-status-to-num.js
@@ -1,18 +1,16 @@
/*
* @Date: 2021-12-07 10:45:23
* @LastEditors: JinxuChen
- * @LastEditTime: 2021-12-15 16:31:39
+ * @LastEditTime: 2021-12-22 17:47:00
* @FilePath: \GpsCardAdmin\src\utils\checkout-status-to-num.js
* @description: 将接口里面的kindId转化为文字
*/
exports.install = function (Vue, options) {
Vue.prototype.checkoutStatusToNum = function (value) {
- if (value === '未启用') {
- return 0
- } else if (value === '黑名单') {
- return 1
- } else if (value === '白名单') {
+ if (value === true) {
return 2
+ } else if (value === false) {
+ return 1
}
}
}
diff --git a/src/utils/model.js b/src/utils/model.js
index e4ca6a2..e0f16c7 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-21 11:18:56
+ * @LastEditTime: 2021-12-22 18:29:45
* @FilePath: \GpsCardAdmin\src\utils\model.js
* @description: 版本号
*/
-export const VersionModel = '1.1.1';
\ No newline at end of file
+export const VersionModel = '1.1.2';
\ No newline at end of file
diff --git a/src/views/off-limits-manage/common-exception/index.vue b/src/views/off-limits-manage/common-exception/index.vue
index cca87c4..c43f059 100644
--- a/src/views/off-limits-manage/common-exception/index.vue
+++ b/src/views/off-limits-manage/common-exception/index.vue
@@ -1,7 +1,7 @@
@@ -104,12 +104,12 @@
-
-
+
+
@@ -206,7 +206,7 @@ export default {
content: "",
createTime: "",
categoryId: "",
- status: 0
+ status: false
};
},
// 添加
@@ -223,7 +223,7 @@ export default {
id: 0,
categoryId: this.form.categoryId,
keyword: this.form.content,
- status: this.form.status,
+ status: this.checkoutStatusToNum(this.form.status),
glat: 0,
glng: 0,
address: "",
@@ -266,7 +266,7 @@ export default {
this.form.model = row.categoryId;
this.form.id = row.id;
this.form.content = row.content;
- this.form.status = this.checkoutStatusToNum(row.status);
+ this.form.status = row.status === '启用' ? false : true;
},
update(formName) {
console.log("update");
@@ -274,7 +274,7 @@ export default {
id: this.form.id,
categoryId: this.form.categoryId,
keyword: this.form.content,
- status: this.form.status,
+ status: this.checkoutStatusToNum(this.form.status),
glat: 0,
glng: 0,
address: "",
@@ -345,7 +345,7 @@ export default {
createTime: m.createTime,
kindId: m.kindId,
categoryId: m.categoryId,
- status: this.checkoutStatus(m.status),
+ status: m.status === 1 ? '启用' : '例外',
id: m.id
};
});
diff --git a/src/views/off-limits-manage/user-exception/index.vue b/src/views/off-limits-manage/user-exception/index.vue
index 59b5c95..511ae46 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 @@
@@ -81,12 +81,12 @@
-
-
+
+
@@ -210,7 +210,7 @@ export default {
content: "",
createTime: "",
categoryId: "",
- status: 0
+ status: false
};
},
// 增加
@@ -226,7 +226,7 @@ export default {
keyId: 0,
imei: this.form.imei,
keyword: this.form.content,
- status: this.form.status,
+ status: this.checkoutStatusToNum(this.form.status),
glat: 0,
glng: 0,
type: 'user',
@@ -266,14 +266,14 @@ export default {
this.dialogTitle = "修改用户例外";
this.form = Object.assign({}, row); // copy obj
this.form.createTime = new Date(this.form.createTime);
- this.form.status = this.checkoutStatusToNum(row.status);
+ this.form.status = row.status === '启用' ? false : true;
},
update(formName) {
let reqBody = {
keyId: this.form.keyId,
imei: this.form.imei,
keyword: this.form.content,
- status: this.form.status,
+ status: this.checkoutStatusToNum(this.form.status),
glat: 0,
glng: 0,
type: 'user',
@@ -335,7 +335,7 @@ export default {
console.log("row", row);
this.dialogTrans = true;
this.content = row.content;
- this.form.status = this.checkoutStatusToNum(row.status);
+ this.form.status = row.status === '启用' ? 1 : 2;
},
// 确定转通用例外
onTransConfirm() {
@@ -386,7 +386,7 @@ export default {
glat: m.glat,
glng: m.glng,
keyId: m.keyId,
- status: this.checkoutStatus(m.status)
+ status: m.status === 1 ? '启用' : '例外'
};
});
this.total = res.count;