|
|
@@ -60,8 +60,10 @@
|
|
|
<span @click="toggleModal2(index)">删除</span>
|
|
|
<!-- 弹窗: 确定删除? -->
|
|
|
<deleteModal
|
|
|
+ v-if="showModal2"
|
|
|
@dataDel="toDel"
|
|
|
@hide_modal="closeme2"
|
|
|
+ :LinkData="modalData"
|
|
|
:showModalFlag="showModal2"
|
|
|
:chooseItemIndex="nowIndex"
|
|
|
></deleteModal>
|
|
|
@@ -96,7 +98,6 @@
|
|
|
name="fileName"
|
|
|
id="fileInput"
|
|
|
multiple
|
|
|
- accept=".xlsx, .xls"
|
|
|
/></label>
|
|
|
<!-- <button @click="toggleModal4()">导出</button> <input
|
|
|
type="file"
|
|
|
@@ -296,11 +297,13 @@ export default {
|
|
|
closeme: function () {
|
|
|
this.showModal = !this.showModal;
|
|
|
},
|
|
|
+ //删除
|
|
|
toggleModal2: function (i) {
|
|
|
this.showModal2 = !this.showModal2;
|
|
|
this.nowIndex = i;
|
|
|
this.modalData = this.tableData[i];
|
|
|
console.log("INtoggleModal2", this.modalData, this.nowIndex);
|
|
|
+
|
|
|
},
|
|
|
closeme2: function () {
|
|
|
this.showModal2 = !this.showModal2;
|
|
|
@@ -334,20 +337,20 @@ export default {
|
|
|
},
|
|
|
|
|
|
toDel: function (n) {
|
|
|
- // console.log("inToDel:", n);
|
|
|
+ console.log("inToDel:", n);
|
|
|
//清空数据
|
|
|
- if (n == -2) {
|
|
|
+ /* if (n == -2) {
|
|
|
this.tableData = "";
|
|
|
}
|
|
|
//清空某一项数据
|
|
|
{
|
|
|
let obj = this.tableData[n];
|
|
|
- // console.log(obj);
|
|
|
Object.keys(obj).forEach((key) => {
|
|
|
obj[key] = "";
|
|
|
});
|
|
|
- }
|
|
|
+ } */
|
|
|
this.showModal2 = !this.showModal2;
|
|
|
+ this.choosePlatform();
|
|
|
},
|
|
|
/* 表格翻页 */
|
|
|
changePage: function (page) {
|
|
|
@@ -409,14 +412,14 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//导入经销商反馈信息 经销商反馈服务>导入经销商反馈信息
|
|
|
- importDataList: function () {
|
|
|
+ /* importDataList: function () {
|
|
|
this.file = event.target.files;
|
|
|
this.fileDes = [];
|
|
|
this.file.forEach((item) => {
|
|
|
this.fileDes.push(item.name);
|
|
|
});
|
|
|
|
|
|
- /* this.$http({
|
|
|
+ this.$http({
|
|
|
url: "/importDealerFeedback",
|
|
|
method: "post",
|
|
|
data: {},
|
|
|
@@ -428,8 +431,8 @@ export default {
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
- });*/
|
|
|
- },
|
|
|
+ });
|
|
|
+ }, */
|
|
|
//导出excel
|
|
|
onOutputExcel: function () {
|
|
|
this.$http({
|
|
|
@@ -450,7 +453,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//导入excel
|
|
|
- onImportExcel: function () {
|
|
|
+ /* onImportExcel: function () {
|
|
|
this.$http({
|
|
|
url: "/importDealerFeedback",
|
|
|
method: "get",
|
|
|
@@ -465,7 +468,7 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- },
|
|
|
+ }, */
|
|
|
// 获取文件
|
|
|
getFileInfo: function (event) {
|
|
|
this.file = event.target.files;
|
|
|
@@ -480,14 +483,18 @@ export default {
|
|
|
// 导入接口
|
|
|
submitRequest: function () {
|
|
|
let paramData = new FormData();
|
|
|
- paramData.append("file", this.file);
|
|
|
+ //paramData.append("file", this.file);
|
|
|
+ this.file.forEach((item)=>{
|
|
|
+ paramData.append("file", item);
|
|
|
+ })
|
|
|
+ console.log(this.file);
|
|
|
this.$http
|
|
|
.uploadFile("/importDealerFeedback", paramData)
|
|
|
.then((res) => {
|
|
|
if (res.data && res.data.code === 200) {
|
|
|
console.log("上传成功!");
|
|
|
} else {
|
|
|
- alert("上传失败,请重试");
|
|
|
+ alert("上传失败,res.data || res.data.code !== 200");
|
|
|
console.log(res);
|
|
|
}
|
|
|
})
|
|
|
@@ -523,7 +530,7 @@ export default {
|
|
|
return item.platformName === val;
|
|
|
});
|
|
|
this.selectedPlatform = val;
|
|
|
- this.selectedPlatformId=obj.id;
|
|
|
+ this.selectedPlatformId = obj.id;
|
|
|
//获取可发布数量
|
|
|
this.getReleaseQuantity(obj.id);
|
|
|
|
|
|
@@ -540,19 +547,20 @@ export default {
|
|
|
let y = date.getFullYear();
|
|
|
let d = y + "/" + m;
|
|
|
this.$http({
|
|
|
- url: "/base/mediaPublishManager/selectMediaPublishList",
|
|
|
+ // url: "/base/mediaPublishManager/selectMediaPublishList",
|
|
|
+ url: "/base/mediaPublishManager/selectMediaPublishListByMonth",
|
|
|
method: "post",
|
|
|
data: {
|
|
|
- //publishPlatformId: val,
|
|
|
- //publishMonth: d,
|
|
|
- id: val,
|
|
|
- month: d,
|
|
|
+ publishPlatformId: val,
|
|
|
+ publishMonth: d,
|
|
|
+ //id: val,
|
|
|
+ // month: d,
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
console.log(res);
|
|
|
- this.publishCount = res.data.data[1].publishCount;
|
|
|
+ this.publishCount = res.data.data[0].publishCount;
|
|
|
let len = this.publishCount;
|
|
|
let l = this.tableData.length;
|
|
|
console.log("获取可发布数量", len, l);
|
|
|
@@ -632,7 +640,7 @@ export default {
|
|
|
}); */
|
|
|
},
|
|
|
//导入
|
|
|
- importFile: function () {
|
|
|
+ /* importFile: function () {
|
|
|
this.$http({
|
|
|
url: "/importDealerFeedback",
|
|
|
method: "get",
|
|
|
@@ -647,9 +655,9 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- },
|
|
|
+ }, */
|
|
|
//导出
|
|
|
- /* outputFile: function () {
|
|
|
+ /* outputFile: function () {
|
|
|
this.$http({
|
|
|
url: "/exportNoFactory",
|
|
|
method: "get",
|