运营区域新增表单优化,查询列表优化
This commit is contained in:
parent
b81eb55cb5
commit
9457424863
@ -117,6 +117,12 @@
|
|||||||
color="#87d068"
|
color="#87d068"
|
||||||
>正常</a-tag>
|
>正常</a-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.key === 'simpleName'">
|
||||||
|
<span>{{record.simpleName}}</span><a
|
||||||
|
style="margin-left: 5px;"
|
||||||
|
@click="openEditSimpleName(record)"
|
||||||
|
>编辑</a>
|
||||||
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a>详情</a>
|
<a>详情</a>
|
||||||
@ -209,6 +215,27 @@
|
|||||||
:onCallBack="onORMapCallBack"
|
:onCallBack="onORMapCallBack"
|
||||||
:openTitle="openORMapTitle"
|
:openTitle="openORMapTitle"
|
||||||
></operateRegionMap>
|
></operateRegionMap>
|
||||||
|
<!-- 编辑区域简称 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:open="openSimpleName"
|
||||||
|
title="编辑区域简称"
|
||||||
|
@ok="handleOkEditSimpleName"
|
||||||
|
width="500px"
|
||||||
|
:maskClosable="false"
|
||||||
|
>
|
||||||
|
<a-form
|
||||||
|
:label-col="{ xl: 7, lg: 5, md: 7, sm: 4 }"
|
||||||
|
:wrapper-col="{ xl: 17, lg: 19, md: 17, sm: 20 }"
|
||||||
|
>
|
||||||
|
<a-form-item label="区域简称">
|
||||||
|
<a-input
|
||||||
|
v-model:value.trim="editRecord.simpleName"
|
||||||
|
placeholder="请输入区域简称"
|
||||||
|
allow-clear
|
||||||
|
></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -225,6 +252,7 @@ import {
|
|||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { getGUID } from '@/utils/tools'
|
import { getGUID } from '@/utils/tools'
|
||||||
|
import _ from 'lodash'
|
||||||
|
|
||||||
// 表格行数据
|
// 表格行数据
|
||||||
const dataSource = ref([])
|
const dataSource = ref([])
|
||||||
@ -233,9 +261,11 @@ const formModel = ref(null);
|
|||||||
const formModelConfig = ref(null);
|
const formModelConfig = ref(null);
|
||||||
const openTitle = ref('');
|
const openTitle = ref('');
|
||||||
const openTitleConfig = ref('');
|
const openTitleConfig = ref('');
|
||||||
|
const editRecord = ref({});
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
const openConfig = ref(false);
|
const openConfig = ref(false);
|
||||||
|
const openSimpleName = ref(false);
|
||||||
const editORMapModel = ref(null);
|
const editORMapModel = ref(null);
|
||||||
const openORMapTitle = ref('地图');
|
const openORMapTitle = ref('地图');
|
||||||
const modalFreeKey = ref(getGUID())
|
const modalFreeKey = ref(getGUID())
|
||||||
@ -408,6 +438,24 @@ const search = () => {
|
|||||||
getData()
|
getData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openEditSimpleName = (record) => {
|
||||||
|
openSimpleName.value = true;
|
||||||
|
editRecord.value = _.cloneDeep(record)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleOkEditSimpleName = () => {
|
||||||
|
callOperate("/ebikeRegion/updateOperation", editRecord.value).then((res) => {
|
||||||
|
if (res.code != 200) {
|
||||||
|
message.error(res.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (res.code == 200) {
|
||||||
|
openSimpleName.value = false;
|
||||||
|
getData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑费用配置
|
* 编辑费用配置
|
||||||
* @param record
|
* @param record
|
||||||
|
|||||||
@ -17,8 +17,16 @@
|
|||||||
name="zoneId"
|
name="zoneId"
|
||||||
:rules="[{ required: true, message: '请选择行政区划' }]"
|
:rules="[{ required: true, message: '请选择行政区划' }]"
|
||||||
>
|
>
|
||||||
<a-select v-model:value="form.zoneId" placeholder="请选择行政区划" style="width: 85%;">
|
<a-select
|
||||||
<a-select-option v-for="(item) in zoneList" :key="item.id" :value="item.zoneId">{{ item.zoneName }}</a-select-option>
|
v-model:value="form.zoneId"
|
||||||
|
placeholder="请选择行政区划"
|
||||||
|
style="width: 85%;"
|
||||||
|
>
|
||||||
|
<a-select-option
|
||||||
|
v-for="(item) in zoneList"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.zoneId"
|
||||||
|
>{{ item.zoneName }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
<!-- <a-input
|
<!-- <a-input
|
||||||
style="display: none;"
|
style="display: none;"
|
||||||
@ -40,43 +48,49 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
label="区域名称"
|
label="区域名称"
|
||||||
required
|
required
|
||||||
name="regionName"
|
name="operationRegionName"
|
||||||
:rules="[{ required: true, message: '请输入区域名称' }]"
|
:rules="[{ required: true, message: '请输入区域名称' }]"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-input
|
||||||
style="width: 85%;"
|
style="width: 85%;"
|
||||||
v-model:value="form.regionName"
|
v-model:value="form.operationRegionName"
|
||||||
placeholder="请输入区域名称"
|
placeholder="请输入区域名称"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
</a-row>
|
</a-row>
|
||||||
<!-- <a-row :gutter="8">
|
<a-row :gutter="8">
|
||||||
<a-col :xs="24">
|
<a-col :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="区域代码"
|
label="区域级别"
|
||||||
required
|
required
|
||||||
name="regionCode"
|
name="operationLevel"
|
||||||
:rules="[{ required: true, message: '请输入区域代码' }]"
|
:rules="[{ required: true, message: '请选择区域级别' }]"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-select
|
||||||
|
v-model:value="form.operationLevel"
|
||||||
|
placeholder="请选择区域级别"
|
||||||
style="width: 85%;"
|
style="width: 85%;"
|
||||||
v-model:value="form.regionCode"
|
>
|
||||||
placeholder="请输入区域代码"
|
<a-select-option
|
||||||
/>
|
v-for="(item) in operationLevelList"
|
||||||
|
:key="item.levelId"
|
||||||
|
:value="item.levelValue"
|
||||||
|
>{{ item.levelName }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row> -->
|
</a-row>
|
||||||
<a-row :gutter="8">
|
<a-row :gutter="8">
|
||||||
<a-col :xs="24">
|
<a-col :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="区域简称"
|
label="区域简称"
|
||||||
name="regionForShort"
|
name="simpleName"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-input
|
||||||
style="width: 85%;"
|
style="width: 85%;"
|
||||||
v-model:value="form.regionForShort"
|
v-model:value="form.simpleName"
|
||||||
placeholder="请输入区域简称"
|
placeholder="请输入区域简称"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -131,12 +145,12 @@ const editORMapModel = ref(null);
|
|||||||
const openORMapTitle = ref("");
|
const openORMapTitle = ref("");
|
||||||
|
|
||||||
const zoneOptions = ref([])
|
const zoneOptions = ref([])
|
||||||
|
|
||||||
const zoneList = ref([])
|
const zoneList = ref([])
|
||||||
|
const operationLevelList = ref([])
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
regionId: "",
|
operationRegionId: "",
|
||||||
regionName: "",
|
operationRegionName: "",
|
||||||
simpleName: "",
|
simpleName: "",
|
||||||
zoneId: undefined,
|
zoneId: undefined,
|
||||||
points: [],
|
points: [],
|
||||||
@ -156,6 +170,15 @@ onMounted(() => {
|
|||||||
zoneList.value = res.data
|
zoneList.value = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
callOperate("/ebikeRegion/operationLevelList", {}, "get").then((res) => {
|
||||||
|
if (res.code != 200) {
|
||||||
|
message.error(res.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (res.data) {
|
||||||
|
operationLevelList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// callOperate("/ebikeOperateSystem/ebikeAdministrationZone", {}, "get").then(res => {
|
// callOperate("/ebikeOperateSystem/ebikeAdministrationZone", {}, "get").then(res => {
|
||||||
// if (res.code == 200) {
|
// if (res.code == 200) {
|
||||||
|
|||||||
@ -86,7 +86,6 @@
|
|||||||
:rules="[{ required: true, message: '请添加运营时间' }]"
|
:rules="[{ required: true, message: '请添加运营时间' }]"
|
||||||
>
|
>
|
||||||
<TimeRangePicker
|
<TimeRangePicker
|
||||||
valueFormat="HH:mm:ss"
|
|
||||||
v-model:value="form.operateTimeBytime"
|
v-model:value="form.operateTimeBytime"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -137,7 +136,6 @@
|
|||||||
<div id="timePicker"></div>
|
<div id="timePicker"></div>
|
||||||
<template v-if=" column.type == 'time'">
|
<template v-if=" column.type == 'time'">
|
||||||
<TimeRangePicker
|
<TimeRangePicker
|
||||||
valueFormat="HH:mm:ss"
|
|
||||||
v-model:value="record[column.dataIndex]"
|
v-model:value="record[column.dataIndex]"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user