|
|
@@ -125,7 +125,10 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="链接" prop="adLink" v-if="formModifyAD.checkedTypes == 1" :required="formModifyAD.checkedTypes == 1">
|
|
|
- <el-input placeholder="请输入链接" v-model="formModifyAD.adLink" style="width: 90%;" clearable></el-input>
|
|
|
+ <el-tooltip effect="light" content="如需配置链接,请联系创海配置域名。">
|
|
|
+ <el-input placeholder="请输入链接" v-model="formModifyAD.adLink" style="width: 90%;" clearable></el-input>
|
|
|
+ </el-tooltip>
|
|
|
+ <div v-if="formModifyAD.checkedTypes == 1" style="color: #f00;">如需配置链接,请联系创海配置域名。</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="formModifyAD.adSelectClass" prop="adPage" v-if="formModifyAD.checkedTypes == 2"
|
|
|
:required="formModifyAD.checkedTypes == 2">
|
|
|
@@ -137,10 +140,10 @@
|
|
|
{{ formModifyAD.adSelectClass }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item command="minsu">民宿</el-dropdown-item>
|
|
|
- <el-dropdown-item command="youhuiquan">优惠券</el-dropdown-item>
|
|
|
- <el-dropdown-item command="gonglue">攻略</el-dropdown-item>
|
|
|
- <el-dropdown-item command="shangpin">商品</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="modify_minsu">民宿</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="modify_youhuiquan">优惠券</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="modify_gonglue">攻略</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="modify_shangpin">商品</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
|
@@ -191,7 +194,10 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="链接" prop="adLink" v-if="formAD.checkedTypes == 1" :required="formAD.checkedTypes == 1">
|
|
|
- <el-input placeholder="请输入链接" v-model="formAD.adLink" style="width: 90%;" clearable></el-input>
|
|
|
+ <el-tooltip effect="light" content="如需配置链接,请联系创海配置域名。">
|
|
|
+ <el-input placeholder="请输入链接" v-model="formAD.adLink" style="width: 90%;" clearable></el-input>
|
|
|
+ </el-tooltip>
|
|
|
+ <div v-if="formAD.checkedTypes == 1" style="color: #f00;">如需配置链接,请联系创海配置域名。</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="formAD.adSelectClass" prop="adPage" v-if="formAD.checkedTypes == 2" :required="formAD.checkedTypes == 2">
|
|
|
<div id="panel" style="width: 100%;">
|
|
|
@@ -240,9 +246,9 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <el-table ref="multipleTable" :data="minsuTableData" height="396" style="width: 100%" :cell-style="cell_style" v-loading="minsuLoading"
|
|
|
- :header-cell-style="header_cell_style" @selection-change="minsuSelectionChange">
|
|
|
- <el-table-column type="selection" width="50" :selectable="minsuIsSelectable">
|
|
|
+ <el-table ref="multipleTable" id="minsu_table" :data="minsuTableData" height="396" style="width: 100%" :cell-style="cell_style"
|
|
|
+ v-loading="minsuLoading" :header-cell-style="header_cell_style" @selection-change="minsuSelectionChange">
|
|
|
+ <el-table-column type="selection" width="50" :selectable="minsuIsSelectable" :header-selectable="false">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="序号" align="center" width="70">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -310,7 +316,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <el-table ref="multipleTable" :data="youhuiquanTableData" height="396" style="width: 100%" :cell-style="cell_style" v-loading="youhuiquanLoading"
|
|
|
+ <el-table ref="multipleTable" id="youhuiquan_table" :data="youhuiquanTableData" height="396" style="width: 100%" :cell-style="cell_style" v-loading="youhuiquanLoading"
|
|
|
:header-cell-style="header_cell_style" @selection-change="youhuiquanSelectionChange">
|
|
|
<el-table-column type="selection" width="50" :selectable="youhuiquanIsSelectable">
|
|
|
</el-table-column>
|
|
|
@@ -377,7 +383,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <el-table ref="multipleTable" :data="gonglueTableData" height="500" style="width: 100%" :cell-style="cell_style" v-loading="gonglueLoading"
|
|
|
+ <el-table ref="multipleTable" id="gonglue_table" :data="gonglueTableData" height="500" style="width: 100%" :cell-style="cell_style" v-loading="gonglueLoading"
|
|
|
:header-cell-style="header_cell_style" @selection-change="gonglueSelectionChange">
|
|
|
<el-table-column type="selection" width="50" :selectable="gonglueIsSelectable">
|
|
|
</el-table-column>
|
|
|
@@ -458,7 +464,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <el-table ref="multipleTable" :data="shangpinTableData" height="500" style="width: 100%" :cell-style="cell_style" v-loading="shangpinLoading"
|
|
|
+ <el-table ref="multipleTable" id="shangpin_table" :data="shangpinTableData" height="500" style="width: 100%" :cell-style="cell_style" v-loading="shangpinLoading"
|
|
|
:header-cell-style="header_cell_style" @selection-change="shangpinSelectionChange">
|
|
|
<el-table-column type="selection" width="50" :selectable="shangpinIsSelectable">
|
|
|
</el-table-column>
|
|
|
@@ -732,6 +738,7 @@
|
|
|
jumpDirection: '', // 跳转产品,值有:民宿、优惠券、攻略、商品
|
|
|
adSelectClass: '请选择' // 产品右边的选择文本
|
|
|
},
|
|
|
+ addModify: false, // 判断是添加还是修改状态
|
|
|
cascaderProps: {
|
|
|
multiple: false,
|
|
|
showSearch: true,
|
|
|
@@ -822,7 +829,7 @@
|
|
|
let data = {}
|
|
|
data.id = row.id;
|
|
|
data.state = state;
|
|
|
-
|
|
|
+
|
|
|
var that = this;
|
|
|
// console.log(data);
|
|
|
ead(data).then((res) => {
|
|
|
@@ -863,6 +870,7 @@
|
|
|
},
|
|
|
// 民宿选择改变
|
|
|
minsuSelectionChange(selection) {
|
|
|
+ console.log(selection)
|
|
|
if (selection && selection.length > 0) {
|
|
|
this.minsuSelectedRow = selection[0]; // 只获取第一条选中的记录
|
|
|
} else {
|
|
|
@@ -1156,10 +1164,17 @@
|
|
|
this.$message.error('请选择民宿!');
|
|
|
return;
|
|
|
}
|
|
|
- this.formAD.adPage = this.minsuSelectedRow.hotelName;
|
|
|
- this.formAD.adPageId = this.minsuSelectedRow.id;
|
|
|
- this.formAD.jumpDirection = '民宿';
|
|
|
- this.formAD.adSelectClass = '民宿';
|
|
|
+ if (this.addModify == true) {
|
|
|
+ this.formAD.adPage = this.minsuSelectedRow.hotelName;
|
|
|
+ this.formAD.adPageId = this.minsuSelectedRow.id;
|
|
|
+ this.formAD.jumpDirection = '民宿';
|
|
|
+ this.formAD.adSelectClass = '民宿';
|
|
|
+ } else {
|
|
|
+ this.formModifyAD.adPage = this.minsuSelectedRow.hotelName;
|
|
|
+ this.formModifyAD.adPageId = this.minsuSelectedRow.id;
|
|
|
+ this.formModifyAD.jumpDirection = '民宿';
|
|
|
+ this.formModifyAD.adSelectClass = '民宿';
|
|
|
+ }
|
|
|
this.minsuVisible = false;
|
|
|
},
|
|
|
// 优惠券选择完成
|
|
|
@@ -1168,10 +1183,18 @@
|
|
|
this.$message.error('请选择优惠券!');
|
|
|
return;
|
|
|
}
|
|
|
- this.formAD.adPage = this.youhuiquanSelectedRow.name;
|
|
|
- this.formAD.adPageId = this.youhuiquanSelectedRow.id;
|
|
|
- this.formAD.jumpDirection = '优惠券';
|
|
|
- this.formAD.adSelectClass = '优惠券';
|
|
|
+
|
|
|
+ if (this.addModify == true) {
|
|
|
+ this.formAD.adPage = this.youhuiquanSelectedRow.name;
|
|
|
+ this.formAD.adPageId = this.youhuiquanSelectedRow.id;
|
|
|
+ this.formAD.jumpDirection = '优惠券';
|
|
|
+ this.formAD.adSelectClass = '优惠券';
|
|
|
+ } else {
|
|
|
+ this.formModifyAD.adPage = this.youhuiquanSelectedRow.name;
|
|
|
+ this.formModifyAD.adPageId = this.youhuiquanSelectedRow.id;
|
|
|
+ this.formModifyAD.jumpDirection = '优惠券';
|
|
|
+ this.formModifyAD.adSelectClass = '优惠券';
|
|
|
+ }
|
|
|
this.youhuiquanVisible = false;
|
|
|
},
|
|
|
// 攻略(推文)选择完成
|
|
|
@@ -1180,15 +1203,27 @@
|
|
|
this.$message.error('请选择攻略!');
|
|
|
return;
|
|
|
}
|
|
|
- if (this.gonglue_index_page == true) {
|
|
|
- this.formAD.adPage = '攻略首页';
|
|
|
- this.formAD.adPageId = '首页';
|
|
|
+ if (this.addModify == true) {
|
|
|
+ if (this.gonglue_index_page == true) {
|
|
|
+ this.formAD.adPage = '攻略首页';
|
|
|
+ this.formAD.adPageId = '首页';
|
|
|
+ } else {
|
|
|
+ this.formAD.adPage = this.gonglueSelectedRow.title;
|
|
|
+ this.formAD.adPageId = this.gonglueSelectedRow.id;
|
|
|
+ }
|
|
|
+ this.formAD.jumpDirection = '攻略';
|
|
|
+ this.formAD.adSelectClass = '攻略';
|
|
|
} else {
|
|
|
- this.formAD.adPage = this.gonglueSelectedRow.title;
|
|
|
- this.formAD.adPageId = this.gonglueSelectedRow.id;
|
|
|
+ if (this.gonglue_index_page == true) {
|
|
|
+ this.formModifyAD.adPage = '攻略首页';
|
|
|
+ this.formModifyAD.adPageId = '首页';
|
|
|
+ } else {
|
|
|
+ this.formModifyAD.adPage = this.gonglueSelectedRow.title;
|
|
|
+ this.formModifyAD.adPageId = this.gonglueSelectedRow.id;
|
|
|
+ }
|
|
|
+ this.formModifyAD.jumpDirection = '攻略';
|
|
|
+ this.formModifyAD.adSelectClass = '攻略';
|
|
|
}
|
|
|
- this.formAD.jumpDirection = '攻略';
|
|
|
- this.formAD.adSelectClass = '攻略';
|
|
|
this.gonglueVisible = false;
|
|
|
},
|
|
|
// 商品选择完成
|
|
|
@@ -1197,15 +1232,27 @@
|
|
|
this.$message.error('请选择商品!');
|
|
|
return;
|
|
|
}
|
|
|
- if (this.shangpin_index_page == true) {
|
|
|
- this.formAD.adPage = '商品首页';
|
|
|
- this.formAD.adPageId = '首页';
|
|
|
+ if (this.addModify == true) {
|
|
|
+ if (this.shangpin_index_page == true) {
|
|
|
+ this.formAD.adPage = '商品首页';
|
|
|
+ this.formAD.adPageId = '首页';
|
|
|
+ } else {
|
|
|
+ this.formAD.adPage = this.shangpinSelectedRow.name;
|
|
|
+ this.formAD.adPageId = this.shangpinSelectedRow.id;
|
|
|
+ }
|
|
|
+ this.formAD.jumpDirection = '商品';
|
|
|
+ this.formAD.adSelectClass = '商品';
|
|
|
} else {
|
|
|
- this.formAD.adPage = this.shangpinSelectedRow.name;
|
|
|
- this.formAD.adPageId = this.shangpinSelectedRow.id;
|
|
|
+ if (this.shangpin_index_page == true) {
|
|
|
+ this.formModifyAD.adPage = '商品首页';
|
|
|
+ this.formModifyAD.adPageId = '首页';
|
|
|
+ } else {
|
|
|
+ this.formModifyAD.adPage = this.shangpinSelectedRow.name;
|
|
|
+ this.formModifyAD.adPageId = this.shangpinSelectedRow.id;
|
|
|
+ }
|
|
|
+ this.formModifyAD.jumpDirection = '商品';
|
|
|
+ this.formModifyAD.adSelectClass = '商品';
|
|
|
}
|
|
|
- this.formAD.jumpDirection = '商品';
|
|
|
- this.formAD.adSelectClass = '商品';
|
|
|
this.shangpinVisible = false;
|
|
|
},
|
|
|
clearSelectClass() {
|
|
|
@@ -1213,13 +1260,19 @@
|
|
|
},
|
|
|
// 选择那个页面菜单下来类别
|
|
|
handleCommand(command) {
|
|
|
- if (command == 'youhuiquan') {
|
|
|
+ if (command.startsWith("modify_")) {
|
|
|
+ this.addModify = false;
|
|
|
+ } else {
|
|
|
+ this.addModify = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (command == 'youhuiquan' || command == 'modify_youhuiquan') {
|
|
|
this.youhuiquanVisible = true;
|
|
|
- } else if (command == 'minsu') {
|
|
|
+ } else if (command == 'minsu' || command == 'modify_minsu') {
|
|
|
this.minsuVisible = true;
|
|
|
- } else if (command == 'gonglue') {
|
|
|
+ } else if (command == 'gonglue' || command == 'modify_gonglue') {
|
|
|
this.gonglueVisible = true;
|
|
|
- } else if (command == 'shangpin') {
|
|
|
+ } else if (command == 'shangpin' || command == 'modify_shangpin') {
|
|
|
this.shangpinVisible = true;
|
|
|
}
|
|
|
},
|
|
|
@@ -1252,12 +1305,12 @@
|
|
|
getStyle(value) {
|
|
|
if (value == 1) {
|
|
|
this.formAD.logoStyleValue = value;
|
|
|
- this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103950_2.jpg';
|
|
|
+ this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
|
|
|
this.selected_1 = true;
|
|
|
this.selected_2 = false;
|
|
|
} else {
|
|
|
this.formAD.logoStyleValue = value;
|
|
|
- this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103921_1.png';
|
|
|
+ this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
|
|
|
this.selected_2 = true;
|
|
|
this.selected_1 = false;
|
|
|
}
|
|
|
@@ -1266,12 +1319,12 @@
|
|
|
getModifyStyle(value) {
|
|
|
if (value == 1) {
|
|
|
this.formModifyAD.logoStyleValue = value;
|
|
|
- this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103950_2.jpg';
|
|
|
+ this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
|
|
|
this.selectedModify_1 = true;
|
|
|
this.selectedModify_2 = false;
|
|
|
} else {
|
|
|
this.formModifyAD.logoStyleValue = value;
|
|
|
- this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103921_1.png';
|
|
|
+ this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
|
|
|
this.selectedModify_2 = true;
|
|
|
this.selectedModify_1 = false;
|
|
|
}
|
|
|
@@ -1305,18 +1358,18 @@
|
|
|
// 修改广告
|
|
|
modifyAd(row) {
|
|
|
this.dialogModifyADFormVisible = true;
|
|
|
-
|
|
|
+
|
|
|
this.formModifyAD.id = row.id;
|
|
|
this.formModifyAD.adTitle = row.title;
|
|
|
this.formModifyAD.imageUrl = row.imageUrl;
|
|
|
- if (row.logoUrl == 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103950_2.jpg') {
|
|
|
+ if (row.logoUrl == 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png') {
|
|
|
this.formModifyAD.logoStyleValue = 1
|
|
|
- this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103950_2.jpg';
|
|
|
+ this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
|
|
|
this.selectedModify_1 = true;
|
|
|
this.selectedModify_2 = false;
|
|
|
} else {
|
|
|
this.formModifyAD.logoStyleValue = 2
|
|
|
- this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240304103921_1.png';
|
|
|
+ this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
|
|
|
this.selectedModify_1 = false;
|
|
|
this.selectedModify_2 = true;
|
|
|
}
|
|
|
@@ -1943,4 +1996,20 @@
|
|
|
#showImgVideo {
|
|
|
height: 180px;
|
|
|
}
|
|
|
+
|
|
|
+ #minsu_table table:first-child tr:first-child th:first-child {
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ #youhuiquan_table table:first-child tr:first-child th:first-child {
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ #gonglue_table table:first-child tr:first-child th:first-child {
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ #shangpin_table table:first-child tr:first-child th:first-child {
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
</style>
|