97690a4f by yuanbo

增加注释

1 parent 2829098e
...@@ -74,6 +74,10 @@ export default { ...@@ -74,6 +74,10 @@ export default {
74 } 74 }
75 }, 75 },
76 methods: { 76 methods: {
77 /**
78 * @description: close
79 * @author: renchao
80 */
77 close () { 81 close () {
78 this.$emit('close') 82 this.$emit('close')
79 } 83 }
......
...@@ -96,6 +96,10 @@ export default { ...@@ -96,6 +96,10 @@ export default {
96 } 96 }
97 }, 97 },
98 methods: { 98 methods: {
99 /**
100 * @description: handleFullscreen
101 * @author: renchao
102 */
99 handleFullscreen () { 103 handleFullscreen () {
100 this.fullscreen = !this.fullscreen 104 this.fullscreen = !this.fullscreen
101 if (!this.fullscreen) { 105 if (!this.fullscreen) {
...@@ -104,11 +108,19 @@ export default { ...@@ -104,11 +108,19 @@ export default {
104 this.scrollerHeight = (window.innerHeight - 120) + 'px' 108 this.scrollerHeight = (window.innerHeight - 120) + 'px'
105 } 109 }
106 }, 110 },
111 /**
112 * @description: submitForm
113 * @author: renchao
114 */
107 submitForm () { 115 submitForm () {
108 if (this.isButton) { 116 if (this.isButton) {
109 this.$emit('submitForm'); 117 this.$emit('submitForm');
110 } 118 }
111 }, 119 },
120 /**
121 * @description: closeDialog
122 * @author: renchao
123 */
112 closeDialog () { 124 closeDialog () {
113 this.key++ 125 this.key++
114 this.$emit('input', false) 126 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 =
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
35 }); 35 });
36 }, 36 },
37 methods: { 37 methods: {
38 /**
39 * @description: dataTrend
40 * @author: renchao
41 */
38 async dataTrend () { 42 async dataTrend () {
39 try { 43 try {
40 let { result: res } = await work.dataTrend(); 44 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");
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-04 13:54:34 4 * @LastEditTime: 2023-07-04 13:54:34
5 --> 5 -->
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
30 }, 10000) // 10s 30 }, 10000) // 10s
31 }, 31 },
32 methods: { 32 methods: {
33 /**
34 * @description: getDjlxtotal
35 * @author: renchao
36 */
33 getDjlxtotal () { 37 getDjlxtotal () {
34 return new Promise(async (resolve) => { 38 return new Promise(async (resolve) => {
35 try { 39 try {
......
...@@ -184,6 +184,10 @@ ...@@ -184,6 +184,10 @@
184 }, 184 },
185 methods: { 185 methods: {
186 // 开启定时器 186 // 开启定时器
187 /**
188 * @description: 开启定时器
189 * @author: renchao
190 */
187 startInterval () { 191 startInterval () {
188 const _self = this; 192 const _self = this;
189 // 应通过接口获取配置时间,暂时写死5s 193 // 应通过接口获取配置时间,暂时写死5s
...@@ -196,6 +200,10 @@ ...@@ -196,6 +200,10 @@
196 }, time); 200 }, time);
197 }, 201 },
198 // 重新随机选中地图区域 202 // 重新随机选中地图区域
203 /**
204 * @description: 重新随机选中地图区域
205 * @author: renchao
206 */
199 reSelectMapRandomArea () { 207 reSelectMapRandomArea () {
200 const length = 9; 208 const length = 9;
201 this.$nextTick(() => { 209 this.$nextTick(() => {
...@@ -226,6 +234,10 @@ ...@@ -226,6 +234,10 @@
226 } 234 }
227 }); 235 });
228 }, 236 },
237 /**
238 * @description: handleMapRandomSelect
239 * @author: renchao
240 */
229 handleMapRandomSelect () { 241 handleMapRandomSelect () {
230 this.$nextTick(() => { 242 this.$nextTick(() => {
231 try { 243 try {
......
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
27 }, 10000) // 10s 27 }, 10000) // 10s
28 }, 28 },
29 methods: { 29 methods: {
30 /**
31 * @description: mapViews
32 * @author: renchao
33 */
30 async mapViews () { 34 async mapViews () {
31 try { 35 try {
32 let { result: res } = await work.mapViews("A20"); 36 let { result: res } = await work.mapViews("A20");
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
39 }); 39 });
40 }, 40 },
41 methods: { 41 methods: {
42 /**
43 * @description: addhousetotal
44 * @author: renchao
45 */
42 async addhousetotal () { 46 async addhousetotal () {
43 if (this.cdata == 0) { 47 if (this.cdata == 0) {
44 this.cdata = []; 48 this.cdata = [];
...@@ -61,6 +65,11 @@ ...@@ -61,6 +65,11 @@
61 } 65 }
62 }, 66 },
63 // 处理数据方法 67 // 处理数据方法
68 /**
69 * @description: 处理数据方法
70 * @param {*} delarr
71 * @author: renchao
72 */
64 setadat (delarr) { 73 setadat (delarr) {
65 this.cdata = delarr.splice(0, 6); 74 this.cdata = delarr.splice(0, 6);
66 let sum = 0 75 let sum = 0
......