From a6ebc31850a2201654eb4269d1a4c6482dcf2f79 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Thu, 19 Jun 2025 18:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=BB=E9=99=A2=E3=80=81?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D=E7=A7=B0=EF=BC=9B=E8=A1=A5=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=8E=A5=E5=8F=A3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HoverButton.vue | 2 + src/style/theme/index.css | 8 +- src/utils/request.js | 3 +- src/views/DoctorInformation.vue | 326 +++++++++++++++++++++++++++------------- src/views/HomeView.vue | 7 +- src/views/HosInformation.vue | 267 ++++++++++++++++---------------- src/views/elementGroups.vue | 10 +- 7 files changed, 371 insertions(+), 252 deletions(-) diff --git a/src/components/HoverButton.vue b/src/components/HoverButton.vue index 2f80849..251478e 100644 --- a/src/components/HoverButton.vue +++ b/src/components/HoverButton.vue @@ -5,6 +5,8 @@ @mouseenter="isHovered = true" @mouseleave="isHovered = false" @click="$emit('click')" + @click.stop + type="normal" >
diff --git a/src/style/theme/index.css b/src/style/theme/index.css index 837bfd4..ef18385 100644 --- a/src/style/theme/index.css +++ b/src/style/theme/index.css @@ -1640,7 +1640,7 @@ border: 1px solid #dfe2e6; -webkit-box-sizing: border-box; box-sizing: border-box; - color: #606266; + color: #1e2226; display: inline-block; font-size: inherit; height: 40px; @@ -15597,13 +15597,15 @@ border-color:#006AFF !important; float: left; font-size: 14px; color: #606266; - line-height: 40px; + line-height: 18px; white-space: nowrap; padding: 0 12px 0 0; -webkit-box-sizing: border-box; box-sizing: border-box } - +.column .el-form-item__label{ + margin-bottom: 12px; +} .el-form-item__content { line-height: 40px; position: relative; diff --git a/src/utils/request.js b/src/utils/request.js index b2af3f1..a3ff1b9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,7 +7,8 @@ const service = axios.create({ baseURL:baseURL, // 从环境变量中读取 API 基础地址 timeout: 60000, // 请求超时时间 headers: { - 'Content-Type': 'application/x-www-form-urlencoded' + 'Content-Type': 'application/x-www-form-urlencoded', + 'AUTHADMIN' :'b10346e6-5003-4644-8e48-e14f49874338' }, }); diff --git a/src/views/DoctorInformation.vue b/src/views/DoctorInformation.vue index a94421d..3ee8fd1 100644 --- a/src/views/DoctorInformation.vue +++ b/src/views/DoctorInformation.vue @@ -5,56 +5,97 @@
-
-
医生照片 - + + +
+ + +
支持png、jpg格式,尺寸32PX*32PX
+
- - -
支持png、jpg格式,尺寸32PX*32PX
-
-
- + +
+ v-model="siteForm.idcard" prop="idcard" placeholder="请输入" />
- +
+

初诊审批

+ +
+
+ + +
+
+
+ + 审批人电话、微信,至少填写一项 +
+ + +
审批人微信二维码,大小2M以内
+
+
+
+
+
+
+ +
+

个人介绍

