Browse Source

修改医院、医生信息页面字段名称;补全部分接口逻辑

admin_version1.0_2025_06_26
zq 4 weeks ago
parent
commit
a6ebc31850
  1. 2
      src/components/HoverButton.vue
  2. 8
      src/style/theme/index.css
  3. 3
      src/utils/request.js
  4. 326
      src/views/DoctorInformation.vue
  5. 7
      src/views/HomeView.vue
  6. 267
      src/views/HosInformation.vue
  7. 10
      src/views/elementGroups.vue

2
src/components/HoverButton.vue

@ -5,6 +5,8 @@
@mouseenter="isHovered = true" @mouseenter="isHovered = true"
@mouseleave="isHovered = false" @mouseleave="isHovered = false"
@click="$emit('click')" @click="$emit('click')"
@click.stop
type="normal"
> >
<!-- 图片/图标部分 --> <!-- 图片/图标部分 -->
<div class="button-icon"> <div class="button-icon">

8
src/style/theme/index.css

@ -1640,7 +1640,7 @@
border: 1px solid #dfe2e6; border: 1px solid #dfe2e6;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
color: #606266; color: #1e2226;
display: inline-block; display: inline-block;
font-size: inherit; font-size: inherit;
height: 40px; height: 40px;
@ -15597,13 +15597,15 @@ border-color:#006AFF !important;
float: left; float: left;
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
line-height: 40px; line-height: 18px;
white-space: nowrap; white-space: nowrap;
padding: 0 12px 0 0; padding: 0 12px 0 0;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box box-sizing: border-box
} }
.column .el-form-item__label{
margin-bottom: 12px;
}
.el-form-item__content { .el-form-item__content {
line-height: 40px; line-height: 40px;
position: relative; position: relative;

3
src/utils/request.js

@ -7,7 +7,8 @@ const service = axios.create({
baseURL:baseURL, // 从环境变量中读取 API 基础地址 baseURL:baseURL, // 从环境变量中读取 API 基础地址
timeout: 60000, // 请求超时时间 timeout: 60000, // 请求超时时间
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded',
'AUTHADMIN' :'b10346e6-5003-4644-8e48-e14f49874338'
}, },
}); });

326
src/views/DoctorInformation.vue

