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

Merge remote-tracking branch 'origin/master'

parents 4afa7aab 1b9c7bcf
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<el-tooltip :content="text" placement="top-start" :disabled="tipDisabled"> <el-tooltip :content="text" placement="top-start" :disabled="tipDisabled">
<el-input <el-input
v-model="text" v-model="text"
readonly="true" readonly
disabled="true" disabled
:style="{width: width}" :style="{width: width}"
@mouseover.native="inputOnMouseOver($event)" @mouseover.native="inputOnMouseOver($event)"
/> />
......
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
:auto-crop-height="autoCropHeight" :auto-crop-height="autoCropHeight"
:auto-crop="true" :auto-crop="true"
:fixed="false" :fixed="false"
:fixed-box="false" :fixed-box="true"
:output-size="1" :output-size="1"
output-type="png" output-type="png"
:centerBox="true"
:canScale="true"
/> />
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
......
...@@ -120,10 +120,10 @@ export const constantRoutes = [ ...@@ -120,10 +120,10 @@ export const constantRoutes = [
}, },
{ {
path: 'equipment-edit', path: 'equipment-detail',
props: true, props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-detail'), component: () => import('@/views/equipment-management/equipment-management/equipment-detail'),
name: 'EquipmentEdit', name: 'EquipmentDetail',
meta: { title: '设备详情' } meta: { title: '设备详情' }
}, },
{ {
......
...@@ -510,7 +510,14 @@ export default { ...@@ -510,7 +510,14 @@ export default {
}, },
handleSortChange(column) { handleSortChange(column) {
console.log('更换排序', column) console.log('更换排序', column)
this.queryParams.orderByColumn = column.prop// 查询字段是表格中字段名字 // 查询字段是表格中字段名字
if (column.prop.orderByColumn === 'hospitalName' ||
column.prop.orderByColumn === 'hospitalAddress' ||
column.prop.orderByColumn === 'contactPerson') {
this.queryParams.orderByColumn = column.prop + 'Sort'
} else {
this.queryParams.orderByColumn = column.prop
}
this.queryParams.isAsc = column.order// 动态取值排序顺序 this.queryParams.isAsc = column.order// 动态取值排序顺序
this.$refs.hospitalList.clearSort() this.$refs.hospitalList.clearSort()
this.getHospitalList() this.getHospitalList()
......
...@@ -127,17 +127,17 @@ ...@@ -127,17 +127,17 @@
<overlong-tool :text="(item.ownerId || '-') + ' (' + item.nickname + ')'" :max="30" /> <overlong-tool :text="(item.ownerId || '-') + ' (' + item.nickname + ')'" :max="30" />
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div class="progressWidth"> <div class="progressWidth">
<el-progress <el-progress
:percentage="item.money/petOwnerConsumeRank[0].money*100" :percentage="item.money/petOwnerConsumeRank[0].money*100"
:stroke-width="9" :stroke-width="9"
:show-text="false" :show-text="false"
class="consumeRankProgress" class="consumeRankProgress"
/> />
</div> </div>
<div class="consumeRankFont"> <div class="consumeRankFont">
{{ moneyFormat(item.money) }} {{ moneyFormat(item.money) }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -993,7 +993,11 @@ export default { ...@@ -993,7 +993,11 @@ export default {
}, },
handleSortChangeForPlatform(column) { handleSortChangeForPlatform(column) {
console.log('更换排序', column) console.log('更换排序', column)
this.queryOrder.orderByColumn = column.prop// 查询字段是表格中字段名字 if (column.prop === 'checkItemsName') {
this.queryOrder.orderByColumn = column.prop + 'sort' // 查询字段是表格中字段名字
} else {
this.queryOrder.orderByColumn = column.prop// 查询字段是表格中字段名字
}
this.queryOrder.isAsc = column.order// 动态取值排序顺序 this.queryOrder.isAsc = column.order// 动态取值排序顺序
this.$refs.orderTable.clearSort() this.$refs.orderTable.clearSort()
this.getOrderList() this.getOrderList()
......
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
</div> </div>
<el-form ref="form" :model="form" :rules="rules" :inline="true" label-width="auto"> <el-form ref="form" :model="form" :rules="rules" :inline="true" label-width="auto">
<div class="title-paragraph"> <div class="title-paragraph">
<div style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;">基本信息</div> <div
style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;"
>基本信息
</div>
</div> </div>
<!-- 1--> <!-- 1-->
<el-row> <el-row>
...@@ -77,26 +80,7 @@ ...@@ -77,26 +80,7 @@
<el-col :span="16"> <el-col :span="16">
<el-form-item label="服务地点"> <el-form-item label="服务地点">
<InputTips :text="form.selectedOptions" class="inputWidth" /> <InputTips :text="form.addressText" width="18.75rem" />
<!-- <el-cascader-->
<!-- ref="serviceArea"-->
<!-- v-model="form.selectedOptions"-->
<!-- size="large"-->
<!-- :options="areaOptions"-->
<!-- placeholder="-"-->
<!-- expand-trigger="hover"-->
<!-- clearable-->
<!-- class="overflow-hidden"-->
<!-- @change="handleChangeCascader"-->
<!-- @mouseover.native="showTooltip = true"-->
<!-- @mouseout.native="showTooltip = false"-->
<!-- >-->
<!-- <template #suffix>-->
<!-- <el-tooltip placement="top" content="这是提示内容" :disabled="!showTooltip" :offset="[0, 8]">-->
<!-- <i class="el-icon-question" />-->
<!-- </el-tooltip>-->
<!-- </template>-->
<!-- </el-cascader>-->
</el-form-item> </el-form-item>
<el-form-item prop="address"> <el-form-item prop="address">
<el-input <el-input
...@@ -121,7 +105,7 @@ ...@@ -121,7 +105,7 @@
controls-position="right" controls-position="right"
class="inputNumber_Width" class="inputNumber_Width"
/> />
<span class="text">{{ "次" }}</span> <span class="text">{{ '次' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -274,7 +258,7 @@ ...@@ -274,7 +258,7 @@
<el-col> <el-col>
<el-form-item label="支持服务地区"> <el-form-item label="支持服务地区">
<el-input <el-input
v-model.trim="form.serviceAreaText" v-model="form.serviceAreaText"
type="textarea" type="textarea"
class="remark_with" class="remark_with"
:row="4" :row="4"
...@@ -289,10 +273,9 @@ ...@@ -289,10 +273,9 @@
<el-col> <el-col>
<el-form-item label="支持检查项目"> <el-form-item label="支持检查项目">
<el-input <el-input
v-model.trim="form.checkTypeText" v-model="form.checkTypeText"
type="textarea" type="textarea"
class="remark_with" class="remark_with"
pacehpl
:row="4" :row="4"
placeholder="-" placeholder="-"
disabled disabled
...@@ -302,7 +285,10 @@ ...@@ -302,7 +285,10 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="title-paragraph"> <div class="title-paragraph">
<div style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;">使用信息</div> <div
style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;"
>使用信息
</div>
</div> </div>
<el-table :data="useList" :header-cell-style="{ background:'#F4F4F4'}" border> <el-table :data="useList" :header-cell-style="{ background:'#F4F4F4'}" border>
<el-table-column label="检查项目" align="center" prop="checkItemsName" show-overflow-tooltip /> <el-table-column label="检查项目" align="center" prop="checkItemsName" show-overflow-tooltip />
...@@ -317,7 +303,11 @@ ...@@ -317,7 +303,11 @@
<el-table-column label="检查时段" align="center" prop="deve" show-overflow-tooltip> <el-table-column label="检查时段" align="center" prop="deve" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.checkStartTime === null && scope.row.checkEndTime === null">{{ '-' }}</span> <span v-if="scope.row.checkStartTime === null && scope.row.checkEndTime === null">{{ '-' }}</span>
<span v-else>{{ parseTime(scope.row.checkStartTime, '{h}:{i}') + '~' + parseTime(scope.row.checkEndTime, '{h}:{i}') || '-' }}</span> <span
v-else
>{{
parseTime(scope.row.checkStartTime, '{h}:{i}') + '~' + parseTime(scope.row.checkEndTime, '{h}:{i}') || '-'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查状态" align="center" prop="payType" show-overflow-tooltip> <el-table-column label="检查状态" align="center" prop="payType" show-overflow-tooltip>
...@@ -345,13 +335,21 @@ ...@@ -345,13 +335,21 @@
</div> </div>
<el-form ref="form" :model="form" :rules="rules" :inline="true" label-width="auto"> <el-form ref="form" :model="form" :rules="rules" :inline="true" label-width="auto">
<div class="title-paragraph"> <div class="title-paragraph">
<div style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;">基本信息</div> <div
style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;"
>基本信息
</div>
</div> </div>
<!-- 1--> <!-- 1-->
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
<el-input v-model.trim="form.deviceName" placeholder="请输入设备名称" class="inputWidth" maxlength="20" /> <el-input
v-model.trim="form.deviceName"
placeholder="请输入设备名称"
class="inputWidth"
maxlength="20"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -448,7 +446,7 @@ ...@@ -448,7 +446,7 @@
@blur="handleuseNum" @blur="handleuseNum"
@keydown.native="keydown($event)" @keydown.native="keydown($event)"
/> />
<span class="text">{{ "次" }}</span> <span class="text">{{ '次' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -597,7 +595,7 @@ ...@@ -597,7 +595,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 8--> 8
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="支持服务地区" prop="serviceArea"> <el-form-item label="支持服务地区" prop="serviceArea">
...@@ -617,11 +615,18 @@ ...@@ -617,11 +615,18 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 9--> 9
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="支持检查项目" prop="checkType"> <el-form-item label="支持检查项目" prop="checkType">
<el-select v-model="form.checkType" placeholder="请选择支持检查项目" class="inputWidth" multiple collapse-tags clearable> <el-select
v-model="form.checkType"
placeholder="请选择支持检查项目"
class="inputWidth"
multiple
collapse-tags
clearable
>
<el-option <el-option
v-for="(item, index) in checkItemOptions" v-for="(item, index) in checkItemOptions"
:key="index" :key="index"
...@@ -635,7 +640,8 @@ ...@@ -635,7 +640,8 @@
</el-form> </el-form>
<el-row> <el-row>
<el-col style="display: flex;justify-content: left; margin-left: 20px; margin-top: 20px"> <el-col style="display: flex;justify-content: left; margin-left: 20px; margin-top: 20px">
<el-button class="queryBtn" type="primary" size="mini" icon="el-icon-check" @click="submitForm">提交</el-button> <el-button class="queryBtn" type="primary" size="mini" icon="el-icon-check" @click="submitForm">提交
</el-button>
<el-button class="resetBtn" size="mini" icon="el-icon-back" @click="cancel">返回</el-button> <el-button class="resetBtn" size="mini" icon="el-icon-back" @click="cancel">返回</el-button>
</el-col> </el-col>
</el-row> </el-row>
...@@ -653,10 +659,11 @@ import { getInfo } from '@/api/login' ...@@ -653,10 +659,11 @@ import { getInfo } from '@/api/login'
import { listCheckManage } from '@/api/business/manage' import { listCheckManage } from '@/api/business/manage'
import { isEmpty, parseTime } from '@/utils/ruoyi' import { isEmpty, parseTime } from '@/utils/ruoyi'
import { deepClone } from '@/utils' import { deepClone } from '@/utils'
import { listAllByType, listItemByType } from '@/api/business/item' import { listItemByType } from '@/api/business/item'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { signHospitalMessage } from '@/api/business/hospital' import { signHospitalMessage } from '@/api/business/hospital'
import InputTips from '@/components/InputTips/InputTips.vue' import InputTips from '@/components/InputTips/InputTips.vue'
export default { export default {
name: 'EquipmentDetail', name: 'EquipmentDetail',
components: { InputTips }, components: { InputTips },
...@@ -664,9 +671,9 @@ export default { ...@@ -664,9 +671,9 @@ export default {
data() { data() {
return { return {
// 日期格式 // 日期格式
// replace(time) { replace(time) {
// return parseTime(time, '{y}/{m}/{d}') return parseTime(time, '{y}/{m}/{d}')
// }, },
// 检查类型 // 检查类型
// checkType: [], // checkType: [],
// 地址列表 // 地址列表
...@@ -712,8 +719,8 @@ export default { ...@@ -712,8 +719,8 @@ export default {
deviceName: '', deviceName: '',
// appointmentMethod: '', // appointmentMethod: '',
serviceArea: [], serviceArea: [],
serviceAreaText: [], serviceAreaText: '',
checkTypeText: [], checkTypeText: '',
head: '', head: '',
phone: '', phone: '',
deviceType: '', deviceType: '',
...@@ -742,7 +749,7 @@ export default { ...@@ -742,7 +749,7 @@ export default {
], ],
phone: [ phone: [
{ {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, pattern: /^1[3-9][0-9]\d{8}$/,
message: '请输入正确的手机号码', message: '请输入正确的手机号码',
trigger: 'blur' trigger: 'blur'
} }
...@@ -851,22 +858,16 @@ export default { ...@@ -851,22 +858,16 @@ export default {
}, },
created() { created() {
this.$route.meta.title = '2222' this.$route.meta.title = '2222'
console.log('當前router', this.$route)
this.id = this.$route.query.id this.id = this.$route.query.id
this.identify = this.$route.query.identify this.identify = this.$route.query.identify
this.form.isPrivate = this.$route.query.isPrivate this.form.isPrivate = this.$route.query.isPrivate
console.log(' this.form.isPrivate', this.form.isPrivate) console.time('start option')
if (this.identify === '1') { Promise.all([this.getUserInfo(), this.getAreaData(), this.getuseList(), this.getItemByType()])
// this.$route.meta.title = '' .then(_ => {
console.log('1') console.timeLog('start option')
} else if (this.identify === '2') { console.time('detail')
// this.$route.meta.title = '' this.handleUpdate()
console.log('2') })
}
this.getAreaData()
this.handleUpdate()
this.getUserInfo()
this.getuseList()
}, },
computed: { computed: {
...mapGetters(['userType']) ...mapGetters(['userType'])
...@@ -875,40 +876,22 @@ export default { ...@@ -875,40 +876,22 @@ export default {
parseTime, parseTime,
// 获取登陆人信息 // 获取登陆人信息
getUserInfo() { getUserInfo() {
getInfo().then(res => { return getInfo().then(_ => {
// this.userType = res.user.userType
console.log(' this.userType', this.userType)
if (this.userType === '3') { if (this.userType === '3') {
this.isShow = false this.isShow = false
this.hpshow = true this.hpshow = true
this.itemType = 0
if (this.form.isPrivate === '1') { if (this.form.isPrivate === '1') {
signHospitalMessage().then(response => { signHospitalMessage().then(response => {
console.log('查到医院信息', response)
this.form.serviceArea.push(response.data.addressCode) this.form.serviceArea.push(response.data.addressCode)
this.serviceAreaShow = true this.serviceAreaShow = true
console.log('查到医院地址', this.form.serviceArea)
}) })
} }
} } else if (this.userType === '00') {
if (this.userType === '00') {
this.isShow = true this.isShow = true
this.hpshow = false this.hpshow = false
this.itemType = 3
} }
this.getItemByType()
this.getAllByType()
console.log('登陆人', res)
}) })
}, },
// 时间段获取
getam() {
console.log(this.useTime)
},
getpm() {
console.log(this.useTime)
},
// 禁止输入空格 // 禁止输入空格
keydown(e) { keydown(e) {
if (e.keyCode === 32) { if (e.keyCode === 32) {
...@@ -930,7 +913,6 @@ export default { ...@@ -930,7 +913,6 @@ export default {
}, },
// 权重不能为0 // 权重不能为0
validWeigh(rule, value, callback) { validWeigh(rule, value, callback) {
// console.log('value', value)
if (value > 0) { if (value > 0) {
callback() callback()
} else { } else {
...@@ -939,7 +921,6 @@ export default { ...@@ -939,7 +921,6 @@ export default {
}, },
// 单位时段服务数不能为0 // 单位时段服务数不能为0
validUseNum(rule, value, callback) { validUseNum(rule, value, callback) {
// console.log('value', value)
if (value > 0) { if (value > 0) {
callback() callback()
} else { } else {
...@@ -948,7 +929,6 @@ export default { ...@@ -948,7 +929,6 @@ export default {
}, },
// 服务地点表单校验 // 服务地点表单校验
validaddress(rule, value, callback) { validaddress(rule, value, callback) {
console.log('validaddress', this.form.selectedOptions)
if (this.form.selectedOptions.length > 0) { if (this.form.selectedOptions.length > 0) {
callback() callback()
} else { } else {
...@@ -957,7 +937,6 @@ export default { ...@@ -957,7 +937,6 @@ export default {
}, },
// 支持服务地区表单校验 // 支持服务地区表单校验
validserviceArea(rule, value, callback) { validserviceArea(rule, value, callback) {
console.log('validaddress', this.form.serviceArea)
if (this.form.serviceArea.length > 0) { if (this.form.serviceArea.length > 0) {
callback() callback()
} else { } else {
...@@ -966,7 +945,6 @@ export default { ...@@ -966,7 +945,6 @@ export default {
}, },
// 支持检查类型表单校验 // 支持检查类型表单校验
validcheckType(rule, value, callback) { validcheckType(rule, value, callback) {
console.log('validaddress', this.form.checkType)
if (this.form.checkType.length > 0) { if (this.form.checkType.length > 0) {
callback() callback()
} else { } else {
...@@ -975,14 +953,11 @@ export default { ...@@ -975,14 +953,11 @@ export default {
}, },
// 四个时间的表单校验 // 四个时间的表单校验
validateMorningStart(rule, value, callback) { validateMorningStart(rule, value, callback) {
// // TODO: please clear this log
const morningEnd = this.form.useTime.ame const morningEnd = this.form.useTime.ame
if (isEmpty(value) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pms) && isEmpty(this.form.useTime.pme)) { if (isEmpty(value) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pms) && isEmpty(this.form.useTime.pme)) {
console.log('上午开始时间第一层报错')
callback(new Error('请选择上午开始时间')) callback(new Error('请选择上午开始时间'))
} else { } else {
if (isEmpty(value) && isEmpty(!morningEnd)) { if (isEmpty(value) && isEmpty(!morningEnd)) {
console.log('上午开始时间第二层报错')
callback(new Error('请选择上午开始时间')) callback(new Error('请选择上午开始时间'))
} else { } else {
callback() callback()
...@@ -992,11 +967,9 @@ export default { ...@@ -992,11 +967,9 @@ export default {
validateMorningEnd(rule, value, callback) { validateMorningEnd(rule, value, callback) {
const morningStart = this.form.useTime.ams const morningStart = this.form.useTime.ams
if (isEmpty(value) && isEmpty(this.form.useTime.ams) && isEmpty(this.form.useTime.pms) && isEmpty(this.form.useTime.pme)) { if (isEmpty(value) && isEmpty(this.form.useTime.ams) && isEmpty(this.form.useTime.pms) && isEmpty(this.form.useTime.pme)) {
console.log('上午结束时间第一层报错')
callback(new Error('请选择上午结束时间')) callback(new Error('请选择上午结束时间'))
} else { } else {
if (isEmpty(value) && isEmpty(!morningStart)) { if (isEmpty(value) && isEmpty(!morningStart)) {
console.log('上午结束时间第一层报错')
callback(new Error('请选择上午结束时间')) callback(new Error('请选择上午结束时间'))
} else { } else {
callback() callback()
...@@ -1006,11 +979,9 @@ export default { ...@@ -1006,11 +979,9 @@ export default {
validateAfternoonStart(rule, value, callback) { validateAfternoonStart(rule, value, callback) {
const afternoonEnd = this.form.useTime.pme const afternoonEnd = this.form.useTime.pme
if (isEmpty(value) && isEmpty(this.form.useTime.ams) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pme)) { if (isEmpty(value) && isEmpty(this.form.useTime.ams) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pme)) {
console.log(' 下午开始时间第一层报错')
callback(new Error('请选择下午开始时间')) callback(new Error('请选择下午开始时间'))
} else { } else {
if (isEmpty(value) && isEmpty(!afternoonEnd)) { if (isEmpty(value) && isEmpty(!afternoonEnd)) {
console.log('下午开始时间开始第二层报错')
callback(new Error('请选择下午开始时间')) callback(new Error('请选择下午开始时间'))
} else { } else {
callback() callback()
...@@ -1020,11 +991,9 @@ export default { ...@@ -1020,11 +991,9 @@ export default {
validateAfternoonEnd(rule, value, callback) { validateAfternoonEnd(rule, value, callback) {
const afternoonStart = this.form.useTime.pms const afternoonStart = this.form.useTime.pms
if (isEmpty(value) && isEmpty(this.form.useTime.ams) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pms)) { if (isEmpty(value) && isEmpty(this.form.useTime.ams) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pms)) {
console.log('下午结束时间结束第一层报错')
callback(new Error('请选择下午结束时间')) callback(new Error('请选择下午结束时间'))
} else { } else {
if (isEmpty(value) && isEmpty(!afternoonStart)) { if (isEmpty(value) && isEmpty(!afternoonStart)) {
console.log('下午结束时间结束第二层报错')
callback(new Error('请选择下午结束时间')) callback(new Error('请选择下午结束时间'))
} else { } else {
callback() callback()
...@@ -1033,87 +1002,33 @@ export default { ...@@ -1033,87 +1002,33 @@ export default {
}, },
// 获取检查项目下拉框 // 获取检查项目下拉框
getItemByType() { getItemByType() {
listItemByType({ itemType: this.itemType }).then(res => { if (this.userType === '3') {
console.log('检查项目', res) this.itemType = 0
this.checkItemOptions = res.rows } else if (this.userType === '00') {
console.log('xdddd', this.checkItemOptions) this.itemType = 3
const result = [] }
const ids = [... this.form.checkType] return listItemByType({ itemType: this.itemType }).then(res => {
for (let i = 0; i < this.checkItemOptions.length; i++) {
if (ids.includes(parseInt(this.checkItemOptions[i].id))) {
result.push(this.checkItemOptions[i].name)
}
}
this.form.checkTypeText = result
console.log(' this.checkTypeText', this.form.checkTypeText)
})
},
getAllByType() {
listAllByType({ itemType: this.itemType }).then(res => {
console.log('检查全部项目', res)
this.checkItemOptions = res.rows this.checkItemOptions = res.rows
// console.log('xdddd', this.checkItemOptions)
const result = []
const ids = [... this.form.checkType]
for (let i = 0; i < this.checkItemOptions.length; i++) {
if (ids.includes(parseInt(this.checkItemOptions[i].id))) {
result.push(this.checkItemOptions[i].name)
}
}
// this.form.checkTypeText = result
// console.log(' this.checkTypeText', this.form.checkTypeText)
}) })
}, },
// getAllByType() {
// listAllByType({ itemType: this.itemType }).then(res => {
// // this.checkItemOptions = res.rows
// // // const result = []
// const ids = [... this.form.checkType]
// for (let i = 0; i < this.checkItemOptions.length; i++) {
// if (ids.includes(parseInt(this.checkItemOptions[i].id))) {
// result.push(this.checkItemOptions[i].name)
// }
// }
// // this.form.checkTypeText = result
// // // })
// },
// 获取地址数据 // 获取地址数据
getAreaData() { getAreaData() {
getAreTreeStructure().then(response => { return getAreTreeStructure().then(response => {
console.log('地区三级', response) this.removeEmptyChildren(response.data)
if (response.code === 200) { this.areaOptions = response.data
this.removeEmptyChildren(response.data)
this.areaOptions = response.data
console.log(' this.form.serviceArea', this.form.serviceArea)
const valueGroups = this.form.serviceArea
const labelList = []
for (let i = 0; i < valueGroups.length; i++) {
const values = valueGroups[i].split(',')
let currentData = this.areaOptions
const currentLabel = []
let foundLabel = true
for (let j = 0; j < values.length; j++) {
const value = parseInt(values[j])
const item = currentData.find((item) => item.value === value)
if (item) {
if (currentLabel.length === 0) {
currentLabel.push(item.label)
} else {
currentLabel.push(`-${item.label}`)
}
currentData = item.children
} else {
foundLabel = false
break
}
}
if (foundLabel) {
labelList.push(currentLabel.join(''))
} else {
labelList.push('-')
}
}
this.form.serviceAreaText = labelList
console.log(labelList)
console.log('----------------------------------------111111111111', labelList)
console.log(' this.areaOptions', this.areaOptions)
}
}) })
}, },
removeEmptyChildren(array) { removeEmptyChildren(array) {
...@@ -1134,7 +1049,6 @@ export default { ...@@ -1134,7 +1049,6 @@ export default {
} }
}, },
handleChangeCascader(value) { handleChangeCascader(value) {
console.log('handleChangeCascader', value)
if (value.length > 0) { if (value.length > 0) {
this.getAreNameById(value) this.getAreNameById(value)
} else { } else {
...@@ -1144,7 +1058,6 @@ export default { ...@@ -1144,7 +1058,6 @@ export default {
} }
}, },
handleChangeServiceArea(value) { handleChangeServiceArea(value) {
console.log('handleChangeServiceArea', value)
// 拿到所选的省级id 把重复的过滤掉 // 拿到所选的省级id 把重复的过滤掉
const uniqueFirstItems = value.map((arr) => arr[0]).filter((item, index, arr) => arr.indexOf(item) === index) const uniqueFirstItems = value.map((arr) => arr[0]).filter((item, index, arr) => arr.indexOf(item) === index)
this.form.serviceProvince = uniqueFirstItems.toString() this.form.serviceProvince = uniqueFirstItems.toString()
...@@ -1162,15 +1075,12 @@ export default { ...@@ -1162,15 +1075,12 @@ export default {
} }
this.addtions.names = addressText this.addtions.names = addressText
this.city = city this.city = city
console.log('地区名', addressText)
console.log('城市名', city)
}) })
}, },
// 提交 // 提交
submitForm() { submitForm() {
const form = deepClone(this.form) const form = deepClone(this.form)
console.log('selectedOptions', form.selectedOptions)
if (form.selectedOptions != null) { if (form.selectedOptions != null) {
form.addressCode = form.selectedOptions.join(',') form.addressCode = form.selectedOptions.join(',')
} }
...@@ -1181,7 +1091,6 @@ export default { ...@@ -1181,7 +1091,6 @@ export default {
form.checkType = form.checkType.join(',') form.checkType = form.checkType.join(',')
} }
if (!isEmpty(form.serviceArea)) { if (!isEmpty(form.serviceArea)) {
console.log('支持服务地区', form.serviceArea)
form.serviceArea = form.serviceArea.join(';') form.serviceArea = form.serviceArea.join(';')
} }
if (!isEmpty(form.useTime)) { if (!isEmpty(form.useTime)) {
...@@ -1202,7 +1111,6 @@ export default { ...@@ -1202,7 +1111,6 @@ export default {
updateDevice(form).then(response => { updateDevice(form).then(response => {
this.$modal.msgSuccess('编辑成功') this.$modal.msgSuccess('编辑成功')
this.cancel() this.cancel()
console.log('this.form)', form)
}) })
}) })
} }
...@@ -1217,43 +1125,72 @@ export default { ...@@ -1217,43 +1125,72 @@ export default {
// 查询使用信息 // 查询使用信息
getuseList() { getuseList() {
this.queryParams.deviceId = this.id this.queryParams.deviceId = this.id
listCheckManage(this.queryParams).then(response => { return listCheckManage(this.queryParams).then(response => {
console.log('a使用信息', response)
this.useList = response.rows this.useList = response.rows
console.log(' -----------------this.useList', this.useList)
}) })
}, },
// id查询 // id查询
handleUpdate() { handleUpdate() {
getDevice(this.id).then(response => { return getDevice(this.id).then(({ data }) => {
this.form = response.data data.selectedOptions = data.addressCode.split(',').map(Number)
console.log('查询是否为医院设备', this.form.isPrivate) data.serviceArea = data.serviceArea.split(';')
this.form.selectedOptions = response.data.addressCode.split(',').map(Number) if (data.checkType != null && data.checkType !== '') {
console.log('地址编码-------------', this.form.selectedOptions) data.checkType = data.checkType.split(',').map(Number)
this.getAreNameById(this.form.selectedOptions) }
// if (this.form.isPrivate === '1') { if (data.useTime !== null && data.useTime !== '') {
// signHospitalMessage().then(response => { data.useTime = JSON.parse(data.useTime)
// console.log('查到医院信息', response) }
// this.form.serviceArea.push(response.data.addressCode) data.createTimeShow = this.replace(data.createTime)
// this.serviceAreaShow = true
// console.log('查到医院地址', this.form.serviceArea) // 回显检查项目
// }) data.checkTypeText = this.checkItemOptions.filter(({ id }) => data.checkType.includes(id))
// } else { .map(({ name }) => name)
this.form.serviceArea = response.data.serviceArea.split(';') .join(',')
// 回显服务地区
const valueGroups = data.serviceArea
const labelList = []
// const getAreaName = (valueList, parentNameList) => {
//
// } // }
console.log(' this.areaOptions--------------------------', this.areaOptions) for (let i = 0; i < valueGroups.length; i++) {
console.log('支持检查地区回显值', this.form.serviceArea) const values = valueGroups[i].split(',')
if (this.form.checkType != null && this.form.checkType !== '') {
this.form.checkType = response.data.checkType.split(',').map(Number) let currentData = this.areaOptions
console.log('this.form.checkType', this.form.checkType) const currentLabel = []
}
let foundLabel = true
for (let j = 0; j < values.length; j++) {
const value = parseInt(values[j])
const item = currentData.find((item) => item.value === value)
if (item) {
if (currentLabel.length === 0) {
currentLabel.push(item.label)
} else {
currentLabel.push(`-${item.label}`)
}
currentData = item.children
} else {
foundLabel = false
break
}
}
if (this.form.useTime != null && this.form.useTime !== '') { if (foundLabel) {
this.form.useTime = JSON.parse(response.data.useTime) labelList.push(currentLabel.join(''))
} else {
labelList.push('-')
}
} }
this.form.createTimeShow = this.replace(this.form.createTime) data.serviceAreaText = labelList.join(',')
console.log('详情数据---', this.form)
this.form = data
console.timeLog('detail')
}) })
} }
} }
...@@ -1261,33 +1198,34 @@ export default { ...@@ -1261,33 +1198,34 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tip1{ .tip1 {
height: 30px; height: 30px;
border-left: 5px solid #409eff; border-left: 5px solid #409eff;
} }
::v-deep.app-container { ::v-deep.app-container {
//background-color: #f0f2f5; //background-color: #f0f2f5;
//position: absolute; //position: absolute;
//bottom: 0; //bottom: 0;
//top: 0; //top: 0;
//right: 0; //right: 0;
//left: 0; //left: 0;
} }
.title-paragraph { .title-paragraph {
margin-bottom: 20px; margin-bottom: 20px;
border-left: 5px solid #5FB54B; border-left: 5px solid #5FB54B;
.title-text { .title-text {
margin-left: 10px; margin-left: 10px;
} }
.title { .title {
color: #666666; color: #666666;
font-weight: 600; font-weight: 600;
font-size: 17px font-size: 17px
} }
} }
.headerTitle { .headerTitle {
...@@ -1297,19 +1235,24 @@ export default { ...@@ -1297,19 +1235,24 @@ export default {
line-height: 50px; line-height: 50px;
padding-left: 45px; padding-left: 45px;
} }
.address{
.address {
width: 520px; width: 520px;
} }
.inputWidth{
.inputWidth {
width: 300px; width: 300px;
} }
.inputNumber_Width{
.inputNumber_Width {
width: 270px; width: 270px;
} }
.text{
.text {
margin-left: 10px; margin-left: 10px;
} }
.remark_with{
.remark_with {
width: 1360px; width: 1360px;
} }
...@@ -1326,6 +1269,7 @@ export default { ...@@ -1326,6 +1269,7 @@ export default {
font-weight: bold; font-weight: bold;
cursor: pointer cursor: pointer
} }
.time-select-item.selected:not(.disabled) { .time-select-item.selected:not(.disabled) {
color: #5FB54B; color: #5FB54B;
font-weight: bold; font-weight: bold;
......
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
icon="el-icon-document" icon="el-icon-document"
class="el-button--success--solid" class="el-button--success--solid"
plain plain
@click="detailsDevice(scope.row.id)" @click="detailsDevice(scope.row)"
>详情 >详情
</el-button> </el-button>
<el-button <el-button
...@@ -603,12 +603,13 @@ export default { ...@@ -603,12 +603,13 @@ export default {
}) })
}, },
/** 跳转到详情页*/ /** 跳转到详情页*/
detailsDevice(id) { detailsDevice(data) {
this.$router.push({ this.$router.push({
name: 'EquipmentEdit', name: 'EquipmentDetail',
query: { query: {
identify: '2', identify: '2',
id: id id: data.id,
isPrivate: data.isPrivate
} }
}) })
}, },
...@@ -619,11 +620,11 @@ export default { ...@@ -619,11 +620,11 @@ export default {
}) })
}, },
// 点击检查项目 // 点击检查项目
handlecheck() { // handlecheck() {
this.$router.push({ // this.$router.push({
name: 'EquipmentCheck' // name: 'EquipmentCheck'
}) // })
}, // },
/** /**
* 全部选择 * 全部选择
......
...@@ -233,15 +233,15 @@ ...@@ -233,15 +233,15 @@
type="warning" type="warning"
@click="handleDischargeMe(scope.row)" @click="handleDischargeMe(scope.row)"
>办理出院</el-button> >办理出院</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- v-else-if="scope.row.status==='4'"--> <!-- v-else-if="scope.row.status==='4'"-->
<!-- icon="el-icon-paperclip"--> <!-- icon="el-icon-paperclip"-->
<!-- plain--> <!-- plain-->
<!-- size="mini"--> <!-- size="mini"-->
<!-- class="el-button&#45;&#45;warning&#45;&#45;solid&#45;&#45;four"--> <!-- class="el-button&#45;&#45;warning&#45;&#45;solid&#45;&#45;four"-->
<!-- type="warning"--> <!-- type="warning"-->
<!-- disabled--> <!-- disabled-->
<!-- >导出明细</el-button>--> <!-- >导出明细</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
<el-dialog <el-dialog
title="分配诊室" title="分配诊室"
:visible.sync="open" :visible.sync="open"
width="950px" width="1000px"
append-to-body append-to-body
:close-on-press-escape="false" :close-on-press-escape="false"
:close-on-click-modal="false" :close-on-click-modal="false"
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
</el-form> </el-form>
<el-table <el-table
:data="appointmentRoomList" :data="appointmentRoomList"
style="width: 100%" style="width: 100%;padding-left: 22px;"
:header-cell-style="{background:'#F4F4F4'}" :header-cell-style="{background:'#F4F4F4'}"
> >
<el-table-column prop="consulting_name" align="left" label="诊室名称" :show-overflow-tooltip="true"> <el-table-column prop="consulting_name" align="left" label="诊室名称" :show-overflow-tooltip="true">
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<div class="tip1" /> <div class="tip1" />
<div style="padding-top: 3px;padding-left: 18px;font-size: 16px;font-weight: bold;color: #333333;">添加预约</div> <div style="padding-top: 3px;padding-left: 18px;font-size: 16px;font-weight: bold;color: #333333;">添加预约</div>
</div> </div>
<el-form ref="useRecordForm" :model="reservationForm" :rules="useRecordrules" label-width="auto"> <el-form ref="useRecordForm" :model="reservationForm" :rules="useRecordrules" label-width="6.5rem">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="诊室" prop="consultRoomName"> <el-form-item label="诊室" prop="consultRoomName">
...@@ -709,7 +709,7 @@ export default { ...@@ -709,7 +709,7 @@ export default {
rest() { rest() {
this.treatStartTime = '' this.treatStartTime = ''
this.reservationForm.consultRoomName = '' this.reservationForm.consultRoomName = ''
this.appointmentRoomList = [] // this.appointmentRoomList = []
// 预约诊室 // 预约诊室
// 添加预约表单参数 // 添加预约表单参数
this.reservationForm = { this.reservationForm = {
...@@ -733,7 +733,7 @@ export default { ...@@ -733,7 +733,7 @@ export default {
// 分配诊室搜索预约记录 // 分配诊室搜索预约记录
this.allocationForm = { this.allocationForm = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 5,
consultRoomIdList: '', consultRoomIdList: '',
useDate: '' useDate: ''
} }
......
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