dingxin 6 years ago
parent
commit
db650a7d92
21 changed files with 1696 additions and 141 deletions
  1. 502
    0
      CODE/smart-community-word/.idea/workspace.xml
  2. 33
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java
  3. 3
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  4. 27
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReplyMapper.java
  5. 2
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReportMapper.java
  6. 10
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpTransaction.java
  7. 80
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReply.java
  8. 27
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java
  9. 119
    5
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java
  10. 2
    4
      CODE/smart-community/property-api/src/main/resources/mapper/TpTransactionMapper.xml
  11. 41
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TransactionReplyMapper.xml
  12. 1
    1
      CODE/smart-community/property-api/src/main/resources/mapper/TransactionReportMapper.xml
  13. 46
    1
      VUECODE/smart-property-manage/src/api/transaction.js
  14. 15
    1
      VUECODE/smart-property-manage/src/router/index.js
  15. 28
    1
      VUECODE/smart-property-manage/src/store/modules/transaction.js
  16. 59
    59
      VUECODE/smart-property-manage/src/views/social/transaction/index.vue
  17. 76
    66
      VUECODE/smart-property-manage/src/views/social/transaction/info/transactionInfo.vue
  18. 234
    0
      VUECODE/smart-property-manage/src/views/social/transaction/reply/transactionreply.vue
  19. 3
    3
      VUECODE/smart-property-manage/src/views/social/transaction/transactionAdd.vue
  20. 179
    0
      VUECODE/smart-property-manage/src/views/social/transaction/transactionDetails.vue
  21. 209
    0
      VUECODE/smart-property-manage/src/views/social/transaction/transactionEdit.vue

+ 502
- 0
CODE/smart-community-word/.idea/workspace.xml View File

