Bladeren bron

店铺编辑更新

傅行帆 6 jaren geleden
bovenliggende
commit
c601bbcf42
19 gewijzigde bestanden met toevoegingen van 1424 en 372 verwijderingen
  1. 33
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopController.java
  2. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopImgController.java
  3. 19
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpShopImgMapper.java
  4. 19
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShop.java
  5. 51
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShopImg.java
  6. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopImgService.java
  7. 15
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopService.java
  8. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopImgServiceImpl.java
  9. 95
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopServiceImpl.java
  10. 13
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpShopImgMapper.xml
  11. 0
    2
      VUECODE/smart-property-manage/index.html
  12. 15
    0
      VUECODE/smart-property-manage/src/api/shopType.js
  13. 14
    0
      VUECODE/smart-property-manage/src/router/index.js
  14. 19
    1
      VUECODE/smart-property-manage/src/store/modules/shopType.js
  15. 315
    0
      VUECODE/smart-property-manage/src/views/shop/shopAdd.vue
  16. 330
    0
      VUECODE/smart-property-manage/src/views/shop/shopEdit.vue
  17. 4
    15
      VUECODE/smart-property-manage/src/views/shop/shopIndex.vue
  18. 213
    177
      文档/MYSQL/smartCommunity.pdb
  19. 213
    177
      文档/MYSQL/smartCommunity.pdm

+ 33
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopController.java Bestand weergeven

@@ -4,17 +4,23 @@ package com.community.huiju.controller;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6 6
 import com.community.huiju.common.base.BaseController;
7
+import com.community.huiju.model.TpShop;
8
+import com.community.huiju.model.TpShopType;
7 9
 import com.community.huiju.service.ITpShopService;
10
+import com.netflix.ribbon.proxy.annotation.Http;
8 11
 import io.swagger.annotations.ApiImplicitParam;
9 12
 import io.swagger.annotations.ApiImplicitParams;
10 13
 import io.swagger.annotations.ApiOperation;
11 14
 import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.PathVariable;
16
+import org.springframework.web.bind.annotation.RequestBody;
12 17
 import org.springframework.web.bind.annotation.RequestMapping;
13 18
 import org.springframework.web.bind.annotation.RequestMethod;
14 19
 import org.springframework.web.bind.annotation.RequestParam;
15 20
 import org.springframework.web.bind.annotation.RestController;
16 21
 
17 22
 import javax.servlet.http.HttpSession;
23
+import java.time.LocalDateTime;
18 24
 
19 25
 /**
20 26
  * <p>
@@ -54,4 +60,31 @@ public class TpShopController extends BaseController {
54 60
 		responseBean = shopService.getShopList(id,shopName,shopTypeId,shopStatus,userElement,pageNum,pageSize);
55 61
 		return responseBean;
56 62
 	}
63
+	
64
+	@ApiOperation(value = "添加商铺", notes = "添加商铺")
65
+	@ApiImplicitParams({
66
+			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
67
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
68
+	})
69
+	@RequestMapping(value = "/shop/add",method = RequestMethod.POST)
70
+	public ResponseBean saveShop(@RequestBody TpShop shop, HttpSession session){
71
+		ResponseBean responseBean = new ResponseBean();
72
+		UserElement userElement = getUserElement(session);
73
+		responseBean = shopService.saveShop(shop,userElement);
74
+		return responseBean;
75
+	}
76
+	
77
+	@ApiOperation(value = "获取商铺信息", notes = "获取商铺信息")
78
+	@ApiImplicitParams({
79
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "商铺Id"),
80
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
81
+	})
82
+	@RequestMapping(value = "/shop/get/{id}",method = RequestMethod.GET)
83
+	public ResponseBean getShop(@PathVariable Integer id, HttpSession session){
84
+		ResponseBean responseBean = new ResponseBean();
85
+		UserElement userElement = getUserElement(session);
86
+		TpShop tpShop = shopService.getShopById(id);
87
+		responseBean.addSuccess(tpShop);
88
+		return responseBean;
89
+	}
57 90
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopImgController.java Bestand weergeven

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 商铺图片 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-10
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpShopImgController extends BaseController {
19
+
20
+}

+ 19
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpShopImgMapper.java Bestand weergeven

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpShopImg;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * <p>
10
+ * 商铺图片 Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-10
15
+ */
16
+public interface TpShopImgMapper extends BaseMapper<TpShopImg> {
17
+	
18
+	int batchSave(List<TpShopImg> carouselList);
19
+}

+ 19
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShop.java Bestand weergeven

@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
9 9
 
10 10
 import java.io.Serializable;
11 11
 import java.time.LocalDateTime;
12
+import java.util.List;
12 13
 
13 14
 /**
14 15
  * <p>
@@ -125,4 +126,22 @@ public class TpShop implements Serializable {
125 126
      */
126 127
     @TableField(exist = false)
127 128
     private String userName;
129
+    
130
+    /**
131
+     * 首页图片地址
132
+     */
133
+    @TableField(exist = false)
134
+    private String appIndexImg;
135
+    
136
+    /**
137
+     * app列表展示图
138
+     */
139
+    @TableField(exist = false)
140
+    private String appListImg;
141
+    
142
+    /**
143
+     * app商铺轮播图
144
+     */
145
+    @TableField(exist = false)
146
+    private List<String> appCarouselImg;
128 147
 }

+ 51
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShopImg.java Bestand weergeven

