style:申请业务规则配置
Showing
3 changed files
with
61 additions
and
22 deletions
... | @@ -197,7 +197,22 @@ export default { | ... | @@ -197,7 +197,22 @@ export default { |
197 | } | 197 | } |
198 | }, | 198 | }, |
199 | handleMinus (index, row) { | 199 | handleMinus (index, row) { |
200 | this.tableData.splice(index, 1) | 200 | this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
201 | confirmButtonText: '确定', | ||
202 | cancelButtonText: '取消', | ||
203 | type: 'warning' | ||
204 | }).then(() => { | ||
205 | this.tableData.splice(index, 1) | ||
206 | this.$message({ | ||
207 | type: 'success', | ||
208 | message: '删除成功!' | ||
209 | }); | ||
210 | }).catch(() => { | ||
211 | this.$message({ | ||
212 | type: 'info', | ||
213 | message: '已取消删除' | ||
214 | }); | ||
215 | }); | ||
201 | }, | 216 | }, |
202 | // 上移下移 | 217 | // 上移下移 |
203 | moveUpward (index, row) { | 218 | moveUpward (index, row) { |
... | @@ -210,4 +225,5 @@ export default { | ... | @@ -210,4 +225,5 @@ export default { |
210 | } | 225 | } |
211 | </script> | 226 | </script> |
212 | <style scoped lang='scss'> | 227 | <style scoped lang='scss'> |
228 | |||
213 | </style> | 229 | </style> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -208,7 +208,7 @@ export default { | ... | @@ -208,7 +208,7 @@ export default { |
208 | }) | 208 | }) |
209 | }, | 209 | }, |
210 | itemShowFalse () { | 210 | itemShowFalse () { |
211 | this.tableData.forEach((item, index) => { | 211 | this.tableData.length > 0 && this.tableData.forEach((item, index) => { |
212 | item.nodecodeShow = true | 212 | item.nodecodeShow = true |
213 | item.nodenameShow = false | 213 | item.nodenameShow = false |
214 | item.djyyShow = false | 214 | item.djyyShow = false |
... | @@ -219,29 +219,54 @@ export default { | ... | @@ -219,29 +219,54 @@ export default { |
219 | let container = this.$el.querySelector('.el-table__body-wrapper'); | 219 | let container = this.$el.querySelector('.el-table__body-wrapper'); |
220 | container.scrollTop = container.scrollHeight; | 220 | container.scrollTop = container.scrollHeight; |
221 | }) | 221 | }) |
222 | let code = this.tableData.slice(-1)[0].nodecode | 222 | if (this.djqx.length > 0) { |
223 | let codeQ = code.slice(0, 6) | 223 | let code = this.tableData.slice(-1)[0].nodecode |
224 | let len = '' | 224 | let codeQ = code.slice(0, 6) |
225 | if (this.tableData.length + 1 < 9) { | 225 | let len = '' |
226 | len = 0 + String(this.tableData.length + 1) | 226 | if (this.tableData.length + 1 < 9) { |
227 | len = 0 + String(this.tableData.length + 1) | ||
228 | } else { | ||
229 | len = this.tableData.length + 1 | ||
230 | } | ||
231 | this.tableData.push( | ||
232 | { | ||
233 | nodecode: codeQ + len, | ||
234 | nodename: '', | ||
235 | enabled: '1', | ||
236 | djyy: '', | ||
237 | sfqydjyymb: '0' | ||
238 | } | ||
239 | ) | ||
227 | } else { | 240 | } else { |
228 | len = this.tableData.length + 1 | 241 | this.tableData.push( |
242 | { | ||
243 | nodename: '', | ||
244 | enabled: '1', | ||
245 | djyy: '', | ||
246 | sfqydjyymb: '0' | ||
247 | } | ||
248 | ) | ||
229 | } | 249 | } |
230 | |||
231 | this.tableData.push( | ||
232 | { | ||
233 | nodecode: codeQ + len, | ||
234 | nodename: '', | ||
235 | enabled: '1', | ||
236 | djyy: '', | ||
237 | sfqydjyymb: '0' | ||
238 | } | ||
239 | ) | ||
240 | this.addIndexes() | 250 | this.addIndexes() |
241 | this.key++ | 251 | this.key++ |
242 | }, | 252 | }, |
243 | handleMinus (index, row) { | 253 | handleMinus (index, row) { |
244 | this.tableData.splice(index, 1) | 254 | this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
255 | confirmButtonText: '确定', | ||
256 | cancelButtonText: '取消', | ||
257 | type: 'warning' | ||
258 | }).then(() => { | ||
259 | this.tableData.splice(index, 1) | ||
260 | this.$message({ | ||
261 | type: 'success', | ||
262 | message: '删除成功!' | ||
263 | }); | ||
264 | }).catch(() => { | ||
265 | this.$message({ | ||
266 | type: 'info', | ||
267 | message: '已取消删除' | ||
268 | }); | ||
269 | }); | ||
245 | }, | 270 | }, |
246 | nodecodeBlur (index, row) { | 271 | nodecodeBlur (index, row) { |
247 | let list = _.cloneDeep(this.tableData).filter(item => item.bsmSqyw != row.bsmSqyw) | 272 | let list = _.cloneDeep(this.tableData).filter(item => item.bsmSqyw != row.bsmSqyw) |
... | @@ -257,12 +282,10 @@ export default { | ... | @@ -257,12 +282,10 @@ export default { |
257 | moveUpward (index, row) { | 282 | moveUpward (index, row) { |
258 | upward(index, this.tableData) | 283 | upward(index, this.tableData) |
259 | this.key++ | 284 | this.key++ |
260 | console.log(this.tableData); | ||
261 | }, | 285 | }, |
262 | moveDown (index, row) { | 286 | moveDown (index, row) { |
263 | down(index, this.tableData) | 287 | down(index, this.tableData) |
264 | this.key++ | 288 | this.key++ |
265 | console.log(this.tableData); | ||
266 | } | 289 | } |
267 | } | 290 | } |
268 | } | 291 | } | ... | ... |
-
Please register or sign in to post a comment