|
|
@@ -24,9 +24,9 @@
|
|
|
<div class="bodyRow">
|
|
|
<div class="contentCol1">
|
|
|
<span>车系</span
|
|
|
- ><select v-model="carT">
|
|
|
+ ><select v-model="carS" @change="chooseCarSeries">
|
|
|
<option
|
|
|
- v-for="(item, index) in carType"
|
|
|
+ v-for="(item, index) in carSeries"
|
|
|
:key="index"
|
|
|
:value="item.typeName"
|
|
|
>
|
|
|
@@ -36,9 +36,9 @@
|
|
|
</div>
|
|
|
<div class="contentCol2">
|
|
|
<span>车型</span
|
|
|
- ><select v-model="carS" @change="chooseCarSeries">
|
|
|
+ ><select v-model="carT">
|
|
|
<option
|
|
|
- v-for="(item, index) in carSeries"
|
|
|
+ v-for="(item, index) in carType"
|
|
|
:key="index"
|
|
|
:value="item.typeName"
|
|
|
>
|
|
|
@@ -56,7 +56,7 @@
|
|
|
<span>发布板块</span
|
|
|
><select name="" id="" v-model="releaseP">
|
|
|
<option
|
|
|
- v-for="(item, index) in releasePlate"
|
|
|
+ v-for="(item, index) in releaseMedia"
|
|
|
:key="index"
|
|
|
:value="item.platformName"
|
|
|
>
|
|
|
@@ -133,7 +133,7 @@ export default {
|
|
|
return "";
|
|
|
},
|
|
|
},
|
|
|
- releasePlate: {
|
|
|
+ releaseMedia: {
|
|
|
type: Array,
|
|
|
default: () => {
|
|
|
return [];
|
|
|
@@ -177,6 +177,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
edit: function () {
|
|
|
+ if(!this.testUrl){
|
|
|
+ alert("链接输入有误")
|
|
|
+ }
|
|
|
let obj = {};
|
|
|
//获取资料名
|
|
|
let idVal = this.ziliaoId;
|
|
|
@@ -189,7 +192,7 @@ export default {
|
|
|
obj = this.carSeries.find(function (item) {
|
|
|
return item.typeName === nameCarS;
|
|
|
});
|
|
|
- console.log("chexii ", obj);
|
|
|
+ console.log("chexi ", obj);
|
|
|
//carTypeId 表示车系 id
|
|
|
this.carTypeId = obj.id;
|
|
|
//获取车型名 this.carT
|
|
|
@@ -218,7 +221,7 @@ export default {
|
|
|
articleLink: this.mediaUrl,
|
|
|
},
|
|
|
};
|
|
|
- // console.log("edit2:", config.data.carType);
|
|
|
+ // console.log("edit2:", config);
|
|
|
this.$emit("update", config);
|
|
|
},
|
|
|
//资料名称列表
|
|
|
@@ -372,11 +375,7 @@ export default {
|
|
|
this.mediaUrl = this.LinkData.mediaUrl;
|
|
|
this.carS = this.LinkData.carTypeName;
|
|
|
|
|
|
- //this.carT = this.LinkData.carPlatformName;
|
|
|
- console.log("chhhhhhhhhhhh", this.carS, this.carT);
|
|
|
- console.log("chhhhhhhhhhhh", this.carType)
|
|
|
- console.log("chhhhhhhhhhhh", this.LinkData)
|
|
|
-
|
|
|
+ this.carT = this.LinkData.carPlatformName;
|
|
|
let time = this.LinkData.publishDate;
|
|
|
if (time.length > 4) {
|
|
|
let y = time.slice(0, 4);
|
|
|
@@ -388,15 +387,16 @@ export default {
|
|
|
//console.log("console.log(this.forceUpdate);", typeof time, m, y);
|
|
|
|
|
|
//缺少对应列表值 已有资料名在数据中无法查询到
|
|
|
- this.releaseP = this.LinkData.publishSourceName;
|
|
|
+ this.releaseP = this.LinkData.publishPlatformName;
|
|
|
|
|
|
this.contentName1 = this.LinkData.contentTypeName;
|
|
|
this.contentName2 = this.LinkData.contentTypeName;
|
|
|
},
|
|
|
- /* forceUpdata: function () {
|
|
|
- this.$forceUpdate();
|
|
|
- console.log("console.log(this.forceUpdate);");
|
|
|
- }, */
|
|
|
+ testUrl: function () {
|
|
|
+ var regex = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
|
|
|
+ console.log(regex)
|
|
|
+ return regex.test(this.mediaUrl);
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.chooseDataName();
|
|
|
@@ -407,11 +407,6 @@ export default {
|
|
|
|
|
|
this.initialData();
|
|
|
},
|
|
|
- /* created() {
|
|
|
- console.log(this.LinkData);
|
|
|
- this.ziliaoId = this.LinkData.id;
|
|
|
- console.log(this.ziliaoId);
|
|
|
- }, */
|
|
|
};
|
|
|
</script>
|
|
|
|