Explorar el Código

完成待测试

soft5566 hace 2 años
padre
commit
0196838ae6
Se han modificado 5 ficheros con 37 adiciones y 39 borrados
  1. 0 6
      .env.development
  2. 2 6
      .env.production
  3. 1 0
      package.json
  4. 2 3
      src/api/fileInfo.js
  5. 32 24
      src/views/perimeterMgr/index.vue

+ 0 - 6
.env.development

@@ -3,9 +3,3 @@ ENV = 'development'
 
 # base api
 VUE_APP_BASE_API = '/api'
-# VUE_APP_BASE_API = 'https://www.靖安人家.com/hotelReservation/mhotel'
-# VUE_APP_BASE_API = 'https://chtech.ncjti.edu.cn/hotelReservation/mhotel'
-
-
-VUE_APP_BASE_FILE = '/api'
-# VUE_APP_BASE_FILE = 'https://chtech.ncjti.edu.cn/hotelReservation/fileload'

+ 2 - 6
.env.production

@@ -2,9 +2,5 @@
 ENV = 'production'
 
 # base api
-VUE_APP_BASE_API = 'https://www.靖安人家.com/hotelReservation'
-# VUE_APP_BASE_API = 'https://chtech.ncjti.edu.cn/hotelReservation/mhotel'
-
-
-VUE_APP_BASE_FILE = 'https://www.靖安人家.com/hotelReservation'
-# VUE_APP_BASE_FILE = 'https://chtech.ncjti.edu.cn/hotelReservation/fileload'
+# VUE_APP_BASE_API = 'https://www.靖安人家.com/hotelReservation'
+VUE_APP_BASE_API = 'https://chtech.ncjti.edu.cn/hotelReservation'

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
 		"test:ci": "npm run lint && npm run test:unit"
 	},
 	"dependencies": {
+		"@ckeditor/ckeditor5-vue": "^5.1.0",
 		"@tinymce/tinymce-vue": "^3.2.8",
 		"axios": "0.18.1",
 		"ckeditor-vue": "^1.0.1",

+ 2 - 3
src/api/fileInfo.js

@@ -1,5 +1,4 @@
 import request from '@/utils/request'
-import request2 from '@/utils/request2'
 
 export function getFileList(linkId) {
 	const query = '?linkId=' + linkId
@@ -15,8 +14,8 @@ export function uploadhimage(forData) {
 	data.append('myFileFileName', forData.file.name)
 	data.append('myFile', forData.file)
 
-	return request2({//https://chtech.ncjti.edu.cn/hotelReservation/fileload
-		url: '/mhotel/loadhimage.action', 
+	return request({
+		url: '/file/cos/upload', 
 		method: 'post',
 		data
 	})

+ 32 - 24
src/views/perimeterMgr/index.vue

@@ -79,7 +79,8 @@
 								<template slot-scope="scope">
 									<el-button @click="handleModifyClick(scope.row)" type="text" style="color: rgba(9, 101, 98, 1);" size="small">编辑</el-button>
 									<el-button @click="handleDelClick(scope.row)" type="text" style="color: rgba(212, 48, 48, 1);" size="small">删除</el-button>
-									<el-button @click="handleDetailClick(scope.row)" type="text" style="color: rgba(9, 101, 98, 1);" size="small">查看详情</el-button>
+									<el-button @click="handleDetailClick(scope.row)" type="text" style="color: rgba(9, 101, 98, 1);"
+										size="small">查看详情</el-button>
 								</template>
 							</el-table-column>
 						</el-table>
@@ -436,7 +437,7 @@
 									<i class="el-icon el-icon-circle-plus-outline" style="font-size: 16px;"></i>
 									<span style="font-size: 14px;">添加产品</span>
 								</el-button>
-								<el-table ref="multipleTable" :data="productTableData" height="220" style="width: 100%" :cell-style="cell_style"
+								<el-table ref="multipleTable" :data="productTableData" height="280" style="width: 100%" :cell-style="cell_style"
 									v-loading="loading" :header-cell-style="header_cell_style">
 									<el-table-column label="序号" align="center" width="100">
 										<template slot-scope="scope">
@@ -1255,9 +1256,13 @@
 			 * 显示添加产品对话框
 			 */
 			showAddProductDialog() {
-				this.$set(this.formAddProduct, 'product_name', '')
-				this.$set(this.formAddProduct, 'product_desc', '')
-				this.$set(this.formAddProduct, 'price', '')
+				// this.$set(this.formAddProduct, 'product_name', '')
+				// this.$set(this.formAddProduct, 'product_desc', '')
+				// this.$set(this.formAddProduct, 'price', '')
+				
+				this.$nextTick(() => {
+					this.$refs.addProductForm.resetFields();
+				})
 
 				this.dialogAddProductVisible = true
 			},
@@ -1270,9 +1275,7 @@
 						that.getProductTableData(that.formAddProduct.aid)
 						that.dialogAddProductVisible = false
 						that.$message.success('产品添加成功!')
-						setTimeout(() => {
-							that.get_table_data('list')
-						}, 500)
+						that.get_table_data('list')
 					} else {
 						that.$message.warning('产品添加失败!')
 					}
@@ -1336,18 +1339,22 @@
 			 * 新增周边
 			 */
 			add_perimeter() {
-				this.$set(this.formAddDialog, 'rtownId', '')
-				this.$set(this.formAddDialog, 'rtypeId', '')
-				this.$set(this.formAddDialog, 'rtype', '')
-				this.$set(this.formAddDialog, 'rtown', '')
-				this.$set(this.formAddDialog, 'rname', '')
-				this.$set(this.formAddDialog, 'rphone', '')
-				this.$set(this.formAddDialog, 'radress', '')
-				this.$set(this.formAddDialog, 'detail', '')
-				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.$set(this.formAddDialog, 'rtownId', '')
+				// this.$set(this.formAddDialog, 'rtypeId', '')
+				// this.$set(this.formAddDialog, 'rtype', '')
+				// this.$set(this.formAddDialog, 'rtown', '')
+				// this.$set(this.formAddDialog, 'rname', '')
+				// this.$set(this.formAddDialog, 'rphone', '')
+				// this.$set(this.formAddDialog, 'radress', '')
+				// this.$set(this.formAddDialog, 'detail', '')
+				// 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.$nextTick(() => {
+					this.$refs["addDialogForm"].resetFields(); // 重置表单
+				});
 
 				this.dialogAddVisible = true
 			},
@@ -1403,7 +1410,8 @@
 			 */
 			handleDetailClick(row) {
 				// console.log(row);
-				this.dialogInfoVisible = true
+				this.productTableData = []
+				this.getProductTableData(row.id)
 
 				this.$set(this.formDetailDialog, 'id', row.id)
 				this.$set(this.formDetailDialog, 'rtype', row.rtype)
@@ -1418,15 +1426,15 @@
 				this.$set(this.formDetailDialog, 'detail_img', row.detail_img.split(','))
 				this.$set(this.formDetailDialog, 'detail', row.detail)
 				this.$set(this.formDetailDialog, 'jingwei', row.jingwei)
-				
+
 				this.videoOptions.sources[0].src = row.show_video
 				this.$set(this.formDetailDialog, 'show_video', this.videoOptions)
 
 				this.$set(this.formAddProduct, 'aid', this.formDetailDialog.id)
 				this.$set(this.formModifyProduct, 'aid', this.formDetailDialog.id)
 				this.$set(this.formDelProduct, 'aid', this.formDetailDialog.id)
-				
-				this.getProductTableData(row.id)
+
+				this.dialogInfoVisible = true
 			},
 			// 获取产品表格数据
 			getProductTableData(id) {