|
@@ -3,9 +3,55 @@
|
|
|
<div class="box_wrapper">
|
|
|
<div class="title">门诊病历搜索</div>
|
|
|
<!-- 搜索部分 -->
|
|
|
- <el-form ref="form" :model="form" class="search_wrapper">
|
|
|
- <el-form-item label="" style="textAlign: center;">
|
|
|
- <el-input v-model="form.keyword" placeholder="请输入关键词" clearable style="width: 480px;"></el-input>
|
|
|
+ <el-form ref="form" :model="form" class="search_wrapper" label-width="100px">
|
|
|
+ <el-form-item label="" v-for="(item, index) of form.field" :key="index">
|
|
|
+ <!-- 关系 -->
|
|
|
+ <el-select
|
|
|
+ v-if="index != 0"
|
|
|
+ v-model="item.select_type"
|
|
|
+ filterable
|
|
|
+ placeholder=""
|
|
|
+ :disabled="item.lock"
|
|
|
+ style="width: 90px; position: absolute; left: -100px;"
|
|
|
+ >
|
|
|
+ <el-option label="且" :value="0" />
|
|
|
+ <el-option label="或者" :value="1" />
|
|
|
+ <el-option label="不包含" :value="2" />
|
|
|
+ </el-select>
|
|
|
+ <!-- 检索字段 -->
|
|
|
+ <el-select
|
|
|
+ v-model="item.key"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ :disabled="item.lock"
|
|
|
+ style="margin-right: 10px; width: 237px;"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(fitem, findex) in fieldList"
|
|
|
+ :key="findex"
|
|
|
+ :label="fitem.name"
|
|
|
+ :value="fitem.key"
|
|
|
+ :disabled="item.lock"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <!-- 检索内容 -->
|
|
|
+ <el-input v-model="item.value" :disabled="item.lock" placeholder="请输入" style="width: 237px;" />
|
|
|
+ <span class="btn-group" :class="{'btn-group1': form.field.length !== 1 && index == form.field.length - 1, 'btn-group2': index != form.field.length - 1 && searchNum, 'btn-group3': index == form.field.length - 1 && searchNum }">
|
|
|
+ <el-button
|
|
|
+ v-if="index != 0 && !item.lock"
|
|
|
+ :disabled="form.field.length == 1"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-minus"
|
|
|
+ @click="funDel(index)"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ v-if="index == form.field.length - 1"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="funAdd"
|
|
|
+ />
|
|
|
+ <el-button v-if="index === form.field.length - 1 && searchNum" @click="onLockResult">结果中检索</el-button>
|
|
|
+ </span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="患者年龄">
|
|
|
<el-input-number
|
|
@@ -48,7 +94,7 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="" style="text-align: center;">
|
|
|
- <el-button type="primary" style="width: 360px;" @click="onSearch">检索</el-button>
|
|
|
+ <el-button type="primary" style="width: 360px;" @click="onSearch(0)">检索</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 列表部分 -->
|
|
@@ -147,12 +193,38 @@ import { dateFormat } from '@/utils/index'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ fieldList: [
|
|
|
+ {
|
|
|
+ key: 'xy',
|
|
|
+ name: '西药'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'mzh',
|
|
|
+ name: '门诊号'
|
|
|
+ },{
|
|
|
+ key: 'ks',
|
|
|
+ name: '科室'
|
|
|
+ },{
|
|
|
+ key: 'xb',
|
|
|
+ name: '性别'
|
|
|
+ },{
|
|
|
+ key: 'xm',
|
|
|
+ name: '姓名'
|
|
|
+ },
|
|
|
+ ],
|
|
|
form: {
|
|
|
- keyword: '',
|
|
|
start_nl: undefined,
|
|
|
end_nl: undefined,
|
|
|
start_time: '',
|
|
|
- end_time: ''
|
|
|
+ end_time: '',
|
|
|
+ field: [
|
|
|
+ {
|
|
|
+ select_type: '',
|
|
|
+ key: '',
|
|
|
+ value: '',
|
|
|
+ lock: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
// 1:列表 0:详情
|
|
|
active: 1,
|
|
@@ -163,30 +235,34 @@ import { dateFormat } from '@/utils/index'
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
},
|
|
|
+ resultSearch: 0,
|
|
|
+ searchNum: 0
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList()
|
|
|
+ this.getList(0)
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取列表
|
|
|
- getList() {
|
|
|
+ getList(index) {
|
|
|
+ this.searchNum = index
|
|
|
const { currentPage, pageSize } = this.paginationData
|
|
|
- const { start_nl, end_nl, start_time, end_time, keyword } = this.form
|
|
|
+ const { start_nl, end_nl, start_time, end_time, field } = this.form
|
|
|
const params = {
|
|
|
- keyword,
|
|
|
start_nl,
|
|
|
end_nl,
|
|
|
start_time: start_time ? dateFormat(start_time, 'YYYYMMDD') : '',
|
|
|
end_time: end_time ? dateFormat(end_time, 'YYYYMMDD') : '',
|
|
|
page: currentPage,
|
|
|
- page_size: pageSize
|
|
|
+ page_size: pageSize,
|
|
|
+ }
|
|
|
+ if (field[0].key) {
|
|
|
+ params.field = field
|
|
|
}
|
|
|
-
|
|
|
this.$axios.post('/get_omr_bl01_list', params).then(res => {
|
|
|
- this.tableData = res.data.data.list
|
|
|
- this.infoData = res.data.data.detail
|
|
|
- this.paginationData.total = res.data.data.total
|
|
|
+ this.tableData = res.data.list
|
|
|
+ this.infoData = res.data.detail
|
|
|
+ this.paginationData.total = res.data.total
|
|
|
})
|
|
|
},
|
|
|
// 列表 详情
|
|
@@ -196,16 +272,44 @@ import { dateFormat } from '@/utils/index'
|
|
|
// 分页
|
|
|
SizeChangeEvent(val) {
|
|
|
this.paginationData.pageSize = val;
|
|
|
- this.getList();
|
|
|
+ this.getList(this.resultSearch);
|
|
|
},
|
|
|
pageHasChanged() {
|
|
|
- this.getList();
|
|
|
+ this.getList(this.resultSearch);
|
|
|
},
|
|
|
// 搜索
|
|
|
onSearch() {
|
|
|
this.paginationData.currentPage = 1;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
+ this.getList(1);
|
|
|
+ },
|
|
|
+ funDel(i) {
|
|
|
+ const index = i;
|
|
|
+ if (index == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const list = this.form.field;
|
|
|
+ list.splice(index, 1);
|
|
|
+ this.form.field = list;
|
|
|
+ },
|
|
|
+ funAdd() {
|
|
|
+ this.form.field.push({
|
|
|
+ key: '',
|
|
|
+ select_type: 0,
|
|
|
+ value: '',
|
|
|
+ lock: false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onLockResult() {
|
|
|
+ this.resultSearch = 1
|
|
|
+ this.form.field.map(item => {
|
|
|
+ if (!!item.key && !!item.value) {
|
|
|
+ item.lock = true
|
|
|
+ } else {
|
|
|
+ item.lock = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.funAdd()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -214,6 +318,19 @@ import { dateFormat } from '@/utils/index'
|
|
|
.pind5 {
|
|
|
padding: 0 5px;
|
|
|
}
|
|
|
+.btn-group {
|
|
|
+ position: absolute;
|
|
|
+ right: -78px;
|
|
|
+ &.btn-group1 {
|
|
|
+ right: -144px;
|
|
|
+ }
|
|
|
+ &.btn-group2 {
|
|
|
+ right: -78px;
|
|
|
+ }
|
|
|
+ &.btn-group3 {
|
|
|
+ right: -264px;
|
|
|
+ }
|
|
|
+}
|
|
|
.box {
|
|
|
padding: 16px;
|
|
|
.box_wrapper {
|
|
@@ -230,7 +347,7 @@ import { dateFormat } from '@/utils/index'
|
|
|
}
|
|
|
}
|
|
|
.search_wrapper {
|
|
|
- width: 616px;
|
|
|
+ width: 584px;
|
|
|
margin: 0 auto 30px;
|
|
|
}
|
|
|
.table_wrapper {
|