| | |
| | | }; |
| | | }, |
| | | watch: { |
| | | // defaultTaskType: { |
| | | // handler(n) { |
| | | // this.query = {} |
| | | // this.query['type'] = n |
| | | // let params = { |
| | | // type: n |
| | | // } |
| | | // this.page.currentPage = 1; |
| | | // this.onLoad(this.page, params); |
| | | // }, |
| | | // immediate: true, |
| | | // } |
| | | defaultTaskType: { |
| | | handler(n) { |
| | | this.query = {} |
| | | this.query['type'] = n |
| | | let params = { |
| | | type: n |
| | | } |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | |
| | | visible: true, |
| | | title: '添加', |
| | | isEdit: false, |
| | | type: this.defaultTaskType, |
| | | addForm: {} |
| | | } |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | console.log(row); |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | visible: true, |
| | | title: '编辑', |
| | | isEdit: true, |
| | | type: this.defaultTaskType, |
| | | addForm: { |
| | | ...row |
| | | } |
| | |
| | | ...params, |
| | | taskName_like: taskName, |
| | | }; |
| | | console.log(values); |
| | | |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |