Browse Source

Merge pull request 'zq-0627' (#1) from zq-0627 into master

Reviewed-on: #1
count_down
超级管理员 4 months ago
parent
commit
d21c491f02
  1. 2
      README.md
  2. 3
      public/index.html
  3. BIN
      src/assets/header-logo.png
  4. 1
      src/assets/site/dropdown_chose_ic.svg
  5. 61
      src/components/BatchProject.vue
  6. 2
      src/components/GuipSelect.vue
  7. 2
      src/components/GuipSwitch.vue
  8. 1
      src/components/GuipTable.vue
  9. 4
      src/components/GuipTextarea.vue
  10. 18
      src/components/Header.vue
  11. 5
      src/components/SetLeftMenu.vue
  12. 4
      src/main.js
  13. 25
      src/router/index.js
  14. 436
      src/utils/areas.json
  15. 30
      src/utils/request.js
  16. 498
      src/views/AddNewTreatment.vue
  17. 455
      src/views/DoctorInformation.vue
  18. 15
      src/views/ErrorAccess.vue
  19. 275
      src/views/HomeView.vue
  20. 542
      src/views/HosInformation.vue
  21. 4
      vue.config.js

2
README.md

@ -1,4 +1,4 @@
# newkuaile-vue-project2
# 仁心大医医生管理后台
## Project setup
```

3
public/index.html

@ -5,7 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<title>仁心大医医生管理后台</title>
</head>
<body>
<noscript>

BIN
src/assets/header-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

1
src/assets/site/dropdown_chose_ic.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><g><g></g><g><path d="M13.5732,5.315390953125Q13.6985,5.197082953125,13.7668,5.0388329531250005Q13.835,4.880582953125,13.835,4.708251953125Q13.835,4.626011653125,13.819,4.545351953125Q13.8029,4.464691953125,13.7714,4.388710953125Q13.74,4.3127309531249995,13.6943,4.244350953125Q13.6486,4.175970953125,13.5904,4.117817953125Q13.5323,4.059664953125,13.4639,4.013974953125Q13.3955,3.968284953125,13.3195,3.936812953125Q13.2436,3.905340953125,13.1629,3.889295953125Q13.0822,3.873251953125,13,3.873251953125Q12.90746,3.873251953125,12.81716,3.8935169531250002Q12.72686,3.913781953125,12.64319,3.953328953125Q12.55951,3.992875953125,12.48654,4.049783953125Q12.41356,4.106692953125,12.35481,4.178200953125L7.06803,9.842611953125001L3.542182,7.198221953125Q3.428807,7.101421953125,3.288942,7.049841953125Q3.149076,6.998251953125,3,6.998251953125Q2.9177597,6.998251953125,2.8371,7.014291953124999Q2.75644,7.030341953125,2.680459,7.061811953125Q2.604479,7.093281953125,2.536099,7.138971953125Q2.4677189999999998,7.184661953125,2.409566,7.242821953125Q2.351413,7.300971953125,2.305723,7.369351953124999Q2.260033,7.437731953125001,2.228561,7.513711953125Q2.197089,7.589691953125,2.181044,7.6703519531249995Q2.165,7.7510119531249995,2.165,7.833251953125Q2.165,7.937161953125,2.190469,8.037911953125Q2.215938,8.138651953125,2.265322,8.230081953125Q2.314706,8.321511953125,2.384993,8.398041953125Q2.45528,8.474581953125,2.542182,8.531551953125L6.66667,11.624921953125Q6.72781,11.670781953125001,6.796279999999999,11.704751953125001Q6.864739999999999,11.738721953125001,6.93825,11.759671953125Q7.01175,11.780621953125,7.08784,11.787851953125Q7.16393,11.795081953124999,7.24006,11.788351953125Q7.31619,11.781621953125,7.38983,11.761151953125001Q7.46347,11.740681953125,7.53216,11.707161953125Q7.60084,11.673641953125,7.66229,11.628181953125Q7.72373,11.582721953124999,7.77588,11.526851953125L13.5732,5.315390953125Z" fill-rule="evenodd" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

61
src/components/BatchProject.vue

@ -4,20 +4,20 @@
录入格式1.请按照 项目名称 空格 单次价格 格式输入2.每行一条数据 回车 确认</p>
<div class="content-wrap">
<el-form :model="form" :rules="formRules">
<GuipRadio v-model="groupType" class="radio-form" :options="groupOptions" label="分组形式" prop="language" @change="radioChange" />
<GuipFormItem class="mb24 mt24" v-if="groupType==1" label="已有分组">
<div class="tabProject flex" slot="formDom" >
<div :class="['tab-item ', projectSearchId == item.id ? 'active' : '']" @click="selectTag(item)"
<GuipRadio v-model="form.groupType" class="radio-form" :options="groupOptions" @change="radioChange" label="分组形式" prop="language" />
<GuipFormItem class="mb24 mt24" v-if="form.groupType==1" label="已有分组">
<div class="tabProject tabProject1 flex" slot="formDom" >
<div :class="['tab-item point', form.classify_id == item.id ? 'active' : '']" @click="selectTag(item)"
v-for="(item) in projectTagData" :key="item.name">{{ item.name }}</div>
</div>
</GuipFormItem>
<GuipFormItem v-if="groupType == 2" class="mb24 mt24" label="分组名称">
<GuipInput slot="formDom" ref="GuipInput" v-model="form.name"
prop="name" placeholder="请填写新增分组名称" @change="changeName"/>
<GuipFormItem v-if="form.groupType == 2" class="mb24 mt24" label="分组名称">
<GuipInput slot="formDom" ref="GuipInput" v-model="form.classify_name"
prop="classify_name" placeholder="请填写新增分组名称"/>
</GuipFormItem>
<GuipFormItem class=" form-special" label="录入项目">
<GuipTextarea slot="formDom" v-model="form.notice" prop="description" width="100%" height="262px"
autosize :placeholder="'例如:\n推拿 168\n针灸 100'" @change="getNotice"/>
<GuipTextarea slot="formDom" v-model="form.project_contents" prop="project_contents" :rules="[{ required: true, message: '请填写项目信息', trigger: 'blur' }]" width="100%" height="262px"
autosize :placeholder="'例如:\n推拿(项目名称) 168(项目价格) 30(项目治疗时长(单位:分钟),没有时长时该项填写0) \n针灸 100 0'" />
</GuipFormItem>
</el-form>
</div>
@ -41,38 +41,46 @@ export default {
data() {
return {
formRules: {
name: [
classify_name: [
{ required: true, message: '请输入', trigger: 'blur' }
],
project_contents: [
{ required: true, message: '请填写活动形式', trigger: 'blur' }
]
},
form:{
name:'',
classify_name:'',
groupType: '1',
project_contents:'',
classify_id:''
},
groupType: '1',
notice:'',
projectSearchId:'',
groupOptions: [
{ label: '归入已有分组', value: '1' },
{ label: '新增分组', value: '2' }, //
{ label: '不分组', value: '3' },
// { label: '', value: '3' },
],
}
},
methods: {
radioChange(){
//
this.$set(this.form,'classify_name','')
this.$set(this.form,'classify_id','')
},
getNotice(e){
// \n
let flag = e.includes('\n')
console.log(JSON.stringify(e),flag,'===---');
},
changeName(e){
console.log(e,'===---');
},
radioChange(data) {
console.log(data, 'radio--data');
console.log(e,'输入内容');
},
selectTag(item){
this.projectSearchId = item.id
this.form.classify_id = item.id
},
formReset(){
this.form = {
classify_name:'',
groupType: '1',
project_contents:'',
classify_id:''
}
}
},
}
@ -128,6 +136,9 @@ export default {
background: #F2F3F5;
}
}
.tabProject1{
width: 100%;
}
.form-special{
align-items: flex-start;
}

2
src/components/GuipSelect.vue

@ -3,7 +3,7 @@
:class="[{ 'column': column }, { 'w510': addClass == 'w510' }, { 'w388': addClass == 'w388' }, 'form-item']"
:label="label" :prop="prop" :rules="rules">
<p v-if="desc" class="desc_right">{{ desc }}</p>
<el-select :style="{ width: width }" :placeholder="placeholder1" @change="handleChange" v-model="selectedValue"
<el-select :style="{ width: width }" :placeholder="placeholder1" @change="handleChange" v-model="selectedValue" :disabled="disabled"
v-bind="$attrs">
<el-option v-for="item in processedOptions" :key="getItemValue(item)" :label="getItemLabel(item)"
:disabled="item.disabled" :value="getItemValue(item)">

2
src/components/GuipSwitch.vue

@ -18,7 +18,7 @@
</template>
<!-- 他这个描述文案不太符合当前使用暂且不用 -->
<!-- :active-text="activeText"
<!-- :active-text="activeText"
:inactive-text="inactiveText" -->
<!-- 设置active-value和inactive-value属性接受Boolean, String或Number类型的值 -->
<script>

1
src/components/GuipTable.vue

@ -78,7 +78,6 @@ export default {
methods: {
handleSelectionChange(row) {
//
console.log(row, '======');
this.$emit('selectChange', row)
},
//

4
src/components/GuipTextarea.vue

@ -9,6 +9,7 @@
:rows="rows"
@input="handleInput"
@change="handleChange"
@blur="handleBlur"
></el-input>
</el-form-item>
</template>
@ -82,6 +83,9 @@ export default {
handleInput(value) {
this.$emit('input', value)
},
handleBlur(value) {
this.$emit('blur', value)
},
handleChange(value) {
this.$emit('change', value)
}

18
src/components/Header.vue

@ -1,12 +1,12 @@
<template>
<div class="header-wrap ">
<div class="header-logo">
<div class="header-logo" @click="toHome">
<img src="../assets/header-logo.png" alt="">
</div>
<div class="header-right flex">
<!-- <div class="right-item">权限设置</div>
<div class="right-item">岗位设置</div> -->
<el-dropdown trigger="click">
<!-- <el-dropdown trigger="click">
<div class="right-item flex el-dropdown-link">
<img class="right-item-icon" src="../assets/header-icon.png" alt="">
<span>学术论文出版</span>
@ -19,10 +19,21 @@
<el-dropdown-item icon="el-icon-check">双皮奶</el-dropdown-item>
<el-dropdown-item icon="el-icon-circle-check">蚵仔煎</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
</div>
</div>
</template>
<script>
export default {
methods: {
toHome() {
this.$router.push({
path: '/'
})
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
@ -38,6 +49,7 @@
position: absolute;
z-index: 9;
.header-logo {
cursor: pointer;
img {
height: 46px;
}

5
src/components/SetLeftMenu.vue

@ -10,7 +10,7 @@
<span class="title_text">{{ item.name }}</span>
</div>
<p :class="['flex', activeFloor == item1.desc ? 'curActive' : '']" v-for="(item1) in item.list"
@click="setActiveCur(item1.desc, item)" :key="item1.name">{{ item1.name }}</p>
@click="setActiveCur(item1.desc, item,index)" :key="item1.name">{{ item1.name }}</p>
</li>
</ul>
</aside>
@ -186,7 +186,8 @@ export default {
activeArea(type) {
console.log(type);
},
setActiveCur(dom, item) {
setActiveCur(dom, item,index) {
this.curIndex = index;
if (item.path && this.$route.path !== item.path) {
this.$router.push(item.path);
store.commit('SET_PAGETITLE', item.name);

4
src/main.js

@ -27,8 +27,8 @@ new Vue({
render: h => h(App)
}).$mount('#app')
// function q(e) {
// for (var t = 1; t < arguments.length; t++) {
// function q(e) {
// for (var t = 1; t < arguments.length; t++) {
// var r = null != arguments[t] ? arguments[t] : {};
// t % 2 ? F(Object(r), !0).forEach((function (t) { T(e, t, r[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : F(Object(r)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)) })) } return e }

25
src/router/index.js

@ -5,16 +5,14 @@ import HomeView from '../views/HomeView.vue';
Vue.use(VueRouter)
const whiteSlideList = [ '/ui', '/hosInformation']; //侧边导航白名单
const blackHeaderList = [
]; //头部导航黑名单
const whiteFooterList = ['/','/doctorInformation' ,'/hosInformation','/addNewTreatment'
]; //底部白名单
const blackHeaderList = ['/ErrorAccess']; //头部导航黑名单
const whiteFooterList = ['/','/doctorInformation' ,'/hosInformation','/addNewTreatment']; //底部白名单
const routes = [
{
path: '/',
name: '首页',
component: HomeView,
meta: {
meta: {
title: '医生列表',
hideBreadcrumb: true // 首页不显示面包屑
}
@ -23,16 +21,25 @@ const routes = [
path: '/doctorInformation',
name: '医生信息',
component: () => import('../views/DoctorInformation.vue'),
meta: {
meta: {
title: '编辑信息',
breadcrumbParent: '首页' // 手动指定父级
}
},
{
path: '/ErrorAccess',
name: '访问出错',
component: () => import('../views/ErrorAccess.vue'),
meta: {
title: '访问出错',
hideBreadcrumb: true // 首页不显示面包屑
}
},
{
path: '/hosInformation',
name: '医院信息',
component: () => import('../views/HosInformation.vue'),
meta: {
meta: {
title: '编辑医院',
breadcrumbParent: '医生信息' // 手动指定父级
// r如果想隐藏中间层级
@ -40,12 +47,12 @@ const routes = [
// hideInBreadcrumb: true // 可选:隐藏当前项
}
},
{
path: '/addNewTreatment',
component: () => import( /* webpackChunkName: "addNewTreatment" */ '../views/AddNewTreatment.vue'),
name: '新增套餐',
meta: {
meta: {
hideBreadcrumb: true // 首页不显示面包屑
}
},

436
src/utils/areas.json

@ -0,0 +1,436 @@
{
"北京市": ["北京市"],
"天津市": ["天津市"],
"河北省": [
"石家庄市",
"唐山市",
"秦皇岛市",
"邯郸市",
"邢台市",
"保定市",
"张家口市",
"承德市",
"沧州市",
"廊坊市",
"衡水市"
],
"山西省": [
"太原市",
"大同市",
"阳泉市",
"长治市",
"晋城市",
"朔州市",
"晋中市",
"运城市",
"忻州市",
"临汾市",
"吕梁市"
],
"内蒙古自治区": [
"呼和浩特市",
"包头市",
"乌海市",
"赤峰市",
"通辽市",
"鄂尔多斯市",
"呼伦贝尔市",
"巴彦淖尔市",
"乌兰察布市",
"兴安盟",
"锡林郭勒盟",
"阿拉善盟"
],
"辽宁省": [
"沈阳市",
"大连市",
"鞍山市",
"抚顺市",
"本溪市",
"丹东市",
"锦州市",
"营口市",
"阜新市",
"辽阳市",
"盘锦市",
"铁岭市",
"朝阳市",
"葫芦岛市"
],
"吉林省": [
"长春市",
"吉林市",
"四平市",
"辽源市",
"通化市",
"白山市",
"松原市",
"白城市",
"延边朝鲜族自治州"
],
"黑龙江省": [
"哈尔滨市",
"齐齐哈尔市",
"鸡西市",
"鹤岗市",
"双鸭山市",
"大庆市",
"伊春市",
"佳木斯市",
"七台河市",
"牡丹江市",
"黑河市",
"绥化市",
"大兴安岭地区"
],
"上海市": [
"黄浦区",
"徐汇区",
"长宁区",
"静安区",
"普陀区",
"虹口区",
"杨浦区",
"闵行区",
"宝山区",
"嘉定区",
"浦东新区",
"金山区",
"松江区",
"青浦区",
"奉贤区",
"崇明区"
],
"江苏省": [
"南京市",
"无锡市",
"徐州市",
"常州市",
"苏州市",
"南通市",
"连云港市",
"淮安市",
"盐城市",
"扬州市",
"镇江市",
"泰州市",
"宿迁市"
],
"浙江省": [
"杭州市",
"宁波市",
"温州市",
"嘉兴市",
"湖州市",
"绍兴市",
"金华市",
"衢州市",
"舟山市",
"台州市",
"丽水市"
],
"安徽省": [
"合肥市",
"芜湖市",
"蚌埠市",
"淮南市",
"马鞍山市",
"淮北市",
"铜陵市",
"安庆市",
"黄山市",
"滁州市",
"阜阳市",
"宿州市",
"六安市",
"亳州市",
"池州市",
"宣城市"
],
"福建省": [
"福州市",
"厦门市",
"莆田市",
"三明市",
"泉州市",
"漳州市",
"南平市",
"龙岩市",
"宁德市"
],
"江西省": [
"南昌市",
"景德镇市",
"萍乡市",
"九江市",
"新余市",
"鹰潭市",
"赣州市",
"吉安市",
"宜春市",
"抚州市",
"上饶市"
],
"山东省": [
"济南市",
"青岛市",
"淄博市",
"枣庄市",
"东营市",
"烟台市",
"潍坊市",
"济宁市",
"泰安市",
"威海市",
"日照市",
"临沂市",
"德州市",
"聊城市",
"滨州市",
"菏泽市"
],
"河南省": [
"郑州市",
"开封市",
"洛阳市",
"平顶山市",
"安阳市",
"鹤壁市",
"新乡市",
"焦作市",
"濮阳市",
"许昌市",
"漯河市",
"三门峡市",
"南阳市",
"商丘市",
"信阳市",
"周口市",
"驻马店市",
"济源市"
],
"湖北省": [
"武汉市",
"黄石市",
"十堰市",
"宜昌市",
"襄阳市",
"鄂州市",
"荆门市",
"孝感市",
"荆州市",
"黄冈市",
"咸宁市",
"随州市",
"恩施土家族苗族自治州",
"仙桃市",
"潜江市",
"天门市",
"神农架林区"
],
"湖南省": [
"长沙市",
"株洲市",
"湘潭市",
"衡阳市",
"邵阳市",
"岳阳市",
"常德市",
"张家界市",
"益阳市",
"郴州市",
"永州市",
"怀化市",
"娄底市",
"湘西土家族苗族自治州"
],
"广东省": [
"广州市",
"韶关市",
"深圳市",
"珠海市",
"汕头市",
"佛山市",
"江门市",
"湛江市",
"茂名市",
"肇庆市",
"惠州市",
"梅州市",
"汕尾市",
"河源市",
"阳江市",
"清远市",
"东莞市",
"中山市",
"潮州市",
"揭阳市",
"云浮市"
],
"广西壮族自治区": [
"南宁市",
"柳州市",
"桂林市",
"梧州市",
"北海市",
"防城港市",
"钦州市",
"贵港市",
"玉林市",
"百色市",
"贺州市",
"河池市",
"来宾市",
"崇左市"
],
"海南省": [
"海口市",
"三亚市",
"三沙市",
"儋州市",
"五指山市",
"琼海市",
"文昌市",
"万宁市",
"东方市",
"定安县",
"屯昌县",
"澄迈县",
"临高县",
"白沙黎族自治县",
"昌江黎族自治县",
"乐东黎族自治县",
"陵水黎族自治县",
"保亭黎族苗族自治县",
"琼中黎族苗族自治县"
],
"重庆市": ["重庆市"],
"四川省": [
"成都市",
"自贡市",
"攀枝花市",
"泸州市",
"德阳市",
"绵阳市",
"广元市",
"遂宁市",
"内江市",
"乐山市",
"南充市",
"眉山市",
"宜宾市",
"广安市",
"达州市",
"雅安市",
"巴中市",
"资阳市",
"阿坝藏族羌族自治州",
"甘孜藏族自治州",
"凉山彝族自治州"
],
"贵州省": [
"贵阳市",
"六盘水市",
"遵义市",
"安顺市",
"毕节市",
"铜仁市",
"黔西南布依族苗族自治州",
"黔东南苗族侗族自治州",
"黔南布依族苗族自治州"
],
"云南省": [
"昆明市",
"曲靖市",
"玉溪市",
"保山市",
"昭通市",
"丽江市",
"普洱市",
"临沧市",
"楚雄彝族自治州",
"红河哈尼族彝族自治州",
"文山壮族苗族自治州",
"西双版纳傣族自治州",
"大理白族自治州",
"德宏傣族景颇族自治州",
"怒江傈僳族自治州",
"迪庆藏族自治州"
],
"西藏自治区": [
"拉萨市",
"日喀则市",
"昌都市",
"林芝市",
"山南市",
"那曲市",
"阿里地区"
],
"陕西省": [
"西安市",
"铜川市",
"宝鸡市",
"咸阳市",
"渭南市",
"延安市",
"汉中市",
"榆林市",
"安康市",
"商洛市"
],
"甘肃省": [
"兰州市",
"嘉峪关市",
"金昌市",
"白银市",
"天水市",
"武威市",
"张掖市",
"平凉市",
"酒泉市",
"庆阳市",
"定西市",
"陇南市",
"临夏回族自治州",
"甘南藏族自治州"
],
"青海省": [
"西宁市",
"海东市",
"海北藏族自治州",
"黄南藏族自治州",
"海南藏族自治州",
"果洛藏族自治州",
"玉树藏族自治州",
"海西蒙古族藏族自治州"
],
"宁夏回族自治区": ["银川市", "石嘴山市", "吴忠市", "固原市", "中卫市"],
"新疆维吾尔自治区": [
"乌鲁木齐市",
"克拉玛依市",
"吐鲁番市",
"哈密市",
"昌吉回族自治州",
"博尔塔拉蒙古自治州",
"巴音郭楞蒙古自治州",
"阿克苏地区",
"克孜勒苏柯尔克孜自治州",
"喀什地区",
"和田地区",
"伊犁哈萨克自治州",
"塔城地区",
"阿勒泰地区",
"石河子市",
"阿拉尔市",
"图木舒克市",
"五家渠市",
"北屯市",
"铁门关市",
"双河市",
"可克达拉市",
"昆玉市",
"胡杨河市",
"新星市",
"白杨市"
]
}

30
src/utils/request.js

@ -1,6 +1,5 @@
// src/utils/request.js
import axios from "axios";
const baseURL = process.env.VUE_APP_BASE_API;
// 创建 axios 实例
const service = axios.create({
@ -8,7 +7,7 @@ const service = axios.create({
timeout: 60000, // 请求超时时间
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'AUTHADMIN' :'b10346e6-5003-4644-8e48-e14f49874338'
'AUTHADMIN' :localStorage.getItem("authtoken")
},
});
@ -75,20 +74,43 @@ const request = (method, url, data = {}, config = {}) => {
const lowerCaseMethod = method.toLowerCase();
if (lowerCaseMethod === "get") {
// GET 请求将参数拼接到 URL 上
return service({
var res = service({
method: "get",
url,
params: data,
...config,
});
res.then(response => {
if(response.msg.indexOf('非法操作') > -1) {
localStorage.removeItem('authtoken')
location.href = '/ErrorAccess'
return;
}
}).catch(error => {
console.error('API Error:', error);
});
return res;
} else {
// 其他请求(POST, PUT, DELETE 等)将参数放在请求体中
return service({
var respost = service({
method: lowerCaseMethod,
url,
data,
...config,
});
respost.then(response => {
if(response.msg.indexOf('非法操作') > -1) {
localStorage.removeItem('authtoken')
location.href = '/ErrorAccess'
return;
}
}).catch(error => {
console.error('API Error:', error);
});
return respost;
}
};

498
src/views/AddNewTreatment.vue

@ -30,15 +30,18 @@
<el-checkbox @change="handleSelectAllChange1" v-model="selectAll"
:indeterminate="isIndeterminate">全选</el-checkbox>
</div>
<span class="totalCount">{{ projectList.length }}已选{{ selectedCount }}</span>
<span class="totalCount">{{ displayedProjectCount }}已选{{ selectedCount }}</span>
</div>
<div class="flex-between mb32 mt32">
<div class="tabProject flex">
<div :class="['tab-item ', projectSearchId == item.id ? 'active' : '']"
v-for="item in Object.values(projectTagData)" :key="item.name">{{ item.name }}</div>
<div :class="['tab-item point', projectSearchId == 'all' ? 'active' : '']"
@click="selectTag('all')">全部分类</div>
<div :class="['tab-item point', projectSearchId == item.id ? 'active' : '']"
@click="selectTag(item.id)" v-for="item in Object.values(projectTagData)"
:key="item.name">{{ item.name }}</div>
</div>
<div class="right flex">
<div class="right flex" v-show="false">
<GuipFormItem label="搜索项目">
<GuipInput slot="formDom" ref="GuipInput" width="280px" v-model="projectSearchName"
placeholder="请输入" @blur="inputBlur">
@ -48,34 +51,29 @@
</div>
</div>
<GuipTable :tableData="sortedProjectList" style="width: 100%" ref="multipleTable" max-height="600px"
@selection-change="handleSelectionChange" :loading="loading">
<el-table-column type="selection" label="选择" width="150"></el-table-column>
@selection-change="handleSelectionChange" :loading="loading" @select="handleSelect">
<!-- <el-table-column type="selection" label="选择" width="150"></el-table-column> -->
<el-table-column type="selection" width="150">
<template slot="header">
<span class="selection-header-text">选择</span>
</template>
</el-table-column>
<el-table-column prop="name" label="项目名称" min-width="150"></el-table-column>
<el-table-column label="次数" min-width="150px" prop="num">
<template slot-scope="scope">
<GuipInput width="90%" v-if="package_id && scope.row.num" v-model="scope.row.num"
@change="changeNums(scope.row)" />
<GuipInput width="90%" v-else v-model="scope.row.unit_num"
min="1" @change="changeNums(scope.row)" />
<GuipInput width="90%" v-else v-model="scope.row.unit_num" min="1"
@change="changeNums(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="price" label="项目价格" min-width="150">
<template slot-scope="scope">
<GuipInput width="90%" v-model="scope.row.price" @change="changePrice(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="price" label="项目价格" min-width="150"></el-table-column>
<el-table-column prop="classify_id" label="分类" min-width="150">
<template slot-scope="scope">
<GuipSelect width="90%" v-model="scope.row.classify_id"
@change="changeClassify(scope.row)" prop="classify_id" :options="projectTagData"
valueKey="id" labelKey="name" />
{{ projectTagData[scope.row.classify_id].name }}
</template>
</el-table-column>
</GuipTable>
<!-- <el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="treatMentList.length">
</el-pagination> -->
</el-form>
</div>
</div>
@ -98,8 +96,9 @@
</div>
<div class="flex content">
<span>套餐项目</span>
<div class="column">
<span v-for="item in selectedRows" :key="item.id">{{ item.name }} {{ item.nums }}</span>
<div class="column gap10 project_list">
<span v-for="item in sortedProjectRows" :key="item.id">{{ item.name }} {{ item.num || item.unit_num
}}</span>
</div>
</div>
</GuipDialog>
@ -113,7 +112,7 @@ import GuipTable from '@/components/GuipTable.vue';
import GuipDialog from '@/components/GuipDialog.vue';
import GuipInput from '@/components/GuipInput.vue';
import GuipButton from '@/components/GuipButton.vue';
import GuipSelect from '@/components/GuipSelect.vue';
// import GuipSelect from '@/components/GuipSelect.vue';
export default {
//
name: '',
@ -123,7 +122,7 @@ export default {
GuipInput,
GuipDialog,
GuipButton,
GuipSelect,
// GuipSelect,
GuipTable
},
@ -136,33 +135,21 @@ export default {
pageSize: 10,
isIndeterminate: false,
projectSearchName: '',
projectSearchId: '0',
projectSearchId: 'all',
loading: false,
treatMentList: [],//
projectList: [],//
// {
// 27:{
// classify_name:"",
// create_time:"2025-05-29 17:09:43",
// id:"1",
// name:"",
// num:"2",
// pid:"1",
// price:"200.00",
// project_id:"27",
// sort:"1",
// status:"1",
// }
// },
projectTagData: [],
selectedRows: [],
sortedProjectRows: [],
siteForm: {
create_time: "2025-05-29 17:08:29",
depart_id: "1",
doctor_id: "1",
id: "1",
name: "调理套餐",
price: "1500.00",
status: "1"
create_time: "",
depart_id: "",
doctor_id: "",
id: "",
name: "",
price: "",
status: ""
},
siteFormrules: {
name: [
@ -172,27 +159,51 @@ export default {
{ required: true, message: '请输入套餐价格', trigger: 'blur' }
],
},
projectTagData: [],
package_id: '',
doctor_id: '',
depart_id: '',
}
},
computed: {
...mapState(['pageTitle']),
sortedProjectList() {
return [...this.projectList].sort((a, b) => {
// sort
// sort
let sortedList = [...this.projectList].sort((a, b) => {
if (a.sort && !b.sort) return -1;
if (!a.sort && b.sort) return 1;
// sortsort
if (a.sort && b.sort) return a.sort - b.sort;
// sort
return 0;
});
// projectSearchId
if (this.projectSearchId === 'all') {
return sortedList;
} else {
return sortedList.filter(item => item.classify_id == this.projectSearchId);
}
},
//
displayedProjectCount() {
return this.sortedProjectList.length;
},
},
watch: {
projectSearchId() {
this.$nextTick(() => {
this.setSelectedRows();
});
},
projectList: {
deep: true,
handler() {
this.$nextTick(() => {
this.setSelectedRows();
});
}
}
},
mounted() {
const { package_id, doctor_id, depart_id } = this.$route.query; // doctorId
this.package_id = package_id;
@ -207,8 +218,44 @@ export default {
this.fetchProjectData();
},
methods: {
//
//
initSelectedItems() {
if (!this.package_id) {
this.selectedRows = [];
this.sortedProjectRows = []
return;
}
// treatMentList
this.treatMentList.forEach(treatment => {
const foundItem = this.projectList.find(item => item.id == treatment.project_id);
if (foundItem && !this.selectedRows.some(r => r.id === foundItem.id)) {
foundItem.num = treatment.num;
foundItem.sort = treatment.sort;
this.selectedRows.push(foundItem);
}
});
this.sortedProjectRows = [...this.selectedRows]
this.setSelectedRows();
},
// //
setSelectedRows() {
this.$nextTick(() => {
if (!this.$refs.multipleTable?.$refs.guiptable) return;
//
this.$refs.multipleTable.$refs.guiptable.clearSelection();
this.selectedRows = [];//
//
this.sortedProjectList.forEach(row => {
if (this.sortedProjectRows.some(selected => selected.id === row.id)) {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true);
}
});
});
},
getInitData() {
this.$http('POST', '/api/admin/get_project_package_info', {
depart_id: this.depart_id,
@ -226,145 +273,139 @@ export default {
console.error(error, 'error')
})
},
// mounted fetchProjectData
fetchProjectData() {
this.$http('POST', '/api/admin/get_project_list', {
depart_id: this.depart_id,
doctor_id: this.doctor_id
}).then(response => {
if (response.code == 0) {
this.projectTagData = response.data.classify;//
this.projectList = Object.values(response.data.list).map(item => {
return {
...item,
checked: false
}
});//
if (this.package_id) {//
this.treatMentList.forEach(item => {
this.projectList.forEach(item1 => {
if (item.project_id == item1.id) {
item1.checked = true;
item1.num = item.num;
item1.sort = item.sort;
//
this.$nextTick(() => {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(item1, true);
this.selectedRows.push(item1)
this.updateSelectionState();
});
}
})
})
// this.$nextTick(() => {
// if (this.projectList.length >= 2) {
// const defaultSelected = this.projectList.filter(item => item.checked === true);
// defaultSelected.forEach(row => {
// this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true);
// });
// this.selectedRows = defaultSelected;
// this.updateSelectionState();
// }
// });
if (response.code == 0 && response.data.list) {
this.projectTagData = response.data.classify;
this.projectList = Object.values(response.data.list).map(item => ({
...item,
checked: false
}));
//
if (this.package_id && this.selectedRows.length === 0) {
this.initSelectedItems();
}
}
}).catch(error => {
console.error(error, 'error')
})
},
changeChecked() {
});
},
inputBlur(val) {
//
this.$http('POST', '/supernew/ajax_get_type_batch_list', {
projectSearchId: this.projectSearchId,
search: this.projectSearchName
}).then(response => {
if (response.code == 0) {
this.dialogVisible = false;
}
}).catch(error => {
console.error(error, 'error')
})
console.log(val, '----搜索');
},
updateSelectionState() {
const allSelected = this.selectedRows.length === this.projectList.length;
const noneSelected = this.selectedRows.length === 0;
const currentViewSelected = this.sortedProjectList.filter(row =>
this.selectedRows.some(selected => selected.id === row.id)
);
const allSelected = currentViewSelected.length === this.sortedProjectList.length;
const noneSelected = currentViewSelected.length === 0;
this.selectAll = allSelected;
this.isIndeterminate = !noneSelected && !allSelected;
this.selectedCount = this.selectedRows.length;
// console.log(this.sortedProjectRows,'sortedProjectRows==');
this.selectedCount = this.sortedProjectRows.length;
},
handleSelect(selection, row) {
// console.log(':', row);
// console.log(':', selection);
if (this.sortedProjectRows.includes(row)) {
let index = this.sortedProjectRows.findIndex((item) => item.id === row.id);
if (index > -1) {
this.sortedProjectRows.splice(index, 1)
}
} else {
this.sortedProjectRows.push(row)
}
this.updateSelectionState()
},
handleSelectAll(selection) {
console.log('全选/取消全选:', selection);
},
//
handleSelectionChange(rows) {
this.selectedRows = rows;
// console.log(rows, '=======---handleSelectionChange');
// ID
const currentViewIds = this.sortedProjectList.map(r => r.id);
//
const preservedSelections = this.selectedRows.filter(
row => !currentViewIds.includes(row.id)
);
//
this.selectedRows = [...preservedSelections, ...rows];
this.updateSelectionState();
},
handleSelectAllChange1(val) {
const currentViewRows = this.sortedProjectList;
if (val) {
//
const unselectedRows = this.projectList.filter(
row => !this.selectedRows1.includes(row)
);
unselectedRows.forEach(row => {
this.$refs.multipleTable1.$refs.guiptable.toggleRowSelection(row, true);
//
currentViewRows.forEach(row => {
// selectedRows
if (!this.selectedRows.some(r => r.id === row.id)) {
this.selectedRows.push(row);
}
// sortedProjectRows
if (!this.sortedProjectRows.some(r => r.id === row.id)) {
this.sortedProjectRows.push(row);
}
});
} else {
//
this.selectedRows.forEach(row => {
this.$refs.multipleTable1.$refs.guiptable.toggleRowSelection(row, false);
//
currentViewRows.forEach(row => {
// selectedRows
this.selectedRows = this.selectedRows.filter(r => r.id !== row.id);
// sortedProjectRows
this.sortedProjectRows = this.sortedProjectRows.filter(r => r.id !== row.id);
});
}
//
this.$nextTick(() => {
this.setSelectedRows();
this.updateSelectionState();
});
},
//
selectTag(id) {
this.projectSearchId = id === 'all' ? 'all' : id;
this.updateSelectionState();
},
// /
//
//
//
changeNums(row) {
if (row.sort) {
this.editorProjectInfo({ num: row.num, project_id: row.id })
} else {
this.changeSelectStatus(row)
}
},
//
changeClassify(row) {
if (row.sort) {
this.editorProjectInfo({ classify_id: row.classify_id, project_id: row.id })
} else {
this.changeSelectStatus(row)
}
},
//
changePrice(row) {
if (row.sort) {
this.editorProjectInfo({ price: row.price, project_id: row.id })
} else {
this.changeSelectStatus(row)
}
this.changeSelectStatus(row)
},
changeSelectStatus(row) {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true);
//
if (!this.selectedRows.includes(row)) {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true);
}
row.checked = true
// selectedRows
if (!this.selectedRows.includes(row)) {
this.selectedRows.push(row);
}
if (!this.sortedProjectRows.includes(row)) {
this.sortedProjectRows.push(row);
}
//
this.updateSelectionState();
},
//
editorProjectInfo(props) {
//
console.log(props, '====---');
if (this.package_id) props.package_id = this.package_id
this.$http('POST', '/api/admin/edit_project', {
...props,
depart_id: this.depart_id,
@ -372,7 +413,12 @@ export default {
}).then(response => {
if (response.code == 0) {
this.$Message.success('修改成功')
this.getInitData()
//
// if(this.package_id){
// this.getInitData()
// }else{
// this.fetchProjectData()
// }
}
}).catch(error => {
console.error(error, 'error')
@ -385,51 +431,38 @@ export default {
this.dialogVisible = false;
},
handleConfirm() {
let project_infos = [];
this.sortedProjectRows.forEach(item => {
project_infos.push({ project_id: item.id, num: item.num || item.unit_num })
})
let props = {
name: this.siteForm.name,
price: this.siteForm.price,
project_infos: JSON.stringify(project_infos)
}
if (this.package_id) props.package_id = this.package_id
//
this.$http('POST', '/supernew/ajax_get_type_batch_list', {
this.$http('POST', '/api/admin/set_project_package', {
depart_id: this.depart_id,
doctor_id: this.doctor_id,
...props
}).then(response => {
if (response.code == 0) {
this.$Message.success('保存成功')
this.dialogVisible = false;
this.$router.push({
name: '医院信息',
query: { doctor_id: this.doctor_id, depart_id: this.depart_id }
})
}
}).catch(error => {
console.error(error, 'error')
})
},
handleClear(value) {
// this.handleInput('')
this.projectSearchName = ''
console.log(value, 'value===qinghcu');
},
handleSelectAllChange(val) {
console.log(this.$refs.multipleTable, 'multipleTable-');
if (val) {
//
const unselectedRows = this.projectList.filter(
row => !this.selectedRows.includes(row)
);
unselectedRows.forEach(row => {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true);
});
} else {
//
this.selectedRows.forEach(row => {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, false);
});
}
},
// //
// handleSelectionChange(rows) {
// this.selectedRows = rows;
// //
// const allSelected = rows.length === this.treatMentList.length;
// const noneSelected = rows.length === 0;
// this.selectAll = allSelected;
// this.isIndeterminate = !noneSelected && !allSelected;
// },
handleSizeChange(val) {
this.pageSize = val
this.getData()
@ -438,75 +471,57 @@ export default {
this.currentPage = val
this.getData()
},
changeSelect(value) {
console.log(value, '--');
},
btnClick() {
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
//
handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
}
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
console.log(data, '---');
},
submitForm(form) {
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
alert('提交成功!');
} else {
return false;
}
});
},
cancelClick() {
this.$router.push({
name: '医院信息',
query: { doctor_id: this.doctor_id,depart_id:this.depart_id }
query: { doctor_id: this.doctor_id, depart_id: this.depart_id }
})
},
confirmClick() {
this.dialogVisible = true;
// console.log(this.sortedProjectList, 'sortedProjectList==');
// console.log(this.sortedProjectRows, 'sortedProjectRows==');
// //
this.$refs['siteForm1'].validate((valid) => {
if (valid) {
if (this.selectedRows.length == 0) {
this.$Message('请选择套餐项目')
return
}
this.dialogVisible = true;
} else {
return false;
}
});
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table__header-wrapper .el-checkbox {
display: none;
}
/* 隐藏表头的复选框 */
::v-deep .el-table__header-wrapper .el-checkbox {
display: none !important;
}
/* 确保选择文字可见 */
::v-deep .selection-header-text {
display: inline-block;
margin-left: 8px;
/* 调整位置 */
font-size: 14px;
color: #606266;
font-weight: bold;
}
/* 调整表头单元格的padding */
::v-deep .el-table .el-table__header th {
padding: 8px 0;
/* 根据需要调整 */
}
.siteMessage {
border-radius: 4px;
transition: all .5s;
@ -534,6 +549,11 @@ export default {
}
}
.project_list {
max-height: 200px;
overflow-y: auto;
}
.totalCount {
font-size: 12px;
font-weight: normal;

455
src/views/DoctorInformation.vue

@ -1,10 +1,10 @@
<template>
<div class="site-setting-wrap pagePadding min-flex-right">
<div class="site-setting-wrap pagePadding min-flex-right doctor-information">
<div class="siteMessage flex-common" id="siteMessage1">
<h3>基础信息</h3>
<el-form :model="siteForm" :rules="siteFormrules" ref="siteForm">
<div class="flex-wrap">
<div class="flex-left">
<div class="flex-left special-form-item">
<el-form-item prop="avator" label="" class="special-form-item">
<template #label>
<div class="custom-label flex">
@ -16,30 +16,38 @@
</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> -->
<el-upload ref="upload" class="avatar-uploader" :auto-upload="false" accept=".jpg,.png" action="#" :multiple="false" :http-request="customUpload">
<template #trigger>
<div class="flex">
<img v-if="siteForm.avator" :src="siteForm.avator" alt="" class="uploadImg">
<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>
</template>
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload>
<div class="avator-wrapper flex">
<img v-if="doctorAvatorUrl" :src="doctorAvatorUrl" alt="" class="uploadImg">
<hover-button :button-text="doctorAvatorUrl?'重新上传':'开始上传'" :default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')"
default-text-color="#23242B" hover-text-color="#006AFF">
</hover-button>
<div class="info-upload-wrapper" @click="clearDocotorAvatorFiles">
<el-upload
:on-change="handleAvatarChange"
action="#"
list-type="picture-card"
:multiple="false"
:http-request="setDoctorBaseInfoUpload"
:limit="Number(1)"
ref="avatorUpload"
:auto-upload="false"
>
<i slot="default" class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</div>
<div class="qqCode-wrap right">
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</div>
</el-form-item>
<GuipInput ref="GuipInput" column="column" :required="true" label="医生姓名"
v-model="siteForm.doctor_name" prop="doctor_name" placeholder="请输入" />
v-model="siteForm.name" prop="name" placeholder="请输入" />
</div>
<div class="flex-line"></div>
<div class="flex-right">
@ -50,7 +58,7 @@
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick('siteForm')" @confirm="submitForm('siteForm')" />
<GroupFormBtns @cancel="cancelClick('siteForm')" @confirm="submitDoctorBaseInfo" />
</div>
<div class="siteMessage flex-common" id="siteMessage2">
@ -69,36 +77,37 @@
<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')"
<div class="avator-wrapper">
<div class="flex" style="position: relative;">
<img v-if="approverWechatUrl" :src="approverWechatUrl" class="uploadImg">
<hover-button :button-text="(approverWechatUrl ? '重新上传':'微信二维码')" :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> -->
<el-upload ref="upload1" class="avatar-uploader" :auto-upload="false" action="#" :multiple="false" :file-list="fileList1" :http-request="customUpload">
<!-- <div class="flex">
</div> -->
<template #trigger>
<div class="flex">
<img v-if="siteForm.approver_wechat" :src="siteForm.approver_wechat" alt="" class="uploadImg">
<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" />
default-text-color="#23242B" hover-text-color="#006AFF" />
<div class="info-upload-wrapper" @click="clearApproverWechatFiles" style="width: 177px;left: 0;display: flex;justify-content: flex-start;overflow: hidden;">
<el-upload
:on-change="handleApproverWechatChange"
action="#"
list-type="picture-card"
:multiple="false"
:http-request="setApproverWechatUpload"
:limit="Number(1)"
ref="approverWechatUpload"
:auto-upload="false"
>
<i slot="default" class="el-icon-plus"></i>
</el-upload>
</div>
</template>
<div slot="tip" class="el-upload__tip desc">审批人微信二维码大小2M以内</div>
</div>
</el-upload>
<div slot="tip" class="el-upload__tip desc" style="margin-top:8px;">批人微信二维码大小2M以内</div>
</div>
</div>
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm2')" />
<GroupFormBtns @cancel="cancelClick" @confirm="submitApproverWechat" />
</div>
<div class="siteMessage flex-common" id="siteMessage2">
<h3>个人介绍</h3>
@ -112,13 +121,12 @@
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipSelect column="column" label="个人标签" desc="展示给患者,体现您的专业性" v-model="siteForm.label" multiple
:options="options_payword" placeholder="点击选择">
</GuipSelect>
<GuipInput ref="GuipInput" column="column" label="个人标签"
v-model="siteForm.label" prop="name" placeholder="请输入" />
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick('siteForm1')" @confirm="submitForm('siteForm1')" />
<GroupFormBtns @cancel="cancelClick('siteForm1')" @confirm="setDoctorDesc" />
</div>
</div>
</template>
@ -129,7 +137,6 @@ import GuipFormItem from '@/components/GuipFormItem.vue';
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 GuipRadio from '@/components/GuipRadio.vue';
export default {
//
@ -140,10 +147,8 @@ export default {
GuipFormItem,
GuipRadio,
GuipInput,
GuipSelect,
GuipTextarea,
GroupFormBtns
},
data() {
return {
@ -152,37 +157,28 @@ export default {
// { name: 'image.jpeg', url: 'http://jasonyizherenxin.checkcopy.com/user_avatar/1.png?v=93940df0b596961c42de23ef1f2d3257' }
],
fileList1:[],
options_payword: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
doctorAvatoFile:[],
doctorAvatorUrl: '',
approverWechatUrl:'',
approverWechatFile:[],
options_payword: [],
groupOptions: [
{ label: '需审批', value: '1' },
{ label: '不需审批', value: '0' },
],
formData: null,
siteForm: {
doctor_name: '',
idcard: '',
did:0,
name: '',
idcard: ' ',
phone: '',
avator: '',
doctor_desc: '',
doctor_detail: '',
label: '',
first_visit_audit: '1',
approve_phone: ''
approver_phone:'',
approver_wechat:'',
first_visit_audit: '',
},
oldForm: {},
siteFormrules2: {
@ -191,7 +187,7 @@ export default {
]
},
siteFormrules: {
doctor_name: [
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
],
phone: [
@ -226,202 +222,185 @@ export default {
}
},
computed: {
...mapState(['pageTitle']) // VuexshowSidebar
...mapState(['pageTitle'])
},
mounted() {
const doctor_id = this.$route.query.doctor_id; // id
const doctor_id = this.$route.query.doctor_id;
this.doctorId = doctor_id;
if (doctor_id) {
//
this.fetchDoctorData(doctor_id);
}
if (doctor_id) this.getDoctorData(doctor_id);
},
methods: {
fetchDoctorData(id) {
this.$http('POST', '/api/admin/get_doctor_baseinfo', {
did: id
}).then(response => {
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
}];
}
if (response.data.avator) {
this.fileList = [{
name: 'avator',
url: response.data.avator
}];
}
setDoctorDesc() {
if(!this.doctorId) {
this.$message.error('请先设置医生基础信息')
return;
}
var obj = new Object()
obj.did = this.doctorId
obj.desc = this.siteForm.doctor_desc
obj.detail = this.siteForm.doctor_detail
obj.label = this.siteForm.label
this.$http('POST', '/api/admin/set_doctor_desc', obj).then(response => {
if (response.code != 0) {
this.$message.error(response.msg)
return;
}
this.$message.success(response.msg)
}).catch(error => {
console.error(error, 'error')
this.$message.error('设置失败')
})
},
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();
getDoctorData(doctor_id) {
this.$http('POST', '/api/admin/get_doctor_baseinfo', {did:doctor_id}).then(response => {
if (response.code != 0) {
this.$message.error(response.msg)
return;
}
this.siteForm = response.data
this.siteForm.did = doctor_id;
this.siteForm.name = this.siteForm.doctor_name
this.doctorAvatorUrl = this.siteForm.avator
this.approverWechatUrl = this.siteForm.approver_wechat
}).catch(error => {
console.error(error, 'error')
this.$message.error('设置失败')
})
},
setDoctorInfo(param) {
this.$http('POST', '/api/admin/set_doctor_baseinfo', param).then(response => {
if (response.code != 0) {
this.$message.error(response.msg)
return;
}
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) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
this.$message.success(response.msg)
var data = response.data
if(this.doctorId) return;
setTimeout(() => {
location.href = location.href+'?doctor_id='+data.doctor_id
}, 800);
}).catch(error => {
console.error(error, 'error')
this.$message.error('设置失败')
})
},
radioChange(data) {
console.log(data, 'radio--data');
setDoctorBaseInfoUpload(param) {
let fileObj = param.file
let fd = new FormData()
fd.append('avatar_file', fileObj)
var siteForm = this.siteForm
fd.append('did', this.doctorId)
fd.append('name', siteForm.name)
fd.append('phone', siteForm.phone)
fd.append('idcard', siteForm.idcard)
this.setDoctorInfo(fd)
},
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);
submitDoctorBaseInfo() {
if(this.doctorAvatoFile.length == 0) {
if(this.doctorId) {
this.setDoctorInfo(this.siteForm)
return;
}
});
},
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.$message.error('请上传医生照片')
return;
}
//
this.formData.append('extraParam', 'value')
this.$refs.avatorUpload.submit();
},
clearDocotorAvatorFiles(){
this.doctorAvatorUrl = '';
this.doctorAvatoFile = []
this.$refs.avatorUpload.clearFiles();
},
//
handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw);
clearApproverWechatFiles(){
this.approverWechatUrl = '';
this.approverWechatFile = []
this.$refs.approverWechatUpload.clearFiles();
},
beforeAvatarUpload(file) {
console.log(file, '=====file');
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
setApproverWechatUpload(param) {
let fileObj = param.file
let fd = new FormData()
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
fd.append('approver_wechat', fileObj)
var siteForm = this.siteForm
fd.append('did', this.doctorId)
fd.append('first_visit_audit', siteForm.first_visit_audit)
fd.append('approver_phone', siteForm.approver_phone)
this.setApproverWechat(fd)
},
submitForm(form) {
let props = {};
let url = {
siteForm:'/api/admin/get_doctor_baseinfo',
siteForm1:'/api/admin/set_doctor_desc',
siteForm2:'',
}
if (form == 'siteForm') {
this.$refs[form].validate((valid) => {
if (valid) {
props = {
name: this.siteForm.doctor_name,
idcard: this.siteForm.idcard,
avatar_file: this.siteForm.avator,
phone: this.siteForm.phone
}
} else {
return false;
}
});
} else if(form == 'siteForm1') {
props = {
desc: form.doctor_desc,
detail: form.doctor_detail,
label: form.label
}
}else{
props = {
first_visit_audit: form.first_visit_audit,
approver_phone: form.approver_phone,
approver_wechat: form.approver_wechat
}
}
if(this.doctorId){
props.did = this.doctorId;
}
this.$http('POST', url[form], props).then(response => {
if (response.code == 0) {
this.$Message.success('修改成功')
this.fetchDoctorData()
setApproverWechat(param) {
this.$http('POST', '/api/admin/set_doctor_approver', param).then(response => {
if (response.code != 0) {
this.$message.error(response.msg)
return;
}
this.$message.success(response.msg)
var data = response.data
if(this.doctorId) return;
setTimeout(() => {
location.href = location.href+'?doctor_id='+data.doctor_id
}, 800);
}).catch(error => {
console.error(error, 'error')
this.$message.error('设置失败')
})
},
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,
}
submitApproverWechat() {
if(!this.doctorId) {
this.$message.error('请先设置医生基础信息')
return;
}
} else if(type== 'siteForm') {
this.siteForm = {
...this.siteForm,
name: this.oldForm.name,
idcard: this.oldForm.idcard,
avatar_file: this.oldForm.avatar_file,
phone: this.oldForm.phone
}
}else {
this.siteForm = {
...this.siteForm,
first_visit_audit: this.oldForm.first_visit_audit,
approver_phone: this.oldForm.approver_phone,
approver_wechat: this.oldForm.approver_wechat
}
if(this.approverWechatFile.length == 0) {
this.setApproverWechat(this.siteForm)
return;
}
this.$refs.approverWechatUpload.submit();
},
handleApproverWechatChange(file, fileList) {
console.log(file, fileList)
this.approverWechatFile = file
this.approverWechatUrl = URL.createObjectURL(file.raw);
},
handleAvatarChange(file, fileList) {
console.log(file, fileList)
this.doctorAvatoFile = file
this.doctorAvatorUrl = URL.createObjectURL(file.raw);
},
confirmClick(type) {
console.log(type, '确认');
radioChange(data) {
console.log(data, 'radio--data');
},
cancelClick(type) {
console.log(type)
}
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.info-upload-wrapper ::v-deep .el-upload-list.el-upload-list--picture-card{
display: none;
}
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.uploadImg{
width: 150px;
margin-right: 20px;
}
.special-form-item ::v-deep .el-form-item__label{
margin-bottom: 12px;
}
.special-form-item {
.el-form-item__label {
margin-bottom: 12px;
@ -437,10 +416,26 @@ export default {
}
.qqCode-wrap {
margin-top: 12px;
margin-bottom: 14px;
display: flex;
width: 100%;
justify-content: flex-start;
.avator-wrapper{
position: relative;
.info-upload-wrapper{
position: absolute;
display: flex;
justify-content: flex-end;
top: 50%;
margin-top: -19px;
right: 0;
height: 38px;
width: 118px;
overflow: hidden;
opacity: 0;
}
}
.labelImg {
opacity: .7;

15
src/views/ErrorAccess.vue

@ -0,0 +1,15 @@
<template>
<div class="main-error">
访问出错...
</div>
</template>
<style lang="scss" scoped>
.main-error{
width: 100%;
height: 100vh;
font-size: 20px;
color: red;
margin-top: 100px;
}
</style>

275
src/views/HomeView.vue

@ -1,6 +1,5 @@
<template>
<div class="min-width pagePadding " style="background: #F5F7FA;">
<p class="pageTitle bold mb24">基础信息</p>
<div class="min-width pagePadding " style="background: #F5F7FA;" v-if="pageShow">
<div class="doctor-list-wrap ">
<p class="pageTitle">医生列表</p>
<el-form>
@ -12,9 +11,9 @@
</div>
<span class="totalCount">{{ totalNum }}已选{{ selectNum }}</span>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }"
@click="batchOperate('1')">批量禁用</GuipButton>
@click="batchOperate('0')">批量禁用</GuipButton>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }"
@click="batchOperate('2')">
@click="batchOperate('1')">
批量启用</GuipButton>
</div>
<div class="right flex">
@ -25,21 +24,22 @@
</div>
</div>
<div class="tableList mt32" v-for="(item, index) in doctorList" :key="index">
<div class="top flex-between mb24">
<div class="left left1 flex">
<el-checkbox @change="handleCheckAllChange(index)" v-model="item.checked"></el-checkbox>
<el-avatar :src="item.avatar"></el-avatar>
<el-avatar :src="item.avator" v-if="item.avator"></el-avatar>
<span class="name">{{ item.name }}</span>
<span>{{ item.phone }}</span>
<GuipSwitch :modelValue="Boolean(item.status)" @change="onSwitchChange(item, index)">
<GuipSwitch :modelValue="Boolean(Number(item.status))" @change="onSwitchChange(item, index)">
</GuipSwitch>
<GuipButton type="text" @click="editDoctor(item, index)">编辑</GuipButton>
</div>
<div class="right">
<GuipButton type="system" size="form" @click="addHospital(item)">添加医院</GuipButton>
</div>
</div>
<GuipTable :tableData="item.departs" style="width: 100%" :ref="(el) => setPopoverRef(index, el)"
@selection-change="handleSelectionChange(index, $event)" :show-header="false"
:loading="loading">
@ -48,7 +48,7 @@
<el-table-column prop="depart_name" label="出诊医院" min-width="295">
<template slot-scope="scope">
<div class="flex cell_render">
<span>{{ scope.row.depart_name }}</span>
<span>{{ scope.row.hispital_name }} {{ scope.row.depart_name }}</span>
</div>
</template>
</el-table-column>
@ -70,7 +70,7 @@
<el-table-column prop="classify_count" label="套餐" min-width="165">
<template slot-scope="scope">
<div class="flex cell_render">
{{ scope.row.classify_count }}分组
{{ scope.row.package_count }}套餐
</div>
</template>
</el-table-column>
@ -107,66 +107,19 @@ export default {
data() {
return {
list: {
approver_phone: "18888888888",
code: "en4b1v",
create: "2025-05-19 16:20:58",
desc: "擅长运用麦粒灸治疗疑难杂症,特别是恶性肿瘤的治疗,显著改善患者免疫状态。",
detail: "北京中医药大学中医临床特聘专家,师从师怀堂和谢锡亮两大中医泰斗,从事针灸临床50余年,善治免疫系统及其它病症如:各种肿瘤癌症,血小板减少或增多,白细胞减少,经常性感冒、支气管哮喘、过敏性紫癜、妇女尿失禁、夜尿增多,痤疮,急慢性肠炎、痛风、颈椎管狭窄、颈肩腰腿痛、疲劳综合征、失眠,及小儿夜啼、厌食和发育不良等症。",
first_visit_audit: "1",
id: "1",
idcard: "510322197808271433",
approver_phone: "",
code: "",
create: "",
desc: "",
detail: "",
first_visit_audit: "",
id: "",
idcard: "",
label: "",
name: "张小琪",
phone: "18888888888",
uid: "46",
departs: {
1: [
{
classify_count: 3,
create: "2025-05-29 16:37:28",
depart_id: "1",
depart_name: "中医科",
doctor_id: "1",
hid: "1",
hispital_name: "武丽娜中医针灸",
id: "1",
is_fixed: "1",
project_count: 24,
status: "1",
type: "0"
}
],
2: [
{
classify_count: 3,
create: "2025-05-29 16:37:28",
depart_id: "12",
depart_name: "中医科",
doctor_id: "1",
hid: "1",
hispital_name: "武丽娜中医针灸",
id: "1",
is_fixed: "1",
project_count: 24,
status: "1",
type: "0"
},
{
classify_count: 3,
create: "2025-05-29 16:37:28",
depart_id: "11",
depart_name: "中医科",
doctor_id: "1",
hid: "1",
hispital_name: "武丽娜中医针灸",
id: "1",
is_fixed: "1",
project_count: 24,
status: "1",
type: "0"
},
]
}
name: "",
phone: "",
uid: "",
departs: {}
},
tableSelections: [],//
tableData: [
@ -183,88 +136,9 @@ export default {
selectNum: 0,
doctorName: '',
isIndeterminate: false,
doctorList: [
{
id: 10,
checked: false,
name: '一二',
idcard: '532524198711223615',
desc: '就哈哈哈哈,嗷跳舞',
detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。',
tag: '专业',
phone: '17785748373',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
status: 0,
list: [
{
hos: [
'第三人民医院 针灸科',
'第一人民医院 中医科',
],
time: '2054 - 10 - 03',
status: true,
group: '2',
setMenu: '4',
nums: '88',
checked: false,
},
]
},
{
id: 10,
checked: false,
name: '一二',
idcard: '532524198711223615',
desc: '就哈哈哈哈,嗷跳舞',
detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。',
tag: '专业',
phone: '17785748373',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
status: 1,
list: [
{
hos: [
'第三人民医院 针灸科',
'第一人民医院 中医科',
],
time: '2054 - 10 - 03',
status: true,
group: '2',
setMenu: '4',
nums: '88',
checked: false,
},
{
hos: [
'第三人民医院 针灸科',
'第一人民医院 中医科',
],
time: '2054 - 10 - 03',
status: true,
group: '2',
setMenu: '4',
nums: '88',
checked: false,
},
]
},
{
id: 10,
checked: false,
name: '一二',
idcard: '532524198711223615',
desc: '就哈哈哈哈,嗷跳舞',
detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。',
tag: '专业',
phone: '17785748373',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
status: 1,
list: [
]
},
],
doctorList: false,
allChecked: false,
pageShow:false
}
},
components: {
@ -277,6 +151,12 @@ export default {
// CustomDropdown
},
created() {
const { authtoken } = this.$route.query;
if(authtoken) {
localStorage.setItem('authtoken', authtoken);
location.href = '/'
return;
}
store.commit('SET_PAGENAME', '医生管理'); //
},
mounted() {
@ -284,10 +164,6 @@ export default {
store.commit('SET_SLIDER_MENU', 'menuData');
this.getInitData()
},
render() {
console.log("组件重新渲染");
return 'a';
},
computed: {
...mapState(['menuData']) // VuexshowSidebar
},
@ -295,8 +171,9 @@ export default {
//
getInitData() {
this.$http('POST', '/api/admin/doctor_depart_list', {
name: this.doctorName
}).then(response => {
if (response.code == 0 && Object.values(response.data).length > 0) {
if (response.code == 0) {
const list = Object.values(response.data).map(item => {
return {
...item,
@ -305,10 +182,9 @@ export default {
}
})
this.doctorList = list
console.log(list,this.doctorList,'this.doctorList====');
this.calculateTotalNum()
this.pageShow = true
}
}).catch(error => {
console.error(error, 'error')
})
@ -394,40 +270,75 @@ export default {
},
onSwitchChange1(row) {
console.log(row, '------flag');
row.status = !row.status;
row.status = row.status == 0 ? 1 : 0;
this.$http('POST', '/api/admin/depart_mutil_option', {
depart_index_ids:row.id,
status:row.status
}).then(response => {
if (response.code == 0) {
this.$message.success(response.msg);
}else{
this.$message.error(response.msg);
}
this.getInitData()
}).catch(error => {
console.error(error, 'error')
this.$message.error('操作失败');
})
this.$set(this.doctorList, row)
},
batchOperate(type) {
// this.tableSelections
batchOperate(status) {
console.log(this.tableSelections,'this.tableSelections----');
if (type == '1') {
//
// this.getInitData()
if(!this.tableSelections || this.tableSelections.length <= 0) {
this.$message.error('未选择要'+(status == '0' ? '禁用':'启用')+'的科室')
return;
}
} else {
//
var tableSelections = this.tableSelections.flat()
var depart_index_ids = '';
for(var i=0; i< tableSelections.length;i++) {
if(!depart_index_ids) {
depart_index_ids = tableSelections[i].id
continue;
}
depart_index_ids += ','+tableSelections[i].id
}
this.$http('POST', '/api/admin/depart_mutil_option', {
depart_index_ids:depart_index_ids,
status:status
}).then(response => {
if (response.code == 0) {
this.$message.success(response.msg);
}else{
this.$message.error(response.msg);
}
location.reload()
}).catch(error => {
console.error(error, 'error')
this.$message.error('操作失败');
})
},
onSwitchChange(item, index) {
item.status = item.status == 0 ? 1 : 0;
console.log(index, item, '====');
this.$set(this.doctorList, item)
// let depart_ids = ''
//
// this.$http('POST', '/api/admin/depart_mutil_option', {
// doctor_id:item.id,
// depart_ids:'',
// status:''
// }).then(response => {
// if (response.code == 0) {
// this.doctorList = response.data
// }
// }).catch(error => {
// console.error(error, 'error')
// })
this.$http('POST', '/api/admin/set_doctor_status', {
doctor_id:item.id,
status:item.status
}).then(response => {
if (response.code == 0) {
this.$message.success(response.msg);
}else{
this.$message.error(response.msg);
}
}).catch(error => {
console.error(error, 'error')
this.$message.error('操作失败');
})
},
addDoctor() {
this.$router.push({
@ -435,9 +346,9 @@ export default {
})
// this.$router.push({
// name: '',
// // query: {
// // query: {
// // doctorId: 123,
// // from: 'home'
// // from: 'home'
// // }
// })
@ -447,7 +358,7 @@ export default {
addHospital(item) {
this.$router.push({
name: '医院信息',
query: { doctor_id: item.doctor_id }
query: { doctor_id: item.id }
})
},
editDoctor(item) {

542
src/views/HosInformation.vue

@ -9,51 +9,62 @@
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true">
<div class="flex-between" slot="formDom">
<div class="short-width">
<GuipSelect width="100%" v-model="form.province" multiple :options="options_payword"
placeholder="选择省份">
<GuipSelect width="100%" v-model="form.province" :options="options_province" :disabled="(depart_id && doctor_id)?true:false"
placeholder="选择省份" @change="provinceChange">
</GuipSelect>
</div>
<div class="short-width">
<GuipSelect width="100%" v-model="form.city" multiple :options="options_payword"
<GuipSelect width="100%" v-model="form.city" :options="options_city" :disabled="(depart_id && doctor_id)?true:false"
placeholder="选择城市">
</GuipSelect>
</div>
</div>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true">
<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 column="column" class="mb24" label="出诊医院名称" :required="true" style="margin-bottom: 0px;">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_realname" :disabled="true" v-if="depart_id && doctor_id" prop="h_realname"></GuipInput>
</GuipFormItem>
<div class="mb24" style="margin-top:-24px;" v-if="!depart_id && doctor_id">
<el-autocomplete
v-model="hospitalSearchState"
style="width: 100%"
:fetch-suggestions="queryHospital"
placeholder="请输入医院名称或地址"
ref="hospitalAutocomplete"
:popper-class="((hospitalSearchFlag || hospitalRestaurants.length > 0) ? '' : ' el-autocomplete-noloading')"
@select="hospitalHandleSelect">
<template #append>
<el-button icon="el-icon-search" @click="handleSearch" style="padding: 12px;"></el-button>
</template>
</el-autocomplete>
</div>
<GuipFormItem column="column" class="mb24" label="医院简称">
<span slot="formRight" class="desc">方便患者记忆非必填</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name"
prop="h_name" placeholder="请输入" />
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_shortname" prop="h_shortname" placeholder="请输入" />
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="所在科室" :required="true">
<GuipFormItem column="column" class="mb24" label="所在科室">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.depart_name"
prop="depart_name" placeholder="请输入" />
prop="depart_name" :placeholder="(depart_id && doctor_id)?'无':'请输入'" :disabled="(depart_id && doctor_id)?true:false"/>
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24">
<GuipFormItem column="column" class="mb24" v-if="departIsFixed != -1">
<div slot="formLeft" class="form-top-icon">医保定点</div>
<div class="flex" slot="formDom" style="padding: 9px 0px;">
<GuipSwitch :modelValue="form.is_fixed" @change="onSwitchChange" activeText="非医保定点"
inactiveText="非医保定点" active-value="1" inactive-value="0">
<GuipSwitch :model-value="departIsFixed" @change="onSwitchChange" activeText="医保定点" inactiveText="非医保定点" :active-value="true" :inactive-value="false">
</GuipSwitch>
</div>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="使用功能">
<!-- <el-checkbox-group slot="formDom" v-model="form.type" @change="validateSelection" class="checkboxGroup">
<el-checkbox-group slot="formDom" v-model="departType" @change="validateSelection" class="checkboxGroup">
<div class="flex">
<el-checkbox :label="2" >医生名片基础功能不可取消</el-checkbox>
<el-checkbox :label="0">患者预约</el-checkbox>
<el-checkbox :label="1">仅项目计数</el-checkbox>
</div>
<el-checkbox :label="1">项目计数</el-checkbox>
</el-checkbox-group> -->
<el-checkbox :label="2" >仅医生名片</el-checkbox>
</el-checkbox-group>
</GuipFormItem>
<GuipFormItem column="column" class="" label="就诊提醒">
<div slot="formRight" class="desc">就诊前的注意事项非必填</div>
@ -87,13 +98,13 @@
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="flex-right" v-if="form.worktimes">
<GuipFormItem column="column" label="每周出诊安排" :required="true">
<div class="flex weekPlan" slot="formDom">
<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>
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan" :options="options_weekPlan" :label="day.name" placeholder="休息"></GuipSelect>
</div>
</GuipFormItem>
</div>
</div>
@ -121,7 +132,7 @@
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true">
<span class="desc" slot="formRight">患者可提前多久约号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.visit_day"
prop="visit_day" placeholder="请输入" unit="小时">
prop="visit_day" placeholder="请输入" unit="">
<span slot="prependshow">提前</span>
</GuipInput>
</GuipFormItem>
@ -151,7 +162,7 @@
<el-checkbox @change="handleSelectAllChange" v-model="selectAll"
:indeterminate="isIndeterminate">全选</el-checkbox>
</div>
<span class="totalCount">{{ projectList.length }}已选{{ selectedCount }}</span>
<span class="totalCount">{{ projectList.length }}已选8{{ selectedCount }}</span>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }"
@click="batchOperate(0,'project')">批量禁用</GuipButton>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }"
@ -176,8 +187,7 @@
</GuipInput>
</div>
</div>
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable"
@selection-change="handleSelectionChange" :loading="loading" max-height="600px">
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange" :loading="loading">
<el-table-column type="selection" label="选择" width="80"></el-table-column>
<el-table-column prop="name" label="项目名称" min-width="185"></el-table-column>
<el-table-column prop="price" label="项目价格" min-width="155">
@ -185,6 +195,11 @@
<GuipInput width="90%" v-model="scope.row.price" @change="changePrice(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="price" label="治疗时长(分钟)" min-width="155">
<template slot-scope="scope">
<GuipInput width="90%" v-model="scope.row.treat_time" @change="changeTreatTime(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="classify_id" label="分组" min-width="155">
<template slot-scope="scope">
<GuipSelect width="90%" v-model="scope.row.classify_id"
@ -199,18 +214,18 @@
</GuipSwitch>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="100px">
<!-- <el-table-column label="操作" fixed="right" min-width="100px">
<template slot-scope="scope">
<div class="flex">
<el-button type="text" @click="handleClick(scope.row)">编辑</el-button>
</div>
</template>
</el-table-column>
</el-table-column> -->
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
<!-- <el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="projectList.length">
</el-pagination>
</el-pagination> -->
</el-form>
</div>
<div class="siteMessage flex-common mt12" id="siteMessage5">
@ -236,8 +251,7 @@
</div>
</div>
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" max-height="600px"
@selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" >
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" @selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" >
<el-table-column type="selection" label="选择" width="80"></el-table-column>
<el-table-column prop="name" label="套餐名称" min-width="225"></el-table-column>
<el-table-column prop="price" label="套餐价格" min-width="125"></el-table-column>
@ -261,16 +275,16 @@
</template>
</el-table-column>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
<!-- <el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="courseList.length">
</el-pagination>
</el-pagination> -->
</el-form>
</div>
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762"
:show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel"
@close="handleClose" @dialogVisibleChange="dialogVisibleChange">
<BatchProject v-if="dialogType == '1'" :projectTagData="projectTagData" @getproTag="getProTagData" />
<BatchProject ref="channelProject" v-if="dialogType == '1'" :projectTagData="projectTagData" />
</GuipDialog>
<GuipDialog :dialogVisible="dialogVisible1" :title="'新增项目分组'" :show-close-button="true" width="599px"
type="center" :show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel"
@ -296,6 +310,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 GuipSelectFilter from '@/components/GuipSelectFilter.vue';
import { mapState } from 'vuex';
import { Object } from 'core-js';
@ -315,13 +331,17 @@ export default {
GuipSelect,
GuipTextarea,
GroupFormBtns,
// GuipSelectFilter,
},
data() {
return {
doctorId: '',
depart_id:false,
doctor_id:false,
dialogType: '1',
tableKey:Date.now(),
tableKey1:Date.now(),
hospitalName:'',
dialogVisible: false,
dialogVisible1: false,
form1: {
@ -330,9 +350,9 @@ export default {
nameRules: [{ required: true, message: '分组名称不得为空', trigger: 'blur' }],
dialogTitle: '批量录入项目',
currentPage: 1,
pageSize: 10,
pageSize: 1000,
currentPage1: 1,
pageSize1: 10,
pageSize1: 1000,
loading: false,
loading1: false,
selectedRows: [],//
@ -341,42 +361,17 @@ export default {
isIndeterminate1: false,
projectSearchId: 'all',
projectSearchName: '',
projectList: [
{
name: '针灸',
price: '88',
group: '针灸1',
time: '2077 - 12 - 20',
status: true,
id: '1'
},
{
name: '拔罐',
price: '188',
group: '针灸2',
time: '2077 - 12 - 20',
status: true,
id: '2'
},
{
name: '火刺',
price: '55',
group: '针灸1',
time: '2077 - 12 - 20',
status: true,
id: '3'
},
],
projectTagData: [
{
name: '全部分类',
id: '0'
},
],
hospitalRestaurants: [],
hospitalSearchState: '',
hospitalSearchFlag: false,
hospitalSearchTimeout: false,
departIsFixed:-1,
projectList: [],
projectTagData: [],
courseList: [],
selectAll: false,
selectAll1: false,
departType:[],
numSettingForm: {
times: '',
hours: '',
@ -397,22 +392,8 @@ export default {
{ required: true, message: '请输入', trigger: 'blur' }
],
},
options_payword: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
options_province: [],
options_city:[],
weekPlan: {
'周一': '',
'周二': '',
@ -466,27 +447,24 @@ export default {
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"
address:"",
afternoon_worktime:"",
depart_id:"0",
h_name:"",
h_pos:"",
hid:"0",
is_fixed:'0',
morning_worktime:"",
h_shortname:'',
notice:"",
time_unit:"0",
time_unit_num:"0",
treat_expire:"0",
visit_day:"0",
search_province:"",
search_city:"",
},
siteFormrules: {
depart_name: [
{ required: true, message: '请输入科室信息', trigger: 'blur' }
],
h_name: [
{ required: true, message: '请输入出诊医院信息', trigger: 'blur' }
],
},
siteForm1: {
domain_set: '',
@ -496,28 +474,54 @@ export default {
isApprove: '',
phone: ''
},
siteFormrules1: {
domain_source: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
// hosipitalList:[]
hosipitalList: [
{ label: '选项1', value: '1' },
{ label: '选项2', value: '2' },
{ label: '选项3', value: '3' },
// ...
],
}
},
created(){
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU','hosMenuData');
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU','hosMenuData');
},
mounted() {
async mounted() {
const { depart_id, doctor_id } = this.$route.query; // doctorId
if(doctor_id) this.doctor_id = doctor_id;
if (doctor_id && depart_id) {
//
this.depart_id = depart_id;
this.doctor_id = doctor_id;
this.fetchDoctorData()
await this.fetchDoctorData()
console.log(this.doctor_id)
await this.getAreaData()
this.fetchPackData()
this.fetchProjectData()
this.geHosAdress()
}else{
await this.getAreaData()
}
},
watch: {
'$route.query': {
immediate: true,
deep: true,
handler(newVal) {
this.doctor_id = newVal.doctor_id;
this.depart_id = newVal.depart_id;
this.getAreaData();
this.fetchDoctorData();
this.fetchPackData();
this.fetchProjectData();
this.geHosAdress();
}
}
},
computed: {
@ -527,21 +531,95 @@ export default {
...mapState(['hosMenuData']) // VuexshowSidebar
},
methods: {
handleSearch() {
if(this.hospitalSearchFlag) return
this.hospitalSearchFlag = true
if(!this.hospitalSearchState.trim()) {
this.$message.error('医院名称或地址不能为空');
this.hospitalSearchFlag = false
return
}
this.getInternetHospital(this.hospitalSearchState)
},
hospitalHandleSelect(item) {
this.form.h_realname = item.value
this.form.search_province = item.province
this.form.search_city = item.city
this.form.address = item.address
this.form.h_pos = item.location.lat + ',' + item.location.lng
console.log(item)
},
getInternetHospital(queryString) {
if(!this.hospitalSearchFlag) return;
this.hospitalSearchTimeout = setTimeout(function(){
this.hospitalSearchFlag = false
}.bind(this), 5000);
this.$http('POST', '/api/admin/search_hoispital', {
keyword: queryString,
province: this.form.province,
city: this.form.city,
}).then(response => {
this.hospitalSearchFlag = false
clearTimeout(this.hospitalSearchTimeout)
if(response.code !== 0) {
this.hospitalRestaurants = []
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState)
this.$message.error(response.msg);
return
}
this.hospitalRestaurants = Object.values(response.data)
this.$refs.hospitalAutocomplete.activated = true
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState)
if(this.hospitalRestaurants.length <= 0) this.$message.error('未查询相关信息');
}).catch(error => {
this.hospitalSearchFlag = false
clearTimeout(this.hospitalSearchTimeout)
this.hospitalRestaurants = []
console.error(error, 'error')
})
},
queryHospital(queryString, cb) {
console.log(queryString)
cb(this.hospitalRestaurants);
},
random() {
var randomNumber = Math.random();
return randomNumber
},
fetchDoctorData() {
provinceChange(e) {
this.options_city = []
this.form.city = ''
this.getAreaData(e)
},
async getAreaData(province = '') {
if (province != '') this.options_city = []
this.$http('POST', '/api/admin/get_areas_data', {
province: province,
}).then(response => {
if (province == '') {
this.options_province = response.data
}else{
this.options_city = response.data
}
}).catch(error => {
console.error(error, 'error')
})
},
async fetchDoctorData() {
this.$http('POST', '/api/admin/get_depart_info', {
depart_id: this.depart_id,
doctor_id: this.doctor_id
}).then(response => {
this.form = { ...this.form, ...response.data,
type:response.type ? [Number(response.type)] : [2],
'morning_worktime':response.data.morning_worktime.split('-'),
'afternoon_worktime':response.data.afternoon_worktime.split('-')
'morning_worktime':response.data.morning_worktime ? response.data.morning_worktime.split('-'):'',
'afternoon_worktime':response.data.afternoon_worktime ? response.data.afternoon_worktime.split('-'):''
}
this.departType = (response.data.type || response.data.type === 0 || response.data.type === "0") ? [Number(response.data.type)] : []
this.departIsFixed = response.data.is_fixed == "1" ? true : false
this.getAreaData(this.form.province)
}).catch(error => {
console.error(error, 'error')
})
@ -555,7 +633,7 @@ export default {
if(response.code == 0){
this.loading1 = false
this.$nextTick(()=>{
this.courseList = response.data.list;
this.courseList = response.data.list ? response.data.list : [];
this.tableKey1 = Date.now(); //
})
}
@ -566,16 +644,26 @@ export default {
},
//
fetchProjectData() {
this.$http('POST', '/api/admin/get_project_list', {
var param = {
depart_id: this.depart_id,
doctor_id: this.doctor_id
}).then(response => {
doctor_id: this.doctor_id,
name:this.projectSearchName,
classify_id:this.projectSearchId
}
this.$http('POST', '/api/admin/get_project_list', param).then(response => {
if(response.code == 0){
this.loading = false
this.$nextTick(()=>{
this.projectTagData = response.data.classify;//
this.projectList = Object.values(response.data.list);//
this.tableKey = Date.now(); //
if(response.data.classify) {
this.projectTagData = response.data.classify;//
if(response.data.list && response.data.list.length > 0) {
this.projectList = Object.values(response.data.list);//
}else{
this.projectList = []
}
this.tableKey = Date.now(); //
}
// this.$set('projectList',Object.values(response.data.list))
// this.$set('projectTagData',response.data.classify)
})
@ -595,13 +683,8 @@ export default {
})
},
validateSelection(val) {
//
if (!val.includes(2)) {
this.$nextTick(() => {
this.form.type = [...val, 2];
this.$message.warning('基础功能不可取消');
});
}
this.departType = []
if(val.length > 0) this.departType[0] = val[val.length-1]
},
selectTag(item) {
if(item == 'all'){
@ -610,43 +693,22 @@ export default {
this.projectSearchId = item.id;
}
//
// this.getFilterProject()
this.fetchProjectData()
},
getFilterProject(){
//
this.$http('POST', '/supernew/ajax_get_type_batch_list', {
//
projectid:this.projectSearchId == 'all' ? '' : this.projectSearchId,
//
projectSearchName:this.projectSearchName
}).then(response => {
this.projectTagData = response.data;
}).catch(error => {
console.error(error, 'error')
})
},
getProTagData() {
this.$http('POST', '/supernew/ajax_get_type_batch_list', {
}).then(response => {
this.projectTagData = response.data
}).catch(error => {
console.error(error, 'error')
})
this.fetchProjectData()
},
//
changePrice(row) {
if (row.sort) {
this.editorProjectInfo({ price: row.price, project_id: row.id })
}
this.editorProjectInfo({ price: row.price, project_id: row.id })
},
//
changeTreatTime(row) {
this.editorProjectInfo({ treat_time: row.treat_time, project_id: row.id })
},
//
changeClassify(row) {
if (row.sort) {
this.editorProjectInfo({ classify_id: row.classify_id, project_id: row.id })
}
this.editorProjectInfo({ classify_id: row.classify_id, project_id: row.id })
},
editorProjectInfo(props) {
this.$http('POST', '/api/admin/edit_project', {
@ -656,14 +718,14 @@ export default {
}).then(response => {
if (response.code == 0) {
this.$Message.success('修改成功')
this.getInitData()
this.fetchProjectData()
}
}).catch(error => {
console.error(error, 'error')
})
},
addNewSetMenu() {
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id${this.depart_id}`)
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id=${this.depart_id}`)
},
addNewGroup(){
this.dialogVisible1 = true
@ -683,28 +745,64 @@ export default {
this.currentPage = val
this.getData()
},
//
handleConfirm() {
if (this.dialogVisible1) {
this.$refs['projectNameForm'].validate((valid) => {
if (valid) {
alert('submit!');
this.dialogVisible1 = false;
this.$http('POST', '/api/admin/add_project_group', {
name:this.form1.projectName.trim(),
depart_id: this.depart_id,
doctor_id: this.doctor_id,
}).then(response => {
if (response.code == 0) {
this.$Message.success('修改成功')
this.dialogVisible1 = false;
this.form1.projectName = ''
this.fetchProjectData()
}
}).catch(error => {
this.$Message.error(error || '错误!')
})
} else {
console.log('error submit!!');
this.$Message.info('项目分组名称不可为空')
return false;
}
});
} else if (this.dialogVisible) {
this.$Message.success('点击了确认按钮');
this.dialogVisible = false;
} else if (this.dialogVisible) {//
let data = JSON.parse(JSON.stringify(this.$refs.channelProject.form));
let str = data.project_contents;
data.project_contents = str.trim();
if((data.groupType == '1' && !data.classify_id) || (data.groupType == '2' && !data.classify_name)){
this.$Message.info('分组不能为空')
return;
}
if(!data.project_contents) {
this.$Message.info('录入项目内容不能为空!')
return;
}
this.$http('POST', '/api/admin/mitil_add_project', {
depart_id: this.depart_id,
doctor_id: this.doctor_id,
...data
}).then(response => {
if (response.code == 0) {
this.$Message.success('新增项目成功')
this.$refs.channelProject.formReset()
this.dialogVisible = false;
this.fetchProjectData();
}
}).catch(error => {
this.$Message.error(error || '错误!')
})
}
},
//
handleCancel() {
this.$Message.warning('点击了取消按钮');
if(this.dialogVisible)this.$refs.channelProject.formReset()
this.dialogVisible = false;
this.dialogVisible1 = false;
},
@ -712,12 +810,18 @@ export default {
console.log(data, 'data098908090');
},
onSwitchChange1(row) {
row.status = !row.status;
row.status = row.status == 0 ? 1 : 0;
this.$set(this.projectList, row)
this.editorProjectInfo({ status: row.status, project_id: row.id })
},
onSwitchChange2(row) {
row.status = !row.status;
console.log(row.status)
var tmpstatus = row.status == 1 ? 0 : 1
this.$set(this.courseList, row)
this.selectedRows1 = [row]
this.batchOperate(tmpstatus, 'group')
},
handleClick1(row) {
console.log(row);
@ -829,7 +933,7 @@ export default {
// console.log(url,props);
this.changePackData(url,props,name)
},
//
//
changePackData(url,params,name) {
this.$http('POST',url , {
...params
@ -893,55 +997,104 @@ export default {
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
this.form.is_fixed = data ? 1 : 0
this.departIsFixed = data
console.log(data, '---');
},
updateHosInfo(props){
this.$http('POST', '/api/admin/set_hospital_depart', {
updateHosInfo(props, url){
if(this.doctor_id) props.doctor_id = this.doctor_id;
if(this.doctor_id && this.depart_id) {
props.doctor_id = this.doctor_id;
props.depart_id = this.depart_id;
props.hid = this.form.hid;
}
this.$http('POST', url, {
...props
}).then(response => {
if(response.code == 0){
this.$Message.success('更新成功')
if(this.doctor_id && !this.depart_id) {
var that = this
setTimeout(()=>{
that.$router.push({
name: '医院信息',
query: { doctor_id: this.doctor_id, depart_id: response.data.depart_id }
})
},1000)
}
return;
}
this.$Message.error(response.msg)
}).catch(error => {
console.error(error, 'error')
})
},
submitForm(form) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
console.log(this[form], '======formxinxi8', '=============='+form);
var rqurl = '';
if (valid) {
alert('提交成功!');
let props = {}
switch(form){
case 'siteForm1':
var worktimesArray = Object.entries(this.form.worktimes).map(([key, value]) => ({
type: parseInt(key),
plan: value.plan
}));
props={
morning_worktime:form.morning_worktime.join('-'),
afternoon_worktime:form.afternoon_worktime.join('-')
morning_worktime:this.form.morning_worktime.join('-'),
afternoon_worktime:this.form.afternoon_worktime.join('-'),
week_visit_plan:JSON.stringify(worktimesArray),
}
rqurl = "/api/admin/set_depart_worktime";
break;
case 'siteForm':
if(this.doctor_id && !this.depart_id) {
if(!this.form.search_province.trim() || !this.form.search_city.trim() || !this.form.address.trim() || !this.form.h_pos.trim()) {
this.$Message.info('请选择搜索结果下拉中的出诊医院')
return;
}
}
if(this.departType.length <= 0) {
this.$Message.info('请选择使用功能')
return;
}
props={
is_fixed:this.form.is_fixed,
type:form.type,
notice:form.notice
type:this.departType[0],
notice:this.form.notice,
h_shortname:this.form.h_shortname
}
if(this.doctor_id && !this.depart_id) {
if(this.departType.length <= 0) {
this.$Message.info('请选择使用功能')
return;
}
props = this.form
props.type = this.departType[0]
}
rqurl = "/api/admin/set_hospital_depart";
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,
time_unit:this.form.time_unit,
time_unit_num:this.form.time_unit_num,
visit_day:this.form.visit_day,
treat_expire:this.form.treat_expire,
}
rqurl = "/api/admin/set_visit_num";
break;
}
this.updateHosInfo(props)
this.updateHosInfo(props, rqurl)
} else {
return false;
}
@ -958,11 +1111,14 @@ export default {
}
</script>
<style lang="scss">
.el-autocomplete-noloading{
display: none !important;
}
.weekPlan {
display: grid;
grid-gap: 12px 44px;
grid-template-columns: repeat(2, 1fr);
}
#siteMessage4 ::v-deep .el-form-item {
margin-bottom: 0 !important;
@ -999,7 +1155,7 @@ export default {
}
.tabProject {
width: calc(100% - 380px);
width: calc(100% - 380px);
overflow-x: auto;
.overTab{

4
vue.config.js

@ -3,6 +3,7 @@ const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
// publicPath: '/new/',
devServer: {
port:80,
proxy: {
'/api': {
target: 'http://jasonyizherenxin.checkcopy.com',
@ -11,7 +12,8 @@ module.exports = {
'^/api': ''
}
}
}
},
allowedHosts:'all',
},
configureWebpack: {
module: {

Loading…
Cancel
Save