|
|
@@ -1,159 +1,91 @@
|
|
|
<template>
|
|
|
- <div class="upload_Link_Distributor">
|
|
|
- <!-- <span><b>厂商链接上传</b></span> -->
|
|
|
- <div class="Head">
|
|
|
- <div class="search HeadLeft">
|
|
|
+ <div class="upload_links">
|
|
|
+ <div class="header">
|
|
|
+ <div class="search">
|
|
|
<div class="input">
|
|
|
<img src="../../img/search.png" />
|
|
|
<input
|
|
|
type="text"
|
|
|
@focus="focusInput"
|
|
|
v-model="inputValue"
|
|
|
+ class="inputFocus"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div class="area">
|
|
|
+ <p>所属区域</p>
|
|
|
+ <select v-model="areaValue">
|
|
|
+ <option value="">请选择</option>
|
|
|
+ <option v-for="(item, index) in areaLists" :key="index">
|
|
|
+ {{ item.area }}
|
|
|
+ </option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="time">
|
|
|
+ <p>请选择时间段</p>
|
|
|
+ <input type="date" v-model="startTime" />
|
|
|
+ <span>至</span>
|
|
|
+ <input type="date" v-model="endTime" />
|
|
|
+ </div>
|
|
|
+ <div class="current_button" @click="search">搜索</div>
|
|
|
</div>
|
|
|
- <div class="HeadCenter">
|
|
|
- <span>所属区域</span>
|
|
|
- <select name="" id="">
|
|
|
- <option value="">请选择</option>
|
|
|
- <option value="">汽车之家</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="HeadRight">
|
|
|
- <span>选择时间段</span>
|
|
|
- <input type="datetimeNew" name="beginTime" placeholder="开始时间" />
|
|
|
- <span>至</span>
|
|
|
- <input type="datetimeNew" name="endTime" placeholder="结束时间" />
|
|
|
- </div>
|
|
|
- <div class="current_button" @click="search">确定</div>
|
|
|
</div>
|
|
|
- <div class="tableTitle"><b>针对论坛及其他平台链接上传</b></div>
|
|
|
- <div class="tableBox">
|
|
|
- <table class="distributorLinkTable">
|
|
|
- <thead class="theadStyle">
|
|
|
- <tr class="tableHeadStyle1">
|
|
|
- <td style="width: 1069px">基础信息</td>
|
|
|
- <td>论坛传播情况汇总</td>
|
|
|
- </tr>
|
|
|
- <tr class="tableHeadStyle2">
|
|
|
- <td v-for="(item, index) in tableHeader" :key="index">
|
|
|
- {{ item }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody class="bodyStyle">
|
|
|
- <tr
|
|
|
- class="bodyContent tableHeadStyle2"
|
|
|
- v-for="(obj, index) in tableData"
|
|
|
- :key="index"
|
|
|
- :class="{ table_gray: !discolor && index % 2 === 0 }"
|
|
|
- >
|
|
|
- <td v-if="flag">{{ index + 1 }}</td>
|
|
|
- <td v-for="(item, i) in obj" :key="i">{{ item }}</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <div class="count">
|
|
|
+ <p>针对论坛及其它平台链接上传</p>
|
|
|
+ <Count :sum="sum" />
|
|
|
</div>
|
|
|
- <div class="pageBottom">
|
|
|
- <button>导出</button>
|
|
|
- <TablePage
|
|
|
- :currentPage="currentPage"
|
|
|
- :totalPage="totalPage"
|
|
|
- @change_page="changePage"
|
|
|
- @jump_page="jumpPage"
|
|
|
- ></TablePage>
|
|
|
+ <div class="tableBox">
|
|
|
+ <Table :tableData="tableData"></Table>
|
|
|
</div>
|
|
|
+
|
|
|
+ <TablePage
|
|
|
+ :currentPage="currentPage"
|
|
|
+ :totalPage="totalPage"
|
|
|
+ @change_page="changePage"
|
|
|
+ @jump_page="jumpPage"
|
|
|
+ ></TablePage>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { AREASLIST } from "./uploadinfo";
|
|
|
import TablePage from "../../components/TablePage";
|
|
|
+import Count from "../../components/Count";
|
|
|
+import Table from "./components/UploadLinksTable";
|
|
|
export default {
|
|
|
- props: {
|
|
|
- isManufacturer: {
|
|
|
- type: String,
|
|
|
- default: "distributor",
|
|
|
- },
|
|
|
- },
|
|
|
components: {
|
|
|
TablePage,
|
|
|
+ Count,
|
|
|
+ Table,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
inputValue: "DLR Code / 经销商",
|
|
|
- // 表格配置
|
|
|
- sum: 240, // 一共有多少条数据
|
|
|
- pageSize: 20, // 每页展示的数据
|
|
|
- discolor: false, // false是隔行变色
|
|
|
+ sum: 120,
|
|
|
currentPage: 1,
|
|
|
- tableHeader: [
|
|
|
- "NO.",
|
|
|
- "DLR Code",
|
|
|
- "经销商名称",
|
|
|
- "所属区域",
|
|
|
- "发布日期",
|
|
|
- "资料名称",
|
|
|
- "反馈日期",
|
|
|
- "车系",
|
|
|
- "车型",
|
|
|
- "发布平台",
|
|
|
- "发布版块",
|
|
|
- "项目分类",
|
|
|
- "内容分类1",
|
|
|
- "内容分类2",
|
|
|
- "标题",
|
|
|
- ],
|
|
|
+ pageSize: 20,
|
|
|
tableData: [
|
|
|
{
|
|
|
code: "L2021",
|
|
|
name: "雷克萨斯ES上市",
|
|
|
- area: "雷克萨斯ES",
|
|
|
- date: "2021/03/04",
|
|
|
- dataName: "雷克萨斯ES",
|
|
|
+ area: "北区",
|
|
|
+ time: "2021/03/04",
|
|
|
+ dataName: "雷克萨斯ES上市",
|
|
|
feedbackTime: "2021/03/04",
|
|
|
carSeries: "雷克萨斯ES",
|
|
|
carType: "ES雷克萨斯",
|
|
|
- releaseMedia: "S雷克萨斯",
|
|
|
- releasePlate: "东区",
|
|
|
+ releaseMedia: "汽车之家",
|
|
|
+ releasePlate: "ES论坛",
|
|
|
projectClass: "东区",
|
|
|
- contentClass1: "ES雷克萨斯",
|
|
|
- contentClass2: "ES雷克萨斯",
|
|
|
- articleTitle: "S雷克萨斯",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "L2021",
|
|
|
- name: "雷克萨斯ES上市",
|
|
|
- area: "雷克萨斯ES",
|
|
|
- date: "2021/03/04",
|
|
|
- dataName: "雷克萨斯ES",
|
|
|
- feedbackTime: "2021/03/04",
|
|
|
- carSeries: "雷克萨斯ES",
|
|
|
- carType: "ES雷克萨斯",
|
|
|
- releaseMedia: "S雷克萨斯",
|
|
|
- releasePlate: "东区",
|
|
|
- projectClass: "东区",
|
|
|
- contentClass1: "ES雷克萨斯",
|
|
|
- contentClass2: "ES雷克萨斯",
|
|
|
- articleTitle: "S雷克萨斯",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "L2021",
|
|
|
- name: "雷克萨斯ES上市",
|
|
|
- area: "雷克萨斯ES",
|
|
|
- date: "2021/03/04",
|
|
|
- dataName: "雷克萨斯ES",
|
|
|
- feedbackTime: "2021/03/04",
|
|
|
- carSeries: "雷克萨斯ES",
|
|
|
- carType: "ES雷克萨斯",
|
|
|
- releaseMedia: "S雷克萨斯",
|
|
|
- releasePlate: "东区",
|
|
|
- projectClass: "东区",
|
|
|
- contentClass1: "ES雷克萨斯",
|
|
|
- contentClass2: "ES雷克萨斯",
|
|
|
- articleTitle: "S雷克萨斯",
|
|
|
+ contentClass: "产品",
|
|
|
+ contentClass2: "活动",
|
|
|
+ articleTitle: "雷克萨斯全新ES上市",
|
|
|
+ articleLink: "http://localhost:8080/#/uploadLinks",
|
|
|
},
|
|
|
],
|
|
|
- flag: true,
|
|
|
+ areaLists: AREASLIST,
|
|
|
+ areaValue: "",
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -163,15 +95,25 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 当焦点在选择框时,清空选择框
|
|
|
focusInput: function () {
|
|
|
this.inputValue = "";
|
|
|
},
|
|
|
search: function () {
|
|
|
- console.log(this.inputValue);
|
|
|
+ let data= {
|
|
|
+ page: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ code: this.inputValue,
|
|
|
+ area: this.areaValue,
|
|
|
+ startTime: this.startTime,
|
|
|
+ endTime: this.areaValue
|
|
|
+ }
|
|
|
+ this.firmsLinkUpload(data);
|
|
|
this.inputValue = "DLR Code / 经销商";
|
|
|
},
|
|
|
- getIndex: function (index) {
|
|
|
- console.log("inGetIndex", index);
|
|
|
+ changePage: function (page) {
|
|
|
+ this.currentPage = page;
|
|
|
+ console.log(page);
|
|
|
},
|
|
|
// 点击上一页,下一页,首页,尾页
|
|
|
jumpPage: function (item) {
|
|
|
@@ -189,173 +131,130 @@ export default {
|
|
|
this.currentPage = this.totalPage;
|
|
|
break;
|
|
|
}
|
|
|
- console.log(this.currentPage);
|
|
|
+ let data= {
|
|
|
+ page: this.currentPage
|
|
|
+ }
|
|
|
+ this.firmsLinkUpload(data);
|
|
|
},
|
|
|
- changePage: function (page) {
|
|
|
- this.currentPage = page;
|
|
|
- console.log(page);
|
|
|
+ // 获取表格数据
|
|
|
+ firmsLinkUpload: function (data) {
|
|
|
+ this.$http({
|
|
|
+ method: "post",
|
|
|
+ url: "/firmsLinkUpload",
|
|
|
+ data: data,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.firmsLinkUpload();
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
-.Head {
|
|
|
- height: 55px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-.Head span {
|
|
|
- margin-right: 15px;
|
|
|
-}
|
|
|
-.tableBox {
|
|
|
- width: 1030px;
|
|
|
- overflow: auto;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-.tableBox table {
|
|
|
- border-collapse: collapse;
|
|
|
- border: none;
|
|
|
-}
|
|
|
-.table_gray {
|
|
|
- background-color: #00549f;
|
|
|
-}
|
|
|
-.tableBox td {
|
|
|
- border: 1px solid #ccc;
|
|
|
- border-bottom: 0px;
|
|
|
- border-right: 0px;
|
|
|
-}
|
|
|
-.tableBox table td {
|
|
|
- text-overflow: ellipsis;
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
-}
|
|
|
-// 表头样式
|
|
|
-.theadStyle tr td {
|
|
|
- color: white;
|
|
|
- background-color: #8d9092;
|
|
|
-}
|
|
|
-.tableHeadStyle1 {
|
|
|
- background: #848484;
|
|
|
- color: #fff;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-.tableHeadStyle1 td {
|
|
|
- width: 100%;
|
|
|
-}
|
|
|
-/* .tableHeadStyle1 td:nth-child(1) {
|
|
|
- border-right: 0px;
|
|
|
- border-bottom: 0px;
|
|
|
-} */
|
|
|
-/* .tableHeadStyle1 td:nth-child(2) {
|
|
|
- border-right: 0px;
|
|
|
- border-bottom: 0px;
|
|
|
-} */
|
|
|
-.tableHeadStyle2 {
|
|
|
- background: #848484;
|
|
|
- color: #fff;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-.tableHeadStyle2 td {
|
|
|
- width: 60px;
|
|
|
-}
|
|
|
-.tableHeadStyle2 td:nth-child(10) {
|
|
|
- width: 100px;
|
|
|
-}
|
|
|
-.tableHeadStyle2 td:nth-child(11) {
|
|
|
- width: 100px;
|
|
|
-}
|
|
|
-.tableHeadStyle2 td:nth-child(12) {
|
|
|
- width: 100px;
|
|
|
-}
|
|
|
-.tableHeadStyle2 td:nth-child(2) {
|
|
|
- width: 100px;
|
|
|
-}
|
|
|
-.tableHeadStyle2 td:nth-child(3) {
|
|
|
- width: 100px;
|
|
|
-}
|
|
|
-.bodyStyle {
|
|
|
- display: block;
|
|
|
- background-color: #fff;
|
|
|
-}
|
|
|
-/* .bodyStyle tr:nth-child(1) {
|
|
|
- border-top: 0px;
|
|
|
-} */
|
|
|
-.bodyContent td {
|
|
|
- background-color: #fff;
|
|
|
- height: 20px;
|
|
|
-}
|
|
|
-.bodyContent td:last-child {
|
|
|
- color: #027db4;
|
|
|
-}
|
|
|
-
|
|
|
-/* 搜索栏 */
|
|
|
-.search {
|
|
|
- padding: 10px 15px 10px 10px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .input {
|
|
|
- background-color: #fff;
|
|
|
- padding: 2px;
|
|
|
- display: flex;
|
|
|
- img {
|
|
|
- width: 16px;
|
|
|
- height: 16px;
|
|
|
- border: 1px solid #ccc;
|
|
|
- border-radius: 4px;
|
|
|
+.upload_links {
|
|
|
+ .header {
|
|
|
+ padding: 10px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ .search {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .input {
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ padding: 2px;
|
|
|
+ display: flex;
|
|
|
+ img {
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ }
|
|
|
+ input {
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ margin-left: 3px;
|
|
|
+ color: #555;
|
|
|
+ font-size: 12px;
|
|
|
+ height: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- input {
|
|
|
- background-color: #fff;
|
|
|
- border: 0px solid #ccc;
|
|
|
- padding-left: 4px;
|
|
|
- color: #555;
|
|
|
- font-size: 12px;
|
|
|
+ .area {
|
|
|
+ margin-left: 20px;
|
|
|
+ display: flex;
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ select {
|
|
|
+ margin-left: 10px;
|
|
|
+ height: 28px;
|
|
|
+ width: 120px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #555;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ option {
|
|
|
+ font-size: 12px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .time {
|
|
|
+ display: flex;
|
|
|
+ margin-left: 20px;
|
|
|
+ p {
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ input {
|
|
|
+ height: 26px;
|
|
|
+ padding: 0;
|
|
|
+ outline: none;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ .count {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-top: 5px;
|
|
|
+ p {
|
|
|
+ margin-top: 10px;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tableBox {
|
|
|
+ width: 1030px;
|
|
|
+ overflow: auto;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
-.current_button {
|
|
|
- width: 58px;
|
|
|
- height: 24px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- border-radius: 4px;
|
|
|
-}
|
|
|
-.HeadCenter span {
|
|
|
- padding: 10px;
|
|
|
-}
|
|
|
-.HeadCenter select {
|
|
|
- width: 80px;
|
|
|
- margin-right: 15px;
|
|
|
-}
|
|
|
-.HeadRight span {
|
|
|
- padding: 10px;
|
|
|
-}
|
|
|
-.HeadRight input {
|
|
|
- margin-right: 15px;
|
|
|
- padding-left: 4px;
|
|
|
-}
|
|
|
-.tableTitle {
|
|
|
- margin-bottom: 4px;
|
|
|
-}
|
|
|
-.distributorLinkTable {
|
|
|
- height: 600px;
|
|
|
-}
|
|
|
-.distributorLinkTable td {
|
|
|
- height: 36px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- padding: 0px 10px;
|
|
|
+.inputFocus {
|
|
|
+ outline: none;
|
|
|
+ border: 1px solid #ccc;
|
|
|
}
|
|
|
-.pageBottom{
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
+.inputFocus:focus {
|
|
|
+ animation: shadowAni 200ms linear forwards;
|
|
|
}
|
|
|
-.pageBottom button{
|
|
|
- border-radius: 4px;
|
|
|
- width: 80px;
|
|
|
+@keyframes shadowAni {
|
|
|
+ 0% {
|
|
|
+ border-color: #cccccc;
|
|
|
+ box-shadow: inset 0px 0px 0 #ccc;
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ border-color: #75b9f0;
|
|
|
+ box-shadow: 0px 0px 5px #75b9f0;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|