update 站点列表页面添加运营商搜索

This commit is contained in:
Lemon
2023-07-19 15:01:00 +08:00
parent 33ccda7214
commit cac90f7fe8
3 changed files with 554 additions and 529 deletions

View File

@@ -334,6 +334,9 @@
<if test="stationDTO.publicFlag != null and stationDTO.publicFlag != ''"> <if test="stationDTO.publicFlag != null and stationDTO.publicFlag != ''">
and t1.public_flag = #{stationDTO.publicFlag,jdbcType=VARCHAR} and t1.public_flag = #{stationDTO.publicFlag,jdbcType=VARCHAR}
</if> </if>
<if test="stationDTO.merchantId != null and stationDTO.merchantId != ''">
and t1.merchant_id = #{stationDTO.merchantId,jdbcType=VARCHAR}
</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
<if test="stationDTO.merchantDeptIds != null and stationDTO.merchantDeptIds.size() != 0"> <if test="stationDTO.merchantDeptIds != null and stationDTO.merchantDeptIds.size() != 0">
and t3.dept_id in and t3.dept_id in

View File

@@ -8,6 +8,16 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item label="所属运营商" prop="merchantId" label-width="120">
<el-select v-model="queryParams.merchantId" filterable clearable placeholder="请选择运营商">
<el-option
v-for="item in merchantList"
:key="item.merchantName"
:label="item.merchantName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="站点名称" prop="stationName"> <el-form-item label="站点名称" prop="stationName">
<el-input <el-input
v-model="queryParams.stationName" v-model="queryParams.stationName"
@@ -22,10 +32,12 @@
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索
</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button >重置
</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -39,7 +51,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['pile:station:add']" v-hasPermi="['pile:station:add']"
>新增</el-button >新增
</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@@ -51,7 +64,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['pile:station:edit']" v-hasPermi="['pile:station:edit']"
>修改</el-button >修改
</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@@ -63,7 +77,8 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['pile:station:remove']" v-hasPermi="['pile:station:remove']"
>删除</el-button >删除
</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@@ -74,7 +89,8 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['pile:station:export']" v-hasPermi="['pile:station:export']"
>导出</el-button >导出
</el-button
> >
</el-col> </el-col>
<right-toolbar <right-toolbar
@@ -88,7 +104,7 @@
:data="stationList" :data="stationList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="80" align="center" /> <el-table-column type="selection" width="80" 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="stationName"> <el-table-column label="站点名称" align="center" prop="stationName">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -108,8 +124,8 @@
{{ getCodeToText(scope.row.areaCode, null) }} {{ getCodeToText(scope.row.areaCode, null) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="站点地址" align="center" prop="address" /> <el-table-column label="站点地址" align="center" prop="address"/>
<el-table-column label="所属运营商" align="center" prop="merchantName" /> <el-table-column label="所属运营商" align="center" prop="merchantName"/>
<!--<el-table-column label="站点电话" align="center" prop="stationTel" />--> <!--<el-table-column label="站点电话" align="center" prop="stationTel" />-->
<!--<el-table-column label="服务电话" align="center" prop="serviceTel" />--> <!--<el-table-column label="服务电话" align="center" prop="serviceTel" />-->
<el-table-column label="站点类型" align="center" prop="stationType"> <el-table-column label="站点类型" align="center" prop="stationType">
@@ -128,7 +144,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="充电设备数量" align="center" prop="pileNum" /> <el-table-column label="充电设备数量" align="center" prop="pileNum"/>
<el-table-column label="是否对外开放" align="center" prop="publicFlag"> <el-table-column label="是否对外开放" align="center" prop="publicFlag">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@@ -162,7 +178,7 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="管理员" align="center" prop="merchantAdminName" /> <el-table-column label="管理员" align="center" prop="merchantAdminName"/>
<!--<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">
@@ -206,7 +222,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="站点名称" prop="stationName"> <el-form-item label="站点名称" prop="stationName">
<el-input v-model="form.stationName" maxlength="30" placeholder="请输入站点名称" /> <el-input v-model="form.stationName" maxlength="30" placeholder="请输入站点名称"/>
</el-form-item> </el-form-item>
<el-form-item label="省市区" prop="areaCode"> <el-form-item label="省市区" prop="areaCode">
<!--<el-input v-model="form.areaCode" placeholder="请输入充电站省市辖区编码" />--> <!--<el-input v-model="form.areaCode" placeholder="请输入充电站省市辖区编码" />-->
@@ -219,15 +235,15 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="站点地址" prop="address"> <el-form-item label="站点地址" prop="address">
<el-input v-model="form.address" maxlength="30" placeholder="请输入站点地址" /> <el-input v-model="form.address" maxlength="30" placeholder="请输入站点地址"/>
</el-form-item> </el-form-item>
<el-form-item label="站点管理员" prop="merchantAdminName"> <el-form-item label="站点管理员" prop="merchantAdminName">
<el-input v-model="form.stationAdminName" placeholder="站点管理员" /> <el-input v-model="form.stationAdminName" placeholder="站点管理员"/>
</el-form-item> </el-form-item>
<el-form-item label="站点电话" prop="stationTel"> <el-form-item label="站点电话" prop="stationTel">
<el-input v-model="form.stationTel" placeholder="站点电话" /> <el-input v-model="form.stationTel" placeholder="站点电话"/>
</el-form-item> </el-form-item>
@@ -249,8 +265,8 @@ import {
updateStation, updateStation,
fastCreateStation, fastCreateStation,
} from "@/api/pile/station"; } from "@/api/pile/station";
import { getMerchantList } from "@/api/pile/merchant"; import {getMerchantList} from "@/api/pile/merchant";
import { regionData, CodeToText } from "element-china-area-data"; import {regionData, CodeToText} from "element-china-area-data";
export default { export default {
name: "Station", name: "Station",
@@ -280,6 +296,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
stationName: null, stationName: null,
merchantId: null,
aloneApply: null, aloneApply: null,
accountNumber: null, accountNumber: null,
capacity: null, capacity: null,
@@ -321,13 +338,13 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
stationName: [ stationName: [
{ required: true, message: "请输入站点名称", trigger: "blur" }, {required: true, message: "请输入站点名称", trigger: "blur"},
], ],
areaCode: [ areaCode: [
{ required: true, message: "请输入选择区域", trigger: "blur" }, {required: true, message: "请输入选择区域", trigger: "blur"},
], ],
address: [ address: [
{ required: true, message: "请输入站点地址", trigger: "blur" }, {required: true, message: "请输入站点地址", trigger: "blur"},
], ],
}, },
options: regionData, options: regionData,
@@ -337,7 +354,7 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
// this.getMerchantList(); this.getMerchantList();
}, },
methods: { methods: {
goStationDetail(scope) { goStationDetail(scope) {
@@ -353,6 +370,7 @@ export default {
getMerchantList() { getMerchantList() {
getMerchantList().then((response) => { getMerchantList().then((response) => {
this.merchantList = response.rows; this.merchantList = response.rows;
console.log("merchantList", this.merchantList)
}); });
}, },
changeFlag(info) { changeFlag(info) {
@@ -415,6 +433,7 @@ export default {
this.form = { this.form = {
id: null, id: null,
stationName: null, stationName: null,
merchantId: null,
aloneApply: null, aloneApply: null,
accountNumber: null, accountNumber: null,
capacity: null, capacity: null,
@@ -462,6 +481,8 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
// this.merchantId = form.merchantId;
console.log("merchantId", this.merchantId)
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
@@ -535,7 +556,8 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}); .catch(() => {
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

View File

@@ -35,9 +35,9 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`, target: `http://localhost:8080`,
// 更改代理为本地地址 // 更改代理为本地地址
target: `http://192.168.2.6:8080`, // target: `http://192.168.2.6:8080`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",