增加注释
Showing
4 changed files
with
98 additions
and
0 deletions
... | @@ -203,6 +203,12 @@ | ... | @@ -203,6 +203,12 @@ |
203 | }, | 203 | }, |
204 | methods: { | 204 | methods: { |
205 | // 添加索引 | 205 | // 添加索引 |
206 | /** | ||
207 | * @description: 添加索引 | ||
208 | * @param {*} data | ||
209 | * @param {*} isAdd | ||
210 | * @author: renchao | ||
211 | */ | ||
206 | addIndexes (data = this.tableData, isAdd = true) { | 212 | addIndexes (data = this.tableData, isAdd = true) { |
207 | data.forEach((item, index) => { | 213 | data.forEach((item, index) => { |
208 | if (index == 0) { | 214 | if (index == 0) { |
... | @@ -224,6 +230,10 @@ | ... | @@ -224,6 +230,10 @@ |
224 | } | 230 | } |
225 | }) | 231 | }) |
226 | }, | 232 | }, |
233 | /** | ||
234 | * @description: itemShowFalse | ||
235 | * @author: renchao | ||
236 | */ | ||
227 | itemShowFalse () { | 237 | itemShowFalse () { |
228 | this.tableData.forEach((item, index) => { | 238 | this.tableData.forEach((item, index) => { |
229 | item.codeShow = false | 239 | item.codeShow = false |
... | @@ -232,6 +242,12 @@ | ... | @@ -232,6 +242,12 @@ |
232 | item.normnameShow = false | 242 | item.normnameShow = false |
233 | }) | 243 | }) |
234 | }, | 244 | }, |
245 | /** | ||
246 | * @description: handleMinus | ||
247 | * @param {*} index | ||
248 | * @param {*} row | ||
249 | * @author: renchao | ||
250 | */ | ||
235 | handleMinus (index, row) { | 251 | handleMinus (index, row) { |
236 | this.$confirm('此操作将永久删除, 是否继续?', '提示', { | 252 | this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
237 | confirmButtonText: '确定', | 253 | confirmButtonText: '确定', |
... | @@ -250,6 +266,10 @@ | ... | @@ -250,6 +266,10 @@ |
250 | }) | 266 | }) |
251 | }) | 267 | }) |
252 | }, | 268 | }, |
269 | /** | ||
270 | * @description: handleSubmit | ||
271 | * @author: renchao | ||
272 | */ | ||
253 | handleSubmit () { | 273 | handleSubmit () { |
254 | this.$startLoading(); | 274 | this.$startLoading(); |
255 | editDictNode({ | 275 | editDictNode({ |
... | @@ -268,6 +288,11 @@ | ... | @@ -268,6 +288,11 @@ |
268 | }) | 288 | }) |
269 | }, | 289 | }, |
270 | // 增加下级 | 290 | // 增加下级 |
291 | /** | ||
292 | * @description: 增加下级 | ||
293 | * @param {*} row | ||
294 | * @author: renchao | ||
295 | */ | ||
271 | handleAddSubordinate (row) { | 296 | handleAddSubordinate (row) { |
272 | if (!row.children) { | 297 | if (!row.children) { |
273 | row.children = [] | 298 | row.children = [] |
... | @@ -287,6 +312,10 @@ | ... | @@ -287,6 +312,10 @@ |
287 | this.keyList.push(row.bsmDict) | 312 | this.keyList.push(row.bsmDict) |
288 | }, | 313 | }, |
289 | // 增加 | 314 | // 增加 |
315 | /** | ||
316 | * @description: 增加 | ||
317 | * @author: renchao | ||
318 | */ | ||
290 | handleAdd () { | 319 | handleAdd () { |
291 | this.$nextTick(() => { | 320 | this.$nextTick(() => { |
292 | let container = this.$el.querySelector('.el-table__body-wrapper'); | 321 | let container = this.$el.querySelector('.el-table__body-wrapper'); |
... | @@ -307,12 +336,24 @@ | ... | @@ -307,12 +336,24 @@ |
307 | this.key++ | 336 | this.key++ |
308 | }, | 337 | }, |
309 | // 上移下移 | 338 | // 上移下移 |
339 | /** | ||
340 | * @description: 上移下移 | ||
341 | * @param {*} index | ||
342 | * @param {*} row | ||
343 | * @author: renchao | ||
344 | */ | ||
310 | moveUpward (index, row) { | 345 | moveUpward (index, row) { |
311 | realMove(row.bsmDict, 'UP', this.tableData) | 346 | realMove(row.bsmDict, 'UP', this.tableData) |
312 | this.key++ | 347 | this.key++ |
313 | let id = findParents(this.tableData, row.bsmDict) | 348 | let id = findParents(this.tableData, row.bsmDict) |
314 | this.keyList = id | 349 | this.keyList = id |
315 | }, | 350 | }, |
351 | /** | ||
352 | * @description: moveDown | ||
353 | * @param {*} index | ||
354 | * @param {*} row | ||
355 | * @author: renchao | ||
356 | */ | ||
316 | moveDown (index, row) { | 357 | moveDown (index, row) { |
317 | realMove(row.bsmDict, 'DOWN', this.tableData) | 358 | realMove(row.bsmDict, 'DOWN', this.tableData) |
318 | this.key++ | 359 | this.key++ | ... | ... |
... | @@ -71,6 +71,10 @@ | ... | @@ -71,6 +71,10 @@ |
71 | }, | 71 | }, |
72 | methods: { | 72 | methods: { |
73 | // 初始化数据 | 73 | // 初始化数据 |
74 | /** | ||
75 | * @description: 初始化数据 | ||
76 | * @author: renchao | ||
77 | */ | ||
74 | queryClick () { | 78 | queryClick () { |
75 | this.$startLoading(); | 79 | this.$startLoading(); |
76 | getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => { | 80 | getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => { |
... | @@ -80,6 +84,10 @@ | ... | @@ -80,6 +84,10 @@ |
80 | this.tableData.total = total ? total : 0 | 84 | this.tableData.total = total ? total : 0 |
81 | }) | 85 | }) |
82 | }, | 86 | }, |
87 | /** | ||
88 | * @description: handleRefresh | ||
89 | * @author: renchao | ||
90 | */ | ||
83 | handleRefresh () { | 91 | handleRefresh () { |
84 | this.$confirm('是否确认刷新', '提示', { | 92 | this.$confirm('是否确认刷新', '提示', { |
85 | confirmButtonText: '确定', | 93 | confirmButtonText: '确定', |
... | @@ -107,6 +115,12 @@ | ... | @@ -107,6 +115,12 @@ |
107 | }); | 115 | }); |
108 | }, | 116 | }, |
109 | // 修改 | 117 | // 修改 |
118 | /** | ||
119 | * @description: 修改 | ||
120 | * @param {*} row | ||
121 | * @param {*} val | ||
122 | * @author: renchao | ||
123 | */ | ||
110 | editClick (row, val) { | 124 | editClick (row, val) { |
111 | this.details.rowData = row | 125 | this.details.rowData = row |
112 | this.details.isenable = val | 126 | this.details.isenable = val | ... | ... |
... | @@ -84,6 +84,10 @@ | ... | @@ -84,6 +84,10 @@ |
84 | }, | 84 | }, |
85 | methods: { | 85 | methods: { |
86 | //表单提交 | 86 | //表单提交 |
87 | /** | ||
88 | * @description: 表单提交 | ||
89 | * @author: renchao | ||
90 | */ | ||
87 | submitForm () { | 91 | submitForm () { |
88 | if (this.loadStatus == '1') { | 92 | if (this.loadStatus == '1') { |
89 | return this.$message.error("模板设计保存中,请等待...") | 93 | return this.$message.error("模板设计保存中,请等待...") |
... | @@ -101,6 +105,10 @@ | ... | @@ -101,6 +105,10 @@ |
101 | }); | 105 | }); |
102 | }, | 106 | }, |
103 | //新增 | 107 | //新增 |
108 | /** | ||
109 | * @description: 新增 | ||
110 | * @author: renchao | ||
111 | */ | ||
104 | addTemplate () { | 112 | addTemplate () { |
105 | addPrintTemplate(this.ruleForm).then(res => { | 113 | addPrintTemplate(this.ruleForm).then(res => { |
106 | if (res.code == 200) { | 114 | if (res.code == 200) { |
... | @@ -113,6 +121,10 @@ | ... | @@ -113,6 +121,10 @@ |
113 | }) | 121 | }) |
114 | }, | 122 | }, |
115 | //编辑 | 123 | //编辑 |
124 | /** | ||
125 | * @description: 编辑 | ||
126 | * @author: renchao | ||
127 | */ | ||
116 | editTemplate () { | 128 | editTemplate () { |
117 | editPrintTemplate(this.ruleForm).then(res => { | 129 | editPrintTemplate(this.ruleForm).then(res => { |
118 | if (res.code == 200) { | 130 | if (res.code == 200) { |
... | @@ -124,6 +136,10 @@ | ... | @@ -124,6 +136,10 @@ |
124 | } | 136 | } |
125 | }) | 137 | }) |
126 | }, | 138 | }, |
139 | /** | ||
140 | * @description: closeDialog | ||
141 | * @author: renchao | ||
142 | */ | ||
127 | closeDialog () { | 143 | closeDialog () { |
128 | this.$popupCacel() | 144 | this.$popupCacel() |
129 | this.ruleForm = { | 145 | this.ruleForm = { |
... | @@ -136,11 +152,20 @@ | ... | @@ -136,11 +152,20 @@ |
136 | this.loadStatus = '0' | 152 | this.loadStatus = '0' |
137 | this.editFlag = false; | 153 | this.editFlag = false; |
138 | }, | 154 | }, |
155 | /** | ||
156 | * @description: getDetailInfo | ||
157 | * @param {*} row | ||
158 | * @author: renchao | ||
159 | */ | ||
139 | getDetailInfo (item) { | 160 | getDetailInfo (item) { |
140 | this.ruleForm = item; | 161 | this.ruleForm = item; |
141 | this.editFlag = true; | 162 | this.editFlag = true; |
142 | }, | 163 | }, |
143 | //设计打印模板 | 164 | //设计打印模板 |
165 | /** | ||
166 | * @description: 设计打印模板 | ||
167 | * @author: renchao | ||
168 | */ | ||
144 | designByPRGData () { | 169 | designByPRGData () { |
145 | let that = this; | 170 | let that = this; |
146 | that.loadStatus = '1'; | 171 | that.loadStatus = '1'; | ... | ... |
... | @@ -63,6 +63,10 @@ | ... | @@ -63,6 +63,10 @@ |
63 | } | 63 | } |
64 | }, | 64 | }, |
65 | methods: { | 65 | methods: { |
66 | /** | ||
67 | * @description: fetchData | ||
68 | * @author: renchao | ||
69 | */ | ||
66 | fetchData () { | 70 | fetchData () { |
67 | selectPrintTemplateList({ ...this.pageData }).then(res => { | 71 | selectPrintTemplateList({ ...this.pageData }).then(res => { |
68 | if (res.code == 200) { | 72 | if (res.code == 200) { |
... | @@ -73,14 +77,28 @@ | ... | @@ -73,14 +77,28 @@ |
73 | }) | 77 | }) |
74 | }, | 78 | }, |
75 | //打开新增弹窗 | 79 | //打开新增弹窗 |
80 | /** | ||
81 | * @description: 打开新增弹窗 | ||
82 | * @author: renchao | ||
83 | */ | ||
76 | openAddDialog () { | 84 | openAddDialog () { |
77 | this.$popupDialog("新增打印模板", "system/dymbgl/components/editDialog", {}, "35%") | 85 | this.$popupDialog("新增打印模板", "system/dymbgl/components/editDialog", {}, "35%") |
78 | }, | 86 | }, |
79 | //打开编辑弹窗 | 87 | //打开编辑弹窗 |
88 | /** | ||
89 | * @description: 打开编辑弹窗 | ||
90 | * @param {*} item | ||
91 | * @author: renchao | ||
92 | */ | ||
80 | openEditDialog (item) { | 93 | openEditDialog (item) { |
81 | this.$popupDialog("编辑打印模板", "system/dymbgl/components/editDialog", item, "35%") | 94 | this.$popupDialog("编辑打印模板", "system/dymbgl/components/editDialog", item, "35%") |
82 | }, | 95 | }, |
83 | //删除数据 | 96 | //删除数据 |
97 | /** | ||
98 | * @description: 删除数据 | ||
99 | * @param {*} item | ||
100 | * @author: renchao | ||
101 | */ | ||
84 | removeTemplate (item) { | 102 | removeTemplate (item) { |
85 | this.$confirm("确定要删除吗, 是否继续?", "提示", { | 103 | this.$confirm("确定要删除吗, 是否继续?", "提示", { |
86 | confirmButtonText: "确定", | 104 | confirmButtonText: "确定", | ... | ... |
-
Please register or sign in to post a comment