|
|
@@ -8,22 +8,13 @@
|
|
|
<div class="bodyRow">
|
|
|
<span>资料名称</span>
|
|
|
<div>{{ ziliaoName }}</div>
|
|
|
- <!-- <select v-model="ziliaoId">
|
|
|
- <option
|
|
|
- v-for="(item, index) in dataName"
|
|
|
- :key="index"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- {{ item.informationName }}
|
|
|
- </option>
|
|
|
- </select> -->
|
|
|
</div>
|
|
|
<div class="bodyRow timeWidth">
|
|
|
<span>发布时间</span
|
|
|
><input type="date" placeholder="选择时间" v-model="ziliaoTime" />
|
|
|
</div>
|
|
|
<div class="bodyRow">
|
|
|
- <div class="contentCol1">
|
|
|
+ <!-- <div class="contentCol1">
|
|
|
<span>车系</span
|
|
|
><select v-model="carS" @change="chooseCarSeries">
|
|
|
<option
|
|
|
@@ -34,9 +25,9 @@
|
|
|
{{ item.typeName }}
|
|
|
</option>
|
|
|
</select>
|
|
|
- </div>
|
|
|
- <div class="contentCol2">
|
|
|
- <span>车型</span
|
|
|
+ </div> -->
|
|
|
+ <div class="contentCol1">
|
|
|
+ <span>涉及车型</span
|
|
|
><select v-model="carT">
|
|
|
<option
|
|
|
v-for="(item, index) in carType"
|
|
|
@@ -51,13 +42,21 @@
|
|
|
<div class="bodyRow">
|
|
|
<div class="contentCol1">
|
|
|
<span>发布渠道</span>
|
|
|
- <div>{{ selectedPlatform }}</div>
|
|
|
+ <select name="" id="" v-model="releaseC" @change="chooseChannel">
|
|
|
+ <option
|
|
|
+ v-for="(item, index) in releaseChannel"
|
|
|
+ :key="index"
|
|
|
+ :value="item.platformName"
|
|
|
+ >
|
|
|
+ {{ item.platformName }}
|
|
|
+ </option>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
<div class="contentCol2">
|
|
|
<span>平台版块</span
|
|
|
><select name="" id="" v-model="releaseP">
|
|
|
<option
|
|
|
- v-for="(item, index) in releaseMedia"
|
|
|
+ v-for="(item, index) in releasePlate"
|
|
|
:key="index"
|
|
|
:value="item.platformName"
|
|
|
>
|
|
|
@@ -66,12 +65,6 @@
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <div class="bodyRow">
|
|
|
- <span>项目分类</span
|
|
|
- ><select name="" id="">
|
|
|
- <option value="">请选择</option>
|
|
|
- </select>
|
|
|
- </div> -->
|
|
|
<div class="bodyRow">
|
|
|
<div class="contentCol1">
|
|
|
<span>稿件类别</span
|
|
|
@@ -115,7 +108,12 @@
|
|
|
</div>
|
|
|
<div class="contentCol2">
|
|
|
<span>在看/转发</span>
|
|
|
- <input type="number" placeholder="" min="0" v-model="lookingCount" />
|
|
|
+ <input
|
|
|
+ type="number"
|
|
|
+ placeholder=""
|
|
|
+ min="0"
|
|
|
+ v-model="lookingCount"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bodyRow longInput">
|
|
|
@@ -148,17 +146,9 @@ export default {
|
|
|
return {};
|
|
|
},
|
|
|
},
|
|
|
- selectedPlatform: {
|
|
|
+ fileName: {
|
|
|
type: String,
|
|
|
- default: () => {
|
|
|
- return "";
|
|
|
- },
|
|
|
- },
|
|
|
- releaseMedia: {
|
|
|
- type: Array,
|
|
|
- default: () => {
|
|
|
- return [];
|
|
|
- },
|
|
|
+ default: '',
|
|
|
},
|
|
|
},
|
|
|
data() {
|
|
|
@@ -172,6 +162,7 @@ export default {
|
|
|
carS: "",
|
|
|
carT: "",
|
|
|
releaseP: "",
|
|
|
+ releaseC: "",
|
|
|
ziliaoId: "",
|
|
|
content1Id: "",
|
|
|
content2Id: "",
|
|
|
@@ -194,6 +185,9 @@ export default {
|
|
|
goodCount: "",
|
|
|
bbsCount: "",
|
|
|
lookingCount: "",
|
|
|
+
|
|
|
+ releaseChannel: [],
|
|
|
+ releasePlate: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -204,7 +198,7 @@ export default {
|
|
|
edit: function () {
|
|
|
let obj = {};
|
|
|
//获取资料名
|
|
|
- /* let idVal = this.ziliaoId;
|
|
|
+ /* let idVal = this.ziliaoId;
|
|
|
obj = this.dataName.find(function (item) {
|
|
|
return item.id === idVal;
|
|
|
});
|
|
|
@@ -217,8 +211,6 @@ export default {
|
|
|
console.log("chexi ", obj);
|
|
|
//carTypeId 表示车系 id
|
|
|
this.carTypeId = obj.id;
|
|
|
- //获取车型名 this.carT
|
|
|
- //获取平台名 this.selectedPlatform,
|
|
|
|
|
|
//当前月份
|
|
|
let date = new Date();
|
|
|
@@ -237,10 +229,12 @@ export default {
|
|
|
releaseTime: this.ziliaoTime,
|
|
|
carService: this.carS,
|
|
|
carType: this.carT,
|
|
|
+
|
|
|
+ //发布平台 渠道
|
|
|
+ releaseMedia: this.releaseC,
|
|
|
//发布板块
|
|
|
releasePlate: this.releaseP,
|
|
|
- //发布平台
|
|
|
- releaseMedia: this.selectedPlatform,
|
|
|
+
|
|
|
draftGenre: this.contentName1,
|
|
|
|
|
|
//内容分类2?
|
|
|
@@ -268,62 +262,6 @@ export default {
|
|
|
this.$emit("update", config);
|
|
|
this.$emit("closeme");
|
|
|
},
|
|
|
- /* addInfo: function () {
|
|
|
- let obj = {};
|
|
|
- //获取资料名
|
|
|
- let idVal = this.ziliaoId;
|
|
|
- obj = this.dataName.find(function (item) {
|
|
|
- return item.id === idVal;
|
|
|
- });
|
|
|
- this.ziliaoName = obj.informationName;
|
|
|
- //获取车系 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;
|
|
|
- //获取车型名 this.carT
|
|
|
- //获取平台名 this.selectedPlatform,
|
|
|
-
|
|
|
- //当前月份
|
|
|
- let date = new Date();
|
|
|
- let m = date.getMonth() + 1;
|
|
|
- let y = date.getFullYear();
|
|
|
- let d = y + "/" + m;
|
|
|
-
|
|
|
- let config = {
|
|
|
- url: "/dealerFeedback",
|
|
|
- data: {
|
|
|
- id: "", //主键值
|
|
|
- month: d,
|
|
|
- dealerId: "254",
|
|
|
- dataId: this.ziliaoId,
|
|
|
- informationName: this.ziliaoName,
|
|
|
- releaseTime: this.ziliaoTime,
|
|
|
- carService: this.carS,
|
|
|
- carType: this.carT,
|
|
|
- //发布板块
|
|
|
- releasePlate: this.releaseP,
|
|
|
- //发布平台
|
|
|
- releaseMedia: this.selectedPlatform,
|
|
|
-
|
|
|
- draftGenre: this.contentName1,
|
|
|
- //内容分类2?
|
|
|
- contentClass: this.contentName2,
|
|
|
- articleTitle: this.mediaTitle,
|
|
|
- articleLink: this.mediaUrl,
|
|
|
-
|
|
|
- readCount: this.readCount,
|
|
|
- goodCount: this.goodCount,
|
|
|
- bbsCount: this.bbsCount,
|
|
|
- lookingCount: this.lookingCount,
|
|
|
- },
|
|
|
- };
|
|
|
- this.$emit("update", config);
|
|
|
- this.$emit("closeme");
|
|
|
- }, */
|
|
|
//资料名称列表
|
|
|
chooseDataName: function () {
|
|
|
this.$http({
|
|
|
@@ -352,9 +290,6 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
- //发布版块
|
|
|
- /* chooseReleasePlate: function () {}, */
|
|
|
-
|
|
|
//不分页查询车系车型信息
|
|
|
chooseCarSeries: function () {
|
|
|
this.$http({
|
|
|
@@ -480,9 +415,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
initialData: function () {
|
|
|
+ this.ziliaoName = this.fileName;
|
|
|
this.ziliaoId = this.LinkData.informationId;
|
|
|
-/* console.log(this.LinkData)
|
|
|
-console.log(this.ziliaoId) */
|
|
|
+
|
|
|
this.mediaTitle = this.LinkData.mediaTitle;
|
|
|
this.mediaUrl = this.LinkData.mediaUrl;
|
|
|
this.carS = this.LinkData.carTypeName;
|
|
|
@@ -496,9 +431,9 @@ console.log(this.ziliaoId) */
|
|
|
let temp = y + "-" + m + "-" + d;
|
|
|
this.ziliaoTime = temp;
|
|
|
}
|
|
|
- //console.log("console.log(this.forceUpdate);", typeof time, m, y);
|
|
|
|
|
|
- //缺少对应列表值 已有资料名在数据中无法查询到
|
|
|
+ //publishPlatformName 发布渠道
|
|
|
+ this.releaseC = this.LinkData.publishPlatformName;
|
|
|
//publishSourceName 发布板块
|
|
|
this.releaseP = this.LinkData.publishSourceName;
|
|
|
|
|
|
@@ -515,22 +450,7 @@ console.log(this.ziliaoId) */
|
|
|
let flag = regex.test(this.mediaUrl);
|
|
|
// console.log(flag, regex);
|
|
|
if (flag) {
|
|
|
- if (flag
|
|
|
- /* this.ziliaoName &&
|
|
|
- this.ziliaoTime &&
|
|
|
- this.carS &&
|
|
|
- this.carT &&
|
|
|
- this.releaseP &&
|
|
|
- this.selectedPlatform &&
|
|
|
- this.contentName1 &&
|
|
|
- this.contentName2 &&
|
|
|
- this.mediaTitle &&
|
|
|
- this.mediaUrl &&
|
|
|
- this.readCount &&
|
|
|
- this.goodCount &&
|
|
|
- this.bbsCount &&
|
|
|
- this.lookingCount */
|
|
|
- ) {
|
|
|
+ if (flag) {
|
|
|
this.edit();
|
|
|
} else {
|
|
|
alert("请将信息补充完整!");
|
|
|
@@ -540,17 +460,63 @@ console.log(this.ziliaoId) */
|
|
|
}
|
|
|
/*
|
|
|
this.ziliaoName && this.ziliaoTime &&this.carS &&this.carT&&
|
|
|
-this.releaseP&& this.selectedPlatform&& this.contentName1&&
|
|
|
+this.releaseP&& th&& this.contentName1&&
|
|
|
this.contentName2&& this.mediaTitle&& this.mediaUrl&&
|
|
|
this.readCount&&this.goodCount&& this.bbsCount&& this.lookingCount */
|
|
|
},
|
|
|
+
|
|
|
+ //下拉选择平台 渠道
|
|
|
+ chooseChannel: function () {
|
|
|
+ this.$http({
|
|
|
+ url: "/base/publishPlatformManager/selectPublishPlatformList",
|
|
|
+ method: "post",
|
|
|
+ data: {},
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.releaseChannel = res.data.data;
|
|
|
+ let obj = {};
|
|
|
+ let val = this.releaseC;
|
|
|
+ obj = this.releaseChannel.find(function (item) {
|
|
|
+ return item.platformName === val;
|
|
|
+ });
|
|
|
+ console.log(this.releaseC, obj)
|
|
|
+ //传当前渠道 id, 获取发布版块列表
|
|
|
+ this.chooseReleasePlate(obj.id);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //发布版块
|
|
|
+ chooseReleasePlate: function (val) {
|
|
|
+ this.$http({
|
|
|
+ url: "/base/publishPlatformManager/selectPublishPlatformList",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ parentId: val,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.releasePlate = res.data.data;
|
|
|
+ console.log("发布版块", this.releasePlate);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.chooseDataName();
|
|
|
this.chooseCarSeries();
|
|
|
this.firstContent1Classify();
|
|
|
this.firstContent2Classify();
|
|
|
- //this.chooseReleasePlate();
|
|
|
+
|
|
|
+this.chooseChannel();
|
|
|
|
|
|
this.initialData();
|
|
|
},
|