Commit df3c5792 authored by 盖献康's avatar 盖献康

Merge remote-tracking branch 'origin/master'

parents 5d18d861 143641c8
...@@ -58,3 +58,11 @@ export function refreshCache() { ...@@ -58,3 +58,11 @@ export function refreshCache() {
method: 'delete' method: 'delete'
}) })
} }
export function uploadCommon(data) {
return request({
headers: { 'Content-Type': 'multipart/form-data' },
url: '/common/upload',
method: 'post',
data
})
}
...@@ -273,3 +273,44 @@ ...@@ -273,3 +273,44 @@
.permi-disabled { .permi-disabled {
cursor: not-allowed; cursor: not-allowed;
} }
.el-button--success--solid{
width: 50px !important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(95,181,75)!important;
}
.el-button--primary--solid{
width: 50px !important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(52, 144, 206)!important;
}
.el-button--warning--solid{
width: 50px!important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(255,157,78)!important;
}
.el-button--error--solid{
width: 50px!important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(219, 71, 71)!important;
}
.el-button--success--solid--four{
width: 80px !important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(95,181,75)!important;
}
.el-button--primary--solid--four{
width: 80px !important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(52, 144, 206)!important;
}
.el-button--warning--solid--four{
width: 80px!important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(255,157,78)!important;
}
.el-button--error--solid--four{
width: 80px!important;
border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(219, 71, 71)!important;
}
This diff is collapsed.
<template>
<div class="image-cropper-modal">
<el-dialog
:visible="visible"
:append-to-body="true"
:close-on-click-modal="false"
title="裁剪图片"
width="700px"
class="image-cropper-dialog"
@close="visible = false"
>
<vue-cropper
ref="imageCropper"
:img="url"
:auto-crop-width="autoCropWidth"
:auto-crop-height="autoCropHeight"
:auto-crop="true"
:fixed="false"
:fixed-number="[1, 1]"
:fixed-box="true"
:output-size="1"
output-type="png"
/>
<template #footer>
<span class="dialog-footer">
<el-button class="common-btn cancel" @click="onCancel">取 消</el-button>
<el-button class="common-btn confirm" type="primary" @click="onConfirm">确 定</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { VueCropper } from 'vue-cropper'
export default {
name: 'ImageCropperModal',
components: {
VueCropper
},
props: {
visible: {
type: Boolean,
default: false
},
url: {
type: String,
default: ''
},
autoCropWidth: {
type: String,
default: `${100 * 4}`
},
autoCropHeight: {
type: String,
default: `${100 * 4}`
}
},
methods: {
onCancel() {
this.$emit('cancel')
},
onConfirm() {
this.$refs.imageCropper.getCropBlob((blob) => {
this.$emit('confirm', blob)
})
}
}
}
</script>
<style lang="scss" scoped>
.image-cropper-dialog {
.vue-cropper {
height: 500px;
}
}
</style>
...@@ -106,7 +106,7 @@ service.interceptors.response.use(res => { ...@@ -106,7 +106,7 @@ service.interceptors.response.use(res => {
console.log('err' + error) console.log('err' + error)
let { message } = error; let { message } = error;
if (message == "Network Error") { if (message == "Network Error") {
message = "后端接口连接异常"; message = "网络异常";
} else if (message.includes("timeout")) { } else if (message.includes("timeout")) {
message = "系统接口请求超时"; message = "系统接口请求超时";
} else if (message.includes("Request failed with status code")) { } else if (message.includes("Request failed with status code")) {
......
...@@ -274,14 +274,6 @@ ...@@ -274,14 +274,6 @@
style="width: 250px" style="width: 250px"
@change="handleChangeServiceArea" @change="handleChangeServiceArea"
/> />
<!-- <el-select v-model="form.serviceArea" placeholder="请选择支持服务地区" style="width: 300px" multiple collapse-tags clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.service_area"-->
<!-- :key="dict.label"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -289,12 +281,12 @@ ...@@ -289,12 +281,12 @@
<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="请选择支持检查项目" style="width: 300px" multiple collapse-tags clearable> <el-select v-model="form.checkType" placeholder="请选择支持检查项目" style="width: 250px" multiple collapse-tags clearable>
<el-option <el-option
v-for=" dict in checkItemOptions" v-for=" (item,index) in checkItemOptions"
:key="dict.id" :key="index"
:label="dict.name" :label="item.name"
:value="dict.id" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -464,6 +456,8 @@ export default { ...@@ -464,6 +456,8 @@ export default {
// 是否显示 // 是否显示
isShow: '', isShow: '',
hpshow: '', hpshow: '',
// 查询检查项目下拉框传递的字段
itemType: '',
// // 可用时段 // // 可用时段
// useTime: { // useTime: {
...@@ -518,7 +512,6 @@ export default { ...@@ -518,7 +512,6 @@ export default {
}, },
created() { created() {
this.getUserInfo() this.getUserInfo()
this.getItemByType()
this.getAreaData() this.getAreaData()
}, },
methods: { methods: {
...@@ -530,12 +523,15 @@ export default { ...@@ -530,12 +523,15 @@ export default {
this.isShow = false this.isShow = false
this.hpshow = true this.hpshow = true
this.isPrivate = 1 this.isPrivate = 1
this.itemType = 0
} }
if (this.userType === '00') { if (this.userType === '00') {
this.isShow = true this.isShow = true
this.hpshow = false this.hpshow = false
this.isPrivate = 0 this.isPrivate = 0
this.itemType = 3
} }
this.getItemByType()
console.log('登陆人', res) console.log('登陆人', res)
console.log('this.form--------------------', this.form) console.log('this.form--------------------', this.form)
}) })
...@@ -603,13 +599,6 @@ export default { ...@@ -603,13 +599,6 @@ export default {
console.log('城市名', city) console.log('城市名', city)
}) })
}, },
// 时间段获取
getam() {
console.log(this.useTime)
},
getpm() {
console.log(this.useTime)
},
// 单位时段服务数不可以输入小数 // 单位时段服务数不可以输入小数
handleuseNum() { handleuseNum() {
const parsedValue = parseFloat(this.form.useNum) const parsedValue = parseFloat(this.form.useNum)
...@@ -695,14 +684,7 @@ export default { ...@@ -695,14 +684,7 @@ 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
console.log('value', value)
console.log('morningEnd', morningEnd)
console.log('this.form.useTime.ame', this.form.useTime.ame)
console.log('this.form.useTime.pms', this.form.useTime.pms)
console.log('his.form.useTime.pme', this.form.useTime.pme)
// if (isEmpty(value) && isEmpty(this.form.useTime.ams) || isEmpty(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('上午开始时间第一层报错') console.log('上午开始时间第一层报错')
callback(new Error('请选择上午开始时间')) callback(new Error('请选择上午开始时间'))
...@@ -759,7 +741,7 @@ export default { ...@@ -759,7 +741,7 @@ export default {
}, },
// 获取检查项目下拉框 // 获取检查项目下拉框
getItemByType() { getItemByType() {
listItemByType({ itemType: null }).then(res => { listItemByType({ itemType: this.itemType }).then(res => {
console.log('检查项目', res) console.log('检查项目', res)
this.checkItemOptions = res.rows this.checkItemOptions = res.rows
console.log('xdddd', this.checkItemOptions) console.log('xdddd', this.checkItemOptions)
...@@ -865,5 +847,9 @@ export default { ...@@ -865,5 +847,9 @@ export default {
::v-deep .el-picker-panel { ::v-deep .el-picker-panel {
background-color: #5FB54B; background-color: #5FB54B;
} }
::v-deep.time-select-item.selected:not {
background: #f6fcf5;
}
</style> </style>
...@@ -589,12 +589,12 @@ ...@@ -589,12 +589,12 @@
<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" multiple placeholder="请选择支持检查项目" style="width: 300px" collapse-tags clearable> <el-select v-model="form.checkType" placeholder="请选择支持检查项目" style="width: 250px" multiple collapse-tags clearable>
<el-option <el-option
v-for="(item,index) in dict.type.exam_type" v-for="(item, index) in checkItemOptions"
:key="index.label" :key="index"
:label="item.label" :label="item.name"
:value="item.value" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -621,6 +621,7 @@ import { getInfo } from '@/api/login' ...@@ -621,6 +621,7 @@ import { getInfo } from '@/api/login'
import { listCheckManage } from '@/api/business/manage' import { listCheckManage } from '@/api/business/manage'
import { isEmpty, parseTime, selectDictLabels } from '@/utils/ruoyi' import { isEmpty, parseTime, selectDictLabels } from '@/utils/ruoyi'
import { deepClone } from '@/utils' import { deepClone } from '@/utils'
import { listItemByType } from '@/api/business/item'
export default { export default {
name: 'EquipmentDetail', name: 'EquipmentDetail',
dicts: ['device_status', 'device_type', 'exam_type', 'check_type', 'service_area'], dicts: ['device_status', 'device_type', 'exam_type', 'check_type', 'service_area'],
...@@ -671,6 +672,7 @@ export default { ...@@ -671,6 +672,7 @@ export default {
addtions: { addtions: {
names: '' names: ''
}, },
addressList: [],
addForm: { addForm: {
province: '', province: '',
county: '', county: '',
...@@ -798,6 +800,8 @@ export default { ...@@ -798,6 +800,8 @@ export default {
citys: regionData, citys: regionData,
// 支持服务地区 // 支持服务地区
serviceAreaS: [], serviceAreaS: [],
// 检查项目下拉框
checkItemOptions: [],
serviceAreaList: [ serviceAreaList: [
{ {
...@@ -844,11 +848,14 @@ export default { ...@@ -844,11 +848,14 @@ export default {
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.userType === '00') { if (this.userType === '00') {
this.isShow = true this.isShow = true
this.hpshow = false this.hpshow = false
this.itemType = 3
} }
this.getItemByType()
console.log('登陆人', res) console.log('登陆人', res)
}) })
}, },
...@@ -981,6 +988,14 @@ export default { ...@@ -981,6 +988,14 @@ export default {
} }
} }
}, },
// 获取检查项目下拉框
getItemByType() {
listItemByType({ itemType: this.itemType }).then(res => {
console.log('检查项目', res)
this.checkItemOptions = res.rows
console.log('xdddd', this.checkItemOptions)
})
},
// 获取地址数据 // 获取地址数据
getAreaData() { getAreaData() {
getAreTreeStructure().then(response => { getAreTreeStructure().then(response => {
...@@ -988,7 +1003,48 @@ export default { ...@@ -988,7 +1003,48 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.removeEmptyChildren(response.data) this.removeEmptyChildren(response.data)
this.areaOptions = response.data this.areaOptions = response.data
console.log('dsa', 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)
} }
}) })
}, },
...@@ -1054,7 +1110,7 @@ export default { ...@@ -1054,7 +1110,7 @@ export default {
form.addressText = this.addtions.names form.addressText = this.addtions.names
} }
if (!isEmpty(form.checkType)) { if (!isEmpty(form.checkType)) {
form.checkType = form.checkType.toString() form.checkType = form.checkType.join(',')
} }
if (!isEmpty(form.serviceArea)) { if (!isEmpty(form.serviceArea)) {
console.log('支持服务地区', form.serviceArea) console.log('支持服务地区', form.serviceArea)
...@@ -1102,42 +1158,18 @@ export default { ...@@ -1102,42 +1158,18 @@ export default {
handleUpdate() { handleUpdate() {
getDevice(this.id).then(response => { getDevice(this.id).then(response => {
this.form = response.data this.form = response.data
// if (this.form.selectedOptions != null && this.form.selectedOptions !== '') {
this.form.selectedOptions = response.data.addressCode.split(',').map(Number) this.form.selectedOptions = response.data.addressCode.split(',').map(Number)
console.log('查询到的地址信息', this.form.selectedOptions) // console.log('查询到的地址信息', this.form.selectedOptions)
// // console.log('this.form.serviceArea', response.data.serviceArea)
// } // console.log(' this.form.serviceAreaText', this.form.serviceAreaText)
// if (this.form.serviceArea != null && this.form.serviceArea !== '') {
console.log('this.form.serviceArea', response.data.serviceArea)
// this.form.serviceAreaText = selectDictLabels(this.dict.type.service_area, this.form.serviceArea)
console.log(' this.form.serviceAreaText', this.form.serviceAreaText)
this.form.serviceArea = response.data.serviceArea.split(';') this.form.serviceArea = response.data.serviceArea.split(';')
// const data = '1,32,368;1,33,372;1,33,373;1,33,374;1,33,375'
// const dataArray = data.split(';')
// const resultArr = []
console.log(' this.areaOptions--------------------------', this.areaOptions) console.log(' this.areaOptions--------------------------', this.areaOptions)
// for (let i = 0; i < this.form.serviceArea.length; i++) {
// // const name = getAreNameById({ idList: dataArray[i] })
// getAreNameById({ idList: this.form.serviceArea[i] }).then(response => {
// let addressText = ''
// for (let i = 0; i < response.data.length; i++) {
// addressText += response.data[i].nameLocal
// }
// resultArr.push(addressText)
// })// 假设 getName() 方法接收一个参数,将每一项传递给它
// }
// console.log('dataArray--------------', resultArr)
// for (let i=0;i<this.form.serviceArea.length;i++){
// let name = getAreNameById()
// }
console.log('支持检查地区回显值', this.form.serviceArea) console.log('支持检查地区回显值', this.form.serviceArea)
if (this.form.checkType != null && this.form.checkType !== '') { if (this.form.checkType != null && this.form.checkType !== '') {
this.form.checkTypeText = selectDictLabels(this.dict.type.exam_type, this.form.checkType) this.form.checkTypeText = selectDictLabels(this.dict.type.exam_type, this.form.checkType)
console.log(' this.form.checkTypeText', this.form.checkTypeText) console.log(' this.form.checkTypeText', this.form.checkTypeText)
this.form.checkType = response.data.checkType.split(',') this.form.checkType = response.data.checkType.split(',').map(Number)
console.log('this.form.checkType', this.form.checkType)
} }
if (this.form.useTime != null && this.form.useTime !== '') { if (this.form.useTime != null && this.form.useTime !== '') {
......
...@@ -88,26 +88,26 @@ ...@@ -88,26 +88,26 @@
</el-button> </el-button>
<el-button <el-button
icon="el-icon-finished" icon="el-icon-finished"
class="fourWordsBtn" class="fourWordswhiteBtn"
@click="selectAll()" @click="selectAll()"
>选择全部 >选择全部
</el-button> </el-button>
<el-button <el-button
icon="el-icon-back" icon="el-icon-back"
class="fourWordsBtn" class="fourWordswhiteBtn"
@click="reverseSelect(deviceList)" @click="reverseSelect(deviceList)"
>反向选择 >反向选择
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:import']" v-hasPermi="['business:device:import']"
class="fourWordsBtn" class="fourWordswhiteBtn"
icon="el-icon-download" icon="el-icon-download"
@click="handleImport" @click="handleImport"
>批量导入 >批量导入
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:export']" v-hasPermi="['business:device:export']"
class="fourWordsBtn" class="fourWordswhiteBtn"
icon="el-icon-upload2" icon="el-icon-upload2"
@click="handleExport" @click="handleExport"
>批量导出 >批量导出
...@@ -371,6 +371,8 @@ export default { ...@@ -371,6 +371,8 @@ export default {
deviceList: [], deviceList: [],
// 弹出层标题 // 弹出层标题
title: '', title: '',
// 查询检查项目下拉框传递的字段
itemType: '',
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
...@@ -473,21 +475,24 @@ export default { ...@@ -473,21 +475,24 @@ export default {
}, },
created() { created() {
this.getList() this.getList()
this.getItemByType() this.getUserInfo()
}, },
methods: { methods: {
// 获取登陆人信息 // 获取登陆人信息
getUserInfo() { getUserInfo() {
getInfo().then(res => { getInfo().then(res => {
console.log('-------------------', res) console.log('-------------------', res)
this.userType = res.user.userType // this.userType = res.user.userType
console.log('this.userTyep', this.userType) // console.log('this.userTyep', this.userType)
if (this.userType === '3') { if (this.userType === '3') {
this.orderShow = false this.orderShow = false
this.itemType = 0
} }
if (this.userType === '00') { if (this.userType === '00') {
this.serviceShow = false this.serviceShow = false
this.itemType = 3
} }
this.getItemByType()
}) })
}, },
// 显示两位数字 // 显示两位数字
...@@ -542,43 +547,6 @@ export default { ...@@ -542,43 +547,6 @@ export default {
}) })
}, },
// // 取消按钮
// cancel() {
// this.open = false
// this.reset()
// },
// // 表单重置
// reset() {
// this.daterangeCreateTime = ''
// this.serviceArea = ''
// this.form = {
// id: null,
// deviceCode: null,
// deptId: null,
// deviceName: null,
// head: null,
// phone: null,
// deviceType: null,
// checkType: null,
// isPrivate: null,
// serviceArea: null,
// reservationMethod: null,
// useTime: null,
// servicePrice: null,
// orderPrice: null,
// status: null,
// useNum: null,
// sort: null,
// delFlag: null,
// createBy: null,
// createTime: null,
// updateBy: null,
// updateTime: null,
// remark: null
//
// }
// this.resetForm('form')
// },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
...@@ -698,7 +666,7 @@ export default { ...@@ -698,7 +666,7 @@ export default {
}, },
// 获取检查项目下拉框 // 获取检查项目下拉框
getItemByType() { getItemByType() {
listItemByType({ itemType: null }).then(res => { listItemByType({ itemType: this.itemType }).then(res => {
console.log('检查项目', res) console.log('检查项目', res)
this.checkItemOptions = res.rows this.checkItemOptions = res.rows
console.log('xdddd', this.checkItemOptions) console.log('xdddd', this.checkItemOptions)
...@@ -736,3 +704,8 @@ export default { ...@@ -736,3 +704,8 @@ export default {
} }
} }
</script> </script>
<style class="scss">
.app-container{
background-color: white;
}
</style>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<el-col :span="8"> <el-col :span="8">
<!--宠物品种--> <!--宠物品种-->
<el-form-item label="宠物品种" prop="petBreed" class="petBreed"> <el-form-item label="宠物品种" prop="petBreed" class="petBreed">
<el-input v-model="detailInfo.petBreed" placeholder="暂无数据" disabled class="half__-5px" />
<el-input <el-input
v-model="detailInfo.petChildBreed" v-model="detailInfo.petChildBreed"
placeholder="暂无数据" placeholder="暂无数据"
......
...@@ -115,14 +115,14 @@ ...@@ -115,14 +115,14 @@
<!-- 缴费信息 --> <!-- 缴费信息 -->
<el-row v-show="treatSchedule<=1"> <el-row v-show="treatSchedule<=1">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="代缴费金额"> <el-form-item label="标准价格">
<span>{{ keepTwoDecimals(checkDetail.payAmount) }}</span> <span>{{ keepTwoDecimals(checkDetail.payAmount) }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="treatSchedule>1"> <el-row v-show="treatSchedule>1">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="缴费金额"> <el-form-item label="支付金额">
<span>{{ keepTwoDecimals(checkDetail.payAmount) }}</span> <span>{{ keepTwoDecimals(checkDetail.payAmount) }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
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