Commit e5e305bd by weix

Merge branch 'master' of https://git.xoado.com/yaohui/xoadoPlatform

# Conflicts: # .env.development # .env.production
parents e1be583d 67e848b5
......@@ -11,8 +11,8 @@ import {get, post, put, deletes, postblob } from '@/request/http'
const targetBaseUrl = process.env.VUE_APP_BASE_API5
const targetBaseUrl1 = process.env.VUE_APP_BASE_API6
const targetBaseUrl2 = process.env.VUE_APP_BASE_API7
/* 获取车型列表 */
const targetBaseUrl5 = process.env.VUE_APP_BASE_API15
/* 获取车型列表 */
export function getXoadodAllCarTYpeList(data = {}) {
const url = targetBaseUrl2 + '/carType'
return get(url, data)
......@@ -1122,6 +1122,12 @@ export function exportCycleBills(data = {}) {
/* 客诉管理---查询客诉 */
export function getComplaintById(id) {
const url = targetBaseUrl + `/complaint?complaintId=${id}`
return get(url)
const url = targetBaseUrl + `/complaint?complaintId=${id}`
return get(url)
}
/* 客诉管理---查询客诉 */
export function getplatformList() {
const url = targetBaseUrl5 + `/platform/infos`
return get(url)
}
<template xmlns="http://www.w3.org/1999/html">
<div>
<el-form class="form-row">
<el-row
style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<el-col>
<el-form-item>
<el-input
v-model="form.CarModelName"
size="mini"
style="max-width: 260px"
suffix-icon="el-icon-search"
placeholder="请输入车型名称"
>
</el-input>
<el-button type="primary" size="mini" style="margin-left: 10px">
查询
</el-button>
</el-form-item>
</el-col>
<el-col
style="display: flex; align-items: center; justify-content: end"
>
<el-button type="primary" size="mini"> 添加品牌类型 </el-button>
</el-col>
</el-row>
</el-form>
<el-table
:data="data"
border
style="margin-top: 10px"
:row-style="tableRowStyle"
:header-cell-style="tableHeaderColor"
>
<el-table-column label="序号" align="center" type="index" width="50">
</el-table-column>
<el-table-column label="车型类别" align="center" prop="type">
</el-table-column>
<el-table-column label="车型名称" align="center" prop="typeName">
</el-table-column>
<el-table-column label="车型标识" align="center" prop="identification">
</el-table-column>
<el-table-column label="核载人数" align="center" prop="numpeo">
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="120">
<template slot-scope="scope">
<el-button
size="small"
type="text"
>
编辑
</el-button>
<el-button size="small" type="text" style="color: red">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" v-if="total > 10">
<el-pagination
background
layout="prev, pager, next, jumper, total"
:total="total"
>
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "BasicsCartype",
data() {
return {
activeName: "first",
total:15,
data: [
{
type: "客车",
typeName: "经济型",
identification: "A",
numpeo: 5,
},
{
type: "客车",
typeName: "经济型",
identification: "A",
numpeo: 5,
},
{
type: "客车",
typeName: "经济型",
identification: "A",
numpeo: 5,
},
],
form: {
CarModelName: "",
},
};
},
created() {},
methods: {
// table变色,行
tableRowStyle({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return { "background-color": "#e3f4ff" };
}
},
// table变色,头
tableHeaderColor({ row, column, rowIndex, columnIndex }) {
return { "background-color": "#0099ff", color: "#ffffff" };
},
},
};
</script>
<style scoped lang="scss">
::v-deep.form-row {
.el-form-item {
margin-bottom: 0 !important;
}
}
.pagination {
margin-top: 16px;
text-align: right;
}
</style>
<template xmlns="http://www.w3.org/1999/html">
<el-card style="text-align: left;" type="flex" justify="end" align="end">
车型
</el-card>
<el-card>
<el-tabs v-model="activeName" type="card" >
<el-tab-pane label="基础车型" name="first"><BasicsCartype></BasicsCartype></el-tab-pane>
<el-tab-pane label="品牌车型" name="second"><platformCarType></platformCarType></el-tab-pane>
</el-tabs>
</el-card>
</template>
<script>
import platformCarType from '@/views/configure/platformCarType.vue'
import BasicsCartype from '@/views/configure/BasicsCartype.vue'
export default {
name: "CarModel",
data() {
return {
info: 'baaaaaaaaaaa'
}
}
}
name: "CarModel",
data() {
return {
activeName: "first",
};
},
components: {
'platformCarType': platformCarType ,
"BasicsCartype":BasicsCartype
},
methods: {},
};
</script>
<style scoped lang="scss">
div {
}
</style>
<template>
<el-dialog
:visible.sync="dialogVisible"
:title="title"
width="40%"
class="form-dialog"
@close="clearInfo"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form
ref="form"
:model="form"
label-position="right"
label-width="150px"
>
<el-form-item label="品牌名称:" prop="polygonId">
<el-select v-model="form.name">
<el-option
v-for="(item, index) in carType"
:label="item.label"
:value="item.value"
:key="'polygon' + index"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="图标:" prop="siteTypeList">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<img v-if="form.img" :src="form.img" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="车辆类别:">
<el-select
v-model="form.type"
collapse-tags
placeholder="请选择"
size="mini"
>
<el-option
v-for="item in carType"
:key="item.value"
:label="item.label"
:value="item.value"
size="mini"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车辆名称" prop="polygonId">
<el-select v-model="form.typeName">
<el-option
v-for="(item, index) in polygonData"
:label="item.name"
:value="item.id"
:key="'polygon' + index"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车型定义:" prop="siteName">
<el-input
style="width: 220px"
size="mini"
v-model="form.definition"
></el-input>
</el-form-item>
<el-form-item label="可接单类型" prop="polygonId">
<el-select v-model="form.runTypes">
<el-option
v-for="(item, index) in polygonData"
:label="item.name"
:value="item.id"
:key="'polygon' + index"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
export default {
name: "addDialog",
data() {
return {
imageUrl: "",
dialogVisible: false,
carType: [
{
value: 1,
label: "客车",
},
{
value: 2,
label: "货车",
},
{
value: 3,
label: "巴士型",
},
],
form: {
name: "",
type: "",
typeName: "",
img: "",
identification: "",
definition: "",
runTypes: "",
},
title: "添加品牌车型",
polygonData: [],
};
},
created() {},
methods: {
handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
}
return isLt2M;
},
clearInfo() {
this.$refs.form.resetFields();
this.imageUrl = "";
this.dialogVisible = false;
},
showDialog(row) {
console.log(JSON.stringify(row))
if (Object.keys(row).length > 0) {
this.title = "修改站点区域";
this.form = {
name: row.name,
type: row.type,
typeName: row.typeName,
img: row.img,
identification: row.identification,
definition: row.definition,
runTypes:row.runTypes,
id: row.id,
};
}
this.dialogVisible = true;
},
},
};
</script>
<style scoped>
::v-deep.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
::v-deep.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
}
.avatar {
width: 50px;
height: 50px;
display: block;
}
</style>
<template xmlns="http://www.w3.org/1999/html">
<div>
<el-form class="form-row">
<el-row
style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<el-col>
<el-form-item>
<el-input
v-model="form.CarModelName"
size="mini"
style="max-width: 260px"
suffix-icon="el-icon-search"
placeholder="请输入车型名称"
>
</el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item>
<span style="margin-right: 16px"> 品牌名称: </span>
<el-select
v-model="form.platformListInfo"
placeholder="请选择"
size="mini"
>
<el-option
v-for="item in platformList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item>
<span style="margin-right: 16px"> 车辆类别: </span>
<el-select
v-model="form.carTypevalue"
multiple
collapse-tags
style="margin-left: 20px"
placeholder="请选择"
size="mini"
>
<el-option
v-for="item in carType"
:key="item.value"
:label="item.label"
:value="item.value"
size="mini"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col
style="display: flex; align-items: center; justify-content: end"
>
<el-button type="primary" size="mini"> 查询 </el-button>
<el-button type="primary" size="mini" @click="() => $refs.addDialog.showDialog({})"> 添加品牌类型 </el-button>
</el-col>
</el-row>
</el-form>
<el-table
:data="data"
border
style="margin-top: 10px"
:row-style="tableRowStyle"
:header-cell-style="tableHeaderColor"
>
<el-table-column label="序号" align="center" type="index" width="50">
</el-table-column>
<el-table-column label="品牌名称" align="center" prop="name">
</el-table-column>
<el-table-column label="车型类别" align="center" prop="type">
</el-table-column>
<el-table-column label="图标" align="center" prop="img">
<template slot-scope="scope">
<el-avatar shape="square" :size="80" :src="scope.row.img">
<div>暂无图片</div>
</el-avatar>
</template>
</el-table-column>
<el-table-column label="车型名称" align="center" prop="typeName">
</el-table-column>
<el-table-column label="车型标识" align="center" prop="identification">
</el-table-column>
<el-table-column label="车型定义" align="center" prop="definition">
</el-table-column>
<el-table-column label="可接单车型" align="center" prop="runTypes">
<template slot-scope="scope">
<el-link
:underline="false"
v-for="(item, index) in scope.row.runTypes"
>{{ item }}</el-link
>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="120">
<template slot-scope="scope">
<el-button size="small" type="text" @click="() => $refs.addDialog.showDialog(scope.row)"> 编辑 </el-button>
<el-button size="small" type="text" style="color: red">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" v-if="total > 10">
<el-pagination
background
layout="prev, pager, next, jumper, total"
:total="total"
>
</el-pagination>
</div>
<addDialog ref="addDialog"></addDialog>
</div>
</template>
<script>
import { getplatformList } from "@/port/set-request";
import addDialog from "./componenets/platformCarType/addDialog";
export default {
name: "CarModel",
components: {
addDialog
},
data() {
return {
activeName: "first",
data: [
{
name: "安华玖玖",
type: "客车",
typeName: "经济型",
img: "",
identification: "A",
definition: "锋范/宝来/卡罗拉等同级车",
runTypes: [1, 2, 3, 4, 5],
},
{
name: "安华玖玖",
type: "客车",
typeName: "经济型",
img: "https://img0.baidu.com/it/u=3436810468,4123553368&fm=26&fmt=auto",
identification: "A",
definition: "锋范/宝来/卡罗拉等同级车",
runTypes: [1, 2, 3, 4, 5],
},
{
name: "安华玖玖",
type: "客车",
typeName: "经济型",
img: "https://img0.baidu.com/it/u=3436810468,4123553368&fm=26&fmt=auto",
identification: "A",
definition: "锋范/宝来/卡罗拉等同级车",
runTypes: [1, 2, 3, 4, 5],
},
],
carType: [
{
value: 1,
label: "客车",
},
{
value: 2,
label: "货车",
},
{
value: 3,
label: "巴士型",
},
],
platformList: [],
pageNum: 1,
size: 10,
total: 11,
form: {
CarModelName: "",
carTypevalue: [1, 2, 3],
platformListInfo: "",
},
};
},
created() {
this.listinit();
},
methods: {
listinit() {
getplatformList().then((res) => {
if (res.status == 200) {
res.data.forEach((element) => {
this.platformList.push({
value: element.platformId,
label: element.name,
});
});
this.form.platformListInfo = this.platformList[0].value;
}
});
},
// table变色,行
tableRowStyle({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return { "background-color": "#e3f4ff" };
}
},
// table变色,头
tableHeaderColor({ row, column, rowIndex, columnIndex }) {
return { "background-color": "#0099ff", color: "#ffffff" };
},
},
};
</script>
<style scoped lang="scss">
::v-deep.form-row {
.el-form-item {
margin-bottom: 0 !important;
}
}
.pagination {
margin-top: 16px;
text-align: right;
}
</style>
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