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

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

parent 69c4e3bc
...@@ -9,6 +9,15 @@ export function listItem(query) { ...@@ -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) { export function getItem(id) {
return request({ return request({
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item prop="checkType"> <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 <el-option
v-for="item in checkTypeOptions" v-for="item in checkTypeOptions"
:key="item.value" :key="item.value"
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="checkName"> <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 <el-option
v-for="item in options" v-for="item in checkItemOptions"
:key="item.value" :key="item.id"
:label="item.label" :label="item.name"
:value="item.value" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
class="fourWordsBtn" class="fourWordsBtn"
size="mini" size="mini"
@click="handleSubscribeDevice(scope.row)" @click="handleSubscribeDevice(scope.row)"
></el-button> >立即预约</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -234,6 +234,7 @@ ...@@ -234,6 +234,7 @@
<script> <script>
import { getManage, delManage, addManage, updateManage, listCheckManage } from '@/api/business/manage' import { getManage, delManage, addManage, updateManage, listCheckManage } from '@/api/business/manage'
import { deviceUseInSubscribeList, listReservationDevice } from '@/api/business/device' import { deviceUseInSubscribeList, listReservationDevice } from '@/api/business/device'
import { listItemByType } from '@/api/business/item'
export default { export default {
name: 'MedicalRecordManagement', name: 'MedicalRecordManagement',
...@@ -332,6 +333,8 @@ export default { ...@@ -332,6 +333,8 @@ export default {
label: '预约外部服务' label: '预约外部服务'
} }
], ],
// 检查项目下拉框
checkItemOptions: [],
// 设备下拉框 // 设备下拉框
selectableDevice: [] selectableDevice: []
} }
...@@ -361,6 +364,28 @@ export default { ...@@ -361,6 +364,28 @@ export default {
} }
this.getDevice() 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() { getAllDevice() {
deviceUseInSubscribeList({ isPrivate: '1' }).then(res => { 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