@@ -0,0 +1,51 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.Data;
4
+import lombok.EqualsAndHashCode;
5
+import lombok.experimental.Accessors;
6
+
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+/**
11
+ * <p>
12
+ * 商铺图片
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-10
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+public class TpShopImg implements Serializable {
22
+
23
+    private static final long serialVersionUID = 1L;
24
+
25
+    /**
26
+     * 小区ID
27
+     */
28
+    private Integer communityId;
29
+
30
+    /**
31
+     * 商铺ID
32
+     */
33
+    private Integer shopId;
34
+
35
+    /**
36
+     * 商铺图片地址
37
+     */
38
+    private String imgUrl;
39
+
40
+    /**
41
+     * 商铺图片类型 1是app首页图片每个商铺唯一,2是app列表图片,3是app商铺轮播图
42
+     */
43
+    private String imgType;
44
+
45
+    /**
46
+     * 创建时间
47
+     */
48
+    private LocalDateTime createDate;
49
+
50
+
51
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopImgService.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpShopImg;
5
+
6
+/**
7
+ * <p>
8
+ * 商铺图片 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-10
13
+ */
14
+public interface ITpShopImgService extends IService<TpShopImg> {
15
+
16
+}

+ 15
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopService.java Bestand weergeven

@@ -27,4 +27,19 @@ public interface ITpShopService extends IService<TpShop> {
27 27
 	 * @return
28 28
 	 */
29 29
 	ResponseBean getShopList(Integer id, String shopName, Integer shopTypeId, String shopStatus, UserElement userElement, Integer pageNum, Integer pageSize);
30
+	
31
+	/**
32
+	 * 保存商铺
33
+	 * @param shop
34
+	 * @param userElement
35
+	 * @return
36
+	 */
37
+	ResponseBean saveShop(TpShop shop, UserElement userElement);
38
+	
39
+	/**
40
+	 * 获取商铺信息
41
+	 * @param id
42
+	 * @return
43
+	 */
44
+	TpShop getShopById(Integer id);
30 45
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopImgServiceImpl.java Bestand weergeven

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpShopImgMapper;
5
+import com.community.huiju.model.TpShopImg;
6
+import com.community.huiju.service.ITpShopImgService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 商铺图片 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-10
16
+ */
17
+@Service
18
+public class TpShopImgServiceImpl extends ServiceImpl<TpShopImgMapper, TpShopImg> implements ITpShopImgService {
19
+
20
+}

+ 95
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopServiceImpl.java Bestand weergeven

@@ -1,15 +1,20 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3 4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 6
 import com.community.commom.mode.ResponseBean;
6 7
 import com.community.commom.session.UserElement;
8
+import com.community.huiju.dao.TpShopImgMapper;
7 9
 import com.community.huiju.dao.TpShopMapper;
8 10
 import com.community.huiju.model.TpShop;
11
+import com.community.huiju.model.TpShopImg;
9 12
 import com.community.huiju.service.ITpShopService;
10 13
 import org.springframework.beans.factory.annotation.Autowired;
11 14
 import org.springframework.stereotype.Service;
12 15
 
16
+import java.time.LocalDateTime;
17
+import java.util.ArrayList;
13 18
 import java.util.HashMap;
14 19
 import java.util.List;
15 20
 import java.util.Map;
@@ -28,6 +33,9 @@ public class TpShopServiceImpl extends ServiceImpl<TpShopMapper, TpShop> impleme
28 33
 	@Autowired
29 34
 	private TpShopMapper shopMapper;
30 35
 	
36
+	@Autowired
37
+	private TpShopImgMapper shopImgMapper;
38
+	
31 39
 	/**
32 40
 	 * 根据条件查询商铺列表
33 41
 	 *
@@ -57,4 +65,91 @@ public class TpShopServiceImpl extends ServiceImpl<TpShopMapper, TpShop> impleme
57 65
 		responseBean.addSuccess(map);
58 66
 		return responseBean;
59 67
 	}
68
+	
69
+	/**
70
+	 * 保存商铺
71
+	 *
72
+	 * @param shop
73
+	 * @param userElement
74
+	 * @return
75
+	 */
76
+	@Override
77
+	public ResponseBean saveShop(TpShop shop, UserElement userElement) {
78
+		ResponseBean responseBean = new ResponseBean();
79
+		//添加商铺信息
80
+		Integer communityId = userElement.getCommunityId();
81
+		LocalDateTime localDateTime = LocalDateTime.now();
82
+		shop.setCommunityId(communityId);
83
+		shop.setCreateUser(userElement.getId());
84
+		shop.setUpdateDate(localDateTime);
85
+		shopMapper.insert(shop);
86
+		//添加商铺app首页图片信息
87
+		TpShopImg appIndexShopImg = new TpShopImg();
88
+		appIndexShopImg.setCommunityId(communityId);
89
+		appIndexShopImg.setCreateDate(localDateTime);
90
+		appIndexShopImg.setImgType("1");
91
+		appIndexShopImg.setShopId(shop.getId());
92
+		appIndexShopImg.setImgUrl(shop.getAppIndexImg());
93
+		shopImgMapper.insert(appIndexShopImg);
94
+		//添加商铺app列表图片信息
95
+		TpShopImg appListShopImg = new TpShopImg();
96
+		appListShopImg.setCommunityId(communityId);
97
+		appListShopImg.setCreateDate(localDateTime);
98
+		appListShopImg.setImgType("2");
99
+		appListShopImg.setShopId(shop.getId());
100
+		appListShopImg.setImgUrl(shop.getAppListImg());
101
+		shopImgMapper.insert(appListShopImg);
102
+		//批量添加app轮播图片
103
+		List<String> list = shop.getAppCarouselImg();
104
+		List<TpShopImg> carouselList = new ArrayList<>();
105
+		list.stream().forEach(e -> {
106
+			TpShopImg appCarouselImg = new TpShopImg();
107
+			appCarouselImg.setCommunityId(communityId);
108
+			appCarouselImg.setCreateDate(localDateTime);
109
+			appCarouselImg.setImgType("3");
110
+			appCarouselImg.setShopId(shop.getId());
111
+			appCarouselImg.setImgUrl(e);
112
+			carouselList.add(appCarouselImg);
113
+		});
114
+		shopImgMapper.batchSave(carouselList);
115
+		responseBean.addSuccess("添加成功");
116
+		return responseBean;
117
+	}
118
+	
119
+	/**
120
+	 * 获取商铺信息
121
+	 *
122
+	 * @param id
123
+	 * @return
124
+	 */
125
+	@Override
126
+	public TpShop getShopById(Integer id) {
127
+		TpShop tpShop = shopMapper.selectById(id);
128
+		//获取商铺app首页图片信息
129
+		QueryWrapper<TpShopImg> tpShopImgQueryWrapper = new QueryWrapper<>();
130
+		tpShopImgQueryWrapper.eq("community_id",tpShop.getCommunityId());
131
+		tpShopImgQueryWrapper.eq("shop_id",tpShop.getId());
132
+		tpShopImgQueryWrapper.eq("img_type","1");
133
+		TpShopImg tpShopImg = shopImgMapper.selectOne(tpShopImgQueryWrapper);
134
+		tpShop.setAppIndexImg(tpShopImg.getImgUrl());
135
+		//获取商铺APP列表图片信息
136
+		QueryWrapper<TpShopImg> tpShopImgListWrapper = new QueryWrapper<>();
137
+		tpShopImgListWrapper.eq("community_id",tpShop.getCommunityId());
138
+		tpShopImgListWrapper.eq("shop_id",tpShop.getId());
139
+		tpShopImgListWrapper.eq("img_type","2");
140
+		TpShopImg listShopImg = shopImgMapper.selectOne(tpShopImgListWrapper);
141
+		tpShop.setAppListImg(listShopImg.getImgUrl());
142
+		//获取商铺轮播图列表
143
+		QueryWrapper<TpShopImg> tpShopImgCarouselWrapper = new QueryWrapper<>();
144
+		tpShopImgCarouselWrapper.eq("community_id",tpShop.getCommunityId());
145
+		tpShopImgCarouselWrapper.eq("shop_id",tpShop.getId());
146
+		tpShopImgCarouselWrapper.eq("img_type","3");
147
+		List<TpShopImg> carouselList = shopImgMapper.selectList(tpShopImgCarouselWrapper);
148
+		List<String> carouselUrlList = new ArrayList<>();
149
+		carouselList.stream().forEach(e -> {
150
+			carouselUrlList.add(e.getImgUrl());
151
+		});
152
+		tpShop.setAppCarouselImg(carouselUrlList);
153
+		return tpShop;
154
+	}
60 155
 }