@@ -0,0 +1,502 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="8242fb4e-eadf-4769-b4c9-e866954fc164" name="Default Changelist" comment="">
5
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReportMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReportMapper.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TpTransaction.java" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TpTransaction.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TpTransactionMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TpTransactionMapper.xml" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TransactionReportMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TransactionReportMapper.xml" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/api/transaction.js" beforeDir="false" afterPath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/api/transaction.js" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/router/index.js" afterDir="false" />
15
+      <change beforePath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/store/modules/transaction.js" beforeDir="false" afterPath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/store/modules/transaction.js" afterDir="false" />
16
+      <change beforePath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/views/social/transaction/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/views/social/transaction/index.vue" afterDir="false" />
17
+      <change beforePath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/views/social/transaction/info/transactionInfo.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/views/social/transaction/info/transactionInfo.vue" afterDir="false" />
18
+      <change beforePath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/views/social/transaction/transactionAdd.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../../VUECODE/smart-property-manage/src/views/social/transaction/transactionAdd.vue" afterDir="false" />
19
+    </list>
20
+    <option name="SHOW_DIALOG" value="false" />
21
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
22
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
23
+    <option name="LAST_RESOLUTION" value="IGNORE" />
24
+  </component>
25
+  <component name="CoverageDataManager">
26
+    <SUITE FILE_PATH="coverage/smart_community_word$PropertyApplication.ic" NAME="PropertyApplication Coverage Results" MODIFIED="1552024801928" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
27
+  </component>
28
+  <component name="FileEditorManager">
29
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
30
+      <file pinned="false" current-in-tab="false">
31
+        <entry file="file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java">
32
+          <provider selected="true" editor-type-id="text-editor">
33
+            <state relative-caret-position="424">
34
+              <caret line="123" column="72" selection-start-line="123" selection-start-column="63" selection-end-line="123" selection-end-column="83" />
35
+            </state>
36
+          </provider>
37
+        </entry>
38
+      </file>
39
+      <file pinned="false" current-in-tab="true">
40
+        <entry file="file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java">
41
+          <provider selected="true" editor-type-id="text-editor">
42
+            <state relative-caret-position="221">
43
+              <caret line="268" column="23" selection-start-line="268" selection-start-column="23" selection-end-line="268" selection-end-column="23" />
44
+            </state>
45
+          </provider>
46
+        </entry>
47
+      </file>
48
+      <file pinned="false" current-in-tab="false">
49
+        <entry file="file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TdImages.java">
50
+          <provider selected="true" editor-type-id="text-editor">
51
+            <state relative-caret-position="281">
52
+              <caret line="35" column="27" selection-start-line="35" selection-start-column="19" selection-end-line="35" selection-end-column="27" />
53
+            </state>
54
+          </provider>
55
+        </entry>
56
+      </file>
57
+      <file pinned="false" current-in-tab="false">
58
+        <entry file="file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReply.java">
59
+          <provider selected="true" editor-type-id="text-editor">
60
+            <state relative-caret-position="254">
61
+              <caret line="77" column="30" selection-start-line="77" selection-start-column="30" selection-end-line="77" selection-end-column="30" />
62
+            </state>
63
+          </provider>
64
+        </entry>
65
+      </file>
66
+    </leaf>
67
+  </component>
68
+  <component name="Git.Settings">
69
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
70
+  </component>
71
+  <component name="IdeDocumentHistory">
72
+    <option name="CHANGED_PATHS">
73
+      <list>
74
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TpTransactionMapper.xml" />
75
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TpTransaction.java" />
76
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java" />
77
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java" />
78
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java" />
79
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TransactionReportMapper.xml" />
80
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReportMapper.java" />
81
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReplyMapper.java" />
82
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/resources/mapper/TransactionReplyMapper.xml" />
83
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReply.java" />
84
+        <option value="$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java" />
85
+      </list>
86
+    </option>
87
+  </component>
88
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
89
+  <component name="ProjectView">
90
+    <navigator proportions="" version="1">
91
+      <foldersAlwaysOnTop value="true" />
92
+    </navigator>
93
+    <panes>
94
+      <pane id="ProjectPane">
95
+        <subPane>
96
+          <expand>
97
+            <path>
98
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
99
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
100
+            </path>
101
+            <path>
102
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
103
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
104
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
105
+            </path>
106
+            <path>
107
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
108
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
109
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
110
+              <item name="src" type="462c0819:PsiDirectoryNode" />
111
+            </path>
112
+            <path>
113
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
114
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
115
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
116
+              <item name="src" type="462c0819:PsiDirectoryNode" />
117
+              <item name="main" type="462c0819:PsiDirectoryNode" />
118
+            </path>
119
+            <path>
120
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
121
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
122
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
123
+              <item name="src" type="462c0819:PsiDirectoryNode" />
124
+              <item name="main" type="462c0819:PsiDirectoryNode" />
125
+              <item name="java" type="462c0819:PsiDirectoryNode" />
126
+            </path>
127
+            <path>
128
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
129
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
130
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
131
+              <item name="src" type="462c0819:PsiDirectoryNode" />
132
+              <item name="main" type="462c0819:PsiDirectoryNode" />
133
+              <item name="java" type="462c0819:PsiDirectoryNode" />
134
+              <item name="com" type="462c0819:PsiDirectoryNode" />
135
+            </path>
136
+            <path>
137
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
138
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
139
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
140
+              <item name="src" type="462c0819:PsiDirectoryNode" />
141
+              <item name="main" type="462c0819:PsiDirectoryNode" />
142
+              <item name="java" type="462c0819:PsiDirectoryNode" />
143
+              <item name="com" type="462c0819:PsiDirectoryNode" />
144
+              <item name="community" type="462c0819:PsiDirectoryNode" />
145
+            </path>
146
+            <path>
147
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
148
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
149
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
150
+              <item name="src" type="462c0819:PsiDirectoryNode" />
151
+              <item name="main" type="462c0819:PsiDirectoryNode" />
152
+              <item name="java" type="462c0819:PsiDirectoryNode" />
153
+              <item name="com" type="462c0819:PsiDirectoryNode" />
154
+              <item name="community" type="462c0819:PsiDirectoryNode" />
155
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
156
+            </path>
157
+            <path>
158
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
159
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
160
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
161
+              <item name="src" type="462c0819:PsiDirectoryNode" />
162
+              <item name="main" type="462c0819:PsiDirectoryNode" />
163
+              <item name="java" type="462c0819:PsiDirectoryNode" />
164
+              <item name="com" type="462c0819:PsiDirectoryNode" />
165
+              <item name="community" type="462c0819:PsiDirectoryNode" />
166
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
167
+              <item name="controller" type="462c0819:PsiDirectoryNode" />
168
+            </path>
169
+            <path>
170
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
171
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
172
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
173
+              <item name="src" type="462c0819:PsiDirectoryNode" />
174
+              <item name="main" type="462c0819:PsiDirectoryNode" />
175
+              <item name="java" type="462c0819:PsiDirectoryNode" />
176
+              <item name="com" type="462c0819:PsiDirectoryNode" />
177
+              <item name="community" type="462c0819:PsiDirectoryNode" />
178
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
179
+              <item name="dao" type="462c0819:PsiDirectoryNode" />
180
+            </path>
181
+            <path>
182
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
183
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
184
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
185
+              <item name="src" type="462c0819:PsiDirectoryNode" />
186
+              <item name="main" type="462c0819:PsiDirectoryNode" />
187
+              <item name="java" type="462c0819:PsiDirectoryNode" />
188
+              <item name="com" type="462c0819:PsiDirectoryNode" />
189
+              <item name="community" type="462c0819:PsiDirectoryNode" />
190
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
191
+              <item name="model" type="462c0819:PsiDirectoryNode" />
192
+            </path>
193
+            <path>
194
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
195
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
196
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
197
+              <item name="src" type="462c0819:PsiDirectoryNode" />
198
+              <item name="main" type="462c0819:PsiDirectoryNode" />
199
+              <item name="java" type="462c0819:PsiDirectoryNode" />
200
+              <item name="com" type="462c0819:PsiDirectoryNode" />
201
+              <item name="community" type="462c0819:PsiDirectoryNode" />
202
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
203
+              <item name="service" type="462c0819:PsiDirectoryNode" />
204
+            </path>
205
+            <path>
206
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
207
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
208
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
209
+              <item name="src" type="462c0819:PsiDirectoryNode" />
210
+              <item name="main" type="462c0819:PsiDirectoryNode" />
211
+              <item name="java" type="462c0819:PsiDirectoryNode" />
212
+              <item name="com" type="462c0819:PsiDirectoryNode" />
213
+              <item name="community" type="462c0819:PsiDirectoryNode" />
214
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
215
+              <item name="service" type="462c0819:PsiDirectoryNode" />
216
+              <item name="impl" type="462c0819:PsiDirectoryNode" />
217
+            </path>
218
+            <path>
219
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
220
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
221
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
222
+              <item name="src" type="462c0819:PsiDirectoryNode" />
223
+              <item name="main" type="462c0819:PsiDirectoryNode" />
224
+              <item name="resources" type="462c0819:PsiDirectoryNode" />
225
+            </path>
226
+            <path>
227
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
228
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
229
+              <item name="property-api" type="462c0819:PsiDirectoryNode" />
230
+              <item name="src" type="462c0819:PsiDirectoryNode" />
231
+              <item name="main" type="462c0819:PsiDirectoryNode" />
232
+              <item name="resources" type="462c0819:PsiDirectoryNode" />
233
+              <item name="mapper" type="462c0819:PsiDirectoryNode" />
234
+            </path>
235
+            <path>
236
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
237
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
238
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
239
+            </path>
240
+            <path>
241
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
242
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
243
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
244
+              <item name="src" type="462c0819:PsiDirectoryNode" />
245
+            </path>
246
+            <path>
247
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
248
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
249
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
250
+              <item name="src" type="462c0819:PsiDirectoryNode" />
251
+              <item name="main" type="462c0819:PsiDirectoryNode" />
252
+            </path>
253
+            <path>
254
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
255
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
256
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
257
+              <item name="src" type="462c0819:PsiDirectoryNode" />
258
+              <item name="main" type="462c0819:PsiDirectoryNode" />
259
+              <item name="java" type="462c0819:PsiDirectoryNode" />
260
+            </path>
261
+            <path>
262
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
263
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
264
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
265
+              <item name="src" type="462c0819:PsiDirectoryNode" />
266
+              <item name="main" type="462c0819:PsiDirectoryNode" />
267
+              <item name="java" type="462c0819:PsiDirectoryNode" />
268
+              <item name="com" type="462c0819:PsiDirectoryNode" />
269
+            </path>
270
+            <path>
271
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
272
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
273
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
274
+              <item name="src" type="462c0819:PsiDirectoryNode" />
275
+              <item name="main" type="462c0819:PsiDirectoryNode" />
276
+              <item name="java" type="462c0819:PsiDirectoryNode" />
277
+              <item name="com" type="462c0819:PsiDirectoryNode" />
278
+              <item name="community" type="462c0819:PsiDirectoryNode" />
279
+            </path>
280
+            <path>
281
+              <item name="smart-community-word" type="b2602c69:ProjectViewProjectNode" />
282
+              <item name="smart-community" type="462c0819:PsiDirectoryNode" />
283
+              <item name="zuul" type="462c0819:PsiDirectoryNode" />
284
+              <item name="src" type="462c0819:PsiDirectoryNode" />
285
+              <item name="main" type="462c0819:PsiDirectoryNode" />
286
+              <item name="java" type="462c0819:PsiDirectoryNode" />
287
+              <item name="com" type="462c0819:PsiDirectoryNode" />
288
+              <item name="community" type="462c0819:PsiDirectoryNode" />
289
+              <item name="huiju" type="462c0819:PsiDirectoryNode" />
290
+            </path>
291
+          </expand>
292
+          <select />
293
+        </subPane>
294
+      </pane>
295
+      <pane id="PackagesPane" />
296
+      <pane id="Scope" />
297
+    </panes>
298
+  </component>
299
+  <component name="PropertiesComponent">
300
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1554813564104" />
301
+  </component>
302
+  <component name="RecentsManager">
303
+    <key name="CopyFile.RECENT_KEYS">
304
+      <recent name="E:\idesWord\smartCommunity\CODE\smart-community\property-api\src\main\resources\mapper" />
305
+      <recent name="E:\idesWord\smartCommunity\CODE\smart-community\property-api\src\main\java\com\community\huiju\dao" />
306
+      <recent name="E:\idesWord\smartCommunity\CODE\smart-community\property-api\src\main\java\com\community\huiju\model" />
307
+    </key>
308
+  </component>
309
+  <component name="RunDashboard">
310
+    <option name="ruleStates">
311
+      <list>
312
+        <RuleState>
313
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
314
+        </RuleState>
315
+        <RuleState>
316
+          <option name="name" value="StatusDashboardGroupingRule" />
317
+        </RuleState>
318
+      </list>
319
+    </option>
320
+  </component>
321
+  <component name="RunManager">
322
+    <configuration name="PropertyApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
323
+      <module name="property-api" />
324
+      <extension name="coverage">
325
+        <pattern>
326
+          <option name="PATTERN" value="com.community.huiju.*" />
327
+          <option name="ENABLED" value="true" />
328
+        </pattern>
329
+      </extension>
330
+      <option name="SPRING_BOOT_MAIN_CLASS" value="com.community.huiju.PropertyApplication" />
331
+      <method v="2">
332
+        <option name="Make" enabled="true" />
333
+      </method>
334
+    </configuration>
335
+    <recent_temporary>
336
+      <list>
337
+        <item itemvalue="Spring Boot.PropertyApplication" />
338
+      </list>
339
+    </recent_temporary>
340
+  </component>
341
+  <component name="SvnConfiguration">
342
+    <configuration />
343
+  </component>
344
+  <component name="TaskManager">
345
+    <task active="true" id="Default" summary="Default task">
346
+      <changelist id="8242fb4e-eadf-4769-b4c9-e866954fc164" name="Default Changelist" comment="" />
347
+      <created>1550546576183</created>
348
+      <option name="number" value="Default" />
349
+      <option name="presentableId" value="Default" />
350
+      <updated>1550546576183</updated>
351
+      <workItem from="1550546577888" duration="997000" />
352
+      <workItem from="1550547757316" duration="45000" />
353
+      <workItem from="1550547903821" duration="17904000" />
354
+      <workItem from="1550580590425" duration="175000" />
355
+      <workItem from="1550625046867" duration="10953000" />
356
+      <workItem from="1550663154868" duration="404000" />
357
+      <workItem from="1550711362440" duration="16076000" />
358
+      <workItem from="1550798426456" duration="22840000" />
359
+      <workItem from="1551057295750" duration="236000" />
360
+      <workItem from="1551143469375" duration="6771000" />
361
+      <workItem from="1551229983710" duration="2843000" />
362
+      <workItem from="1551403008725" duration="3245000" />
363
+      <workItem from="1551662011680" duration="1281000" />
364
+      <workItem from="1551749121214" duration="1532000" />
365
+      <workItem from="1551756299155" duration="11716000" />
366
+      <workItem from="1551834513428" duration="31209000" />
367
+      <workItem from="1551920868695" duration="9458000" />
368
+      <workItem from="1553821766053" duration="18204000" />
369
+      <workItem from="1554081715307" duration="21935000" />
370
+      <workItem from="1554253927484" duration="19221000" />
371
+      <workItem from="1554339968040" duration="8971000" />
372
+      <workItem from="1554684650072" duration="29975000" />
373
+      <workItem from="1554773796107" duration="21853000" />
374
+    </task>
375
+    <servers />
376
+  </component>
377
+  <component name="TimeTrackingManager">
378
+    <option name="totallyTimeSpent" value="63000" />
379
+  </component>
380
+  <component name="ToolWindowManager">
381
+    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
382
+    <editor active="true" />
383
+    <layout>
384
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49854228" visible="true" weight="0.18176973" />
385
+      <window_info id="Structure" order="1" sideWeight="0.50145775" side_tool="true" weight="0.25692964" />
386
+      <window_info id="Designer" order="2" />
387
+      <window_info id="Image Layers" order="3" />
388
+      <window_info id="Capture Tool" order="4" />
389
+      <window_info id="UI Designer" order="5" />
390
+      <window_info id="Favorites" order="6" side_tool="true" />
391
+      <window_info id="Web" order="7" side_tool="true" />
392
+      <window_info anchor="bottom" id="Message" order="0" />
393
+      <window_info anchor="bottom" id="Find" order="1" />
394
+      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.6998934" weight="0.298441" />
395
+      <window_info active="true" anchor="bottom" id="Debug" order="3" sideWeight="0.8523454" visible="true" weight="0.38752785" />
396
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
397
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
398
+      <window_info anchor="bottom" id="TODO" order="6" />
399
+      <window_info anchor="bottom" id="Spring" order="7" sideWeight="0.5698294" weight="0.32962137" />
400
+      <window_info anchor="bottom" id="Terminal" order="8" sideWeight="0.49946696" weight="0.32962137" />
401
+      <window_info anchor="bottom" id="Docker" order="9" show_stripe_button="false" />
402
+      <window_info anchor="bottom" id="Event Log" order="10" sideWeight="0.14765458" side_tool="true" weight="0.26837417" />
403
+      <window_info anchor="bottom" id="Messages" order="11" sideWeight="0.49840087" weight="0.30289534" />
404
+      <window_info anchor="bottom" id="Java Enterprise" order="12" sideWeight="0.49946696" weight="0.32962137" />
405
+      <window_info anchor="bottom" id="Database Changes" order="13" />
406
+      <window_info anchor="bottom" id="Version Control" order="14" sideWeight="0.49946696" weight="0.32850778" />
407
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
408
+      <window_info anchor="right" id="Ant Build" order="1" visible="true" weight="0.015991472" />
409
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
410
+      <window_info anchor="right" id="Maven" order="3" weight="0.20255864" />
411
+      <window_info anchor="right" id="Palette" order="4" />
412
+      <window_info anchor="right" id="Capture Analysis" order="5" />
413
+      <window_info anchor="right" id="Database" order="6" />
414
+      <window_info anchor="right" id="Palette&#9;" order="7" />
415
+      <window_info anchor="right" id="Theme Preview" order="8" />
416
+      <window_info anchor="right" id="Bean Validation" order="9" weight="0.32983872" />
417
+    </layout>
418
+    <layout-to-restore>
419
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.15242778" />
420
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
421
+      <window_info id="Designer" order="2" />
422
+      <window_info id="Image Layers" order="3" />
423
+      <window_info id="Capture Tool" order="4" />
424
+      <window_info id="UI Designer" order="5" />
425
+      <window_info id="Favorites" order="6" side_tool="true" />
426
+      <window_info id="Web" order="7" side_tool="true" />
427
+      <window_info anchor="bottom" id="Message" order="0" />
428
+      <window_info anchor="bottom" id="Find" order="1" />
429
+      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.6998934" weight="0.36302894" />
430
+      <window_info active="true" anchor="bottom" id="Debug" order="3" sideWeight="0.91518134" visible="true" weight="0.3776301" />
431
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
432
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
433
+      <window_info anchor="bottom" id="TODO" order="6" />
434
+      <window_info anchor="bottom" id="Spring" order="7" />
435
+      <window_info anchor="bottom" id="Terminal" order="8" />
436
+      <window_info anchor="bottom" id="Docker" order="9" show_stripe_button="false" />
437
+      <window_info anchor="bottom" id="Event Log" order="10" sideWeight="0.3001066" side_tool="true" weight="0.5222717" />
438
+      <window_info anchor="bottom" id="Messages" order="11" sideWeight="0.49969268" weight="0.19376393" />
439
+      <window_info anchor="bottom" id="Java Enterprise" order="12" />
440
+      <window_info anchor="bottom" id="Database Changes" order="13" />
441
+      <window_info anchor="bottom" id="Version Control" order="14" />
442
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
443
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
444
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
445
+      <window_info anchor="right" id="Maven" order="3" weight="0.025806451" />
446
+      <window_info anchor="right" id="Palette" order="4" />
447
+      <window_info anchor="right" id="Capture Analysis" order="5" />
448
+      <window_info anchor="right" id="Database" order="6" />
449
+      <window_info anchor="right" id="Palette&#9;" order="7" />
450
+      <window_info anchor="right" id="Theme Preview" order="8" />
451
+      <window_info anchor="right" id="Bean Validation" order="9" weight="0.32983872" />
452
+    </layout-to-restore>
453
+  </component>
454
+  <component name="Vcs.Log.Tabs.Properties">
455
+    <option name="RECENT_FILTERS">
456
+      <map>
457
+        <entry key="Branch">
458
+          <value>
459
+            <list />
460
+          </value>
461
+        </entry>
462
+        <entry key="User">
463
+          <value>
464
+            <list />
465
+          </value>
466
+        </entry>
467
+      </map>
468
+    </option>
469
+  </component>
470
+  <component name="XDebuggerManager">
471
+    <breakpoint-manager>
472
+      <breakpoints>
473
+        <line-breakpoint enabled="true" type="java-line">
474
+          <url>file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java</url>
475
+          <line>144</line>
476
+          <properties />
477
+          <option name="timeStamp" value="10" />
478
+        </line-breakpoint>
479
+      </breakpoints>
480
+    </breakpoint-manager>
481
+  </component>
482
+  <component name="antWorkspaceConfiguration">
483
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
484
+    <option name="FILTER_TARGETS" value="false" />
485
+  </component>
486
+  <component name="editorHistoryManager">
487
+    <entry file="file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReply.java">
488
+      <provider selected="true" editor-type-id="text-editor">
489
+        <state relative-caret-position="254">
490
+          <caret line="77" column="30" selection-start-line="77" selection-start-column="30" selection-end-line="77" selection-end-column="30" />
491
+        </state>
492
+      </provider>
493
+    </entry>
494
+    <entry file="file://$PROJECT_DIR$/../smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java">
495
+      <provider selected="true" editor-type-id="text-editor">
496
+        <state relative-caret-position="221">
497
+          <caret line="268" column="23" selection-start-line="268" selection-start-column="23" selection-end-line="268" selection-end-column="23" />
498
+        </state>
499
+      </provider>
500
+    </entry>
501
+  </component>
502
+</project>

