|
|
@@ -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) {
|