| | |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="useCrud" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @selection-change="selectChange" |
| | | @row-click="rowClickHandler" |
| | | @refresh-change="handleRefresh" |
| | |
| | | row, |
| | | this.$refs.useCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | |
| | | // 创建或编辑保存 |
| | | addSaveHandler() { |
| | | const saveFunction = this.dialogTitle === 'add' ? addSave : editSave; |
| | | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 导出 |