Commit 7fcaa080 by weix

修改bug、添加广告位配置模块

parent 0c9bf88c
......@@ -34,3 +34,4 @@ VUE_APP_BASE_API11 = 'https://oss.xoado.com/v1/'
VUE_APP_BASE_API12 = 'https://payment.sdk.xoado.com'
VUE_APP_BASE_API13 = 'https://projects.xoado.com/invoice'
VUE_APP_BASE_API14 = 'https://projects.xoado.com/message'
VUE_APP_BASE_API15 = 'https://aitransport.xoado.com/smart'
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="./xoado.ico">
<title><%= VUE_APP_TITLE %></title>
</head>
<style>
......
public/logo/logo-xd.png

7.42 KB | W: | H:

public/logo/logo-xd.png

3.17 KB | W: | H:

public/logo/logo-xd.png
public/logo/logo-xd.png
public/logo/logo-xd.png
public/logo/logo-xd.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -28,7 +28,7 @@ export default {
await this.$store.dispatch('user/PlatformCode')
await this.mustFun();
/** 测试环境需要解注 */
await this.getEnvironment();
// await this.getEnvironment();
},
mounted () {
console.log(process.env.VUE_APP_BASE_API5)
......
import {get, post, put, deletes} from '@/request/http'
// 新增广告位
export function addCarousel(data) {
const url = process.env.VUE_APP_BASE_API15+'/zhiyun/carousel/picture/insert/carousel';
return post(url, data)
}
// 查询广告位
export function searchCarousel(data) {
const url = process.env.VUE_APP_BASE_API15+'/zhiyun/carousel/picture/querylist/carousel';
return post(url, data)
}
// 删除广告位
export function delCarousel(data, id) {
const url = process.env.VUE_APP_BASE_API15+`/zhiyun/carousel/picture/delete/carousel/${id}`;
return post(url, data)
}
// 上下线
export function upOrDown(data, id, status) {
const url = process.env.VUE_APP_BASE_API15+`/zhiyun/carousel/picture/online/carousel/${id}/${status}`;
return post(url, data)
}
......@@ -435,8 +435,8 @@ export function seachDividedInto(data) {
}
/* 投诉列表查询 */
export function getAllcomplainList(data) {
const url = targetBaseUrl + '/complaint/condition'
export function getAllcomplainList(data, u) {
const url = (u ? u+'/brand' : targetBaseUrl) + '/complaint/condition'
return post(url, data)
}
......
......@@ -331,7 +331,21 @@ export const routes = [{
import ('@/views/disposition/disposition.vue'),
meta: { title: '控诉原因配置', icon: 'el-icon-s-home' }
},
{
path: 'pass-rotation',
name: 'passRotation',
component: () =>
import ('@/views/disposition/passRotation.vue'),
meta: { title: '广告位配置', icon: 'el-icon-s-home' }
},
{
path: 'pass-detail',
name: 'passDetail',
component: () =>
import ('@/views/disposition/passDetail.vue'),
meta: { title: '新增广告位配置', icon: 'el-icon-s-home' },
hidden: true
},
]
}
]
......
......@@ -99,7 +99,7 @@
height: 100%;
line-height: 50px;
img {
height: 28px;
height: 35px;
vertical-align: middle;
margin-right: 8px;
position: relative;
......
......@@ -196,7 +196,7 @@ export default {
rows: this.size
};
getAllcomplainList(params)
getAllcomplainList(params, search.brandUrl)
.then((res) => {
if(res.status === 200) {
this.data = res.data.data;
......
......@@ -15,7 +15,7 @@
:model="form"
:rules="rules"
>
<el-form-item label="图标:" prop="img">
<el-form-item label="图标:" prop="labelImgurl">
<el-upload
class="avatar-uploader"
:headers="reqHeaders"
......@@ -26,11 +26,11 @@
:on-success="photoUrlSuccess"
:before-upload="beforeAvatarUpload"
>
<img v-if="form.labelImgurl" :src="form.labelImgurl" class="avatar" />
<img v-if="form.labelImgurl" :src="form.labelImgurl" class="avatar"/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="车辆类别:" prop="type">
<el-form-item label="控诉方式:" prop="complaintMode">
<el-select
v-model="form.complaintMode"
collapse-tags
......@@ -65,7 +65,8 @@
</template>
<script>
import { complaintUpdate, complaintAdd } from "@/port/set-request";
import {complaintUpdate, complaintAdd} from "@/port/set-request";
export default {
name: "addDialog",
props: ["platformList"],
......@@ -90,14 +91,14 @@ export default {
},
rules: {
labelImgurl: [
{ required: true, message: "请上传图标", trigger: "blur" },
{required: true, message: "请上传图标", trigger: "blur"},
],
complaintMode: [
{ required: true, message: "请选择投诉方式", trigger: "change" },
{required: true, message: "请选择投诉方式", trigger: "change"},
],
labelName: [
{ required: true, message: "请输入控诉原因", trigger: "blur" },
{ max: 10, message: "最多可输入五十个字" },
{required: true, message: "请输入控诉原因", trigger: "blur"},
{max: 10, message: "最多可输入五十个字"},
],
},
complaintModelist: [
......@@ -112,7 +113,8 @@ export default {
],
};
},
created() {},
created() {
},
methods: {
async showDialog(row) {
if (Object.keys(row).length > 0) {
......
<template>
<el-card>
<el-row>
<div class="title-left" style="padding-left: 10px;font-weight: 800;">
广告位配置
</div>
</el-row>
<el-row type="flex" class="row-bg" style="margin-top: 5px;" justify="space-between">
<el-col :span="8">
<div class="flex-class">
<el-input
style="width: 250px"
placeholder="请输入模块名称"
prefix-icon="el-icon-search"
v-model="modelName"
>
</el-input>
</div>
</el-col>
<el-col :span="8">
<span>页面位置:</span>
<el-select v-model="pageLocation" placeholder="请选择">
<el-option
v-for="item in pages"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<el-button
style="width: 100px; margin-left: 10px; height: 32px"
type="primary"
size="small"
@click.stop="getAllData()"
>查询
</el-button>
<el-button
style="width: 100px; margin-left: 10px; height: 32px"
type="primary"
size="small"
@click="goAddRotation"
>添加配置
</el-button>
</el-col>
</el-row>
<el-table
:data="data"
v-loading="loading"
style="margin-top: 10px;"
stripe
border
:header-cell-style="tableHeaderColor"
>
<el-table-column type="index" label="编号" align="center" width="50">
</el-table-column>
<el-table-column label="模块名称" prop="modelName" align="center" width="150">
</el-table-column>
<el-table-column label="图片" align="center" width="200">
<template slot-scope="{ row }">
<img style="width: 100px" :src="row.pictureUrl" alt=""/>
</template>
</el-table-column>
<el-table-column
label="页面"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="{ row }">
<span>{{ row.positionInPage == 1 ? "注册中首页" : row.positionInPage == 2 ? "首页" : "个人中心" }}</span>
</template>
</el-table-column>
<el-table-column
label="页面"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="{ row }">
<span>{{ row.positionInPage == 1 ? "顶部轮播图" : row.positionInPage == 2 ? "中部轮播图" : "页底广告位" }}</span>
</template>
</el-table-column>
<el-table-column label="图片位置" align="center">
<template slot-scope="{ row }">
<span>{{ "位" + (row.positionIndex + 1) }}</span>
</template>
</el-table-column>
<el-table-column
label="展示区域"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="{ row }">
<span v-for="(item, index) in row.areaList">
{{item.areaName}}
</span>
</template>
</el-table-column>
<el-table-column
width="200"
label="跳转设置"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="{ row }">
<span>{{ goUrl(row.jumpSetUp) }}</span>
</template>
</el-table-column>
<el-table-column
width="200"
label="跳转详情"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="{ row }">
<span>{{ row.jumpUrl }}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="上下线"
align="center"
width="100"
>
<template slot-scope="{ row }">
<div v-if="false">/</div>
<el-switch
v-else
v-model="row.operationStats"
active-color="#13ce66"
inactive-color="#ff4949"
:active-value="'1'"
:inactive-value="'0'"
@change="operatingStatuct(row)"
>
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<template slot-scope="{ row }">
<el-button type="text" style="color: red;" @click="delRow(row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
<script>
import JudgeType from "@/mixins/judgeType";
import {CodeToText} from "element-china-area-data";
import {
searchCarousel,
upOrDown,
delCarousel
} from "@/port/pass/pass";
export default {
name: "passRotation",
mixins: [JudgeType],
data() {
return {
CodeToText,
data: [],
page: 1,
rows: 10,
total: 0,
loading: false,
pageLocation: '',
modelName: '',
pages: [
{
id: "",
name: "全部",
},
{
id: "1",
name: "注册中首页",
},
{
id: "2",
name: "首页",
},
{
id: "3",
name: "个人中心",
},
],
}
},
async created() {
await this.getAllData();
},
methods: {
delRow(row) {
this.$confirm('是否删除', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
})
.then(() => {
delCarousel({}, row.advertId)
.then((res) => {
if(res.status === 200) {
this.$message.success('删除成功');
this.getAllData();
}else {
this.$message.error(res.msg);
}
})
.catch(() => {
})
})
.catch(() => {
});
},
goAddRotation() {
this.$router.push('/disposition/pass-detail')
},
async getAllData() {
let json = {
platformId: this.$store.getters.platformId,
startPage: this.page,
pageNum: this.rows,
displayPage: this.pageLocation,
};
if (this.modelName) json['modelName'] = this.modelName;
this.loading = true;
let {data} = await searchCarousel(json);
this.data = data.content;
this.total = data.total;
this.loading = false;
},
/**
*弹窗开关切换
* **/
async operatingStatuct(val) {
let {data, status} = await upOrDown({}, val.advertId, val.isOnline);
if (status == 200) {
this.$message.success("操作成功");
} else {
val.operationStats == "0"
? (val.operationStats = "1")
: (val.operationStats = "0");
this.$confirm(data, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
})
.then(() => {
})
.catch(() => {
});
}
},
goUrl(val) {
val = Number(val);
switch (val) {
case 1:
return "无跳转"
case 2:
return "不跳转"
case 3:
return "跳转说明/规则等文字性页面"
}
},
// table变色,头
tableHeaderColor({row, column, rowIndex, columnIndex}) {
return {"background-color": "#0099ff", color: "#ffffff"};
}
}
}
</script>
<style scoped lang="scss">
</style>
......@@ -180,6 +180,7 @@ export default {
},
changePlatform() {
this.brandUrl = JSON.parse(this.platform).brandUrl;
this.plat = JSON.parse(this.platform).platformId;
this.page = 1;
this.getTableList();
},
......@@ -218,6 +219,7 @@ export default {
},
searchBySearchInfo() {
this.tableData.pageNum = 1;
this.data = [];
this.getTableList();
},
// 获取列表
......
......@@ -13,9 +13,9 @@
</el-col>
<el-col :span="8">
<Selects :options="platformList" sizeType="mini"
:selectName="'车辆类别:'" :type="'platformList'" @changeList="handlechangeList"></Selects>
:selectName="'合作品牌方:'" :type="'platformList'" @changeList="handlechangeList"></Selects>
<el-button size="mini" type="primary" style="margin-left: 10px;padding: 5px 15px;">查询</el-button>
<el-button @click="searchByParam" size="mini" type="primary" style="margin-left: 10px;padding: 5px 15px;">查询</el-button>
</el-col>
</el-form>
</el-row>
......@@ -29,12 +29,13 @@
border
:header-cell-style="tableHeaderColor"
>
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
<el-table-column prop="orgForShort" label="运力方简称" align="center"></el-table-column>
<el-table-column prop="organizeName" label="营业执照名称" align="center"></el-table-column>
<el-table-column prop="areas" label="运营区域" align="center">
<template slot-scope="{row}">
<span v-for="(item,index) in row.areas" :key="item.areaCode">
{{ item.areaName }}
{{ (index !== 0 ? '、' : '')+item.areaName }}
</span>
</template>
</el-table-column>
......@@ -45,9 +46,9 @@
</span>
</template>
</el-table-column>
<el-table-column prop="vehicleCount" label="车辆数" align="center"></el-table-column>
<el-table-column prop="driverCount" label="司机数" align="center"></el-table-column>
<el-table-column prop="productCount" label="开通产品数" align="center"></el-table-column>
<el-table-column prop="vehicleCount" label="车辆数" align="center" width="80"></el-table-column>
<el-table-column prop="driverCount" label="司机数" align="center" width="80"></el-table-column>
<el-table-column prop="productCount" label="开通产品数" align="center" width="100"></el-table-column>
</el-table>
<div style="text-align: right;margin-top: 5px;">
......@@ -104,8 +105,8 @@ export default {
res.data.forEach((item) => {
if(item.brandUrl) {
list.push({
value: item.platformId,
label: item.name,
id: item.platformId,
name: item.name,
});
idList.push(item.platformId)
}
......@@ -128,6 +129,10 @@ export default {
let data = this.filftersFun(source.data)
this.form.platformList = data
},
searchByParam() {
this.page = 1;
this.initTable();
},
initTable() {
let params = {
//模糊查询
......
......@@ -3,7 +3,7 @@
<el-card>
<el-row v-if="Object.keys(queryRow).length > 0" type="flex" align="flex-end">
<div style="width: 100px;">
<el-image style="width: 100px;height: 60px;" :src="queryRow.logo" lazy></el-image>
<el-image style="width: 100px;height: 60px;" :src="logo" lazy></el-image>
</div>
<div style="width: calc(100% - 100px);padding-left: 10px;display: flex;align-items: flex-end;padding-bottom: 5px;">
<el-row>
......@@ -36,6 +36,8 @@
<script>
import car from "./components/car";
import driver from "./components/driver";
import {Organizations} from "@/port/account";
export default {
name: "transportDetail",
components: {
......@@ -44,6 +46,7 @@ export default {
},
data() {
return {
logo: '',
queryRow: {},
activeName: '',
tabsList: [{id: '0', name: '司机数'},{id: '1', name: '车辆数'}]
......@@ -53,8 +56,18 @@ export default {
this.queryRow = JSON.parse(this.$route.query.row);
this.activeName = '0';
console.log(this.queryRow)
this.getLogo();
},
methods: {
getLogo() {
Organizations(this.queryRow.organizeId, {})
.then((res) => {
if(res.status === 200) {
this.logo = res.data.logoUrl
}
})
.catct(() => {})
},
handleClick() {
},
......
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