+ 13
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpShopImgMapper.xml Bestand weergeven

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpShopImgMapper">
4
+
5
+    <insert id="batchSave" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6
+        insert into tp_shop_img(community_id,shop_id,img_url,img_type,create_date)
7
+        VALUES
8
+        <foreach collection="list" item="item" index="index" separator=",">
9
+            (#{item.communityId},#{item.shopId},#{item.imgUrl},#{item.imgType},#{item.createDate})
10
+        </foreach>
11
+    </insert>
12
+
13
+</mapper>

+ 0
- 2
VUECODE/smart-property-manage/index.html Bestand weergeven

@@ -4,8 +4,6 @@
4 4
     <meta charset="utf-8">
5 5
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
6 6
     <title>智慧社区物业平台</title>
7
-    <script src="//webapi.amap.com/maps?v=1.4.10&key=81f5560856a88eb5b3da440f18a97845&plugin=AMap.DistrictLayer"></script>
8
-    <script src="//webapi.amap.com/ui/1.0/main.js"></script>
9 7
   </head>
10 8
   <body>
11 9
     <div id="app"></div>

+ 15
- 0
VUECODE/smart-property-manage/src/api/shopType.js Bestand weergeven

@@ -26,6 +26,14 @@ export function addShopType(listQuery) {
26 26
   })
27 27
 }
28 28
 
29
+export function addShop(listQuery) {
30
+  return request({
31
+    url: '/shop/add',
32
+    method: 'post',
33
+    data: listQuery
34
+  })
35
+}
36
+
29 37
 export function getShopType(id) {
30 38
   return request({
31 39
     url: '/shop/get/type/' + id,
@@ -33,6 +41,13 @@ export function getShopType(id) {
33 41
   })
34 42
 }
35 43
 
44
+export function getShop(id) {
45
+  return request({
46
+    url: '/shop/get/' + id,
47
+    method: 'get'
48
+  })
49
+}
50
+
36 51
 export function updateShopType(listQuery) {
37 52
   return request({
38 53
     url: '/shop/update/type',

+ 14
- 0
VUECODE/smart-property-manage/src/router/index.js Bestand weergeven

@@ -394,6 +394,20 @@ export const constantRouterMap = [
394 394
         component: () => import('@/views/shop/shopIndex'),
395 395
         name: 'shop-index',
396 396
         meta: { title: '商铺列表', icon: 'table' }
397
+      },
398
+      {
399
+        path: '/shop/add',
400
+        component: () => import('@/views/shop/shopAdd'),
401
+        name: 'shop-add',
402
+        hidden: true,
403
+        meta: { title: '添加商铺信息', icon: 'table' }
404
+      },
405
+      {
406
+        path: '/shop/edit',
407
+        component: () => import('@/views/shop/shopEdit'),
408
+        name: 'shop-edit',
409
+        hidden: true,
410
+        meta: { title: '修改商铺信息', icon: 'table' }
397 411
       }
398 412
     ]
399 413
   },

+ 19
- 1
VUECODE/smart-property-manage/src/store/modules/shopType.js Bestand weergeven

@@ -1,4 +1,4 @@
1
-import { fetchShopTypeList, changeShopSetting, addShopType, getShopType, updateShopType, deleteShopType, fetchShopList, fetchShopTypeSelect } from '@/api/shopType'
1
+import { fetchShopTypeList, changeShopSetting, addShopType, getShopType, updateShopType, deleteShopType, fetchShopList, fetchShopTypeSelect, addShop, getShop } from '@/api/shopType'
2 2
 
3 3
 const transaction = {
4 4
   namespaced: true,
@@ -39,6 +39,15 @@ const transaction = {
39 39
         })
40 40
       })
