Commit 6776616c authored by 王飞龙's avatar 王飞龙

bug修改

parent 3bd11dac
...@@ -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)"
/> />
......
...@@ -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>
...@@ -580,7 +598,14 @@ ...@@ -580,7 +598,14 @@
<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 +619,8 @@ ...@@ -594,7 +619,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 +642,7 @@ import { listItemByType } from '@/api/business/item' ...@@ -616,6 +642,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 +698,8 @@ export default { ...@@ -671,8 +698,8 @@ export default {
deviceName: '', deviceName: '',
// appointmentMethod: '', // appointmentMethod: '',
serviceArea: [], serviceArea: [],
serviceAreaText: [], serviceAreaText: '',
checkTypeText: [], checkTypeText: '',
head: '', head: '',
phone: '', phone: '',
deviceType: '', deviceType: '',
...@@ -701,7 +728,7 @@ export default { ...@@ -701,7 +728,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,17 +840,13 @@ export default { ...@@ -813,17 +840,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 = '' this.handleUpdate()
console.log('2') })
}
this.getAreaData()
this.handleUpdate()
this.getuseList()
}, },
computed: { computed: {
...mapGetters(['userType']) ...mapGetters(['userType'])
...@@ -832,40 +855,22 @@ export default { ...@@ -832,40 +855,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) {
...@@ -887,7 +892,6 @@ export default { ...@@ -887,7 +892,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 {
...@@ -896,7 +900,6 @@ export default { ...@@ -896,7 +900,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 {
...@@ -905,7 +908,6 @@ export default { ...@@ -905,7 +908,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 {
...@@ -914,7 +916,6 @@ export default { ...@@ -914,7 +916,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 {
...@@ -923,7 +924,6 @@ export default { ...@@ -923,7 +924,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 {
...@@ -934,11 +934,9 @@ export default { ...@@ -934,11 +934,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()
...@@ -948,11 +946,9 @@ export default { ...@@ -948,11 +946,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()
...@@ -962,11 +958,9 @@ export default { ...@@ -962,11 +958,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()
...@@ -976,11 +970,9 @@ export default { ...@@ -976,11 +970,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()
...@@ -989,36 +981,19 @@ export default { ...@@ -989,36 +981,19 @@ export default {
}, },
// 获取检查项目下拉框 // 获取检查项目下拉框
getItemByType() { getItemByType() {
listItemByType({ itemType: this.itemType }).then(res => { if (this.userType === '3') {
this.form.checkType = this.form.checkType.filter(item => { this.itemType = 0
let flag = false } else if (this.userType === '00') {
res.rows.forEach(row => { this.itemType = 3
if (row.id === item) { }
flag = true return listItemByType({ itemType: this.itemType }).then(res => {
}
})
return flag
})
console.log('检查项目23333', res, this.form)
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() { // 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))) {
...@@ -1026,58 +1001,13 @@ export default { ...@@ -1026,58 +1001,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) 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('----------------------------------------111111111111', labelList)
console.log(' this.areaOptions', this.areaOptions)
}
}) })
}, },
removeEmptyChildren(array) { removeEmptyChildren(array) {
...@@ -1098,7 +1028,6 @@ export default { ...@@ -1098,7 +1028,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 {
...@@ -1108,7 +1037,6 @@ export default { ...@@ -1108,7 +1037,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()
...@@ -1126,15 +1054,12 @@ export default { ...@@ -1126,15 +1054,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(',')
} }
...@@ -1145,7 +1070,6 @@ export default { ...@@ -1145,7 +1070,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)) {
...@@ -1166,7 +1090,6 @@ export default { ...@@ -1166,7 +1090,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)
}) })
}) })
} }
...@@ -1181,44 +1104,72 @@ export default { ...@@ -1181,44 +1104,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.getUserInfo() if (data.checkType != null && data.checkType !== '') {
this.form.selectedOptions = response.data.addressCode.split(',').map(Number) data.checkType = data.checkType.split(',').map(Number)
console.log('地址编码-------------', this.form.selectedOptions) }
// this.getAreNameById(this.form.selectedOptions) if (data.useTime !== null && data.useTime !== '') {
// if (this.form.isPrivate === '1') { data.useTime = JSON.parse(data.useTime)
// signHospitalMessage().then(response => { }
// console.log('查到医院信息', response) data.createTimeShow = this.replace(data.createTime)
// this.form.serviceArea.push(response.data.addressCode)
// this.serviceAreaShow = true // 回显检查项目
// console.log('查到医院地址', this.form.serviceArea) data.checkTypeText = this.checkItemOptions.filter(({ id }) => data.checkType.includes(id))
// }) .map(({ name }) => name)
// } else { .join(',')
this.form.serviceArea = response.data.serviceArea.split(';') // 回显服务地区
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')
}) })
} }
} }
...@@ -1226,33 +1177,34 @@ export default { ...@@ -1226,33 +1177,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 {
...@@ -1262,19 +1214,24 @@ export default { ...@@ -1262,19 +1214,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;
} }
...@@ -1291,6 +1248,7 @@ export default { ...@@ -1291,6 +1248,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