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

Merge remote-tracking branch 'origin/master'

parents 3530dd95 c820b6c8
...@@ -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">
......
...@@ -511,8 +511,10 @@ export default { ...@@ -511,8 +511,10 @@ export default {
handleSortChange(column) { handleSortChange(column) {
console.log('更换排序', column) console.log('更换排序', column)
// 查询字段是表格中字段名字 // 查询字段是表格中字段名字
if (column.prop.orderByColumn === 'hospitalName' || column.prop.orderByColumn === 'hospitalAddress') { if (column.prop.orderByColumn === 'hospitalName' ||
this.queryParams.orderByColumn = column.prop + 'sort' column.prop.orderByColumn === 'hospitalAddress' ||
column.prop.orderByColumn === 'contactPerson') {
this.queryParams.orderByColumn = column.prop + 'Sort'
} else { } else {
this.queryParams.orderByColumn = column.prop this.queryParams.orderByColumn = column.prop
} }
......
...@@ -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>
...@@ -102,7 +105,7 @@ ...@@ -102,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>
...@@ -282,7 +285,10 @@ ...@@ -282,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 />
...@@ -297,7 +303,11 @@ ...@@ -297,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>
...@@ -325,13 +335,21 @@ ...@@ -325,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">
...@@ -428,7 +446,7 @@ ...@@ -428,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>
...@@ -577,10 +595,38 @@ ...@@ -577,10 +595,38 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
8
<el-row>
<el-col>
<el-form-item label="支持服务地区" prop="serviceArea">
<el-cascader
v-model="form.serviceArea"
size="large"
:options="areaOptions"
:props="props"
:disabled="serviceAreaShow"
placeholder="请选择支持服务地区"
collapse-tags
expand-trigger="hover"
clearable
class="inputWidth"
@change="handleChangeServiceArea"
/>
</el-form-item>
</el-col>
</el-row>
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"
...@@ -594,7 +640,8 @@ ...@@ -594,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>
...@@ -616,6 +663,7 @@ import { listItemByType } from '@/api/business/item' ...@@ -616,6 +663,7 @@ 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 },
...@@ -671,8 +719,8 @@ export default { ...@@ -671,8 +719,8 @@ export default {
deviceName: '', deviceName: '',
// appointmentMethod: '', // appointmentMethod: '',
serviceArea: [], serviceArea: [],
serviceAreaText: [], serviceAreaText: '',
checkTypeText: [], checkTypeText: '',
head: '', head: '',
phone: '', phone: '',
deviceType: '', deviceType: '',
...@@ -701,7 +749,7 @@ export default { ...@@ -701,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'
} }
...@@ -813,18 +861,13 @@ export default { ...@@ -813,18 +861,13 @@ export default {
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 = ''
console.log('2')
}
this.getAreaData()
this.handleUpdate() this.handleUpdate()
this.getUserInfo() })
this.getuseList()
}, },
computed: { computed: {
...mapGetters(['userType']) ...mapGetters(['userType'])
...@@ -833,40 +876,22 @@ export default { ...@@ -833,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) {
...@@ -888,7 +913,6 @@ export default { ...@@ -888,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 {
...@@ -897,7 +921,6 @@ export default { ...@@ -897,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 {
...@@ -906,7 +929,6 @@ export default { ...@@ -906,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 {
...@@ -915,7 +937,6 @@ export default { ...@@ -915,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 {
...@@ -924,7 +945,6 @@ export default { ...@@ -924,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 {
...@@ -935,11 +955,9 @@ export default { ...@@ -935,11 +955,9 @@ export default {
validateMorningStart(rule, value, callback) { validateMorningStart(rule, value, callback) {
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()
...@@ -949,11 +967,9 @@ export default { ...@@ -949,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()
...@@ -963,11 +979,9 @@ export default { ...@@ -963,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()
...@@ -977,11 +991,9 @@ export default { ...@@ -977,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()
...@@ -990,27 +1002,19 @@ export default { ...@@ -990,27 +1002,19 @@ 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]
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 return listItemByType({ itemType: this.itemType }).then(res => {
console.log(' this.checkTypeText', this.form.checkTypeText) this.checkItemOptions = res.rows
}) })
}, },
// getAllByType() { // getAllByType() {
// listAllByType({ itemType: this.itemType }).then(res => { // listAllByType({ itemType: this.itemType }).then(res => {
// console.log('检查全部项目', res) // // this.checkItemOptions = res.rows
// this.checkItemOptions = res.rows // // // const result = []
// // console.log('xdddd', this.checkItemOptions)
// const result = []
// const ids = [... this.form.checkType] // const ids = [... this.form.checkType]
// for (let i = 0; i < this.checkItemOptions.length; i++) { // for (let i = 0; i < this.checkItemOptions.length; i++) {
// if (ids.includes(parseInt(this.checkItemOptions[i].id))) { // if (ids.includes(parseInt(this.checkItemOptions[i].id))) {
...@@ -1018,58 +1022,13 @@ export default { ...@@ -1018,58 +1022,13 @@ export default {
// } // }
// } // }
// // this.form.checkTypeText = result // // this.form.checkTypeText = result
// // console.log(' this.checkTypeText', this.form.checkTypeText) // // // })
// })
// }, // },
// 获取地址数据 // 获取地址数据
getAreaData() { getAreaData() {
getAreTreeStructure().then(response => { return getAreTreeStructure().then(response => {
console.log('地区三级', response)
if (response.code === 200) {
this.removeEmptyChildren(response.data) this.removeEmptyChildren(response.data)
this.areaOptions = 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('----------------------------------------111111111111', labelList)
console.log(' this.areaOptions', this.areaOptions)
}
}) })
}, },
removeEmptyChildren(array) { removeEmptyChildren(array) {
...@@ -1090,7 +1049,6 @@ export default { ...@@ -1090,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 {
...@@ -1100,7 +1058,6 @@ export default { ...@@ -1100,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()
...@@ -1118,15 +1075,12 @@ export default { ...@@ -1118,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(',')
} }
...@@ -1137,7 +1091,6 @@ export default { ...@@ -1137,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)) {
...@@ -1158,7 +1111,6 @@ export default { ...@@ -1158,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)
}) })
}) })
} }
...@@ -1173,43 +1125,72 @@ export default { ...@@ -1173,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}`)
} }
if (this.form.useTime != null && this.form.useTime !== '') { currentData = item.children
this.form.useTime = JSON.parse(response.data.useTime) } else {
foundLabel = false
break
}
} }
this.form.createTimeShow = this.replace(this.form.createTime)
console.log('详情数据---', this.form) if (foundLabel) {
labelList.push(currentLabel.join(''))
} else {
labelList.push('-')
}
}
data.serviceAreaText = labelList.join(',')
this.form = data
console.timeLog('detail')
}) })
} }
} }
...@@ -1217,33 +1198,34 @@ export default { ...@@ -1217,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 {
...@@ -1253,19 +1235,24 @@ export default { ...@@ -1253,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;
} }
...@@ -1282,6 +1269,7 @@ export default { ...@@ -1282,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;
......
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