| | |
| | | :option="option1" |
| | | :data="data1" |
| | | :page.sync="page1" |
| | | :search.sync="search" |
| | | :table-loading="loading1" |
| | | @sort-change="sortChange" |
| | | @on-load="getPractitionersPageInfo(page1)" |
| | |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | query1: {}, |
| | | search:{}, |
| | | data1: [], |
| | | option1: { |
| | | addBtn: false, |
| | |
| | | // prop: "deptName", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | sort:true, |
| | | sortable:true, |
| | | dicUrl: dicUrl, |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | // hide: true, |
| | | // slot: true, |
| | | searchSpan: 5, |
| | | display: false, |
| | | search: search, |
| | | search: true, |
| | | minWidth: 220, |
| | | }, |
| | | { |
| | |
| | | methods: { |
| | | //排序 |
| | | sortChange(value) { |
| | | // console.log(value, 51151515); |
| | | if (value.order == "ascending") { |
| | | this.sort = "asc"; |
| | | } |
| | |
| | | } |
| | | this.sortName = value.prop; |
| | | //字段匹配 |
| | | if (value.prop == "sexs") { |
| | | this.sortName = "sex"; |
| | | if (value.prop == "deptId") { |
| | | this.sortName = "dept_id"; |
| | | } |
| | | if (value.prop == "examinationType") { |
| | | this.sortName = "examination_type"; |
| | | } |
| | | if (value.prop == "userType") { |
| | | this.sortName = "user_type"; |
| | | } |
| | | this.onLoad(this.page, this.query); |
| | | this.getPractitionersPageInfo(this.page1, this.query1); |
| | | }, |
| | | //清空按钮 |
| | | selectionClear() { |
| | | // this.selectionList = []; |
| | | this.sort = ""; |
| | | this.sortName = ""; |
| | | // this.$refs.crud.toggleSelection(); |
| | | }, |
| | | getPractitionersPageInfo(page, params = {}) { |
| | | params = this.search; |
| | | var that = this; |
| | | if (this.card.jurisdiction == 1372091709474910209) { |
| | | this.card.jurisdiction = ""; |
| | | params['jurisdiction'] = ""; |
| | | }else{ |
| | | params['jurisdiction'] = this.card.jurisdiction; |
| | | } |
| | | // if (params.hold == undefined) { |
| | | // params.hold = 1; |
| | | // } |
| | | if (this.sort) { |
| | | params["sort"] = this.sort; |
| | | } |
| | | if (this.sortName) { |
| | | params["sortName"] = this.sortName; |
| | | } |
| | | params['status'] = 1; |
| | | |
| | | params = { |
| | | ...params, |
| | | ...this.query1, |
| | | status: 1, |
| | | ...this.card, |
| | | }; |
| | | getList(page.currentPage, page.pageSize, params).then((res) => { |
| | | // console.log(res.data.data.records); |
| | | const data = res.data.data; |
| | | this.data1 = data.records; |
| | | this.page1.total = data.total; |
| | | this.loading1 = false; |
| | | that.selectionClear(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query1 = {}; |
| | | this.page1.currentPage = 1; |
| | | this.refreshChange(); |
| | | // console.log(212); |
| | | this.query = {}; |
| | | this.getPractitionersPageInfo(this.page1, this.query1); |
| | | }, |
| | | }, |
| | | }; |