+ 33
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java View File

@@ -91,4 +91,37 @@ public class TransactionController extends BaseController {
91 91
 		ResponseBean  addAnnouncement= transactionService.transactionsAdd(paramets,userElement.getCommunityId(),userElement.getId());
92 92
 		return addAnnouncement;
93 93
 	}
94
+
95
+	@ApiOperation(value = "添加二手租赁",nickname ="添加二手租赁")
96
+	@ApiImplicitParams({
97
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="transactionTitle:话题标题," +
98
+					"type:0 代表 二手(卖二手物品)  1 是代表 求购 (买二手物品) 2 是代表 租赁(租二手物品)3其他话题,contentImg:图片,sort:权重值,status:'0 是已作废 1 是已发布  2 是草稿 ")})
99
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
100
+	@RequestMapping(value="/transactions/updata",method = RequestMethod.POST)
101
+	public ResponseBean transactionsUpdata(@RequestBody String paramets, HttpSession session){
102
+		UserElement userElement = getUserElement(session);
103
+		ResponseBean  transactionsUpdata= transactionService.transactionsUpdata(paramets,userElement.getCommunityId(),userElement.getId());
104
+		return transactionsUpdata;
105
+	}
106
+	@ApiOperation(value = "删除二手租赁",nickname ="删除二手租赁")
107
+	@ApiImplicitParams({
108
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个)" )})
109
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
110
+	@RequestMapping(value="/transactions/delete",method = RequestMethod.POST)
111
+	public ResponseBean transactionsDelete(@RequestBody String paramets, HttpSession session){
112
+		UserElement userElement = getUserElement(session);
113
+		ResponseBean  transactionsUpdata= transactionService.transactionsDelete(paramets,userElement.getCommunityId(),userElement.getId());
114
+		return transactionsUpdata;
115
+	}
116
+
117
+	@ApiOperation(value = "二手评论列表",nickname ="二手评论列表")
118
+	@ApiImplicitParams({
119
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id" )})
120
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
121
+	@RequestMapping(value="/transactionReplyList",method = RequestMethod.POST)
122
+	public ResponseBean transactionReplyList(@RequestBody String paramets, HttpSession session){
123
+		UserElement userElement = getUserElement(session);
124
+		ResponseBean  transactionReplyList= transactionService.transactionReplyList(paramets,userElement.getCommunityId(),userElement.getId());
125
+		return transactionReplyList;
126
+	}
94 127
 }

+ 3
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.community.huiju.model.TpTicket;
7 7
 import com.community.huiju.model.TpTransaction;
8
+import com.community.huiju.model.TransactionReport;
8 9
 import org.apache.ibatis.annotations.Param;
9 10
 
10 11
 import java.util.List;
@@ -20,4 +21,6 @@ import java.util.List;
20 21
 public interface TpTransactionMapper extends BaseMapper<TpTransaction> {
21 22
 
22 23
 	List<TpTransaction> selectListByParams(Page page, @Param("transactionTitle") String transactionTitle,@Param("userName") String userName, @Param("id")Integer id, @Param("status")Integer status,@Param("communityId") Integer communityId);
24
+
25
+
23 26
 }

+ 27
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReplyMapper.java View File

@@ -0,0 +1,27 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.community.huiju.model.TransactionReply;
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * <p>
12
+ * 物业web端二手交易评论表 Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-04-09
17
+ */
18
+public interface TransactionReplyMapper extends BaseMapper<TransactionReply> {
19
+
20
+    /**
21
+     * 二手帖子列表
22
+     * @param page
23
+     * @param id
24
+     * @return
25
+     */
26
+    List<TransactionReply> transactionReplyList(Page page, @Param("id") Integer id,@Param("userID") Integer userID,@Param("status") Integer status);
27
+}

+ 2
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReportMapper.java View File

@@ -2,6 +2,7 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TransactionReport;
4 4
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
5 6
 
6 7
 /**
7 8
  * <p>
@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
11 12
  * @author jobob
12 13
  * @since 2019-04-08
13 14
  */
15
+@Mapper
14 16
 public interface TransactionReportMapper extends BaseMapper<TransactionReport> {
15 17
 
16 18
 }

+ 10
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpTransaction.java View File

@@ -116,4 +116,14 @@ public class TpTransaction implements Serializable {
116 116
      */
117 117
     @TableField(exist = false)
118 118
     private Integer reportSum;
119
+
120
+    /**
121
+     * 权重
122
+     */
123
+    private String sort;
124
+
125
+    /**
126
+     * 1代表物业端发帖子,0代表app端发帖子
127
+     */
128
+    private String releaseIdentity;
119 129
 }

+ 80
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReply.java View File

@@ -0,0 +1,80 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import java.time.LocalDateTime;
6
+import java.io.Serializable;
7
+import java.util.List;
8
+
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 物业web端二手交易评论表
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-04-09
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("tp_transaction_reply")
25
+public class TransactionReply implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    private Integer id;
30
+    /**
31
+     * 小区id
32
+     */
33
+    private Integer communityId;
34
+
35
+    /**
36
+     * 交易帖子ID
37
+     */
38
+    private Integer transactionId;
39
+
40
+    /**
41
+     * 回复帖子的住户APP端的用户ID
42
+     */
43
+    private Integer taUserId;
44
+
45
+    /**
46
+     * 回复帖子的住户APP端的用户姓名
47
+     */
48
+    private String taUserName;
49
+
50
+    /**
51
+     * 0代表app端用户,1代表物业端用户,
52
+     */
53
+    private String releaseIdentity;
54
+
55
+    /**
56
+     * 回复内容
57
+     */
58
+    private String replyContent;
59
+
60
+    /**
61
+     * 被回复的评论内容的住户App端用户ID
62
+     */
63
+    private Integer replyTaUserId;
64
+
65
+    /**
66
+     * 被回复的评论内容的住户App端用户姓名
67
+     */
68
+    private String replyTaUserName;
69
+
70
+    /**
71
+     * 创建时间
72
+     */
73
+    private LocalDateTime createDate;
74
+
75
+    /**
76
+     * 回复的图片List
77
+     */
78
+    @TableField(exist = false)
79
+    private List<String> tdImagesLists;
80
+}

+ 27
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java View File

@@ -39,4 +39,31 @@ public interface ITransactionService extends IService<TpTransaction> {
39 39
 	 * @return
40 40
 	 */
41 41
     ResponseBean transactionsAdd(String paramets, Integer communityId, Integer id);
42
+
43
+	/**
44
+	 * 修改二手交易
45
+	 * @param paramets
46
+	 * @param communityId
47
+	 * @param id
48
+	 * @return
49
+	 */
50
+    ResponseBean transactionsUpdata(String paramets, Integer communityId, Integer id);
51
+
52
+	/**
53
+	 * 删除二手帖子
54
+	 * @param paramets
55
+	 * @param communityId
56
+	 * @param id
57
+	 * @return
58
+	 */
59
+	ResponseBean transactionsDelete(String paramets, Integer communityId, Integer id);
60
+
61
+	/**
62
+	 * 二手帖子评论列表
63
+	 * @param paramets
64
+	 * @param communityId
65
+	 * @param id
66
+	 * @return
67
+	 */
68
+	ResponseBean transactionReplyList(String paramets, Integer communityId, Integer id);
42 69
 }

+ 119
- 5
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java View File

@@ -8,10 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
8 8
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
9 9
 import com.community.commom.mode.ResponseBean;
10 10
 import com.community.commom.session.UserElement;
11
-import com.community.huiju.dao.TdImagesMapper;
12
-import com.community.huiju.dao.TpTransactionMapper;
13
-import com.community.huiju.dao.TransactionLikeMapper;
14
-import com.community.huiju.dao.TransactionReportMapper;
11
+import com.community.huiju.dao.*;
15 12
 import com.community.huiju.model.*;
16 13
 import com.community.huiju.service.ITransactionService;
17 14
 import com.google.common.collect.Maps;
@@ -20,6 +17,7 @@ import org.springframework.stereotype.Service;
20 17
 
21 18
 import javax.xml.crypto.Data;
22 19
 import java.time.LocalDateTime;
20
+import java.util.ArrayList;
23 21
 import java.util.Date;
24 22
 import java.util.List;
25 23
 import java.util.Map;
@@ -48,6 +46,12 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
48 46
 	@Autowired
49 47
 	private TransactionReportMapper transactionReportMapper;
50 48
 
49
+	@Autowired
50
+	private UserMapper userMapper;
51
+
52
+	@Autowired
53
+	private TransactionReplyMapper transactionReplyMapper;
54
+
51 55
 
52 56
 	@Override
53 57
 	public ResponseBean getTransactionList(String parameter,Integer communityId) {
@@ -139,14 +143,20 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
139 143
 	@Override
140 144
 	public ResponseBean transactionsAdd(String paramets, Integer communityId, Integer id) {
141 145
 		ResponseBean response = new ResponseBean();
146
+
142 147
 		JSONObject jsonobject = JSONObject.parseObject(paramets);
148
+
143 149
 		TpTransaction tpTransaction = JSONObject.parseObject(paramets, TpTransaction.class);
144 150
 		tpTransaction.setCommunityId(communityId);
145
-		tpTransaction.setTaUserId(null);
151
+		tpTransaction.setTaUserId(userMapper.selectById(id).getTaUserId());
146 152
 		tpTransaction.setCreateDate(LocalDateTime.now());
147 153
 		tpTransaction.setCreateUser(id);
148 154
 		tpTransaction.setViewCount(0);
155
+		tpTransaction.setIsReported("0");
156
+		tpTransaction.setReleaseIdentity("1");
157
+		tpTransactionMapper.insert(tpTransaction);
149 158
 		JSONArray contentImg = jsonobject.getJSONArray("contentImg");
159
+
150 160
 		String[] contentImgArray = contentImg.toArray(new String[]{});
151 161
 		if (tpTransaction.getTransactionTitle() == null) {
152 162
 			response.addError("标题不能为空");
@@ -168,4 +178,108 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
168 178
 		return response;
169 179
 
170 180
 	}
181
+
182
+	@Override
183
+	public ResponseBean transactionsUpdata(String paramets, Integer communityId, Integer id) {
184
+		ResponseBean response = new ResponseBean();
185
+
186
+		JSONObject jsonobject = JSONObject.parseObject(paramets);
187
+
188
+		TpTransaction tpTransaction = JSONObject.parseObject(paramets, TpTransaction.class);
189
+		tpTransaction.setCommunityId(communityId);
190
+		tpTransaction.setTaUserId(userMapper.selectById(id).getTaUserId());
191
+		tpTransaction.setUpdateDate(LocalDateTime.now());
192
+		tpTransaction.setCreateUser(id);
193
+		tpTransactionMapper.updateById(tpTransaction);
194
+		JSONArray contentImg = jsonobject.getJSONArray("contentImg");
195
+
196
+		String[] contentImgArray = contentImg.toArray(new String[]{});
197
+		if (tpTransaction.getTransactionTitle() == null) {
198
+			response.addError("标题不能为空");
199
+			return response;
200
+		}
201
+		if (null == tpTransaction.getTransactionContent() && null == contentImg) {
202
+			response.addError("内容和图片必须填一个");
203
+			return response;
204
+		}
205
+		//修改图片时删除原来图片
206
+		QueryWrapper<TdImages> queryWrapper = new QueryWrapper<>();
207
+		queryWrapper.lambda().eq(TdImages::getUuid, tpTransaction.getId());
208
+		queryWrapper.lambda().eq(TdImages::getType, "transaction");
209
+		tdImagesMapper.delete(queryWrapper);
210
+
211
+		for (String img : contentImgArray) {
212
+			TdImages tdImages = new TdImages();
213
+			tdImages.setImageUrl(img);
214
+			tdImages.setType("transaction");
215
+			tdImages.setUuid(tpTransaction.getId());
216
+			tdImages.setCreateTime(LocalDateTime.now());
217
+			tdImages.setCreateUser(id);
218
+			tdImagesMapper.insert(tdImages);
219
+		}
220
+		return response;
221
+	}
222
+
223
+	@Override
224
+	public ResponseBean transactionsDelete(String paramets, Integer communityId, Integer userId) {
225
+		ResponseBean response = new ResponseBean();
226
+		JSONObject parseObject = JSONObject.parseObject(paramets);
227
+
228
+		JSONArray tpTransactionIdId = parseObject.getJSONArray("id");
229
+		Integer[] announcementIdArray = tpTransactionIdId.toArray(new Integer[]{});
230
+		for (Integer id : announcementIdArray) {
231
+			TpTransaction tpTransaction = new TpTransaction();
232
+			tpTransaction.setId(id);
233
+			tpTransaction.setStatus("0");
234
+			tpTransaction.setUpdateDate(LocalDateTime.now());
235
+			tpTransaction.setUpdateUser(userId);
236
+			tpTransactionMapper.updateById(tpTransaction);
237
+//			//1.5版本维护消息
238
+//			Message message= new Message();
239
+//			message.setStatus("0");
240
+//			message.setAnnouncementId(id);
241
+//			message.setUpdateUser(userId);
242
+//			message.setUpdateDate(LocalDateTime.now());
243
+//			tdImagesMapper.updateMessage(message);
244
+		}
245
+		response.addSuccess("成功");
246
+		return response;
247
+	}
248
+
249
+	@Override
250
+	public ResponseBean transactionReplyList(String paramets, Integer communityId, Integer userID) {
251
+		ResponseBean responseBean = new ResponseBean();
252
+		JSONObject object= JSONObject.parseObject(paramets);
253
+		Integer id = object.getInteger("id");
254
+		Integer status = object.getInteger("status");
255
+		Integer pageNum = object.getInteger("pageNum");
256
+		Integer pageSize = object.getInteger("pageSize");
257
+		Page<TransactionReply> page = new Page<>();
258
+		page.setSize(pageSize == null ? 10 : pageSize);
259
+		page.setCurrent(pageNum == null ? 1 : pageNum);
260
+		// 分页查询
261
+		List<TransactionReply> TransactionReplylList = transactionReplyMapper.transactionReplyList(page,id,userID,status);
262
+		//查询帖子评论所带图片
263
+
264
+		for (TransactionReply transactionReply:TransactionReplylList){
265
+			QueryWrapper<TdImages> tdImagesList = new QueryWrapper<>();
266
+			tdImagesList.eq("uuid",transactionReply.getId());
267
+			tdImagesList.eq("type","reply");
268
+			List<TdImages> tdImages= tdImagesMapper.selectList(tdImagesList);
269
+			List<String> list= new ArrayList<>();
270
+			for (TdImages imageUrl:tdImages){
271
+				list.add(imageUrl.getImageUrl());
272
+				transactionReply.setTdImagesLists(list);
273
+			}
274
+
275
+		}
276
+
277
+		Map<String, Object> map = Maps.newHashMap();
278
+		map.put("list",TransactionReplylList);
279
+		map.put("total",page.getTotal());
280
+		map.put("pageNum", page.getCurrent());
281
+		map.put("pageSize", page.getSize());
282
+		responseBean.addSuccess(map);
283
+		return responseBean;
284
+	}
171 285
 }

+ 2
- 4
CODE/smart-community/property-api/src/main/resources/mapper/TpTransactionMapper.xml View File

@@ -17,11 +17,12 @@
17 17
         COUNT(re.transaction_id) AS replySum
18 18
         FROM
19 19
         tp_transaction t
20
-        LEFT JOIN ta_user ta ON  t.create_user = ta.id
20
+        LEFT JOIN ta_user ta ON  t.ta_user_id = ta.id
21 21
         LEFT JOIN ta_visitor v ON ta.id = v.ta_user_id
22 22
         LEFT JOIN tp_transaction_like li ON t.id = li.transaction_id AND li.like_status=1
23 23
         LEFT JOIN tp_transaction_reply re ON t.id = re.transaction_id
24 24
         WHERE t.community_id =#{communityId}
25
+        and t.status=1
25 26
         <if test="id != null and id != '' or id ==0">
26 27
             and t.id like concat('%',#{id},'%')
27 28
         </if>
@@ -31,9 +32,6 @@
31 32
         <if test="status != null and status != '' and status != '-1' ">
32 33
             and t.status = #{status}
33 34
         </if>
34
-        <if test="status != null and status != '' and status = '-1' ">
35
-            and  t.type in(0,1,2)
36
-        </if>
37 35
         <if test="userName != null and userName != ''">
38 36
             and ta.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%')
39 37
         </if>

+ 41
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TransactionReplyMapper.xml View File

@@ -0,0 +1,41 @@
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.TransactionReplyMapper">
4
+    <select id="transactionReplyList" resultType="com.community.huiju.model.TransactionReply">
5
+    SELECT
6
+        re.id,
7
+        re.community_id,
8
+        re.transaction_id,
9
+        re.ta_user_id,
10
+        re.ta_user_name,
11
+        re.reply_content,
12
+        re.reply_ta_user_id,
13
+        re.reply_ta_user_name,
14
+        re.create_date
15
+    FROM
16
+        tp_transaction tr
17
+    LEFT JOIN tp_transaction_reply re ON tr.id = re.transaction_id
18
+    WHERE
19
+        tr.id = #{id}
20
+    <if test="status != null and status !=''and status == 0 ">
21
+    AND re.release_identity in(1,2)
22
+    AND re.reply_ta_user_id = #{userID}
23
+    </if>
24
+
25
+    <if test="status != null and status !=''and status == 1 ">
26
+    AND re.release_identity = 0
27
+    AND re.reply_ta_user_id = #{userID}
28
+    </if>
29
+
30
+    <if test="status != null and status !=''and status == 2 ">
31
+    AND re.release_identity = 0
32
+    AND re.ta_user_id = #{userID}
33
+    </if>
34
+
35
+    <if test="status != null and status !=''and status == 3 ">
36
+    AND re.release_identity in(1,2)
37
+    AND re.ta_user_id = tr.create_user
38
+    </if>
39
+    </select>
40
+
41
+</mapper>

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TransactionReportMapper.xml View File

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 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.mapper.TransactionReportMapper">
3
+<mapper namespace="com.community.huiju.dao.TransactionReportMapper">
4 4
 
5 5
 </mapper>

+ 46
- 1
VUECODE/smart-property-manage/src/api/transaction.js View File

@@ -45,11 +45,56 @@ export function transactionsAdd(data) {
45 45
     method: 'post',
46 46
     data: {
47 47
       transactionTitle: data.transactionTitle,
48
+      type: data.type,
48 49
       id: data.id,
49 50
       userName: data.userName,
50 51
       status: data.status,
51 52
       contentImg: data.contentImg,
52
-      announcementContent: data.announcementContent
53
+      transactionContent: data.transactionContent,
54
+      sort: data.sort
55
+    }
56
+  })
57
+}
58
+
59
+export function transactionsEdit(data) {
60
+  return request({
61
+    url: '/transactions/updata',
62
+    method: 'post',
63
+    data: {
64
+      transactionTitle: data.transactionTitle,
65
+      type: data.type,
66
+      id: data.id,
67
+      userName: data.userName,
68
+      status: data.status,
69
+      contentImg: data.contentImg,
70
+      transactionContent: data.transactionContent,
71
+      sort: data.sort
72
+    }
73
+  })
74
+}
75
+export function transactionsDelete(data) {
76
+  console.log('1111')
77
+  console.log(data)
78
+  return request({
79
+    url: '/transactions/delete',
80
+    method: 'post',
81
+    data: {
82
+      id: data
83
+    }
84
+  })
85
+}
86
+
87
+export function transactionReplyList(data) {
88
+  return request({
89
+    url: '/transactionReplyList',
90
+    method: 'post',
91
+    data: {
92
+      transactionTitle: data.transactionTitle,
93
+      id: data.id,
94
+      userName: data.userName,
95
+      status: data.status,
96
+      pageNum: data.pageNum,
97
+      pageSize: data.pageSize
53 98
     }
54 99
   })
55 100
 }

+ 15
- 1
VUECODE/smart-property-manage/src/router/index.js View File

@@ -118,13 +118,27 @@ export const constantRouterMap = [
118 118
         hidden: true,
119 119
         meta: { title: '添加二手求购', icon: 'table' }
120 120
       },
121
+      {
122
+        path: '/transaction/transaction',
123
+        component: () => import('@/views/social/transaction/transactionEdit'),
124
+        name: 'transaction-edit',
125
+        hidden: true,
126
+        meta: { title: '修改二手求购', icon: 'table' }
127
+      },
121 128
       {
122 129
         path: '/transaction/info',
123
-        component: () => import('@/views/social/transaction/info/transactionInfo'),
130
+        component: () => import('@/views/social/transaction/transactionDetails'),
124 131
         name: 'transaction-info',
125 132
         hidden: true,
126 133
         meta: { title: '二手求购租赁详情', icon: 'table' }
127 134
       },
135
+      {
136
+        path: '/transaction/reply',
137
+        component: () => import('@/views/social/transaction/reply/transactionreply'),
138
+        name: 'transactionreply-index',
139
+        hidden: true,
140
+        meta: { title: '二手帖子回复列表', icon: 'table' }
141
+      },
128 142
       {
129 143
         path: '/activity/add',
130 144
         component: () => import('@/views/social/activity/add/index'),

+ 28
- 1
VUECODE/smart-property-manage/src/store/modules/transaction.js View File

@@ -1,4 +1,4 @@
1
-import { fetchList, transactionById, updateTransactionById, transactionsList, transactionsAdd} from '@/api/transaction'
1
+import { fetchList, transactionById, updateTransactionById, transactionsList, transactionsAdd, transactionsEdit, transactionsDelete, transactionReplyList } from '@/api/transaction'
2 2
 
3 3
 const transaction = {
4 4
   namespaced: true,
@@ -65,6 +65,33 @@ const transaction = {
65 65
           reject(error)
66 66
         })
67 67
       })
