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"
@mouseleave="isHovered = false"
@click="$emit('click')"
@click.stop
type="normal"
>
<!-- 图片/图标部分 -->
<div class="button-icon">

8
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;

3
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'
},
});

326
src/views/DoctorInformation.vue

@ -5,56 +5,97 @@
<el-form :model="siteForm" :rules="siteFormrules" ref="siteForm">
<div class="flex-wrap">
<div class="flex-left">
<div class="qqCode-wrap right">
<div class="flex">医生照片
<img class="labelImg" src="@/assets/form_qua_ic.svg" alt="">
<el-form-item prop="avator" label="" class="special-form-item">
<template #label>
<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>
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false"
action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"
: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">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload>
</div>
<GuipInput ref="GuipInput" column="column" :required="true" label="医生姓名" v-model="siteForm.name"
prop="name" placeholder="请输入" />
</el-form-item>
<GuipInput ref="GuipInput" column="column" :required="true" label="医生姓名"
v-model="siteForm.doctor_name" prop="doctor_name" placeholder="请输入" />
</div>
<div class="flex-line"></div>
<div class="flex-right">
<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="手机号码"
v-model="siteForm.phone" prop="phone" placeholder="常用手机号" />
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" />
<GroupFormBtns @cancel="cancelClick('siteForm')" @confirm="submitForm('siteForm')" />
</div>
<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>
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1">
<el-form :model="siteForm" ref="siteForm1">
<div class="flex-wrap">
<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 />
<GuipFormItem column="column" class="" label="详细介绍">
<GuipTextarea slot="formDom" v-model="form.detailDesc" prop="description" width="100%"
height="86px" autosize placeholder="请输入描述内容" maxlength="不限" show-word-limit />
<GuipTextarea slot="formDom" v-model="siteForm.doctor_detail" prop="doctor_detail"
width="100%" height="86px" autosize placeholder="请输入描述内容" maxlength="不限"
show-word-limit />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<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="点击选择">
</GuipSelect>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
<GroupFormBtns @cancel="cancelClick('siteForm1')" @confirm="submitForm('siteForm1')" />
</div>
</div>
</template>
@ -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 {

7
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 => {

267
src/views/HosInformation.vue

@ -1,39 +1,39 @@
<template>
<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">
<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-left">
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true">
<div class="flex-between" slot="formDom">
<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="选择省份">
</GuipSelect>
</div>
<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="选择城市">
</GuipSelect>
</div>
</div>
</GuipFormItem>
<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="请输入">
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" />
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="医院简称">
<span slot="formRight" class="desc">方便患者记忆非必填</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_address"
prop="company_address" placeholder="请输入" />
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name"
prop="h_name" placeholder="请输入" />
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="所在科室" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_address"
prop="company_address" placeholder="请输入" />
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.depart_name"
prop="depart_name" placeholder="请输入" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
@ -41,23 +41,23 @@
<GuipFormItem column="column" class="mb24">
<div slot="formLeft" class="form-top-icon">医保定点</div>
<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="非医保定点">
</GuipSwitch>
</div>
</GuipFormItem>
<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">
<el-checkbox label="医生名片(基础功能不可取消)"></el-checkbox>
<el-checkbox label="患者预约"></el-checkbox>
<el-checkbox label="医生名片(基础功能不可取消)" value="2"></el-checkbox>
<el-checkbox label="患者预约" value="0"></el-checkbox>
</div>
<el-checkbox label="项目计数"></el-checkbox>
<el-checkbox label="项目计数" value="1"></el-checkbox>
</el-checkbox-group>
</GuipFormItem>
<GuipFormItem column="column" class="" label="就诊提醒">
<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="输入" />
</GuipFormItem>
</div>
@ -65,53 +65,24 @@
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" />
</div>
<div class="siteMessage flex-common" id="siteMessage2">
<p class="littleTitle mb32">初诊审批</p>
<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">
<div class="siteMessage flex-common mt12" id="siteMessage3">
<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-left">
<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="选择时间范围"
@change="ChangeTime('time1')">
@change="ChangeTime('time1')" format="HH:mm"
value-format="HH:mm">
</el-time-picker>
</GuipFormItem>
<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="选择时间范围"
@change="ChangeTime('time1')">
@change="ChangeTime('time1')" format="HH:mm"
value-format="HH:mm">
</el-time-picker>
</GuipFormItem>
</div>
@ -119,8 +90,8 @@
<div class="flex-right">
<GuipFormItem column="column" label="每周出诊安排" :required="true">
<div class="flex weekPlan" slot="formDom">
<GuipSelect v-for="[key] in Object.entries(weekPlan)" :key="key" v-model="weekPlan[key]"
:options="options_weekPlan" @change="weekChange()" :label="key" placeholder="休息">
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan"
:options="options_weekPlan" @change="weekChange()" :label="day.name" placeholder="休息">
</GuipSelect>
</div>
</GuipFormItem>
@ -129,45 +100,44 @@
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
</div>
<div class="siteMessage flex-common" id="siteMessage4">
<div class="siteMessage flex-common mt12" id="siteMessage4">
<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-left">
<GuipFormItem column="column" class="mb24" label="号源单位时段" :required="true">
<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"
prop="times" placeholder="请输入" unit="分钟/时段" />
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.time_unit"
prop="time_unit" placeholder="请输入" unit="分钟/时段" />
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="放号量" :required="true">
<span class="desc" slot="formRight">放号量可少于实际数量以便为现场约号患者预留</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.nums"
prop="nums" placeholder="请输入" unit="个号/时段" />
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.time_unit_num"
prop="time_unit_num" placeholder="请输入" unit="个号/时段" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true">
<span class="desc" slot="formRight">患者可提前多久约号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.hours"
prop="hours" placeholder="请输入" unit="小时">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.visit_day"
prop="visit_day" placeholder="请输入" unit="小时">
<span slot="prependshow">提前</span>
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="超时未就诊提醒">
<span class="desc" slot="formRight">不输入即无期限</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.days"
prop="days" placeholder="请输入" unit="天" />
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.treat_expire"
prop="treat_expire" placeholder="请输入" unit="天" />
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('numSettingForm')" />
</div>
<p class="pageTitle bold">项目管理</p>
<div class="siteMessage flex-common" id="siteMessage5">
<!-- <p class="pageTitle bold">项目管理</p> -->
<div class="siteMessage flex-common mt12" id="siteMessage5">
<el-form>
<div class=" mb32 flex-between">
<span class="littleTitle">项目列表</span>
<div class="flex-between" style="gap:10px">
@ -308,8 +278,8 @@ import GuipSelect from '@/components/GuipSelect.vue';
import GuipSwitch from '@/components/GuipSwitch.vue';
import GuipTable from '@/components/GuipTable.vue';
import GuipDialog from '@/components/GuipDialog.vue';
import GuipRadio from '@/components/GuipRadio.vue';
import HoverButton from '@/components/HoverButton.vue';
// import GuipRadio from '@/components/GuipRadio.vue';
// import HoverButton from '@/components/HoverButton.vue';
export default {
//
@ -321,14 +291,14 @@ export default {
BatchProject,
GuipButton,
GuipDialog,
GuipRadio,
// GuipRadio,
GuipInput,
GuipTable,
GuipSwitch,
GuipSelect,
GuipTextarea,
GroupFormBtns,
HoverButton
// HoverButton
},
data() {
@ -354,10 +324,7 @@ export default {
isIndeterminate1: false,
projectSearchId: '',
projectSearchName: '',
groupOptions: [
{ label: '需审批', value: '1' },
{ label: '不需审批', value: '2' },
],
projectList: [
{
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: '',
time2: '',
checkList: ['医生名片(基础功能不可取消)'],
@ -496,7 +472,7 @@ export default {
value: '3',
label: '全天'
}, {
value: '4',
value: '0',
label: '休息'
},],
siteForm: {
@ -505,15 +481,36 @@ export default {
company_phone: '',
site_alias: '',
},
form: {
oldForm: {
description: '',
detailDesc: '',
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: {
site_alias: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
depart_name: [
{ required: true, message: '请输入科室信息', trigger: 'blur' }
],
h_name: [
{ required: true, message: '请输入出诊医院信息', trigger: 'blur' }
],
},
siteForm1: {
domain_set: '',
@ -523,36 +520,21 @@ export default {
isApprove: '',
phone: ''
},
siteFormrules2: {
isApprove: [
{ required: true, message: '请选择初诊审批设置', trigger: ['change','blur' ]}
]
},
siteFormrules1: {
domain_source: [
{ 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() {
const doctorId = this.$route.query.doctorId; // doctorId
if (doctorId) {
const { depart_id, doctor_id } = this.$route.query; // doctorId
if (doctor_id && depart_id) {
//
this.doctorId = doctorId
this.depart_id = depart_id;
this.doctor_id = doctor_id;
this.fetchDoctorData()
}
},
computed: {
@ -561,11 +543,15 @@ export default {
}
},
methods: {
fetchDoctorData(id) {
this.$http('POST', '/supernew/ajax_get_type_batch_list', {
id
fetchDoctorData() {
this.$http('POST', '/api/admin/get_depart_info', {
depart_id: this.depart_id,
doctor_id: this.doctor_id
}).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 => {
console.error(error, 'error')
@ -599,30 +585,7 @@ export default {
this.currentPage = val
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() {
if (this.dialogVisible1) {
@ -735,7 +698,8 @@ export default {
}
},
ChangeTime(type) {
console.log(type, '===');
console.log(this.form.morning_worktime, type,'===');
},
btnClick() {
},
@ -780,18 +744,50 @@ export default {
domain_radioChange(type) {
console.log(type, '--');
},
radioChange(data) {
console.log(data, 'radio--data');
},
onSwitchChange(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) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
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 {
return false;
}
@ -814,6 +810,9 @@ export default {
grid-template-columns: repeat(2, 1fr);
}
.pageTitle{
// padding: 12px 0;
}
.totalCount {
font-size: 12px;

10
src/views/elementGroups.vue

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

Loading…
Cancel
Save