增加注释
Showing
11 changed files
with
153 additions
and
1 deletions
... | @@ -91,6 +91,10 @@ export default { | ... | @@ -91,6 +91,10 @@ export default { |
91 | } | 91 | } |
92 | }, | 92 | }, |
93 | methods: { | 93 | methods: { |
94 | /** | ||
95 | * @description: handleFullscreen | ||
96 | * @author: renchao | ||
97 | */ | ||
94 | handleFullscreen () { | 98 | handleFullscreen () { |
95 | this.fullscreen = !this.fullscreen | 99 | this.fullscreen = !this.fullscreen |
96 | if (!this.fullscreen) { | 100 | if (!this.fullscreen) { |
... | @@ -99,11 +103,19 @@ export default { | ... | @@ -99,11 +103,19 @@ export default { |
99 | this.scrollerHeight = (window.innerHeight - 120) + 'px' | 103 | this.scrollerHeight = (window.innerHeight - 120) + 'px' |
100 | } | 104 | } |
101 | }, | 105 | }, |
106 | /** | ||
107 | * @description: submitForm | ||
108 | * @author: renchao | ||
109 | */ | ||
102 | submitForm () { | 110 | submitForm () { |
103 | if (this.isButton) { | 111 | if (this.isButton) { |
104 | this.$emit('submitForm'); | 112 | this.$emit('submitForm'); |
105 | } | 113 | } |
106 | }, | 114 | }, |
115 | /** | ||
116 | * @description: closeDialog | ||
117 | * @author: renchao | ||
118 | */ | ||
107 | closeDialog () { | 119 | closeDialog () { |
108 | this.key++ | 120 | this.key++ |
109 | this.$emit('input', false) | 121 | this.$emit('input', false) | ... | ... |
... | @@ -52,6 +52,10 @@ export default { | ... | @@ -52,6 +52,10 @@ export default { |
52 | LbRender | 52 | LbRender |
53 | }, | 53 | }, |
54 | methods: { | 54 | methods: { |
55 | /** | ||
56 | * @description: setColumn | ||
57 | * @author: renchao | ||
58 | */ | ||
55 | setColumn () { | 59 | setColumn () { |
56 | if (this.column.type) { | 60 | if (this.column.type) { |
57 | this.column.renderHeader = forced[this.column.type].renderHeader | 61 | this.column.renderHeader = forced[this.column.type].renderHeader | ... | ... |
... | @@ -112,15 +112,30 @@ export default { | ... | @@ -112,15 +112,30 @@ export default { |
112 | }, | 112 | }, |
113 | methods: { | 113 | methods: { |
114 | // 单选 | 114 | // 单选 |
115 | /** | ||
116 | * @description: 单选 | ||
117 | * @param {*} row | ||
118 | * @author: renchao | ||
119 | */ | ||
115 | singleElection (row) { | 120 | singleElection (row) { |
116 | this.selected = this.data.indexOf(row); | 121 | this.selected = this.data.indexOf(row); |
117 | }, | 122 | }, |
118 | 123 | ||
124 | /** | ||
125 | * @description: tableRowClassName | ||
126 | * @param {*} row | ||
127 | * @param {*} rowIndex | ||
128 | * @author: renchao | ||
129 | */ | ||
119 | tableRowClassName ({ row, rowIndex }) { | 130 | tableRowClassName ({ row, rowIndex }) { |
120 | if (rowIndex % 2 === 1) { | 131 | if (rowIndex % 2 === 1) { |
121 | return 'interlaced'; | 132 | return 'interlaced'; |
122 | } | 133 | } |
123 | }, | 134 | }, |
135 | /** | ||
136 | * @description: getHeight | ||
137 | * @author: renchao | ||
138 | */ | ||
124 | getHeight () { | 139 | getHeight () { |
125 | if (!this.heightNumSetting) { | 140 | if (!this.heightNumSetting) { |
126 | let _this = this | 141 | let _this = this |
... | @@ -137,6 +152,12 @@ export default { | ... | @@ -137,6 +152,12 @@ export default { |
137 | } | 152 | } |
138 | } | 153 | } |
139 | }, | 154 | }, |
155 | /** | ||
156 | * @description: calcHeightx | ||
157 | * @param {*} value | ||
158 | * @param {*} wappered | ||
159 | * @author: renchao | ||
160 | */ | ||
140 | calcHeightx (value, wappered = true) { | 161 | calcHeightx (value, wappered = true) { |
141 | //项目自定义的公共header部分的高度,可忽略 | 162 | //项目自定义的公共header部分的高度,可忽略 |
142 | let header = document.querySelector(".from-clues-header").offsetHeight; | 163 | let header = document.querySelector(".from-clues-header").offsetHeight; |
... | @@ -156,36 +177,91 @@ export default { | ... | @@ -156,36 +177,91 @@ export default { |
156 | } | 177 | } |
157 | return res; | 178 | return res; |
158 | }, | 179 | }, |
180 | /** | ||
181 | * @description: clearSelection | ||
182 | * @author: renchao | ||
183 | */ | ||
159 | clearSelection () { | 184 | clearSelection () { |
160 | this.$refs.elTable.clearSelection() | 185 | this.$refs.elTable.clearSelection() |
161 | }, | 186 | }, |
187 | /** | ||
188 | * @description: toggleRowSelection | ||
189 | * @param {*} row | ||
190 | * @param {*} selected | ||
191 | * @author: renchao | ||
192 | */ | ||
162 | toggleRowSelection (row, selected) { | 193 | toggleRowSelection (row, selected) { |
163 | this.$refs.elTable.toggleRowSelection(row, selected) | 194 | this.$refs.elTable.toggleRowSelection(row, selected) |
164 | }, | 195 | }, |
196 | /** | ||
197 | * @description: toggleAllSelection | ||
198 | * @author: renchao | ||
199 | */ | ||
165 | toggleAllSelection () { | 200 | toggleAllSelection () { |
166 | this.$refs.elTable.toggleAllSelection() | 201 | this.$refs.elTable.toggleAllSelection() |
167 | }, | 202 | }, |
203 | /** | ||
204 | * @description: toggleRowExpansion | ||
205 | * @param {*} row | ||
206 | * @param {*} expanded | ||
207 | * @author: renchao | ||
208 | */ | ||
168 | toggleRowExpansion (row, expanded) { | 209 | toggleRowExpansion (row, expanded) { |
169 | this.$refs.elTable.toggleRowExpansion(row, expanded) | 210 | this.$refs.elTable.toggleRowExpansion(row, expanded) |
170 | }, | 211 | }, |
212 | /** | ||
213 | * @description: setCurrentRow | ||
214 | * @param {*} row | ||
215 | * @author: renchao | ||
216 | */ | ||
171 | setCurrentRow (row) { | 217 | setCurrentRow (row) { |
172 | this.$refs.elTable.setCurrentRow(row) | 218 | this.$refs.elTable.setCurrentRow(row) |
173 | }, | 219 | }, |
220 | /** | ||
221 | * @description: clearSort | ||
222 | * @author: renchao | ||
223 | */ | ||
174 | clearSort () { | 224 | clearSort () { |
175 | this.$refs.elTable.clearSort() | 225 | this.$refs.elTable.clearSort() |
176 | }, | 226 | }, |
227 | /** | ||
228 | * @description: clearFilter | ||
229 | * @param {*} columnKey | ||
230 | * @author: renchao | ||
231 | */ | ||
177 | clearFilter (columnKey) { | 232 | clearFilter (columnKey) { |
178 | this.$refs.elTable.clearFilter(columnKey) | 233 | this.$refs.elTable.clearFilter(columnKey) |
179 | }, | 234 | }, |
235 | /** | ||
236 | * @description: doLayout | ||
237 | * @author: renchao | ||
238 | */ | ||
180 | doLayout () { | 239 | doLayout () { |
181 | this.$refs.elTable.doLayout() | 240 | this.$refs.elTable.doLayout() |
182 | }, | 241 | }, |
242 | /** | ||
243 | * @description: sort | ||
244 | * @param {*} prop | ||
245 | * @param {*} order | ||
246 | * @author: renchao | ||
247 | */ | ||
183 | sort (prop, order) { | 248 | sort (prop, order) { |
184 | this.$refs.elTable.sort(prop, order) | 249 | this.$refs.elTable.sort(prop, order) |
185 | }, | 250 | }, |
251 | /** | ||
252 | * @description: paginationCurrentChange | ||
253 | * @param {*} val | ||
254 | * @author: renchao | ||
255 | */ | ||
186 | paginationCurrentChange (val) { | 256 | paginationCurrentChange (val) { |
187 | this.$emit('p-current-change', val) | 257 | this.$emit('p-current-change', val) |
188 | }, | 258 | }, |
259 | /** | ||
260 | * @description: getMergeArr | ||
261 | * @param {*} tableData | ||
262 | * @param {*} merge | ||
263 | * @author: renchao | ||
264 | */ | ||
189 | getMergeArr (tableData, merge) { | 265 | getMergeArr (tableData, merge) { |
190 | if (!merge) return | 266 | if (!merge) return |
191 | this.mergeLine = {} | 267 | this.mergeLine = {} |
... | @@ -208,6 +284,14 @@ export default { | ... | @@ -208,6 +284,14 @@ export default { |
208 | }) | 284 | }) |
209 | }) | 285 | }) |
210 | }, | 286 | }, |
287 | /** | ||
288 | * @description: mergeMethod | ||
289 | * @param {*} row | ||
290 | * @param {*} column | ||
291 | * @param {*} rowIndex | ||
292 | * @param {*} columnIndex | ||
293 | * @author: renchao | ||
294 | */ | ||
211 | mergeMethod ({ row, column, rowIndex, columnIndex }) { | 295 | mergeMethod ({ row, column, rowIndex, columnIndex }) { |
212 | const index = this.merge.indexOf(column.property) | 296 | const index = this.merge.indexOf(column.property) |
213 | if (index > -1) { | 297 | if (index > -1) { | ... | ... |
... | @@ -25,6 +25,12 @@ | ... | @@ -25,6 +25,12 @@ |
25 | }, | 25 | }, |
26 | }, | 26 | }, |
27 | methods: { | 27 | methods: { |
28 | /** | ||
29 | * @description: hexToRgba | ||
30 | * @param {*} hex | ||
31 | * @param {*} opacity | ||
32 | * @author: renchao | ||
33 | */ | ||
28 | hexToRgba (hex, opacity) { | 34 | hexToRgba (hex, opacity) { |
29 | let rgbaColor = ""; | 35 | let rgbaColor = ""; |
30 | let reg = /^#[\da-f]{6}$/i; | 36 | let reg = /^#[\da-f]{6}$/i; |
... | @@ -35,6 +41,11 @@ | ... | @@ -35,6 +41,11 @@ |
35 | } | 41 | } |
36 | return rgbaColor; | 42 | return rgbaColor; |
37 | }, | 43 | }, |
44 | /** | ||
45 | * @description: fontSize | ||
46 | * @param {*} res | ||
47 | * @author: renchao | ||
48 | */ | ||
38 | fontSize (res) { | 49 | fontSize (res) { |
39 | let docEl = document.documentElement, | 50 | let docEl = document.documentElement, |
40 | clientWidth = | 51 | clientWidth = | ... | ... |
... | @@ -30,6 +30,10 @@ export default { | ... | @@ -30,6 +30,10 @@ export default { |
30 | this.dataTrend() | 30 | this.dataTrend() |
31 | }, | 31 | }, |
32 | methods: { | 32 | methods: { |
33 | /** | ||
34 | * @description: dataTrend | ||
35 | * @author: renchao | ||
36 | */ | ||
33 | async dataTrend() { | 37 | async dataTrend() { |
34 | try { | 38 | try { |
35 | let { result: res } = await work.dataTrend(); | 39 | let { result: res } = await work.dataTrend(); | ... | ... |
... | @@ -25,6 +25,10 @@ | ... | @@ -25,6 +25,10 @@ |
25 | this.submitViews(); | 25 | this.submitViews(); |
26 | }, | 26 | }, |
27 | methods: { | 27 | methods: { |
28 | /** | ||
29 | * @description: submitViews | ||
30 | * @author: renchao | ||
31 | */ | ||
28 | async submitViews () { | 32 | async submitViews () { |
29 | try { | 33 | try { |
30 | let { result: res } = await work.submitViews("A20"); | 34 | let { result: res } = await work.submitViews("A20"); | ... | ... |
... | @@ -22,6 +22,10 @@ export default { | ... | @@ -22,6 +22,10 @@ export default { |
22 | this.getDjlxtotal(); | 22 | this.getDjlxtotal(); |
23 | }, | 23 | }, |
24 | methods: { | 24 | methods: { |
25 | /** | ||
26 | * @description: getDjlxtotal | ||
27 | * @author: renchao | ||
28 | */ | ||
25 | getDjlxtotal () { | 29 | getDjlxtotal () { |
26 | return new Promise(async (resolve) => { | 30 | return new Promise(async (resolve) => { |
27 | try { | 31 | try { | ... | ... |
... | @@ -176,6 +176,10 @@ export default { | ... | @@ -176,6 +176,10 @@ export default { |
176 | }, | 176 | }, |
177 | methods: { | 177 | methods: { |
178 | // 开启定时器 | 178 | // 开启定时器 |
179 | /** | ||
180 | * @description: 开启定时器 | ||
181 | * @author: renchao | ||
182 | */ | ||
179 | startInterval () { | 183 | startInterval () { |
180 | const _self = this; | 184 | const _self = this; |
181 | // 应通过接口获取配置时间,暂时写死5s | 185 | // 应通过接口获取配置时间,暂时写死5s |
... | @@ -188,6 +192,10 @@ export default { | ... | @@ -188,6 +192,10 @@ export default { |
188 | }, time); | 192 | }, time); |
189 | }, | 193 | }, |
190 | // 重新随机选中地图区域 | 194 | // 重新随机选中地图区域 |
195 | /** | ||
196 | * @description: 重新随机选中地图区域 | ||
197 | * @author: renchao | ||
198 | */ | ||
191 | reSelectMapRandomArea () { | 199 | reSelectMapRandomArea () { |
192 | const length = 9; | 200 | const length = 9; |
193 | this.$nextTick(() => { | 201 | this.$nextTick(() => { |
... | @@ -218,6 +226,10 @@ export default { | ... | @@ -218,6 +226,10 @@ export default { |
218 | } | 226 | } |
219 | }); | 227 | }); |
220 | }, | 228 | }, |
229 | /** | ||
230 | * @description: handleMapRandomSelect | ||
231 | * @author: renchao | ||
232 | */ | ||
221 | handleMapRandomSelect () { | 233 | handleMapRandomSelect () { |
222 | this.$nextTick(() => { | 234 | this.$nextTick(() => { |
223 | try { | 235 | try { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-04-03 13:40:18 | 4 | * @LastEditTime: 2023-04-03 13:40:18 |
5 | --> | 5 | --> |
... | @@ -23,6 +23,10 @@ export default { | ... | @@ -23,6 +23,10 @@ export default { |
23 | this.mapViews(); | 23 | this.mapViews(); |
24 | }, | 24 | }, |
25 | methods: { | 25 | methods: { |
26 | /** | ||
27 | * @description: mapViews | ||
28 | * @author: renchao | ||
29 | */ | ||
26 | async mapViews () { | 30 | async mapViews () { |
27 | try { | 31 | try { |
28 | let { result: res } = await work.mapViews("A20"); | 32 | let { result: res } = await work.mapViews("A20"); | ... | ... |
... | @@ -34,6 +34,10 @@ | ... | @@ -34,6 +34,10 @@ |
34 | 34 | ||
35 | }, | 35 | }, |
36 | methods: { | 36 | methods: { |
37 | /** | ||
38 | * @description: addhousetotal | ||
39 | * @author: renchao | ||
40 | */ | ||
37 | async addhousetotal () { | 41 | async addhousetotal () { |
38 | if (this.cdata == 0) { | 42 | if (this.cdata == 0) { |
39 | this.cdata = []; | 43 | this.cdata = []; |
... | @@ -57,6 +61,11 @@ | ... | @@ -57,6 +61,11 @@ |
57 | 61 | ||
58 | }, | 62 | }, |
59 | // 处理数据方法 | 63 | // 处理数据方法 |
64 | /** | ||
65 | * @description: 处理数据方法 | ||
66 | * @param {*} delarr | ||
67 | * @author: renchao | ||
68 | */ | ||
60 | setadat (delarr) { | 69 | setadat (delarr) { |
61 | 70 | ||
62 | this.cdata = delarr.splice(0, 6); | 71 | this.cdata = delarr.splice(0, 6); | ... | ... |
-
Please register or sign in to post a comment