68
+    },
69
+    TransactionsEdit({ commit }, data) {
70
+      return new Promise((resolve, reject) => {
71
+        transactionsEdit(data).then(response => {
72
+          resolve(response)
73
+        }).catch(error => {
74
+          reject(error)
75
+        })
76
+      })
77
+    },
78
+    TransactionsDelete({ commit }, data) {
79
+      return new Promise((resolve, reject) => {
80
+        transactionsDelete(data).then(response => {
81
+          resolve(response)
82
+        }).catch(error => {
83
+          reject(error)
84
+        })
85
+      })
86
+    },
87
+    TransactionReplyList({ commit }, data) {
88
+      return new Promise((resolve, reject) => {
89
+        transactionReplyList(data).then(response => {
90
+          resolve(response)
91
+        }).catch(error => {
92
+          reject(error)
93
+        })
94
+      })
68 95
     }
69 96
   }
70 97
 }

+ 59
- 59
VUECODE/smart-property-manage/src/views/social/transaction/index.vue View File

@@ -16,8 +16,7 @@
16 16
          <el-option label="选择状态" value="" />
17 17
          <el-option label="议事大厅" value="0"/>
18 18
          <el-option label="友令互助" value="1"/>
19
-         <!-- -1包括,二手,租赁,求购 -->
20
-         <el-option label="二手租赁" value="-1"/>
19
+         <el-option label="二手租赁" value="2"/>
21 20
          <el-option label="其他" value="3"/>
