Commit 1a60d927 authored by 盖献康's avatar 盖献康

检查管理-检查类型和检查项目联动

parent 69c4e3bc
......@@ -9,6 +9,15 @@ export function listItem(query) {
})
}
// 根据检查类型(医院自有服务、预约外部服务)查询检查项目
export function listItemByType(query) {
return request({
url: '/business/item/listByType',
method: 'get',
params: query
})
}
// 查询治疗/检查项目管理详细
export function getItem(id) {
return request({
......
......@@ -9,7 +9,7 @@
/>
</el-form-item>
<el-form-item prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="检查类型">
<el-select v-model="queryParams.checkType" clearable placeholder="检查类型" @change="checkTypeChange">
<el-option
v-for="item in checkTypeOptions"
:key="item.value"
......@@ -19,12 +19,12 @@
</el-select>
</el-form-item>
<el-form-item prop="checkName">
<el-select v-model="queryParams.checkName" clearable placeholder="检查项目">
<el-select v-model="queryParams.checkName" :disabled="queryParams.checkType === null || queryParams.checkType === ''" clearable placeholder="检查项目">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in checkItemOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
......@@ -212,7 +212,7 @@
class="fourWordsBtn"
size="mini"
@click="handleSubscribeDevice(scope.row)"
></el-button>
>立即预约</el-button>
</template>
</el-table-column>
</el-table>
......@@ -234,6 +234,7 @@
<script>
import { getManage, delManage, addManage, updateManage, listCheckManage } from '@/api/business/manage'
import { deviceUseInSubscribeList, listReservationDevice } from '@/api/business/device'
import { listItemByType } from '@/api/business/item'
export default {
name: 'MedicalRecordManagement',
......@@ -332,6 +333,8 @@ export default {
label: '预约外部服务'
}
],
// 检查项目下拉框
checkItemOptions: [],
// 设备下拉框
selectableDevice: []
}
......@@ -361,6 +364,28 @@ export default {
}
this.getDevice()
},
// 检查类型下拉框回调函数
checkTypeChange() {
var itemType = null
if (this.queryParams.checkType === '0') {
console.log('自有')
// eslint-disable-next-line no-unused-vars
itemType = '0'
} else if (this.queryParams.checkType === '2') {
console.log('外部')
// eslint-disable-next-line no-unused-vars
itemType = '2'
}
this.getItemByType(itemType)
},
// 根据检查类型(医院自有服务、预约外部服务)查询检查项目
getItemByType(itemType) {
listItemByType({ itemType: itemType }).then(res => {
console.log('检查项目', res)
this.checkItemOptions = res.rows
console.log('xdddd', this.checkItemOptions)
})
},
/** 获取所有设备用于设备下拉 */
getAllDevice() {
deviceUseInSubscribeList({ isPrivate: '1' }).then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment