| xqd
@@ -1,19 +1,25 @@
|
|
|
<template>
|
|
|
<view style="width: 100%;height: 100%;">
|
|
|
<!-- 性别选择器 -->
|
|
|
- <u-select v-model="sexshow" :list="sexlist" @confirm="sexconfirm" @change='getsex'></u-select>
|
|
|
+ <u-select v-model="sexshow" :list="sexlist" @confirm="sexconfirm"></u-select>
|
|
|
<!-- 省 -->
|
|
|
- <u-select v-model="provinceshow" :list="provincelist" @confirm="provinceconfirm" @click='getpro'></u-select>
|
|
|
+ <u-select v-model="provinceshow" :list="provincelist" @confirm="sheng" value-name="id" label-name="name"></u-select>
|
|
|
+ <u-select v-model="provinceshow2" :list="provincelist2" @confirm="sheng2" value-name="id" label-name="name"></u-select>
|
|
|
<!-- 市 -->
|
|
|
- <u-select v-model="cityshow" :list="citylist" @confirm="cityconfirm"></u-select>
|
|
|
+ <u-select v-model="cityshow" :list="citylist" @confirm="shi" value-name="id" label-name="name"></u-select>
|
|
|
+ <u-select v-model="cityshow2" :list="citylist2" @confirm="shi2" value-name="id" label-name="name"></u-select>
|
|
|
<!-- 区县 -->
|
|
|
- <u-select v-model="areashow" :list="arealist" @confirm="areaconfirm"></u-select>
|
|
|
+ <u-select v-model="areashow" :list="arealist" @confirm="qu" value-name="id" label-name="name"></u-select>
|
|
|
+ <u-select v-model="areashow2" :list="arealist2" @confirm="qu2" value-name="id" label-name="name"></u-select>
|
|
|
<!-- 医院 -->
|
|
|
- <u-select v-model="hospitalshow" :list="hospitallist" @confirm="hospitalconfirm"></u-select>
|
|
|
+ <u-select v-model="hospitalshow" :list="hospitallist" @confirm="yy" value-name="id" label-name="name"></u-select>
|
|
|
+ <u-select v-model="hospitalshow2" :list="hospitallist2" @confirm="yy2" value-name="id" label-name="name"></u-select>
|
|
|
<!-- 科室 -->
|
|
|
- <u-select v-model="departmentshow" :list="departmentlist" @confirm="departmentconfirm"></u-select>
|
|
|
+ <u-select v-model="departmentshow" :list="departmentlist" @confirm="ks" value-name="id" label-name="name"></u-select>
|
|
|
+ <u-select v-model="departmentshow2" :list="departmentlist2" @confirm="ks2" value-name="id" label-name="name"></u-select>
|
|
|
<!-- 资质 -->
|
|
|
- <u-select v-model="qualificationsshow" :list="qualificationslist" @confirm="qualificationsconfirm"></u-select>
|
|
|
+ <u-select v-model="qualificationsshow" :list="qualificationslist" @confirm="zz" value-name="id" label-name="name"></u-select>
|
|
|
+ <u-select v-model="qualificationsshow2" :list="qualificationslist2" @confirm="zz2" value-name="id" label-name="name"></u-select>
|
|
|
|
|
|
|
|
|
|
| xqd
@@ -52,78 +58,147 @@
|
|
|
</view>
|
|
|
|
|
|
<u-gap height="30" bg-color="#f0f2f5"></u-gap>
|
|
|
- <!-- 工作机构 -->
|
|
|
- <view v-for="item,index in form.work" :key='index'>
|
|
|
- <view style="padding: 45rpx 28rpx 30rpx 28rpx;background-color: #FFFFFF;">
|
|
|
- <view style="margin-bottom: 50rpx;font-weight: bold;font-size: 30rpx;">
|
|
|
- {{item.name}}
|
|
|
+ <!-- 工作机构一 -->
|
|
|
+ <view style="padding: 45rpx 28rpx 30rpx 28rpx;background-color: #FFFFFF;">
|
|
|
+ <view style="margin-bottom: 50rpx;font-weight: bold;font-size: 30rpx;">
|
|
|
+ {{form.work1.name}}
|
|
|
+ </view>
|
|
|
+ <view class="flex">
|
|
|
+ <!-- ****************省份**************** -->
|
|
|
+ <view class="xiala" @click="viewsheng1" style="border-right: 1rpx solid #dddfe1;">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
+ </view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work1.province}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- ********************* 城市*************** -->
|
|
|
+ <view class="xiala" @click="viewshi1">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
+ </view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work1.city}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-gap height="40" bg-color="#ffffff"></u-gap>
|
|
|
+ <view class="flex">
|
|
|
+ <!-- **********************区县******************* -->
|
|
|
+ <view class="xiala" @click="viewqu1" style="border-right: 1rpx solid #dddfe1;">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
+ </view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work1.area}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- **********************医院********************** -->
|
|
|
+ <view class="xiala" @click="viewyy1">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
+ </view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work1.hospital}}</view>
|
|
|
</view>
|
|
|
- <view class="flex">
|
|
|
- <!-- ****************省份**************** -->
|
|
|
- <view class="xiala" @click="provinceshow=true,province=index" style="border-right: 1rpx solid #dddfe1;">
|
|
|
- <!-- 图标 -->
|
|
|
- <view style="margin:0 20rpx;">
|
|
|
- <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
- </view>
|
|
|
- <!-- 文字 -->
|
|
|
- <view style="color:#999999">{{item.province}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view style="margin:50rpx 0;font-weight: bold;font-size: 30rpx;">科室资质</view>
|
|
|
+ <view class="flex">
|
|
|
+ <!-- ********************************科室************************************ -->
|
|
|
+ <view class="xiala" @click="viewks1" style="border-right: 1rpx solid #dddfe1;">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
+ </view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work1.department}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- ***********************************资质***************** -->
|
|
|
+ <view class="xiala" @click="viewzz1">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
+ </view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work1.qualifications}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-gap height="30" bg-color="#f0f2f5"></u-gap>
|
|
|
+
|
|
|
+ <!-- 工作机构二 -->
|
|
|
+ <view style="padding: 45rpx 28rpx 30rpx 28rpx;background-color: #FFFFFF;">
|
|
|
+ <view style="margin-bottom: 50rpx;font-weight: bold;font-size: 30rpx;">
|
|
|
+ {{form.work2.name}}
|
|
|
+ </view>
|
|
|
+ <view class="flex">
|
|
|
+ <!-- ****************省份**************** -->
|
|
|
+ <view class="xiala" @click="viewsheng2" style="border-right: 1rpx solid #dddfe1;">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
</view>
|
|
|
- <!-- ********************* 城市*************** -->
|
|
|
- <view class="xiala" @click="cityshow=true,city=index">
|
|
|
- <!-- 图标 -->
|
|
|
- <view style="margin:0 20rpx;">
|
|
|
- <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
- </view>
|
|
|
- <!-- 文字 -->
|
|
|
- <view style="color:#999999">{{item.city}}</view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work2.province}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- ********************* 城市*************** -->
|
|
|
+ <view class="xiala" @click="viewshi2">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
</view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work2.city}}</view>
|
|
|
</view>
|
|
|
- <u-gap height="40" bg-color="#ffffff"></u-gap>
|
|
|
- <view class="flex">
|
|
|
- <!-- **********************区县******************* -->
|
|
|
- <view class="xiala" @click="areashow=true,area=index" style="border-right: 1rpx solid #dddfe1;">
|
|
|
- <!-- 图标 -->
|
|
|
- <view style="margin:0 20rpx;">
|
|
|
- <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
- </view>
|
|
|
- <!-- 文字 -->
|
|
|
- <view style="color:#999999">{{item.area}}</view>
|
|
|
+ </view>
|
|
|
+ <u-gap height="40" bg-color="#ffffff"></u-gap>
|
|
|
+ <view class="flex">
|
|
|
+ <!-- **********************区县******************* -->
|
|
|
+ <view class="xiala" @click="viewqu2" style="border-right: 1rpx solid #dddfe1;">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
</view>
|
|
|
- <!-- **********************医院********************** -->
|
|
|
- <view class="xiala" @click="hospitalshow=true,hospital=index">
|
|
|
- <!-- 图标 -->
|
|
|
- <view style="margin:0 20rpx;">
|
|
|
- <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
- </view>
|
|
|
- <!-- 文字 -->
|
|
|
- <view style="color:#999999">{{item.hospital}}</view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work2.area}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- **********************医院********************** -->
|
|
|
+ <view class="xiala" @click="viewyy2">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
</view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work2.hospital}}</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
|
|
|
- <view style="margin:50rpx 0;font-weight: bold;font-size: 30rpx;">科室资质</view>
|
|
|
- <view class="flex">
|
|
|
- <!-- ********************************科室************************************ -->
|
|
|
- <view class="xiala" @click="departmentshow=true,department=index" style="border-right: 1rpx solid #dddfe1;">
|
|
|
- <!-- 图标 -->
|
|
|
- <view style="margin:0 20rpx;">
|
|
|
- <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
- </view>
|
|
|
- <!-- 文字 -->
|
|
|
- <view style="color:#999999">{{item.department}}</view>
|
|
|
+ <view style="margin:50rpx 0;font-weight: bold;font-size: 30rpx;">科室资质</view>
|
|
|
+ <view class="flex">
|
|
|
+ <!-- ********************************科室************************************ -->
|
|
|
+ <view class="xiala" @click="viewks2" style="border-right: 1rpx solid #dddfe1;">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
</view>
|
|
|
- <!-- ***********************************资质***************** -->
|
|
|
- <view class="xiala" @click="qualificationsshow=true,qualifications=index">
|
|
|
- <!-- 图标 -->
|
|
|
- <view style="margin:0 20rpx;">
|
|
|
- <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
- </view>
|
|
|
- <!-- 文字 -->
|
|
|
- <view style="color:#999999">{{item.qualifications}}</view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work2.department}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- ***********************************资质***************** -->
|
|
|
+ <view class="xiala" @click="viewzz2">
|
|
|
+ <!-- 图标 -->
|
|
|
+ <view style="margin:0 20rpx;">
|
|
|
+ <u-icon name="arrow-down" color="#dddfe1"></u-icon>
|
|
|
</view>
|
|
|
+ <!-- 文字 -->
|
|
|
+ <view style="color:#999999">{{form.work2.qualifications}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-gap height="30" bg-color="#f0f2f5"></u-gap>
|
|
|
</view>
|
|
|
+ <u-gap height="30" bg-color="#f0f2f5"></u-gap>
|
|
|
<!-- 照片上传 -->
|
|
|
<view style="border-bottom: 0.5rpx solid #EFEFEF;padding: 10rpx 25rpx;">
|
|
|
<view style="margin-bottom: 30rpx;">
|
| xqd
@@ -167,15 +242,11 @@
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- components: {
|
|
|
-
|
|
|
- },
|
|
|
+ components: {},
|
|
|
onLoad() {
|
|
|
-
|
|
|
- },
|
|
|
- mounted() {
|
|
|
-
|
|
|
+ this.provinceconfirm()
|
|
|
},
|
|
|
+ mounted() {},
|
|
|
data() {
|
|
|
return {
|
|
|
//保存选择的列数
|
| xqd
@@ -189,7 +260,7 @@
|
|
|
name: '', //姓名
|
|
|
sex: '', //性别
|
|
|
ID: '', //身份证
|
|
|
- work: [{ //工作机构
|
|
|
+ work1: { //工作机构
|
|
|
name: '工作机构一',
|
|
|
province: '选择省份', //省
|
|
|
city: '选择城市', //市
|
| xqd
@@ -197,7 +268,8 @@
|
|
|
hospital: '选择医院', //医院
|
|
|
department: '科室名称', //科室
|
|
|
qualifications: '默认资质' //资质
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ work2: {
|
|
|
name: '工作机构二',
|
|
|
province: '选择省份', //省
|
|
|
city: '选择城市', //市
|
| xqd
@@ -205,8 +277,8 @@
|
|
|
hospital: '选择医院', //医院
|
|
|
department: '科室名称', //科室
|
|
|
qualifications: '默认资质' //资质
|
|
|
- }],
|
|
|
- fromwork:[], // 向后台传的科室和资质
|
|
|
+ },
|
|
|
+ fromwork: [], // 向后台传的科室和资质
|
|
|
certificate: [], //证书
|
|
|
idPhoto: [], //身份证
|
|
|
doctorQualification: [] //医生资格
|
| xqd
@@ -224,167 +296,423 @@
|
|
|
],
|
|
|
//省
|
|
|
provinceshow: false,
|
|
|
- provincelist: [{
|
|
|
- value: '1',
|
|
|
- label: '广东省'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '广西省'
|
|
|
- }
|
|
|
- ],
|
|
|
+ provinceshow2: false,
|
|
|
+ provincelist: [],
|
|
|
+ provincelist2: [],
|
|
|
//市
|
|
|
cityshow: false,
|
|
|
- citylist: [{
|
|
|
- value: '1',
|
|
|
- label: '广州'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '深圳'
|
|
|
- }
|
|
|
- ],
|
|
|
+ cityshow2: false,
|
|
|
+ citylist: [],
|
|
|
+ citylist2: [],
|
|
|
//区
|
|
|
areashow: false,
|
|
|
- arealist: [{
|
|
|
- value: '1',
|
|
|
- label: '罗湖区'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '高要区'
|
|
|
- }
|
|
|
- ],
|
|
|
+ areashow2: false,
|
|
|
+ arealist: [],
|
|
|
+ arealist2: [],
|
|
|
//医院
|
|
|
hospitalshow: false,
|
|
|
- hospitallist: [{
|
|
|
- value: '1',
|
|
|
- label: '****医院'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '***医院'
|
|
|
- }
|
|
|
- ],
|
|
|
+ hospitalshow2: false,
|
|
|
+ hospitallist: [],
|
|
|
+ hospitallist2: [],
|
|
|
//科室
|
|
|
departmentshow: false,
|
|
|
- departmentlist: [{
|
|
|
- value: '1',
|
|
|
- label: '外科'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '内科'
|
|
|
- }
|
|
|
- ],
|
|
|
+ departmentshow2: false,
|
|
|
+ departmentlist: [],
|
|
|
+ departmentlist2: [],
|
|
|
//资质
|
|
|
qualificationsshow: false,
|
|
|
- qualificationslist: [{
|
|
|
- value: '1',
|
|
|
- label: '高'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '低'
|
|
|
- }
|
|
|
- ],
|
|
|
+ qualificationsshow2: false,
|
|
|
+ qualificationslist: [],
|
|
|
+ qualificationslist2: [],
|
|
|
+ /**已经选择的id***/
|
|
|
+ id1: {
|
|
|
+ sheng: '',
|
|
|
+ shi: '',
|
|
|
+ qu: ''
|
|
|
+ },
|
|
|
+ id2: {
|
|
|
+ sheng: '',
|
|
|
+ shi: '',
|
|
|
+ qu: ''
|
|
|
+ },
|
|
|
+ //提交的数据
|
|
|
+ work: [{ //工作机构
|
|
|
+ id: '',
|
|
|
+ depart: '', //科室id
|
|
|
+ qualifications: '', //资质id
|
|
|
+
|
|
|
+ }, {
|
|
|
+ id: '',
|
|
|
+ depart: '', //科室id
|
|
|
+ qualifications: '', //资质id
|
|
|
+ }],
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // <!-- 性别选择器 -->
|
|
|
+ // <u-select v-model="sexshow" :list="sexlist" @confirm="sexconfirm"></u-select>
|
|
|
+ // <!-- 省 -->
|
|
|
+ // <u-select v-model="provinceshow" :list="provincelist" @confirm="sheng" value-name="id" label-name="name"></u-select>
|
|
|
+ // <u-select v-model="provinceshow2" :list="provincelist2" @confirm="sheng2" value-name="id" label-name="name"></u-select>
|
|
|
+ // <!-- 市 -->
|
|
|
+ // <u-select v-model="cityshow" :list="citylist" @confirm="shi" value-name="id" label-name="name"></u-select>
|
|
|
+ // <u-select v-model="cityshow2" :list="citylist2" @confirm="shi2" value-name="id" label-name="name"></u-select>
|
|
|
+ // <!-- 区县 -->
|
|
|
+ // <u-select v-model="areashow" :list="arealist" @confirm="qu" value-name="id" label-name="name"></u-select>
|
|
|
+ // <u-select v-model="areashow2" :list="arealist2" @confirm="qu2" value-name="id" label-name="name"></u-select>
|
|
|
+ // <!-- 医院 -->
|
|
|
+ // <u-select v-model="hospitalshow" :list="hospitallist" @confirm="yy" value-name="id" label-name="name"></u-select>
|
|
|
+ // <u-select v-model="hospitalshow2" :list="hospitallist2" @confirm="yy2" value-name="id" label-name="name"></u-select>
|
|
|
+ // <!-- 科室 -->
|
|
|
+ // <u-select v-model="departmentshow" :list="departmentlist" @confirm="ks" value-name="id" label-name="name"></u-select>
|
|
|
+ // <u-select v-model="departmentshow2" :list="departmentlist2" @confirm="ks2" value-name="id" label-name="name"></u-select>
|
|
|
+ // <!-- 资质 -->
|
|
|
+ // <u-select v-model="qualificationsshow" :list="qualificationslist" @confirm="zz" value-name="id"
|
|
|
+ // label-name="name"></u-select>
|
|
|
+ // <u-select v-model="qualificationsshow2" :list="qualificationslist2" @confirm="zz2" value-name="id" label-name="name"></u-select>
|
|
|
+ /*****************view点击**********************/
|
|
|
+ //省
|
|
|
+ viewsheng1(e) {
|
|
|
+ this.provinceshow = true, this.province = 1
|
|
|
+ },
|
|
|
+ viewsheng2(e) {
|
|
|
+ this.provinceshow2 = true, this.province = 2
|
|
|
+ },
|
|
|
+ //市 判断是否选择了省,不然不让选择
|
|
|
+ viewshi1(e) {
|
|
|
+ if (this.form.work1.province == '选择省份') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择省份',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.cityshow = true
|
|
|
+ this.city = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ viewshi2(e) {
|
|
|
+ if (this.form.work2.province == '选择省份') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择省份',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.cityshow2 = true
|
|
|
+ this.city = 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //区
|
|
|
+ viewqu1(e) {
|
|
|
+ if (this.form.work1.city == '选择城市') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择城市',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.areashow = true
|
|
|
+ this.area = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ viewqu2(e) {
|
|
|
+ if (this.form.work2.city == '选择城市') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择城市',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.areashow2 = true
|
|
|
+ this.area = 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //医院
|
|
|
+ viewyy1(e) {
|
|
|
+ if (this.form.work1.area == '选择县区') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择县区',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.hospitalshow = true
|
|
|
+ this.hospital = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ viewyy2(e) {
|
|
|
+ if (this.form.work2.area == '选择县区') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择县区',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.hospitalshow2 = true
|
|
|
+ this.hospital = 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //科室
|
|
|
+ viewks1(e) {
|
|
|
+ if (this.form.work1.hospital == '选择医院') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择医院',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.departmentshow = true
|
|
|
+ this.department = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ viewks2(e) {
|
|
|
+ if (this.form.work1.hospital == '选择医院') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择医院',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.departmentshow2 = true
|
|
|
+ this.department = 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //资质
|
|
|
+ viewzz1(e) {
|
|
|
+ if (this.form.work1.department == '科室名称') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择科室',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.qualificationsshow = true
|
|
|
+ this.qualifications = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ viewzz2(e) {
|
|
|
+ if (this.form.work2.department == '科室名称') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择科室',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.qualificationsshow2 = true
|
|
|
+ this.qualifications = 2
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /************************/
|
|
|
// 性别
|
|
|
sexconfirm(e) {
|
|
|
console.log(e);
|
|
|
this.form.sex = e[0].label
|
|
|
console.log(this.form.sex);
|
|
|
},
|
|
|
+ /********************选择器点击事件******************************/
|
|
|
+ //省选择器
|
|
|
+ sheng(e) {
|
|
|
+ console.log('打开了省选择器1')
|
|
|
+ this.form.work1.province = e[0].label
|
|
|
+ this.cityconfirm(e[0].value)
|
|
|
+ this.id1.sheng = e[0].value //把id存到这里
|
|
|
+ },
|
|
|
+ sheng2(e) {
|
|
|
+ console.log('打开了省选择器2')
|
|
|
+ this.form.work2.province = e[0].label
|
|
|
+ this.cityconfirm(e[0].value)
|
|
|
+ this.id2.sheng = e[0].value
|
|
|
+ },
|
|
|
+ //市选择器
|
|
|
+ shi(e) {
|
|
|
+ console.log('打开了市选择器1')
|
|
|
+ this.form.work1.city = e[0].label
|
|
|
+ this.areaconfirm(e[0].value)
|
|
|
+ this.id1.shi = e[0].value
|
|
|
+
|
|
|
+ },
|
|
|
+ shi2(e) {
|
|
|
+ console.log('打开了市选择器2')
|
|
|
+ this.form.work2.city = e[0].label
|
|
|
+ this.areaconfirm(e[0].value)
|
|
|
+ this.id2.shi = e[0].value
|
|
|
+ },
|
|
|
+ //区选择器
|
|
|
+ qu(e) {
|
|
|
+ console.log('打开了区选择器')
|
|
|
+ this.form.work1.area = e[0].label
|
|
|
+ this.id1.qu = e[0].value
|
|
|
+ this.hospitalconfirm(this.id1.sheng, this.id1.shi, this.id1.qu)
|
|
|
+ },
|
|
|
+ qu2(e) {
|
|
|
+ console.log('打开了区选择器2')
|
|
|
+ this.form.work2.area = e[0].label
|
|
|
+ this.id2.qu = e[0].value
|
|
|
+ this.hospitalconfirm(this.id2.sheng, this.id2.shi, this.id2.qu)
|
|
|
+
|
|
|
+ },
|
|
|
+ //医院选择器
|
|
|
+ yy(e) {
|
|
|
+ console.log('打开了医院选择器1')
|
|
|
+ this.form.work1.hospital = e[0].label
|
|
|
+ this.work[0].id = e[0].value
|
|
|
+ this.departmentconfirm()
|
|
|
+ },
|
|
|
+ yy2(e) {
|
|
|
+ console.log('打开了医院选择器2')
|
|
|
+ this.form.work2.hospital = e[0].label
|
|
|
+ this.work[1].id = e[0].value
|
|
|
+ this.departmentconfirm()
|
|
|
+ },
|
|
|
+ //科室
|
|
|
+ ks(e) {
|
|
|
+ console.log('打开了科室选择器1')
|
|
|
+ this.form.work1.department = e[0].label
|
|
|
+ this.work[0].depart = e[0].value
|
|
|
+ this.qualificationsconfirm()
|
|
|
+ },
|
|
|
+ ks2(e) {
|
|
|
+ console.log('打开了科室选择器2')
|
|
|
+ this.form.work2.department = e[0].label
|
|
|
+ this.work[1].depart = e[0].value
|
|
|
+ this.qualificationsconfirm()
|
|
|
+ },
|
|
|
+ //资质
|
|
|
+ zz(e) {
|
|
|
+ console.log('打开了资质选择器1')
|
|
|
+ this.form.work1.qualifications = e[0].label
|
|
|
+ this.work[0].qualifications = e[0].value
|
|
|
+ },
|
|
|
+ zz2(e) {
|
|
|
+ console.log('打开了资质选择器2')
|
|
|
+ this.form.work2.qualifications = e[0].label
|
|
|
+ this.work[1].qualifications = e[0].value
|
|
|
+ },
|
|
|
+ /*******************接口*********************/
|
|
|
//省
|
|
|
- provinceconfirm:async function() {
|
|
|
+ provinceconfirm: async function() {
|
|
|
// 点击请求接口
|
|
|
- let res = await this.$request.post('doctor/getCityList',{'type':1});
|
|
|
- console.log('省份',res)
|
|
|
- this.form.work[this.province].province = e[0].label
|
|
|
+ let res = await this.$request.post('doctor/getCityList', {
|
|
|
+ 'type': 1
|
|
|
+ });
|
|
|
+ console.log('省', res.data)
|
|
|
+ this.provincelist = this.provincelist2 = res.data
|
|
|
},
|
|
|
//市
|
|
|
- cityconfirm:async function(e) {
|
|
|
+ cityconfirm: async function(e) {
|
|
|
// parent_id为省份返回的id
|
|
|
- let res = await this.$request.post('doctor/getCityList',{'type':2,'parent_id':3});
|
|
|
- this.form.work[this.city].city = e[0].label
|
|
|
+ let res = await this.$request.post('doctor/getCityList', {
|
|
|
+ 'type': 2,
|
|
|
+ 'parent_id': e
|
|
|
+ });
|
|
|
+ console.log('市', res.data)
|
|
|
+ if (this.province == 1) {
|
|
|
+ this.citylist = res.data
|
|
|
+ } else if (this.province == 2) {
|
|
|
+ this.citylist2 = res.data
|
|
|
+ }
|
|
|
},
|
|
|
//区
|
|
|
- areaconfirm:async function(e) {
|
|
|
+ areaconfirm: async function(e) {
|
|
|
// parent_id为市返回的id
|
|
|
- let res = await this.$request.post('doctor/getCityList',{'type':3,'parent_id':67});
|
|
|
- this.form.work[this.area].area = e[0].label
|
|
|
+ let res = await this.$request.post('doctor/getCityList', {
|
|
|
+ 'type': 3,
|
|
|
+ 'parent_id': e
|
|
|
+ });
|
|
|
+ console.log('区', res.data)
|
|
|
+ if (this.city == 1) {
|
|
|
+ this.arealist = res.data
|
|
|
+ } else if (this.city == 2) {
|
|
|
+ this.arealist2 = res.data
|
|
|
+ }
|
|
|
},
|
|
|
//医院
|
|
|
- hospitalconfirm:async function(e) {
|
|
|
+ hospitalconfirm: async function(p, c, a) {
|
|
|
+ console.log(p, c, a)
|
|
|
//organizations_ids为省市区返回的id字符串,顺序为,省id,市id,区id
|
|
|
- let res = await this.$request.post('doctor/get_city_id',{'level_type':4,'organizations_ids':'3,67,553'});
|
|
|
- this.form.work[this.hospital].hospital = e[0].label
|
|
|
+ let res = await this.$request.post('doctor/get_city_id', {
|
|
|
+ 'level_type': 4,
|
|
|
+ "province": p,
|
|
|
+ "city": c,
|
|
|
+ "area": a,
|
|
|
+ });
|
|
|
+ console.log('提交的数据', p)
|
|
|
+ console.log('提交的数据', c)
|
|
|
+ console.log('提交的数据', a)
|
|
|
+ console.log('医院', res.data)
|
|
|
+ if (this.area == 1) {
|
|
|
+ this.hospitallist = res.data
|
|
|
+ } else if (this.area == 2) {
|
|
|
+ this.hospitallist2 = res.data
|
|
|
+ }
|
|
|
},
|
|
|
//科室
|
|
|
- departmentconfirm:async function(e) {
|
|
|
- let res = await this.$request.post('doctor/getOfferList',{'type':1});
|
|
|
-
|
|
|
- this.form.work[this.department].department = e[0].label
|
|
|
+ departmentconfirm: async function(e) {
|
|
|
+ let res = await this.$request.post('doctor/getOfferList', {
|
|
|
+ 'type': 1
|
|
|
+ });
|
|
|
+ if (this.hospital == 1) {
|
|
|
+ this.departmentlist = res.data
|
|
|
+ console.log('科室列表', this.departmentlist)
|
|
|
+ } else if (this.hospital == 2) {
|
|
|
+ this.departmentlist2 = res.data
|
|
|
+ }
|
|
|
},
|
|
|
//资质
|
|
|
- qualificationsconfirm:async function(e) {
|
|
|
- let res = await this.$request.post('doctor/getOfferList',{'type':2});
|
|
|
- this.form.work[this.qualifications].qualifications = e[0].label
|
|
|
+ qualificationsconfirm: async function(e) {
|
|
|
+ let res = await this.$request.post('doctor/getOfferList', {
|
|
|
+ 'type': 2
|
|
|
+ });
|
|
|
+ if (this.department == 1) {
|
|
|
+ this.qualificationslist = res.data
|
|
|
+ console.log('资质列表', this.qualificationslist)
|
|
|
+ } else if (this.department == 2) {
|
|
|
+ this.qualificationslist2 = res.data
|
|
|
+ }
|
|
|
},
|
|
|
// 保存
|
|
|
- bc:async function() {
|
|
|
+ bc: async function() {
|
|
|
// 提交需要参数
|
|
|
- let froms = {
|
|
|
- doctor_name: '', //姓名
|
|
|
- doctor_sex: 1, //性别,1男,2女
|
|
|
- doctor_card: '', //身份证
|
|
|
- work: [{ //工作机构
|
|
|
- id: '医院的id',
|
|
|
- depart: '科室id', //科室id
|
|
|
- qualifications: '资质id', //资质id
|
|
|
-
|
|
|
- }, {
|
|
|
- id: '医院的id',
|
|
|
- depart: '科室id', //科室id
|
|
|
- qualifications: '资质id', //资质id
|
|
|
- }],
|
|
|
- practice: [], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
|
|
|
- card_photo: [], //身份证 , 必须两个都传,不可以只上传一个
|
|
|
- is_quail: [] //医生资格, 必须两个都传,不可以只上传一个
|
|
|
+ let froms = {
|
|
|
+ doctor_name: '', //姓名
|
|
|
+ doctor_sex: 1, //性别,1男,2女
|
|
|
+ doctor_card: '', //身份证
|
|
|
+ work: [{ //工作机构
|
|
|
+ id: '医院的id',
|
|
|
+ depart: '科室id', //省
|
|
|
+ qualifications: '资质id', //市
|
|
|
+
|
|
|
+ }, {
|
|
|
+ id: '医院的id',
|
|
|
+ depart: '科室id', //省
|
|
|
+ qualifications: '资质id', //市
|
|
|
+ }],
|
|
|
+ practice: [], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
|
|
|
+ card_photo: [], //身份证 , 必须两个都传,不可以只上传一个
|
|
|
+ is_quail: [] //医生资格, 必须两个都传,不可以只上传一个
|
|
|
}
|
|
|
// 注意要 {'doctor_name':'ddd',doctor_sex:1....}分开传值因为我方便拦截垃圾数据
|
|
|
- let res = await this.$request.post('doctor/addthen',froms);
|
|
|
-
|
|
|
+ let res = await this.$request.post('doctor/addthen', froms);
|
|
|
uni.switchTab({
|
|
|
- url:'../index/index'
|
|
|
+ url: '../index/index'
|
|
|
})
|
|
|
},
|
|
|
- ChooseImage() {
|
|
|
- let that=this;
|
|
|
- uni.chooseImage({
|
|
|
- count: 1, //默认9
|
|
|
- sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
- sourceType: ['album', 'camera'], //从相册选择
|
|
|
- success: (res) => {
|
|
|
- let tempFilePaths = res.tempFilePaths;
|
|
|
- // 图片上传案例
|
|
|
- const uploadTask = wx.uploadFile({
|
|
|
- url: 'http://182.92.112.142/api/v2/Common/uploadFile',
|
|
|
- filePath: tempFilePaths[0],
|
|
|
- name: 'file',
|
|
|
- success: function (uploadFileRes) {
|
|
|
- let arr=[];
|
|
|
- arr.push(imglocal+JSON.parse(uploadFileRes.data).data.url);
|
|
|
- that.imgList = arr
|
|
|
- that.src = JSON.parse(uploadFileRes.data).data.url
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ ChooseImage() {
|
|
|
+ let that = this;
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1, //默认9
|
|
|
+ sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
+ sourceType: ['album', 'camera'], //从相册选择
|
|
|
+ success: (res) => {
|
|
|
+ let tempFilePaths = res.tempFilePaths;
|
|
|
+ // 图片上传案例
|
|
|
+ const uploadTask = wx.uploadFile({
|
|
|
+ url: 'http://182.92.112.142/api/v2/Common/uploadFile',
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ success: function(uploadFileRes) {
|
|
|
+ let arr = [];
|
|
|
+ arr.push(imglocal + JSON.parse(uploadFileRes.data).data.url);
|
|
|
+ that.imgList = arr
|
|
|
+ that.src = JSON.parse(uploadFileRes.data).data.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|