- +
- - +
-
- +
@@ -66,7 +107,7 @@ import GuipInput from '@/components/GuipInput.vue'; import GuipTextarea from '@/components/GuipTextarea.vue'; import GroupFormBtns from '@/components/GroupFormBtns.vue'; import GuipSelect from '@/components/GuipSelect.vue'; -// import {setHighActive} from '@/utils/common'; +import GuipRadio from '@/components/GuipRadio.vue'; export default { // 站点设置 name: '', @@ -74,6 +115,7 @@ export default { components: { HoverButton, GuipFormItem, + GuipRadio, GuipInput, GuipSelect, GuipTextarea, @@ -84,7 +126,7 @@ export default { return { doctorId: '', fileList: [ - { name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' } + // { name: 'image.jpeg', url: 'http://jasonyizherenxin.checkcopy.com/user_avatar/1.png?v=93940df0b596961c42de23ef1f2d3257' } ], options_payword: [{ value: '选项1', @@ -102,54 +144,61 @@ export default { value: '选项5', label: '北京烤鸭' }], + groupOptions: [ + { label: '需审批', value: '1' }, + { label: '不需审批', value: '2' }, + ], + formData: null, siteForm: { - name: 'mingzi', - idCard: '', + doctor_name: '', + idcard: '', phone: '', - img: '', + avator: '', + doctor_desc: '', + doctor_detail: '', + label: '', + first_visit_audit:'1', + approve_phone:'' }, - form: { - description: '', - detailDesc: '', - tags: '' + oldForm: {}, + siteFormrules2: { + first_visit_audit: [ + { required: true, message: '请选择初诊审批设置', trigger: 'change'} + ] }, siteFormrules: { - name: [ + doctor_name: [ { required: true, message: '请输入姓名', trigger: 'blur' } ], - idCard: [ - { required: true, message: '请输入身份证号', trigger: 'blur' } - ], phone: [ - { required: true, message: '请输入手机号', trigger: 'blur' } - ] - }, - siteForm1: { - domain_set: '', - domain_source: '平台免费域名', - }, - siteForm2: { - zhifubao_pay: '', - weixin_pay: '', - }, - siteFormrules1: { - tags: [ - { required: true, message: '请输入站点简称', trigger: 'change' } + { required: true, message: '请输入手机号', trigger: 'blur' }, + { + pattern: /^1[3-9]\d{9}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ], + idcard: [ + { required: true, message: '请输入身份证号', trigger: 'blur' }, + { + pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, + message: '请输入正确的身份证号码', + trigger: 'blur' + } + ], + avator: [ + { + validator: (rule, value, callback) => { + if (!this.fileList.length && !this.siteForm.avator) { + callback(new Error('请上传医生照片')); + } else { + callback(); + } + }, + trigger: 'change' + } ] - }, - domain_source: [ - { label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" }, - { label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" }, - ], - options_weixin_null: { - label: '暂无收款账号', - value: '暂时没有收款账号,我想稍后配置', - desc: '暂无收款账号,稍后配置' - }, - select_placeholder_weixin: '暂无收款账号,稍后配置', - selectedItemWeixin: {},//微信收款方式 - options_weixin: [], - options_zhifubao: [], + } } }, computed: { @@ -165,11 +214,20 @@ export default { }, methods: { fetchDoctorData(id) { - this.$http('POST', '/supernew/ajax_get_type_batch_list', { - id + this.$http('POST', '/api/admin/get_doctor_baseinfo', { + did: id }).then(response => { - this.projectTagData = response.data - + if (response.code == 0) { + let obj = JSON.parse(JSON.stringify(this.siteForm)) + this.oldForm = { ...obj,...response.data } + this.siteForm = { ...this.siteForm,...response.data } + if (response.data.avator) { + this.fileList = [{ + name: 'avator', + url: response.data.avator + }]; + } + } }).catch(error => { console.error(error, 'error') }) @@ -182,11 +240,43 @@ export default { handlePreview(file) { console.log(file); }, + radioChange(data) { + console.log(data, 'radio--data'); + }, + uploadAvatar() { + return new Promise((resolve) => { + if (this.fileList.length) { + const formData = new FormData(); + formData.append('file', this.fileList[0].raw); + this.$http.post('/api/upload', formData).then(res => { + resolve(res.data.url); + }); + } else { + resolve(this.siteForm.avator); + } + }); + }, + handleFileChange(file, fileList) { + console.log(file,fileList,'======file'); + this.siteForm.avator = fileList.length ? 'uploaded' : ''; + this.$refs.siteForm.validateField('avator'); + this.fileList = fileList + + // 创建FormData对象 + this.formData = new FormData() + fileList.forEach(item => { + this.formData.append('files', item.raw) + }) + + // 可以在这里添加其他表单数据 + this.formData.append('extraParam', 'value') + }, // 上传图片 handleAvatarSuccess(res, file) { this.imageUrl1 = URL.createObjectURL(file.raw); }, beforeAvatarUpload(file) { + console.log(file,'=====file'); const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'; const isLt2M = file.size / 1024 / 1024 < 2; @@ -198,46 +288,61 @@ export default { } return isJPG && isLt2M; }, - changeNormalWeixin() { - - }, - changeSelectWeixin(item, flag) { - if (flag) { - this.select_placeholder_weixin = this.options_weixin_null.desc; - return + submitForm(form) { + if (form == 'siteForm') { + this.$refs[form].validate((valid) => { + if (valid) { + this.$http('POST', '/supernew/ajax_get_type_batch_list', { + did: this.doctorId, + name: this.siteForm.doctor_name, + idcard: this.siteForm.idcard, + avatar_file: this.siteForm.avator, + phone: this.siteForm.phone + }).then(response => { + if (response.code == 0) { + this.$Message.success('修改成功') + } + }).catch(error => { + console.error(error, 'error') + }) + } else { + return false; + } + }); + } else { + this.$http('POST', '/supernew/ajax_get_type_batch_list', { + did: this.doctorId, + desc: form.doctor_desc, + detail: form.doctor_detail, + label: form.label + }).then(response => { + if (response.code == 0) { + this.$Message.success('修改成功') + } + }).catch(error => { + console.error(error, 'error') + }) } - this.selectedItem = { ...item }; - console.log(this.selectedItem, 'this.selectedItem===='); }, - // 销售渠道 - domain_radioChange(type) { - console.log(type, '--'); - }, - onSwitchChange(data) { - console.log(data, '---'); - }, - submitForm(form) { - console.log(this.$refs[form], '-----'); - this.$refs[form].validate((valid) => { - if (valid) { - this.$http('POST', '/supernew/ajax_get_type_batch_list', { - name: form.name, - idCard: form.idCard, - phone: form.phone - }).then(response => { - this.projectTagData = response.data + cancelClick(type) { + // siteForm + if (type == 'siteForm1') { + this.siteForm = { + ...this.siteForm, + doctor_desc: this.oldForm.doctor_desc, + doctor_detail: this.oldForm.doctor_detail, + label: this.oldForm.label, + } - }).catch(error => { - console.error(error, 'error') - }) - alert('提交成功!'); - } else { - return false; + } else { + this.siteForm = { + ...this.siteForm, + name: this.oldForm.name, + idcard: this.oldForm.idcard, + avatar_file: this.oldForm.avatar_file, + phone: this.oldForm.phone } - }); - }, - cancelClick() { - console.log('quxiao'); + } }, confirmClick(type) { console.log(type, '确认'); @@ -252,6 +357,14 @@ export default { transition: all .5s; border: 1px solid transparent; } +.special-form-item { + .el-form-item__label{ + margin-bottom: 12px; + } + .custom-label{ + gap: 6px; + } +} .addStore { margin-top: 12px; @@ -259,7 +372,9 @@ export default { .qqCode-wrap { margin-bottom: 14px; - + display: flex; + width: 100%; + justify-content: flex-start; .labelImg { opacity: .7; margin-left: 8px; @@ -270,7 +385,6 @@ export default { flex-direction: column; align-items: flex-start; justify-content: flex-start; - margin: 12px 0 8px; } .avatar-desc { diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 0c47ce8..9b441e0 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -230,15 +230,10 @@ export default { getInitData(){ this.$store.dispatch('showLoading') this.$http('POST', '/api/admin/doctor_depart_list', { - // doctorName:this.doctorName - },{ - headers:{ - 'AUTHADMIN' :'b10346e6-5003-4644-8e48-e14f49874338' - } }).then(response => { if (response.code == 0) { - this.$store.dispatch('hideLoading') this.doctorList = response.data + this.$store.dispatch('hideLoading') } }).catch(error => { diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue index 57bbdcf..3135c2c 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -1,39 +1,39 @@