From 20390b286c77ca3f357b4d96608ac2b22cac9a85 Mon Sep 17 00:00:00 2001
From: 2183691628 <2183691628@qq.com>
Date: Wed, 15 Dec 2021 16:48:03 +0800
Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E6=94=B9=20=E9=80=9A=E7=94=A8?=
=?UTF-8?q?=E4=BE=8B=E5=A4=96=E5=92=8C=E7=94=A8=E6=88=B7=E4=BE=8B=E5=A4=96?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E9=80=89=E6=8B=A9=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 +++++++--
src/main.js | 6 +++++-
src/utils/checkout-status-to-num.js | 18 +++++++++++++++++
src/utils/checkout-status.js | 18 +++++++++++++++++
src/utils/model.js | 2 +-
.../common-exception/index.vue | 17 ++++++++++------
.../user-exception/index.vue | 20 ++++++++++++-------
7 files changed, 73 insertions(+), 17 deletions(-)
create mode 100644 src/utils/checkout-status-to-num.js
create mode 100644 src/utils/checkout-status.js
diff --git a/README.md b/README.md
index cc97413..dd87587 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -84,4 +84,9 @@ FIX
- 修复 token过期移动端无法跳转的问题
- 删除 页面中不使用的 TopMenu组件
- 取消 登录过期弹窗退出登录确认弹窗
-- 增加 登录成功提示
\ No newline at end of file
+- 增加 登录成功提示
+
+## v1.0.9F
+`2021年12月15日`
+FEATURE
+- 修改 通用例外和用户例外状态选择方式
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 3431e56..497c65f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,7 @@
/*
* @Date: 2021-11-30 15:35:16
* @LastEditors: JinxuChen
- * @LastEditTime: 2021-12-08 16:16:12
+ * @LastEditTime: 2021-12-15 16:30:23
* @FilePath: \GpsCardAdmin\src\main.js
* @description:
*/
@@ -23,7 +23,11 @@ import localStore from './store/localStore'
import '@/icons' // icon
import '@/permission' // permission control
import transfrom from '@/utils/transfrom';
+import checkstatus from '@/utils/checkout-status';
+import checkoutStatusToNum from '@/utils/checkout-status-to-num';
Vue.use(transfrom);
+Vue.use(checkstatus);
+Vue.use(checkoutStatusToNum);
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
diff --git a/src/utils/checkout-status-to-num.js b/src/utils/checkout-status-to-num.js
new file mode 100644
index 0000000..f4c07cd
--- /dev/null
+++ b/src/utils/checkout-status-to-num.js
@@ -0,0 +1,18 @@
+/*
+ * @Date: 2021-12-07 10:45:23
+ * @LastEditors: JinxuChen
+ * @LastEditTime: 2021-12-15 16:31:39
+ * @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 === '白名单') {
+ return 2
+ }
+ }
+}
diff --git a/src/utils/checkout-status.js b/src/utils/checkout-status.js
new file mode 100644
index 0000000..bcdab82
--- /dev/null
+++ b/src/utils/checkout-status.js
@@ -0,0 +1,18 @@
+/*
+ * @Date: 2021-12-07 10:45:23
+ * @LastEditors: JinxuChen
+ * @LastEditTime: 2021-12-15 16:29:48
+ * @FilePath: \GpsCardAdmin\src\utils\checkout-status.js
+ * @description: 将接口里面的kindId转化为文字
+ */
+exports.install = function (Vue, options) {
+ Vue.prototype.checkoutStatus = function(value) {
+ if(value === 0) {
+ return '未启用'
+ } else if(value === 1 ) {
+ return '黑名单'
+ } else if(value === 2) {
+ return '白名单'
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/utils/model.js b/src/utils/model.js
index 213bd6d..aa843d7 100644
--- a/src/utils/model.js
+++ b/src/utils/model.js
@@ -5,4 +5,4 @@
* @FilePath: \GpsCardAdmin\src\utils\model.js
* @description: 版本号
*/
-export const VersionModel = '1.0.8';
\ No newline at end of file
+export const VersionModel = '1.0.9';
\ 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 652dc36..450528c 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 @@
@@ -105,7 +105,12 @@
-
+
+
+ 未启用
+ 黑名单
+ 白名单
+
@@ -164,7 +169,7 @@ export default {
model: "",
content: "",
createTime: "",
- status: true,
+ status: 0,
id: ""
},
formRules: {
@@ -202,7 +207,7 @@ export default {
content: "",
createTime: "",
categoryId: "",
- status: true
+ status: 0
};
},
// 添加
@@ -262,7 +267,7 @@ export default {
this.form.model = row.categoryId;
this.form.id = row.id;
this.form.content = row.content;
- this.form.status = row.status === '打开' ? true : false;
+ this.form.status = this.checkoutStatusToNum(row.status);
},
update(formName) {
console.log("update");
@@ -341,7 +346,7 @@ export default {
createTime: m.createTime,
kindId: m.kindId,
categoryId: m.categoryId,
- status: m.status === true ? '打开' : '关闭',
+ status: this.checkoutStatus(m.status),
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 f4e8d30..a184a00 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 @@
@@ -82,7 +82,12 @@
-
+
+
+ 未启用
+ 黑名单
+ 白名单
+
@@ -175,7 +180,7 @@ export default {
imei: "",
content: "",
createTime: "",
- status: true
+ status: 0
},
radio1: "1",
formRules: {
@@ -213,7 +218,7 @@ export default {
content: "",
createTime: "",
categoryId: "",
- status: true
+ status: 0
};
},
// 增加
@@ -268,7 +273,7 @@ export default {
this.dialogTitle = "修改用户例外";
this.form = Object.assign({}, row); // copy obj
this.form.createTime = new Date(this.form.createTime);
- this.form.status = row.status === "打开" ? true : false;
+ this.form.status = this.checkoutStatusToNum(row.status);
},
update(formName) {
let reqBody = {
@@ -336,6 +341,7 @@ export default {
console.log("row", row);
this.dialogTrans = true;
this.content = row.content;
+ this.form.status = this.checkoutStatusToNum(row.status);
},
// 确定转通用例外
onTransConfirm() {
@@ -343,7 +349,7 @@ export default {
id: 0,
categoryId: this.model,
keyword: this.content,
- status: true,
+ status: this.form.status,
glat: 0,
glng: 0,
address: "",
@@ -386,7 +392,7 @@ export default {
glat: m.glat,
glng: m.glng,
keyId: m.keyId,
- status: m.status === true ? "打开" : "关闭"
+ status: this.checkoutStatus(m.status)
};
});
this.total = res.count;