From d1d8b219a4fa88e816d0dcee4a813edbb061b69b Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期二, 16 五月 2023 22:04:27 +0800 Subject: [PATCH] 修改了家庭小医生、通讯录、收藏与荣誉的表格字段宽度以及详情页面的样式 --- ruoyi-ui/src/views/doctor/doctorInfo.vue | 123 +++++++++++++++++++++++++++++----------- 1 files changed, 88 insertions(+), 35 deletions(-) diff --git a/ruoyi-ui/src/views/doctor/doctorInfo.vue b/ruoyi-ui/src/views/doctor/doctorInfo.vue index 0ec6975..33804b3 100644 --- a/ruoyi-ui/src/views/doctor/doctorInfo.vue +++ b/ruoyi-ui/src/views/doctor/doctorInfo.vue @@ -2,47 +2,47 @@ <div class="app-container"> <div class="form-header mt"> <h4 class="dt h4">灏卞尰璁板綍璇︾粏淇℃伅 </h4> - <el-button type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" :disabled="btn">缂栬緫</el-button> +<!-- <el-button v-if="isShow" type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" >缂栬緫</el-button>--> <!-- <br>--> <!-- <el-button type="primary" class="pt" @click="handleExport"--> <!-- v-hasPermi="['self:user:export']" >瀵煎嚭</el-button>--> </div> - <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"> + <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-position="left" label-width="100px"> <!-- <el-form-item label="id" prop="id">--> <!-- <el-input v-model="formData.id" placeholder="璇疯緭鍏d" :maxlength="11" show-word-limit :disabled="true"--> <!-- clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>--> <!-- </el-form-item>--> - <el-form-item label="绫诲瀷" prop="type"> + <el-form-item label="绫诲瀷" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.type" placeholder="璇疯緭鍏ョ被鍨�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="鐥囩姸" prop="symptom"> + <el-form-item label="鐥囩姸" prop="symptom" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.symptom" placeholder="璇疯緭鍏ョ棁鐘�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="鎸佺画鏃堕棿" prop="duration"> + <el-form-item label="鎸佺画鏃堕棿" prop="duration" label-width="80px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.duration" placeholder="璇疯緭鍏ユ寔缁椂闂�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="涓尰澶勬柟" prop="cmedical"> + <el-form-item label="涓尰澶勬柟" prop="cmedical" label-width="80px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.cmedical" placeholder="璇疯緭鍏ヤ腑鍖诲鏂�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="瑗垮尰澶勬柟" prop="wmedical"> + <el-form-item label="瑗垮尰澶勬柟" prop="wmedical" label-width="80px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.wmedical" placeholder="璇疯緭鍏ヨタ鍖诲鏂�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="鍔熸晥" prop="effect"> + <el-form-item label="鍔熸晥" prop="effect" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.effect" placeholder="璇疯緭鍏ュ姛鏁�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="閫傜敤浜�" prop="suitable"> + <el-form-item label="閫傜敤浜�" prop="suitable" label-width="65px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.suitable" placeholder="璇疯緭鍏ラ�傜敤浜�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="澶囨敞" prop="remark"> + <el-form-item label="澶囨敞" prop="remark" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> </el-form-item> @@ -66,20 +66,21 @@ > <span class="el-upload-list__item-actions"> <span + v-if="isShow" class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)" > <i class="el-icon-zoom-in"></i> </span> <span - v-if="!disabled" + v-if="isShow" class="el-upload-list__item-delete" @click="handleDownload(file.url)" > <i class="el-icon-download"></i> </span> <span - v-if="!disabled" + v-if="isShow" class="el-upload-list__item-delete" @click="handleRemove(file)" > @@ -92,28 +93,60 @@ </el-upload> <h4 class="form-header">鍏朵粬闄勪欢 </h4> - <el-upload - action="" - :file-list="fileListOther" - class="upload-demo" - multiple - :on-preview="handlePreview" + <el-upload + action="" + :file-list="fileListOther" + class="upload-demo" + multiple + list-type="picture-card" + :on-preview="handleFileCardPreview" + :on-remove="handleRemove" + :http-request="requestUpload" + :show-file-list="true" + > - :on-remove="handleRemove" - :http-request="requestUpload" - :show-file-list="true" - > - <el-button type="primary">鐐瑰嚮涓婁紶</el-button> - <template #tip> - <div class="el-upload__tip"> - </div> - </template> + <i slot="default" class="el-icon-plus"></i> + <div slot="file" slot-scope="{file}"> + <img + class="el-upload-list__item-thumbnail" + src="../../assets/401_images/401.gif" + alt="" + style="width: 147px; height: 147px" + fit="cover" + > + <span class="el-upload-list__item-actions"> + <span + v-if="isShow" + class="el-upload-list__item-preview" + @click="handleFileCardPreview(file)" + > + <i class="el-icon-zoom-in"></i> + </span> + <span + v-if="isShow" + @click="handleRemove(file)" + class="el-upload-list__item-delete" + + > + <i class="el-icon-download"></i> + </span> + <span + v-if="isShow" + class="el-upload-list__item-delete" + @click="handleRemoveFile(file)" + > + <i class="el-icon-delete"></i> + </span> + </span> - </el-upload> + </div> + + + </el-upload> <el-form-item size="large"> - <el-button type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button> + <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button> </el-form-item> </el-form> @@ -137,7 +170,7 @@ return { cdi:"灏卞尰璁板綍璇︾粏淇℃伅", udi:"灏卞尰璁板綍淇℃伅璇︽儏", - fot:[".jpg",".jif"], + fot:[".jpg",".jif","png"], fileList:[ ], fileListOther:[ @@ -145,7 +178,7 @@ ], dsb:true, btn:false, - + isShow:true, // 灏卞尰璁板綍琛ㄦ牸鏁版嵁 doctorList: [], @@ -222,12 +255,14 @@ jd = this.$route.query.detail this.btn= jd this.dsb = !jd + this.isShow=true document.title = "淇敼灏卞尰璁板綍璇︾粏淇℃伅"; this.$route.meta.title = "淇敼灏卞尰璁板綍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� } else{ document.title = "鏌ョ湅灏卞尰璁板綍璇︾粏淇℃伅"; this.$route.meta.title = "鏌ョ湅灏卞尰璁板綍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� + this.isShow=false } let _this = this @@ -314,10 +349,24 @@ }) }, handleRemoveFile(file) { - alert(23) + for(let i = 0; i < this.fileListOther.length; i++) + { + if(this.fileListOther[i].url==file.url) + this.$delete(this.fileListOther,i); + } }, handleRemove(file) { - alert(323) + for(let i = 0; i < this.fileList.length; i++) + { + if(this.fileList[i].url==file.url) + this.$delete(this.fileList,i); + } + }, + handleFileCardPreview(file){ + this.dialogFileUrl = file.url; + const Base64 = require('js-base64').Base64 + this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl)); + myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); }, handlePictureCardPreview(file) { this.dialogImageUrl = file.url; @@ -331,7 +380,7 @@ download(formData).then(async (response) => { const isLogin = await blobValidate(response); let nt = new Date().getTime() - let filename = 'property_'+nt+'.'+suffix + let filename = 'doctor_'+nt+'.'+suffix const blob = new Blob([response]) saveAs(blob, filename) }) @@ -339,7 +388,8 @@ handleEdit() { this.dsb = false - this.btn = true + // this.btn = true + this.isShow=false }, requestUpload(params) { @@ -378,6 +428,9 @@ </script> <style scoped> +.app-container{ + background-color: #FEF7FC; +} .mt { position: relative; -- Gitblit v1.9.1