Commit a7c18430 authored by 陈明豪's avatar 陈明豪

检查管理-平台权限

parent 2bec70f0
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item prop="checkType"> <el-form-item v-if="!isPlatRole" prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="检查类型" @change="checkTypeChange"> <el-select v-model="queryParams.checkType" clearable placeholder="检查类型" @change="checkTypeChange">
<el-option <el-option
v-for="item in checkTypeOptions" v-for="item in checkTypeOptions"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item v-if="!isPlatRole">
<el-select <el-select
v-model="queryParams.checkItemsId" v-model="queryParams.checkItemsId"
:disabled="queryParams.checkType === null || queryParams.checkType === ''" :disabled="queryParams.checkType === null || queryParams.checkType === ''"
...@@ -33,6 +33,20 @@ ...@@ -33,6 +33,20 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-else>
<el-select
v-model="queryParams.checkItemsId"
clearable
placeholder="检查项目"
>
<el-option
v-for="item in checkItemOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="queryParams.checkSchedule" clearable placeholder="检查状态"> <el-select v-model="queryParams.checkSchedule" clearable placeholder="检查状态">
<el-option <el-option
...@@ -121,7 +135,7 @@ ...@@ -121,7 +135,7 @@
> >
<el-table-column type="selection" min-width="47" align="center" :reserve-selection="true" /> <el-table-column type="selection" min-width="47" align="center" :reserve-selection="true" />
<el-table-column label="序号" type="index" align="left" /> <el-table-column label="序号" type="index" align="left" />
<el-table-column label="检查类型" align="left" prop="checkType" min-width="105"> <el-table-column v-if="!isPlatRole" label="检查类型" align="left" prop="checkType" min-width="105">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.check_type" :options="dict.type.check_type"
...@@ -134,8 +148,13 @@ ...@@ -134,8 +148,13 @@
<span>{{ scope.row.checkItemsName || '-' }}</span> <span>{{ scope.row.checkItemsName || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宠物昵称" align="left" :show-overflow-tooltip="true" prop="petNickname" /> <el-table-column v-if="isPlatRole" label="检查设备" align="left" :show-overflow-tooltip="true" prop="deviceName">
<el-table-column label="宠物保险" align="left" :show-overflow-tooltip="true" prop="insure"> <template slot-scope="scope">
<span>{{ scope.row.deviceName || '-' }}</span>
</template>
</el-table-column>
<el-table-column v-if="!isPlatRole" label="宠物昵称" align="left" :show-overflow-tooltip="true" prop="petNickname" />
<el-table-column v-if="!isPlatRole" label="宠物保险" align="left" :show-overflow-tooltip="true" prop="insure">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.pet_insure" :options="dict.type.pet_insure"
...@@ -143,15 +162,31 @@ ...@@ -143,15 +162,31 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宠主姓名" align="left" :show-overflow-tooltip="true" prop="nickname"> <el-table-column v-if="!isPlatRole" label="宠主姓名" align="left" :show-overflow-tooltip="true" prop="nickname">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.nickname || '-' }}</span> <span>{{ scope.row.nickname || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="联系方式" align="left" :show-overflow-tooltip="true" prop="phonenumber" min-width="100" /> <el-table-column v-if="!isPlatRole" label="联系方式" align="left" :show-overflow-tooltip="true" prop="phonenumber" min-width="100" />
<el-table-column label="预约兽医" align="left" :show-overflow-tooltip="true" prop="doctorName" /> <el-table-column label="预约兽医" align="left" :show-overflow-tooltip="true" prop="doctorName" />
<el-table-column label="所属科室" align="left" :show-overflow-tooltip="true" prop="doctorDeptName" /> <el-table-column v-if="!isPlatRole" label="所属科室" align="left" :show-overflow-tooltip="true" prop="doctorDeptName" />
<el-table-column label="缴费状态" align="left" :show-overflow-tooltip="true" prop="payType"> <el-table-column v-if="isPlatRole" label="所属医院" align="left" :show-overflow-tooltip="true" prop="hospitalName" />
<el-table-column v-if="isPlatRole" label="宠物昵称" align="left" :show-overflow-tooltip="true" prop="petNickname" />
<el-table-column v-if="isPlatRole" label="宠物保险" align="left" :show-overflow-tooltip="true" prop="insure">
<template slot-scope="scope">
<dict-tag
:options="dict.type.pet_insure"
:value="scope.row.insure"
/>
</template>
</el-table-column>
<el-table-column v-if="isPlatRole" label="宠主姓名" align="left" :show-overflow-tooltip="true" prop="nickname">
<template slot-scope="scope">
<span>{{ scope.row.nickname || '-' }}</span>
</template>
</el-table-column>
<el-table-column v-if="isPlatRole" label="联系方式" align="left" :show-overflow-tooltip="true" prop="phonenumber" min-width="100" />
<el-table-column v-if="!isPlatRole" label="缴费状态" align="left" :show-overflow-tooltip="true" prop="payType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.payment_status" :options="dict.type.payment_status"
...@@ -159,7 +194,7 @@ ...@@ -159,7 +194,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="预约状态" align="left" :show-overflow-tooltip="true" prop="checkSchedule"> <el-table-column v-if="!isPlatRole" label="预约状态" align="left" :show-overflow-tooltip="true" prop="checkSchedule">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-show="scope.row.checkSchedule < 2" style="color: #F56C6C">待预约</span> <span v-show="scope.row.checkSchedule < 2" style="color: #F56C6C">待预约</span>
<span v-show="scope.row.checkSchedule >= 2" style="color: #67C23A">已预约</span> <span v-show="scope.row.checkSchedule >= 2" style="color: #67C23A">已预约</span>
...@@ -195,6 +230,7 @@ ...@@ -195,6 +230,7 @@
>详情 >详情
</el-button> </el-button>
<el-button <el-button
v-if="!isPlatRole"
style="width: 80px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(255, 157, 78);color: #FF9D4E;background: rgba(255,157,78,0.08);" style="width: 80px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(255, 157, 78);color: #FF9D4E;background: rgba(255,157,78,0.08);"
size="mini" size="mini"
type="success" type="success"
...@@ -321,7 +357,7 @@ ...@@ -321,7 +357,7 @@
<script> <script>
import { getManage, delManage, addManage, updateManage, listCheckManage, selectCheckAll } from '@/api/business/manage' import { getManage, delManage, addManage, updateManage, listCheckManage, selectCheckAll } from '@/api/business/manage'
import { deviceUseInSubscribeList, listReservationDevice } from '@/api/business/device' import { deviceUseInSubscribeList, listReservationDevice } from '@/api/business/device'
import { listItemByType } from '@/api/business/item' import { listItemByType, listPlatformItem } from '@/api/business/item'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import { updateCheck } from '@/api/business/mdeicalRecord' import { updateCheck } from '@/api/business/mdeicalRecord'
...@@ -330,6 +366,7 @@ export default { ...@@ -330,6 +366,7 @@ export default {
dicts: ['exam_type', 'check_type', 'pet_insure', 'payment_status'], dicts: ['exam_type', 'check_type', 'pet_insure', 'payment_status'],
data() { data() {
return { return {
isPlatRole: false,
options: [], options: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
...@@ -436,15 +473,26 @@ export default { ...@@ -436,15 +473,26 @@ export default {
} }
}, },
created() { created() {
if (this.$store.state.user.userType !== '00') {
console.log('非平台权限')
this.getList()
} else {
console.log('平台权限')
this.getItemForPlat()
this.getList() this.getList()
this.loading = false
this.isPlatRole = true
}
}, },
methods: { methods: {
parseTime, parseTime,
/** 查询业务管理-检查管理列表 */ /** 查询业务管理-检查管理列表 */
getList() { getList() {
this.loading = true this.loading = true
console.log('检查状态', typeof this.queryParams.checkSchedule) // console.log('检查状态', typeof this.queryParams.checkSchedule)
console.log('检查筛选条件', this.queryParams)
listCheckManage(this.queryParams).then(response => { listCheckManage(this.queryParams).then(response => {
console.log('检查列表', response)
this.manageList = response.rows this.manageList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -528,9 +576,14 @@ export default { ...@@ -528,9 +576,14 @@ export default {
// 根据检查类型(医院自有服务、预约外部服务)查询检查项目 // 根据检查类型(医院自有服务、预约外部服务)查询检查项目
getItemByType(itemType) { getItemByType(itemType) {
listItemByType({ itemType: itemType }).then(res => { listItemByType({ itemType: itemType }).then(res => {
console.log('检查项目', res) console.log('检查项目下拉框数据', res.rows)
this.checkItemOptions = res.rows
})
},
getItemForPlat() {
listPlatformItem({ itemType: '2' }).then(res => {
console.log('检查项目下拉框数据', res.rows)
this.checkItemOptions = res.rows this.checkItemOptions = res.rows
console.log('xdddd', this.checkItemOptions)
}) })
}, },
/** 获取所有设备用于设备下拉 */ /** 获取所有设备用于设备下拉 */
......
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