2024-05-20 18:07:24 +08:00
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
<el-form-item label="运营区" prop="areaName">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input v-model="queryParams.areaName" placeholder="请输入运营区" clearable @keyup.enter.native="handleQuery" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-col :span="1.5">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
|
v-hasPermi="['system:area:add']">新增</el-button>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
|
|
|
v-hasPermi="['system:area:edit']">修改</el-button>
|
2024-05-20 18:07:24 +08:00
|
|
|
<!-- <el-button
|
|
|
|
type="success"
|
|
|
|
plain
|
|
|
|
icon="el-icon-edit"
|
|
|
|
size="mini"
|
|
|
|
:disabled="single"
|
|
|
|
@click="openmap"
|
|
|
|
v-hasPermi="['system:area:edit']"
|
|
|
|
>电子围栏修改</el-button> -->
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
|
|
|
v-hasPermi="['system:area:remove']">删除</el-button>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
|
v-hasPermi="['system:area:export']">导出</el-button>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="areaList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="运营区域" align="center" prop="areaName" />
|
2024-07-18 18:04:20 +08:00
|
|
|
<el-table-column label="运营商" align="center" prop="deptName" />
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-table-column label="车数量" align="center" prop="deviceNum" />
|
|
|
|
<el-table-column label="停车区" align="center" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<router-link :to="'/system/area-parking/index/' + scope.row.areaId" class="link-type">
|
|
|
|
<span>去设置</span>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="禁停区" align="center" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<router-link :to="'/system/area-noparking/index/' + scope.row.areaId" class="link-type">
|
|
|
|
<span>去设置</span>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="禁行区" align="center" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<router-link :to="'/system/area-noriding/index/' + scope.row.areaId" class="link-type">
|
|
|
|
<span>去设置</span>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
2024-07-24 10:11:17 +08:00
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="导览地图" align="center" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<router-link :to="'/system/guide/index/' + scope.row.areaId" class="link-type">
|
|
|
|
<span>去设置</span>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-table-column>
|
2024-07-18 18:04:20 +08:00
|
|
|
<el-table-column label="收费方式" align="center" prop="ruleStr" :show-overflow-tooltip="true"/>
|
2024-07-27 10:06:04 +08:00
|
|
|
<!-- <el-table-column label="联系人" align="center" prop="contact" />-->
|
|
|
|
<!-- <el-table-column label="联系人电话" align="center" prop="phone" />-->
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-table-column label="状态" align="center" key="status">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
|
|
|
|
@change="handleStatusChange(scope.row)"></el-switch>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2024-07-18 18:04:20 +08:00
|
|
|
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
2024-05-20 18:07:24 +08:00
|
|
|
<template slot-scope="scope">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
|
|
v-hasPermi="['system:area:edit']">修改</el-button>
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="openmaps(scope.row)"
|
|
|
|
v-hasPermi="['system:area:edit']">修改电子围栏</el-button>
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
|
v-hasPermi="['system:area:remove']">删除</el-button>
|
2024-05-20 18:07:24 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
|
2024-05-30 10:23:53 +08:00
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
|
@pagination="getList" />
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-dialog title="电子围栏" :visible.sync="mapopen" width="1200px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
2024-05-30 10:23:53 +08:00
|
|
|
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-form-item label="电子围栏" prop="boundaryStr">
|
2024-06-17 09:55:17 +08:00
|
|
|
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr" :lon="form.longitude" :lat="form.latitude"
|
2024-05-30 10:23:53 +08:00
|
|
|
@center="center" @mapList="mapList" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
2024-06-17 09:55:17 +08:00
|
|
|
<!-- <el-row>-->
|
|
|
|
<!-- <el-col :span="12">-->
|
|
|
|
<!-- <el-form-item label="经度" prop="longitude">-->
|
|
|
|
<!-- <el-input v-model="form.longitude" placeholder="请输入经度" disabled />-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<!-- <el-col :span="12">-->
|
|
|
|
<!-- <el-form-item label="纬度" prop="latitude">-->
|
|
|
|
<!-- <el-input v-model="form.latitude" placeholder="请输入纬度" disabled />-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<!-- </el-row>-->
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
2024-07-24 10:09:51 +08:00
|
|
|
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
<!-- 添加或修改运营区对话框 -->
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1200px" :before-close="handleClose">
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-row>
|
2024-07-18 18:04:20 +08:00
|
|
|
<el-col :span="12" v-if="userName == 'admin'">
|
|
|
|
<el-form-item label="运营商" prop="deptId">
|
|
|
|
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择运营商" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="运营区" prop="areaName">
|
|
|
|
<el-input v-model="form.areaName" placeholder="请输入运营区" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-07-27 10:06:04 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="运营个性化图片" prop="picture" label-width="140px">
|
|
|
|
<image-upload v-model="form.picture" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="运营区域">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-select v-model="form.province" clearable size="small" placeholder="请选择省" class="filter-item"
|
2024-07-27 10:06:04 +08:00
|
|
|
style="width: 90px" @change="provinceChange($event)">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-option v-for="item in form.provinceList" :key="item.name" :label="item.name" :value="item.name" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-select>
|
|
|
|
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-select v-model="form.city" clearable size="small" placeholder="请选择城市" class="filter-item"
|
2024-07-27 10:06:04 +08:00
|
|
|
style="width: 100px" @change="cityChange($event)">
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-option v-for="item in form.cityList" :key="item.name" :label="item.name" :value="item.name" />
|
|
|
|
</el-select>
|
|
|
|
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-select v-model="form.county" clearable size="small" placeholder="请选择区县" class="filter-item"
|
2024-07-27 10:06:04 +08:00
|
|
|
style="width: 100px">
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-option v-for="item in form.countyList" :key="item.name" :label="item.name" :value="item.name" />
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-07-27 10:06:04 +08:00
|
|
|
<!-- <el-col :span="12">-->
|
|
|
|
<!-- <el-form-item label="运营个性化标语" prop="slogan" label-width="120px">-->
|
|
|
|
<!-- <el-input v-model="form.slogan" placeholder="请输入运营个性化标语" style="" />-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-col>-->
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-row>
|
2024-07-27 10:06:04 +08:00
|
|
|
<!-- <el-row>-->
|
|
|
|
<!-- <el-col :span="12">-->
|
|
|
|
<!-- <el-form-item label="联系人" prop="contact">-->
|
|
|
|
<!-- <el-input v-model="form.contact" placeholder="请输入联系人" />-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<!-- <el-col :span="12">-->
|
|
|
|
<!-- <el-form-item label="联系人电话" label-width="90" prop="phone">-->
|
|
|
|
<!-- <el-input v-model="form.phone" style="width: 75%" placeholder="请输入联系人电话" />-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<!-- </el-row>-->
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="运营时间" prop="areaTime">
|
|
|
|
<el-select v-model="form.areaTime" placeholder="请选择运营时间" style="width: 100%;">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-option v-for="dict in dict.type.et_operating_area_time" :key="dict.value" :label="dict.label"
|
|
|
|
:value="dict.value" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-07-13 15:07:14 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row v-if="form.areaTime == 2">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="自定义运营时间">
|
|
|
|
<el-time-picker v-model="form.areaTimeStart" value-format="HH:mm:ss" placeholder="开始时间">
|
|
|
|
</el-time-picker>
|
|
|
|
<el-time-picker arrow-control v-model="form.areaTimeEnd" value-format="HH:mm:ss" placeholder="结束时间">
|
|
|
|
</el-time-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-07-03 21:18:55 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-col :span="12">
|
2024-07-03 21:18:55 +08:00
|
|
|
<el-form-item label="自定义客服" prop="customService" label-width="100px">
|
|
|
|
<el-switch v-model="form.customService" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2024-07-03 21:18:55 +08:00
|
|
|
<div v-if="form.customService == '1'">
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="自定义客服名称1" prop="serviceName1" label-width="180px">
|
|
|
|
<el-input v-model="form.serviceName1" placeholder="请输入自定义客服名称" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="电话" prop="servicePhone1" >
|
|
|
|
<el-input v-model="form.servicePhone1" placeholder="请输入客服电话" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="自定义客服名称2" prop="serviceName2" label-width="180px">
|
|
|
|
<el-input v-model="form.serviceName2" placeholder="请输入自定义客服名称" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="电话" prop="servicePhone2" >
|
|
|
|
<el-input v-model="form.servicePhone2" placeholder="请输入客服电话" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="自定义客服名称3" prop="serviceName3" label-width="180px">
|
|
|
|
<el-input v-model="form.serviceName3" placeholder="请输入自定义客服名称" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="电话" prop="servicePhone3" >
|
|
|
|
<el-input v-model="form.servicePhone3" placeholder="请输入客服电话" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="运营区域外断电" label-width="120">
|
2024-07-22 10:29:30 +08:00
|
|
|
<el-switch v-model="form.areaOutOutage" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
2024-07-22 17:18:28 +08:00
|
|
|
<el-form-item label="是否开启押金抵扣" label-width="120">
|
|
|
|
<el-switch v-model="form.isDepositDeduction" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
2024-07-22 17:18:28 +08:00
|
|
|
<el-form-item label="还车是否拍照审核" label-width="120">
|
|
|
|
<el-switch v-model="form.returnVerify" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="禁行区内断电" label-width="90">
|
2024-07-22 10:29:30 +08:00
|
|
|
<el-switch v-model="form.noRidingOutage" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-form-item label="实名认证">
|
2024-07-22 10:29:30 +08:00
|
|
|
<el-switch v-model="form.authentication" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="短信通知服务" label-width="90">
|
2024-07-22 10:29:30 +08:00
|
|
|
<el-switch v-model="form.msgSwitch" class="drawer-switch" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2024-06-07 21:31:06 +08:00
|
|
|
<el-row>
|
2024-07-22 17:18:28 +08:00
|
|
|
<el-col :span="24">
|
2024-06-25 09:30:33 +08:00
|
|
|
<el-form-item label="强制停车点还车" label-width="90">
|
2024-07-22 10:29:30 +08:00
|
|
|
<el-switch v-model="form.parkingReturn" class="drawer-switch" />
|
2024-06-07 21:31:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-07-22 17:18:28 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row v-if="form.parkingReturn==false" style="padding-left: 10px">
|
2024-06-07 21:31:06 +08:00
|
|
|
<el-col :span="8">
|
2024-07-22 17:18:28 +08:00
|
|
|
<el-form-item label="停车点外还车调度" label-width="150">
|
|
|
|
<el-switch v-model="form.parkingOutDispatch" class="drawer-switch" />
|
2024-07-08 14:19:30 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
2024-07-22 17:18:28 +08:00
|
|
|
<el-form-item label="运营区外还车调度" label-width="150">
|
|
|
|
<el-switch v-model="form.areaOutDispatch" class="drawer-switch" />
|
2024-07-13 15:07:14 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
2024-07-22 17:18:28 +08:00
|
|
|
<el-form-item label="运营区外还车" label-width="120">
|
|
|
|
<el-switch v-model="form.areaOutReturn" class="drawer-switch" />
|
2024-06-07 21:31:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2024-05-20 18:07:24 +08:00
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="收费方式">
|
|
|
|
<el-select v-model="form.ruleIds" multiple placeholder="请选择收费方式">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-option v-for="item in ruleOptions" :key="item.ruleId" :label="item.name"
|
|
|
|
:value="item.ruleId"></el-option>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="低于电量(%)不得骑行" label-width="150">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input-number style="width: 50%" v-model="form.undercharge"
|
|
|
|
placeholder="低于电量(%)不得骑行"></el-input-number>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-05-30 10:23:53 +08:00
|
|
|
|
2024-05-24 15:34:06 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row>
|
2024-05-22 17:28:19 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="骑行押金" label-width="150">
|
|
|
|
<el-input-number style="width: 50%" v-model="form.deposit" placeholder="骑行前需要充值的押金"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-05-24 15:34:06 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="预约服务费" label-width="150">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input-number style="width: 50%" v-model="form.appointmentServiceFee"
|
|
|
|
placeholder="预约时每十分钟的计费"></el-input-number>
|
2024-05-24 15:34:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
2024-06-26 14:57:56 +08:00
|
|
|
<el-form-item label="运营区外调度费" label-width="150">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input-number style="width: 50%" v-model="form.dispatchFee"
|
|
|
|
placeholder="车辆超出运行区外的调度费用"></el-input-number>
|
2024-05-24 15:34:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2024-06-26 14:57:56 +08:00
|
|
|
<el-form-item label="停车点外调度费" label-width="150">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input-number style="width: 50%" v-model="form.vehicleManagementFee"
|
|
|
|
placeholder="车辆在运营区内但没在停车区产生的调度费用"></el-input-number>
|
2024-05-24 15:34:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
2024-05-27 09:02:28 +08:00
|
|
|
<el-form-item label="电量低于多少值自动生成换电订单" label-width="150" prop="autoReplacementOrder">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input-number style="width: 50%" v-model="form.autoReplacementOrder"
|
|
|
|
placeholder="电量低于多少值自动生成换电订单"></el-input-number>
|
2024-05-24 15:34:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2024-07-22 10:29:30 +08:00
|
|
|
<el-form-item label="最大预约时间(分)" label-width="150">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input-number style="width: 50%" v-model="form.timeoutMinutes"
|
|
|
|
placeholder="车辆可最长预约多少分钟"></el-input-number>
|
2024-05-24 15:34:06 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="还车误差(米)" label-width="100">
|
|
|
|
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="24">
|
2024-07-01 09:36:07 +08:00
|
|
|
<el-form-item label="弹窗公告">
|
2024-05-30 10:23:53 +08:00
|
|
|
<editor v-model="form.agreement" :min-height="192" />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="经度" prop="longitude">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input v-model="form.longitude" placeholder="请输入经度" disabled />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="纬度" prop="latitude">
|
2024-05-30 10:23:53 +08:00
|
|
|
<el-input v-model="form.latitude" placeholder="请输入纬度" disabled />
|
2024-05-20 18:07:24 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-07-24 10:09:51 +08:00
|
|
|
import { listArea, getArea, delArea, addArea, updateArea, updateArea2 } from "@/api/system/area";
|
2024-05-20 18:07:24 +08:00
|
|
|
import AreaMap from "@/components/AreaMap";
|
2024-05-30 10:23:53 +08:00
|
|
|
import { listFee } from "@/api/system/fee";
|
2024-07-18 18:04:20 +08:00
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
2024-05-30 10:23:53 +08:00
|
|
|
import { getDistrictList } from "@/api/common/common";
|
2024-07-18 18:04:20 +08:00
|
|
|
import { deptTreeSelect } from '@/api/system/user'
|
2024-05-20 18:07:24 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "Area",
|
2024-05-30 10:23:53 +08:00
|
|
|
dicts: ['et_operating_area_status', 'et_operating_area_time', 'et_business_switch'],
|
2024-07-18 18:04:20 +08:00
|
|
|
components: { AreaMap,Treeselect },
|
2024-05-20 18:07:24 +08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
// 遮罩层
|
|
|
|
loading: true,
|
|
|
|
// 选中数组
|
|
|
|
ids: [],
|
|
|
|
// 非单个禁用
|
|
|
|
single: true,
|
|
|
|
// 非多个禁用
|
|
|
|
multiple: true,
|
|
|
|
// 显示搜索条件
|
|
|
|
showSearch: true,
|
|
|
|
// 总条数
|
|
|
|
total: 0,
|
|
|
|
// 日期范围
|
|
|
|
dateRange: [],
|
2024-07-03 21:18:55 +08:00
|
|
|
customService: false,
|
2024-05-20 18:07:24 +08:00
|
|
|
// 收费方式选项
|
|
|
|
ruleOptions: [],
|
|
|
|
provinceList: [],
|
|
|
|
cityList: [],
|
|
|
|
countyList: [],
|
|
|
|
CITY: [],
|
|
|
|
XIAN: [],
|
|
|
|
// 运营区表格数据
|
|
|
|
areaList: [],
|
2024-07-18 18:04:20 +08:00
|
|
|
userName: null,
|
|
|
|
// 运营商树选项
|
|
|
|
deptOptions: undefined,
|
2024-05-20 18:07:24 +08:00
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
2024-05-30 10:23:53 +08:00
|
|
|
mapopen: false,
|
2024-05-20 18:07:24 +08:00
|
|
|
// 通过key重新渲染area-map组件
|
|
|
|
key: 0,
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
areaName: null,
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
form: {
|
2024-05-30 10:23:53 +08:00
|
|
|
status: '1',
|
2024-05-20 18:07:24 +08:00
|
|
|
province: '',
|
|
|
|
city: '',
|
|
|
|
county: '',
|
|
|
|
provinceList: [],
|
|
|
|
cityList: [],
|
|
|
|
countyList: [],
|
|
|
|
},
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
2024-05-22 17:28:19 +08:00
|
|
|
areaName: [{ required: true, message: "运营区域不能为空", trigger: "blur" }],
|
2024-07-27 10:06:04 +08:00
|
|
|
// contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
|
|
|
|
// phone: [{ required: true, message: "联系人电话不能为空", trigger: "blur" }],
|
2024-05-27 09:02:28 +08:00
|
|
|
autoReplacementOrder: [{ required: true, message: "最低电量不能为空", trigger: "blur" }],
|
2024-07-18 18:04:20 +08:00
|
|
|
deptId: [{ required: true, message: "运营商不能为空", trigger: "blur" }],
|
2024-05-22 17:28:19 +08:00
|
|
|
},
|
2024-05-20 18:07:24 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
created() {
|
2024-07-18 18:04:20 +08:00
|
|
|
console.log("当前用户信息:",this.$store.state.user.name)
|
|
|
|
this.userName = this.$store.state.user.name;
|
2024-05-20 18:07:24 +08:00
|
|
|
this.getList();
|
2024-07-18 18:04:20 +08:00
|
|
|
this.getDeptTree();
|
2024-05-20 18:07:24 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getCityList() {
|
2024-05-30 10:23:53 +08:00
|
|
|
this.loading = false
|
2024-05-20 18:07:24 +08:00
|
|
|
getDistrictList().then(res => {
|
|
|
|
this.form.provinceList = JSON.parse(res.data)
|
|
|
|
// console.log("provinceList======"+JSON.stringify(this.form.provinceList))
|
|
|
|
// this.form.provinceList = res.data.districts[0].districts /* 省*/
|
|
|
|
/* 进行遍历赋值*/
|
|
|
|
/* 市区和县区*/
|
|
|
|
let newProvince = this.form.provinceList
|
2024-05-30 10:23:53 +08:00
|
|
|
for (let i = 0; i < newProvince.length; i++) { /* 省级*/
|
|
|
|
for (let j = 0; j < newProvince[i].districts.length; j++) { /* 市级*/
|
2024-05-20 18:07:24 +08:00
|
|
|
let city = newProvince[i].districts[j].name
|
2024-05-30 10:23:53 +08:00
|
|
|
this.CITY.push({ id: j + 1, name: city, code: i + 1 })
|
|
|
|
for (let k = 0; k < newProvince[i].districts[j].districts.length; k++) {/* 县级*/
|
2024-05-20 18:07:24 +08:00
|
|
|
let xian = newProvince[i].districts[j].districts[k].name
|
2024-05-30 10:23:53 +08:00
|
|
|
this.XIAN.push({ id: k + 1, name: xian, code: j + 1, cityCountyName: city })
|
2024-05-20 18:07:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-30 10:23:53 +08:00
|
|
|
for (let m = 0; m < newProvince.length; m++) {
|
|
|
|
newProvince[m] = { ...newProvince[m], ...{ code: m + 1 } }
|
2024-05-20 18:07:24 +08:00
|
|
|
}
|
|
|
|
// console.log("newProvince======"+JSON.stringify(newProvince))
|
|
|
|
this.form.provinceList = newProvince
|
2024-05-30 10:23:53 +08:00
|
|
|
// this.loading = true
|
|
|
|
console.log(console.log(this.form.provinceList, ' this.form.provinceList'))
|
2024-05-20 18:07:24 +08:00
|
|
|
})
|
|
|
|
},
|
2024-07-18 18:04:20 +08:00
|
|
|
/** 查询运营商下拉树结构 */
|
|
|
|
getDeptTree() {
|
|
|
|
deptTreeSelect().then(response => {
|
|
|
|
this.deptOptions = response.data;
|
|
|
|
});
|
|
|
|
},
|
2024-05-30 10:23:53 +08:00
|
|
|
handleClose(){
|
|
|
|
this.open=false
|
|
|
|
this.loading = false
|
|
|
|
},
|
2024-05-22 17:28:19 +08:00
|
|
|
handleStatusChange(row) {
|
|
|
|
let text = row.status === "0" ? "启用" : "停用";
|
2024-05-30 10:23:53 +08:00
|
|
|
this.$modal.confirm('确认要"' + text + row.areaName + '"运营区吗?').then(function () {
|
|
|
|
let data = {
|
|
|
|
areaId: row.areaId,
|
2024-07-31 10:00:53 +08:00
|
|
|
status: row.status,
|
|
|
|
deptId: row.deptId
|
2024-05-22 17:28:19 +08:00
|
|
|
}
|
2024-05-30 10:23:53 +08:00
|
|
|
updateArea(data).then(response => {
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
});
|
2024-05-22 17:28:19 +08:00
|
|
|
}).then(() => {
|
|
|
|
this.$modal.msgSuccess(text + "成功");
|
2024-05-30 10:23:53 +08:00
|
|
|
}).catch(function () {
|
2024-05-22 17:28:19 +08:00
|
|
|
row.status = row.status === "0" ? "1" : "0";
|
|
|
|
});
|
|
|
|
},
|
2024-05-30 10:23:53 +08:00
|
|
|
cityChange(that) {
|
2024-05-20 18:07:24 +08:00
|
|
|
let countyCode = 0
|
|
|
|
let cityname = ''
|
|
|
|
let newCountyArry = []
|
2024-05-30 10:23:53 +08:00
|
|
|
this.form.cityList.forEach((item, index) => {
|
|
|
|
if (item.name == that) {
|
2024-05-20 18:07:24 +08:00
|
|
|
countyCode = item.id
|
|
|
|
cityname = item.name
|
|
|
|
}
|
|
|
|
})
|
2024-05-30 10:23:53 +08:00
|
|
|
if (countyCode) {
|
2024-05-20 18:07:24 +08:00
|
|
|
this.form.countyList = []
|
2024-05-30 10:23:53 +08:00
|
|
|
this.XIAN.forEach((item, index) => {
|
|
|
|
if (item.code == countyCode && item.cityCountyName == cityname) {
|
2024-05-20 18:07:24 +08:00
|
|
|
this.form.countyList.push(item)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
2024-05-30 10:23:53 +08:00
|
|
|
provinceChange(that) {
|
2024-05-20 18:07:24 +08:00
|
|
|
// 根据选中省,匹配市
|
|
|
|
let cityCode = 0
|
|
|
|
let newCityArry = []
|
2024-05-30 10:23:53 +08:00
|
|
|
this.form.provinceList.forEach((item, index) => {
|
|
|
|
if (item.name == that) {
|
2024-05-20 18:07:24 +08:00
|
|
|
cityCode = item.code
|
|
|
|
}
|
|
|
|
})
|
|
|
|
// console.log(cityCode)
|
2024-05-30 10:23:53 +08:00
|
|
|
if (cityCode) {
|
2024-05-20 18:07:24 +08:00
|
|
|
this.form.cityList = []
|
2024-05-30 10:23:53 +08:00
|
|
|
this.CITY.forEach((item, index) => {
|
|
|
|
if (item.code == cityCode) {
|
2024-05-20 18:07:24 +08:00
|
|
|
this.form.cityList.push(item)
|
|
|
|
}
|
|
|
|
}) /* 市匹配成功*/
|
|
|
|
}
|
|
|
|
},
|
2024-05-30 10:23:53 +08:00
|
|
|
mapList(data) {
|
2024-05-20 18:07:24 +08:00
|
|
|
let mapListJson = JSON.stringify(data);
|
2024-05-30 10:23:53 +08:00
|
|
|
console.log("mapListJson:" + mapListJson);
|
2024-05-20 18:07:24 +08:00
|
|
|
this.form.boundaryStr = mapListJson;
|
|
|
|
},
|
|
|
|
|
2024-05-30 10:23:53 +08:00
|
|
|
center(data) {
|
2024-05-20 18:07:24 +08:00
|
|
|
this.form.longitude = data.lng;
|
|
|
|
this.form.latitude = data.lat;
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 查询运营区列表 */
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
listArea(this.queryParams).then(response => {
|
|
|
|
this.areaList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
2024-05-30 10:23:53 +08:00
|
|
|
this.mapopen = false
|
2024-05-20 18:07:24 +08:00
|
|
|
this.open = false;
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
reset() {
|
|
|
|
this.form = {
|
|
|
|
areaId: null,
|
|
|
|
areaName: null,
|
|
|
|
boundaryStr: null,
|
|
|
|
longitude: null,
|
|
|
|
latitude: null,
|
|
|
|
// parkingPoint: null,
|
2024-07-22 10:29:30 +08:00
|
|
|
agreement: '<p><strong style=\\"color: rgb(68, 68, 68);\\">亲爱的用户,为了确保您的骑行安全,</strong></p><p><strong style=\\"color: rgb(68, 68, 68);\\">请务必遵守以下骑行提示: </strong></p><p><span style=\\"color: rgb(136, 136, 136);\\">仅限16岁及以上用户使用。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">为确保安全,后座不允许载人。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">请务必佩戴安全头盔,保护自身安全。 </span></p><p><span style=\\"color: rgb(136, 136, 136);\\">注意道路状况,避开坑洼,小心骑行。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">请在规定的地点还车,避免随意停放。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">不逆行、不闯红灯,遵守所有交通法规。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">骑行时不要使用手机,保持注意力集中。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">避免急刹车和急转弯,保持适当的车速。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">夜间骑行时,确保车灯和反光标识正常。</span></p><p><br></p><p><strong style=\\"color: rgb(68, 68, 68);\\">紧急情况处理:</strong></p><p><span style=\\"color: rgb(136, 136, 136);\\">如有紧急情况,请及时拨打客服电话。</span></p><p><span style=\\"color: rgb(136, 136, 136);\\">感谢您的理解与配合,祝您骑行愉快。</span></p>',
|
2024-05-20 18:07:24 +08:00
|
|
|
createBy: null,
|
2024-05-22 17:28:19 +08:00
|
|
|
createTime: null,
|
2024-05-30 10:23:53 +08:00
|
|
|
status: '1',
|
2024-07-22 10:29:30 +08:00
|
|
|
deptId: null,
|
|
|
|
contact: null,
|
|
|
|
phone: null,
|
|
|
|
autoReplacementOrder: null,
|
|
|
|
remark: null,
|
|
|
|
province: null,
|
|
|
|
city: null,
|
|
|
|
county: null,
|
|
|
|
provinceList: [],
|
|
|
|
cityList: [],
|
|
|
|
countyList: [],
|
|
|
|
ruleIds: [],
|
|
|
|
areaOutOutage: true ,
|
|
|
|
parkingOutDispatch: true,
|
|
|
|
areaOutDispatch: true,
|
|
|
|
noRidingOutage: true,
|
|
|
|
authentication: true,
|
|
|
|
msgSwitch: false,
|
|
|
|
parkingReturn: true,
|
|
|
|
areaOutReturn: true,
|
|
|
|
isDepositDeduction: false,
|
|
|
|
returnVerify: false,
|
|
|
|
deposit: 200,
|
|
|
|
customService: false,
|
|
|
|
undercharge: 20
|
2024-05-20 18:07:24 +08:00
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
resetQuery() {
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
this.handleQuery();
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.areaId)
|
2024-05-30 10:23:53 +08:00
|
|
|
this.single = selection.length !== 1
|
2024-05-20 18:07:24 +08:00
|
|
|
this.multiple = !selection.length
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.getCityList();
|
|
|
|
listFee().then(response => {
|
|
|
|
this.ruleOptions = response.rows;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加运营区";
|
|
|
|
this.key++;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
2024-05-30 10:23:53 +08:00
|
|
|
|
2024-05-20 18:07:24 +08:00
|
|
|
const areaId = row.areaId || this.ids
|
|
|
|
getArea(areaId).then(response => {
|
|
|
|
this.form = response.data;
|
2024-05-30 10:23:53 +08:00
|
|
|
this.form.ruleIds = response.ruleIds
|
2024-07-03 21:18:55 +08:00
|
|
|
response.data.customService == "1" ? this.form.customService = true : this.form.customService = false
|
2024-07-22 10:29:30 +08:00
|
|
|
response.data.areaOutOutage == "1" ? this.form.areaOutOutage = true : this.form.areaOutOutage = false
|
|
|
|
response.data.parkingOutDispatch == "1" ? this.form.parkingOutDispatch = true : this.form.parkingOutDispatch = false
|
|
|
|
response.data.areaOutDispatch == "1" ? this.form.areaOutDispatch = true : this.form.areaOutDispatch = false
|
|
|
|
response.data.noRidingOutage == "1" ? this.form.noRidingOutage = true : this.form.noRidingOutage = false
|
|
|
|
response.data.authentication == "1" ? this.form.authentication = true : this.form.authentication = false
|
|
|
|
response.data.msgSwitch == "1" ? this.form.msgSwitch = true : this.form.msgSwitch = false
|
|
|
|
response.data.parkingReturn == "1" ? this.form.parkingReturn = true : this.form.parkingReturn = false
|
|
|
|
response.data.areaOutReturn == "1" ? this.form.areaOutReturn = true : this.form.areaOutReturn = false
|
|
|
|
response.data.isDepositDeduction == "1" ? this.form.isDepositDeduction = true : this.form.isDepositDeduction = false
|
|
|
|
response.data.returnVerify == "1" ? this.form.returnVerify = true : this.form.returnVerify = false
|
2024-05-20 18:07:24 +08:00
|
|
|
this.open = true;
|
|
|
|
this.title = "修改运营区";
|
|
|
|
this.key++;
|
2024-07-18 18:04:20 +08:00
|
|
|
console.log('this.form.areaId=================',this.form.areaId)
|
|
|
|
console.log('this.form.deptId=================',this.form.deptId)
|
|
|
|
|
|
|
|
listFee({areaId:this.form.areaId}).then(response => {
|
2024-05-30 10:23:53 +08:00
|
|
|
this.ruleOptions = response.rows;
|
|
|
|
this.open = true;
|
2024-07-03 21:18:55 +08:00
|
|
|
this.title = "修改运营区";
|
2024-05-30 10:23:53 +08:00
|
|
|
this.key++;
|
|
|
|
});
|
2024-05-22 17:28:19 +08:00
|
|
|
// this.getCityList()
|
|
|
|
this.getCityList();
|
2024-05-20 18:07:24 +08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
openmaps(row) {
|
2024-05-30 10:23:53 +08:00
|
|
|
|
2024-05-20 18:07:24 +08:00
|
|
|
this.reset();
|
|
|
|
const areaId = row.areaId || this.ids
|
|
|
|
getArea(areaId).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.mapopen = true;
|
|
|
|
this.title = "修改运营区";
|
|
|
|
this.key++;
|
|
|
|
console.log('点击了');
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
const { cityList, countyList, provinceList, ...rest } = this.form;
|
|
|
|
|
2024-05-30 10:23:53 +08:00
|
|
|
// 将 rest 对象中的属性赋值给 data
|
|
|
|
let data = { ...rest };
|
2024-07-03 21:18:55 +08:00
|
|
|
console.log("this.form=================",data)
|
2024-07-22 10:29:30 +08:00
|
|
|
data.customService = data.customService ? "1" : "0";
|
|
|
|
data.areaOutOutage = data.areaOutOutage ? "1" : "0";
|
|
|
|
data.parkingOutDispatch = data.parkingOutDispatch ? "1" : "0";
|
|
|
|
data.areaOutDispatch = data.areaOutDispatch ? "1" : "0";
|
|
|
|
data.noRidingOutage = data.noRidingOutage ? "1" : "0";
|
|
|
|
data.authentication = data.authentication ? "1" : "0";
|
|
|
|
data.msgSwitch = data.msgSwitch ? "1" : "0";
|
|
|
|
data.parkingReturn = data.parkingReturn ? "1" : "0";
|
|
|
|
data.areaOutReturn = data.areaOutReturn ? "1" : "0";
|
|
|
|
data.isDepositDeduction = data.isDepositDeduction ? "1" : "0";
|
|
|
|
data.returnVerify = data.returnVerify ? "1" : "0";
|
2024-07-24 10:09:51 +08:00
|
|
|
if(data.isDepositDeduction === '1' && data.returnVerify === '1'){
|
|
|
|
this.$modal.msgError("押金抵扣和拍照审核不能同时开启");
|
|
|
|
return
|
|
|
|
}
|
2024-05-30 10:23:53 +08:00
|
|
|
// console.log(data, 'data without cityList, countyList, provinceList');
|
2024-05-20 18:07:24 +08:00
|
|
|
// console.log(this.form,'formformformformform');
|
|
|
|
if (this.form.areaId != null) {
|
|
|
|
updateArea(data).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
2024-07-24 10:09:51 +08:00
|
|
|
this.open = false;
|
|
|
|
this.mapopen = false
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
addArea(data).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm2() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.areaId != null) {
|
|
|
|
updateArea2({areaId:this.form.areaId,boundary:this.form.boundary,boundaryStr:this.form.boundaryStr}).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
2024-05-20 18:07:24 +08:00
|
|
|
this.open = false;
|
2024-05-30 10:23:53 +08:00
|
|
|
this.mapopen = false
|
2024-05-20 18:07:24 +08:00
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
addArea(data).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
2024-05-30 10:23:53 +08:00
|
|
|
|
2024-05-20 18:07:24 +08:00
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
const areaIds = row.areaId || this.ids;
|
2024-05-30 10:23:53 +08:00
|
|
|
this.$modal.confirm('是否确认删除运营区编号为"' + areaIds + '"的数据项?').then(function () {
|
2024-05-20 18:07:24 +08:00
|
|
|
return delArea(areaIds);
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
2024-05-30 10:23:53 +08:00
|
|
|
}).catch(() => { });
|
2024-05-20 18:07:24 +08:00
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
this.download('system/area/export', {
|
|
|
|
...this.queryParams
|
|
|
|
}, `area_${new Date().getTime()}.xlsx`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style>
|
2024-05-30 10:23:53 +08:00
|
|
|
.el-dialog:not(.is-fullscreen) {
|
|
|
|
margin-top: 2vh !important;
|
|
|
|
}
|
2024-07-27 10:06:04 +08:00
|
|
|
.el-upload--picture-card {
|
|
|
|
width: 60px !important;
|
|
|
|
height: 60px !important;
|
|
|
|
line-height: 70px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-upload-list--picture-card .el-upload-list__item {
|
|
|
|
width: 60px !important;
|
|
|
|
height: 60px !important;
|
|
|
|
}
|
2024-05-20 18:07:24 +08:00
|
|
|
</style>
|