| | |
| | | <template> |
| | | <div class="mod-role"> |
| | | <avue-crud |
| | | ref="crud" |
| | | :page.sync="page" |
| | | :data.sync="dataList" |
| | | :option="tableOption" |
| | | @search-change="searchChange" |
| | | @selection-change="selectionChange" |
| | | @on-load="getDataList" |
| | | > |
| | | <avue-crud ref="crud" :page.sync="page" :data.sync="dataList" :option="tableOption" @search-change="searchChange" |
| | | @selection-change="selectionChange" @on-load="getDataList"> |
| | | <!-- <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | </template> --> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-edit" |
| | | size="small" |
| | | @click.stop="addOrUpdateHandle(scope.row)" |
| | | >修改</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-edit" size="small" |
| | | @click.stop="addOrUpdateHandle(scope.row)">修改</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update |
| | | v-if="addOrUpdateVisible" |
| | | ref="addOrUpdate" |
| | | @refreshDataList="getDataList" |
| | | ></add-or-update> |
| | | <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | methods: { |
| | | // 获取数据列表 |
| | | getDataList(page, params, done) { |
| | | let obj = { |
| | | current: 1, |
| | | endTime: "", |
| | | rolename: "", |
| | | size: 10, |
| | | startTime: "", |
| | | userCode: "", |
| | | userId: "", |
| | | }; |
| | | console.log(params); |
| | | |
| | | this.dataListLoading = true; |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/address/list"), |
| | | method: "post", |
| | | data: this.$http.adornData({ |
| | | current: this.page.currentPage, |
| | | size: this.page.pageSize, |
| | | rolename: this.dataForm.rolename, |
| | | userCode: this.dataForm.userCode, |
| | | userId: this.dataForm.userId, |
| | | startTime: this.dataForm.startTime, |
| | | endTime: this.dataForm.endTime, |
| | | }), |
| | | // url: this.$http.adornUrl("/address/list"), |
| | | url: this.$http.adornUrl("/address/getUDList"), |
| | | method: "get", |
| | | params, |
| | | }).then(({ data }) => { |
| | | this.dataList = data.data; |
| | | this.dataList = data.data || []; |
| | | this.page.total = data.total; |
| | | this.dataListLoading = false; |
| | | if (done) { |
| | |
| | | var ids = id |
| | | ? [id] |
| | | : this.dataListSelections.map((item) => { |
| | | return item.roleId; |
| | | }); |
| | | return item.roleId; |
| | | }); |
| | | this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | }; |