|
@@ -2,8 +2,12 @@
|
|
|
<div class="app-container">
|
|
|
<el-descriptions class="margin-top" title="一级渠道信息">
|
|
|
<template slot="extra">
|
|
|
- <el-button type="primary" size="mini" @click="oneTOEdit(id)">编辑</el-button>
|
|
|
- <el-button type="primary" @click="value5 = true" size="mini">历史记录</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="oneTOEdit(id)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="value5 = true" size="mini"
|
|
|
+ >历史记录</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<el-descriptions-item label="渠道名称">
|
|
|
<template slot="label"> 渠道名称 </template>
|
|
@@ -41,28 +45,61 @@
|
|
|
</el-descriptions>
|
|
|
|
|
|
<el-header>
|
|
|
- <el-form :inline="true" :model="searchForm" ref="searchForm" class="demo-form-inline">
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ ref="searchForm"
|
|
|
+ class="demo-form-inline"
|
|
|
+ >
|
|
|
<el-form-item label="渠道名称">
|
|
|
- <el-input v-model="searchForm.channelName" name="searchForm.channelName" placeholder="策略名称" size="mini" />
|
|
|
+ <el-input
|
|
|
+ v-model="searchForm.channelName"
|
|
|
+ name="searchForm.channelName"
|
|
|
+ placeholder="策略名称"
|
|
|
+ size="mini"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="合作方">
|
|
|
- <el-input v-model="searchForm.channelPartner" placeholder="合作方" size="mini" />
|
|
|
+ <el-input
|
|
|
+ v-model="searchForm.channelPartner"
|
|
|
+ placeholder="合作方"
|
|
|
+ size="mini"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right">
|
|
|
- <el-button type="primary" size="mini" @click="search()">搜索</el-button>
|
|
|
- <el-button type="danger" size="mini" @click="pushdata = true">同步科创</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="search()"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button type="danger" size="mini" @click="pushdata = true"
|
|
|
+ >同步科创</el-button
|
|
|
+ >
|
|
|
<el-button size="mini" @click="reset('searchForm')">重置</el-button>
|
|
|
- <el-button size="mini" type="warning" @click="download()">导出</el-button>
|
|
|
+ <el-button size="mini" type="warning" @click="download()"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-header>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="add({ id: content.id }, 'erji', content.channelName)">新增</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="add({ id: content.id }, 'erji', content.channelName)"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="info" icon="el-icon-upload2" size="mini" @click="init()">刷新</el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ icon="el-icon-upload2"
|
|
|
+ size="mini"
|
|
|
+ @click="init()"
|
|
|
+ >刷新</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
@@ -82,8 +119,18 @@
|
|
|
<template #default>
|
|
|
<vxe-toolbar>
|
|
|
<template #buttons>
|
|
|
- <vxe-input v-model="channelogParam.notes" type="search" clearable placeholder="搜索操作记录"></vxe-input>
|
|
|
- <vxe-input v-model="channelogParam.userName" type="search" clearable placeholder="搜索操作人"></vxe-input>
|
|
|
+ <vxe-input
|
|
|
+ v-model="channelogParam.notes"
|
|
|
+ type="search"
|
|
|
+ clearable
|
|
|
+ placeholder="搜索操作记录"
|
|
|
+ ></vxe-input>
|
|
|
+ <vxe-input
|
|
|
+ v-model="channelogParam.userName"
|
|
|
+ type="search"
|
|
|
+ clearable
|
|
|
+ placeholder="搜索操作人"
|
|
|
+ ></vxe-input>
|
|
|
<vxe-button @click="searchEvent" content="搜索"></vxe-button>
|
|
|
</template>
|
|
|
</vxe-toolbar>
|
|
@@ -97,14 +144,21 @@
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="userName" title="操作人"></vxe-table-column>
|
|
|
</vxe-table>
|
|
|
- <vxe-pager :loading="loading" :current-page="channelogParam.pageNo" :page-size="channelogParam.pageSize" :total="channelogParam.totalResult" :layouts="[
|
|
|
- 'PrevPage',
|
|
|
- 'JumpNumber',
|
|
|
- 'NextPage',
|
|
|
- 'FullJump',
|
|
|
- 'Sizes',
|
|
|
- 'Total',
|
|
|
- ]" @page-change="handlePageChangeChannelog" />
|
|
|
+ <vxe-pager
|
|
|
+ :loading="loading"
|
|
|
+ :current-page="channelogParam.pageNo"
|
|
|
+ :page-size="channelogParam.pageSize"
|
|
|
+ :total="channelogParam.totalResult"
|
|
|
+ :layouts="[
|
|
|
+ 'PrevPage',
|
|
|
+ 'JumpNumber',
|
|
|
+ 'NextPage',
|
|
|
+ 'FullJump',
|
|
|
+ 'Sizes',
|
|
|
+ 'Total',
|
|
|
+ ]"
|
|
|
+ @page-change="handlePageChangeChannelog"
|
|
|
+ />
|
|
|
</template>
|
|
|
</vxe-modal>
|
|
|
<!-- 同步 -->
|
|
@@ -112,11 +166,21 @@
|
|
|
<template #default>
|
|
|
<el-form ref="form" label-width="80px">
|
|
|
<el-form-item label="选择时间">
|
|
|
- <el-date-picker v-model="pushdataDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="pushdataDate"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" mini @click="onSubmit">立即同步</el-button>
|
|
|
+ <el-button type="primary" mini @click="onSubmit"
|
|
|
+ >立即同步</el-button
|
|
|
+ >
|
|
|
<el-button @click="pushdata = false" mini>取消</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -129,42 +193,82 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="channelKey" label="渠道key" width="180">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="fullCode" label="完整渠道编码">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column prop="fullCode" label="完整渠道编码"> </el-table-column>
|
|
|
<el-table-column prop="address" label="渠道类别"> </el-table-column>
|
|
|
- <el-table-column prop="channelStatus" label="渠道形态">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column prop="channelStatus" label="渠道形态"> </el-table-column>
|
|
|
<el-table-column prop="channelStatus" label="状态">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch :value="scope.row.channelStatus" :active-value="1" :inactive-value="0"></el-switch>
|
|
|
+ <el-tag v-if="scope.row.channelStatus == 1" type="success"
|
|
|
+ >生效</el-tag
|
|
|
+ >
|
|
|
+ <el-tag v-else type="warning">关闭</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="onlineTime" label="生效时间"> </el-table-column>
|
|
|
<el-table-column prop="channelCode" label="操作">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button @click="toEdit(row.id, 'erji')" size="mini" type="text" icon="el-icon-edit">编辑</el-button>
|
|
|
- <el-button @click="checkpushdata(row)" size="mini" type="text" icon="el-icon-edit">查询同步</el-button>
|
|
|
- <el-button size="mini" type="text" icon="el-icon-plus" @click="copy(row)">复制链接</el-button>
|
|
|
- <el-button @click="giveShort(row)" size="mini" type="text" icon="el-icon-share">短链接</el-button>
|
|
|
- <el-button @click="ewm(row)" size="mini" type="text" icon="el-icon-mobile-phone">二维码</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="toEdit(row.id, 'erji')"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="checkpushdata(row)"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ >查询同步</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="copy(row)"
|
|
|
+ >复制链接</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="giveShort(row)"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-share"
|
|
|
+ >短链接</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="ewm(row)"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-mobile-phone"
|
|
|
+ >二维码</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination v-show="total>0" :total="total" :page.sync="tableData.pageNo" :limit.sync="tableData.pageSize" @pagination="pagination" />
|
|
|
- </el-container>
|
|
|
-
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="tableData.pageNo"
|
|
|
+ :limit.sync="tableData.pageSize"
|
|
|
+ @pagination="pagination"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { exportChannel } from './api'
|
|
|
-import { post, get, } from "@/api/common";
|
|
|
+import {
|
|
|
+ exportChannel,
|
|
|
+ Channelsecondd,
|
|
|
+ listChannel,
|
|
|
+ listChanneGet,
|
|
|
+} from "./api";
|
|
|
+import { post, get } from "@/api/common";
|
|
|
import QRCode from "qrcodejs2";
|
|
|
|
|
|
export default {
|
|
|
name: "SchemeEdit",
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
id: this.$route.query.id,
|
|
|
searchForm: {
|
|
@@ -188,48 +292,51 @@ export default {
|
|
|
content: {
|
|
|
id: this.$route.query.id,
|
|
|
},
|
|
|
- strategyStatus: [{
|
|
|
- label: "生效中",
|
|
|
- value: "1",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "未生效",
|
|
|
- value: "0",
|
|
|
- },
|
|
|
+ strategyStatus: [
|
|
|
+ {
|
|
|
+ label: "生效中",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "未生效",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
],
|
|
|
- typeList: [{
|
|
|
- value: "集团渠道",
|
|
|
- label: "集团渠道",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "省分线下渠道",
|
|
|
- label: "省分线下渠道",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "省分线上渠道",
|
|
|
- label: "省分线上渠道",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "互联网渠道",
|
|
|
- label: "互联网渠道",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "自有线上渠道",
|
|
|
- label: "自有线上渠道",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "社会代理和其他渠道",
|
|
|
- label: "社会代理和其他渠道",
|
|
|
- },
|
|
|
+ typeList: [
|
|
|
+ {
|
|
|
+ value: "集团渠道",
|
|
|
+ label: "集团渠道",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "省分线下渠道",
|
|
|
+ label: "省分线下渠道",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "省分线上渠道",
|
|
|
+ label: "省分线上渠道",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "互联网渠道",
|
|
|
+ label: "互联网渠道",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "自有线上渠道",
|
|
|
+ label: "自有线上渠道",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "社会代理和其他渠道",
|
|
|
+ label: "社会代理和其他渠道",
|
|
|
+ },
|
|
|
],
|
|
|
- patnerList: [{
|
|
|
- value: "0",
|
|
|
- label: "V1",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "1",
|
|
|
- label: "V2",
|
|
|
- },
|
|
|
+ patnerList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "V1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "V2",
|
|
|
+ },
|
|
|
],
|
|
|
|
|
|
dialogVisible: false,
|
|
@@ -248,9 +355,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- value5 (val) {
|
|
|
+ value5(val) {
|
|
|
if (val) {
|
|
|
-
|
|
|
get("/channel/log/page", this.channelogParam).then((res) => {
|
|
|
this.channelog = res.data.list;
|
|
|
this.channelogParam.totalResult = res.data.total;
|
|
@@ -262,73 +368,69 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.getSecondList();
|
|
|
},
|
|
|
methods: {
|
|
|
// 改变页码触发
|
|
|
- pagination (page) {
|
|
|
+ pagination(page) {
|
|
|
this.pageNo = page.page;
|
|
|
// 重新获取列表数据
|
|
|
this.init();
|
|
|
},
|
|
|
|
|
|
//重置
|
|
|
- reset () {
|
|
|
- this.searchForm = {}
|
|
|
+ reset() {
|
|
|
+ this.searchForm = {};
|
|
|
},
|
|
|
|
|
|
//获取列表
|
|
|
- getSecondList () {
|
|
|
+ getSecondList() {
|
|
|
document.title = "一级渠道详情";
|
|
|
this.searchForm.parentId = this.$route.query.id;
|
|
|
- get("/channel/info/get", {
|
|
|
+
|
|
|
+ listChanneGet({
|
|
|
id: this.$route.query.id,
|
|
|
}).then((res) => {
|
|
|
this.content = res.data;
|
|
|
- this.total = res.data.total;
|
|
|
-
|
|
|
+ // console.log(res.data, " res.data.total");
|
|
|
+ // this.total = res.data.total;
|
|
|
});
|
|
|
+
|
|
|
this.init();
|
|
|
},
|
|
|
|
|
|
- pagination (page) {
|
|
|
+ pagination(page) {
|
|
|
this.pageNo = page.page;
|
|
|
// 重新获取列表数据
|
|
|
this.getSecondList();
|
|
|
},
|
|
|
//搜索按钮
|
|
|
- search () {
|
|
|
+ search() {
|
|
|
if (!this.searchForm.channelName || !this.searchForm.channelPartner) {
|
|
|
- this.$message.error("请输入内容")
|
|
|
+ this.$message.error("请输入内容");
|
|
|
} else {
|
|
|
- get("/channel/info/listChannels", this.searchForm).then((res) => {
|
|
|
-
|
|
|
- this.tableData = res.data.list
|
|
|
+ Channelsecondd(this.searchForm).then((res) => {
|
|
|
+ this.tableData = res.data.list;
|
|
|
this.total = res.data.list.length;
|
|
|
-
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
|
|
|
// 一级编辑
|
|
|
- oneTOEdit (id) {
|
|
|
+ oneTOEdit(id) {
|
|
|
this.$router.push("/channel/channelEdit?ids=" + id);
|
|
|
},
|
|
|
//二级编辑
|
|
|
- toEdit (id, type) {
|
|
|
+ toEdit(id, type) {
|
|
|
this.$router.push("/channel/channelEdit?ids=" + id);
|
|
|
},
|
|
|
|
|
|
- formatterWotv ({
|
|
|
- cellValue
|
|
|
- }) {
|
|
|
+ formatterWotv({ cellValue }) {
|
|
|
return cellValue !== "1" ? "关闭" : "开启";
|
|
|
},
|
|
|
//复制链接
|
|
|
- copy (row) {
|
|
|
+ copy(row) {
|
|
|
let oInput = document.createElement("input");
|
|
|
oInput.value = `https://operation.mige.tv/a/#/${row.channelKey}`;
|
|
|
document.body.appendChild(oInput);
|
|
@@ -341,7 +443,7 @@ export default {
|
|
|
oInput.remove();
|
|
|
},
|
|
|
//短链接
|
|
|
- giveShort (row) {
|
|
|
+ giveShort(row) {
|
|
|
let stUrl = row.shortUrl;
|
|
|
if (stUrl) {
|
|
|
let oInput = document.createElement("input");
|
|
@@ -375,49 +477,54 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
//导出
|
|
|
- download () {
|
|
|
- this.$modal.confirm('是否确认导出所有渠道数据?').then(function () {
|
|
|
- return exportChannel();
|
|
|
- }).then(response => {
|
|
|
- this.$download.excel(response, '渠道数据.xlsx');
|
|
|
- })
|
|
|
+ download() {
|
|
|
+ this.$modal
|
|
|
+ .confirm("是否确认导出所有渠道数据?")
|
|
|
+ .then(function () {
|
|
|
+ return exportChannel();
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ this.$download.excel(response, "渠道数据.xlsx");
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
//历史记录分页
|
|
|
- handlePageChangeChannelog ({
|
|
|
- currentPage,
|
|
|
- pageSize
|
|
|
- }) {
|
|
|
+ handlePageChangeChannelog({ currentPage, pageSize }) {
|
|
|
this.channelogParam.pageNo = currentPage;
|
|
|
this.channelogParam.pageSize = pageSize;
|
|
|
- get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
|
|
|
|
|
|
+ listChannelHistory(this.channelogParam).then((res) => {
|
|
|
this.channelog = res.data.list;
|
|
|
+ console.log(res.data.total, "res.data.total");
|
|
|
this.channelogParam.totalResult = res.data.total;
|
|
|
});
|
|
|
+ // get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
|
|
|
+ // this.channelog = res.data.list;
|
|
|
+ // this.channelogParam.totalResult = res.data.total;
|
|
|
+ // });
|
|
|
},
|
|
|
//获取二级列表
|
|
|
- init () {
|
|
|
- get("/channel/info/listChannels", this.initfrom).then((res) => {
|
|
|
+ init() {
|
|
|
+ Channelsecondd(this.initfrom).then((res) => {
|
|
|
let secondList = res.data.list.filter((item) => {
|
|
|
return item.parentId == this.$route.query.id;
|
|
|
});
|
|
|
|
|
|
this.tableData = secondList;
|
|
|
+ console.log(secondList.length, "secondList.length");
|
|
|
this.total = secondList.length;
|
|
|
this.oldform = secondList;
|
|
|
});
|
|
|
},
|
|
|
//历史记录搜索
|
|
|
- searchEvent () {
|
|
|
- get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
|
|
|
+ searchEvent() {
|
|
|
+ listChannelHistory(this.channelogParam).then((res) => {
|
|
|
this.channelog = res.data.list;
|
|
|
this.channelogParam.totalResult = res.data.total;
|
|
|
});
|
|
|
},
|
|
|
- ewm (row) {
|
|
|
+ ewm(row) {
|
|
|
this.dialogVisible = true;
|
|
|
this.$nextTick(function () {
|
|
|
document.getElementById("qrcode").innerHTML = "";
|
|
@@ -429,7 +536,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- checkpushdata (e) {
|
|
|
+ checkpushdata(e) {
|
|
|
get("/channelInfo/detail", {
|
|
|
id: e.id,
|
|
|
}).then((res1) => {
|
|
@@ -450,9 +557,10 @@ export default {
|
|
|
this.pushdataDate = [bigentime, endtime];
|
|
|
post(
|
|
|
"/channelInfo/pushdata?beginTime=" +
|
|
|
- this.pushdataDate[0] +
|
|
|
- "&endTime=" +
|
|
|
- this.pushdataDate[1], {}
|
|
|
+ this.pushdataDate[0] +
|
|
|
+ "&endTime=" +
|
|
|
+ this.pushdataDate[1],
|
|
|
+ {}
|
|
|
).then((res) => {
|
|
|
this.$message({
|
|
|
message: channel.channelName + "同步成功",
|
|
@@ -464,19 +572,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- add (e, type, channelName) {
|
|
|
+ add(e, type, channelName) {
|
|
|
this.$router.push(
|
|
|
"/channel/channelEdit?id=" +
|
|
|
- e.id +
|
|
|
- "&type=" +
|
|
|
- type +
|
|
|
- "&firstChannelName=" +
|
|
|
- channelName
|
|
|
+ e.id +
|
|
|
+ "&type=" +
|
|
|
+ type +
|
|
|
+ "&firstChannelName=" +
|
|
|
+ channelName
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style scoped></style>
|