41 41
     },
42
+    AddShop({ commit }, listQuery) {
43
+      return new Promise((resolve, reject) => {
44
+        addShop(listQuery).then(response => {
45
+          resolve(response)
46
+        }).catch(error => {
47
+          reject(error)
48
+        })
49
+      })
50
+    },
42 51
     GetShopType({ commit }, id) {
43 52
       return new Promise((resolve, reject) => {
44 53
         getShopType(id).then(response => {
@@ -48,6 +57,15 @@ const transaction = {
48 57
         })
49 58
       })
50 59
     },
60
+    GetShop({ commit }, id) {
61
+      return new Promise((resolve, reject) => {
62
+        getShop(id).then(response => {
63
+          resolve(response)
64
+        }).catch(error => {
65
+          reject(error)
66
+        })
67
+      })
68
+    },
51 69
     UpdateShopType({ commit }, listQuery) {
52 70
       return new Promise((resolve, reject) => {
53 71
         updateShopType(listQuery).then(response => {

+ 315
- 0
VUECODE/smart-property-manage/src/views/shop/shopAdd.vue Bestand weergeven

@@ -0,0 +1,315 @@
1
+<template>
2
+  <div class="root">
3
+    <el-form ref="ruleForm" :model="listData" :rules="rules" label-width="150px" class="add-ruleForm">
4
+      <el-form-item label="商铺名称" prop="shopName">
5
+        <el-input v-model="listData.shopName"/>
6
+      </el-form-item>
7
+      <el-form-item label="商铺说明" prop="remark">
8
+        <el-input v-model="listData.remark"/>
9
+      </el-form-item>
10
+      <el-form-item label="app首页展示图" prop="appIndexImg">
11
+        <el-upload
12
+          class="avatar-uploader"
13
+          name="uploadFiles"
14
+          :action="uploadImgUrl"
15
+          :show-file-list="false"
16
+          :on-success="handleAppIndexSuccess"
17
+          :before-upload="beforeAvatarUpload">
18
+          <img v-if="listData.appIndexImg" :src="listData.appIndexImg" class="avatar">
19
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20
+        </el-upload>
21
+      </el-form-item>
22
+      <el-form-item label="app列表展示图" prop="appListImg">
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          name="uploadFiles"
26
+          :action="uploadImgUrl"
27
+          :show-file-list="false"
28
+          :on-success="handleAppListSuccess"
29
+          :before-upload="beforeAvatarUpload">
30
+          <img v-if="listData.appListImg" :src="listData.appListImg" class="avatar">
31
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+        </el-upload>
33
+      </el-form-item>
34
+      <el-form-item label="app商铺轮播图" prop="appCarouselImg">
35
+        <el-upload
36
+          name="uploadFiles"
37
+          :limit="6"
38
+          :action="uploadImgUrl"
39
+          list-type="picture-card"
40
+          :on-preview="handlePictureCardPreview"
41
+          :on-remove="handleRemove"
42
+          :on-success="handleSuccessCarouselImg">
43
+          <i class="el-icon-plus"></i>
44
+        </el-upload>
45
+        <el-dialog :visible.sync="dialogVisible">
46
+          <img width="100%" :src="dialogImageUrl" alt="">
47
+        </el-dialog>
48
+      </el-form-item>
49
+      <el-form-item label="权重" prop="sort">
50
+        <el-input v-model="listData.sort"/>
51
+      </el-form-item>
52
+      <el-form-item label="商铺类型" prop="shopTypeId">
53
+        <el-select v-model="listData.shopTypeId" placeholder="商铺类型" clearable class="filter-item">
54
+          <el-option v-for="item in shopTypeList" :key="item.id" :value="item.id" :label="item.typeName"/>
55
+        </el-select>
56
+      </el-form-item>
57
+      <el-form-item label="上架状态" prop="shopStatus">
58
+        <el-select v-model="listData.shopStatus" placeholder="请选择">
59
+          <el-option label="已上架" value="1"/>
60
+          <el-option label="已下架" value="2"/>
61
+        </el-select>
62
+      </el-form-item>
63
+      <el-form-item label="联系电话" prop="shopTel">
64
+        <el-input v-model="listData.shopTel"/>
65
+      </el-form-item>
66
+      <el-form-item label="商铺地址" prop="shopAddress">
67
+        <el-input v-model="listData.shopAddress"/>
68
+      </el-form-item>
69
+      <el-form-item label="人均消费" prop="averagePrice">
70
+        <el-input v-model="listData.averagePrice"/>
71
+      </el-form-item>
72
+      <el-form-item label="高德坐标">
73
+        <el-input placeholder="经度" v-model="listData.shopLongitude" style="width: 150px;" />
74
+        <el-input placeholder="纬度" v-model="listData.shopLatitude" style="width: 150px;" />
75
+      </el-form-item>
76
+      <el-form-item label="">
77
+         <!-- 地图 -->
78
+        <div style="width:100%;height:300px;" class="amap-page-container">
79
+          <el-amap-search-box :search-option="searchOption" :on-search-result="onSearchResult" class="search-box"/>
80
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo">
81
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
82
+          </el-amap>
83
+        </div>
84
+      </el-form-item>
85
+      <el-form-item label="商铺介绍">
86
+          <!-- <el-input v-model="addForm.bannerContent" placeholder="内容详情"/> -->
87
+          <div id="father">
88
+            <wangeditor @wangeditorEvent="wangeditorValue"/>
89
+          </div>
90
+        </el-form-item>
91
+      <el-form-item>
92
+        <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
93
+        <el-button @click="resetForm('ruleForm')">重置</el-button>
94
+      </el-form-item>
95
+    </el-form>
96
+  </div>
97
+</template>
98
+
99
+<script>
100
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
101
+import Wangeditor from '@/components/Wangeditor'
102
+
103
+export default {
104
+  components: { Pagination, Wangeditor },
105
+  data() {
106
+    return {
107
+      events: {
108
+        click: e => {
109
+          // _self.postData.Coordinate = e.lnglat.lat + ',' + e.lnglat.lng
110
+          this.listData.shopLongitude = e.lnglat.lng
111
+          this.listData.shopLatitude = e.lnglat.lat
112
+        }
113
+      },
114
+      listData: {
115
+        shopName: '',
116
+        remark: '',
117
+        appIndexImg: '',
118
+        appListImg: '',
119
+        appCarouselImg: [],
120
+        sort: '',
121
+        shopTypeId: '',
122
+        shopStatus: '',
123
+        shopTel: '',
124
+        shopAddress: '',
125
+        averagePrice: '',
126
+        shopLongitude: '',
127
+        shopLatitude: '',
128
+        shopIntroduction: ''
129
+      },
130
+      dialogImageUrl: '',
131
+      dialogVisible: false,
132
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
133
+      markers: [],
134
+      shopTypeList: [],
135
+      searchOption: {
136
+        city: '南京',
137
+        citylimit: false
138
+      },
139
+      mapCenter: [118.789509, 32.019989],
140
+      tableKey: 0,
141
+      rules: {
142
+        typeName: [
143
+          { required: true, message: '请输入商铺名称', trigger: 'blur' }
144
+        ],
145
+        remark: [
146
+          { required: true, message: '请输入商铺说明', trigger: 'blur' }
147
+        ],
148
+        shopTel: [
149
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
150
+        ],
151
+        shopAddress: [
152
+          { required: true, message: '请输入商铺地址', trigger: 'blur' }
153
+        ],
154
+        appIndexImg: [
155
+          { required: true, message: 'app首页展示图', trigger: 'blur' }
156
+        ],
157
+        appListImg: [
158
+          { required: true, message: 'app列表展示图', trigger: 'blur' }
159
+        ],
160
+        appCarouselImg: [
161
+          { required: true, message: 'app商铺轮播图', trigger: 'blur' }
162
+        ],
163
+      }
164
+    }
165
+  },
166
+  mounted() {
167
+    this.getShopTypeList()
168
+  },
169
+  methods: {
170
+     addMarker() {
171
+      const lng = 121.5 + Math.round(Math.random() * 1000) / 10000
172
+      const lat = 31.197646 + Math.round(Math.random() * 500) / 10000
173
+      this.markers.push([lng, lat])
174
+    },
175
+    beforeAvatarUpload(file) {
176
+    },
177
+    handleAppIndexSuccess(res, file) {
178
+      this.listData.appIndexImg = res.data[0]
179
+    },
180
+    handleAppListSuccess(res, file) {
181
+      this.listData.appListImg = res.data[0]
182
+    },
183
+    handleRemove(file, fileList) {
184
+      this.listData.appCarouselImg = []
185
+      for (let i = 0; i < fileList.length; i++) {
186
+        this.listData.appCarouselImg.push(fileList[i].response.data[0])
187
+      }
188
+    },
189
+    handleSuccessCarouselImg(response, file, fileList) { // 活动配图上传成功时回调
190
+      const resImg = response.data[0]
191
+      this.listData.appCarouselImg.push(resImg)
192
+    },
193
+    handlePictureCardPreview(file) {
194
+      this.dialogImageUrl = file.url;
195
+      this.dialogVisible = true;
196
+    },
197
+    getShopTypeList() {
198
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listData).then((res) => {
199
+        this.shopTypeList = res.data
200
+      }).catch(() => {
201
+        console.log('error ListAnnouncement')
202
+      })
203
+    },
204
+    onSearchResult(pois) {
205
+      // 搜索地图
206
+      let latSum = 0
207
+      let lngSum = 0
208
+      if (pois.length > 0) {
209
+        pois.forEach(poi => {
210
+          const { lng, lat } = poi
211
+          lngSum += lng
212
+          latSum += lat
213
+          this.markers.push([poi.lng, poi.lat])
214
+        })
215
+        const center = {
216
+          lng: lngSum / pois.length,
217
+          lat: latSum / pois.length
218
+        }
219
+        this.mapCenter = [center.lng, center.lat]
220
+      }
221
+    },
222
+    wangeditorValue(value) {
223
+      this.listData.shopIntroduction = value // 在这里接受子组件传过来的参数,赋值给data里的参数
224
+    },
225
+    submitForm(formName) { // 提交
226
+      this.$refs[formName].validate((valid) => {
227
+        if (valid) {
228
+          this.addShop()
229
+        } else {
230
+          console.log('error submit!!')
231
+          return false
232
+        }
233
+      })
234
+    },
235
+    resetForm(formName) { // 重置
236
+      // 重置为未注册
237
+      this.isRegistered = true
238
+      // 重置为非户主
239
+      this.roleDisabled = false
240
+
241
+      console.log(this.isRegistered)
242
+      this.$refs[formName].resetFields()
243
+    },
244
+    addShop() {
245
+      // 加载框
246
+      const loading = this.$loading({
247
+        lock: true,
248
+        text: 'Loading',
249
+        spinner: 'el-icon-loading',
250
+        background: 'rgba(0, 0, 0, 0.7)'
251
+      })
252
+      this.$store.dispatch('shopType/AddShop', this.listData).then((res) => {
253
+        if (res.code === '0') {
254
+          this.$message({
255
+            message: res.message,
256
+            type: 'success'
257
+          })
258
+          this.$router.push({ name: 'shop-index' })
259
+          loading.close()
260
+          return
261
+        }
262
+        this.$message.error(res.message)
263
+        loading.close()
264
+      }).catch(() => {
265
+        loading.close()
266
+        console.log('error AddBuilding')
267
+      })
268
+    }
269
+  }
270
+}
271
+</script>
272
+
273
+<style>
274
+.avatar-uploader .el-upload {
275
+    border: 1px dashed #d9d9d9;
276
+    border-radius: 6px;
277
+    cursor: pointer;
278
+    position: relative;
279
+    overflow: hidden;
280
+  }
281
+  .avatar-uploader .el-upload:hover {
282
+    border-color: #409EFF;
283
+  }
284
+  .avatar-uploader-icon {
285
+    font-size: 28px;
286
+    color: #8c939d;
287
+    width: 178px;
288
+    height: 178px;
289
+    line-height: 178px;
290
+    text-align: center;
291
+  }
292
+  .avatar {
293
+    width: 178px;
294
+    height: 178px;
295
+    display: block;
296
+  }
297
+  
298
+.add-ruleForm{
299
+  width: 800px;
300
+  margin-left: auto;
301
+  margin-right: auto;
302
+  margin-top: 50px;
303
+}
304
+</style>
305
+<style scoped>
306
+.search-box {
307
+  position: absolute;
308
+  top: 25px;
309
+  left: 20px;
310
+}
311
+
312
+.amap-page-container {
313
+  position: relative;
314
+}
315
+</style>

+ 330
- 0
VUECODE/smart-property-manage/src/views/shop/shopEdit.vue Bestand weergeven

@@ -0,0 +1,330 @@
1
+<template>
2
+  <div class="root">
3
+    <el-form ref="ruleForm" :model="listData" :rules="rules" label-width="150px" class="add-ruleForm">
4
+      <el-form-item label="商铺名称" prop="shopName">
5
+        <el-input v-model="listData.shopName"/>
6
+      </el-form-item>
7
+      <el-form-item label="商铺说明" prop="remark">
8
+        <el-input v-model="listData.remark"/>
9
+      </el-form-item>
10
+      <el-form-item label="app首页展示图" prop="appIndexImg">
11
+        <el-upload
12
+          class="avatar-uploader"
13
+          name="uploadFiles"
14
+          :action="uploadImgUrl"
15
+          :show-file-list="false"
16
+          :on-success="handleAppIndexSuccess"
17
+          :before-upload="beforeAvatarUpload">
18
+          <img v-if="listData.appIndexImg" :src="listData.appIndexImg" class="avatar">
19
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20
+        </el-upload>
21
+      </el-form-item>
22
+      <el-form-item label="app列表展示图" prop="appListImg">
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          name="uploadFiles"
26
+          :action="uploadImgUrl"
27
+          :show-file-list="false"
28
+          :on-success="handleAppListSuccess"
29
+          :before-upload="beforeAvatarUpload">
30
+          <img v-if="listData.appListImg" :src="listData.appListImg" class="avatar">
31
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+        </el-upload>
33
+      </el-form-item>
34
+      <el-form-item label="app商铺轮播图" prop="appCarouselImg">
35
+        <el-upload
36
+          name="uploadFiles"
37
+          :limit="6"
38
+          :action="uploadImgUrl"
39
+          list-type="picture-card"
40
+          :file-list="displayAppCarouselImg"
41
+          :on-preview="handlePictureCardPreview"
42
+          :on-remove="handleRemove"
43
+          :on-success="handleSuccessCarouselImg">
44
+          <i class="el-icon-plus"></i>
45
+        </el-upload>
46
+        <el-dialog :visible.sync="dialogVisible">
47
+          <img width="100%" :src="dialogImageUrl" alt="">
48
+        </el-dialog>
49
+      </el-form-item>
50
+      <el-form-item label="权重" prop="sort">
51
+        <el-input v-model="listData.sort"/>
52
+      </el-form-item>
53
+      <el-form-item label="商铺类型" prop="shopTypeId">
54
+        <el-select v-model="listData.shopTypeId" placeholder="商铺类型" clearable class="filter-item">
55
+          <el-option v-for="item in shopTypeList" :key="item.id" :value="item.id" :label="item.typeName"/>
56
+        </el-select>
57
+      </el-form-item>
58
+      <el-form-item label="上架状态" prop="shopStatus">
59
+        <el-select v-model="listData.shopStatus" placeholder="请选择">
60
+          <el-option label="已上架" value="1"/>
61
+          <el-option label="已下架" value="2"/>
62
+        </el-select>
63
+      </el-form-item>
64
+      <el-form-item label="联系电话" prop="shopTel">
65
+        <el-input v-model="listData.shopTel"/>
66
+      </el-form-item>
67
+      <el-form-item label="商铺地址" prop="shopAddress">
68
+        <el-input v-model="listData.shopAddress"/>
69
+      </el-form-item>
70
+      <el-form-item label="人均消费" prop="averagePrice">
71
+        <el-input v-model="listData.averagePrice"/>
72
+      </el-form-item>
73
+      <el-form-item label="高德坐标">
74
+        <el-input placeholder="经度" v-model="listData.shopLongitude" style="width: 150px;" />
75
+        <el-input placeholder="纬度" v-model="listData.shopLatitude" style="width: 150px;" />
76
+      </el-form-item>
77
+      <el-form-item label="">
78
+         <!-- 地图 -->
79
+        <div style="width:100%;height:300px;" class="amap-page-container">
80
+          <el-amap-search-box :search-option="searchOption" :on-search-result="onSearchResult" class="search-box"/>
81
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo">
82
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
83
+          </el-amap>
84
+        </div>
85
+      </el-form-item>
86
+      <el-form-item label="商铺介绍">
87
+          <!-- <el-input v-model="addForm.bannerContent" placeholder="内容详情"/> -->
88
+          <div id="father">
89
+            <wangeditor :content="listData.shopIntroduction" @wangeditorEvent="wangeditorValue"/>
90
+          </div>
91
+        </el-form-item>
92
+      <el-form-item>
93
+        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
94
+      </el-form-item>
95
+    </el-form>
96
+  </div>
97
+</template>
98
+
99
+<script>
100
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
101
+import Wangeditor from '@/components/Wangeditor'
102
+
103
+export default {
104
+  components: { Pagination, Wangeditor },
105
+  data() {
106
+    return {
107
+      events: {
108
+        click: e => {
109
+          // _self.postData.Coordinate = e.lnglat.lat + ',' + e.lnglat.lng
110
+          this.listData.shopLongitude = e.lnglat.lng
111
+          this.listData.shopLatitude = e.lnglat.lat
112
+        }
113
+      },
114
+      listData: {
115
+        id: '',
116
+        shopName: '',
117
+        remark: '',
118
+        appIndexImg: '',
119
+        appListImg: '',
120
+        appCarouselImg: [],
121
+        sort: '',
122
+        shopTypeId: '',
123
+        shopStatus: '',
124
+        shopTel: '',
125
+        shopAddress: '',
126
+        averagePrice: '',
127
+        shopLongitude: '',
128
+        shopLatitude: '',
129
+        shopIntroduction: ''
130
+      },
131
+      displayAppCarouselImg: [],
132
+      dialogImageUrl: '',
133
+      dialogVisible: false,
134
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
135
+      markers: [],
136
+      shopTypeList: [],
137
+      searchOption: {
138
+        city: '南京',
139
+        citylimit: false
140
+      },
141
+      mapCenter: [118.789509, 32.019989],
142
+      tableKey: 0,
143
+      rules: {
144
+        typeName: [
145
+          { required: true, message: '请输入商铺名称', trigger: 'blur' }
146
+        ],
147
+        remark: [
148
+          { required: true, message: '请输入商铺说明', trigger: 'blur' }
149
+        ],
150
+        shopTel: [
151
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
152
+        ],
153
+        shopAddress: [
154
+          { required: true, message: '请输入商铺地址', trigger: 'blur' }
155
+        ],
156
+        appIndexImg: [
157
+          { required: true, message: 'app首页展示图', trigger: 'blur' }
158
+        ],
159
+        appListImg: [
160
+          { required: true, message: 'app列表展示图', trigger: 'blur' }
161
+        ],
162
+        appCarouselImg: [
163
+          { required: true, message: 'app商铺轮播图', trigger: 'blur' }
164
+        ],
165
+      }
166
+    }
167
+  },
168
+  created() {
169
+    this.listData.id = this.$route.query.id
170
+    this.getById()
171
+    this.getShopTypeList()
172
+  },
173
+  methods: {
174
+     addMarker() {
175
+      const lng = 121.5 + Math.round(Math.random() * 1000) / 10000
176
+      const lat = 31.197646 + Math.round(Math.random() * 500) / 10000
177
+      this.markers.push([lng, lat])
178
+    },
179
+    getById() {
180
+      this.$store.dispatch('shopType/GetShop', this.listData.id).then((res) => {
181
+        const shopData = res.data
182
+        this.listData = shopData
183
+        alert(this.listData.shopIntroduction)
184
+        // 多张图片进行遍历
185
+        for (let i = 0; i < shopData.appCarouselImg.length; i++) {
186
+          this.displayAppCarouselImg.push({ url: shopData.appCarouselImg[i] })
187
+        }
188
+      })
189
+    },
190
+    beforeAvatarUpload(file) {
191
+    },
192
+    handleAppIndexSuccess(res, file) {
193
+      this.listData.appIndexImg = res.data[0]
194
+    },
195
+    handleAppListSuccess(res, file) {
196
+      this.listData.appListImg = res.data[0]
197
+    },
198
+    handleRemove(file, fileList) {
199
+      this.listData.appCarouselImg = []
200
+      for (let i = 0; i < fileList.length; i++) {
201
+        this.listData.appCarouselImg.push(fileList[i].response.data[0])
202
+      }
203
+    },
204
+    handleSuccessCarouselImg(response, file, fileList) { // 活动配图上传成功时回调
205
+      const resImg = response.data[0]
206
+      this.listData.appCarouselImg.push(resImg)
207
+    },
208
+    handlePictureCardPreview(file) {
209
+      this.dialogImageUrl = file.url;
210
+      this.dialogVisible = true;
211
+    },
212
+    getShopTypeList() {
213
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listData).then((res) => {
214
+        this.shopTypeList = res.data
215
+      }).catch(() => {
216
+        console.log('error ListAnnouncement')
217
+      })
218
+    },
219
+    onSearchResult(pois) {
220
+      // 搜索地图
221
+      let latSum = 0
222
+      let lngSum = 0
223
+      if (pois.length > 0) {
224
+        pois.forEach(poi => {
225
+          const { lng, lat } = poi
226
+          lngSum += lng
227
+          latSum += lat
228
+          this.markers.push([poi.lng, poi.lat])
229
+        })
230
+        const center = {
231
+          lng: lngSum / pois.length,
232
+          lat: latSum / pois.length
233
+        }
234
+        this.mapCenter = [center.lng, center.lat]
235
+      }
236
+    },
237
+    wangeditorValue(value) {
238
+      this.listData.shopIntroduction = value // 在这里接受子组件传过来的参数,赋值给data里的参数
239
+    },
240
+    submitForm(formName) { // 提交
241
+      this.$refs[formName].validate((valid) => {
242
+        if (valid) {
243
+          this.addShop()
244
+        } else {
245
+          console.log('error submit!!')
246
+          return false
247
+        }
248
+      })
249
+    },
250
+    resetForm(formName) { // 重置
251
+      // 重置为未注册
252
+      this.isRegistered = true
253
+      // 重置为非户主
254
+      this.roleDisabled = false
255
+
256
+      console.log(this.isRegistered)
257
+      this.$refs[formName].resetFields()
258
+    },
259
+    addShop() {
260
+      // 加载框
261
+      const loading = this.$loading({
262
+        lock: true,
263
+        text: 'Loading',
264
+        spinner: 'el-icon-loading',
265
+        background: 'rgba(0, 0, 0, 0.7)'
266
+      })
267
+      this.$store.dispatch('shopType/AddShop', this.listData).then((res) => {
268
+        if (res.code === '0') {
269
+          this.$message({
270
+            message: res.message,
271
+            type: 'success'
272
+          })
273
+          this.$router.push({ name: 'shop-index' })
274
+          loading.close()
275
+          return
276
+        }
277
+        this.$message.error(res.message)
278
+        loading.close()
279
+      }).catch(() => {
280
+        loading.close()
281
+        console.log('error AddBuilding')
282
+      })
283
+    }
284
+  }
285
+}
286
+</script>
287
+
288
+<style>
289
+.avatar-uploader .el-upload {
290
+    border: 1px dashed #d9d9d9;
291
+    border-radius: 6px;
292
+    cursor: pointer;
293
+    position: relative;
294
+    overflow: hidden;
295
+  }
296
+  .avatar-uploader .el-upload:hover {
297
+    border-color: #409EFF;
298
+  }
299
+  .avatar-uploader-icon {
300
+    font-size: 28px;
301
+    color: #8c939d;
302
+    width: 178px;
303
+    height: 178px;
304
+    line-height: 178px;
305
+    text-align: center;
306
+  }
307
+  .avatar {
308
+    width: 178px;
309
+    height: 178px;
310
+    display: block;
311
+  }
312
+  
313
+.add-ruleForm{
314
+  width: 800px;
315
+  margin-left: auto;
316
+  margin-right: auto;
317
+  margin-top: 50px;
318
+}
319
+</style>
320
+<style scoped>
321
+.search-box {
322
+  position: absolute;
323
+  top: 25px;
324
+  left: 20px;
325
+}
326
+
327
+.amap-page-container {
328
+  position: relative;
329
+}
330
+</style>

+ 4
- 15
VUECODE/smart-property-manage/src/views/shop/shopIndex.vue Bestand weergeven

@@ -27,7 +27,8 @@
27 27
     <div class="button">
28 28
       <el-button type="primary" @click="add">添加</el-button>
29 29
       <el-button type="warning" @click="edit">修改</el-button>
30
-      <el-button type="danger" @click="deleteAnnouncement">作废</el-button>
30
+      <el-button type="danger" @click="deleteAnnouncement">下架商铺</el-button>
31
+      <el-button type="danger" @click="deleteAnnouncement">上架商铺</el-button>
31 32
     </div>
32 33
     <el-table
33 34
       v-loading="listLoading"
@@ -182,7 +183,7 @@ export default {
182 183
     },
183 184
     // 添加公告
184 185
     add() {
185
-      this.$router.push({ name: 'announcement-add' })
186
+      this.$router.push({ name: 'shop-add' })
186 187
     },
187 188
     edit(){// 编辑公告
188 189
       const ids = this.deleteIds
@@ -196,19 +197,7 @@ export default {
196 197
       }
197 198
        let ide= this.deleteIds[0]
198 199
        this.listQuery.id = ide
199
-      this.$store.dispatch('AnnouncementById', this.listQuery).then((res) => {
200
-        const resData = res.data
201
-        const announcement = resData.tpAnnouncement
202
-        const imgList = resData.studentList
203
-        this.listQuery = announcement
204
-        this.listQuery.announcementTitle = ''
205
-        console.log("1",this.listQuery.status)
206
-        if(this.listQuery.status == 0){
207
-          this.$message.error('已作废不可以修改')
208
-          return
209
-        } 
210
-       this.$router.push({ name: 'announcement-edit', query: { id: ide }})
211
-      }) 
200
+       this.$router.push({ name: 'shop-edit', query: { id: ide }})
212 201
       },
213 202
     deleteAnnouncement(){
214 203
        let ide= this.deleteIds[0]

+ 213
- 177
文档/MYSQL/smartCommunity.pdb
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 213
- 177
文档/MYSQL/smartCommunity.pdm
Diff onderdrukt omdat het te groot bestand
Bestand weergeven