weiximei 6 年之前
父節點
當前提交
2618ef57cd

+ 15
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java 查看文件

@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiImplicitParams;
12 12
 import io.swagger.annotations.ApiOperation;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14 14
 import org.springframework.cloud.context.config.annotation.RefreshScope;
15
+import org.springframework.web.bind.annotation.PathVariable;
15 16
 import org.springframework.web.bind.annotation.RequestBody;
16 17
 import org.springframework.web.bind.annotation.RequestMapping;
17 18
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -64,4 +65,18 @@ public class TransactionController extends BaseController {
64 65
 		responseBean = transactionService.getTransactionList(tpTransaction,pageNum,pageSize);
65 66
 		return responseBean;
66 67
 	}
68
+	
69
+	@ApiOperation(value = "获取二手租赁详情", notes = "获取二手租赁详情")
70
+	@ApiImplicitParams({
71
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
72
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
73
+			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "交易id")
74
+	})
75
+	@RequestMapping(value = "/transaction/{id}",method = RequestMethod.GET)
76
+	public ResponseBean getList(@PathVariable(value = "id") Integer id, HttpSession session){
77
+		ResponseBean responseBean = new ResponseBean();
78
+		UserElement userElement = getUserElement(session);
79
+		responseBean = transactionService.getTransactionInfo(id);
80
+		return responseBean;
81
+	}
67 82
 }

+ 7
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java 查看文件

@@ -16,4 +16,11 @@ import com.community.huiju.model.TpTransaction;
16 16
 public interface ITransactionService extends IService<TpTransaction> {
17 17
 	
18 18
 	ResponseBean getTransactionList(TpTransaction tpTransaction, Integer pageNum, Integer pageSize);
19
+	
20
+	/**
21
+	 * 获取交易信息详情
22
+	 * @param id
23
+	 * @return
24
+	 */
25
+	ResponseBean getTransactionInfo(Integer id);
19 26
 }

+ 26
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java 查看文件

@@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8 8
 import com.community.commom.mode.ResponseBean;
9 9
 import com.community.commom.session.UserElement;
10
+import com.community.huiju.dao.TdImagesMapper;
10 11
 import com.community.huiju.dao.TpTransactionMapper;
12
+import com.community.huiju.model.TdImages;
11 13
 import com.community.huiju.model.TpBuildingOwnerInfo;
12 14
 import com.community.huiju.model.TpTransaction;
13 15
 import com.community.huiju.service.ITransactionService;
@@ -32,6 +34,9 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
32 34
 	@Autowired
33 35
 	private TpTransactionMapper tpTransactionMapper;
34 36
 	
37
+	@Autowired
38
+	private TdImagesMapper tdImagesMapper;
39
+	
35 40
 	@Override
36 41
 	public ResponseBean getTransactionList(TpTransaction tpTransaction, Integer pageNum, Integer pageSize) {
37 42
 		ResponseBean responseBean = new ResponseBean();
@@ -44,4 +49,25 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
44 49
 		responseBean.addSuccess(map);
45 50
 		return responseBean;
46 51
 	}
52
+	
53
+	/**
54
+	 * 获取交易信息详情
55
+	 *
56
+	 * @param id
57
+	 * @return
58
+	 */
59
+	@Override
60
+	public ResponseBean getTransactionInfo(Integer id) {
61
+		ResponseBean responseBean = new ResponseBean();
62
+		TpTransaction tpTransaction = tpTransactionMapper.selectById(id);
63
+		QueryWrapper<TdImages> queryWrapper = new QueryWrapper<>();
64
+		queryWrapper.eq("uuid", id);
65
+		queryWrapper.eq("type", "transaction");
66
+		List<TdImages> list = tdImagesMapper.selectList(queryWrapper);
67
+		Map<String,Object> map = Maps.newHashMap();
68
+		map.put("tpTransaction",tpTransaction);
69
+		map.put("list",list);
70
+		responseBean.addSuccess(map);
71
+		return responseBean;
72
+	}
47 73
 }

+ 1
- 1
VUECODE/smart-operate-manage/src/views/login/index.vue 查看文件

@@ -49,7 +49,7 @@
49 49
         >登录</el-button>
50 50
       </el-form>
51 51
     </div>
