@@ -25,11 +28,11 @@
-
+
-
+
- 用户地图上显示的车辆图标样式
+ 用户地图上显示的车辆图标样式
@@ -54,15 +57,15 @@
-
-
-
+
+
-
- 运营区外的时间用户无法解锁骑行
-
+
+ 运营区外的时间用户无法解锁骑行
+
-
+
@@ -82,40 +85,22 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 添加
+ 删除
@@ -126,7 +111,7 @@
开启后用户骑行前必须先进行实名认证才可使用
-
+
@@ -147,9 +132,9 @@
开启短信通知,短信费用0.1元/条,从余额中扣除
-
+
-
+
@@ -164,7 +149,7 @@
开启后可以在运营区范围外还车
-
+
@@ -181,7 +166,23 @@
-
+
+
+
+ 设置车辆超出运营区外产生的调度费用
+
+
+
+
+
+ 设置车辆超出停车点外产生的调度费用
+
+
+
+
+
允许用户在规划的停车点外多少米还车
@@ -192,27 +193,27 @@
开启后当进入禁行区内将进行断电
-
+
-
-
+
+
-
+
- 开启后当进入运营区域外内将进行断电
>
+ 开启后当进入运营区域外内将进行断电
- 设置车辆的最大可以预约时间
>
+ 设置车辆的最大可以预约时间
@@ -223,12 +224,14 @@
:value="item.ruleId">
+ 选择在收费方式菜单当中设置好的收费套餐(可多选)
+ 当车辆电量低于多少时无法解锁用车
@@ -237,29 +240,18 @@
+ 设置骑行前需要缴纳的押金金额
+ 设置车辆预约时每十分钟产生的费用
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 设置车辆电量低于多少时自动生成的换电维护工单
@@ -277,10 +270,9 @@
电子围栏设置
-
运营区经纬度
-
+ :lon="form.longitude" :lat="form.latitude" @center="center" @mapList="mapList" />
+ 运营区经纬度
+
@@ -309,7 +301,7 @@ export default {
dicts: ['et_operating_area_status', 'et_operating_area_time', 'et_business_switch'],
data() {
return {
- dictList:null,
+ dictList: null,
loading: true,
ids: [],
single: true,
@@ -327,10 +319,13 @@ export default {
areaList: [],
userName: null,
deptOptions: undefined,
- title: "",
+ title: "新增运营区",
open: false,
mapopen: false,
key: 0,
+ customServices: [
+ { name: '', phone: '' }
+ ],
queryParams: {
pageNum: 1,
pageSize: 10,
@@ -354,14 +349,100 @@ export default {
},
created() {
const areaId = this.$route.params && this.$route.params.areaId;
- this.getArea(areaId);
+ if (areaId) {
+ this.getArea(areaId);
+ }
+ this.getCityList();
this.userName = this.$store.state.user.name;
this.getDeptTree();
-
- this.dictList=this.dict.type.et_operating_area_time
- console.log(this.dictList,'dictdict');
+
+ this.dictList = this.dict.type.et_operating_area_time
+ console.log(this.dictList, 'dictdict');
},
methods: {
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ const { cityList, countyList, provinceList, ...rest } = this.form;
+
+ // 将 rest 对象中的属性赋值给 data
+ let data = { ...rest };
+ console.log("this.form=================", data)
+ 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";
+ if (data.isDepositDeduction === '1' && data.returnVerify === '1') {
+ this.$modal.msgError("押金抵扣和拍照审核不能同时开启");
+ return
+ }
+ this.customServices.forEach((service, index) => {
+ data[`serviceName${index + 1}`] = service.name;
+ data[`servicePhone${index + 1}`] = service.phone;
+ });
+ if (this.form.areaId != null) {
+ updateArea2({ areaId: this.form.areaId, boundary: this.form.boundary, boundaryStr: this.form.boundaryStr }).then(response => {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.mapopen = false
+ this.getList();
+ });
+ } else {
+ addArea(data).then(response => {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+
+ this.getList();
+ });
+ }
+ // console.log(data, 'data without cityList, countyList, provinceList');
+ // console.log(this.form,'formformformformform');
+ if (this.form.areaId != null) {
+ updateArea(data).then(response => {
+
+ this.$modal.msgSuccess("修改成功");
+ 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) {
+
+ }
+ });
+ },
+ addService() {
+ if (this.customServices.length < 3) {
+ this.customServices.push({ name: '', phone: '' });
+ }
+ },
+ removeService(index) {
+
+ if (index > 0 && this.customServices.length > 1) {
+ this.$delete(this.customServices, index);
+ this.$set(this.form, `serviceName${index + 1}`, '');
+ this.$set(this.form, `servicePhone${index + 1}`, '');
+ }
+ },
getArea(areaId) {
getArea(areaId).then(response => {
this.form = response.data;
@@ -378,19 +459,71 @@ export default {
response.data.isDepositDeduction == "1" ? this.form.isDepositDeduction = true : this.form.isDepositDeduction = false;
response.data.returnVerify == "1" ? this.form.returnVerify = true : this.form.returnVerify = false;
+ // 初始化 customServices 数组
+ this.customServices = [];
+ for (let i = 1; i <= 3; i++) {
+ if (response.data[`serviceName${i}`] || response.data[`servicePhone${i}`]) {
+ this.customServices.push({
+ name: response.data[`serviceName${i}`] || '',
+ phone: response.data[`servicePhone${i}`] || ''
+ });
+ }
+ }
+
+ // 如果 customServices 为空,添加一个默认的服务
+ if (this.customServices.length === 0) {
+ this.customServices.push({ name: '', phone: '' });
+ }
+
this.title = "修改运营区";
this.key++;
- listFee({ areaId: this.form.areaId }).then(response => {
- this.ruleOptions = response.rows;
- this.open = true;
- this.title = "修改运营区";
- this.key++;
- });
- this.getCityList();
+
+
});
},
+ cityChange(that) {
+ let countyCode = 0
+ let cityname = ''
+ let newCountyArry = []
+ this.form.cityList.forEach((item, index) => {
+ if (item.name == that) {
+ countyCode = item.id
+ cityname = item.name
+ }
+ })
+ if (countyCode) {
+ this.form.countyList = []
+ this.XIAN.forEach((item, index) => {
+ if (item.code == countyCode && item.cityCountyName == cityname) {
+ this.form.countyList.push(item)
+ }
+ })
+ }
+ },
+ provinceChange(that) {
+ // 根据选中省,匹配市
+ let cityCode = 0
+ let newCityArry = []
+ this.form.provinceList.forEach((item, index) => {
+ if (item.name == that) {
+ cityCode = item.code
+ }
+ })
+ // console.log(cityCode)
+ if (cityCode) {
+ this.form.cityList = []
+ this.CITY.forEach((item, index) => {
+ if (item.code == cityCode) {
+ this.form.cityList.push(item)
+ }
+ }) /* 市匹配成功*/
+ }
+ },
getCityList() {
- this.loading = false
+ listFee({ areaId: this.form.areaId }).then(response => {
+ this.ruleOptions = response.rows;
+
+ });
getDistrictList().then(res => {
this.form.provinceList = JSON.parse(res.data)
// console.log("provinceList======"+JSON.stringify(this.form.provinceList))
@@ -455,6 +588,26 @@ export default {
align-items: center;
}
+::v-deep .el-input-number {
+ display: flex;
+ align-items: center;
+ height: 36px; // 这里设置为和其他输入框一致的高度
+}
+
+::v-deep .el-input-number__input {
+ height: 36px !important;
+ display: flex;
+ align-items: center;
+}
+
+::v-deep .el-input-number__increase,
+::v-deep .el-input-number__decrease {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 36px !important;
+}
+
.tip {
font-size: 14px;
color: #888;
diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue
index 2ff9d18..e0f1bfe 100644
--- a/src/views/system/area/index.vue
+++ b/src/views/system/area/index.vue
@@ -12,8 +12,12 @@
-
+ 新增
+
+
- 修改
+