|
@@ -529,7 +529,12 @@ export default {
|
|
|
} else {
|
|
|
str = null;
|
|
|
}
|
|
|
- this.$set(this.sort, 0, {field: prop, sort: str})
|
|
|
+ if (str) {
|
|
|
+ this.$set(this.sort, 0, prop)
|
|
|
+ this.$set(this.sort, 1, str)
|
|
|
+ } else {
|
|
|
+ this.sort = []
|
|
|
+ }
|
|
|
this.tableData = [];
|
|
|
|
|
|
if (this.choice == 2) {
|
|
@@ -716,9 +721,11 @@ export default {
|
|
|
funQuery(num) {
|
|
|
const pramse = {
|
|
|
limit: this.paginationData.pageSize,
|
|
|
- page: this.paginationData.currentPage, // 是当前页数 默认是0 。普通检索的参数是
|
|
|
- sort: this.sort
|
|
|
+ page: this.paginationData.currentPage // 是当前页数 默认是0 。普通检索的参数是
|
|
|
};
|
|
|
+ if (this.sort.length) {
|
|
|
+ pramse.sort = this.sort
|
|
|
+ }
|
|
|
let queryUrl = 'normalSearch';
|
|
|
if (this.choice == '0') {
|
|
|
queryUrl = 'normalSearch';
|
|
@@ -804,7 +811,15 @@ export default {
|
|
|
handleProfessionSearch(params) {
|
|
|
this.professionSearchData = params
|
|
|
const { pageSize, currentPage } = this.paginationData
|
|
|
- this.$axios3.post('/bl/serach', {...params, page_size: pageSize, page: currentPage, sort: this.sort }).then(res => {
|
|
|
+ const queryData = {
|
|
|
+ ...params,
|
|
|
+ page_size: pageSize,
|
|
|
+ page: currentPage
|
|
|
+ }
|
|
|
+ if (this.sort.length) {
|
|
|
+ queryData.sort = this.sort
|
|
|
+ }
|
|
|
+ this.$axios3.post('/bl/serach', queryData).then(res => {
|
|
|
this.tableData = res.data.list || [];
|
|
|
this.tableDataDetails = res.data.detail || [];
|
|
|
this.paginationData.total = res.data.total;
|