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

Merge remote-tracking branch 'origin/master'

parents 51a7d070 48fb2614
<template>
<div class="component-upload-image">
<ImageCropperModal
v-if="cropperVisible"
:visible="cropperVisible"
:url="fileUrl"
:auto-crop-width="autoCropWidth"
:auto-crop-height="autoCropHeight"
@cancel="onConcel"
@confirm="onConfirm"
/>
......@@ -12,7 +11,7 @@
ref="imageUpload"
multiple
action
:accept="['.jpg', '.png', 'jpeg']"
:accept="'.jpg,.png,jpeg'"
list-type="picture-card"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
......@@ -116,7 +115,7 @@ export default {
// 大小限制(MB)
fileSize: {
type: Number,
default: 5
default: 3
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
......@@ -193,13 +192,15 @@ export default {
var img = file.name.substring(file.name.lastIndexOf('.') + 1)
const suffix = img === 'jpg' || img === 'png' || img === 'jpeg'
if (!suffix) {
this.$message.error('文件格式不正确, 请上传png/jpg/jpeg图片格式文件!')
this.$message.error('文件格式不正确, 请上传png/jpg/jpeg图片格式文件')
this.$refs.imageUpload.clearFiles()
return false
}
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize
if (!isLt) {
this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB`)
this.$refs.imageUpload.clearFiles()
return false
}
}
......@@ -221,7 +222,7 @@ export default {
// this.cropperVisible = true
// })
this.fileName = file.name
this.fileName = file.name.replace(/[%;]/g, '')
},
// 点击剪裁弹框的确定按钮
async onConfirm(blob) {
......@@ -258,8 +259,10 @@ export default {
})
},
onConcel(file) {
this.cropperVisible = false
this.$refs.imageUpload.handleRemove(file)
if (file !== 'cancle') {
this.cropperVisible = false
this.$refs.imageUpload.handleRemove(file)
}
},
// 上传前loading加载
handleBeforeUpload(file) {
......@@ -358,10 +361,11 @@ export default {
}
</script>
<style scoped lang="scss">
.customer-upload-area{
.customer-upload-area {
width: 100%;
height: 100%;
.customer-upload-error{
.customer-upload-error {
width: 100%;
height: 100%;
color: #DB4747;
......@@ -371,7 +375,8 @@ export default {
align-content: center;
text-align: center;
font-size: 12px;
.el-icon-picture-outline{
.el-icon-picture-outline {
font-size: 18px;
}
}
......@@ -381,6 +386,7 @@ export default {
::v-deep.hide .el-upload--picture-card {
display: none;
}
// 去掉动画效果
::v-deep .el-list-enter-active,
::v-deep .el-list-leave-active {
......@@ -391,18 +397,15 @@ export default {
opacity: 0;
transform: translateY(0);
}
::v-deep .el-upload-list--picture-card {
line-height: 0;
}
::v-deep .el-upload-list__item {
margin: 0 0.5rem 0 0 !important;
}
.el-upload__tip {
width: 100%;
font-weight: bold;
height: 15px !important;
margin-top: 0 !important;
}
/*加载失败-失败图标和文字位置布局*/
.parent-container {
padding-top: 30%;
......
......@@ -303,7 +303,13 @@
<el-button :loading="submitShow" class="queryBtn" size="mini" icon="el-icon-check" @click="submitForm">
提交
</el-button>
<el-button class="resetBtn" size="mini" icon="el-icon-back" @click="cancel">返 回</el-button>
<back-btn
button-text="返 回"
button-class="resetBtn"
:click-action="cancel"
:is-show-confirm="true"
/>
<!-- <el-button class="resetBtn" size="mini" icon="el-icon-back" @click="cancel">返 回</el-button>-->
</el-col>
</el-row>
......@@ -321,9 +327,12 @@ import { isEmpty } from '@/utils/ruoyi'
import { deepClone } from '@/utils'
import { listItemByType } from '@/api/business/item'
import { signHospitalMessage } from '@/api/business/hospital'
import backBtn from '@/components/BackBtn/index.vue'
import { mapGetters } from 'vuex'
export default {
name: 'EquipmentAdd',
components: { backBtn },
dicts: ['device_status', 'device_type', 'exam_type', 'check_type', 'service_area'],
data() {
......@@ -488,9 +497,9 @@ export default {
pme: null
}
},
}
// 登陆人类型
userType: ''
// userType: ''
}
},
watch: {
......@@ -507,10 +516,14 @@ export default {
deep: true
}
},
computed: {
...mapGetters(['userType'])
},
created() {
this.getUserInfo()
this.getAreaData()
this.getHospital()
// console.log("这位我从vue拿到的",this.userType)
},
methods: {
// 获取登陆人信息
......
......@@ -17,7 +17,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="设备名称">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" class="inputWidth" disabled />
<el-input v-model="form.deviceName" placeholder="-" class="inputWidth" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -27,7 +27,7 @@
</el-col>
<el-col :span="8">
<el-form-item v-if="isShow" label="平台自有设备">
<el-select v-model="form.isPrivate" disabled class="inputWidth" placeholder="请选择平台自有设备">
<el-select v-model="form.isPrivate" disabled class="inputWidth" placeholder="-">
<el-option
v-for="(item, index) in optionsp"
:key="index"
......@@ -38,7 +38,7 @@
</el-form-item>
<el-form-item v-if="hpshow" label="医院自有设备">
<el-select v-model="form.isPrivate" disabled class="inputWidth" placeholder="请选择医院自有设备">
<el-select v-model="form.isPrivate" disabled class="inputWidth" placeholder="-">
<el-option
v-for="(item ,index) in optionsh"
:key="index"
......@@ -80,7 +80,7 @@
<el-col :span="16">
<el-form-item label="服务地点">
<InputTips :text="form.addressText" width="18.75rem" />
<InputTips :text="form.addressText" width="18.75rem" placeholder="-" />
</el-form-item>
<el-form-item prop="address">
<el-input
......@@ -290,7 +290,7 @@
>使用信息
</div>
</div>
<el-table :data="useList" :header-cell-style="{ background:'#F4F4F4'}" border>
<el-table :data="useList" :header-cell-style="{ background:'#F4F4F4'}" >
<el-table-column label="检查项目" align="center" prop="checkItemsName" show-overflow-tooltip />
<el-table-column label="宠物昵称" align="center" prop="petNickname" show-overflow-tooltip />
<el-table-column label="宠主姓名" align="center" prop="nickname" show-overflow-tooltip />
......@@ -595,7 +595,7 @@
</div>
</el-col>
</el-row>
8
<!-- 8-->
<el-row>
<el-col>
<el-form-item label="支持服务地区" prop="serviceArea">
......@@ -615,7 +615,7 @@
</el-form-item>
</el-col>
</el-row>
9
<!-- 9-->
<el-row>
<el-col>
<el-form-item label="支持检查项目" prop="checkType">
......@@ -642,7 +642,13 @@
<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="resetBtn" size="mini" icon="el-icon-back" @click="cancel">返回</el-button>
<back-btn
button-text="返 回"
button-class="resetBtn"
:click-action="cancel"
:is-show-confirm="true"
/>
<!-- <el-button class="resetBtn" size="mini" icon="el-icon-back" @click="cancel">返回</el-button>-->
</el-col>
</el-row>
</el-card>
......@@ -663,10 +669,11 @@ import { listItemByType } from '@/api/business/item'
import { mapGetters } from 'vuex'
import { signHospitalMessage } from '@/api/business/hospital'
import InputTips from '@/components/InputTips/InputTips.vue'
import backBtn from '@/components/BackBtn/index.vue'
export default {
name: 'EquipmentDetail',
components: { InputTips },
components: { backBtn, InputTips },
dicts: ['device_status', 'device_type', 'exam_type', 'check_type', 'service_area'],
data() {
return {
......@@ -853,19 +860,15 @@ export default {
hpshow: ''
}
},
mounted: function() {
this.$route.meta.title = '2222'
},
created() {
this.$route.meta.title = '2222'
this.id = this.$route.query.id
this.identify = this.$route.query.identify
this.form.isPrivate = this.$route.query.isPrivate
console.time('start option')
// console.time('start option')
Promise.all([this.getUserInfo(), this.getAreaData(), this.getuseList(), this.getItemByType()])
.then(_ => {
console.timeLog('start option')
console.time('detail')
// console.timeLog('start option')
// console.time('detail')
this.handleUpdate()
})
},
......@@ -1143,6 +1146,16 @@ export default {
data.createTimeShow = this.replace(data.createTime)
// 回显检查项目
data.checkType = data.checkType.filter(item => {
let flag = false
this.checkItemOptions.forEach(row => {
if (row.id === item) {
flag = true
}
})
return flag
})
data.checkTypeText = this.checkItemOptions.filter(({ id }) => data.checkType.includes(id))
.map(({ name }) => name)
.join(',')
......
......@@ -671,6 +671,9 @@ export default {
listPlatformItem({ itemType: '2' }).then(res => {
console.log('检查项目下拉框数据', res.rows)
this.checkItemOptions = res.rows
if (this.checkItemOptions.length > 0) {
this.checkItemOptions.unshift({ id: '', name: '全部' })
}
})
},
/** 获取所有设备用于设备下拉 */
......
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