ソースを参照

- 修改 通用例外和用户例外状态选择方式

master
2183691628 2年前
コミット
20390b286c
7個のファイルの変更73行の追加17行の削除
  1. +7
    -2
      README.md
  2. +5
    -1
      src/main.js
  3. +18
    -0
      src/utils/checkout-status-to-num.js
  4. +18
    -0
      src/utils/checkout-status.js
  5. +1
    -1
      src/utils/model.js
  6. +11
    -6
      src/views/off-limits-manage/common-exception/index.vue
  7. +13
    -7
      src/views/off-limits-manage/user-exception/index.vue

+ 7
- 2
README.md ファイルの表示

@@ -1,7 +1,7 @@
<!--
* @Date: 2021-11-29 11:14:13
* @LastEditors: JinxuChen
* @LastEditTime: 2021-12-14 09:44:53
* @LastEditTime: 2021-12-15 16:47:35
* @FilePath: \GpsCardAdmin\README.md
* @description:
-->
@@ -84,4 +84,9 @@ FIX
- 修复 token过期移动端无法跳转的问题
- 删除 页面中不使用的 TopMenu组件
- 取消 登录过期弹窗退出登录确认弹窗
- 增加 登录成功提示
- 增加 登录成功提示

## v1.0.9F
`2021年12月15日`
FEATURE
- 修改 通用例外和用户例外状态选择方式

+ 5
- 1
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


+ 18
- 0
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
}
}
}

+ 18
- 0
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 '白名单'
}
}
}

+ 1
- 1
src/utils/model.js ファイルの表示

@@ -5,4 +5,4 @@
* @FilePath: \GpsCardAdmin\src\utils\model.js
* @description: 版本号
*/
export const VersionModel = '1.0.8';
export const VersionModel = '1.0.9';

+ 11
- 6
src/views/off-limits-manage/common-exception/index.vue ファイルの表示

@@ -1,7 +1,7 @@
<!--
* @Date: 2021-11-30 09:44:24
* @LastEditors: JinxuChen
* @LastEditTime: 2021-12-14 09:23:18
* @LastEditTime: 2021-12-15 16:41:14
* @FilePath: \GpsCardAdmin\src\views\off-limits-manage\common-exception\index.vue
* @description:
-->
@@ -105,7 +105,12 @@
</el-form-item>
<!-- 状态 -->
<el-form-item label="状态" prop="status" required>
<el-switch v-model="form.status" active-text="打开" inactive-text="关闭"></el-switch>
<!-- <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-form-item>
<!-- 创建时间 -->
<el-form-item label="创建时间" prop="timestamp" v-show="false">
@@ -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
};
});


+ 13
- 7
src/views/off-limits-manage/user-exception/index.vue ファイルの表示

@@ -1,7 +1,7 @@
<!--
* @Date: 2021-11-30 09:44:24
* @LastEditors: JinxuChen
* @LastEditTime: 2021-12-14 09:23:29
* @LastEditTime: 2021-12-15 16:43:36
* @FilePath: \GpsCardAdmin\src\views\off-limits-manage\user-exception\index.vue
* @description:
-->
@@ -82,7 +82,12 @@
</el-form-item>
<!-- 状态 -->
<el-form-item label="状态" prop="status" required>
<el-switch v-model="form.status" active-text="打开" inactive-text="关闭"></el-switch>
<!-- <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-form-item>
<!-- 创建时间 -->
<el-form-item label="创建时间" prop="timestamp" v-show="false">
@@ -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;


読み込み中…
キャンセル
保存