22 21
         </el-select>
23 22
       </el-form-item>
@@ -29,7 +28,7 @@
29 28
     <div class="button">
30 29
       <el-button type="primary" @click="add">添加</el-button>
31 30
       <el-button type="warning" @click="edit">修改</el-button>
32
-      <el-button type="danger" @click="deleteAnnouncement">作废</el-button>
31
+      <el-button type="danger" @click="deleteTransaction">作废</el-button>
33 32
     </div>
34 33
     <el-table
35 34
       v-loading="listLoading"
@@ -44,14 +43,18 @@
44 43
         width="55"/>
45 44
       <el-table-column prop="id" label="话题编号" align="center"/>
46 45
        <el-table-column prop="type" label="话题类型" align="center"/>
47
-      <el-table-column prop="transactionTitle" label="话题标题" align="center"/>
46
+      <el-table-column prop="transactionTitle" label="话题标题" align="center">
47
+      <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickTitle(scope.row.id)">{{ scope.row.transactionTitle }}</span></a></template>
48
+      </el-table-column>
48 49
       <el-table-column prop="userName" label="发布人" align="center"/>
49 50
       <el-table-column prop="createDate" label="发布时间" align="center"><template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template></el-table-column>
50 51
 
51 52
       <el-table-column prop="viewCount" label="查看人数" align="center"/>
52 53
       <el-table-column prop="transactionLikeSum" label="点赞数" align="center"/>
53 54
       <el-table-column prop="transactionNoLikeSum" label="点衰数" align="center"/>
54
-      <el-table-column prop="replySum" label="回复数" align="center"/>
55
+      <el-table-column prop="replySum" label="回复数" align="center">
56
+        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickReply(scope.row.id)">{{ scope.row.replySum }}</span></a></template>
57
+      </el-table-column>
55 58
       <el-table-column prop="reportSum" label="举报数量" align="center"/>
56 59
     </el-table>
57 60
     <div class="block">
@@ -120,27 +123,27 @@ export default {
120 123
       return value
121 124
     },
122 125
     getStatus(row) { // 获取状态
123
-      let statusName = ''
126
+      // let statusName = ''
124 127
 
125
-      // 判断状态
126
-      switch (row.status) {
127
-        case '0':
128
-          statusName = '已作废'
129
-          break
130
-        case '1':
131
-          statusName = '已发布'
132
-          break
133
-        case '2':
134
-          statusName = '草稿'
135
-          break
136
-      }
128
+      // // 判断状态
129
+      // // switch (row.status) {
130
+      // //   case '0':
131
+      // //     statusName = '已作废'
132
+      // //     break
133
+      // //   case '1':
134
+      // //     statusName = '已发布'
135
+      // //     break
136
+      // //   case '2':
137
+      // //     statusName = '草稿'
138
+      // //     break
139
+      // // }
137 140
 
138
-      // 如果修改时间和创建时间不一致, 就显示已修改
139
-      if (row.status === '1' && (row.updateDate > row.createDate)) {
140
-        statusName = '已修改'
141
-      }
141
+      // // 如果修改时间和创建时间不一致, 就显示已修改
142
+      // if (row.status === '1' && (row.updateDate > row.createDate)) {
143
+      //   statusName = '已修改'
144
+      // }
142 145
 
143
-      return statusName
146
+      // return statusName
144 147
     },
145 148
     dataQuery() { // 查询数据
146 149
     
@@ -192,57 +195,54 @@ export default {
192 195
         this.$message.error('请选择一行数据进行修改!')
193 196
         return
194 197
       }
195
-       let ide= this.deleteIds[0]
196
-       this.listQuery.id = ide
197
-      this.$store.dispatch('AnnouncementById', this.listQuery).then((res) => {
198
-        const resData = res.data
199
-        const announcement = resData.tpAnnouncement
200
-        const imgList = resData.studentList
201
-        this.listQuery = announcement
202
-        this.listQuery.announcementTitle = ''
203
-        console.log("1",this.listQuery.status)
204
-        if(this.listQuery.status == 0){
205
-          this.$message.error('已作废不可以修改')
206
-          return
207
-        }
208
-       this.$router.push({ name: 'announcement-edit', params: { id: ids[0] }})
209
-      }) 
198
+       let id= this.deleteIds[0]
199
+       this.$router.push({ name: 'transaction-edit', query: { id: id }})
210 200
       },