@ -5,56 +5,97 @@
<el-form :model="siteForm" :rules="siteFormrules" ref="siteForm"> <el-form :model="siteForm" :rules="siteFormrules" ref="siteForm">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<div class="qqCode-wrap right"> <el-form-item prop="avator" label="" class="special-form-item">
<div class="flex">医生照片 <template #label>
<img class="labelImg" src="@/assets/form_qua_ic.svg" alt=""> <div class="custom-label flex">
医生照片
<img class="labelImg" src="@/assets/require.svg" alt="">
<el-tooltip content="这是提示信息">
<img class="labelImg" src="@/assets/form_qua_ic.svg" alt="">
</el-tooltip>
</div>
</template>
<div class="qqCode-wrap right">
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false"
action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList" :on-change="handleFileChange" :auto-upload="false"
:before-upload="beforeAvatarUpload">
<hover-button slot="trigger" button-text="重新上传"
:default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')"
default-text-color="#23242B" hover-text-color="#006AFF" />
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload>
</div> </div>
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false" </el-form-item>
action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList" <GuipInput ref="GuipInput" column="column" :required="true" label="医生姓名"
:on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleAvatarSuccess" v-model="siteForm.doctor_name" prop="doctor_name" placeholder="请输入" />
:before-upload="beforeAvatarUpload">
<hover-button button-text="重新上传" :default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF" @click="btnClick" />
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload>
</div>
<GuipInput ref="GuipInput" column="column" :required="true" label="医生姓名" v-model="siteForm.name"
prop="name" placeholder="请输入" />
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
<div class="flex-right"> <div class="flex-right">
<GuipInput ref="GuipInput" column="column" :required="true" label="身份证号码" <GuipInput ref="GuipInput" column="column" :required="true" label="身份证号码"
v-model="siteForm.idCard" prop="idCard" placeholder="请输入" /> v-model="siteForm.idcard" prop="idcard" placeholder="请输入" />
<GuipInput ref="GuipInput" column="column" :required="true" label="手机号码" <GuipInput ref="GuipInput" column="column" :required="true" label="手机号码"
v-model="siteForm.phone" prop="phone" placeholder="常用手机号" /> v-model="siteForm.phone" prop="phone" placeholder="常用手机号" />
</div> </div>
</div> </div>
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" /> <GroupFormBtns @cancel="cancelClick('siteForm')" @confirm="submitForm('siteForm')" />
</div> </div>
<div class="siteMessage flex-common" id="siteMessage2"> <div class="siteMessage flex-common" id="siteMessage2">
<p class="littleTitle mb32">初诊审批</p>
<el-form :model="siteForm" :rules="siteFormrules2" ref="siteForm2">
<div class="flex-wrap">
<div class="flex-left">
<GuipRadio v-model="siteForm.first_visit_audit" class="mb12" column="column" :options="groupOptions"
label="初诊是否审批" required prop="first_visit_audit" @change="radioChange" />
<GuipInput ref="GuipInput" column="column" label="审批人电话" desc="审批人电话、微信,至少填写一项"
v-model="siteForm.approve_phone" prop="approve_phone" placeholder="请输入" />
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" label="审批人微信" >
<span class="desc" slot="formRight">审批人电话微信至少填写一项</span>
<div class="qqCode-wrap right" slot="formDom">
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-remove="handleRemove"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
<hover-button button-text="微信二维码"
:default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')"
default-text-color="#23242B" hover-text-color="#006AFF" @click="btnClick" />
<div slot="tip" class="el-upload__tip desc">审批人微信二维码大小2M以内</div>
</el-upload>
</div>
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm2')" />
</div>
<div class="siteMessage flex-common" id="siteMessage2">
<h3>个人介绍</h3> <h3>个人介绍</h3>
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1"> <el-form :model="siteForm" ref="siteForm1">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipInput column="column" v-model="form.description" prop="description" label="一句话介绍" <GuipInput column="column" v-model="siteForm.doctor_desc" prop="doctor_desc" label="一句话介绍"
width="100%" height="56px" placeholder="请输入描述内容" maxlength="14" show-word-limit /> width="100%" height="56px" placeholder="请输入描述内容" maxlength="14" show-word-limit />
<GuipFormItem column="column" class="" label="详细介绍"> <GuipFormItem column="column" class="" label="详细介绍">
<GuipTextarea slot="formDom" v-model="form.detailDesc" prop="description" width="100%" <GuipTextarea slot="formDom" v-model="siteForm.doctor_detail" prop="doctor_detail"
height="86px" autosize placeholder="请输入描述内容" maxlength="不限" show-word-limit /> width="100%" height="86px" autosize placeholder="请输入描述内容" maxlength="不限"
show-word-limit />
</GuipFormItem> </GuipFormItem>
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
<div class="flex-right"> <div class="flex-right">
<GuipSelect column="column" label="个人标签" desc="展示给患者,体现您的专业性" v-model="form.tags" multiple <GuipSelect column="column" label="个人标签" desc="展示给患者,体现您的专业性" v-model="siteForm.label" multiple
:options="options_payword" placeholder="点击选择"> :options="options_payword" placeholder="点击选择">
</GuipSelect> </GuipSelect>
</div> </div>
</div> </div>
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" /> <GroupFormBtns @cancel="cancelClick('siteForm1')" @confirm="submitForm('siteForm1')" />
</div> </div>
</div> </div>
</template> </template>
@ -66,7 +107,7 @@ import GuipInput from '@/components/GuipInput.vue';
import GuipTextarea from '@/components/GuipTextarea.vue'; import GuipTextarea from '@/components/GuipTextarea.vue';
import GroupFormBtns from '@/components/GroupFormBtns.vue'; import GroupFormBtns from '@/components/GroupFormBtns.vue';
import GuipSelect from '@/components/GuipSelect.vue'; import GuipSelect from '@/components/GuipSelect.vue';
// import {setHighActive} from '@/utils/common'; import GuipRadio from '@/components/GuipRadio.vue';
export default { export default {
// //
name: '', name: '',
@ -74,6 +115,7 @@ export default {
components: { components: {
HoverButton, HoverButton,
GuipFormItem, GuipFormItem,
GuipRadio,
GuipInput, GuipInput,
GuipSelect, GuipSelect,
GuipTextarea, GuipTextarea,
@ -84,7 +126,7 @@ export default {
return { return {
doctorId: '', doctorId: '',
fileList: [ 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: [{ options_payword: [{
value: '选项1', value: '选项1',
@ -102,54 +144,61 @@ export default {
value: '选项5', value: '选项5',
label: '北京烤鸭' label: '北京烤鸭'
}], }],
groupOptions: [
{ label: '需审批', value: '1' },
{ label: '不需审批', value: '2' },
],
formData: null,
siteForm: { siteForm: {
name: 'mingzi', doctor_name: '',
idCard: '', idcard: '',
phone: '', phone: '',
img: '', avator: '',
doctor_desc: '',
doctor_detail: '',
label: '',
first_visit_audit:'1',
approve_phone:''
}, },
form: { oldForm: {},
description: '', siteFormrules2: {
detailDesc: '', first_visit_audit: [
tags: '' { required: true, message: '请选择初诊审批设置', trigger: 'change'}
]
}, },
siteFormrules: { siteFormrules: {
name: [ doctor_name: [
{ required: true, message: '请输入姓名', trigger: 'blur' } { required: true, message: '请输入姓名', trigger: 'blur' }
], ],
idCard: [
{ required: true, message: '请输入身份证号', trigger: 'blur' }
],
phone: [ phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' } { required: true, message: '请输入手机号', trigger: 'blur' },
] {
}, pattern: /^1[3-9]\d{9}$/,
siteForm1: { message: '请输入正确的手机号码',
domain_set: '', trigger: 'blur'
domain_source: '平台免费域名', }
}, ],
siteForm2: { idcard: [
zhifubao_pay: '', { required: true, message: '请输入身份证号', trigger: 'blur' },
weixin_pay: '', {
}, pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
siteFormrules1: { message: '请输入正确的身份证号码',
tags: [ trigger: 'blur'
{ required: true, message: '请输入站点简称', trigger: 'change' } }
],
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: { computed: {
@ -165,11 +214,20 @@ export default {
}, },
methods: { methods: {
fetchDoctorData(id) { fetchDoctorData(id) {
this.$http('POST', '/supernew/ajax_get_type_batch_list', { this.$http('POST', '/api/admin/get_doctor_baseinfo', {
id did: id
}).then(response => { }).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 => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
@ -182,11 +240,43 @@ export default {
handlePreview(file) { handlePreview(file) {
console.log(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) { handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw); this.imageUrl1 = URL.createObjectURL(file.raw);
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
console.log(file,'=====file');
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'; const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 2;
@ -198,46 +288,61 @@ export default {
} }
return isJPG && isLt2M; return isJPG && isLt2M;
}, },
changeNormalWeixin() { submitForm(form) {
if (form == 'siteForm') {
}, this.$refs[form].validate((valid) => {
changeSelectWeixin(item, flag) { if (valid) {
if (flag) { this.$http('POST', '/supernew/ajax_get_type_batch_list', {
this.select_placeholder_weixin = this.options_weixin_null.desc; did: this.doctorId,
return 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====');
}, },
// cancelClick(type) {
domain_radioChange(type) { // siteForm
console.log(type, '--'); if (type == 'siteForm1') {
}, this.siteForm = {
onSwitchChange(data) { ...this.siteForm,
console.log(data, '---'); doctor_desc: this.oldForm.doctor_desc,
}, doctor_detail: this.oldForm.doctor_detail,
submitForm(form) { label: this.oldForm.label,
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
}).catch(error => { } else {
console.error(error, 'error') this.siteForm = {
}) ...this.siteForm,
alert('提交成功!'); name: this.oldForm.name,
} else { idcard: this.oldForm.idcard,
return false; avatar_file: this.oldForm.avatar_file,
phone: this.oldForm.phone
} }
}); }
},
cancelClick() {
console.log('quxiao');
}, },
confirmClick(type) { confirmClick(type) {
console.log(type, '确认'); console.log(type, '确认');
@ -252,6 +357,14 @@ export default {
transition: all .5s; transition: all .5s;
border: 1px solid transparent; border: 1px solid transparent;
} }
.special-form-item {
.el-form-item__label{
margin-bottom: 12px;
}
.custom-label{
gap: 6px;
}
}
.addStore { .addStore {
margin-top: 12px; margin-top: 12px;
@ -259,7 +372,9 @@ export default {
.qqCode-wrap { .qqCode-wrap {
margin-bottom: 14px; margin-bottom: 14px;
display: flex;
width: 100%;
justify-content: flex-start;
.labelImg { .labelImg {
opacity: .7; opacity: .7;
margin-left: 8px; margin-left: 8px;
@ -270,7 +385,6 @@ export default {
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: flex-start; justify-content: flex-start;
margin: 12px 0 8px;
} }
.avatar-desc { .avatar-desc {

7
src/views/HomeView.vue

@ -230,15 +230,10 @@ export default {
getInitData(){ getInitData(){
this.$store.dispatch('showLoading') this.$store.dispatch('showLoading')
this.$http('POST', '/api/admin/doctor_depart_list', { this.$http('POST', '/api/admin/doctor_depart_list', {
// doctorName:this.doctorName
},{
headers:{
'AUTHADMIN' :'b10346e6-5003-4644-8e48-e14f49874338'
}
}).then(response => { }).then(response => {
if (response.code == 0) { if (response.code == 0) {
this.$store.dispatch('hideLoading')
this.doctorList = response.data this.doctorList = response.data
this.$store.dispatch('hideLoading')
} }
}).catch(error => { }).catch(error => {

267
src/views/HosInformation.vue

@ -1,39 +1,39 @@
<template> <template>
<div class="site-setting-wrap pagePadding min-flex-right"> <div class="site-setting-wrap pagePadding min-flex-right">
<p class="pageTitle bold">基础信息</p> <p class="pageTitle bold mt24 mb24">基础信息</p>
<div class="siteMessage flex-common" id="siteMessage1"> <div class="siteMessage flex-common" id="siteMessage1">
<p class="littleTitle mb32">基础信息</p> <p class="littleTitle mb32">基础信息</p>
<el-form :model="siteForm" :rules="siteFormrules" ref="siteForm"> <el-form :model="form" :rules="siteFormrules" ref="siteForm">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true"> <GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true">
<div class="flex-between" slot="formDom"> <div class="flex-between" slot="formDom">
<div class="short-width"> <div class="short-width">
<GuipSelect width="100%" v-model="form.tags" multiple :options="options_payword" <GuipSelect width="100%" v-model="form.province" multiple :options="options_payword"
placeholder="选择省份"> placeholder="选择省份">
</GuipSelect> </GuipSelect>
</div> </div>
<div class="short-width"> <div class="short-width">
<GuipSelect width="100%" v-model="form.tags" multiple :options="options_payword" <GuipSelect width="100%" v-model="form.city" multiple :options="options_payword"
placeholder="选择城市"> placeholder="选择城市">
</GuipSelect> </GuipSelect>
</div> </div>
</div> </div>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true"> <GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_name" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.company_name"
prop="company_name" placeholder="请输入"> prop="company_name" placeholder="请输入">
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" /> <img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" />
</GuipInput> </GuipInput>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="医院简称"> <GuipFormItem column="column" class="mb24" label="医院简称">
<span slot="formRight" class="desc">方便患者记忆非必填</span> <span slot="formRight" class="desc">方便患者记忆非必填</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_address" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name"
prop="company_address" placeholder="请输入" /> prop="h_name" placeholder="请输入" />
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="所在科室" :required="true"> <GuipFormItem column="column" class="mb24" label="所在科室" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_address" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.depart_name"
prop="company_address" placeholder="请输入" /> prop="depart_name" placeholder="请输入" />
</GuipFormItem> </GuipFormItem>
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
@ -41,23 +41,23 @@
<GuipFormItem column="column" class="mb24"> <GuipFormItem column="column" class="mb24">
<div slot="formLeft" class="form-top-icon">医保定点</div> <div slot="formLeft" class="form-top-icon">医保定点</div>
<div class="flex" slot="formDom" style="padding: 9px 0px;"> <div class="flex" slot="formDom" style="padding: 9px 0px;">
<GuipSwitch :modelValue="yibao" @change="onSwitchChange" activeText="非医保定点" <GuipSwitch :modelValue="Boolean(form.is_fixed)" @change="onSwitchChange" activeText="非医保定点"
inactiveText="非医保定点"> inactiveText="非医保定点">
</GuipSwitch> </GuipSwitch>
</div> </div>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="使用功能"> <GuipFormItem column="column" class="mb24" label="使用功能">
<el-checkbox-group slot="formDom" v-model="checkList" class="checkboxGroup"> <el-checkbox-group slot="formDom" v-model="form.type" class="checkboxGroup">
<div class="flex"> <div class="flex">
<el-checkbox label="医生名片(基础功能不可取消)"></el-checkbox> <el-checkbox label="医生名片(基础功能不可取消)" value="2"></el-checkbox>
<el-checkbox label="患者预约"></el-checkbox> <el-checkbox label="患者预约" value="0"></el-checkbox>
</div> </div>
<el-checkbox label="项目计数"></el-checkbox> <el-checkbox label="项目计数" value="1"></el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="" label="就诊提醒"> <GuipFormItem column="column" class="" label="就诊提醒">
<div slot="formRight" class="desc">就诊前的注意事项非必填</div> <div slot="formRight" class="desc">就诊前的注意事项非必填</div>
<GuipTextarea slot="formDom" v-model="form.detailDesc" prop="description" width="100%" <GuipTextarea slot="formDom" v-model="form.notice" prop="notice" width="100%"
height="84px" autosize placeholder="输入" /> height="84px" autosize placeholder="输入" />
</GuipFormItem> </GuipFormItem>
</div> </div>
@ -65,53 +65,24 @@
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" /> <GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" />
</div> </div>
<div class="siteMessage flex-common" id="siteMessage2">
<p class="littleTitle mb32">初诊审批</p> <div class="siteMessage flex-common mt12" id="siteMessage3">
<el-form :model="siteForm2" :rules="siteFormrules2" ref="siteForm2">
<div class="flex-wrap">
<div class="flex-left">
<GuipRadio v-model="siteForm2.isApprove" class="mb12" column="column" :options="groupOptions"
label="初诊是否审批" required prop="isApprove" @change="radioChange" />
<GuipInput ref="GuipInput" column="column" label="审批人电话" desc="审批人电话、微信,至少填写一项"
v-model="siteForm2.phone" prop="phone" placeholder="请输入" />
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" label="审批人微信" >
<span class="desc" slot="formRight">审批人电话微信至少填写一项</span>
<div class="qqCode-wrap right" slot="formDom">
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-remove="handleRemove"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
<hover-button button-text="微信二维码"
:default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')"
default-text-color="#23242B" hover-text-color="#006AFF" @click="btnClick" />
<div slot="tip" class="el-upload__tip desc">审批人微信二维码大小2M以内</div>
</el-upload>
</div>
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm2')" />
</div>
<div class="siteMessage flex-common" id="siteMessage3">
<p class="littleTitle mb32">出诊时间</p> <p class="littleTitle mb32">出诊时间</p>
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1"> <el-form :model="form" :rules="siteFormrules1" ref="siteForm1">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipFormItem column="column" class="mb24" label="工作时间( 上午 )" :required="true"> <GuipFormItem column="column" class="mb24" label="工作时间( 上午 )" :required="true">
<el-time-picker slot="formDom" style="width:100%" is-range v-model="time1" <el-time-picker slot="formDom" style="width:100%" is-range v-model="form.morning_worktime"
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"
@change="ChangeTime('time1')"> @change="ChangeTime('time1')" format="HH:mm"
value-format="HH:mm">
</el-time-picker> </el-time-picker>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="工作时间( 下午 )" :required="true"> <GuipFormItem column="column" class="mb24" label="工作时间( 下午 )" :required="true">
<el-time-picker slot="formDom" style="width:100%" is-range v-model="time2" <el-time-picker slot="formDom" style="width:100%" is-range v-model="form.afternoon_worktime"
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"
@change="ChangeTime('time1')"> @change="ChangeTime('time1')" format="HH:mm"
value-format="HH:mm">
</el-time-picker> </el-time-picker>
</GuipFormItem> </GuipFormItem>
</div> </div>
@ -119,8 +90,8 @@
<div class="flex-right"> <div class="flex-right">
<GuipFormItem column="column" label="每周出诊安排" :required="true"> <GuipFormItem column="column" label="每周出诊安排" :required="true">
<div class="flex weekPlan" slot="formDom"> <div class="flex weekPlan" slot="formDom">
<GuipSelect v-for="[key] in Object.entries(weekPlan)" :key="key" v-model="weekPlan[key]" <GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan"
:options="options_weekPlan" @change="weekChange()" :label="key" placeholder="休息"> :options="options_weekPlan" @change="weekChange()" :label="day.name" placeholder="休息">
</GuipSelect> </GuipSelect>
</div> </div>
</GuipFormItem> </GuipFormItem>
@ -129,45 +100,44 @@
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" /> <GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
</div> </div>
<div class="siteMessage flex-common" id="siteMessage4"> <div class="siteMessage flex-common mt12" id="siteMessage4">
<p class="littleTitle mb32">放号设置</p> <p class="littleTitle mb32">放号设置</p>
<el-form :model="numSettingForm" :rules="numSettingFormRule" ref="numSettingForm"> <el-form :model="form" :rules="numSettingFormRule" ref="numSettingForm">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipFormItem column="column" class="mb24" label="号源单位时段" :required="true"> <GuipFormItem column="column" class="mb24" label="号源单位时段" :required="true">
<span class="desc" slot="formRight">如30分钟放号时9:00-9:309:30-10:00来划分</span> <span class="desc" slot="formRight">如30分钟放号时9:00-9:309:30-10:00来划分</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.times" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.time_unit"
prop="times" placeholder="请输入" unit="分钟/时段" /> prop="time_unit" placeholder="请输入" unit="分钟/时段" />
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="放号量" :required="true"> <GuipFormItem column="column" class="mb24" label="放号量" :required="true">
<span class="desc" slot="formRight">放号量可少于实际数量以便为现场约号患者预留</span> <span class="desc" slot="formRight">放号量可少于实际数量以便为现场约号患者预留</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.nums" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.time_unit_num"
prop="nums" placeholder="请输入" unit="个号/时段" /> prop="time_unit_num" placeholder="请输入" unit="个号/时段" />
</GuipFormItem> </GuipFormItem>
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
<div class="flex-right"> <div class="flex-right">
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true"> <GuipFormItem column="column" class="mb24" label="开放预约" :required="true">
<span class="desc" slot="formRight">患者可提前多久约号</span> <span class="desc" slot="formRight">患者可提前多久约号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.hours" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.visit_day"
prop="hours" placeholder="请输入" unit="小时"> prop="visit_day" placeholder="请输入" unit="小时">
<span slot="prependshow">提前</span> <span slot="prependshow">提前</span>
</GuipInput> </GuipInput>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="超时未就诊提醒"> <GuipFormItem column="column" class="mb24" label="超时未就诊提醒">
<span class="desc" slot="formRight">不输入即无期限</span> <span class="desc" slot="formRight">不输入即无期限</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.days" <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.treat_expire"
prop="days" placeholder="请输入" unit="天" /> prop="treat_expire" placeholder="请输入" unit="天" />
</GuipFormItem> </GuipFormItem>
</div> </div>
</div> </div>
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('numSettingForm')" /> <GroupFormBtns @cancel="cancelClick" @confirm="submitForm('numSettingForm')" />
</div> </div>
<p class="pageTitle bold">项目管理</p> <!-- <p class="pageTitle bold">项目管理</p> -->
<div class="siteMessage flex-common" id="siteMessage5"> <div class="siteMessage flex-common mt12" id="siteMessage5">
<el-form> <el-form>
<div class=" mb32 flex-between"> <div class=" mb32 flex-between">
<span class="littleTitle">项目列表</span> <span class="littleTitle">项目列表</span>
<div class="flex-between" style="gap:10px"> <div class="flex-between" style="gap:10px">
@ -308,8 +278,8 @@ import GuipSelect from '@/components/GuipSelect.vue';
import GuipSwitch from '@/components/GuipSwitch.vue'; import GuipSwitch from '@/components/GuipSwitch.vue';
import GuipTable from '@/components/GuipTable.vue'; import GuipTable from '@/components/GuipTable.vue';
import GuipDialog from '@/components/GuipDialog.vue'; import GuipDialog from '@/components/GuipDialog.vue';
import GuipRadio from '@/components/GuipRadio.vue'; // import GuipRadio from '@/components/GuipRadio.vue';
import HoverButton from '@/components/HoverButton.vue'; // import HoverButton from '@/components/HoverButton.vue';
export default { export default {
// //
@ -321,14 +291,14 @@ export default {
BatchProject, BatchProject,
GuipButton, GuipButton,
GuipDialog, GuipDialog,
GuipRadio, // GuipRadio,
GuipInput, GuipInput,
GuipTable, GuipTable,
GuipSwitch, GuipSwitch,
GuipSelect, GuipSelect,
GuipTextarea, GuipTextarea,
GroupFormBtns, GroupFormBtns,
HoverButton // HoverButton
}, },
data() { data() {
@ -354,10 +324,7 @@ export default {
isIndeterminate1: false, isIndeterminate1: false,
projectSearchId: '', projectSearchId: '',
projectSearchName: '', projectSearchName: '',
groupOptions: [
{ label: '需审批', value: '1' },
{ label: '不需审批', value: '2' },
],
projectList: [ projectList: [
{ {
name: '针灸', name: '针灸',
@ -479,6 +446,15 @@ export default {
'周六': '', '周六': '',
'周日': '', '周日': '',
}, },
weekDays: [
{ id: 1, name: '周一' },
{ id: 2, name: '周二' },
{ id: 3, name: '周三' },
{ id: 4, name: '周四' },
{ id: 5, name: '周五' },
{ id: 6, name: '周六' },
{ id: 7, name: '周日' }
],
time1: '', time1: '',
time2: '', time2: '',
checkList: ['医生名片(基础功能不可取消)'], checkList: ['医生名片(基础功能不可取消)'],
@ -496,7 +472,7 @@ export default {
value: '3', value: '3',
label: '全天' label: '全天'
}, { }, {
value: '4', value: '0',
label: '休息' label: '休息'
},], },],
siteForm: { siteForm: {
@ -505,15 +481,36 @@ export default {
company_phone: '', company_phone: '',
site_alias: '', site_alias: '',
}, },
form: { oldForm: {
description: '', description: '',
detailDesc: '', detailDesc: '',
tags: '' tags: ''
}, },
form: {
province: '',
city: '',
depart_name: '',
address:"万柏林区 晋祠路一段56号凯旋门小区2幢4005",
afternoon_worktime:"14:00-22:00",
depart_id:"1",
h_name:"武丽娜中医针灸",
h_pos:"37.850249,112.53111",
hid:"1",
is_fixed:"1",
morning_worktime:"8:00-11:00",
notice:"周六上午门诊最后一轮扎针到10点50分,11点后到患者的,只开药,不扎针。\r\n初诊患者请先将挂号条交给医助、在门外静坐等待叫号\r\n为了节约大家排号时间,请全部挂号,按挂号顺序治疗\r\n针灸治疗单缴费完毕后请交还医助\r\n药费缴费完毕后交方给药房等待拿药(可办理快递)\r\n请准备一次性医用床单(可现场购买)和户外保温毯(推荐),户外保温毯购买链接:<a href=\"https://m.tb.cn/h.UJglv3C?tk=5KMnd9XFr3D\" target=\"_blank\">https://m.tb.cn/h.UJglv3C?tk=5KMnd9XFr3D</a>",
time_unit:"15",
time_unit_num:"10",
treat_expire:"365",
visit_day:"7"
},
siteFormrules: { siteFormrules: {
site_alias: [ depart_name: [
{ required: true, message: '请输入站点简称', trigger: 'blur' } { required: true, message: '请输入科室信息', trigger: 'blur' }
] ],
h_name: [
{ required: true, message: '请输入出诊医院信息', trigger: 'blur' }
],
}, },
siteForm1: { siteForm1: {
domain_set: '', domain_set: '',
@ -523,36 +520,21 @@ export default {
isApprove: '', isApprove: '',
phone: '' phone: ''
}, },
siteFormrules2: {
isApprove: [
{ required: true, message: '请选择初诊审批设置', trigger: ['change','blur' ]}
]
},
siteFormrules1: { siteFormrules1: {
domain_source: [ domain_source: [
{ required: true, message: '请输入站点简称', trigger: 'blur' } { required: true, message: '请输入站点简称', trigger: 'blur' }
] ]
}, },
domain_source: [
{ label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" },
{ label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" },
],
options_weixin_null: {
label: '暂无收款账号',
value: '暂时没有收款账号,我想稍后配置',
desc: '暂无收款账号,稍后配置'
},
select_placeholder_weixin: '暂无收款账号,稍后配置',
selectedItemWeixin: {},//
options_weixin: [],
options_zhifubao: [],
} }
}, },
mounted() { mounted() {
const doctorId = this.$route.query.doctorId; // doctorId const { depart_id, doctor_id } = this.$route.query; // doctorId
if (doctorId) { if (doctor_id && depart_id) {
// //
this.doctorId = doctorId this.depart_id = depart_id;
this.doctor_id = doctor_id;
this.fetchDoctorData()
} }
}, },
computed: { computed: {
@ -561,11 +543,15 @@ export default {
} }
}, },
methods: { methods: {
fetchDoctorData(id) { fetchDoctorData() {
this.$http('POST', '/supernew/ajax_get_type_batch_list', { this.$http('POST', '/api/admin/get_depart_info', {
id depart_id: this.depart_id,
doctor_id: this.doctor_id
}).then(response => { }).then(response => {
this.projectTagData = response.data this.form = { ...this.form, ...response.data,
'morning_worktime':response.data.morning_worktime.split('-'),
'afternoon_worktime':response.data.afternoon_worktime.split('-')
}
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
@ -599,30 +585,7 @@ export default {
this.currentPage = val this.currentPage = val
this.getData() this.getData()
}, },
getTypeRanking() {
//
const that = this
that.tableData = []
that.top_list = []
this.loading = true;
this.$http('POST', '/supernew/ajax_get_type_batch_list', {
date: that.text,
rank_type: that.dataRank,
sort_by: that.sort_by,
sort_order: that.sort_order,
cur_page: that.currentPage,
page_size: that.pageSize,
}).then(response => {
this.loading = false;
this.$nextTick(() => {
that.tableData = response.data.list
that.top_list = response.data.top_list
that.total = response.data.total
})
}).catch(error => {
console.error(error, 'error')
})
},
// //
handleConfirm() { handleConfirm() {
if (this.dialogVisible1) { if (this.dialogVisible1) {
@ -735,7 +698,8 @@ export default {
} }
}, },
ChangeTime(type) { ChangeTime(type) {
console.log(type, '===');
console.log(this.form.morning_worktime, type,'===');
}, },
btnClick() { btnClick() {
}, },
@ -780,18 +744,50 @@ export default {
domain_radioChange(type) { domain_radioChange(type) {
console.log(type, '--'); console.log(type, '--');
}, },
radioChange(data) {
console.log(data, 'radio--data');
},
onSwitchChange(data) { onSwitchChange(data) {
console.log(data, '---'); console.log(data, '---');
}, },
updateHosInfo(props){
this.$http('POST', '/api/admin/set_hospital_depart', {
...props
}).then(response => {
if(response.code == 0){
this.$Message.success('更新成功')
}
}).catch(error => {
console.error(error, 'error')
})
},
submitForm(form) { submitForm(form) {
console.log(this.$refs[form], '-----'); console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi'); console.log(this[form], '======formxinxi');
if (valid) { if (valid) {
alert('提交成功!'); alert('提交成功!');
let props = {}
switch(form){
case 'siteForm1':
props={
morning_worktime:form.morning_worktime.join('-'),
afternoon_worktime:form.afternoon_worktime.join('-')
}
break;
case 'siteForm':
break;
case 'numSettingForm':
props={
time_unit:form.time_unit,
time_unit_num:form.time_unit_num,
visit_day:form.visit_day,
treat_expire:form.treat_expire,
}
break;
// case 'numSettingForm':
// break;
// case 'numSettingForm':
// break;
}
this.updateHosInfo(props)
} else { } else {
return false; return false;
} }
@ -814,6 +810,9 @@ export default {
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
} }
.pageTitle{
// padding: 12px 0;
}
.totalCount { .totalCount {
font-size: 12px; font-size: 12px;

10
src/views/elementGroups.vue

@ -11,8 +11,8 @@
</div> </div>
<div class="ele-item"> <div class="ele-item">
<label for="">下拉框</label> <label for="">下拉框</label>
<GuipSelect width="600px" v-model="form.card" label="卡片" :default-value="form.card" prop="card" :options="options" valueKey="id1" labelKey="id2" <GuipSelect width="600px" v-model="form.card" clearable label="卡片" :default-value="form.card" prop="card" :options="options" valueKey="id1" labelKey="id2"
defaultValue="选项1" /> defaultValue="选项1" @change="selectChangefun"/>
</div> </div>
<div> <div>
<h3 for="">表格(表头自定义自定义渲染固定列)</h3> <h3 for="">表格(表头自定义自定义渲染固定列)</h3>
@ -688,6 +688,12 @@ export default {
changeInputtest(e) { changeInputtest(e) {
console.log(e, '---000changeInputtest'); console.log(e, '---000changeInputtest');
}, },
selectChangefun(e){
console.log(e,'====e');
if(!e){
this.getData()
}
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
console.log(row, column); console.log(row, column);
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {

Loading…
Cancel
Save