52
-    <span class="bottom-desc">Copyright © 南京荟房网络科技有限公司, All Rights Reserved.</span>
52
+    <span class="bottom-desc">Copyright © 南京锦城佳业网络科技有限公司, All Rights Reserved.</span>
53 53
   </div>
54 54
 </template>
55 55
 

+ 8
- 0
VUECODE/smart-property-manage/src/api/transaction.js 查看文件

@@ -7,3 +7,11 @@ export function fetchList(query) {
7 7
     params: query
8 8
   })
9 9
 }
10
+
11
+// 查询 活动详情
12
+export function transactionById(id) {
13
+  return request({
14
+    url: '/transaction/' + id,
15
+    method: 'get'
16
+  })
17
+}

+ 7
- 0
VUECODE/smart-property-manage/src/router/index.js 查看文件

@@ -116,6 +116,13 @@ export const constantRouterMap = [
116 116
         name: 'transaction-import',
117 117
         meta: { title: '二手求购租赁管理', icon: 'table' }
118 118
       },
119
+      {
120
+        path: '/transaction/info',
121
+        component: () => import('@/views/social/transaction/info/transactionInfo'),
122
+        name: 'transaction-info',
123
+        hidden: true,
124
+        meta: { title: '二手求购租赁详情', icon: 'table' }
125
+      },
119 126
       {
120 127
         path: '/activity/add',
121 128
         component: () => import('@/views/social/activity/add/index'),

+ 10
- 1
VUECODE/smart-property-manage/src/store/modules/transaction.js 查看文件

@@ -1,4 +1,4 @@
1
-import { fetchList } from '@/api/transaction'
1
+import { fetchList, transactionById } from '@/api/transaction'
2 2
 
3 3
 const transaction = {
4 4
   namespaced: true,
@@ -29,6 +29,15 @@ const transaction = {
29 29
           reject(error)
30 30
         })
31 31
       })
32
+    },
33
+    TransactionById({ commit, state }, data) { // 查询二手租赁详情
34
+      return new Promise((resolve, reject) => {
35
+        transactionById(data).then(response => {
36
+          resolve(response)
37
+        }).catch(error => {
38
+          reject(error)
39
+        })
40
+      })
32 41
     }
33 42
   }
34 43
 }

+ 1
- 1
VUECODE/smart-property-manage/src/views/login/index.vue 查看文件

@@ -68,7 +68,7 @@
68 68
         <el-button v-else type="primary" style="width:100%;" disabled>登录</el-button>
69 69
       </el-form>
70 70
     </div>
71
-    <span class="bottom-desc">Copyright © 南京荟房网络科技有限公司, All Rights Reserved.</span>
71
+    <span class="bottom-desc">Copyright © 南京锦城佳业网络科技有限公司, All Rights Reserved.</span>
72 72
   </div>
73 73
 </template>
74 74
 

+ 3
- 9
VUECODE/smart-property-manage/src/views/social/transaction/index.vue 查看文件

@@ -43,7 +43,7 @@
43 43
       </el-table-column>
44 44
       <el-table-column label="标题" align="center">
45 45
         <template slot-scope="scope">
46
-          <span>{{ scope.row.transactionTitle }}</span>
46
+          <span @click="handleLook(scope.row.id)" style="color: #409EFF;cursor: pointer">{{ scope.row.transactionTitle }}</span>
47 47
         </template>
48 48
       </el-table-column>
49 49
       <el-table-column label="查看人数" align="center">
@@ -203,14 +203,8 @@ export default {
203 203
       this.getEditCityList()
204 204
       this.getEditDistrictList()
205 205
     },
