|
@@ -186,7 +186,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="onClass == '0'" class="conter" style="border: none">
|
|
|
- <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange" @sort-change="handleSortChange">
|
|
|
<el-table-column type="index" :index="indexAdd" label="序号" width="70px" />
|
|
|
<el-table-column prop="AAA28" label="住院号码">
|
|
|
<template slot-scope="scope">
|
|
@@ -201,8 +201,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="AAA04" label="年龄" />
|
|
|
<el-table-column prop="AAC11N" label="出院科室" />
|
|
|
- <el-table-column prop="AAB01" label="入院时间" />
|
|
|
- <el-table-column prop="AAC01" label="出院时间" />
|
|
|
+ <el-table-column prop="AAB01" label="入院时间" sortable />
|
|
|
+ <el-table-column prop="AAC01" label="出院时间" sortable />
|
|
|
</el-table>
|
|
|
<!-- 分页控制 -->
|
|
|
</div>
|
|
@@ -492,7 +492,9 @@ export default {
|
|
|
departmentList: [],
|
|
|
lock: false,
|
|
|
searchNum: 0,
|
|
|
- professionSearchData: {}
|
|
|
+ professionSearchData: {},
|
|
|
+ // 排序
|
|
|
+ sort: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -516,6 +518,27 @@ export default {
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
+ // table 字段排序
|
|
|
+ handleSortChange(column) {
|
|
|
+ const { prop, order } = column;
|
|
|
+ let str = '';
|
|
|
+ if (order === 'descending') {
|
|
|
+ str = 'desc';
|
|
|
+ } else if (order === 'ascending') {
|
|
|
+ str = 'asc';
|
|
|
+ } else {
|
|
|
+ str = null;
|
|
|
+ }
|
|
|
+ this.$set(this.sort, 0, {field: prop, sort: str})
|
|
|
+ this.tableData = [];
|
|
|
+
|
|
|
+ if (this.choice == 2) {
|
|
|
+ this.handleProfessionSearch(this.professionSearchData)
|
|
|
+ } else {
|
|
|
+ this.funQuery(this.searchNum);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 普通下载
|
|
|
normalDownload(name) {
|
|
|
const params = {
|
|
|
keyword: this.formData0.input,
|
|
@@ -542,6 +565,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 高级搜索下载
|
|
|
highDownload(name) {
|
|
|
const pramse = {};
|
|
|
pramse.field = this.formData1.seniorList;
|
|
@@ -583,6 +607,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 结果中查询
|
|
|
onLockResult() {
|
|
|
this.lock = true;
|
|
|
this.formData1.seniorList.map(item => {
|
|
@@ -638,7 +663,6 @@ export default {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
SizeChangeEvent(val) {
|
|
|
- console.log(this.choice, 'this.choice', val)
|
|
|
this.paginationData.pageSize = val;
|
|
|
const num = this.lock ? 1 : 0;
|
|
|
if (this.choice == 2) {
|
|
@@ -693,6 +717,7 @@ export default {
|
|
|
const pramse = {
|
|
|
limit: this.paginationData.pageSize,
|
|
|
page: this.paginationData.currentPage, // 是当前页数 默认是0 。普通检索的参数是
|
|
|
+ sort: this.sort
|
|
|
};
|
|
|
let queryUrl = 'normalSearch';
|
|
|
if (this.choice == '0') {
|
|
@@ -779,7 +804,7 @@ export default {
|
|
|
handleProfessionSearch(params) {
|
|
|
this.professionSearchData = params
|
|
|
const { pageSize, currentPage } = this.paginationData
|
|
|
- this.$axios3.post('/bl/serach', {...params, page_size: pageSize, page: currentPage }).then(res => {
|
|
|
+ this.$axios3.post('/bl/serach', {...params, page_size: pageSize, page: currentPage, sort: this.sort }).then(res => {
|
|
|
this.tableData = res.data.list || [];
|
|
|
this.tableDataDetails = res.data.detail || [];
|
|
|
this.paginationData.total = res.data.total;
|