@@ -1,7 +1,7 @@ | |||||
<!-- | <!-- | ||||
* @Date: 2021-11-29 11:14:13 | * @Date: 2021-11-29 11:14:13 | ||||
* @LastEditors: JinxuChen | * @LastEditors: JinxuChen | ||||
* @LastEditTime: 2021-12-21 15:53:58 | |||||
* @LastEditTime: 2021-12-22 18:29:36 | |||||
* @FilePath: \GpsCardAdmin\README.md | * @FilePath: \GpsCardAdmin\README.md | ||||
* @description: | * @description: | ||||
--> | --> | ||||
@@ -105,4 +105,10 @@ IMPROVEMENT | |||||
- 优化 首页样式 | - 优化 首页样式 | ||||
- 统一 输入框长度 | - 统一 输入框长度 | ||||
- 统一 状态判断 | - 统一 状态判断 | ||||
- 修复 新增/修改用户例外报错的问题 | |||||
- 修复 新增/修改用户例外报错的问题 | |||||
## v1.1.2F | |||||
`2021年12月22日` | |||||
IMPROVEMENT | |||||
- 优化 通用和用户例外 状态显示方式 |
@@ -1,18 +1,16 @@ | |||||
/* | /* | ||||
* @Date: 2021-12-07 10:45:23 | * @Date: 2021-12-07 10:45:23 | ||||
* @LastEditors: JinxuChen | * @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 | * @FilePath: \GpsCardAdmin\src\utils\checkout-status-to-num.js | ||||
* @description: 将接口里面的kindId转化为文字 | * @description: 将接口里面的kindId转化为文字 | ||||
*/ | */ | ||||
exports.install = function (Vue, options) { | exports.install = function (Vue, options) { | ||||
Vue.prototype.checkoutStatusToNum = function (value) { | Vue.prototype.checkoutStatusToNum = function (value) { | ||||
if (value === '未启用') { | |||||
return 0 | |||||
} else if (value === '黑名单') { | |||||
return 1 | |||||
} else if (value === '白名单') { | |||||
if (value === true) { | |||||
return 2 | return 2 | ||||
} else if (value === false) { | |||||
return 1 | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -1,8 +1,8 @@ | |||||
/* | /* | ||||
* @Date: 2021-11-30 15:09:25 | * @Date: 2021-11-30 15:09:25 | ||||
* @LastEditors: JinxuChen | * @LastEditors: JinxuChen | ||||
* @LastEditTime: 2021-12-21 11:18:56 | |||||
* @LastEditTime: 2021-12-22 18:29:45 | |||||
* @FilePath: \GpsCardAdmin\src\utils\model.js | * @FilePath: \GpsCardAdmin\src\utils\model.js | ||||
* @description: 版本号 | * @description: 版本号 | ||||
*/ | */ | ||||
export const VersionModel = '1.1.1'; | |||||
export const VersionModel = '1.1.2'; |
@@ -1,7 +1,7 @@ | |||||
<!-- | <!-- | ||||
* @Date: 2021-11-30 09:44:24 | * @Date: 2021-11-30 09:44:24 | ||||
* @LastEditors: JinxuChen | * @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 | * @FilePath: \GpsCardAdmin\src\views\off-limits-manage\common-exception\index.vue | ||||
* @description: | * @description: | ||||
--> | --> | ||||
@@ -104,12 +104,12 @@ | |||||
</el-form-item> | </el-form-item> | ||||
<!-- 状态 --> | <!-- 状态 --> | ||||
<el-form-item label="状态" prop="status" required> | <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="0">未启用</el-radio> | ||||
<el-radio border :label="1">黑名单</el-radio> | <el-radio border :label="1">黑名单</el-radio> | ||||
<el-radio border :label="2">白名单</el-radio> | <el-radio border :label="2">白名单</el-radio> | ||||
</el-radio-group> | |||||
</el-radio-group> --> | |||||
</el-form-item> | </el-form-item> | ||||
<!-- 创建时间 --> | <!-- 创建时间 --> | ||||
<el-form-item label="创建时间" prop="timestamp" v-show="false"> | <el-form-item label="创建时间" prop="timestamp" v-show="false"> | ||||
@@ -206,7 +206,7 @@ export default { | |||||
content: "", | content: "", | ||||
createTime: "", | createTime: "", | ||||
categoryId: "", | categoryId: "", | ||||
status: 0 | |||||
status: false | |||||
}; | }; | ||||
}, | }, | ||||
// 添加 | // 添加 | ||||
@@ -223,7 +223,7 @@ export default { | |||||
id: 0, | id: 0, | ||||
categoryId: this.form.categoryId, | categoryId: this.form.categoryId, | ||||
keyword: this.form.content, | keyword: this.form.content, | ||||
status: this.form.status, | |||||
status: this.checkoutStatusToNum(this.form.status), | |||||
glat: 0, | glat: 0, | ||||
glng: 0, | glng: 0, | ||||
address: "", | address: "", | ||||
@@ -266,7 +266,7 @@ export default { | |||||
this.form.model = row.categoryId; | this.form.model = row.categoryId; | ||||
this.form.id = row.id; | this.form.id = row.id; | ||||
this.form.content = row.content; | this.form.content = row.content; | ||||
this.form.status = this.checkoutStatusToNum(row.status); | |||||
this.form.status = row.status === '启用' ? false : true; | |||||
}, | }, | ||||
update(formName) { | update(formName) { | ||||
console.log("update"); | console.log("update"); | ||||
@@ -274,7 +274,7 @@ export default { | |||||
id: this.form.id, | id: this.form.id, | ||||
categoryId: this.form.categoryId, | categoryId: this.form.categoryId, | ||||
keyword: this.form.content, | keyword: this.form.content, | ||||
status: this.form.status, | |||||
status: this.checkoutStatusToNum(this.form.status), | |||||
glat: 0, | glat: 0, | ||||
glng: 0, | glng: 0, | ||||
address: "", | address: "", | ||||
@@ -345,7 +345,7 @@ export default { | |||||
createTime: m.createTime, | createTime: m.createTime, | ||||
kindId: m.kindId, | kindId: m.kindId, | ||||
categoryId: m.categoryId, | categoryId: m.categoryId, | ||||
status: this.checkoutStatus(m.status), | |||||
status: m.status === 1 ? '启用' : '例外', | |||||
id: m.id | id: m.id | ||||
}; | }; | ||||
}); | }); | ||||
@@ -1,7 +1,7 @@ | |||||
<!-- | <!-- | ||||
* @Date: 2021-11-30 09:44:24 | * @Date: 2021-11-30 09:44:24 | ||||
* @LastEditors: JinxuChen | * @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 | * @FilePath: \GpsCardAdmin\src\views\off-limits-manage\user-exception\index.vue | ||||
* @description: | * @description: | ||||
--> | --> | ||||
@@ -81,12 +81,12 @@ | |||||
</el-form-item> | </el-form-item> | ||||
<!-- 状态 --> | <!-- 状态 --> | ||||
<el-form-item label="状态" prop="status" required> | <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="0">未启用</el-radio> | ||||
<el-radio border :label="1">黑名单</el-radio> | <el-radio border :label="1">黑名单</el-radio> | ||||
<el-radio border :label="2">白名单</el-radio> | <el-radio border :label="2">白名单</el-radio> | ||||
</el-radio-group> | |||||
</el-radio-group> --> | |||||
</el-form-item> | </el-form-item> | ||||
<!-- 创建时间 --> | <!-- 创建时间 --> | ||||
<el-form-item label="创建时间" prop="timestamp" v-show="false"> | <el-form-item label="创建时间" prop="timestamp" v-show="false"> | ||||
@@ -210,7 +210,7 @@ export default { | |||||
content: "", | content: "", | ||||
createTime: "", | createTime: "", | ||||
categoryId: "", | categoryId: "", | ||||
status: 0 | |||||
status: false | |||||
}; | }; | ||||
}, | }, | ||||
// 增加 | // 增加 | ||||
@@ -226,7 +226,7 @@ export default { | |||||
keyId: 0, | keyId: 0, | ||||
imei: this.form.imei, | imei: this.form.imei, | ||||
keyword: this.form.content, | keyword: this.form.content, | ||||
status: this.form.status, | |||||
status: this.checkoutStatusToNum(this.form.status), | |||||
glat: 0, | glat: 0, | ||||
glng: 0, | glng: 0, | ||||
type: 'user', | type: 'user', | ||||
@@ -266,14 +266,14 @@ export default { | |||||
this.dialogTitle = "修改用户例外"; | this.dialogTitle = "修改用户例外"; | ||||
this.form = Object.assign({}, row); // copy obj | this.form = Object.assign({}, row); // copy obj | ||||
this.form.createTime = new Date(this.form.createTime); | this.form.createTime = new Date(this.form.createTime); | ||||
this.form.status = this.checkoutStatusToNum(row.status); | |||||
this.form.status = row.status === '启用' ? false : true; | |||||
}, | }, | ||||
update(formName) { | update(formName) { | ||||
let reqBody = { | let reqBody = { | ||||
keyId: this.form.keyId, | keyId: this.form.keyId, | ||||
imei: this.form.imei, | imei: this.form.imei, | ||||
keyword: this.form.content, | keyword: this.form.content, | ||||
status: this.form.status, | |||||
status: this.checkoutStatusToNum(this.form.status), | |||||
glat: 0, | glat: 0, | ||||
glng: 0, | glng: 0, | ||||
type: 'user', | type: 'user', | ||||
@@ -335,7 +335,7 @@ export default { | |||||
console.log("row", row); | console.log("row", row); | ||||
this.dialogTrans = true; | this.dialogTrans = true; | ||||
this.content = row.content; | this.content = row.content; | ||||
this.form.status = this.checkoutStatusToNum(row.status); | |||||
this.form.status = row.status === '启用' ? 1 : 2; | |||||
}, | }, | ||||
// 确定转通用例外 | // 确定转通用例外 | ||||
onTransConfirm() { | onTransConfirm() { | ||||
@@ -386,7 +386,7 @@ export default { | |||||
glat: m.glat, | glat: m.glat, | ||||
glng: m.glng, | glng: m.glng, | ||||
keyId: m.keyId, | keyId: m.keyId, | ||||
status: this.checkoutStatus(m.status) | |||||
status: m.status === 1 ? '启用' : '例外' | |||||
}; | }; | ||||
}); | }); | ||||
this.total = res.count; | this.total = res.count; | ||||