Commit a0ebe2e4 by weix

车辆、司机功能

parent e5e305bd
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
} }
</script> </script>
<style> <style lang="scss">
*::-webkit-scrollbar-track { /*滚动条里面轨道*/ *::-webkit-scrollbar-track { /*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 0; border-radius: 0;
...@@ -117,4 +117,25 @@ export default { ...@@ -117,4 +117,25 @@ export default {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
} }
.title-left {
font-size: 18px;
padding-left: 10px;
font-weight: 800;
}
.title-left::before {
content: '';
position: absolute;
left: 0;
top: 10%;
width: 5px;
height: 80%;
background-color: #0099ff;
}
.form-n-bottom {
.el-form-item {
margin-bottom: 0;
}
}
</style> </style>
...@@ -311,17 +311,17 @@ const dataSource = { ...@@ -311,17 +311,17 @@ const dataSource = {
], ],
'feeType': [ 'feeType': [
{ {
'id':'1', 'id': '1',
'name': '业务账单', 'name': '业务账单',
'isShow': true 'isShow': true
}, },
{ {
'id':'2', 'id': '2',
'name': '成本账单', 'name': '成本账单',
'isShow': true 'isShow': true
}, },
{ {
'id':'3', 'id': '3',
'name': '费用账单', 'name': '费用账单',
'isShow': true 'isShow': true
} }
...@@ -471,6 +471,52 @@ const dataSource = { ...@@ -471,6 +471,52 @@ const dataSource = {
'id': '9', 'id': '9',
'name': '同程接口调用' 'name': '同程接口调用'
}, },
],
auditStatusList: [
{
'id': 1,
'name': '加盟'
},
{
'id': 2,
'name': '自营'
}
],
runStatus: [
{
'id': 1,
'name': '停运'
},
{
'id': 2,
'name': '上线'
},
{
'id': 3,
'name': '待审核'
},
{
'id': 4,
'name': '驳回'
},
],
serviceStatusList: [
{
'id': 1,
'name': '休息中'
},
{
'id': 2,
'name': '听单中'
},
{
'id': 3,
'name': '服务中'
},
],
driverTypeList: [
{id: 1, name: '专职司机'},
{id: 2, name: '兼职司机'}
] ]
} }
......
...@@ -19,6 +19,9 @@ const STRATEGIES = { ...@@ -19,6 +19,9 @@ const STRATEGIES = {
} }
return true return true
}, },
isEmailNew: function (value) {
return !/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value);
},
minLength: function (value, length, errorMsg) { minLength: function (value, length, errorMsg) {
if(!value){ if(!value){
return false return false
......
...@@ -633,6 +633,38 @@ export default { ...@@ -633,6 +633,38 @@ export default {
return '联盟' return '联盟'
default: default:
} }
},
/**
* 服务状态
* **/
serverStatusText(val) {
let type = Number(val)
switch (type) {
case 3:
return '服务中'
case 2:
return '听单中'
case 1:
return '休息中'
default:
return '/'
} }
},
runStatusText(val) {
let type = Number(val)
switch (type) {
case 4:
return '驳回'
case 3:
return '待审核'
case 2:
return '上线'
case 1:
return '停运'
default:
return '/'
}
},
} }
} }
import {get, post, put, deletes} from '@/request/http' import {get, post, put, deletes} from '@/request/http'
// 查询品牌配置管理
export function platformList(data) { export function platformList(data) {
const url = process.env.VUE_APP_BASE_API15+'/platform/config/query'; const url = process.env.VUE_APP_BASE_API15+'/platform/config/query';
return post(url, data) return post(url, data)
} }
// 查询所有品牌
export function platformInfosList(data) { export function platformInfosList(data) {
const url = process.env.VUE_APP_BASE_API15+'/platform/infos'; const url = process.env.VUE_APP_BASE_API15+'/platform/infos';
return get(url, data) return get(url, data)
} }
// 查询业务类型,渠道配置项
export function platformConfig(data) {
const url = process.env.VUE_APP_BASE_API15+'/platform/config/selections';
return get(url, data)
}
// 查询业务类型,渠道配置项
export function getPlatformInfo(data, platformId) {
const url = process.env.VUE_APP_BASE_API15+`/platform/config/${platformId}`;
return get(url, data)
}
// 新增平台配置
export function addPlatformInfo(data) {
const url = process.env.VUE_APP_BASE_API15+`/platform/config/insert`;
return post(url, data)
}
// 新增平台配置
export function updatePlatformInfo(data) {
const url = process.env.VUE_APP_BASE_API15+`/platform/config/update`;
return post(url, data)
}
...@@ -1126,7 +1126,7 @@ export function getComplaintById(id) { ...@@ -1126,7 +1126,7 @@ export function getComplaintById(id) {
return get(url) return get(url)
} }
/* 客诉管理---查询客诉 */ /* 车辆管理---品牌查询 */
export function getplatformList() { export function getplatformList() {
const url = targetBaseUrl5 + `/platform/infos` const url = targetBaseUrl5 + `/platform/infos`
return get(url) return get(url)
......
...@@ -122,19 +122,19 @@ export const routes = [ ...@@ -122,19 +122,19 @@ export const routes = [
meta: {title: '围栏管理', icon: 'el-icon-aim'} meta: {title: '围栏管理', icon: 'el-icon-aim'}
}, },
{ {
path: 'CarModel',
name: 'CarModel',
component: () =>
import ('@/views/configure/CarModel.vue'),
meta: {title: '车型管理', icon: 'el-icon-s-data'}
},
{
path: 'site', path: 'site',
name: 'Site', name: 'Site',
component: () => component: () =>
import ('@/views/configure/site.vue'), import ('@/views/configure/site.vue'),
meta: {title: '站点管理', icon: 'el-icon-s-home'} meta: {title: '站点管理', icon: 'el-icon-s-home'}
}, },
{
path: 'CarModel',
name: 'CarModel',
component: () =>
import ('@/views/configure/CarModel.vue'),
meta: {title: '车型管理', icon: 'el-icon-s-data'}
},
] ]
}, },
{ {
...@@ -154,6 +154,71 @@ export const routes = [ ...@@ -154,6 +154,71 @@ export const routes = [
import ('@/views/platform/setting.vue'), import ('@/views/platform/setting.vue'),
meta: {title: '品牌配置', icon: 'el-icon-aim'} meta: {title: '品牌配置', icon: 'el-icon-aim'}
}, },
{
path: 'setting-info',
name: 'settingInfo',
component: () =>
import ('@/views/platform/components/settingInfo.vue'),
meta: {title: '添加品牌', icon: 'el-icon-aim'},
hidden: true
},
{
path: 'setting-detail',
name: 'settingDetail',
component: () =>
import ('@/views/platform/settingDetail.vue'),
meta: {title: '品牌详情', icon: 'el-icon-aim'},
hidden: true
}
]
},
{
path: '/transports',
name: 'transports',
component: Layout,
redirect: '/transports',
meta: {
icon: 'el-icon-setting',
title: '运力管理'
},
children: [
{
path: 'transport',
name: 'Transport',
component: () =>
import ('@/views/transports/transport.vue'),
meta: {title: '运力方管理', icon: 'el-icon-s-home'}
},
{
path: 'car',
name: 'Car',
component: () =>
import ('@/views/transports/car.vue'),
meta: {title: '车辆管理', icon: 'el-icon-s-home'}
},
{
path: 'car-detail',
name: 'carDetail',
component: () =>
import ('@/views/transports/carDetail.vue'),
meta: {title: '车辆详情', icon: 'el-icon-s-home'},
hidden: true
},
{
path: 'driver',
name: 'Driver',
component: () =>
import ('@/views/transports/driver.vue'),
meta: {title: '司机管理', icon: 'el-icon-s-home'}
},
{
path: 'driver-detail',
name: 'driverDetail',
component: () =>
import ('@/views/transports/driverDetail.vue'),
meta: {title: '司机管理', icon: 'el-icon-s-home'},
hidden: true
},
] ]
} }
] ]
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="站点所属区域:" prop="penCity"> <el-form-item label="站点所属区域:" prop="penCity">
<el-cascader v-model="form.penCity" :show-all-levels="false" :props="props"></el-cascader> <el-cascader v-if="dialogVisible" v-model="form.penCity" :show-all-levels="false" :props="props"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="关联电子围栏:" prop="polygonInfo"> <el-form-item label="关联电子围栏:" prop="polygonInfo">
<el-select v-model="form.polygonInfo"> <el-select v-model="form.polygonInfo">
...@@ -49,12 +49,12 @@ ...@@ -49,12 +49,12 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="纬度"> <el-table-column align="center" label="纬度">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="mini" v-model="scope.row.pointLat"></el-input> <el-input oninput="value=value.replace(/[^\d.]/g,'')" size="mini" v-model="scope.row.pointLat"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="经度"> <el-table-column align="center" label="经度">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="mini" v-model="scope.row.pointLng"></el-input> <el-input oninput="value=value.replace(/[^\d.]/g,'')" size="mini" v-model="scope.row.pointLng"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="55"> <el-table-column align="center" label="操作" width="55">
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
saveLoading: false, saveLoading: false,
props: { props: {
lazy: true, lazy: true,
lazyLoad(node, resolve) { async lazyLoad(node, resolve) {
const {level} = node const {level} = node
console.log(node) console.log(node)
let parent let parent
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
} else { } else {
parent = node.value parent = node.value
} }
getAllprovinceAndCity(JSON.parse(parent).id).then(res => { await getAllprovinceAndCity(JSON.parse(parent).id).then(res => {
if (res.status == 200) { if (res.status == 200) {
let list = res.data let list = res.data
const nodes = list.map(item => { const nodes = list.map(item => {
...@@ -251,6 +251,13 @@ export default { ...@@ -251,6 +251,13 @@ export default {
}) })
}, },
clearInfo() { clearInfo() {
this.form = {
siteName: '',
siteType: '',
penCity: [],
polygonInfo: '',
stationList: [{pointLat: "", pointLng: "", pointsName: ""}]
};
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.dialogVisible = false; this.dialogVisible = false;
this.$emit('backInitTable'); this.$emit('backInitTable');
...@@ -262,17 +269,25 @@ export default { ...@@ -262,17 +269,25 @@ export default {
siteName: row.siteName, siteName: row.siteName,
siteType: row.siteType, siteType: row.siteType,
penCity: [ penCity: [
JSON.stringify({id: row.provinceCode,name: row.provinceName}), JSON.stringify({id: row.provinceCode*1,name: row.provinceName}).replace(/\\/g, ''),
JSON.stringify({id: row.areaCode, name: row.areaName}) JSON.stringify({id: row.areaCode*1, name: row.areaName}).replace(/\\/g, '')
], ],
polygonInfo: JSON.stringify({id: row.polygonId, name: row.polygonName}), polygonInfo: JSON.stringify({id: row.polygonId, name: row.polygonName}),
stationList: JSON.parse(row.stationList), stationList: JSON.parse(row.stationList),
id: row.id id: row.id
} }
console.log(this.form)
}else { }else {
this.form.stationList = [ this.title = '添加站点区域'
{pointLat: "", pointLng: "", pointsName: ""} // this.form = {
]; // siteName: '',
// siteType: '',
// penCity: [],
// polygonInfo: '',
// stationList: [{pointLat: "", pointLng: "", pointsName: ""}]
// };
this.form.stationList = [{pointLat: "", pointLng: "", pointsName: ""}];
} }
this.dialogVisible = true; this.dialogVisible = true;
......
...@@ -6,30 +6,28 @@ ...@@ -6,30 +6,28 @@
</div> </div>
</el-row> </el-row>
<el-form class="form-row"> <el-form class="form-row">
<el-row> <el-row type="flex" align="center">
<el-col :span="8"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input v-model="form.siteName" size="mini" style="max-width: 260px;" suffix-icon="el-icon-search" placeholder="请输入站点/围栏名称搜索"> <el-input v-model="form.siteName" size="mini" style="max-width: 260px;" suffix-icon="el-icon-search" placeholder="请输入站点/围栏名称搜索">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item> <el-form-item>
<span style="margin-right: 16px;"> <span style="margin-right: 16px;">
站点区域: 站点区域:
</span> </span>
<el-cascader v-model="form.penCity" :show-all-levels="false" style="max-width: 190px;" :props="props"></el-cascader> <el-cascader clearable v-model="form.penCity" :show-all-levels="false" style="max-width: 190px;" :props="props"></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item> <el-form-item>
<Selects :options="dataSource.hotType" <Selects :options="dataSource.hotType"
:selectName="'站点类型:'" :type="'hotType'" @changeList="handlechangeList"></Selects> :selectName="'站点类型:'" :type="'hotType'" @changeList="handlechangeList"></Selects>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="6" style="display: flex;align-items: center;">
<el-row>
<el-col :span="8" :offset="16">
<el-button type="primary" size="mini" @click="searchByInfo"> <el-button type="primary" size="mini" @click="searchByInfo">
查询 查询
</el-button> </el-button>
...@@ -54,7 +52,7 @@ ...@@ -54,7 +52,7 @@
<el-table-column label="站点名称" align="center" prop="siteName"> <el-table-column label="站点名称" align="center" prop="siteName">
</el-table-column> </el-table-column>
<el-table-column label="站点所属城市" align="center" prop="areaName"> <el-table-column label="站点所属城市" align="center" prop="areaName" width="150">
</el-table-column> </el-table-column>
<el-table-column label="围栏名称" align="center" prop="polygonName"> <el-table-column label="围栏名称" align="center" prop="polygonName">
...@@ -67,9 +65,9 @@ ...@@ -67,9 +65,9 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="录入时间" align="center" prop="createTime"> <el-table-column label="录入时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
{{dateTime2Str(scope.row.createTime)}} {{dateTime2Str(scope.row.createTime, 'yyyy-mm-dd hh:mm:ss')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="120"> <el-table-column label="操作" align="center" fixed="right" width="120">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
</el-row> </el-row>
<el-row type="flex" justify="end" align="center"> <el-row type="flex" justify="end" align="center">
<el-button type="primary" size="mini"> <el-button type="primary" size="mini" @click="addSettingInfo">
添加 添加
</el-button> </el-button>
</el-row> </el-row>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="80"> <el-table-column label="操作" align="center" fixed="right" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" type="text" @click="() => {}"> <el-button size="small" type="text" @click="() => $router.push({path: '/platform/setting-info', query: {platformId: scope.row.platformId}})">
编辑 编辑
</el-button> </el-button>
</template> </template>
...@@ -119,21 +119,28 @@ export default { ...@@ -119,21 +119,28 @@ export default {
this.pageNum = page; this.pageNum = page;
this.initTable(); this.initTable();
}, },
handledbClick() { handledbClick(row) {
this.$router.push({path: '/platform/setting-detail', query: {platformId: row.platformId}})
}, },
initTable() { initTable() {
this.tableLoading = true;
platformList({pageNum: this.pageNum, pageSize: this.size}) platformList({pageNum: this.pageNum, pageSize: this.size})
.then((res) => { .then((res) => {
if(res.status === 200) { if(res.status === 200) {
this.data = res.data.contents; this.data = res.data.contents;
this.total = res.data.total; this.total = res.data.total;
}else {
this.$message.error(res.msg);
} }
this.tableLoading = false;
}) })
.catch(() => { .catch(() => {
this.tableLoading = false;
}) })
}, },
addSettingInfo() {
this.$router.push('/platform/setting-info')
},
// table变色,行 // table变色,行
tableRowStyle({row, rowIndex}) { tableRowStyle({row, rowIndex}) {
if (rowIndex % 2 !== 0) { if (rowIndex % 2 !== 0) {
......
<template> <template>
<div>
<el-card>
<el-row>
<div class="title-left" style="padding-left: 10px;font-weight: 800;">
品牌信息
</div>
</el-row>
<el-row v-if="Object.keys(topInfo).length > 0" type="flex">
<div class="img-col">
<el-image :src="topInfo.logo" style="width: 150px;height: 150px" lazy></el-image>
</div>
<div class="img-right-col">
<el-form label-width="130px" label-position="right" class="top-form">
<el-form-item label="平台公开类型:">
{{platformOvertTypeText(topInfo.platformOvertType)}}
</el-form-item>
<el-form-item label="品牌名称:">
{{topInfo.brandName}}
</el-form-item>
<!-- <el-form-item label="英文名称">-->
<!-- {{topInfo.platformOvertType}}-->
<!-- </el-form-item>-->
<el-form-item label="描述:">
{{topInfo.describe}}
</el-form-item>
<el-form-item label="网站门户:">
{{topInfo.domain.length > 0 ? topInfo.domain[0] : ''}}
</el-form-item>
<el-form-item label="主页URL:">
{{topInfo.home ? topInfo.home.url : ''}}
</el-form-item>
</el-form>
</div>
</el-row>
</el-card>
<el-card style="margin-top: 10px;">
<el-row>
<div class="title-left" style="padding-left: 10px;font-weight: 800;">
业务信息
</div>
</el-row>
<el-row>
<el-form class="form-d" ref="form" :model="form" label-width="160px" label-position="right">
<el-form-item label="开通的业务类型:" prop="allowRunType">
<span v-for="(item, index) in form.allowRunType" :key="'allowRunType'+index">
<span v-if="index > 0"></span>{{item.name}}
</span>
</el-form-item>
<el-form-item label="对接渠道:" prop="allowChannel">
<span v-for="(item, index) in form.allowChannel" :key="'allowChannel'+index">
<span v-if="index > 0"></span>{{item.name}}
</span>
</el-form-item>
<el-form-item label="运营联系人:" prop="operateName">
{{form.operateName}}
</el-form-item>
<el-form-item label="运营手机号:" prop="operatePhone">
{{form.operatePhone}}
</el-form-item>
<el-form-item label="运营邮箱:" prop="operateEmail">
{{form.operateEmail}}
</el-form-item>
<el-form-item label="财务联系人:" prop="financeName">
{{form.financeName}}
</el-form-item>
<el-form-item label="财务手机号:" prop="financePhone">
{{form.financePhone}}
</el-form-item>
<el-form-item label="财务邮箱:" prop="financeEmail">
{{form.financeEmail}}
</el-form-item>
</el-form>
</el-row>
</el-card>
</div>
</template> </template>
<script> <script>
import {getPlatformInfo} from "@/port/platfrom/setting";
import JudgeType from "@/mixins/judgeType";
export default { export default {
name: "settingDetail" name: "settingDetail",
mixins: [JudgeType],
data() {
return {
topInfo: {},
form: {
platformId: '',
allowRunType: [],
allowChannel: [],
operateName: '',
operatePhone: '',
operateEmail: '',
financeName: '',
financePhone: '',
financeEmail: '',
}
}
},
created() {
this.getInfo();
},
methods: {
getInfo() {
getPlatformInfo({}, this.$route.query.platformId)
.then((res) => {
if(res.status === 200) {
let d = res.data;
this.topInfo = d.baseInfo;
this.form = {
allowRunType: d.allowRunType,
allowChannel: d.allowChannel,
operateName: d.operateName,
operatePhone: d.operatePhone,
operateEmail: d.operateEmail,
financeName: d.financeName,
financePhone: d.financePhone,
financeEmail: d.financeEmail,
}
}else {
this.$message.error(res.msg);
}
})
.catch(() => {
})
}
}
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.title-left::before {
content: '';
position: absolute;
left: 0;
top: 10%;
width: 5px;
height: 80%;
background-color: #0099ff;
}
.img-col {
width: 150px;
display: flex;
align-items: center;
justify-content: center;
.el-image {
width: 100px;
height: 100px;
}
}
.img-right-col {
width: calc(100% - 150px);
padding-left: 10px;
}
.el-form {
.el-form-item {
margin-bottom: 0;
}
}
.form-d {
.el-input {
max-width: 300px;
}
}
</style> </style>
<template> <template>
<el-card>
运力
</el-card>
</template> </template>
<script> <script>
export default { export default {
name: "settingDialog" name: "tranport"
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment