mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-10 00:48:12 +08:00
update 添加鉴权卡
This commit is contained in:
@@ -106,9 +106,6 @@ public class MemberBasicInfoController extends BaseController {
|
|||||||
@GetMapping("/getMerchantListByAuth")
|
@GetMapping("/getMerchantListByAuth")
|
||||||
public RestApiResponse<?> getMerchantListByAuth() {
|
public RestApiResponse<?> getMerchantListByAuth() {
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
// List<MerchantInfoVO> list = memberBasicInfoService.getMerchantListByAuth(deptIds);
|
|
||||||
// List<MerchantInfoVO> list = memberBasicInfoService.getMerchantListByAuth();
|
|
||||||
// List<MerchantInfoVO> list = UserUtils.getMerchantListByAuth();
|
|
||||||
LoginUserDetailVO loginUserDetail = UserUtils.getLoginUserDetail();
|
LoginUserDetailVO loginUserDetail = UserUtils.getLoginUserDetail();
|
||||||
logger.info("获取登录用户信息:{}", JSON.toJSONString(loginUserDetail));
|
logger.info("获取登录用户信息:{}", JSON.toJSONString(loginUserDetail));
|
||||||
List<MerchantInfoVO> list = loginUserDetail.getMerchantInfoVOList();
|
List<MerchantInfoVO> list = loginUserDetail.getMerchantInfoVOList();
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
#url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: jsowell_dev
|
#username: jsowell_dev
|
||||||
# url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# username: jsowell_prd_copy
|
username: jsowell_prd_copy
|
||||||
password: 123456
|
password: 123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||||
|
label-width="68px">
|
||||||
<el-form-item label="逻辑卡号" prop="logicCard">
|
<el-form-item label="逻辑卡号" prop="logicCard">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.logicCard"
|
v-model="queryParams.logicCard"
|
||||||
@@ -9,14 +10,14 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="物理卡号" prop="physicsCard">-->
|
<!-- <el-form-item label="物理卡号" prop="physicsCard">-->
|
||||||
<!-- <el-input-->
|
<!-- <el-input-->
|
||||||
<!-- v-model="queryParams.physicsCard"-->
|
<!-- v-model="queryParams.physicsCard"-->
|
||||||
<!-- placeholder="请输入物理卡号"-->
|
<!-- placeholder="请输入物理卡号"-->
|
||||||
<!-- clearable-->
|
<!-- clearable-->
|
||||||
<!-- @keyup.enter.native="handleQuery"-->
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="手机号码" prop="phoneNumber">
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.phoneNumber"
|
v-model="queryParams.phoneNumber"
|
||||||
@@ -40,7 +41,8 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['pile:card:add']"
|
v-hasPermi="['pile:card:add']"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -51,7 +53,8 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['pile:card:edit']"
|
v-hasPermi="['pile:card:edit']"
|
||||||
>修改</el-button>
|
>修改
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -62,34 +65,35 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['pile:card:remove']"
|
v-hasPermi="['pile:card:remove']"
|
||||||
>删除</el-button>
|
>删除
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- type="warning"-->
|
<!-- type="warning"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="el-icon-download"-->
|
<!-- icon="el-icon-download"-->
|
||||||
<!-- size="mini"-->
|
<!-- size="mini"-->
|
||||||
<!-- @click="handleExport"-->
|
<!-- @click="handleExport"-->
|
||||||
<!-- v-hasPermi="['pile:card:export']"-->
|
<!-- v-hasPermi="['pile:card:export']"-->
|
||||||
<!-- >导出</el-button>-->
|
<!-- >导出</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="cardList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="cardList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||||
<el-table-column label="逻辑卡号" align="center" prop="logicCard" />
|
<el-table-column label="逻辑卡号" align="center" prop="logicCard"/>
|
||||||
<el-table-column label="卡状态" align="center" prop="status" >
|
<el-table-column label="卡状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.card_status"
|
<dict-tag :options="dict.type.card_status"
|
||||||
:value="scope.row.status"/>
|
:value="scope.row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="密钥" align="center" prop="secretKey" />
|
<el-table-column label="密钥" align="center" prop="secretKey"/>
|
||||||
<!-- <el-table-column label="物理卡号" align="center" prop="physicsCard" />-->
|
<!-- <el-table-column label="物理卡号" align="center" prop="physicsCard" />-->
|
||||||
<el-table-column label="所属用户" align="center" prop="nickName" >
|
<el-table-column label="所属用户" align="center" prop="nickName">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<router-link
|
<router-link
|
||||||
:to="'/member/detail/index/'+scope.row.memberId"
|
:to="'/member/detail/index/'+scope.row.memberId"
|
||||||
@@ -99,8 +103,8 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="手机号码" align="center" prop="phoneNumber" />
|
<el-table-column label="手机号码" align="center" prop="phoneNumber"/>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
<el-table-column label="创建时间" align="center" prop="createTime"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -109,14 +113,16 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['pile:card:edit']"
|
v-hasPermi="['pile:card:edit']"
|
||||||
>修改</el-button>
|
>修改
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-circle-close"
|
icon="el-icon-circle-close"
|
||||||
@click="handleDeactivateCard(scope.row)"
|
@click="handleDeactivateCard(scope.row)"
|
||||||
v-hasPermi="['pile:card:remove']"
|
v-hasPermi="['pile:card:remove']"
|
||||||
>停用</el-button>
|
>停用
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -132,48 +138,25 @@
|
|||||||
<!-- 添加或修改充电站鉴权卡对话框 -->
|
<!-- 添加或修改充电站鉴权卡对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="一级运营商" prop="merchantId">
|
<el-form-item label="选择运营商" prop="merchantId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.merchantId"
|
v-model="form.merchantId"
|
||||||
clearable placeholder="请选择一级运营商"
|
clearable placeholder="请选择运营商"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in firstLevelMerchantList"
|
v-for="item in merchantList"
|
||||||
:key="item.merchantName"
|
:key="item.merchantId"
|
||||||
:label="item.merchantName"
|
:label="item.merchantName"
|
||||||
:value="item.id">
|
:value="item.merchantId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="逻辑卡号" prop="logicCard">
|
<el-form-item label="逻辑卡号" prop="logicCard">
|
||||||
<el-input v-model="form.logicCard" :disabled = "isDisabled" placeholder="请输入逻辑卡号" />
|
<el-input v-model="form.logicCard" :disabled="isDisabled" placeholder="请输入逻辑卡号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码" prop="phoneNumber">
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
<el-input v-model="form.phoneNumber" placeholder="请输入会员的手机号码" />
|
<el-input v-model="form.phoneNumber" placeholder="请输入会员的手机号码"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="选择状态" prop="status">-->
|
|
||||||
<!-- <el-select-->
|
|
||||||
<!-- placeholder="请选择状态"-->
|
|
||||||
<!-- v-model="form.status"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item in dict.type.card_status"-->
|
|
||||||
<!-- :key="item.value"-->
|
|
||||||
<!-- :label="item.label"-->
|
|
||||||
<!-- :value="item.value"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-option>-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="物理卡号" prop="physicsCard">-->
|
|
||||||
<!-- <el-input v-model="form.physicsCard" placeholder="请输入物理卡号" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="会员id" prop="memberId">-->
|
|
||||||
<!-- <el-input v-model="form.memberId" placeholder="请输入所属用户" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="删除标识" prop="delFlag">-->
|
|
||||||
<!-- <el-input v-model="form.delFlag" placeholder="请输入删除标识" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@@ -186,6 +169,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {listCard, getCard, delCard, addCard, updateCard, deactivateCard} from "@/api/pile/card";
|
import {listCard, getCard, delCard, addCard, updateCard, deactivateCard} from "@/api/pile/card";
|
||||||
import {queryFirstLevelMerchant} from "@/api/pile/merchant";
|
import {queryFirstLevelMerchant} from "@/api/pile/merchant";
|
||||||
|
import {getMerchantList} from "@/api/member/info";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "card",
|
name: "card",
|
||||||
@@ -213,6 +197,7 @@ export default {
|
|||||||
// 卡号是否可填写
|
// 卡号是否可填写
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
firstLevelMerchantList: [],
|
firstLevelMerchantList: [],
|
||||||
|
merchantList: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -227,7 +212,7 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
merchantId:[
|
merchantId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择一级运营商",
|
message: "请选择一级运营商",
|
||||||
@@ -241,7 +226,7 @@ export default {
|
|||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
logicCard:[
|
logicCard: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
max: 16,
|
max: 16,
|
||||||
@@ -254,7 +239,8 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getFirstLevelMerchantList();
|
// this.getFirstLevelMerchantList();
|
||||||
|
this.getMerchantList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询充电站鉴权卡列表 */
|
/** 查询充电站鉴权卡列表 */
|
||||||
@@ -268,11 +254,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取一级运营商列表
|
// 获取一级运营商列表
|
||||||
getFirstLevelMerchantList() {
|
getFirstLevelMerchantList() {
|
||||||
queryFirstLevelMerchant().then(response =>{
|
queryFirstLevelMerchant().then(response => {
|
||||||
console.log("getFirstLevelMerchantList", response)
|
console.log("getFirstLevelMerchantList", response)
|
||||||
this.firstLevelMerchantList = response.rows;
|
this.firstLevelMerchantList = response.rows;
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 获取运营商列表
|
||||||
|
getMerchantList() {
|
||||||
|
getMerchantList().then((response) => {
|
||||||
|
console.log("getMerchantList response", response)
|
||||||
|
this.merchantList = response.obj;
|
||||||
|
this.form.merchantId = this.merchantList[0].merchantId
|
||||||
|
})
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@@ -281,19 +276,15 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
|
||||||
logicCard: null,
|
logicCard: null,
|
||||||
physicsCard: null,
|
physicsCard: null,
|
||||||
memberId: null,
|
memberId: null,
|
||||||
merchantId: null,
|
|
||||||
phoneNumber: null,
|
phoneNumber: null,
|
||||||
createTime: null,
|
|
||||||
createBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
delFlag: null
|
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
|
if (this.merchantList.length > 0) {
|
||||||
|
this.form.merchantId = this.merchantList[0].merchantId
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@@ -308,14 +299,14 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
// this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加充电站鉴权卡";
|
this.title = "添加充电站鉴权卡11";
|
||||||
this.isDisabled = false;
|
this.isDisabled = false;
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@@ -338,38 +329,43 @@ export default {
|
|||||||
updateCard(this.form).then(response => {
|
updateCard(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCard(this.form).then(response => {
|
addCard(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除充电站鉴权卡编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除充电站鉴权卡编号为"' + ids + '"的数据项?').then(function () {
|
||||||
return delCard(ids);
|
return delCard(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 停用按钮
|
// 停用按钮
|
||||||
handleDeactivateCard(row) {
|
handleDeactivateCard(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal.confirm('是否确认停用卡号为"' + row.logicCard + '"的鉴权卡?').then(function() {
|
this.$modal.confirm('是否确认停用卡号为"' + row.logicCard + '"的鉴权卡?').then(function () {
|
||||||
return deactivateCard(id);
|
return deactivateCard(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("停用成功");
|
this.$modal.msgSuccess("停用成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
Reference in New Issue
Block a user