修改配置文件及站点管理
This commit is contained in:
parent
ab509c6bcb
commit
a3ce9df86e
@ -1,5 +1,6 @@
|
||||
const config = {
|
||||
apiUrl: "http://192.168.2.156:10010/",
|
||||
//apiUrl: "http://192.168.2.156:10010/",
|
||||
apiUrl: "https://attiya.fun/ebike/",
|
||||
cdnPath: "/",
|
||||
ERR_OK: 200,
|
||||
sm2PublicKey: "04f5084ee12767d932f293508e30e3b0100185042ec0f061dedaf92b793b93f79fd6179d5e47e25b7aec98e00cf90dd56df1f8191012537187e7bbfd2d1de299fc", //f8209a2ebe6691e41e1f2b667bfe71f0b511716cc0f7c4452502fc12ec3957e4
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
</a-button> -->
|
||||
<!-- 登录 -->
|
||||
<div class="topAvatar">
|
||||
<template v-if="userdfrname != ''">
|
||||
<template v-if="userdfrname != '' && username != 'admin'">
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link" @click.prevent>
|
||||
当前区域:{{ userdfrname }} <DownOutlined />
|
||||
|
||||
@ -13,48 +13,55 @@
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
>
|
||||
<a-form-item label="区域名称">
|
||||
<a-input
|
||||
v-model:value.trim="queryform.regionName"
|
||||
placeholder="请输入区域名称"
|
||||
allow-clear
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:xl="6"
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
>
|
||||
<a-form-item label="区域简称">
|
||||
<a-input
|
||||
v-model:value.trim="queryform.simpleName"
|
||||
placeholder="请输入区域简称"
|
||||
allow-clear
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:xl="6"
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
>
|
||||
<a-form-item label="运营状态">
|
||||
<a-form-item label="站点类型">
|
||||
<a-select
|
||||
v-model:value="queryform.inOperation"
|
||||
placeholder="请选择运营状态"
|
||||
v-model:value="queryform.type"
|
||||
placeholder="请选择站点类型"
|
||||
allow-clear
|
||||
>
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="1">正常</a-select-option>
|
||||
<a-select-option value="0">停运</a-select-option>
|
||||
<a-select-option value="2">停车站点</a-select-option>
|
||||
<a-select-option value="5">禁停区</a-select-option>
|
||||
<a-select-option value="6">禁行区</a-select-option>
|
||||
<a-select-option value="7">扣车区</a-select-option>
|
||||
<a-select-option value="8">接客站点</a-select-option>
|
||||
<a-select-option value="3">仓管区</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:xl="6"
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
>
|
||||
<a-form-item label="站点级别">
|
||||
<a-select
|
||||
v-model:value="queryform.level"
|
||||
placeholder="请选择站点级别"
|
||||
allow-clear
|
||||
>
|
||||
<a-select-option value="1">1级</a-select-option>
|
||||
<a-select-option value="2">2级</a-select-option>
|
||||
<a-select-option value="3">3级</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:xl="6"
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
>
|
||||
<a-form-item label="站点名称">
|
||||
<a-input
|
||||
v-model:value.trim="queryform.name"
|
||||
placeholder="请输入站点名称"
|
||||
allow-clear
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:xl="6"
|
||||
:lg="12"
|
||||
@ -107,98 +114,18 @@
|
||||
</template>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'inOperation'">
|
||||
<a-tag
|
||||
v-if="record.inOperation == '0'"
|
||||
color="#f50"
|
||||
>停运</a-tag>
|
||||
<a-tag
|
||||
v-if="record.inOperation == '1'"
|
||||
color="#87d068"
|
||||
>正常</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a>详情</a>
|
||||
<a-divider type="vertical" />
|
||||
<a>地图</a>
|
||||
<a>编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown>
|
||||
<a
|
||||
class="ant-dropdown-link"
|
||||
@click="e => e.preventDefault()"
|
||||
>编辑
|
||||
<DownOutlined />
|
||||
</a>
|
||||
<template v-slot:overlay>
|
||||
<a-menu>
|
||||
<a-menu-item>
|
||||
<a @click="feeConfigInfo(record)">费用信息</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="regionConfigInfo(record)">运营配置</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="handleOtherAction(record)">运维配置</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="handleEdit(record)">调度配置</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="handleSettings(record)">换电配置</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="handleEditORMap(record)">修改地图</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown>
|
||||
<a
|
||||
class="ant-dropdown-link"
|
||||
@click="e => e.preventDefault()"
|
||||
>账号
|
||||
<DownOutlined />
|
||||
</a>
|
||||
<template v-slot:overlay>
|
||||
<a-menu>
|
||||
<a-menu-item>
|
||||
<a @click="addAccount(record)">新增账号</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="accountList(record)">账号列表</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<a>申请删除</a>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<!-- 费用配置 -->
|
||||
<a-modal
|
||||
v-model:open="open"
|
||||
:title="openTitle"
|
||||
@ok="handleOkFeeModal"
|
||||
width="1000px"
|
||||
:maskClosable="false"
|
||||
:okButtonProps="{ disabled: isOkButtonDisabled }"
|
||||
>
|
||||
<RegionFeeCofFrom ref="formModel"></RegionFeeCofFrom>
|
||||
</a-modal>
|
||||
<!-- 运营配置 -->
|
||||
<a-modal
|
||||
v-model:open="openConfig"
|
||||
:title="openTitleConfig"
|
||||
@ok="handleOkConfgModal"
|
||||
width="1000px"
|
||||
:maskClosable="false"
|
||||
:okButtonProps="{ disabled: isOkButtonDisabled }"
|
||||
>
|
||||
<OperateConfForm ref="formModelConfig"></OperateConfForm>
|
||||
</a-modal>
|
||||
<!-- 地图 -->
|
||||
<operateRegionMap
|
||||
ref="editORMapModel"
|
||||
@ -213,8 +140,6 @@ import { ref, onMounted, reactive, nextTick } from 'vue'
|
||||
import { callOperate } from '@/apis/call.js'
|
||||
import { message } from 'ant-design-vue'
|
||||
import config from '@/utils/config.js'
|
||||
import RegionFeeCofFrom from '@/views/form/operateregion/RegionFeeCofFrom.vue'
|
||||
import OperateConfForm from '@/views/form/operateregion/OperateConfForm.vue'
|
||||
import operateRegionMap from '../OperateRegionMap/index.vue'
|
||||
import {
|
||||
SettingOutlined
|
||||
@ -224,21 +149,14 @@ import { useRouter, useRoute } from 'vue-router'
|
||||
// 表格行数据
|
||||
const dataSource = ref([])
|
||||
const data = ref([])
|
||||
const formModel = ref(null);
|
||||
const formModelConfig = ref(null);
|
||||
const openTitle = ref('');
|
||||
const openTitleConfig = ref('');
|
||||
const router = useRouter()
|
||||
const open = ref(false);
|
||||
const openConfig = ref(false);
|
||||
const isOkButtonDisabled = ref(false);
|
||||
const editORMapModel = ref(null);
|
||||
const openORMapTitle = ref('地图');
|
||||
// 查询相关
|
||||
const queryform = ref({
|
||||
regionName: '',
|
||||
simpleName: '',
|
||||
inOperation: '',
|
||||
type: '',
|
||||
level: '',
|
||||
name: '',
|
||||
pageParam: {
|
||||
pageNum: config.pageParam.pageNum,
|
||||
pageSize: config.pageParam.pageSize
|
||||
@ -265,15 +183,15 @@ const columns = ref([
|
||||
dataIndex: 'index'
|
||||
},
|
||||
{
|
||||
key: 'zoneName',
|
||||
title: '所属行政区',
|
||||
key: 'typeName',
|
||||
title: '站点类型',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
dataIndex: 'zoneName'
|
||||
dataIndex: 'typeName'
|
||||
},
|
||||
{
|
||||
key: 'regionName',
|
||||
title: '区域名称',
|
||||
title: '运营区域',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
dataIndex: 'regionName'
|
||||
@ -401,66 +319,6 @@ const search = () => {
|
||||
getData()
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑费用配置
|
||||
* @param record
|
||||
*/
|
||||
const feeConfigInfo = (record) => {
|
||||
openTitle.value = "费用信息 - " + record['regionName']
|
||||
open.value = true
|
||||
nextTick(() => {
|
||||
if (formModel.value) {
|
||||
formModel.value.openForm({ regionId: record['regionId'] });
|
||||
} else {
|
||||
console.log('formModel is not ready yet');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 费用配置modal确定
|
||||
*/
|
||||
const handleOkFeeModal = () => {
|
||||
// isOkButtonDisabled.value = true;
|
||||
formModel.value.formSave((data => {
|
||||
console.log(data)
|
||||
// isOkButtonDisabled.value = false;
|
||||
open.value = false;
|
||||
if (data['code'] == 200) {
|
||||
getData()
|
||||
} else {
|
||||
message.error(data.message)
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑运营配置
|
||||
* @param record
|
||||
*/
|
||||
const regionConfigInfo = (record) => {
|
||||
openTitleConfig.value = "运营配置 - " + record['regionName']
|
||||
openConfig.value = true
|
||||
nextTick(() => {
|
||||
if (formModelConfig) {
|
||||
formModelConfig.value.openForm({ regionId: record['regionId'] });
|
||||
} else {
|
||||
console.log('formModel is not ready yet');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 运营配置modal确定
|
||||
*/
|
||||
const handleOkConfgModal = () => {
|
||||
isOkButtonDisabled.value = true;
|
||||
formModelConfig.value.formSave((data => {
|
||||
isOkButtonDisabled.value = false;
|
||||
openConfig.value = false;
|
||||
}));
|
||||
}
|
||||
|
||||
const handleEditORMap = (record) => {
|
||||
openORMapTitle.value = '绘制地图(' + record['regionName'] + ')';
|
||||
const data = {
|
||||
|
||||
@ -5,6 +5,8 @@ import vue from '@vitejs/plugin-vue'
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
||||
|
||||
let targetUrl = 'http://192.168.2.156:10010/'
|
||||
targetUrl = 'https://attiya.fun/ebike/'
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
@ -29,7 +31,7 @@ export default defineConfig({
|
||||
proxy: {
|
||||
'^/operate/*': {
|
||||
changeOrigin: true,
|
||||
target: 'http://192.168.2.156:10010/',
|
||||
target: targetUrl,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/^\/operate/, 'operate')
|
||||
}
|
||||
@ -43,7 +45,7 @@ export default defineConfig({
|
||||
},
|
||||
'^/maintenance/*': {
|
||||
changeOrigin: true,
|
||||
target: 'http://192.168.2.156:10010/',
|
||||
target: targetUrl,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/^\/maintenance/, 'maintenance')
|
||||
}
|
||||
@ -57,7 +59,7 @@ export default defineConfig({
|
||||
},
|
||||
'^/user/*': {
|
||||
changeOrigin: true,
|
||||
target: 'http://192.168.2.156:10010/',
|
||||
target: targetUrl,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/^\/user/, 'user')
|
||||
}
|
||||
@ -71,7 +73,7 @@ export default defineConfig({
|
||||
},
|
||||
'^/order/*': {
|
||||
changeOrigin: true,
|
||||
target: 'http://192.168.2.156:10010/',
|
||||
target: targetUrl,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/^\/order/, 'order')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user