206
-    handleLook(row) {
207
-      this.setCurrent(row)
208
-      this.dialogLookFormVisible = true
209
-      this.$nextTick(() => {
210
-        this.$refs['dataForm'].clearValidate()
211
-      })
212
-      this.getEditCityList()
213
-      this.getEditDistrictList()
206
+    handleLook(id) {
207
+      this.$router.push({ name: 'transaction-info', params: { id: id }})
214 208
     },
215 209
     handleCreate() {
216 210
       this.resetDetail()

+ 133
- 0
VUECODE/smart-property-manage/src/views/social/transaction/info/transactionInfo.vue 查看文件

@@ -0,0 +1,133 @@
1
+<template>
2
+  <div id="root">
3
+    <span class="activityTile">{{ ruleForm.activityTitle }}</span>
4
+    <img :src="ruleForm.activityCarouselImg" width="700" height="500">
5
+    <div class="activityContext">
6
+      {{ ruleForm.activityContent }}
7
+    </div>
8
+    <div class="activityContextImg">
9
+      <img v-for="item in ruleForm.contentImg" :src="item" width="700" height="500" >
10
+    </div>
11
+  </div>
12
+</template>
13
+
14
+<script>
15
+export default {
16
+  data() {
17
+    return {
18
+      asOfdate: '2018/10/10 23:59:59',
19
+      ruleForm: {
20
+        id: '',
21
+        activityTitle: '',
22
+        activityCarouselImg: '', // 轮播图
23
+        activityContent: '', // 活动内容详细
24
+        contentImg: [], // 活动内容配图
25
+        signUpCount: '', // 报名人数统计
26
+        signUpMax: '', //  活动人数上限
27
+        registrationEndTime: '', // 报名活动结束时间
28
+        sort: 1, // 权重
29
+        status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
30
+      }
31
+    }
32
+  },
33
+  mounted() {
34
+    this.getById(this.$route.params.id)
35
+  },
36
+  methods: {
37
+    getById(id) { // 根据ID获取活动信息
38
+      this.$store.dispatch('TransactionById', id).then((res) => {
39
+        const resData = res.data
40
+        this.ruleForm = resData.info
41
+        this.ruleForm.contentImg = resData.contentImg
42
+      })
43
+    },
44
+    formatDate(val) {
45
+      var value = new Date(val)
46
+      var year = value.getFullYear()
47
+      var month = value.getMonth() + 1
48
+      var day = value.getDate()
49
+      // var hour = value.getHours()
50
+      // var minutes = value.getMinutes()
51
+      // var seconds = value.getSeconds()
52
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
53
+      return year + '-' + month + '-' + day
54
+    },
55
+    ediActivity() { // 修改活动
56
+      this.$router.push({ name: 'activity-edi', params: { id: this.ruleForm.id }})
57
+    }
58
+  }
59
+}
60
+</script>
61
+
62
+<style scoped>
63
+#root {
64
+  display: flex;
65
+  flex-flow: column;
66
+  width: 700px;
67
+  margin-top: 50px;
68
+  margin-left: auto;
69
+  margin-right: auto;
70
+}
71
+.activityTile{
72
+  text-align: center;
73
+  font-size: 30px;
74
+  margin-bottom: 10px;
75
+}
76
+.activityContext{
77
+  margin-top: 20px;
78
+  margin-bottom: 20px;
79
+  font-size: 20px;
80
+  justify-items: center;
81
+}
82
+.progress {
83
+  display: flex;
84
+  justify-content: space-between;
85
+  margin-top: 20px;
86
+  margin-bottom: 20px;
87
+}
88
+.text-progress {
89
+  width: 500px;
90
+  float: left;
91
+  align-content: center;
92
+  position: absolute;
93
+  margin-top: 12px;
94
+}
95
+.people-number {
96
+  position: relative;
97
+  margin-left: 180px;
98
+}
99
+.outer-layer {
100
+  background-color: gainsboro;
101
+  height: 3px;
102
+  width: 450px;
103
+  margin-top: -10px;
104
+  position: relative;
105
+}
106
+.inner-layer {
107
+  background-color: aquamarine;
108
+  height: 6px;
109
+  width: 100px;
110
+  position: relative;
111
+  margin-top: -4px;
112
+}
113
+.circular {
114
+  border: 1px #001528 solid;
115
+  border-radius: 10px;
116
+  /*background-color: chartreuse;*/
117
+  width: 20px;
118
+  height: 20px;
119
+  position: relative;
120
+  margin-left: 452px;
121
+  margin-top: 11px;
122
+  float: left;
123
+}
124
+.people-limit {
125
+  margin-top: 13px;
126
+}
127
+.bom-button{
128
+  display: flex;
129
+  justify-content: center;
130
+  margin-top: 20px;
131
+  margin-bottom: 100px;
132
+}
133
+</style>