|
|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<div class="modal-backdrop">
|
|
|
<div class="modal">
|
|
|
- <!-- id="unloadFile" :style="mainStyles"-->
|
|
|
<div class="modal-header">
|
|
|
<span>编辑</span>
|
|
|
</div>
|
|
|
@@ -29,7 +28,7 @@
|
|
|
<option
|
|
|
v-for="(item, index) in carSeries"
|
|
|
:key="index"
|
|
|
- :value="item.id"
|
|
|
+ :value="item.typeName"
|
|
|
>
|
|
|
{{ item.typeName }}
|
|
|
</option>
|
|
|
@@ -134,12 +133,6 @@ export default {
|
|
|
return "";
|
|
|
},
|
|
|
},
|
|
|
- /* sonPlatformId: {
|
|
|
- type: String,
|
|
|
- default: () => {
|
|
|
- return "";
|
|
|
- },
|
|
|
- }, */
|
|
|
releasePlate: {
|
|
|
type: Array,
|
|
|
default: () => {
|
|
|
@@ -154,7 +147,6 @@ export default {
|
|
|
carType: [],
|
|
|
content1: [],
|
|
|
content2: [],
|
|
|
- // releasePlate: [],this.LinkData.carTypeName
|
|
|
|
|
|
carS: "",
|
|
|
carT: "",
|
|
|
@@ -163,7 +155,7 @@ export default {
|
|
|
content1Id: "",
|
|
|
content2Id: "",
|
|
|
|
|
|
- carTypeName: "",
|
|
|
+ carTypeId: "",
|
|
|
contentTypeName: "",
|
|
|
informationId: "",
|
|
|
mediaTitle: "",
|
|
|
@@ -176,43 +168,14 @@ export default {
|
|
|
ziliaoTime: "",
|
|
|
contentName1: "",
|
|
|
contentName2: "",
|
|
|
-
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
closeSelf() {
|
|
|
this.$emit("closeme");
|
|
|
- console.log(this.LinkData);
|
|
|
+ console.log(this.LinkData);
|
|
|
},
|
|
|
- /* getAllFileInfo: function () {
|
|
|
- let obj = {};
|
|
|
- //获取资料名
|
|
|
- obj = this.dataName.find(function (item) {
|
|
|
- return item.id === this.ziliaoId;
|
|
|
- });
|
|
|
- this.ziliaoName = obj.informationName;
|
|
|
- //获取车系
|
|
|
- obj = this.carSeries.find(function (item) {
|
|
|
- return item.id === this.ziliaoId;
|
|
|
- });
|
|
|
- this.carTypeName = obj.typeName;
|
|
|
- //获取车型 this.carT
|
|
|
- //获取平台 this.selectedPlatform,
|
|
|
- let info = {
|
|
|
- informationName: this.ziliaoName,
|
|
|
- releaseTime: this.ziliaoTime,
|
|
|
- carService: this.carTypeName,
|
|
|
- carType: this.carT,
|
|
|
- releasePlate: this.selectedPlatform,
|
|
|
- releaseMedia: this.releaseP,
|
|
|
- contentClass: "",
|
|
|
- articleTitle: this.mediaTitle,
|
|
|
- articleLink: this.mediaUrl,
|
|
|
- };
|
|
|
- console.log(info);
|
|
|
- }, */
|
|
|
- //message: "没有找到经销商信息"// url: "/importDealerFeedback",
|
|
|
- //message: "没有要导入的文件"
|
|
|
+
|
|
|
edit: function () {
|
|
|
let obj = {};
|
|
|
//获取资料名
|
|
|
@@ -221,12 +184,14 @@ export default {
|
|
|
return item.id === idVal;
|
|
|
});
|
|
|
this.ziliaoName = obj.informationName;
|
|
|
- //获取车系名
|
|
|
- let idCarS = this.carS;
|
|
|
+ //获取车系 id
|
|
|
+ let nameCarS = this.carS;
|
|
|
obj = this.carSeries.find(function (item) {
|
|
|
- return item.id === idCarS;
|
|
|
+ return item.typeName === nameCarS;
|
|
|
});
|
|
|
- this.carTypeName = obj.typeName;
|
|
|
+ console.log("chexi ", obj)
|
|
|
+ //carTypeId 表示车系 id
|
|
|
+ this.carTypeId = obj.id;
|
|
|
//获取车型名 this.carT
|
|
|
//获取平台名 this.selectedPlatform,
|
|
|
|
|
|
@@ -243,7 +208,7 @@ export default {
|
|
|
dataId: this.ziliaoId,
|
|
|
informationName: this.ziliaoName,
|
|
|
releaseTime: this.ziliaoTime,
|
|
|
- carService: this.carTypeName,
|
|
|
+ carService: this.carS,
|
|
|
carType: this.carT,
|
|
|
releasePlate: this.selectedPlatform,
|
|
|
releaseMedia: this.releaseP,
|
|
|
@@ -260,12 +225,14 @@ export default {
|
|
|
chooseDataName: function () {
|
|
|
this.$http({
|
|
|
url: "/firmsUploadListByAgent",
|
|
|
+ //url: "/firmsLinkUpload",
|
|
|
method: "post",
|
|
|
data: {},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
this.dataName = res.data.data;
|
|
|
+ console.log(this.dataName);
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -273,25 +240,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//发布版块
|
|
|
- /* chooseReleasePlate: function () {
|
|
|
- console.log(this.sonPlatformId)
|
|
|
- this.$http({
|
|
|
- url: "/base/publishPlatformManager/selectPublishPlatformList",
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- parentId: this.sonPlatformId
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- console.log(res)
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.releasePlate = res.data.data;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- }, */
|
|
|
+ /* chooseReleasePlate: function () {}, */
|
|
|
|
|
|
//不分页查询车系车型信息
|
|
|
chooseCarSeries: function () {
|
|
|
@@ -311,11 +260,19 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
chooseCarType: function () {
|
|
|
+ //获取车系 id
|
|
|
+ let obj={};
|
|
|
+ let nameCarS = this.carS;
|
|
|
+ obj = this.carSeries.find(function (item) {
|
|
|
+ return item.typeName === nameCarS;
|
|
|
+ });
|
|
|
+ this.carTypeId = obj.id;
|
|
|
+
|
|
|
this.$http({
|
|
|
url: "/base/carTypeManager/selectCarTypeList",
|
|
|
method: "post",
|
|
|
data: {
|
|
|
- parentId: this.carS || -1,
|
|
|
+ parentId: this.carTypeId || -1,
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
@@ -404,15 +361,31 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
initialData: function () {
|
|
|
- this.ziliaoId=this.LinkData.id;
|
|
|
- this.carS=this.LinkData.carTypeName;
|
|
|
- this.carT=this.LinkData.carPlatformName;
|
|
|
- console.log(this.LinkData);
|
|
|
- console.log(this.ziliaoId);
|
|
|
- }
|
|
|
+ // this.ziliaoId = this.LinkData.id;
|
|
|
+ this.mediaTitle = this.LinkData.mediaTitle;
|
|
|
+ this.mediaUrl = this.LinkData.mediaUrl;
|
|
|
+ this.carS = this.LinkData.carTypeName;
|
|
|
+
|
|
|
+ this.carT = this.LinkData.carPlatformName;
|
|
|
+ let time = this.LinkData.publishDate;
|
|
|
+ let m = time.slice(time.length-2,time.length);
|
|
|
+ let y = time.slice(0,4);
|
|
|
+ let temp=y + "-" + m + "-" + "01";
|
|
|
+ this.ziliaoTime = temp;
|
|
|
+ console.log("console.log(this.forceUpdate);", typeof time, m ,y);
|
|
|
|
|
|
+ //缺少对应列表值 已有资料名在数据中无法查询到
|
|
|
+ this.releaseP = this.LinkData.publishSourceName;
|
|
|
+
|
|
|
+ this.contentName1 = this.LinkData.contentTypeName;
|
|
|
+ this.contentName2 = this.LinkData.contentTypeName;
|
|
|
+ },
|
|
|
+ /* forceUpdata: function () {
|
|
|
+ this.$forceUpdate();
|
|
|
+ console.log("console.log(this.forceUpdate);");
|
|
|
+ }, */
|
|
|
},
|
|
|
mounted() {
|
|
|
this.chooseDataName();
|
|
|
@@ -420,8 +393,14 @@ export default {
|
|
|
this.firstContent1Classify();
|
|
|
this.firstContent2Classify();
|
|
|
//this.chooseReleasePlate();
|
|
|
+
|
|
|
this.initialData();
|
|
|
},
|
|
|
+/* created() {
|
|
|
+ console.log(this.LinkData);
|
|
|
+ this.ziliaoId = this.LinkData.id;
|
|
|
+ console.log(this.ziliaoId);
|
|
|
+ }, */
|
|
|
};
|
|
|
</script>
|
|
|
|