211
-    deleteAnnouncement(){
212
-       let ide= this.deleteIds[0]
213
-       this.listQuery.id = ide 
214
-      this.$store.dispatch('AnnouncementById', this.listQuery).then((res) => {
215
-        const resData = res.data
216
-        const announcement = resData.tpAnnouncement
217
-        const imgList = resData.studentList
218
-        this.listQuery.status= announcement.status
219
-        console.log("1",this.listQuery.status)
220
-        if(this.listQuery.status == 0){
221
-          this.$message.error('已作废不可以作废')
222
-          return
223
-        }
224
-        this.deleteId()     
225
-      })    
201
+    deleteTransaction(){
202
+      const ids = this.deleteIds
203
+      if (ids < 1) {
204
+        this.$message.error('请选择一行数据进行修改!')
205
+        return
206
+      }
207
+      // this.$store.dispatch('AnnouncementById', this.listQuery).then((res) => {
208
+      //   const resData = res.data
209
+      //   const announcement = resData.tpAnnouncement
210
+      //   const imgList = resData.studentList
211
+      //   this.listQuery.status= announcement.status
212
+      //   console.log("1",this.listQuery.status)
213
+      //   if(this.listQuery.status == 0){
214
+      //     this.$message.error('已作废不可以作废')
215
+      //     return
216
+      //   }
217
+      //   this.deleteId()     
218
+      // }) 
219
+      this.deleteId()   
226 220
     },
227 221
 
228 222
     deleteId(){
229
-       const ids = this.deleteIds
223
+      const ids = this.deleteIds
230 224
       this.listLoading = true
231 225
       console.log(ids)
232
-      this.$store.dispatch('DeleteAnnouncement', ids).then((res) => {
226
+      this.$store.dispatch('transaction/TransactionsDelete', ids).then((res) => {
233 227
         this.listLoading = false
234
-        this.listQuery.announcementTitle = ''
235 228
         this.dataQuery()
236 229
       }).catch(() => {
237 230
         this.listLoading = false
238
-        console.log('error DeleteAnnouncement')
231
+        console.log('error TransactionsDelete')
239 232
       })
240 233
     },
241 234
 
242
-
235
+    // 二手帖子详情
243 236
     clickTitle(id) {
244
-      this.$router.push({ name: 'contentParticulars-details', query: { id: id }})
237
+      console.log('id',id)
238
+      this.$router.push({ name: 'transaction-info', query: { id: id }})
239
+    },
240
+      // 回复列表
241
+    clickReply(id) {
242
+      console.log('id',id)
243
+      this.$router.push({ name: 'transactionreply-index', query: { id: id }})
245 244
     },
245
+    
246 246
     formatDate(val) {
247 247
       if (val === null) {
248 248
         return ''

+ 76
- 66
VUECODE/smart-property-manage/src/views/social/transaction/info/transactionInfo.vue View File

@@ -1,74 +1,84 @@
1 1
 <template>
2 2
   <div id="root">
3
-    <span class="activityTile">{{ ruleForm.transactionTitle }}</span>
4
-    <div class="activityContext">
5
-      {{ ruleForm.transactionContent }}
3
+    <el-form ref="form" label-width="100px" label-position="left">
4
+      <el-form-item label="公共标题">
5
+        <span class="activityTile">{{ ruleForm.announcementTitle }}</span>
6
+      </el-form-item>
7
+      <el-form-item label="公告轮播图">
8
+        <span style="color: #99a9bf;">轮播图为横幅位展示图片,不会显示在公告详情页</span>
9
+        <img :src="ruleForm.announcementCarouselImg" width="100" height="100">
10
+      </el-form-item>
11
+      <el-form-item label="公告详细内容">
12
+        <div class="activityContext">
13
+          {{ ruleForm.announcementContent }}
14
+        </div>
15
+      </el-form-item>
16
+      <el-form-item label="公告配图">
17
+        <template v-for="site in ruleForm.contentImg">
18
+          <img :src="site.url" width="100" height="100" >
19
+        </template>
20
+      </el-form-item>
21
+    </el-form>
22
+    <div class="bom-button">
23
+      <el-button v-if="isEdi" type="primary" style="width: 150px;" @click="edi">修改</el-button>
6 24
     </div>
7
-    <div class="activityContextImg">
8
-      <img v-for="item in ruleForm.contentImg" :src="item" width="700" height="500" >
9
-    </div>
10
-    <el-button v-if="ruleForm.status === '1'" type="primary" style="width: 130px;margin-left: 250px;" @click="invalid">作废</el-button>
11 25
   </div>
12 26
 </template>
13 27
 
14 28
 <script>
15
-import { mapState, mapActions, mapMutations } from 'vuex'
16
-
17 29
 export default {
30
+  name: 'Index',
18 31
   data() {
19 32
     return {
20 33
       asOfdate: '2018/10/10 23:59:59',
21 34
       ruleForm: {
22 35
         id: '',
23
-        status: '',
24
-        transactionTitle: '',
25
-        transactionContent: '', // 交易内容详细
26
-        contentImg: [] // 活动内容配图
27
-      }
36
+        announcementTitle: '',
37
+        announcementCarouselImg: '', // 轮播图
38
+        announcementContent: '', // 内容详细
39
+        contentImg: [], // 内容配图
40
+        signUpCount: '', // 报名人数统计
41
+        registrationEndTime: '', // 报名活动结束时间
42
+        sort: 1, // 权重
43
+        status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
44
+      },
45
+      isEdi: true // 默认显示修改按钮
28 46
     }
29 47
   },
30 48
   mounted() {
31
-    this.getById(this.$route.params.id)
49
+    this.ruleForm.id = this.$route.query.id
50
+    this.getById()
32 51
   },
33 52
   methods: {
34
-    ...mapActions('transaction', [
35
-      'TransactionById',
36
-      'UpdateTransactionById'
37
-    ]),
38
-    getById(id) { // 根据ID获取活动信息
39
-      this.TransactionById(id).then((res) => {
40
-        const resData = res.data.tpTransaction
41
-        this.ruleForm.transactionTitle = resData.transactionTitle
42
-        this.ruleForm.transactionContent = resData.transactionContent
43
-        this.ruleForm.status = resData.status
44
-        this.ruleForm.contentImg = res.data.list
45
-      }).catch(() => {
46
-        console.log('get list error')
53
+    getById() { // 根据ID获取活动信息
54
+      this.$store.dispatch('AnnouncementById', this.ruleForm).then((res) => {
55
+        const resData = res.data
56
+        const announcement = resData.tpAnnouncement
57
+        const imgList = resData.studentList
58
+        this.ruleForm = announcement
59
+        // 多张图片进行遍历
60
+        this.ruleForm.contentImg = []
61
+        for (let i = 0; i < imgList.length; i++) {
62
+          this.ruleForm.contentImg.push({ url: imgList[i].imageUrl })
63
+        }
64
+        if (this.ruleForm.status === '0') {
65
+          this.isEdi = false
66
+        }
47 67
       })
48 68
     },
49
-    invalid(){
50
-      this.$confirm('确定要作废此帖吗?作废相当于删除帖子, 是否继续?', '作废确认提示', {
51
-        confirmButtonText: '确定作废',
52
-        cancelButtonText: '取消',
53
-        type: 'warning'
54
-      }).then(() => {
55
-        this.UpdateTransactionById(this.$route.params.id).then((res) => {
56
-          if (res.code === '0') {
57
-          this.$message({
58
-            message: "作废成功",
59
-            type: 'success'
60
-          })
61
-          // 切换路由
62
-          this.$router.push({ name: 'transaction-import' })
63
-          return
64
-        }
65
-        this.$message.error(res.message)
66
-        }).catch(() => {
67
-          console.log('update error')
68
-        })
69
-      }).catch(() => {
70
-        console.log("cancel")        
71
-      });
69
+    formatDate(val) {
70
+      var value = new Date(val)
71
+      var year = value.getFullYear()
72
+      var month = value.getMonth() + 1
73
+      var day = value.getDate()
74
+      // var hour = value.getHours()
75
+      // var minutes = value.getMinutes()
76
+      // var seconds = value.getSeconds()
77
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
78
+      return year + '-' + month + '-' + day
79
+    },
80
+    edi() { // 修改活动
81
+      this.$router.push({ name: 'announcement-edit', query: { id: this.ruleForm.id }})
72 82
     }
73 83
   }
74 84
 }
@@ -78,7 +88,7 @@ export default {
78 88
 #root {
79 89
   display: flex;
80 90
   flex-flow: column;
81
-  width: 700px;
91
+  width: 500px;
82 92
   margin-top: 50px;
83 93
   margin-left: auto;
84 94
   margin-right: auto;
@@ -89,35 +99,35 @@ export default {
89 99
   margin-bottom: 10px;
90 100
 }
91 101
 .activityContext{
92
-  margin-top: 20px;
102
+  /*margin-top: 20px;*/
93 103
   margin-bottom: 20px;
94 104
   font-size: 20px;
95 105
   justify-items: center;
96 106
 }
97
-.progress {
107
+/* .progress {
98 108
   display: flex;
99 109
   justify-content: space-between;
100 110
   margin-top: 20px;
101 111
   margin-bottom: 20px;
102
-}
103
-.text-progress {
112
+} */
113
+/* .text-progress {
104 114
   width: 500px;
105 115
   float: left;
106 116
   align-content: center;
107 117
   position: absolute;
108 118
   margin-top: 12px;
109
-}
110
-.people-number {
119
+} */
120
+/* .people-number {
111 121
   position: relative;
112 122
   margin-left: 180px;
113
-}
114
-.outer-layer {
123
+} */
124
+/* .outer-layer {
115 125
   background-color: gainsboro;
116 126
   height: 3px;
117 127
   width: 450px;
118 128
   margin-top: -10px;
119 129
   position: relative;
120
-}
130
+} */
121 131
 .inner-layer {
122 132
   background-color: aquamarine;
123 133
   height: 6px;
@@ -125,20 +135,20 @@ export default {
125 135
   position: relative;
126 136
   margin-top: -4px;
127 137
 }
128
-.circular {
138
+/* .circular {
129 139
   border: 1px #001528 solid;
130 140
   border-radius: 10px;
131 141
   /*background-color: chartreuse;*/
132
-  width: 20px;
142
+ /* width: 20px;
133 143
   height: 20px;
134 144
   position: relative;
135 145
   margin-left: 452px;
136 146
   margin-top: 11px;
137 147
   float: left;
138
-}
139
-.people-limit {
148
+} */
149
+/* .people-limit {
140 150
   margin-top: 13px;
141
-}
151
+} */
142 152
 .bom-button{
143 153
   display: flex;
144 154
   justify-content: center;

+ 234
- 0
VUECODE/smart-property-manage/src/views/social/transaction/reply/transactionreply.vue View File

@@ -0,0 +1,234 @@
1
+
2
+<template>
3
+  <div class="root">
4
+    <el-form :inline="true" :model="listQuery" class="form-listQuery">
5
+      <el-form-item class="filter-item" label="回复人姓名" >
6
+        <el-input v-model.trim="listQuery.taUserName" placeholder="回复人姓名" />
7
+      </el-form-item>
8
+      <el-form-item class="filter-item" label="被回复人姓名" >
9
+        <el-input v-model.trim="listQuery.replyTaUserName" placeholder="被回复人姓名" />
10
+      </el-form-item>
11
+
12
+      <el-form-item class="filter-item" label="话题类型" >
13
+        <el-select v-model="listQuery.status" placeholder="请选择">
14
+         <el-option label="选择状态" value="" />
15
+         <el-option label="回复我的" value="0"/>
16
+         <el-option label="回复全部物业人员的" value="1"/>
17
+         <el-option label="全部物业人员回复的" value="2"/>
18
+         <el-option label="话题发起人回复的" value="3"/>
19
+        </el-select>
20
+      </el-form-item>
21
+      <el-form-item class="filter-item" label="日期">
22
+        <span >
23
+        <span class="demonstration"></span>
24
+        <el-date-picker
25
+        v-model="listQuery.dataValue"
26
+        type="date"
27
+        placeholder="年-月-日">
28
+        </el-date-picker>
29
+      </span>
30
+      </el-form-item>
31
+      <el-form-item>
32
+        <el-button type="info" class="filter-item" @click="handleFilter">清空</el-button>
33
+        <el-button type="primary" @click="search">查询</el-button>
34
+      </el-form-item>
35
+    </el-form>
36
+    <div class="button">
37
+      <el-button type="danger" >作废</el-button>
38
+    </div>
39
+    <el-table
40
+      v-loading="listLoading"
41
+      ref="multipleTable"
42
+      :data="transactionsList"
43
+      border
44
+      tooltip-effect="dark"
45
+      style="width: 100%; margin-top: 20px;"
46
+      @selection-change="handleSelectionChange">
47
+      <el-table-column
48
+        type="selection"
49
+        width="55"/>
50
+      <el-table-column prop="taUserName" label="回复人" align="center"/>
51
+       <el-table-column prop="replyContent" label="回复内容" align="center"/>
52
+      <el-table-column prop="transactionTitle" label="回复配图" align="center">
53
+           <template slot-scope="scope">
54
+             <img v-for="sr in scope.row.tdImagesLists" :src="sr" preview  width="50" height="50">
55
+           </template>
56
+      </el-table-column>
57
+      <el-table-column prop="replyTaUserName" label="被回复人" align="center"/>
58
+      <el-table-column prop="createDate" label="时间" align="center"><template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template></el-table-column>
59
+      <el-table-column prop="viewCount" label="操作" align="center">
60
+      <template slot-scope="scope"><a><span style="color: #63B8FF" @click="TransactionReplyAdd(scope.row.id)">{{ '回复此回复' }}</span></a></template>
61
+      </el-table-column>  
62
+    </el-table>
63
+    <div class="block">
64
+      <el-pagination
65
+        :current-page.sync="listQuery.pageNum"
66
+        :page-sizes="[10, 20, 50, 100]"
67
+        :page-size.sync="listQuery.pageSize"
68
+        :total="total"
69
+        layout="total, sizes, prev, pager, next, jumper"
70
+        @size-change="handleSizeChange"
71
+        @current-change="handleCurrentChange"/>
72
+    </div>
73
+  </div>
74
+</template>
75
+
76
+<script>
77
+import { mapActions } from 'vuex'
78
+
79
+export default {
80
+  data() {
81
+    return {
82
+      listQuery: {
83
+        communityId: '',
84
+				createDate: '',
85
+				releaseIdentity: '',
86
+				replyContent: '',
87
+				replyTaUserId: '',
88
+				replyTaUserName: '',
89
+				taUserId: '1',
90
+				taUserName: '',
91
+				transactionId: '',
92
+        pageNum: '1',
93
+        pageSize: 10
94
+      },
95
+      total: 0, // 数据总数
96
+      transactionsList: [],
97
+      deleteIds: [], // 选择的id集合
98
+      listLoading: true // 加载圈
99
+    }
100
+  },
101
+  mounted() {
102
+    this.listQuery.id = this.$route.query.id
103
+    // 获取数据
104
+    this.dataQuery()
105
+  },
106
+  methods: {
107
+    ...mapActions('listAnnouncement', [
108
+      'BserPassCertification'
109
+    ]),
110
+    handleSizeChange(val) {
111
+      console.log(`每页 ${val} 条`)
112
+      this.listQuery.pageSize = val
113
+      this.dataQuery()
114
+    },
115
+    handleCurrentChange(val) {
116
+      console.log(`当前页: ${val}`)
117
+      this.listQuery.pageNum = val
118
+      this.dataQuery()
119
+    },
120
+    padDate(value) {
121
+      value = value < 10 ? '0' + value : value
122
+      return value
123
+    },
124
+    getStatus(row) { // 获取状态
125
+      // let statusName = ''
126
+
127
+      // // 判断状态
128
+      // // switch (row.status) {
129
+      // //   case '0':
130
+      // //     statusName = '已作废'
131
+      // //     break
132
+      // //   case '1':
133
+      // //     statusName = '已发布'
134
+      // //     break
135
+      // //   case '2':
136
+      // //     statusName = '草稿'
137
+      // //     break
138
+      // // }
139
+
140
+      // // 如果修改时间和创建时间不一致, 就显示已修改
141
+      // if (row.status === '1' && (row.updateDate > row.createDate)) {
142
+      //   statusName = '已修改'
143
+      // }
144
+
145
+      // return statusName
146
+    },
147
+    dataQuery() { // 查询数据
148
+      this.listLoading = true
149
+      this.$store.dispatch('transaction/TransactionReplyList', this.listQuery).then((res) => {
150
+        const resData = res.data
151
+        this.transactionsList = resData.list
152
+        this.listQuery.pageNum = resData.pageNum
153
+        this.listQuery.pageSize = resData.pageSize
154
+        this.total = resData.total
155
+        this.listLoading = false
156
+      }).catch(() => {
157
+        this.listLoading = false
158
+        console.log('error TransactionsList')
159
+      })
160
+    },
161
+    handleSelectionChange(data) {
162
+      // 设置为 空
163
+      this.deleteIds = []
164
+      for (let i = 0; i < data.length; i++) {
165
+        this.deleteIds.push(data[i].id)
166
+      }
167
+    },
168
+	  search() {
169
+      this.listQuery.pageNum = 1
170
+      this.dataQuery()
171
+    },
172
+    handleFilter() {
173
+      this.listQuery.pageNum = 1
174
+      this.listQuery.pageSize = 10
175
+      this.listQuery.ownerName =''
176
+      this.listQuery.id=''
177
+      this.listQuery.status=''
178
+      this.listQuery.userName=''
179
+      this.dataQuery()
180
+    },
181
+    deleteId(){
182
+      const ids = this.deleteIds
183
+      this.listLoading = true
184
+      console.log(ids)
185
+      this.$store.dispatch('transaction/TransactionsDelete', ids).then((res) => {
186
+        this.listLoading = false
187
+        this.dataQuery()
188
+      }).catch(() => {
189
+        this.listLoading = false
190
+        console.log('error TransactionsDelete')
191
+      })
192
+    },
193
+
194
+
195
+    
196
+    formatDate(val) {
197
+      if (val === null) {
198
+        return ''
199
+      }
200
+      var value = new Date(val)
201
+      var year = value.getFullYear()
202
+      var month = value.getMonth() + 1
203
+      var day = value.getDate()
204
+      return year + '-' + month + '-' + day
205
+    }
206
+  }
207
+}
208
+</script>
209
+
210
+<style scoped>
211
+.root{
212
+  display: flex;
213
+  flex-flow: column;
214
+}
215
+.form-listQuery{
216
+  margin-top: 20px;
217
+  margin-left: 30px;
218
+}
219
+.operation{
220
+  display: flex;
221
+  justify-content: space-between;
222
+  margin-left: 20px;
223
+  margin-right: 20px;
224
+}
225
+.block{
226
+  display: flex;
227
+  justify-content: flex-end;
228
+  margin-top: 10px;
229
+}
230
+.button {
231
+  margin-left: 20px;
232
+}
233
+</style>
234
+

+ 3
- 3
VUECODE/smart-property-manage/src/views/social/transaction/transactionAdd.vue View File

@@ -3,7 +3,7 @@
3 3
     <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-position="top" label-width="150px" class="ruleForm">
4 4
 
5 5
     <el-form-item class="filter-item" label="话题类型" >
6
-        <el-select v-model="ruleForm.status" placeholder="请选择">
6
+        <el-select v-model="ruleForm.type" placeholder="请选择">
7 7
          <el-option label="选择状态" value="" />
8 8
          <el-option label="议事大厅" value="0"/>
9 9
          <el-option label="友令互助" value="1"/>
@@ -16,7 +16,7 @@
16 16
         <el-input v-model="ruleForm.transactionTitle" placeholder="20字以内"/>
17 17
       </el-form-item>
18 18
       <el-form-item label="话题详细描述">
19
-        <el-input v-model="ruleForm.announcementContent" :rows="10" type="textarea" placeholder="内容,规则,时间等"/>
19
+        <el-input v-model="ruleForm.transactionContent" :rows="10" type="textarea" placeholder="内容,规则,时间等"/>
20 20
       </el-form-item>
21 21
       <el-form-item label="话题配图">
22 22
         <el-upload
@@ -110,7 +110,7 @@ export default {
110 110
                 message: res.message,
111 111
                 type: 'success'
112 112
               })
113
-              this.$router.push({ name: 'announcement-index' })
113
+              this.$router.push({ name: 'transaction-import' })
114 114
               loading.close()
115 115
               return
116 116
             }

+ 179
- 0
VUECODE/smart-property-manage/src/views/social/transaction/transactionDetails.vue View File

@@ -0,0 +1,179 @@
1
+<template>
2
+  <div id="root">
3
+    <el-form ref="form" label-width="100px" label-position="left">
4
+      <el-form-item label="话题类型">
5
+         <span v-if="ruleForm.type==='0'">{{'议事大厅'}}</span>
6
+         <span v-if="ruleForm.type==='1'">{{'邻里互助'}}</span>
7
+         <span v-if="ruleForm.type==='2'">{{'二手/租赁'}}</span>
8
+         <span v-if="ruleForm.type==='3'">{{'其他话题'}}</span>
9
+      </el-form-item>
10
+      <el-form-item label="话题标题">
11
+        <div class="activityContext">
12
+          {{ ruleForm.transactionTitle }}
13
+        </div>
14
+      </el-form-item>  
15
+      <el-form-item label="详情描述">
16
+        <div class="activityContext">
17
+          {{ ruleForm.transactionContent }}
18
+        </div>
19
+      </el-form-item>
20
+      <el-form-item label="话题配图">
21
+        <template v-for="site in ruleForm.contentImg">
22
+          <img :src="site" width="100" height="100" >
23
+        </template>
24
+      </el-form-item>
25
+      <el-form-item label="权重值">
26
+        <span>{{ ruleForm.sort }}</span>
27
+      </el-form-item>
28
+    </el-form>
29
+    <div class="bom-button">
30
+      <el-button v-if="isEdi" type="primary" style="width: 100px;" @click="edi">修改</el-button>
31
+      <el-button v-if="isEdi" type="primary" style="width: 100px;" @click="edi">回复帖子</el-button>
32
+      <el-button v-if="isEdi" type="primary" style="width: 150px;" @click="edi">查看全部N条回复</el-button>
33
+    </div>
34
+  </div>
35
+</template>
36
+
37
+<script>
38
+export default {
39
+  name: 'Index',
40
+  data() {
41
+    return {
42
+      ruleForm: {
43
+        communityId: '',
44
+				createDate:'',
45
+				createUser:'',
46
+				id:'',
47
+				isReported:'',
48
+				status:'',
49
+				taUserId:'',
50
+				transactionContent:'',
51
+				transactionTitle:'',
52
+				type:'',
53
+				updateDate:'',
54
+				updateUser:'',
55
+				userName:'',
56
+        viewCount:'',
57
+        announcementCarouselImg: '', // 轮播图
58
+        announcementContent: '', // 内容详细
59
+        contentImg: [], // 内容配图
60
+        signUpCount: '', // 报名人数统计
61
+        registrationEndTime: '', // 报名活动结束时间
62
+        sort: 1, // 权重
63
+        status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
64
+      },
65
+      isEdi: true // 默认显示修改按钮
66
+    }
67
+  },
68
+  mounted() {
69
+    this.ruleForm.id = this.$route.query.id
70
+    this.getById()
71
+  },
72
+  methods: {
73
+    getById() { // 根据ID获取活动信息
74
+      this.$store.dispatch('transaction/TransactionById', this.ruleForm.id).then((res) => {
75
+        this.ruleForm.transactionTitle = res.data.tpTransaction.transactionTitle
76
+         this.ruleForm.type = res.data.tpTransaction.type
77
+         this.ruleForm.transactionContent = res.data.tpTransaction.transactionContent
78
+         this.ruleForm.sort = res.data.tpTransaction.sort
79
+        //  this.contentImgList = res.data.list
80
+         console.log(' res.data.tpTransaction.list', res.data.list)
81
+
82
+         // 多张图片进行遍历
83
+        for (let i = 0; i < res.data.list.length; i++) {
84
+          this.ruleForm.contentImg.push(res.data.list[i])
85
+        }
86
+      
87
+      })
88
+    },
89
+    formatDate(val) {
90
+      var value = new Date(val)
91
+      var year = value.getFullYear()
92
+      var month = value.getMonth() + 1
93
+      var day = value.getDate()
94
+      // var hour = value.getHours()
95
+      // var minutes = value.getMinutes()
96
+      // var seconds = value.getSeconds()
97
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
98
+      return year + '-' + month + '-' + day
99
+    },
100
+    edi() { // 修改活动
101
+      this.$router.push({ name: 'transaction-edit', query: { id: this.ruleForm.id }})
102
+    }
103
+  }
104
+}
105
+</script>
106
+
107
+<style scoped>
108
+#root {
109
+  display: flex;
110
+  flex-flow: column;
111
+  width: 500px;
112
+  margin-top: 50px;
113
+  margin-left: auto;
114
+  margin-right: auto;
115
+}
116
+.activityTile{
117
+  text-align: center;
118
+  font-size: 30px;
119
+  margin-bottom: 10px;
120
+}
121
+.activityContext{
122
+  /*margin-top: 20px;*/
123
+  margin-bottom: 20px;
124
+  font-size: 20px;
125
+  justify-items: center;
126
+}
127
+/* .progress {
128
+  display: flex;
129
+  justify-content: space-between;
130
+  margin-top: 20px;
131
+  margin-bottom: 20px;
132
+} */
133
+/* .text-progress {
134
+  width: 500px;
135
+  float: left;
136
+  align-content: center;
137
+  position: absolute;
138
+  margin-top: 12px;
139
+} */
140
+/* .people-number {
141
+  position: relative;
142
+  margin-left: 180px;
143
+} */
144
+/* .outer-layer {
145
+  background-color: gainsboro;
146
+  height: 3px;
147
+  width: 450px;
148
+  margin-top: -10px;
149
+  position: relative;
150
+} */
151
+.inner-layer {
152
+  background-color: aquamarine;
153
+  height: 6px;
154
+  width: 100px;
155
+  position: relative;
156
+  margin-top: -4px;
157
+}
158
+/* .circular {
159
+  border: 1px #001528 solid;
160
+  border-radius: 10px;
161
+  /*background-color: chartreuse;*/
162
+ /* width: 20px;
163
+  height: 20px;
164
+  position: relative;
165
+  margin-left: 452px;
166
+  margin-top: 11px;
167
+  float: left;
168
+} */
169
+/* .people-limit {
170
+  margin-top: 13px;
171
+} */
172
+.bom-button{
173
+  display: flex;
174
+  justify-content: center;
175
+  margin-top: 20px;
176
+  margin-bottom: 100px;
177
+  margin-left:-25%
178
+}
179
+</style>

+ 209
- 0
VUECODE/smart-property-manage/src/views/social/transaction/transactionEdit.vue View File

@@ -0,0 +1,209 @@
1
+<template>
2
+  <div id="root">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-position="top" label-width="150px" class="ruleForm">
4
+
5
+    <el-form-item class="filter-item" label="话题类型" >
6
+        <el-select v-model="ruleForm.type" placeholder="请选择">
7
+         <el-option label="选择状态" value="" />
8
+         <el-option label="议事大厅" value="0"/>
9
+         <el-option label="友令互助" value="1"/>
10
+         <!-- -1包括,二手,租赁,求购 -->
11
+         <el-option label="二手租赁" value="-1"/>
12
+         <el-option label="其他" value="3"/>
13
+        </el-select>
14
+      </el-form-item>
15
+      <el-form-item label="话题标题" prop="transactionTitle">
16
+        <el-input v-model="ruleForm.transactionTitle" placeholder="20字以内"/>
17
+      </el-form-item>
18
+      <el-form-item label="话题详细描述">
19
+        <el-input v-model="ruleForm.transactionContent" :rows="10" type="textarea" placeholder="内容,规则,时间等"/>
20
+      </el-form-item>
21
+      <el-form-item label="话题配图">
22
+        <el-upload
23
+          :on-preview="handlePictureCardPreview"
24
+          :on-remove="handleRemove"
25
+          :on-success="handleSuccessContentImg"
26
+          :file-list="contentImgList"
27
+          name="uploadFiles"
28
+          action="http://106.14.20.193:8086/property-api/uploadimage"
29
+          list-type="picture-card">
30
+          <i class="el-icon-plus"/>
31
+        </el-upload>
32
+        <el-dialog :visible.sync="dialogVisible">
33
+          <img :src="dialogImageUrl" width="100%" alt="">
34
+        </el-dialog>
35
+      </el-form-item>
36
+      <el-form-item label="权重值" prop="sort">
37
+        <el-input-number v-model="ruleForm.sort" label="权重值" @change="sortHandleChange"/>
38
+      </el-form-item>
39
+      <el-form-item>
40
+        <el-button type="primary" @click="submitForm('ruleForm','1')">发布</el-button>
41
+      </el-form-item>
42
+    </el-form>
43
+  </div>
44
+</template>
45
+
46
+<script>
47
+export default {
48
+  name: 'Index',
49
+  data() {
50
+    return {
51
+      ruleForm: {
52
+        sort: '',
53
+        communityId: '',
54
+        createDate:'',
55
+        createUser:'',
56
+        id:'',
57
+        isReported:'',
58
+        status:'',
59
+        taUserId:'',
60
+        transactionContent:'',
61
+        transactionTitle:'',
62
+        type:'',
63
+        updateDate:'',
64
+        updateUser:'',
65
+        userName:'',
66
+        viewCount:'',
67
+        announcementCarouselImg: '', // 轮播图
68
+        announcementContent: '', // 内容详细
69
+        contentImg: [], // 内容配图
70
+        sort: 1, // 权重
71
+        status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
72
+      },
73
+      contentImgList: [],
74
+      imageUrl: '', // 轮播图预览
75
+      dialogVisible: false, // 活动配图, 默认不显示 (以单张为单位)
76
+      dialogImageUrl: '', // 活动配图, 图片链接 (以单张为单位)
77
+      rules: {
78
+        announcementTitle: [
79
+          { required: true, message: '请输入公告名称', trigger: 'blur' },
80
+          { min: 1, max: 20, message: '长度在 15 个字符以内', trigger: 'blur' }
81
+        ],
82
+        announcementContent: [
83
+          { required: true, message: '公告详细描述', trigger: 'blur' }
84
+        ],
85
+        sort: [
86
+          { required: true, message: '请输入权重值', trigger: 'change' }
87
+        ]
88
+      }
89
+    }
90
+  },
91
+  mounted() {
92
+    this.ruleForm.id = this.$route.query.id
93
+    console.log('this.ruleForm.id',this.ruleForm.id)
94
+    this.transactionById()
95
+  },
96
+  methods: {
97
+    submitForm(formName, status) {
98
+      console.log(status)
99
+      // 加载框
100
+    //   const loading = this.$loading({
101
+    //     lock: true,
102
+    //     text: 'Loading',
103
+    //     spinner: 'el-icon-loading',
104
+    //     background: 'rgba(0, 0, 0, 0.7)'
105
+    //   })
106
+      this.$refs[formName].validate((valid) => {
107
+        if (valid) {
108
+          if (this.ruleForm.transactionContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
109
+            this.$message.error('内容描述 和 图至少要存在一个!')
110
+            return
111
+          }
112
+          this.ruleForm.status = status // 发布状态
113
+          this.$store.dispatch('transaction/TransactionsEdit', this.ruleForm).then((res) => {
114
+            
115
+            // this.$message.error(res.message)
116
+            // loading.close()
117
+          }).catch(() => {
118
+            console.log('error AddActivity')
119
+          })
120
+        } else {
121
+          console.log('error submit!!')
122
+          // loading.close()
123
+          return false
124
+        }
125
+      })
126
+      // 关闭加载框
127
+      // loading.close()
128
+    },
129
+    resetForm(formName, status) {
130
+      console.log(status)
131
+      this.submitForm(formName, status)
132
+    },
133
+    handleRemove(file, fileList) { // 活动配图移除时
134
+      this.ruleForm.contentImg = []
135
+      for (let i = 0; i < fileList.length; i++) {
136
+        this.ruleForm.contentImg.push(fileList[i].url)
137
+      }
138
+    },
139
+    handlePictureCardPreview(file) { // 点击活动配图文件列表中已上传的文件时的钩子
140
+      this.dialogImageUrl = file.url
141
+      this.dialogVisible = true
142
+    },
143
+    handleSuccessContentImg(response, file, fileList) { // 活动配图上传成功时回调
144
+      const resImg = response.data[0]
145
+      this.ruleForm.contentImg.push(resImg)
146
+    },
147
+    sortHandleChange(value) { // 权重值
148
+      this.ruleForm.sort = value
149
+      console.log(value)
150
+    },
151
+    transactionById(){
152
+      this.$store.dispatch('transaction/TransactionById', this.ruleForm.id).then((res) => {
153
+         this.ruleForm.transactionTitle = res.data.tpTransaction.transactionTitle
154
+         this.ruleForm.type = res.data.tpTransaction.type
155
+         this.ruleForm.transactionContent = res.data.tpTransaction.transactionContent
156
+         this.ruleForm.sort = res.data.tpTransaction.sort
157
+        //  this.contentImgList = res.data.list
158
+         console.log(' res.data.tpTransaction.list', res.data.list)
159
+
160
+         // 多张图片进行遍历
161
+        for (let i = 0; i < res.data.list.length; i++) {
162
+          this.contentImgList.push({ url: res.data.list[i] })
163
+          this.ruleForm.contentImg.push(res.data.list[i])
164
+        }
165
+          }).catch(() => {
166
+            console.log('error TransactionById')
167
+          })
168
+
169
+
170
+    }
171
+    
172
+  }
173
+}
174
+</script>
175
+
176
+<style scoped>
177
+#root {
178
+  display: flex;
179
+}
180
+.ruleForm {
181
+  width: 800px;
182
+  margin-left: auto;
183
+  margin-right: auto;
184
+  margin-top: 50px;
185
+}
186
+.avatar-uploader .el-upload {
187
+  border: 1px dashed #d9d9d9;
188
+  border-radius: 6px;
189
+  cursor: pointer;
190
+  position: relative;
191
+  overflow: hidden;
192
+}
193
+.avatar-uploader .el-upload:hover {
194
+  border-color: #409EFF;
195
+}
196
+.avatar-uploader-icon {
197
+  font-size: 28px;
198
+  color: #8c939d;
199
+  width: 178px;
200
+  height: 178px;
201
+  line-height: 178px;
202
+  text-align: center;
203
+}
204
+.avatar {
205
+  width: 178px;
206
+  height: 178px;
207
+  display: block;
208
+}
209
+</style>