运营区设置修改
This commit is contained in:
parent
08c516f28c
commit
a124450fcf
|
@ -212,7 +212,7 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
.container {
|
||||
|
|
|
@ -218,6 +218,20 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/areaSet',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:parking:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:areaId(\\d+)',
|
||||
component: () => import('@/views/system/area/areaSet'),
|
||||
name: 'Data',
|
||||
meta: { title: '运营区设置', activeMenu: '/system/areaSet' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/area-noriding',
|
||||
component: Layout,
|
||||
|
|
531
src/views/system/area/areaSet.vue
Normal file
531
src/views/system/area/areaSet.vue
Normal file
|
@ -0,0 +1,531 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<div class="tit" style="width: 100%;">{{ title }}</div>
|
||||
<div class="pagecont">
|
||||
<div class="left_box">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'" data-tip="这是运营商选择框">
|
||||
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true"
|
||||
placeholder="请选择运营商" />
|
||||
|
||||
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区" prop="areaName" data-tip="这是运营区输入框">
|
||||
<el-input v-model="form.areaName" placeholder="请输入运营区" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营个性化图片" prop="picture" label-width="140" data-tip="这是运营个性化图片上传框">
|
||||
<div style="display: flex;flex-wrap: wrap;">
|
||||
<image-upload :limit="1" :isShowTip="false" v-model="form.picture" />
|
||||
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<div class="tip" >用户地图上显示的车辆图标样式</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区域" data-tip="这是运营区域选择框">
|
||||
<el-select v-model="form.province" clearable size="small" placeholder="请选择省"
|
||||
class="filter-item" style="width: 90px" @change="provinceChange($event)">
|
||||
<el-option v-for="item in form.provinceList" :key="item.name" :label="item.name"
|
||||
:value="item.name" />
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="form.city" clearable size="small" placeholder="请选择城市"
|
||||
class="filter-item" style="width: 100px" @change="cityChange($event)">
|
||||
<el-option v-for="item in form.cityList" :key="item.name" :label="item.name"
|
||||
:value="item.name" />
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="form.county" clearable size="small" placeholder="请选择区县"
|
||||
class="filter-item" style="width: 100px">
|
||||
<el-option v-for="item in form.countyList" :key="item.name" :label="item.name"
|
||||
:value="item.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="运营时间" prop="areaTime">
|
||||
<div style="display: flex;flex-wrap: wrap;">
|
||||
<el-select v-model="form.areaTime" placeholder="请选择运营时间" style="width: 100%;">
|
||||
<el-option v-for="item in dictList" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
<div class="tip">运营区外的时间用户无法解锁骑行</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-row v-if="form.areaTime == 2">
|
||||
<el-col :span="18">
|
||||
<el-form-item label="自定义运营时间" label-width="140px" data-tip="这是自定义运营时间选择框">
|
||||
<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>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="自定义客服" prop="customService" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.customService" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实名认证" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.authentication" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启后用户骑行前必须先进行实名认证才可使用</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否开启押金抵扣" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.isDepositDeduction" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">关闭:用户需对订单付费后方可退还押金,开启:押金可以直接抵扣订单金额付款</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="还车是否拍照审核" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.returnVerify" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启后则需用户拍摄视频后审核订单方可退还押金</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="短信通知服务" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.msgSwitch" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启短信通知,短信费用0.1元/条,从余额中扣除</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="强制停车点还车" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.parkingReturn" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启则必须在停车点才可还车,停车点存在误差</div>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.parkingReturn == false">
|
||||
<el-form-item label="运营区外还车" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.areaOutReturn" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启后可以在运营区范围外还车</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="form.parkingReturn == false">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="停车点外还车调度" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.parkingOutDispatch" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启后在停车点外还车会收取调度费</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区外还车调度" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.areaOutDispatch" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启后在运营区外还车会收取调度费</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="还车误差(米)" label-width="120" class="switch-item">
|
||||
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
|
||||
</el-form-item>
|
||||
<div class="tips">允许用户在规划的停车点外多少米还车</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="禁行区内断电" label-width="120" class="switch-item">
|
||||
<el-switch v-model="form.noRidingOutage" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
<div class="tips">开启后当进入禁行区内将进行断电</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区域外断电" label-width="120" class="switch-item">
|
||||
<div style="display: flex;flex-wrap: wrap;">
|
||||
<el-switch v-model="form.areaOutOutage" class="drawer-switch" />
|
||||
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<div class="tips">开启后当进入运营区域外内将进行断电</div>>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最大预约时间(分)" label-width="120" class="switch-item">
|
||||
<el-input-number style="width: 100%" v-model="form.timeoutMinutes"
|
||||
placeholder="车辆可最长预约多少分钟"></el-input-number>
|
||||
</el-form-item>
|
||||
<div class="tips">设置车辆的最大可以预约时间</div>>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收费方式" label-width="120" class="switch-item">
|
||||
<el-select v-model="form.ruleIds" multiple placeholder="请选择收费方式">
|
||||
<el-option v-for="item in ruleOptions" :key="item.ruleId" :label="item.name"
|
||||
:value="item.ruleId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="低于电量(%)不得骑行" label-width="120" class="switch-item">
|
||||
<el-input-number style="width: 100%" v-model="form.undercharge"
|
||||
placeholder="低于电量(%)不得骑行"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="骑行押金" label-width="120" class="switch-item">
|
||||
<el-input-number style="width: 100%" v-model="form.deposit"
|
||||
placeholder="骑行前需要充值的押金"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约服务费" label-width="120" class="switch-item">
|
||||
<el-input-number style="width: 100%" v-model="form.appointmentServiceFee"
|
||||
placeholder="预约时每十分钟的计费"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区外调度费" label-width="120" class="switch-item">
|
||||
<el-input-number style="width: 100%" v-model="form.dispatchFee"
|
||||
placeholder="车辆超出运行区外的调度费用"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="停车点外调度费" label-width="120" class="switch-item">
|
||||
<el-input-number style="width: 100%" v-model="form.vehicleManagementFee"
|
||||
placeholder="车辆在运营区内但没在停车区产生的调度费用"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="15">
|
||||
<el-form-item label="电量低于多少值自动生成换电订单" label-width="120" class="switch-item"
|
||||
prop="autoReplacementOrder">
|
||||
<el-input-number style="width: 50%" v-model="form.autoReplacementOrder"
|
||||
placeholder="电量低于多少值自动生成换电订单"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="right_box">
|
||||
<div class="right_tit">弹窗公告</div>
|
||||
<editor v-model="form.agreement" :min-height="192" />
|
||||
<div class="right_tit">电子围栏设置</div>
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr"
|
||||
:lon="form.longitude" :lat="form.latitude" @center="center" @mapList="mapList"
|
||||
/>
|
||||
<div class="right_tit">运营区经纬度</div>
|
||||
<el-row >
|
||||
<el-col :span="11">
|
||||
<el-input v-model="form.longitude" placeholder="请输入经度" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" style="margin-left: 20px;">
|
||||
<el-input v-model="form.latitude" placeholder="请输入纬度" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { listArea, getArea, delArea, addArea, updateArea, updateArea2 } from "@/api/system/area";
|
||||
import AreaMap from "@/components/AreaMap";
|
||||
import { listFee } from "@/api/system/fee";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { getDistrictList } from "@/api/common/common";
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
|
||||
|
||||
export default {
|
||||
components: { AreaMap, Treeselect },
|
||||
dicts: ['et_operating_area_status', 'et_operating_area_time', 'et_business_switch'],
|
||||
data() {
|
||||
return {
|
||||
dictList:null,
|
||||
loading: true,
|
||||
ids: [],
|
||||
single: true,
|
||||
multiple: true,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
dateRange: [],
|
||||
customService: false,
|
||||
ruleOptions: [],
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
countyList: [],
|
||||
CITY: [],
|
||||
XIAN: [],
|
||||
areaList: [],
|
||||
userName: null,
|
||||
deptOptions: undefined,
|
||||
title: "",
|
||||
open: false,
|
||||
mapopen: false,
|
||||
key: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaName: null,
|
||||
},
|
||||
form: {
|
||||
status: '1',
|
||||
province: '',
|
||||
city: '',
|
||||
county: '',
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
countyList: [],
|
||||
},
|
||||
rules: {
|
||||
areaName: [{ required: true, message: "运营区域不能为空", trigger: "blur" }],
|
||||
autoReplacementOrder: [{ required: true, message: "最低电量不能为空", trigger: "blur" }],
|
||||
deptId: [{ required: true, message: "运营商不能为空", trigger: "blur" }],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const areaId = this.$route.params && this.$route.params.areaId;
|
||||
this.getArea(areaId);
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getDeptTree();
|
||||
|
||||
this.dictList=this.dict.type.et_operating_area_time
|
||||
console.log(this.dictList,'dictdict');
|
||||
},
|
||||
methods: {
|
||||
getArea(areaId) {
|
||||
getArea(areaId).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.ruleIds = response.ruleIds;
|
||||
response.data.customService == "1" ? this.form.customService = true : this.form.customService = false;
|
||||
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;
|
||||
|
||||
this.title = "修改运营区";
|
||||
this.key++;
|
||||
listFee({ areaId: this.form.areaId }).then(response => {
|
||||
this.ruleOptions = response.rows;
|
||||
this.open = true;
|
||||
this.title = "修改运营区";
|
||||
this.key++;
|
||||
});
|
||||
this.getCityList();
|
||||
});
|
||||
},
|
||||
getCityList() {
|
||||
this.loading = false
|
||||
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
|
||||
for (let i = 0; i < newProvince.length; i++) { /* 省级*/
|
||||
for (let j = 0; j < newProvince[i].districts.length; j++) { /* 市级*/
|
||||
let city = newProvince[i].districts[j].name
|
||||
this.CITY.push({ id: j + 1, name: city, code: i + 1 })
|
||||
for (let k = 0; k < newProvince[i].districts[j].districts.length; k++) {/* 县级*/
|
||||
let xian = newProvince[i].districts[j].districts[k].name
|
||||
this.XIAN.push({ id: k + 1, name: xian, code: j + 1, cityCountyName: city })
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let m = 0; m < newProvince.length; m++) {
|
||||
newProvince[m] = { ...newProvince[m], ...{ code: m + 1 } }
|
||||
}
|
||||
// console.log("newProvince======"+JSON.stringify(newProvince))
|
||||
this.form.provinceList = newProvince
|
||||
// this.loading = true
|
||||
console.log(console.log(this.form.provinceList, ' this.form.provinceList'))
|
||||
})
|
||||
},
|
||||
center(data) {
|
||||
this.form.longitude = data.lng;
|
||||
this.form.latitude = data.lat;
|
||||
},
|
||||
mapList(data) {
|
||||
let mapListJson = JSON.stringify(data);
|
||||
console.log("mapListJson:" + mapListJson);
|
||||
this.form.boundaryStr = mapListJson;
|
||||
},
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-form-item__label {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .el-input .el-input__inner {
|
||||
height: 36px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content::after {
|
||||
content: attr(data-tip);
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.page {
|
||||
padding: 10px;
|
||||
|
||||
.tit {
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.pagecont {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.left_box {
|
||||
padding: 10px;
|
||||
width: 49%;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.right_box {
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10px;
|
||||
margin-left: 1%;
|
||||
width: 49%;
|
||||
|
||||
.right_tit {
|
||||
margin-bottom: 20px;
|
||||
font-size: 24px;
|
||||
color: #000;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
// background: yellow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.switch-item {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
|
||||
/* 垂直居中 */
|
||||
// justify-content: flex-start;
|
||||
.el-switch {
|
||||
margin-left: 10px;
|
||||
/* 根据需要调整间距 */
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -65,16 +65,16 @@
|
|||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="导览地图" align="center" :show-overflow-tooltip="true">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column label="收费方式" align="center" prop="ruleStr" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="联系人" align="center" prop="contact" />-->
|
||||
<!-- <el-table-column label="联系人电话" align="center" prop="phone" />-->
|
||||
<el-table-column label="收费方式" align="center" prop="ruleStr" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="联系人" align="center" prop="contact" />-->
|
||||
<!-- <el-table-column label="联系人电话" align="center" prop="phone" />-->
|
||||
<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"
|
||||
|
@ -90,6 +90,17 @@
|
|||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:area:edit']">修改</el-button>
|
||||
<!-- <el-table-column label="导览地图" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/system/areaSet/index/' + scope.row.areaId" class="link-type">
|
||||
<span>修改</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<router-link :to="'/system/areaSet/index/' + scope.row.areaId" class="link-type">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
v-hasPermi="['system:area:edit']">修改</el-button>
|
||||
</router-link>
|
||||
<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)"
|
||||
|
@ -104,21 +115,21 @@
|
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
|
||||
<el-form-item label="电子围栏" prop="boundaryStr">
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr" :lon="form.longitude" :lat="form.latitude"
|
||||
@center="center" @mapList="mapList" />
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr"
|
||||
:lon="form.longitude" :lat="form.latitude" @center="center" @mapList="mapList" />
|
||||
</el-form-item>
|
||||
<!-- <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>-->
|
||||
<!-- <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>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
||||
|
@ -126,7 +137,7 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改运营区对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1200px" :before-close="handleClose">
|
||||
<el-dialog :title="title" :visible.sync="open" width="1200px" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12" v-if="userName == 'admin'">
|
||||
|
@ -149,39 +160,39 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item label="运营区域">
|
||||
<el-select v-model="form.province" clearable size="small" placeholder="请选择省" class="filter-item"
|
||||
style="width: 90px" @change="provinceChange($event)">
|
||||
style="width: 90px" @change="provinceChange($event)">
|
||||
<el-option v-for="item in form.provinceList" :key="item.name" :label="item.name" :value="item.name" />
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="form.city" clearable size="small" placeholder="请选择城市" class="filter-item"
|
||||
style="width: 100px" @change="cityChange($event)">
|
||||
style="width: 100px" @change="cityChange($event)">
|
||||
<el-option v-for="item in form.cityList" :key="item.name" :label="item.name" :value="item.name" />
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="form.county" clearable size="small" placeholder="请选择区县" class="filter-item"
|
||||
style="width: 100px">
|
||||
style="width: 100px">
|
||||
<el-option v-for="item in form.countyList" :key="item.name" :label="item.name" :value="item.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <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>-->
|
||||
<!-- <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>-->
|
||||
</el-row>
|
||||
<!-- <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>-->
|
||||
<!-- <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>-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营时间" prop="areaTime">
|
||||
|
@ -217,7 +228,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="servicePhone1" >
|
||||
<el-form-item label="电话" prop="servicePhone1">
|
||||
<el-input v-model="form.servicePhone1" placeholder="请输入客服电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -229,7 +240,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="servicePhone2" >
|
||||
<el-form-item label="电话" prop="servicePhone2">
|
||||
<el-input v-model="form.servicePhone2" placeholder="请输入客服电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -241,7 +252,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="servicePhone3" >
|
||||
<el-form-item label="电话" prop="servicePhone3">
|
||||
<el-input v-model="form.servicePhone3" placeholder="请输入客服电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -250,7 +261,7 @@
|
|||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运营区域外断电" label-width="120">
|
||||
<el-switch v-model="form.areaOutOutage" class="drawer-switch" />
|
||||
<el-switch v-model="form.areaOutOutage" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -288,7 +299,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.parkingReturn==false" style="padding-left: 10px">
|
||||
<el-row v-if="form.parkingReturn == false" style="padding-left: 10px">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="停车点外还车调度" label-width="150">
|
||||
<el-switch v-model="form.parkingOutDispatch" class="drawer-switch" />
|
||||
|
@ -410,7 +421,7 @@ import { deptTreeSelect } from '@/api/system/user'
|
|||
export default {
|
||||
name: "Area",
|
||||
dicts: ['et_operating_area_status', 'et_operating_area_time', 'et_business_switch'],
|
||||
components: { AreaMap,Treeselect },
|
||||
components: { AreaMap, Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -474,7 +485,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
console.log("当前用户信息:", this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
|
@ -514,8 +525,8 @@ export default {
|
|||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
handleClose(){
|
||||
this.open=false
|
||||
handleClose() {
|
||||
this.open = false
|
||||
this.loading = false
|
||||
},
|
||||
handleStatusChange(row) {
|
||||
|
@ -624,7 +635,7 @@ export default {
|
|||
cityList: [],
|
||||
countyList: [],
|
||||
ruleIds: [],
|
||||
areaOutOutage: true ,
|
||||
areaOutOutage: true,
|
||||
parkingOutDispatch: true,
|
||||
areaOutDispatch: true,
|
||||
noRidingOutage: true,
|
||||
|
@ -689,10 +700,10 @@ export default {
|
|||
this.open = true;
|
||||
this.title = "修改运营区";
|
||||
this.key++;
|
||||
console.log('this.form.areaId=================',this.form.areaId)
|
||||
console.log('this.form.deptId=================',this.form.deptId)
|
||||
console.log('this.form.areaId=================', this.form.areaId)
|
||||
console.log('this.form.deptId=================', this.form.deptId)
|
||||
|
||||
listFee({areaId:this.form.areaId}).then(response => {
|
||||
listFee({ areaId: this.form.areaId }).then(response => {
|
||||
this.ruleOptions = response.rows;
|
||||
this.open = true;
|
||||
this.title = "修改运营区";
|
||||
|
@ -722,7 +733,7 @@ export default {
|
|||
|
||||
// 将 rest 对象中的属性赋值给 data
|
||||
let data = { ...rest };
|
||||
console.log("this.form=================",data)
|
||||
console.log("this.form=================", data)
|
||||
data.customService = data.customService ? "1" : "0";
|
||||
data.areaOutOutage = data.areaOutOutage ? "1" : "0";
|
||||
data.parkingOutDispatch = data.parkingOutDispatch ? "1" : "0";
|
||||
|
@ -734,7 +745,7 @@ export default {
|
|||
data.areaOutReturn = data.areaOutReturn ? "1" : "0";
|
||||
data.isDepositDeduction = data.isDepositDeduction ? "1" : "0";
|
||||
data.returnVerify = data.returnVerify ? "1" : "0";
|
||||
if(data.isDepositDeduction === '1' && data.returnVerify === '1'){
|
||||
if (data.isDepositDeduction === '1' && data.returnVerify === '1') {
|
||||
this.$modal.msgError("押金抵扣和拍照审核不能同时开启");
|
||||
return
|
||||
}
|
||||
|
@ -763,7 +774,7 @@ export default {
|
|||
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 => {
|
||||
updateArea2({ areaId: this.form.areaId, boundary: this.form.boundary, boundaryStr: this.form.boundaryStr }).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.mapopen = false
|
||||
|
@ -803,6 +814,7 @@ export default {
|
|||
.el-dialog:not(.is-fullscreen) {
|
||||
margin-top: 2vh !important;
|
||||
}
|
||||
|
||||
.el-upload--picture-card {
|
||||
width: 60px !important;
|
||||
height: 60px !important;
|
||||
|
|
Loading…
Reference in New Issue
Block a user