Browse Source

Merge branch 'bugfix-ecception' into develop

master
2183691628 2 years ago
parent
commit
8515aa51f6
5 changed files with 33 additions and 29 deletions
  1. +8
    -2
      README.md
  2. +4
    -6
      src/utils/checkout-status-to-num.js
  3. +2
    -2
      src/utils/model.js
  4. +9
    -9
      src/views/off-limits-manage/common-exception/index.vue
  5. +10
    -10
      src/views/off-limits-manage/user-exception/index.vue

+ 8
- 2
README.md View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2021-11-29 11:14:13
* @LastEditors: JinxuChen
* @LastEditTime: 2021-12-21 15:53:58
* @LastEditTime: 2021-12-22 18:29:36
* @FilePath: \GpsCardAdmin\README.md
* @description:
-->
@@ -105,4 +105,10 @@ IMPROVEMENT
- 优化 首页样式
- 统一 输入框长度
- 统一 状态判断
- 修复 新增/修改用户例外报错的问题
- 修复 新增/修改用户例外报错的问题


## v1.1.2F
`2021年12月22日`
IMPROVEMENT
- 优化 通用和用户例外 状态显示方式

+ 4
- 6
src/utils/checkout-status-to-num.js View File

@@ -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
}
}
}

+ 2
- 2
src/utils/model.js View File

@@ -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';
export const VersionModel = '1.1.2';

+ 9
- 9
src/views/off-limits-manage/common-exception/index.vue View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2021-11-30 09:44:24
* @LastEditors: JinxuChen
* @LastEditTime: 2021-12-21 11:50:22
* @LastEditTime: 2021-12-22 18:19:16
* @FilePath: \GpsCardAdmin\src\views\off-limits-manage\common-exception\index.vue
* @description:
-->
@@ -104,12 +104,12 @@
</el-form-item>
<!-- 状态 -->
<el-form-item label="状态" prop="status" required>
<!-- <el-switch v-model="form.status" active-text="打开" inactive-text="关闭"></el-switch> -->
<el-radio-group v-model="form.status" size="medium">
<el-switch v-model="form.status" active-text="例外" inactive-text="启用"></el-switch>
<!-- <el-radio-group v-model="form.status" size="medium">
<el-radio border :label="0">未启用</el-radio>
<el-radio border :label="1">黑名单</el-radio>
<el-radio border :label="2">白名单</el-radio>
</el-radio-group>
</el-radio-group> -->
</el-form-item>
<!-- 创建时间 -->
<el-form-item label="创建时间" prop="timestamp" v-show="false">
@@ -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
};
});


+ 10
- 10
src/views/off-limits-manage/user-exception/index.vue View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2021-11-30 09:44:24
* @LastEditors: JinxuChen
* @LastEditTime: 2021-12-21 15:57:01
* @LastEditTime: 2021-12-22 18:26:48
* @FilePath: \GpsCardAdmin\src\views\off-limits-manage\user-exception\index.vue
* @description:
-->
@@ -81,12 +81,12 @@
</el-form-item>
<!-- 状态 -->
<el-form-item label="状态" prop="status" required>
<!-- <el-switch v-model="form.status" active-text="打开" inactive-text="关闭"></el-switch> -->
<el-radio-group v-model="form.status" size="medium">
<el-switch v-model="form.status" active-text="例外" inactive-text="启用"></el-switch>
<!-- <el-radio-group v-model="form.status" size="medium">
<el-radio border :label="0">未启用</el-radio>
<el-radio border :label="1">黑名单</el-radio>
<el-radio border :label="2">白名单</el-radio>
</el-radio-group>
</el-radio-group> -->
</el-form-item>
<!-- 创建时间 -->
<el-form-item label="创建时间" prop="timestamp" v-show="false">
@@ -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;


Loading…
Cancel
Save