Browse Source

攻略完成部分

soft5566 2 years ago
parent
commit
f33b6bf2ce

+ 15 - 7
src/api/adMgr.js

@@ -33,7 +33,11 @@ export function addAD(forData) {
 		data.imageUrl = forData.imageUrl
 	}
 	if (typeof forData.logoStyle !== 'undefined') {
-		data.logoUrl = forData.logoStyle
+		if (forData.logoStyle == '') {
+			data.logoUrl = 'null'
+		} else {
+			data.logoUrl = forData.logoStyle
+		}
 	}
 	if (typeof forData.logoStyleValue !== 'undefined') {
 		data.styleValue = forData.logoStyleValue
@@ -59,14 +63,14 @@ export function addAD(forData) {
 	if (typeof forData.adStatus !== 'undefined') {
 		if (forData.adStatus == true) {
 			data.state = 1
-		} else{
+		} else {
 			data.state = 0
 		}
 	}
 	if (typeof forData.adOrder !== 'undefined') {
 		data.sortLevel = forData.adOrder
 	}
-	
+
 	return request({
 		url: '/mhotel/advertiseinsert.action',
 		method: 'post',
@@ -87,7 +91,11 @@ export function modifyAD(forData) {
 		data.imageUrl = forData.imageUrl
 	}
 	if (typeof forData.logoStyle !== 'undefined') {
-		data.logoUrl = forData.logoStyle
+		if (forData.logoStyle == '') {
+			data.logoUrl = 'null'
+		} else {
+			data.logoUrl = forData.logoStyle
+		}
 	}
 	if (typeof forData.logoStyleValue !== 'undefined') {
 		data.styleValue = forData.logoStyleValue
@@ -113,14 +121,14 @@ export function modifyAD(forData) {
 	if (typeof forData.adStatus !== 'undefined') {
 		if (forData.adStatus == true) {
 			data.state = 1
-		} else{
+		} else {
 			data.state = 0
 		}
 	}
 	if (typeof forData.adOrder !== 'undefined') {
 		data.sortLevel = forData.adOrder
 	}
-	
+
 	return request({
 		url: '/mhotel/advertiseupdate.action',
 		method: 'post',
@@ -134,7 +142,7 @@ export function delAD(id) {
 	if (typeof id !== 'undefined') {
 		param = '?id=' + id
 	}
-	
+
 	return request({
 		url: '/mhotel/advertisedel.action' + param,
 		method: 'get',

+ 160 - 0
src/api/strategyMgr.js

@@ -0,0 +1,160 @@
+import request from '@/utils/request'
+
+// 获取表格分页数据
+export function getTableData(forData) {
+	let data = new FormData()
+	if (typeof forData.page !== 'undefined') {
+		data.append('page', forData.page)
+	}
+	if (typeof forData.rows !== 'undefined') {
+		data.append('rows', forData.rows)
+	}
+	if (typeof forData.key !== 'undefined') {
+		data.append('keyWord', forData.key)
+	}
+
+	return request({
+		url: '/mhotel/articlequeryManageArticlePage.action',
+		method: 'post',
+		data
+	})
+}
+
+// 置顶攻略
+export function setTop(id, istop) {
+	let data = {}
+	if (typeof id !== 'undefined') {
+		data.id = id
+	}
+	if (typeof istop !== 'undefined') {
+		data.isTop = istop
+	}
+	
+	return request({
+		url: '/mhotel/articletopArticle.action',
+		method: 'post',
+		data
+	})
+}
+
+// 添加攻略
+export function appinsertArounds(forData) {
+	let data = {}
+	if (typeof forData.rtype !== 'undefined' && forData.rtype !== '') {
+		data.rtype = forData.rtype
+	}
+	if (typeof forData.rtown !== 'undefined' && forData.rtown !== '') {
+		data.rtown = forData.rtown
+	}
+	if (typeof forData.rname !== 'undefined' && forData.rname !== '') {
+		data.rname = forData.rname
+	}
+	if (typeof forData.rphone !== 'undefined' && forData.rphone !== '') {
+		data.rphone = forData.rphone
+	}
+	if (typeof forData.radress !== 'undefined' && forData.radress !== '') {
+		data.radress = forData.radress
+	}
+	if (typeof forData.detail !== 'undefined' && forData.detail !== '') {
+		data.detail = forData.detail
+	}
+	if (typeof forData.first_img !== 'undefined' && forData.first_img !== '') {
+		data.first_img = forData.first_img
+	}
+	if (typeof forData.post_video !== 'undefined' && forData.post_video !== '') {
+		data.show_video = forData.post_video
+	}
+	if (typeof forData.detail_img !== 'undefined' && forData.detail_img !== '' && forData.detail_img.length > 0) {
+		var tmpStr = ''
+		for (var i = 0; i < forData.detail_img.length; i++) {
+			tmpStr += forData.detail_img[i] + ','
+		}
+		data.detail_img = tmpStr.substring(0, tmpStr.length - 1)
+	}
+	if (typeof forData.jingwei !== 'undefined' && forData.jingwei !== '') {
+		data.jingwei = forData.jingwei
+	}
+	
+	return request({
+		url: '/mhotel/appinsertArounds.action',
+		method: 'post',
+		data
+	})
+}
+
+// 上传文件
+export function uploadFiles(file) {
+	let data = new FormData()
+	if (typeof file !== 'undefined') {
+		data.append('files', file)
+	}
+	
+	return request({
+		url: '/file/cos/upload',
+		method: 'post',
+		data
+	})
+}
+
+// 修改攻略
+export function appupdateArounds(forData) {
+	let data = {}
+	if (typeof forData.id !== 'undefined' && forData.id !== '') {
+		data.id = forData.id
+	}
+	if (typeof forData.rtype !== 'undefined' && forData.rtype !== '') {
+		data.rtype = forData.rtype
+	}
+	if (typeof forData.rtown !== 'undefined' && forData.rtown !== '') {
+		data.rtown = forData.rtown
+	}
+	if (typeof forData.rname !== 'undefined' && forData.rname !== '') {
+		data.rname = forData.rname
+	}
+	if (typeof forData.rphone !== 'undefined' && forData.rphone !== '') {
+		data.rphone = forData.rphone
+	}
+	if (typeof forData.radress !== 'undefined' && forData.radress !== '') {
+		data.radress = forData.radress
+	}
+	if (typeof forData.detail !== 'undefined' && forData.detail !== '') {
+		data.detail = forData.detail
+	}
+	if (typeof forData.first_img !== 'undefined' && forData.first_img !== '') {
+		data.first_img = forData.first_img
+	}
+	if (typeof forData.post_video !== 'undefined' && forData.post_video !== '') {
+		data.show_video = forData.post_video
+	}
+	if (typeof forData.detail_img !== 'undefined' && forData.detail_img !== '' && forData.detail_img.length > 0) {
+		var tmpStr = ''
+		for (var i = 0; i < forData.detail_img.length; i++) {
+			tmpStr += forData.detail_img[i] + ','
+		}
+		data.detail_img = tmpStr.substring(0, tmpStr.length - 1)
+	}
+	if (typeof forData.jingwei !== 'undefined' && forData.jingwei !== '') {
+		data.jingwei = forData.jingwei
+	}
+	
+	return request({
+		url: '/mhotel/appupdateArounds.action',
+		method: 'post',
+		data
+	})
+}
+
+
+// 删除攻略
+export function delArticle(id) {
+	let data = new FormData()
+	if (typeof id !== 'undefined' && forData != '') {
+		data.append('id', forData)
+	}
+
+	return request({
+		url: '/mhotel/articledelArticle.action',
+		method: 'post',
+		data
+	})
+}

BIN
src/icons/images/ad/bai.png


File diff suppressed because it is too large
+ 1 - 0
src/icons/svg/strategy.svg


+ 16 - 0
src/router/index.js

@@ -101,6 +101,22 @@ export const constantRoutes = [{
 	},
 	
 	{
+		path: '/strategyMgr',
+		component: Layout,
+		redirect: '/strategyMgr',
+		children: [{
+			path: '',
+			name: 'StrategyMgr',
+			component: () => import('@/views/strategyMgr/index'),
+			meta: {
+				roles: ['superAdmin'],
+				title: '攻略管理',
+				icon: 'strategy'
+			}
+		}]
+	},
+	
+	{
 		path: '/perimeterMgr',
 		component: Layout,
 		redirect: '/perimeterMgr',

+ 88 - 44
src/views/ad/index.vue

@@ -123,15 +123,19 @@
 							<img :src="imgs.img3" style="width: 150px; height: 75px;" alt="图片示例" />
 						</div>
 					</el-form-item>
-					<el-form-item id="logoStyle" label="LOGO样式" prop="logoStyle" :required="true">
+					<el-form-item id="logoStyle" label="LOGO样式" prop="logoStyle">
 						<div style="display: flex; align-items: center;">
 							<el-image style="width: 100px; height: 40px; margin-right: 30px;"
 								:class="{ 'selected': selectedModify_1, 'unselected': !selectedModify_1 }" @click="getModifyStyle(1)" :src="formModifyAD.url1"
-								@mouseenter="mouseenter(1)" @mouseleave="mouseleaver()">
+								@contextmenu.prevent="handleRightClick(1)">
 							</el-image>
-							<el-image style="width: 100px; height: 100px; border-radius: 50%;" @click="getModifyStyle(2)"
-								:class="{ 'selected': selectedModify_2, 'unselected': !selectedModify_2 }" :src="formModifyAD.url2" @mouseenter="mouseenter(2)"
-								@mouseleave="mouseleaver()">
+							<el-image style="width: 100px; height: 100px; border-radius: 50%; margin-right: 30px;" @click="getModifyStyle(2)"
+								:class="{ 'selected': selectedModify_2, 'unselected': !selectedModify_2 }" :src="formModifyAD.url2"
+								@contextmenu.prevent="handleRightClick(2)">
+							</el-image>
+							<el-image style="width: 100px; height: 40px; margin-right: 30px; background-color: #9d9d9d;" @click="getModifyStyle(3)"
+								:class="{ 'selected': selectedModify_3, 'unselected': !selectedModify_3 }" :src="formModifyAD.url3"
+								@contextmenu.prevent="handleRightClick(3)">
 							</el-image>
 						</div>
 					</el-form-item>
@@ -208,14 +212,16 @@
 							<img :src="imgs.img3" style="width: 150px; height: 75px;" alt="图片示例" />
 						</div>
 					</el-form-item>
-					<el-form-item id="logoStyle" label="LOGO样式" prop="logoStyle" :required="true">
+					<el-form-item id="logoStyle" label="LOGO样式" prop="logoStyle">
 						<div style="display: flex; align-items: center;">
 							<el-image style="width: 100px; height: 40px; margin-right: 30px;" :class="{ 'selected': selected_1, 'unselected': !selected_1 }"
-								@click="getStyle(1)" :src="formAD.url1" @mouseenter="mouseenter(1)" @mouseleave="mouseleaver()">
+								@click="getStyle(1)" :src="formAD.url1" @contextmenu.prevent="handleRightClick(1)">
+							</el-image>
+							<el-image style="width: 100px; height: 100px; border-radius: 50%; margin-right: 30px;" @click="getStyle(2)"
+								:class="{ 'selected': selected_2, 'unselected': !selected_2 }" :src="formAD.url2" @contextmenu.prevent="handleRightClick(2)">
 							</el-image>
-							<el-image style="width: 100px; height: 100px; border-radius: 50%;" @click="getStyle(2)"
-								:class="{ 'selected': selected_2, 'unselected': !selected_2 }" :src="formAD.url2" @mouseenter="mouseenter(2)"
-								@mouseleave="mouseleaver()">
+							<el-image style="width: 100px; height: 40px; margin-right: 30px; background-color: #9d9d9d;" @click="getStyle(3)"
+								:class="{ 'selected': selected_3, 'unselected': !selected_3 }" :src="formAD.url3" @contextmenu.prevent="handleRightClick(3)">
 							</el-image>
 						</div>
 					</el-form-item>
@@ -535,7 +541,8 @@
 		</el-dialog>
 		<!-- 鼠标悬停显示图片预览 -->
 		<el-dialog :visible="showPreview" @update:visible="showPreview = $event" @close="closeDialog" width="500px">
-			<div style="height: 450px; width: 450px; display: flex; align-items: center; justify-content: center;">
+			<div style="height: 450px; width: 450px; display: flex; align-items: center; justify-content: center;"
+				:style="{ backgroundColor: backgroundColor }">
 				<img :src="formAD.showImageUrl" style="width: 450px;" />
 			</div>
 		</el-dialog>
@@ -744,6 +751,7 @@
 					imageUrl: '', // 上传成功的图片
 					url1: require('../../icons/images/ad/fang.jpg'), // LOGO样式图片:矩形
 					url2: require('../../icons/images/ad/yuan.png'), // LOGO样式图片:圆形
+					url3: require('../../icons/images/ad/bai.png'), // LOGO样式图片:白色
 					showImageUrl: '', // 预览图片
 					logoStyle: '', // 样式的值
 					logoStyleValue: '', // 样式的值
@@ -762,6 +770,7 @@
 					imageUrl: '', // 上传成功的图片
 					url1: require('../../icons/images/ad/fang.jpg'), // LOGO样式图片:矩形
 					url2: require('../../icons/images/ad/yuan.png'), // LOGO样式图片:圆形
+					url3: require('../../icons/images/ad/bai.png'), // LOGO样式图片:白色
 					showImageUrl: '', // 预览图片
 					logoStyle: '', // 样式的值
 					logoStyleValue: '', // 样式的值
@@ -782,10 +791,13 @@
 				},
 				previewTimer: null, // 定时对象
 				showPreview: false, // 鼠标悬停显示图片预览
+				backgroundColor: '#9d9d9d',
 				selected_1: false, // 控制LOGO样式
 				selected_2: false, // 控制LOGO样式
+				selected_3: false, // 控制LOGO样式
 				selectedModify_1: false, // 控制LOGO样式
 				selectedModify_2: false, // 控制LOGO样式
+				selectedModify_3: false, // 控制LOGO样式
 				formADRules: {
 					adTitle: [{
 							required: true,
@@ -807,11 +819,6 @@
 						message: '请上传图片',
 						trigger: 'change'
 					}],
-					logoStyle: [{
-						required: true,
-						message: '请选择LOGO样式',
-						trigger: 'change'
-					}],
 					adLink: [{
 						required: true,
 						message: '请输入链接',
@@ -906,7 +913,7 @@
 			},
 			// 民宿选择改变
 			minsuSelectionChange(selection) {
-				console.log(selection)
+				// console.log(selection)
 				if (selection && selection.length > 0) {
 					this.minsuSelectedRow = selection[0]; // 只获取第一条选中的记录
 				} else {
@@ -1308,57 +1315,94 @@
 					this.shangpinVisible = true;
 				}
 			},
-			// 鼠标悬停退出
-			mouseleaver() {
-				if (this.showPreview == true) {
-					return;
-				}
-				clearTimeout(this.previewTimer);
-				this.showPreview = false;
-				this.formAD.showImageUrl = '';
-			},
 			closeDialog() {
 				clearTimeout(this.previewTimer);
 				this.showPreview = false;
 				this.formAD.showImageUrl = '';
 			},
-			// 鼠标进入悬停
-			mouseenter(param) {
+			// 添加广告右键单击
+			handleRightClick(param) {
+				event.preventDefault();
 				if (param == 1) {
 					this.formAD.showImageUrl = this.formAD.url1
-				} else {
+					this.backgroundColor = '#fff'
+				} else if (param == 2) {
 					this.formAD.showImageUrl = this.formAD.url2
+					this.backgroundColor = '#fff'
+				} else {
+					this.formAD.showImageUrl = this.formAD.url3
+					this.backgroundColor = '#9d9d9d'
 				}
-				this.previewTimer = setTimeout(() => {
-					this.showPreview = true
-				}, 1500);
+				this.showPreview = true
 			},
 			// 获取LOGO样式
 			getStyle(value) {
 				if (value == 1) {
 					this.formAD.logoStyleValue = value;
-					this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
-					this.selected_1 = true;
+					this.selected_1 = !this.selected_1;
+					if (this.selected_1 == true) {
+						this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
+					} else {
+						this.formAD.logoStyle = '';
+					}
 					this.selected_2 = false;
+					this.selected_3 = false;
+				} else if (value == 2) {
+					this.formAD.logoStyleValue = value;
+					this.selected_2 = !this.selected_2;
+					if (this.selected_2 == true) {
+						this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
+					} else {
+						this.formAD.logoStyle = '';
+					}
+					this.selected_1 = false;
+					this.selected_3 = false;
 				} else {
 					this.formAD.logoStyleValue = value;
-					this.formAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
-					this.selected_2 = true;
+					this.selected_3 = !this.selected_3;
+					if (this.selected_3 == true) {
+						this.formAD.logoStyle =
+							'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240330212452_4dafae643d6143d38ef48e6cecc0ba0.png';
+					} else {
+						this.formAD.logoStyle = '';
+					}
 					this.selected_1 = false;
+					this.selected_2 = false;
 				}
 			},
 			// 获取修改LOGO样式
 			getModifyStyle(value) {
 				if (value == 1) {
 					this.formModifyAD.logoStyleValue = value;
-					this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
-					this.selectedModify_1 = true;
+					this.selectedModify_1 = !this.selectedModify_1;
+					if (this.selectedModify_1 == true) {
+						this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145048_1.png';
+					} else {
+						this.formModifyAD.logoStyle = '';
+					}
 					this.selectedModify_2 = false;
+					this.selectedModify_3 = false;
+				} else if (value == 2) {
+					this.formModifyAD.logoStyleValue = value;
+					this.selectedModify_2 = !this.selectedModify_2;
+					if (this.selectedModify_2 == true) {
+						this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
+					} else {
+						this.formModifyAD.logoStyle = '';
+					}
+					this.selectedModify_1 = false;
+					this.selectedModify_3 = false;
 				} else {
 					this.formModifyAD.logoStyleValue = value;
-					this.formModifyAD.logoStyle = 'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240306145140_2.png';
-					this.selectedModify_2 = true;
+					this.selectedModify_3 = !this.selectedModify_3;
+					if (this.selectedModify_3 == true) {
+						this.formModifyAD.logoStyle =
+							'https://jinganminsu-1320402385.cos.ap-nanjing.myqcloud.com/static//20240330212452_4dafae643d6143d38ef48e6cecc0ba0.png';
+					} else {
+						this.formModifyAD.logoStyle = '';
+					}
 					this.selectedModify_1 = false;
+					this.selectedModify_2 = false;
 				}
 			},
 			// 删除广告
@@ -1546,7 +1590,7 @@
 					// 其他上传逻辑
 					this.uploadImageAction(file, imgOrVideo);
 				}
-				
+
 			},
 			// 实现上传
 			uploadImageAction(file, imgOrVideo) {
@@ -1974,7 +2018,7 @@
 
 	.avatar-uploader {
 		border: 1px dashed #d9d9d9;
-		width: 100px;
+		width: 150px;
 		border-radius: 6px;
 		cursor: pointer;
 		position: relative;
@@ -1988,14 +2032,14 @@
 	.avatar-uploader-icon {
 		font-size: 28px;
 		color: #8c939d;
-		width: 100px;
+		width: 150px;
 		height: 100px;
 		line-height: 100px;
 		text-align: center;
 	}
 
 	.avatar {
-		width: 100px;
+		width: 150px;
 		height: 100px;
 		display: block;
 	}

+ 6 - 2
src/views/data/index.vue

@@ -275,8 +275,10 @@
 			this.barUser()
 			// 自适应窗口大小
 			window.addEventListener('resize', () => {
-				this.chartPie.resize();
-				this.chartBar.resize();
+				if (this.chartPie !== null)
+					this.chartPie.resize();
+				if (this.chartBar !== null)
+					this.chartBar.resize();
 			});
 		},
 		methods: {
@@ -571,6 +573,8 @@
 					}
 
 					if (res.code === 200) {
+						if (typeof res.data == 'undefined')
+							return;
 						this.chartOrderPieData = []
 						for (var i = 0; i < res.data.length; i++) {
 							this.chartOrderPieData.push({

+ 71 - 21
src/views/perimeterMgr/index.vue

@@ -65,7 +65,7 @@
 									<span>{{ scope.row.rphone }}</span>
 								</template>
 							</el-table-column>
-							<el-table-column label="地址" align="center">
+							<el-table-column label="地址" align="center" width="320">
 								<template slot-scope="scope">
 									<span>{{ scope.row.radress }}</span>
 								</template>
@@ -526,9 +526,9 @@
 	import {
 		valid
 	} from 'mockjs'
-	
+
 	import COS from 'cos-js-sdk-v5'
-	
+
 	var townOptions = [] // 民宿列表
 	var townOptions_obj = [] // 民宿列表
 	export default {
@@ -642,7 +642,7 @@
 							['clean'] // 清除格式按钮,移除所有格式
 						]
 					},
-					placeholder: '请输入正文'
+					placeholder: '请输入简介'
 				},
 				modifyDialogFormRules: { // 编辑周边验证规则
 					rtype: [{
@@ -692,10 +692,11 @@
 						trigger: 'blur'
 					}]
 				},
+				rtownOptions: [],
 				rtypeOptions: [{
-					rtypeId: 0,
-					rtype: '民宿'
-				}, {
+					// 	rtypeId: 0,
+					// 	rtype: '民宿'
+					// }, {
 					rtypeId: 1,
 					rtype: '美食'
 				}, {
@@ -930,7 +931,7 @@
 				})
 				return
 			}
-			// 获取消费记录,表格数据
+			// 获取周边记录,表格数据
 			this.get_table_data('list')
 
 			this.get_towns()
@@ -1074,6 +1075,7 @@
 						this.formInline.rtownOptions = []
 						this.formAddDialog.rtownOptions = []
 						this.formModifyDialog.rtownOptions = []
+						this.rtownOptions = []
 						for (var i = 0; i < res.data.length; i++) {
 							let town = {
 								rtownId: res.data[i].id,
@@ -1082,6 +1084,7 @@
 							this.formInline.rtownOptions.push(town)
 							this.formAddDialog.rtownOptions.push(town)
 							this.formModifyDialog.rtownOptions.push(town)
+							this.rtownOptions.push(town)
 						}
 					} else {
 						if (res.data.length === 0) {
@@ -1158,6 +1161,10 @@
 			},
 			// 周边新增上传文件
 			uploadImageVideo(event, imgOrVideo) {
+				console.log(event.target.files);
+				// 点击取消,长度为0
+				if (event.target.files.length == 0)
+					return;
 				const file = event.target.files[0];
 
 				const key = `/uploads/zhoubian/${new Date().getTime()}`; // 设置上传到 COS 后的文件名
@@ -1204,13 +1211,18 @@
 								}
 							}
 						}
+						event.target.value = null;
 					}
 				);
 			},
 			// 周边修改上传文件
 			uploadModifyImageVideo(event, imgOrVideo) {
+				// 点击取消,长度为0
+				if (event.target.files.length == 0)
+					return;
+					
 				const file = event.target.files[0];
-				
+
 				const key = `/uploads/zhoubian/${new Date().getTime()}`; // 设置上传到 COS 后的文件名
 				var that = this
 				const cos = new COS(this.cosVal);
@@ -1255,6 +1267,7 @@
 								}
 							}
 						}
+						event.target.value = null;
 					}
 				);
 			},
@@ -1268,6 +1281,7 @@
 					this.$set(this.formModifyDialog, 'first_img', '')
 				} else if (param === 'formModifyDialog.show_video') {
 					this.$set(this.formModifyDialog, 'show_video', '')
+					this.$set(this.formModifyDialog, 'post_video', '')
 				}
 			},
 			// 添加周边
@@ -1281,14 +1295,29 @@
 							return
 						}
 						var data = that.formAddDialog
-						delete data.rtownOptions
-						delete data.rtypeOptions
 						appinsertArounds(data).then((res) => {
 							// console.log(res);
 							if (res.code == 200) {
 								that.get_table_data('list')
 								that.dialogAddVisible = false
 								that.$message.success('周边添加成功!')
+								that.formAddDialog = {
+									rtownId: '',
+									rtownOptions: that.rtownOptions,
+									rtypeId: '',
+									rtypeOptions: that.rtypeOptions,
+									rtype: '',
+									rtown: '',
+									rname: '',
+									rphone: '',
+									radress: '',
+									detail: '',
+									first_img: '',
+									show_video: '',
+									post_video: '',
+									detail_img: [1, 2],
+									jingwei: ''
+								}
 							} else {
 								that.$message.error(res.message)
 							}
@@ -1307,14 +1336,29 @@
 							return
 						}
 						var data = that.formModifyDialog
-						delete data.rtownOptions
-						delete data.rtypeOptions
 						appupdateArounds(data).then((res) => {
 							// console.log(res);
 							if (res.code == 200) {
 								that.get_table_data('list')
 								that.dialogModifyVisible = false
 								that.$message.success('周边修改成功!')
+								that.formModifyDialog = {
+									id: '',
+									rtownId: '',
+									rtownOptions: that.rtownOptions,
+									rtypeId: '',
+									rtypeOptions: that.rtypeOptions,
+									rtype: '',
+									rtown: '',
+									rname: '',
+									rphone: '',
+									radress: '',
+									detail: '',
+									first_img: '',
+									show_video: '',
+									detail_img: [1, 2],
+									jingwei: ''
+								}
 							} else {
 								that.$message.err(res.message)
 							}
@@ -1387,9 +1431,10 @@
 						if (res.code === 200) {
 							that.getProductTableData(that.formDelProduct.aid)
 							that.dialogAddProductVisible = false
-							that.$message.success('产品编辑成功!')
+							that.$message.success('产品删除成功!')
+							this.get_table_data('list')
 						} else {
-							that.$message.warning('产品编辑失败!')
+							that.$message.warning('产品删除失败!')
 						}
 					}).catch((err) => {
 						that.$message.error(err.message)
@@ -1416,7 +1461,7 @@
 				// this.$set(this.formAddDialog, 'first_img', '')
 				// this.$set(this.formAddDialog, 'show_video', '')
 				// this.$set(this.formAddDialog, 'detail_img', [1, 2])
-				// this.detail_img_array = []
+				this.detail_img_array = []
 
 				this.dialogAddVisible = true
 			},
@@ -1435,10 +1480,15 @@
 				this.$set(this.formModifyDialog, 'detail', row.detail)
 				this.$set(this.formModifyDialog, 'first_img', row.first_img)
 				this.$set(this.formModifyDialog, 'jingwei', row.jingwei)
-				var tmpOption = this.videoOptions
-				tmpOption.sources[0].src = row.show_video
-				this.$set(this.formModifyDialog, 'show_video', tmpOption)
-				this.$set(this.formModifyDialog, 'post_video', row.show_video)
+				if (typeof row.show_video !== 'undefined') {
+					var tmpOption = this.videoOptions
+					tmpOption.sources[0].src = row.show_video
+					this.$set(this.formModifyDialog, 'show_video', tmpOption)
+					this.$set(this.formModifyDialog, 'post_video', row.show_video)
+				} else {
+					this.$set(this.formModifyDialog, 'show_video', '')
+					this.$set(this.formModifyDialog, 'post_video', '')
+				}
 				this.$set(this.formModifyDialog, 'detail_img', row.detail_img.split(','))
 
 				this.dialogModifyVisible = true
@@ -1522,7 +1572,7 @@
 				});
 			},
 			/**
-			 * 获取消费记录,表格数据
+			 * 获取周边记录,表格数据
 			 */
 			get_table_data(param) {
 				this.loading = true

+ 12 - 2
src/views/residentialhostelMgr/index.vue

@@ -182,7 +182,12 @@
 				</el-row>
 				<el-row>
 					<el-col :span="24">
-						<div style="font-size: 16px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: 0 0 20px 20px;">营业执照</div>
+						<div style="font-size: 16px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: 0 0 20px 20px;">
+							<span style="color: #f00;">*</span>
+							<span>
+								营业执照
+							</span>
+						</div>
 						<el-form-item label="" :required="true" prop="fileUrl" style="margin-bottom: -10px; zoom: 1;">
 							<pl-upload v-model="formAddHostel.fileUrl" :times="times" :linkUrl="formAddHostel.url" :limitCount="6" :type="1"></pl-upload>
 							<!-- <div style="height: 140px; width: 140px; border: 1px dashed #ccc; border-radius: 8px; margin-bottom: 10px; cursor: pointer;"></div> -->
@@ -260,7 +265,12 @@
 				</el-row>
 				<el-row>
 					<el-col :span="24">
-						<div style="font-size: 16px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: 0 0 20px 20px;">营业执照</div>
+						<div style="font-size: 16px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: 0 0 20px 20px;">
+							<span style="color: #f00;">*</span>
+							<span>
+								营业执照
+							</span>
+						</div>
 						<el-form-item label="" :required="true" prop="fileUrl" style="margin-bottom: -10px;">
 							<pl-upload v-model="formModifyHostel.fileUrl" :linkId="formModifyHostel.id" :limitCount="6" :type="1"></pl-upload>
 						</el-form-item>

File diff suppressed because it is too large
+ 1600 - 0
src/views/strategyMgr/index.vue