Commit bcc347c3 authored by 小费同学阿's avatar 小费同学阿 💬

Merge remote-tracking branch 'origin/master'

parents 1c55f378 60b69957
import request from '@/utils/request'
// 查询宠物宠主信息
export function getPetInfo(query) {
return request({
url: '/business/register/getPetInfo',
method: 'get',
params: query
})
}
// 获取当日值班医生列表
export function getDoctorInfo(query) {
return request({
url: '/business/register/getDoctorInfo',
method: 'get',
params: query
})
}
// 根据手机号判断宠主是否存在,不存在新增宠主
export function checkPetOwner(query) {
return request({
url: '/business/register/checkPetOwner',
method: 'get',
params: query
})
}
...@@ -119,12 +119,19 @@ export const constantRoutes = [ ...@@ -119,12 +119,19 @@ export const constantRoutes = [
meta: { title: '设备管理', icon: 'date' } meta: { title: '设备管理', icon: 'date' }
}, },
{ {
path: 'equipment-detail', path: 'equipment-detail/:id',
props: true, props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-detail'), component: () => import('@/views/equipment-management/equipment-management/equipment-detail'),
name: 'EquipmentDetail', name: 'EquipmentDetail',
meta: { title: '设备详情' } meta: { title: '设备详情' }
}, },
{
path: 'equipment-add',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-add'),
name: 'EquipmentAdd',
meta: { title: '设备新增' }
},
{ {
path: 'use-management', path: 'use-management',
props: true, props: true,
......
...@@ -59,10 +59,10 @@ ...@@ -59,10 +59,10 @@
@change="handleSort" @change="handleSort"
> >
<el-option <el-option
v-for="item in sortedList" v-for="index in sortedList"
:key="item.id" :key="index.id"
:label="item.sortedColumn" :label="index.sortedColumn"
:value="item" :value="index"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-row> <el-row>
<el-col :span="12" style="padding-bottom: 20px;"> <el-col :span="12" style="padding-bottom: 20px;">
<el-button <el-button
v-hasPermi="['business:device:add']" v-hasPermi="['system:device:add']"
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
...@@ -85,18 +85,18 @@ ...@@ -85,18 +85,18 @@
<el-button <el-button
icon="el-icon-top-right" icon="el-icon-top-right"
class="fourWordsBtn" class="fourWordsBtn"
@click="reverseSelect(userList)" @click="reverseSelect(deviceList)"
>反向选择 >反向选择
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:import']" v-hasPermi="['system:device:import']"
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-bottom-left" icon="el-icon-bottom-left"
@click="handleImport" @click="handleImport"
>批量导入 >批量导入
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:export']" v-hasPermi="['system:device:export']"
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-top-right" icon="el-icon-top-right"
@click="handleExport" @click="handleExport"
...@@ -128,13 +128,22 @@ ...@@ -128,13 +128,22 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="服务地点" align="center" prop="reservationMethod" show-overflow-tooltip /> <el-table-column label="服务地点" align="center" prop="reservationMethod" show-overflow-tooltip />
<el-table-column v-if="userType=== '3'" label="服务价格" align="center" prop="servicePrice" /> <el-table-column v-if="userType=== '3'" label="服务价格" align="center" prop="orderPrice">
<template slot-scope="scope">
<span>{{ scope.row.orderPrice || "-" }}</span>
</template>
</el-table-column>
<el-table-column label="设备服务费" align="center" prop="servicePrice"> <el-table-column label="设备服务费" align="center" prop="servicePrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.servicePrice || "-" }}</span> <span>{{ scope.row.servicePrice || "-" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="creatTime" show-overflow-tooltip /> <el-table-column label="创建时间" align="center" prop="createTime" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ replace(scope.row.createTime) || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -146,22 +155,23 @@ ...@@ -146,22 +155,23 @@
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['system:person:edit']" v-hasPermi="['system:device:edit']"
size="mini" size="mini"
type="success" type="success"
icon="el-icon-document" icon="el-icon-document"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(123, 213, 102);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(123, 213, 102);"
plain plain
@click="detailsDevice(scope.row.deviceId)" @click="detailsDevice(scope.row.id)"
>详情 >详情
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['system:device:edit']"
plain plain
size="mini" size="mini"
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52, 144, 206);color: #3490CE;background: rgba(52,144,206,0.1);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52, 144, 206);color: #3490CE;background: rgba(52,144,206,0.1);"
@click="editDevice(scope.row.deviceId)" @click="editDevice(scope.row.id)"
>编辑 >编辑
</el-button> </el-button>
</template> </template>
...@@ -322,12 +332,14 @@ ...@@ -322,12 +332,14 @@
<script> <script>
import { regionData, CodeToText } from 'element-china-area-data' import { regionData, CodeToText } from 'element-china-area-data'
import { listDevice, getDevice, delDevice, addDevice } from '@/api/business/device' import { listDevice, getDevice, delDevice } from '@/api/business/device'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
import { parseTime } from '@/utils/ruoyi'
export default { export default {
name: 'EquipmentManagement', name: 'EquipmentManagement',
dicts: ['device_status', 'device_type', 'exam_type'], dicts: ['device_status', 'device_type', 'exam_type'],
data() { data() {
return { return {
// 支持检查类型 // 支持检查类型
...@@ -398,6 +410,8 @@ export default { ...@@ -398,6 +410,8 @@ export default {
citys: regionData, citys: regionData,
// 遮罩层 // 遮罩层
loading: false, loading: false,
// 用户类型
userType: '',
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
...@@ -443,9 +457,17 @@ export default { ...@@ -443,9 +457,17 @@ export default {
serviceArea: [], serviceArea: [],
// 表单参数 // 表单参数
form: { form: {
useTime: [], deviceName: '',
appointmentMethod: '', useTime: '',
serviceArea: '' // appointmentMethod: '',
serviceArea: '',
head: '',
phone: '',
deviceType: '',
reservationMethod: '',
status: '',
remark: ''
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -519,6 +541,10 @@ export default { ...@@ -519,6 +541,10 @@ export default {
} }
}) })
}, },
// 日期格式化
replace(time) {
return parseTime(time, '{y}/{m}/{d}')
},
showStatus(date) { showStatus(date) {
if (date === null) { if (date === null) {
return null return null
...@@ -530,26 +556,7 @@ export default { ...@@ -530,26 +556,7 @@ export default {
return '• 已报废' return '• 已报废'
} }
}, },
/** 跳转到编辑页*/
editDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
id: id,
identify: '1'
}
})
},
/** 跳转到详情页*/
detailsDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
id: id,
identify: '2'
}
})
},
// 选择排序规则 // 选择排序规则
handleSort(val) { handleSort(val) {
this.sortedColumn = val.sortedColumn this.sortedColumn = val.sortedColumn
...@@ -568,14 +575,20 @@ export default { ...@@ -568,14 +575,20 @@ export default {
} }
this.form.serviceArea = codeArray.join(';') this.form.serviceArea = codeArray.join(';')
}, },
/** 导入按钮操作 */
handleImport() {
this.upload.title = '用户导入'
this.upload.open = true
},
/** 查询设备列表 */ /** 查询设备列表 */
getList() { getList() {
this.loading = true this.loading = true
listDevice(this.queryParams).then(response => { listDevice(this.queryParams).then(response => {
this.deviceList = response.rows this.deviceList = response.rows
this.deviceList.forEach(item => { console.log('this.deviceList', this.deviceList)
this.$set(item, 'checkTypeArr', item.checkType.split(',')) // this.deviceList.forEach(item => {
}) // this.$set(item, 'checkTypeArr', item.checkType.split(','))
// })
console.log('deviceList', this.deviceList) console.log('deviceList', this.deviceList)
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -645,11 +658,31 @@ export default { ...@@ -645,11 +658,31 @@ export default {
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 跳转到编辑页*/
editDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
identify: '1',
id: id
}
})
},
/** 跳转到详情页*/
detailsDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
identify: '2',
id: id
}
})
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.$router.push({
this.open = true name: 'EquipmentAdd'
this.title = '添加设备' })
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -667,23 +700,51 @@ export default { ...@@ -667,23 +700,51 @@ export default {
} }
}) })
}, },
/** 提交按钮 */ // 全部选择
submitForm() { selectAll() {
if (this.form.checkType != null && this.form.checkType !== '') { this.$refs.table.toggleAllSelection()
this.form.checkType = this.form.checkType.toString() },
} // 反向选择
this.form.useTime = JSON.stringify(this.useTime) reverseSelect(rows) {
this.$refs['form'].validate(valid => { rows.forEach(row => {
if (valid) { this.$refs.table.toggleRowSelection(row)
console.log(this.form)
addDevice(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}) })
}, },
// /**
// * 全部选择
// * @param selection 已选择内容
// * @param all 是否永远进行全选操作
// */
// async selectAll(selection = [], all = true) {
// if (this.veterinarianList.length !== selection.length && !all) {
// this.effectTableSelect([])
// } else {
// await this.changeTableSelect()
// }
// },
// // 反向选择
// reverseSelect(rows) {
// rows.forEach(row => {
// this.$refs.table.toggleRowSelection(row)
// })
// },
// /** 提交按钮 */
// submitForm() {
// if (this.form.checkType != null && this.form.checkType !== '') {
// this.form.checkType = this.form.checkType.toString()
// }
// this.form.useTime = JSON.stringify(this.useTime)
// this.$refs['form'].validate(valid => {
// if (valid) {
// console.log(this.form)
// addDevice(this.form).then(response => {
// this.$modal.msgSuccess('新增成功')
// this.open = false
// this.getList()
// })
// }
// })
// },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
console.log(row) console.log(row)
...@@ -699,7 +760,7 @@ export default { ...@@ -699,7 +760,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/device/export', { this.download('system/device/export', {
...this.queryParams ...this.queryParams
}, `device_${new Date().getTime()}.xlsx`) }, `device_${new Date().getTime()}.xlsx`)
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="title">项目{{ convertToChineseNumeral( index + 1) }}</div> <div class="title">项目{{ convertToChineseNumeral( index + 1) }}</div>
<div> <div>
<el-button <el-button
v-show="(!item.id) || (item.status === '1')" v-show="(!item.id) || (item.id && item.status === '0' && item.isDelete === '0')"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
class="delBtn" class="delBtn"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
label="项目名称:" label="项目名称:"
:prop="'settingList.'+index+'.name'" :prop="'settingList.'+index+'.name'"
:rules="[ :rules="[
{ required: true, message: '请选择班次名称', trigger: 'blur' } { required: true, message: '请输入项目名称', trigger: 'blur' }
]" ]"
> >
<el-input <el-input
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
label="项目单价:" label="项目单价:"
:prop="'settingList.'+index+'.price'" :prop="'settingList.'+index+'.price'"
:rules="[ :rules="[
{ required: true, message: '请选择项目单价', trigger: 'change' } { required: true, message: '请输入项目单价', trigger: 'change' }
]" ]"
> >
<el-input-number <el-input-number
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
</el-form> </el-form>
<div> <div>
<el-button class="fourWordsBtn" type="primary" size="mini" @click="handleAddItem">新增项目</el-button> <el-button class="fourWordsBtn" type="primary" size="mini" @click="handleAddItem">新增项目</el-button>
<el-button class="queryBtn" type="primary" size="mini" @click="handleSubmit">提交</el-button> <el-button v-loading.fullscreen.lock="fullscreenLoading" class="queryBtn" type="primary" size="mini" @click="handleSubmit">提交</el-button>
<el-button class="resetBtn" size="mini" @click="handleGoBack">返回</el-button> <el-button class="resetBtn" size="mini" @click="handleGoBack">返回</el-button>
</div> </div>
</div> </div>
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
<script> <script>
import { listItem, updateItem } from '@/api/business/item' import { delItem, listItem, updateItem } from '@/api/business/item'
export default { export default {
name: 'CheckItem', name: 'CheckItem',
...@@ -204,7 +204,8 @@ export default { ...@@ -204,7 +204,8 @@ export default {
supportInsure: '', supportInsure: '',
sort: '', sort: '',
status: '1', status: '1',
content: '' content: '',
itemType: '0' // 用于判断是检查的项目
} }
] ]
}, },
...@@ -219,7 +220,8 @@ export default { ...@@ -219,7 +220,8 @@ export default {
insuranceOptions: [ insuranceOptions: [
{ value: '1', label: '是' }, { value: '1', label: '是' },
{ value: '0', label: '否' } { value: '0', label: '否' }
] ],
fullscreenLoading: false
} }
}, },
created() { created() {
...@@ -241,7 +243,8 @@ export default { ...@@ -241,7 +243,8 @@ export default {
supportInsure: '', supportInsure: '',
sort: '', sort: '',
status: '1', status: '1',
content: '' content: '',
itemType: '0'
}] }]
} }
} }
...@@ -294,7 +297,7 @@ export default { ...@@ -294,7 +297,7 @@ export default {
confirmButtonClass: 'queryBtn' confirmButtonClass: 'queryBtn'
}).then(function() { }).then(function() {
console.log('item.id', item.id) console.log('item.id', item.id)
return updateItem({ id: item.id, delFlag: '2' }) return delItem(item.id)
}).then(() => { }).then(() => {
this.getList() this.getList()
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
...@@ -323,7 +326,8 @@ export default { ...@@ -323,7 +326,8 @@ export default {
supportInsure: '', supportInsure: '',
sort: '', sort: '',
status: '1', status: '1',
content: '' content: '',
itemType: '0'
}) })
}, },
// 提交 // 提交
...@@ -331,6 +335,19 @@ export default { ...@@ -331,6 +335,19 @@ export default {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
console.log('成功通过....') console.log('成功通过....')
const addList = JSON.parse(JSON.stringify(this.form.settingList))
console.log('新增或者修改的集合', addList)
// 开始加loading遮罩, 防止操作
// this.fullscreenLoading = true
updateItem(addList).then(response => {
console.log('新增/修改--', response)
if (response.code === 200) {
this.getList()
// 解开遮罩层
this.$message.success('操作成功')
// this.fullscreenLoading = false
}
})
} }
}) })
}, },
...@@ -348,6 +365,7 @@ export default { ...@@ -348,6 +365,7 @@ export default {
.app-container { .app-container {
background-color: #FFFFFF; background-color: #FFFFFF;
padding: 40px 48px 50px 49px; padding: 40px 48px 50px 49px;
min-height: 850px;
.formTop{ .formTop{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
<template> <template>
<el-dialog class="pet-choose-modle" title="选择宠物" :visible.sync="isShow" width="50%" append-to-body> <el-dialog class="pet-choose-modle" title="选择宠物" :visible.sync="isShow" :before-close="closeModle" width="50%" append-to-body>
<el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small"> <el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
<div class="basicInformation"> <div class="basicInformation">
<div class="title">方式一:输入宠物ID查询</div> <div class="title">方式一:输入宠物ID查询</div>
</div> </div>
<el-form-item prop="petNickname" label="宠物ID:"> <el-form-item prop="petCode" label="宠物ID:">
<el-input <el-input
v-model="queryParams.petNickname" v-model="queryParams.petCode"
clearable clearable
placeholder="请输入宠物ID" placeholder="请输入宠物ID"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@blur="handleQuery"
/> />
</el-form-item> </el-form-item>
<div class="basicInformation"> <div class="basicInformation">
<div class="title">方式二:通过宠主查询</div> <div class="title">方式二:通过宠主查询</div>
</div> </div>
<el-form-item prop="petBreed" label="宠主姓名:"> <el-form-item prop="ownerName" label="宠主姓名:">
<el-input <el-input
v-model="queryParams.petBreed" v-model="queryParams.ownerName"
clearable clearable
placeholder="请输入宠物ID" placeholder="请输入宠主姓名"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@blur="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item prop="insureList" label="手机号:"> <el-form-item prop="phone" label="手机号:">
<el-input <el-input
v-model="queryParams.insure" v-model="queryParams.phone"
clearable clearable
placeholder="手机号" placeholder="手机号"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@blur="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -45,13 +48,12 @@ ...@@ -45,13 +48,12 @@
> >
<el-table-column align="center" min-width="30" reserve-selection type="selection" /> <el-table-column align="center" min-width="30" reserve-selection type="selection" />
<el-table-column align="center" label="序号" min-width="80" show-overflow-tooltip type="index" /> <el-table-column align="center" label="序号" min-width="80" show-overflow-tooltip type="index" />
<el-table-column align="center" label="宠主姓名" min-width="80" prop="petOwners.nickname" show-overflow-tooltip /> <el-table-column align="center" label="宠主姓名" min-width="80" prop="ownerName" show-overflow-tooltip />
<el-table-column align="center" label="手机号" min-width="80" prop="petOwners.nickname" show-overflow-tooltip /> <el-table-column align="center" label="手机号" min-width="80" prop="phone" show-overflow-tooltip />
<el-table-column align="center" label="会员等级" min-width="80" prop="petOwners.nickname" show-overflow-tooltip /> <el-table-column align="center" label="会员等级" min-width="80" prop="membershipLevel" show-overflow-tooltip />
<el-table-column align="center" label="会员卡余额" min-width="80" prop="petOwners.nickname" show-overflow-tooltip /> <el-table-column align="center" label="会员卡余额" min-width="80" prop="balance" show-overflow-tooltip />
<el-table-column align="center" label="宠物昵称" min-width="80" prop="petNickname" show-overflow-tooltip /> <el-table-column align="center" label="宠物昵称" min-width="80" prop="petNickname" show-overflow-tooltip />
<el-table-column <el-table-column
:formatter="(row, col, cell) => options[cell.substring(0, 1)].children.find(({value}) => value == Number(cell.substring(1))) && options[cell.substring(0, 1)].children.find(({value}) => value == Number(cell.substring(1))).label"
align="center" align="center"
label="宠物品种" label="宠物品种"
min-width="80" min-width="80"
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
</template> </template>
<script> <script>
import { listPets } from '@/api/business/pets' import { getPetInfo } from '@/api/business/registration'
import { deepClone } from '@/utils' import { deepClone } from '@/utils'
export default { export default {
name: 'ChoosePet', name: 'ChoosePet',
...@@ -93,8 +95,8 @@ export default { ...@@ -93,8 +95,8 @@ export default {
}, },
data() { data() {
return { return {
// 选中数 // 选中数
ids: [], chooseData: {},
// 总条数 // 总条数
total: 0, total: 0,
// 宠物表格数据 // 宠物表格数据
...@@ -104,25 +106,14 @@ export default { ...@@ -104,25 +106,14 @@ export default {
// 查询参数 // 查询参数
queryParams: { queryParams: {
// 导出列表 // 导出列表
idList: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
petNickname: null, petCode: '',
petAge: null, ownerName: '',
petSex: null, phone: '',
petBreed: [],
sterilizationStatus: null,
vaccineSituation: null,
petPicture: null,
petColor: null,
petWeight: null,
existState: null,
createTime: null,
petOwnersId: null,
params: { params: {
sort: null sort: null
}, }
createBy: null
}, },
options: [{ options: [{
value: '0', value: '0',
...@@ -145,7 +136,8 @@ export default { ...@@ -145,7 +136,8 @@ export default {
methods: { methods: {
/** 列表区--多选框选中数据 */ /** 列表区--多选框选中数据 */
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) console.log('selection', selection)
this.chooseData = selection[0]
}, },
cellClass(row) { cellClass(row) {
if (row.columnIndex === 0) { if (row.columnIndex === 0) {
...@@ -153,7 +145,8 @@ export default { ...@@ -153,7 +145,8 @@ export default {
} }
}, },
choosePet() { choosePet() {
console.log('1223') this.$emit('petChoose', this.chooseData)
this.$emit('petModleClose', false)
}, },
closeModle() { closeModle() {
this.$emit('petModleClose', false) this.$emit('petModleClose', false)
...@@ -186,19 +179,9 @@ export default { ...@@ -186,19 +179,9 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
this.queryParams.params = { ...this.queryParams.params } this.queryParams.params = { ...this.queryParams.params }
if (this.daterangeCreateTime != null && this.daterangeCreateTime !== '') {
this.queryParams.params['beginCreateTime'] = this.daterangeCreateTime[0]
this.queryParams.params['endCreateTime'] = this.daterangeCreateTime[1]
}
if (this.daterangeUpdateTime != null && this.daterangeUpdateTime !== '') {
this.queryParams.params['beginUpdateTime'] = this.daterangeUpdateTime[0]
this.queryParams.params['endUpdateTime'] = this.daterangeUpdateTime[1]
}
const queryParams = deepClone(this.queryParams) const queryParams = deepClone(this.queryParams)
queryParams.petSex = this.queryParams.petSex && this.queryParams.petSex.join(',') getPetInfo(queryParams).then(response => {
queryParams.petBreed = this.queryParams.petBreed && this.queryParams.petBreed.map(item => item.join('')).join(',') console.log('查询宠物宠主信息:', this.petsList)
listPets(queryParams).then(response => {
console.log('这里面是很多列表页宠物的信息:', this.petsList)
this.petsList = response.rows this.petsList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="tip-green" /> <div class="tip-green" />
<div <div
class="tip-content" class="tip-content"
>进度信息 >挂号信息
</div> </div>
</div> </div>
<!--进度内容--> <!--进度内容-->
...@@ -116,13 +116,13 @@ ...@@ -116,13 +116,13 @@
</el-button> </el-button>
</div> </div>
<div class="register" @click="registration(1)"> <div class="register" @click="registration(1,'usual')">
<div class="register-img"> <div class="register-img">
<el-image :src="require('@/assets/register/xinzengguahao_guahaohui@2x.png')" /> <el-image :src="require('@/assets/register/xinzengguahao_guahaohui@2x.png')" />
</div> </div>
<el-button type="text">挂号</el-button> <el-button type="text">挂号</el-button>
</div> </div>
<div class="add" @click="registration(1)"> <div class="add" @click="registration(1, 'add')">
<div class="add-img"> <div class="add-img">
<el-image :src="require('@/assets/register/xinzengguahao_jiahao@2x.png')" /> <el-image :src="require('@/assets/register/xinzengguahao_jiahao@2x.png')" />
</div> </div>
...@@ -136,14 +136,31 @@ ...@@ -136,14 +136,31 @@
</template> </template>
<script> <script>
import { getDoctorInfo } from '@/api/business/registration'
export default { export default {
name: 'DoctorCard', name: 'DoctorCard',
data() {
return {
}
},
mounted() {
this.getDoctorList()
},
methods: { methods: {
/** 获取当日值班医生列表*/
getDoctorList() {
getDoctorInfo().then(response => {
console.log('获取当日值班医生列表:', response)
})
},
/** 显示医生详情弹窗*/
doctorDetail(id) { doctorDetail(id) {
this.$emit('doctorDetail', id) this.$emit('doctorDetail', id)
}, },
registration(id) { /** 显示挂号/加号弹窗*/
this.$emit('registration', id) registration(id, type) {
this.$emit('registration', { id, type })
} }
} }
} }
......
<template> <template>
<el-dialog class="doctor-detail-modle" title="详情" :visible.sync="isShow" width="50%" append-to-body> <el-dialog class="doctor-detail-modle" title="详情" :visible.sync="isShow" :before-close="closeModle" width="50%" append-to-body>
<el-form ref="doctorForm" :model="doctorForm" label-width="100px" size="small"> <el-form ref="doctorForm" :model="doctorForm" label-width="100px" size="small">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
......
<template> <template>
<el-dialog class="register-modle" :title="title" :visible.sync="isShow" width="50%" append-to-body> <el-dialog class="register-modle" :title="registrationType === 'usual' ? '挂号' : '加号'" :visible.sync="isShow" width="50%" :before-close="closeModle" append-to-body>
<el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small"> <el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
<el-form-item prop="petNickname" label="主治兽医:"> <el-form-item prop="petNickname" label="主治兽医:">
<el-input <el-input
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
@pagination="getList" @pagination="getList"
/> />
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="choosePet">确 定</el-button> <el-button type="primary" @click="submit">确 定</el-button>
<el-button @click="closeModle">取 消</el-button> <el-button @click="closeModle">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -77,13 +77,17 @@ import { listPets } from '@/api/business/pets' ...@@ -77,13 +77,17 @@ import { listPets } from '@/api/business/pets'
export default { export default {
name: 'RegisterModle', name: 'RegisterModle',
props: { props: {
title: {
type: String,
default: '挂号'
},
isShow: { isShow: {
type: Boolean, type: Boolean,
default: false default: false
},
registrationType: {
type: String,
defalut: 'usual'
},
doctorId: {
type: String,
defalut: ''
} }
}, },
data() { data() {
...@@ -110,6 +114,11 @@ export default { ...@@ -110,6 +114,11 @@ export default {
} }
}, },
methods: { methods: {
submit() {},
/** 关闭弹窗*/
closeModle() {
this.$emit('registerModleClose', false)
},
/** 列表区--多选框选中数据 */ /** 列表区--多选框选中数据 */
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
......
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