|
|
@@ -22,18 +22,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bodyRow">
|
|
|
- <!-- <div class="contentCol1">
|
|
|
- <span>车系</span
|
|
|
- ><select v-model="carS" @change="chooseCarSeries">
|
|
|
- <option
|
|
|
- v-for="(item, index) in carSeries"
|
|
|
- :key="index"
|
|
|
- :value="item.typeName"
|
|
|
- >
|
|
|
- {{ item.typeName }}
|
|
|
- </option>
|
|
|
- </select>
|
|
|
- </div> -->
|
|
|
<div class="contentCol1">
|
|
|
<span>涉及车型</span
|
|
|
><select v-model="carT">
|
|
|
@@ -227,14 +215,16 @@ export default {
|
|
|
},
|
|
|
formatDateToDate: function (val) {
|
|
|
this.ziliaoTime = "";
|
|
|
- let date = new Date(val);
|
|
|
- let y = date.getFullYear();
|
|
|
- let m = date.getMonth() + 1;
|
|
|
- m = m < 10 ? "0" + m : m;
|
|
|
- let d = date.getDate();
|
|
|
- d = d < 10 ? "0" + d : d;
|
|
|
- const time = y + "-" + m + "-" + d;
|
|
|
- this.ziliaoTime = time;
|
|
|
+ if (val) {
|
|
|
+ let date = new Date(val);
|
|
|
+ let y = date.getFullYear();
|
|
|
+ let m = date.getMonth() + 1;
|
|
|
+ m = m < 10 ? "0" + m : m;
|
|
|
+ let d = date.getDate();
|
|
|
+ d = d < 10 ? "0" + d : d;
|
|
|
+ const time = y + "-" + m + "-" + d;
|
|
|
+ this.ziliaoTime = time;
|
|
|
+ }
|
|
|
},
|
|
|
// 判断非空
|
|
|
beforeEdit: function () {
|
|
|
@@ -304,24 +294,8 @@ export default {
|
|
|
},
|
|
|
edit: function () {
|
|
|
this.noEditFlag = false;
|
|
|
- let obj = {};
|
|
|
- //获取资料名
|
|
|
- /* let idVal = this.ziliaoId;
|
|
|
- obj = this.dataName.find(function (item) {
|
|
|
- return item.id === idVal;
|
|
|
- });
|
|
|
- this.ziliaoName = obj.informationName; */
|
|
|
this.beforeEdit();
|
|
|
if (!this.noEditFlag) {
|
|
|
- //获取车系 id
|
|
|
- let nameCarS = this.carS;
|
|
|
- obj = this.carSeries.find(function (item) {
|
|
|
- return item.typeName === nameCarS;
|
|
|
- });
|
|
|
- console.log("chexi ", obj);
|
|
|
- //carTypeId 表示车系 id
|
|
|
- // this.carTypeId = obj.id;
|
|
|
-
|
|
|
//当前月份
|
|
|
let date = new Date();
|
|
|
let m = date.getMonth() + 1;
|
|
|
@@ -355,7 +329,7 @@ export default {
|
|
|
};
|
|
|
if (this.LinkData.id) {
|
|
|
//编辑
|
|
|
- config.url = "/updateDealerFeedback";
|
|
|
+ config.url = "/lexus_php/api/add_report.php";
|
|
|
config.data.id = this.LinkData.id;
|
|
|
}
|
|
|
// else {
|
|
|
@@ -403,41 +377,44 @@ export default {
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
this.carType = res.data.data;
|
|
|
- this.chooseCarType();
|
|
|
+ console.log(res.data.data)
|
|
|
+ // this.chooseCarType();
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
- chooseCarType: function () {
|
|
|
- //清空下级select
|
|
|
- this.carT = "";
|
|
|
- //获取车系 id
|
|
|
- let obj = {};
|
|
|
- let nameCarS = this.carS;
|
|
|
- obj = this.carSeries.find(function (item) {
|
|
|
- return item.typeName === nameCarS;
|
|
|
- });
|
|
|
- this.carTypeId = obj.id;
|
|
|
+ // chooseCarType: function () {
|
|
|
+ // //清空下级select
|
|
|
+ // this.carT = "";
|
|
|
+ // //获取车系 id
|
|
|
+ // let obj = {};
|
|
|
+ // let nameCarS = this.carS;
|
|
|
+ // obj = this.carSeries.find(function (item) {
|
|
|
+ // return item.typeName === nameCarS;
|
|
|
+ // });
|
|
|
+ // console.log(obj,222)
|
|
|
+ // this.carTypeId = obj.id;
|
|
|
|
|
|
- this.$http({
|
|
|
- url: "/base/carTypeManager/selectCarTypeList",
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- parentId: this.carTypeId || "-",
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.carType = res.data.data;
|
|
|
- this.carT = this.LinkData.carPlatformName;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- },
|
|
|
+ // this.$http({
|
|
|
+ // url: "/base/carTypeManager/selectCarTypeList",
|
|
|
+ // method: "post",
|
|
|
+ // data: {
|
|
|
+ // parentId: this.carTypeId || "-",
|
|
|
+ // },
|
|
|
+ // })
|
|
|
+ // .then((res) => {
|
|
|
+ // console.log(res, 3333)
|
|
|
+ // if (res.data.code === 200) {
|
|
|
+ // this.carType = res.data.data;
|
|
|
+ // this.carT = this.LinkData.carPlatformName;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // console.log(err);
|
|
|
+ // });
|
|
|
+ // },
|
|
|
//不分页查询发布平台信息 内容分类1
|
|
|
//初次调用获得 content ID 用作 parentID
|
|
|
firstContent1Classify: function () {
|
|
|
@@ -519,23 +496,13 @@ export default {
|
|
|
else {
|
|
|
this.ziliaoId = this.$route.query.informationId;
|
|
|
}
|
|
|
-
|
|
|
this.mediaTitle = this.LinkData.mediaTitle;
|
|
|
this.mediaUrl = this.LinkData.mediaUrl;
|
|
|
- this.carS = this.LinkData.carTypeName;
|
|
|
-
|
|
|
+ // this.carS = this.LinkData.carTypeName;
|
|
|
this.carT = this.LinkData.carPlatformName;
|
|
|
- let time = this.LinkData.publishDate; //发布时间
|
|
|
- if (time != null) {
|
|
|
- if (time.length > 4) {
|
|
|
- let y = time.slice(0, 4);
|
|
|
- let m = time.slice(5, 7);
|
|
|
- let d = time.slice(8, 10);
|
|
|
- let temp = y + "-" + m + "-" + d;
|
|
|
- this.ziliaoTime = temp;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ this.ziliaoTime = this.LinkData.publishDate; //发布时间
|
|
|
+ let dateArr = this.ziliaoTime.split('-');
|
|
|
+ this.datePickValue = Date.parse(new Date(dateArr[0], +dateArr[1]-1, +dateArr[2]));
|
|
|
//publishPlatformName 发布渠道
|
|
|
this.releaseC = this.LinkData.publishPlatformName;
|
|
|
//publishSourceName 发布板块
|
|
|
@@ -562,10 +529,10 @@ export default {
|
|
|
alert("链接输入有误!\n示例:https://www.baidu.com");
|
|
|
}
|
|
|
/*
|
|
|
-this.ziliaoName && this.ziliaoTime &&this.carS &&this.carT&&
|
|
|
-this.releaseP&& th&& this.contentName1&&
|
|
|
-this.contentName2&& this.mediaTitle&& this.mediaUrl&&
|
|
|
-this.readCount&&this.goodCount&& this.bbsCount&& this.lookingCount */
|
|
|
+ this.ziliaoName && this.ziliaoTime &&this.carS &&this.carT&&
|
|
|
+ this.releaseP&& th&& this.contentName1&&
|
|
|
+ this.contentName2&& this.mediaTitle&& this.mediaUrl&&
|
|
|
+ this.readCount&&this.goodCount&& this.bbsCount&& this.lookingCount */
|
|
|
},
|
|
|
|
|
|
//下拉选择平台 渠道
|
|
|
@@ -622,9 +589,7 @@ this.readCount&&this.goodCount&& this.bbsCount&& this.lookingCount */
|
|
|
this.chooseCarSeries();
|
|
|
this.firstContent1Classify();
|
|
|
this.firstContent2Classify();
|
|
|
-
|
|
|
this.chooseChannel();
|
|
|
-
|
|
|
this.initialData();
|
|
|
},
|
|
|
};
|