Browse Source

修改文本框、公共样式、交互

admin_version1.0_2025_06_26
zq 4 weeks ago
parent
commit
5a142cb9cd
  1. 28
      src/App.vue
  2. 15
      src/components/GuipTextarea.vue
  3. 13
      src/components/HoverButton.vue
  4. 275
      src/components/SetLeftMenu.vue
  5. 4
      src/components/SliderMenu.vue
  6. 2
      src/router/index.js
  7. 153
      src/store/index.js
  8. 7076
      src/style/theme/index.css
  9. 75
      src/views/DoctorInformation.vue
  10. 186
      src/views/HomeView.vue
  11. 66
      src/views/HosInformation.vue

28
src/App.vue

@ -8,7 +8,7 @@
<div class="bg"></div> <div class="bg"></div>
</el-header> </el-header>
<el-container :class="(showHeader ? 'short-container' : '')"> <el-container :class="(showHeader ? 'short-container' : '')">
<SliderMenu v-if="showSidebar" :menuData="menuData"></SliderMenu> <SliderMenu v-if="showSidebar" :menuData="slidermenu" :customize="customize"></SliderMenu>
<el-container> <el-container>
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<Breadcrumb /> <Breadcrumb />
@ -34,43 +34,21 @@ import Header from './components/Header.vue';
import Breadcrumb from './components/Breadcrumb.vue'; import Breadcrumb from './components/Breadcrumb.vue';
// import loadingAnimation from '@/assets/loadingAni.json' // JSON // import loadingAnimation from '@/assets/loadingAni.json' // JSON
import GlobalLoading from '@/components/GlobalLoading1.vue' import GlobalLoading from '@/components/GlobalLoading1.vue'
// import ContentWithLoading from '@/components/ContentWithLoading'
export default { export default {
data() { data() {
return { return {
isCollapse: true, isCollapse: true,
// menuData: [
// {
// index: '1',
// title: '1',
// icon: 'el-icon-location',
// children: [
// { index: '1-1', title: '1-1', path: '/' },
// { index: '1-2', title: 'ui', path: '/ui' }
// ]
// },
// {
// index: '2',
// title: '2',
// icon: 'el-icon-menu',
// children: [
// { index: '2-1', title: '2-1', path: '/about' },
// { index: '2-2', title: 'main', path: '/franchise' }
// ]
// }
// ]
}; };
}, },
components: { components: {
GlobalLoading, GlobalLoading,
// ContentWithLoading,
SliderMenu, SliderMenu,
// Footer, // Footer,
Header, Header,
Breadcrumb Breadcrumb
}, },
computed: { computed: {
...mapState(['menuData','showSidebar', 'showFooter', 'showHeader']) // VuexshowSidebar ...mapState(['hosMenuData','slidermenu','customize','showSidebar', 'showFooter', 'showHeader']) // VuexshowSidebar
}, },
mounted() { mounted() {
window.addEventListener('beforeunload', this.clearStorage); window.addEventListener('beforeunload', this.clearStorage);
@ -94,7 +72,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#app { #app {
font-family: Avenir, Helvetica, Arial, sans-serif;
font-family: Microsoft YaHei UI; font-family: Microsoft YaHei UI;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
@ -126,6 +103,7 @@ export default {
} }
::v-deep .el-header { ::v-deep .el-header {
width: 100%;
height: 62px; height: 62px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;

15
src/components/GuipTextarea.vue

@ -1,5 +1,6 @@
<template> <template>
<el-form-item :label="label" :prop="prop" :rules="rules"> <el-form-item :label="label" :prop="prop" :rules="rules" :class="[{ 'column': column }]" :required="required">
<p v-if="desc" class="desc_right">{{ desc }}</p>
<el-input <el-input
type="textarea" type="textarea"
v-bind="$attrs" v-bind="$attrs"
@ -27,6 +28,10 @@ export default {
type: String, type: String,
default: '100%' default: '100%'
}, },
desc: {
type: String,
default: ''
},
// '100px' '100%' // '100px' '100%'
height: { height: {
type: String, type: String,
@ -42,6 +47,10 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
column: {
type: String,
default: ''
},
// prop // prop
prop: { prop: {
type: String, type: String,
@ -51,6 +60,10 @@ export default {
rules: { rules: {
type: [Object, Array], type: [Object, Array],
default: () => [] default: () => []
},
required:{
type: Boolean,
default: false
} }
}, },
data() { data() {

13
src/components/HoverButton.vue

@ -4,9 +4,8 @@
:class="{ 'hover-effect': hoverEffect }" :class="{ 'hover-effect': hoverEffect }"
@mouseenter="isHovered = true" @mouseenter="isHovered = true"
@mouseleave="isHovered = false" @mouseleave="isHovered = false"
@click="$emit('click')" @click="handleClick"
@click.stop type="button"
type="normal"
> >
<!-- 图片/图标部分 --> <!-- 图片/图标部分 -->
<div class="button-icon"> <div class="button-icon">
@ -82,6 +81,14 @@
return { return {
isHovered: false isHovered: false
} }
},
methods:{
handleClick(e) {
// console.log(e,'----000999');
e.preventDefault();
e.stopPropagation();
this.$emit('click', e);
}
} }
} }
</script> </script>

275
src/components/SetLeftMenu.vue

@ -1,15 +1,16 @@
<template> <template>
<aside class="sidebar"> <aside class="sidebar">
<ul> <ul>
<li v-for="(item, index) in menuList" :key="item.path"> <li v-for="(item, index) in menuList" :key="item.path + random()">
<div :class="[$route.path == item.path ? 'active' : '', 'flex', $route.path == item.path ? curIndex = index : '']" <div
@click="gotoPath(item.path,index)"> :class="[($route.path == item.path) || (item.noToPath && curIndex == index) ? 'active' : '', 'flex', ($route.path == item.path) ? curIndex = index : '']"
<SvgIcon1 :iconPath="require(`@/assets/${item.img}`)" defaultColor="#8A9099" :size="16" @click="gotoPath(item, index)">
activeColor="#006AFF" :isActive="$route.path == item.path" /> <SvgIcon1 :iconPath="require(`@/assets/${item.img}`)" defaultColor="#8A9099" :size="16" activeColor="#006AFF"
:isActive="($route.path == item.path || (item.noToPath && curIndex == index))" />
<span class="title_text">{{ item.name }}</span> <span class="title_text">{{ item.name }}</span>
</div> </div>
<p :class="['flex', activeFloor == item1.desc ? 'curActive' : '']" <p :class="['flex', activeFloor == item1.desc ? 'curActive' : '']" v-for="(item1) in item.list"
v-for="(item1) in item.list" @click="setActiveCur(item1.desc,item)" :key="item1.name">{{ item1.name }}</p> @click="setActiveCur(item1.desc, item)" :key="item1.name">{{ item1.name }}</p>
</li> </li>
</ul> </ul>
</aside> </aside>
@ -17,7 +18,6 @@
<script> <script>
import SvgIcon1 from '@/components/SvgIcon1.vue'; import SvgIcon1 from '@/components/SvgIcon1.vue';
// :class="[$route.path != item.path ? 'not-point' : '', 'flex', activeFloor == item1.desc ? 'curActive' : '']"
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import store from '../store'; import store from '../store';
export default { export default {
@ -42,148 +42,138 @@ export default {
activeFloor: null, activeFloor: null,
curIndex: 0, curIndex: 0,
scrollLock: false, scrollLock: false,
// menuList: [
// {
// name: '',
// path: '/siteSetting/siteBaseSetting',
// img: require('@/assets/site/sitebase.svg'),
// imgActive: require('@/assets/site/sitebase_active.svg'),
// list: [
// {
// name: '',
// desc: 'siteMessage1'
// },
// {
// name: '',
// desc: 'siteMessage2'
// },
// {
// name: '',
// desc: 'siteMessage3'
// },
// ]
// },
// {
// name: '',
// path: '/siteSetting/sitePersonalization',
// img: require('@/assets/site/gexinghua.svg'),
// imgActive: require('@/assets/site/sitebase_active.svg'),
// list: [
// {
// name: '',
// desc: 'siteMessage4'
// },
// {
// name: '',
// desc: 'siteMessage5'
// },
// {
// name: '',
// desc: 'siteMessage6'
// },
// {
// name: '',
// desc: 'siteMessage7'
// },
// {
// name: '',
// desc: 'siteMessage8'
// },
// ]
// },
// {
// name: '',
// path: '/siteSetting/siteH5',
// img: require('@/assets/site/siteh5.svg'),
// imgActive: require('@/assets/site/sitebase_active.svg'),
// list: [
// {
// name: 'H5',
// desc: 'siteMessage9'
// },
// {
// name: '',
// desc: 'siteMessage10'
// },
// ]
// },
// {
// name: '广',
// path: '/siteSetting/siteSem',
// img: require('@/assets/site/sitesem.svg'),
// imgActive: require('@/assets/site/sitebase_active.svg'),
// list: [
// {
// name: 'SEO',
// desc: 'siteMessage11'
// },
// {
// name: 'SEM',
// desc: 'siteMessage12'
// },
// {
// name: '访',
// desc: 'siteMessage13'
// },
// ]
// }
// ]
} }
}, },
mounted() { mounted() {
// console.log(this.curIndex,'this.curIndex'); this.activeFloor = this.menuList[this.curIndex]?.list?.[0]?.desc;
this.activeFloor = this.menuList[this.curIndex]['list'][0]['desc']; this.$nextTick(() => {
//
this.scrollContainer = document.querySelector('.main-content') ||
document.getElementById('main-content') ||
window;
console.log(this.scrollContainer,'this.scrollContainer---');
if (this.scrollContainer) {
this.scrollContainer.addEventListener('scroll', this.handleScroll);
this.calculateFloorOffsets(); this.calculateFloorOffsets();
} else {
console.error('未找到滚动容器');
}
});
},
watch: {
'$route'(to, from) {
console.log(to, from);
//
this.$nextTick(() => { this.$nextTick(() => {
// console.log(this.$parent.$refs.scrollContainer, 'this.$refs.scrollContainer--'); this.calculateFloorOffsets();
this.$parent.$refs.scrollContainer.addEventListener('scroll', this.handleScroll); this.handleScroll(); //
}) });
}
},
beforeDestroy() {
if (this.scrollContainer) {
this.scrollContainer.removeEventListener('scroll', this.handleScroll);
}
}, },
created() { created() {
// console.log(this.$parent.$refs.scrollContainer,'this.$refs.sc--rollContainer--');
}, },
computed: { computed: {
...mapState(['pageTitle']) // VuexshowSidebar ...mapState(['pageTitle']) // VuexshowSidebar
}, },
beforeDestroy() {
this.$parent.$refs.scrollContainer.removeEventListener('scroll', this.handleScroll);
},
methods: { methods: {
random() {
var randomNumber = Math.random();
return randomNumber
},
// calculateFloorOffsets() {
// this.menuList.forEach(item => {
// item.list.forEach(every => {
// const el = document.getElementById(every.desc);
// if (el) {
// every.offsetTop = el.offsetTop;
// }
// })
// });
// },
// handleScroll() {
// if (this.scrollLock) return
// const scrollContainer = this.$parent.$refs.scrollContainer;
// const scrollHeight = scrollContainer.scrollTop;
// let activeFloor = this.menuList[this.curIndex]['list'][0]['desc'];
// this.menuList[this.curIndex]['list'].forEach(item => {
// if (scrollHeight + 72 >= item.offsetTop) {
// activeFloor = item.desc; // ID
// } else {
// return false; //
// }
// });
// this.activeFloor = activeFloor; //
// },
calculateFloorOffsets() { calculateFloorOffsets() {
this.menuList.forEach(item => { this.menuList.forEach(item => {
item.list.forEach(every => { item.list?.forEach(every => {
const el = document.getElementById(every.desc); const el = document.getElementById(every.desc);
if (el) { if (el) {
every.offsetTop = el.offsetTop; //
every.offsetTop = el.getBoundingClientRect().top + window.pageYOffset;
} }
}) });
}); });
}, },
handleScroll() { handleScroll() {
if (this.scrollLock) return if (this.scrollLock || !this.menuList[this.curIndex]?.list) return;
const scrollContainer = this.$parent.$refs.scrollContainer;
const scrollHeight = scrollContainer.scrollTop; const scrollPosition = this.getScrollPosition();
let activeFloor = this.menuList[this.curIndex]['list'][0]['desc']; let activeFloor = null;
this.menuList[this.curIndex]['list'].forEach(item => {
if (scrollHeight + 72 >= item.offsetTop) { //
activeFloor = item.desc; // ID for (let i = this.menuList[this.curIndex].list.length - 1; i >= 0; i--) {
} else { const item = this.menuList[this.curIndex].list[i];
return false; // if (scrollPosition + 100 >= (item.offsetTop || 0)) { // 100
activeFloor = item.desc;
break;
}
}
if (activeFloor && this.activeFloor !== activeFloor) {
this.activeFloor = activeFloor;
} }
});
this.activeFloor = activeFloor; //
}, },
setActiveCur(dom,item) {
if(this.$route.path != item.path){ getScrollPosition() {
this.$router.push(item.path) if (this.scrollContainer === window) {
store.commit('SET_PAGETITLE', item.name); return window.pageYOffset || document.documentElement.scrollTop;
} }
setTimeout(()=>{ return this.scrollContainer.scrollTop;
this.activeFloor = dom;
this.setHighActive(dom)
},500)
}, },
gotoPath(path,index) { // setActiveCur(dom, item) {
// if (this.$route.path != item.path) {
// this.$router.push(item.path)
// store.commit('SET_PAGETITLE', item.name);
// }
// setTimeout(() => {
// this.activeFloor = dom;
// this.setHighActive(dom)
// }, 500)
// },
// setHighActive(dom) {
// this.scrollLock = true;
// const ele = document.getElementById(dom)
// if (!ele) return
// ele.classList.add('ceshi')
// ele.scrollIntoView({ behavior: 'smooth', block: 'start' })
// setTimeout(() => {
// ele.classList.remove('ceshi')
// }, 1000)
// }
gotoPath(item, index) {
let path = item.path;
if (!path) {
this.curIndex = index;
return
}
if (this.$route.path != path) { if (this.$route.path != path) {
this.curIndex = index this.curIndex = index
this.scrollLock = false; this.scrollLock = false;
@ -197,15 +187,31 @@ export default {
activeArea(type) { activeArea(type) {
console.log(type); console.log(type);
}, },
setHighActive(dom) { setActiveCur(dom, item) {
if (item.path && this.$route.path !== item.path) {
this.$router.push(item.path);
store.commit('SET_PAGETITLE', item.name);
}
this.scrollLock = true; this.scrollLock = true;
const ele = document.getElementById(dom) this.activeFloor = dom;
if(!ele)return
ele.classList.add('ceshi') this.$nextTick(() => {
ele.scrollIntoView({ behavior: 'smooth', block: 'start' }) this.setHighActive(dom);
setTimeout(() => { setTimeout(() => {
ele.classList.remove('ceshi') this.scrollLock = false;
}, 1000) }, 1000);
});
},
setHighActive(dom) {
const ele = document.getElementById(dom);
if (ele) {
ele.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
} }
} }
} }
@ -213,7 +219,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.sidebar { .sidebar {
width: 158px; min-width: 158px;
padding: 21px; padding: 21px;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
@ -223,6 +229,7 @@ export default {
.ceshi { .ceshi {
// animation: fadeInOut 2s infinite; // animation: fadeInOut 2s infinite;
} }
.title_text { .title_text {
margin-left: 6px; margin-left: 6px;
} }

4
src/components/SliderMenu.vue

@ -26,7 +26,7 @@
{{ subItem.title }} {{ subItem.title }}
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
<el-menu-item v-else :index="item.index" :key="item.index" @click="handleSelect(item.index, [item.index], item)"> <el-menu-item v-else :index="item.index" :key="item.index+'a'" @click="handleSelect(item.index, [item.index], item)">
<div class="flex"> <div class="flex">
<SvgIcon1 :iconPath="require(`@/assets/menu/${item.icon}.svg`)" defaultColor="#8A9099" <SvgIcon1 :iconPath="require(`@/assets/menu/${item.icon}.svg`)" defaultColor="#8A9099"
activeColor="#006AFF" :isActive="item.index == currentMenuItem?.index" /> activeColor="#006AFF" :isActive="item.index == currentMenuItem?.index" />
@ -38,7 +38,6 @@
</el-menu> </el-menu>
<SetLeftMenu v-else :menuList="menuData"/> <SetLeftMenu v-else :menuList="menuData"/>
<!-- <div v-else>---akjshdjka</div> -->
</transition> </transition>
</template> </template>
@ -73,6 +72,7 @@ export default {
}, },
watch: { watch: {
"$route.path"() { "$route.path"() {
if(this.customize)return
this.updateCurrentMenu(); this.updateCurrentMenu();
}, },
}, },

2
src/router/index.js

@ -7,7 +7,7 @@ import HomeView from '../views/HomeView.vue';
Vue.use(VueRouter) Vue.use(VueRouter)
const whiteSlideList = [ '/ui', '/hosInformation']; //侧边导航白名单 const whiteSlideList = [ '/ui', '/hosInformation']; //侧边导航白名单
const whiteHeaderList = ['/','/doctorInformation', 'hosInformation','/addNewTreatment' const whiteHeaderList = ['/','/doctorInformation', '/hosInformation','/addNewTreatment'
]; //头部导航白名单 ]; //头部导航白名单
const whiteFooterList = ['/','/doctorInformation' ,'/hosInformation','/addNewTreatment' const whiteFooterList = ['/','/doctorInformation' ,'/hosInformation','/addNewTreatment'
]; //底部白名单 ]; //底部白名单

153
src/store/index.js

@ -13,130 +13,54 @@ export default new Vuex.Store({
pageTitle: '一般新文献', //页面标题 pageTitle: '一般新文献', //页面标题
addServiceList: [], //选中的服务 addServiceList: [], //选中的服务
isLoading: false, //页面loading isLoading: false, //页面loading
rankMenuData: [{ customize: false, //页面loading
index: '1', slidermenu:[],
title: '总利润', hosMenuData:[{
icon: 'Totalprofit', name: '医院信息',
children: [{ path: '',
index: '1-1', noToPath:true,
title: '年排行', img: 'menu/Totalprofit.svg',
path: '/super/ranking/yearProfit' imgActive: require('@/assets/menu/Totalprofit.svg'),
}, list: [
{
index: '1-2',
title: '月排行',
path: '/super/ranking/monthProfit'
}
]
},
{
index: '2',
title: '产品',
icon: 'Totalprofit1',
children: [{
index: '2-1',
title: '毛利润排行',
path: '/super/ranking/checkProfit'
},
{
index: '2-2',
title: '订单数排行',
path: '/super/ranking/checkOrdernum'
},
{
index: '2-3',
title: '退单数排行',
path: '/super/ranking/checkRefund'
},
{
index: '2-4',
title: '负毛利排行',
path: '/super/ranking/loss'
}
]
},
{ {
index: '3', name: '基础信息',
title: '代理商', desc: 'siteMessage1'
icon: 'Totalprofit2',
children: [{
index: '3-1',
title: '毛利润排行',
path: '/super/ranking/agentProfit'
},
{
index: '3-2',
title: '充值排行',
path: '/super/ranking/agentRecharge'
},
{
index: '3-3',
title: '新加盟',
path: '/super/ranking/agentNew'
}
]
}, },
{ {
index: '4', name: '出诊时间',
title: '设置', desc: 'siteMessage2'
icon: 'Totalprofit3',
children: [{
index: '4-1',
title: '采购价',
path: '/super/ranking/purchase'
}, },
{ {
index: '4-2', name: '放号设置',
title: '阶段采购', desc: 'siteMessage3'
path: '/super/ranking/stagePurchase'
} }
] ]
}, },{
], name: '项目管理',
menuData: [ path: '',
{ noToPath:true,
index: '1', img: 'menu/Totalprofit1.svg',
title: '首页', imgActive: require('@/assets/menu/Totalprofit.svg'),
path:'/', list: [
icon: 'home',
},
{
index: '2',
title: '订单列表',
icon: 'orderList',
children: [{
index: '2-1',
title: '子级菜单2-1',
path: '/'
},
{ {
index: '2-2', name: '项目列表',
title: 'ui页面', desc: 'siteMessage4'
path: '/ui'
}
]
}, },
{ {
index: '3', name: '疗程套餐',
title: '父级菜单2', desc: 'siteMessage5'
icon: 'Totalprofit',
children: [{
index: '3-1',
title: '子级菜单3-1',
path: '/about'
}, },
{
index: '3-2',
title: '加盟耶main',
path: '/franchise'
}
] ]
} }],
],
pageName:'医生管理' pageName:'医生管理'
}, },
actions: { actions: {
SET_CUSTOMIZE({
commit
}) {
commit('SET_CUSTOMIZE');
},
SET_PAGENAME({ SET_PAGENAME({
commit commit
}) { }) {
@ -182,12 +106,25 @@ export default new Vuex.Store({
}) { }) {
commit('HIDE_LOADING') commit('HIDE_LOADING')
}, },
SET_SLIDER_MENU({
commit
}) {
commit('SET_SLIDER_MENU')
},
}, },
mutations: { mutations: {
SET_SLIDER_MENU(state,type){
state.slidermenu = state[type]
},
SHOW_LOADING(state) { SHOW_LOADING(state) {
state.isLoading = true state.isLoading = true
// state.loadingText = text || '加载中...' // state.loadingText = text || '加载中...'
}, },
SET_CUSTOMIZE(state,show) {
console.log(show,'show--');
state.customize = show
// state.loadingText = text || '加载中...'
},
HIDE_LOADING(state) { HIDE_LOADING(state) {
state.isLoading = false state.isLoading = false
}, },

7076
src/style/theme/index.css

File diff suppressed because it is too large

75
src/views/DoctorInformation.vue

@ -16,7 +16,7 @@
</div> </div>
</template> </template>
<div class="qqCode-wrap right"> <div class="qqCode-wrap right">
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false" <!-- <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" action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList" :on-change="handleFileChange" :auto-upload="false"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<hover-button slot="trigger" button-text="重新上传" <hover-button slot="trigger" button-text="重新上传"
@ -24,6 +24,14 @@
:hover-icon="require('../assets/upLoad_active.svg')" :hover-icon="require('../assets/upLoad_active.svg')"
default-text-color="#23242B" hover-text-color="#006AFF" /> default-text-color="#23242B" hover-text-color="#006AFF" />
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div> <div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload> -->
<el-upload ref="upload" class="avatar-uploader" :auto-upload="false" accept=".jpg,.png" action="#" :file-list="fileList" :multiple="false" :http-request="customUpload">
<template #trigger>
<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" />
</template>
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload> </el-upload>
</div> </div>
</el-form-item> </el-form-item>
@ -47,8 +55,9 @@
<el-form :model="siteForm" :rules="siteFormrules2" ref="siteForm2"> <el-form :model="siteForm" :rules="siteFormrules2" ref="siteForm2">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipRadio v-model="siteForm.first_visit_audit" class="mb12" column="column" :options="groupOptions" <GuipRadio v-model="siteForm.first_visit_audit" class="mb12" column="column"
label="初诊是否审批" required prop="first_visit_audit" @change="radioChange" /> :options="groupOptions" label="初诊是否审批" required prop="first_visit_audit"
@change="radioChange" />
<GuipInput ref="GuipInput" column="column" label="审批人电话" desc="审批人电话、微信,至少填写一项" <GuipInput ref="GuipInput" column="column" label="审批人电话" desc="审批人电话、微信,至少填写一项"
v-model="siteForm.approve_phone" prop="approve_phone" placeholder="请输入" /> v-model="siteForm.approve_phone" prop="approve_phone" placeholder="请输入" />
</div> </div>
@ -57,15 +66,23 @@
<GuipFormItem column="column" label="审批人微信"> <GuipFormItem column="column" label="审批人微信">
<span class="desc" slot="formRight">审批人电话微信至少填写一项</span> <span class="desc" slot="formRight">审批人电话微信至少填写一项</span>
<div class="qqCode-wrap right" slot="formDom"> <div class="qqCode-wrap right" slot="formDom">
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false" <!-- <el-upload class="avatar-uploader upload-demo" accept=".jpg,.png" :multiple="false"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handlePreview"
:on-preview="handlePreview" :on-remove="handleRemove" :on-remove="handleRemove" :on-success="handleAvatarSuccess"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<hover-button button-text="微信二维码" <hover-button button-text="微信二维码"
:default-icon="require('../assets/upLoad_grey.svg')" :default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')" :hover-icon="require('../assets/upLoad_active.svg')"
default-text-color="#23242B" hover-text-color="#006AFF" @click="btnClick" /> default-text-color="#23242B" hover-text-color="#006AFF" @click="btnClick" />
<div slot="tip" class="el-upload__tip desc">审批人微信二维码大小2M以内</div> <div slot="tip" class="el-upload__tip desc">审批人微信二维码大小2M以内</div>
</el-upload> -->
<el-upload ref="upload1" class="avatar-uploader" :auto-upload="false" action="#" :multiple="false" :http-request="customUpload">
<template #trigger>
<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="handleUploadClick" />
</template>
<div slot="tip" class="el-upload__tip desc">审批人微信二维码大小2M以内</div>
</el-upload> </el-upload>
</div> </div>
</GuipFormItem> </GuipFormItem>
@ -81,11 +98,8 @@
<div class="flex-left"> <div class="flex-left">
<GuipInput column="column" v-model="siteForm.doctor_desc" prop="doctor_desc" 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="详细介绍"> <GuipTextarea label="详细介绍" column="column" v-model="siteForm.doctor_detail" prop="doctor_detail"
<GuipTextarea slot="formDom" v-model="siteForm.doctor_detail" prop="doctor_detail" width="100%" autosize placeholder="请输入描述内容" maxlength="不限" show-word-limit />
width="100%" height="86px" autosize placeholder="请输入描述内容" maxlength="不限"
show-word-limit />
</GuipFormItem>
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
<div class="flex-right"> <div class="flex-right">
@ -232,7 +246,23 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
btnClick() { handleUploadClick(e) {
console.log(e,'------e====');
e.preventDefault();
this.$refs.upload.$el.querySelector('input[type="file"]').click();
},
btnClick(e) {
console.log(e,'------e====');
e.preventDefault();
this.$refs.upload1.$el.querySelector('input[type="file"]').click();
},
customUpload(params) {
//
const formData = new FormData();
console.log(params.file,'-222----');
formData.append('file', params.file);
// this.$http.post('/api/upload', formData).then()
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList); console.log(file, fileList);
@ -289,40 +319,36 @@ export default {
return isJPG && isLt2M; return isJPG && isLt2M;
}, },
submitForm(form) { submitForm(form) {
let props = {};
if (form == 'siteForm') { if (form == 'siteForm') {
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
if (valid) { if (valid) {
this.$http('POST', '/supernew/ajax_get_type_batch_list', { props = {
did: this.doctorId, did: this.doctorId,
name: this.siteForm.doctor_name, name: this.siteForm.doctor_name,
idcard: this.siteForm.idcard, idcard: this.siteForm.idcard,
avatar_file: this.siteForm.avator, avatar_file: this.siteForm.avator,
phone: this.siteForm.phone phone: this.siteForm.phone
}).then(response => {
if (response.code == 0) {
this.$Message.success('修改成功')
} }
}).catch(error => {
console.error(error, 'error')
})
} else { } else {
return false; return false;
} }
}); });
} else { } else {
this.$http('POST', '/supernew/ajax_get_type_batch_list', { props = {
did: this.doctorId, did: this.doctorId,
desc: form.doctor_desc, desc: form.doctor_desc,
detail: form.doctor_detail, detail: form.doctor_detail,
label: form.label label: form.label
}).then(response => { }
}
this.$http('POST', '/supernew/ajax_get_type_batch_list', props).then(response => {
if (response.code == 0) { if (response.code == 0) {
this.$Message.success('修改成功') this.$Message.success('修改成功')
} }
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
}
}, },
cancelClick(type) { cancelClick(type) {
// siteForm // siteForm
@ -357,10 +383,12 @@ export default {
transition: all .5s; transition: all .5s;
border: 1px solid transparent; border: 1px solid transparent;
} }
.special-form-item { .special-form-item {
.el-form-item__label { .el-form-item__label {
margin-bottom: 12px; margin-bottom: 12px;
} }
.custom-label { .custom-label {
gap: 6px; gap: 6px;
} }
@ -375,6 +403,7 @@ export default {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: flex-start; justify-content: flex-start;
.labelImg { .labelImg {
opacity: .7; opacity: .7;
margin-left: 8px; margin-left: 8px;

186
src/views/HomeView.vue

@ -29,7 +29,7 @@
<el-avatar :src="item.avatar"></el-avatar> <el-avatar :src="item.avatar"></el-avatar>
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
<span>{{ item.phone }}</span> <span>{{ item.phone }}</span>
<GuipSwitch :modelValue="item.status" @change="onSwitchChange(item,index)"> <GuipSwitch :modelValue="Boolean(item.status)" @change="onSwitchChange(item,index)">
</GuipSwitch> </GuipSwitch>
<GuipButton type="text" @click="editDoctor(item,index)">编辑</GuipButton> <GuipButton type="text" @click="editDoctor(item,index)">编辑</GuipButton>
</div> </div>
@ -120,85 +120,85 @@ export default {
doctorName:'', doctorName:'',
isIndeterminate: false, isIndeterminate: false,
doctorList: [ doctorList: [
// { {
// id: 10, id: 10,
// checked: false, checked: false,
// name: '', name: '一二',
// idcard: '532524198711223615', idcard: '532524198711223615',
// desc: '', desc: '就哈哈哈哈,嗷跳舞',
// detail: '', detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。',
// tag: '', tag: '专业',
// phone: '17785748373', phone: '17785748373',
// avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
// status: true, status: 0,
// list: [ list: [
// { {
// hos: [ hos: [
// ' ', '第三人民医院 针灸科',
// ' ', '第一人民医院 中医科',
// ], ],
// time: '2054 - 10 - 03', time: '2054 - 10 - 03',
// status: true, status: true,
// group: '2', group: '2',
// setMenu: '4', setMenu: '4',
// nums: '88', nums: '88',
// checked: false, checked: false,
// }, },
// ] ]
// }, },
// { {
// id: 10, id: 10,
// checked: false, checked: false,
// name: '', name: '一二',
// idcard: '532524198711223615', idcard: '532524198711223615',
// desc: '', desc: '就哈哈哈哈,嗷跳舞',
// detail: '', detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。',
// tag: '', tag: '专业',
// phone: '17785748373', phone: '17785748373',
// avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
// status: false, status: 1,
// list: [ list: [
// { {
// hos: [ hos: [
// ' ', '第三人民医院 针灸科',
// ' ', '第一人民医院 中医科',
// ], ],
// time: '2054 - 10 - 03', time: '2054 - 10 - 03',
// status: true, status: true,
// group: '2', group: '2',
// setMenu: '4', setMenu: '4',
// nums: '88', nums: '88',
// checked: false, checked: false,
// }, },
// { {
// hos: [ hos: [
// ' ', '第三人民医院 针灸科',
// ' ', '第一人民医院 中医科',
// ], ],
// time: '2054 - 10 - 03', time: '2054 - 10 - 03',
// status: true, status: true,
// group: '2', group: '2',
// setMenu: '4', setMenu: '4',
// nums: '88', nums: '88',
// checked: false, checked: false,
// }, },
// ] ]
// }, },
// { {
// id: 10, id: 10,
// checked: false, checked: false,
// name: '', name: '一二',
// idcard: '532524198711223615', idcard: '532524198711223615',
// desc: '', desc: '就哈哈哈哈,嗷跳舞',
// detail: '', detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。',
// tag: '', tag: '专业',
// phone: '17785748373', phone: '17785748373',
// avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
// status: false, status: 1,
// list: [ list: [
// ] ]
// }, },
], ],
allChecked: false, allChecked: false,
} }
@ -228,7 +228,7 @@ export default {
methods: { methods: {
// //
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', {
}).then(response => { }).then(response => {
if (response.code == 0) { if (response.code == 0) {
@ -333,18 +333,24 @@ export default {
} }
}, },
onSwitchChange(item,index) { onSwitchChange(item,index) {
console.log(index, '===='); item.status = item.status == 0 ? 1 : 0;
console.log(index,item,'====');
this.$set(this.doctorList, item)
// let depart_ids = ''
// //
this.$http('POST', '/supernew/ajax_get_type_batch_list', { // this.$http('POST', '/api/admin/depart_mutil_option', {
id:item.id // doctor_id:item.id,
}).then(response => { // depart_ids:'',
if (response.code == 0) { // status:''
this.doctorList = response.data // }).then(response => {
} // if (response.code == 0) {
// this.doctorList = response.data
// }
}).catch(error => { // }).catch(error => {
console.error(error, 'error') // console.error(error, 'error')
}) // })
}, },
addDoctor() { addDoctor() {
this.$router.push(`/doctorInformation`) this.$router.push(`/doctorInformation`)

66
src/views/HosInformation.vue

@ -47,12 +47,12 @@
</div> </div>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="mb24" label="使用功能"> <GuipFormItem column="column" class="mb24" label="使用功能">
<el-checkbox-group slot="formDom" v-model="form.type" class="checkboxGroup"> <el-checkbox-group slot="formDom" v-model="form.type" @change="validateSelection" class="checkboxGroup">
<div class="flex"> <div class="flex">
<el-checkbox label="医生名片(基础功能不可取消)" value="2"></el-checkbox> <el-checkbox :label="2" >医生名片基础功能不可取消</el-checkbox>
<el-checkbox label="患者预约" value="0"></el-checkbox> <el-checkbox :label="0">患者预约</el-checkbox>
</div> </div>
<el-checkbox label="项目计数" value="1"></el-checkbox> <el-checkbox :label="1">项目计数</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column" class="" label="就诊提醒"> <GuipFormItem column="column" class="" label="就诊提醒">
@ -66,7 +66,7 @@
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" /> <GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" />
</div> </div>
<div class="siteMessage flex-common mt12" id="siteMessage3"> <div class="siteMessage flex-common mt12" id="siteMessage2">
<p class="littleTitle mb32">出诊时间</p> <p class="littleTitle mb32">出诊时间</p>
<el-form :model="form" :rules="siteFormrules1" ref="siteForm1"> <el-form :model="form" :rules="siteFormrules1" ref="siteForm1">
<div class="flex-wrap"> <div class="flex-wrap">
@ -100,7 +100,7 @@
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" /> <GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
</div> </div>
<div class="siteMessage flex-common mt12" id="siteMessage4"> <div class="siteMessage flex-common mt12" id="siteMessage3">
<p class="littleTitle mb32">放号设置</p> <p class="littleTitle mb32">放号设置</p>
<el-form :model="form" :rules="numSettingFormRule" ref="numSettingForm"> <el-form :model="form" :rules="numSettingFormRule" ref="numSettingForm">
<div class="flex-wrap"> <div class="flex-wrap">
@ -136,7 +136,7 @@
<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 mt12" id="siteMessage5"> <div class="siteMessage flex-common mt12" id="siteMessage4">
<el-form> <el-form>
<div class=" mb32 flex-between"> <div class=" mb32 flex-between">
<span class="littleTitle">项目列表</span> <span class="littleTitle">项目列表</span>
@ -166,8 +166,8 @@
v-for="item in projectTagData" :key="item.name">{{ item.name }}</div> v-for="item in projectTagData" :key="item.name">{{ item.name }}</div>
</div> </div>
<div class="right flex"> <div class="right flex">
<span>搜索项目</span> <span style="margin-right: 16px;">搜索项目</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="projectSearchName" <GuipInput ref="GuipInput" column="column" width="280px" v-model="projectSearchName"
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>
@ -200,7 +200,7 @@
</el-pagination> </el-pagination>
</el-form> </el-form>
</div> </div>
<div class="siteMessage flex-common mt12" id="siteMessage6"> <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>
@ -270,6 +270,7 @@
<script> <script>
import GuipFormItem from '@/components/GuipFormItem.vue'; import GuipFormItem from '@/components/GuipFormItem.vue';
import BatchProject from '@/components/BatchProject.vue'; import BatchProject from '@/components/BatchProject.vue';
import store from '@/store';
import GuipButton from '@/components/GuipButton.vue'; import GuipButton from '@/components/GuipButton.vue';
import GuipInput from '@/components/GuipInput.vue'; import GuipInput from '@/components/GuipInput.vue';
import GuipTextarea from '@/components/GuipTextarea.vue'; import GuipTextarea from '@/components/GuipTextarea.vue';
@ -280,6 +281,7 @@ 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';
import { mapState } from 'vuex';
export default { export default {
// //
@ -372,6 +374,22 @@ export default {
name: '针灸4', name: '针灸4',
id: '13' id: '13'
}, },
{
name: '针灸1',
id: '21'
},
{
name: '针灸2',
id: '211'
},
{
name: '针灸3',
id: '212'
},
{
name: '针灸4',
id: '213'
},
], ],
courseList: [ courseList: [
{ {
@ -528,19 +546,24 @@ export default {
}, },
} }
}, },
created(){
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU','hosMenuData');
},
mounted() { mounted() {
const { depart_id, doctor_id } = this.$route.query; // doctorId const { depart_id, doctor_id } = this.$route.query; // doctorId
if (doctor_id && depart_id) { if (doctor_id && depart_id) {
// //
this.depart_id = depart_id; this.depart_id = depart_id;
this.doctor_id = doctor_id; this.doctor_id = doctor_id;
this.fetchDoctorData() // this.fetchDoctorData()
} }
}, },
computed: { computed: {
selectedCount() { selectedCount() {
return this.selectedRows.length; return this.selectedRows.length;
} },
...mapState(['hosMenuData']) // VuexshowSidebar
}, },
methods: { methods: {
fetchDoctorData() { fetchDoctorData() {
@ -549,6 +572,7 @@ export default {
doctor_id: this.doctor_id doctor_id: this.doctor_id
}).then(response => { }).then(response => {
this.form = { ...this.form, ...response.data, this.form = { ...this.form, ...response.data,
type:response.type ? [Number(response.type)] : [2],
'morning_worktime':response.data.morning_worktime.split('-'), 'morning_worktime':response.data.morning_worktime.split('-'),
'afternoon_worktime':response.data.afternoon_worktime.split('-') 'afternoon_worktime':response.data.afternoon_worktime.split('-')
} }
@ -557,6 +581,15 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
validateSelection(val) {
//
if (!val.includes(2)) {
this.$nextTick(() => {
this.form.type = [...val, 2];
this.$message.warning('基础功能不可取消');
});
}
},
selectTag(item) { selectTag(item) {
this.projectSearchId = item.id this.projectSearchId = item.id
}, },
@ -773,6 +806,11 @@ export default {
} }
break; break;
case 'siteForm': case 'siteForm':
props={
is_fixed:this.form.is_fixed,
type:form.type,
notice:form.notice
}
break; break;
case 'numSettingForm': case 'numSettingForm':
props={ props={
@ -782,10 +820,6 @@ export default {
treat_expire:form.treat_expire, treat_expire:form.treat_expire,
} }
break; break;
// case 'numSettingForm':
// break;
// case 'numSettingForm':
// break;
} }
this.updateHosInfo(props) this.updateHosInfo(props)
} else { } else {

Loading…
Cancel
Save