This commit is contained in:
haomingming
2023-03-23 15:52:15 +08:00
parent cfa69efd15
commit 12e4984a95
53 changed files with 661 additions and 193 deletions
+43 -9
View File
@@ -20,7 +20,7 @@ Component({
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '医师身份认证', //导航栏 中间的标题
},
height: app.globalData.height,
height: app.globalData.height,
//选项卡
stickyProps: {
zIndex: 2,
@@ -96,7 +96,8 @@ Component({
license_cert_reason: "",
qualification_cert_reason: "",
work_cert_reason: "",
department_custom_name_reason: ''
department_custom_name_reason: '',
zhuanchang_note: '请选择专长',
},
options: {
@@ -108,15 +109,11 @@ Component({
console.log("myprofile attached")
let _this = this;
console.log(_this.data.zhicheng_columns);
console.log(_this.data.zhicheng_columns);
//获得医师身份认证
api.getDoctorAuthIden({source: this.data.indentity?1:2}).then(response => {
console.log("getDoctorAuthIden: ",response);
this.setData({
doctorauthiden_data_ready: true,
textarea_jianjie: response.data.brief_introduction,
textarea_shanchang: response.data.be_good_at,
@@ -217,6 +214,15 @@ Component({
_this.setData({
zhuanchang_columns: response.data
})
}).then(()=>{
let index = this.data.zhuanchang_columns.findIndex(item => {
return item.is_selected == 1
})
if(index) {
this.setData({
zhuanchang_note: ""
})
}
}).catch(errors => {console.error(errors); })
let keshi_huixian = false;
@@ -235,10 +241,13 @@ Component({
console.log("select_keshi_id: ", _this.data.select_keshi_id);
return item.value == _this.data.select_keshi_id
})
if(index){
console.log("科室:", index)
let keshi_note = _this.data.keshi_columns[index].text;
console.log("科室 keshi_note:", keshi_note);
if(index != undefined){
_this.setData({
select_keshi_index: index,
keshi_note: _this.data.keshi_columns[index].text
keshi_note: keshi_note
})
}
keshi_huixian = true;
@@ -479,7 +488,7 @@ Component({
this.setData({ yiyuan_show: true });
}else{
wx.showToast({
title: '请先选择省市',
title: '请先选择城市',
icon: "error"
})
}
@@ -650,6 +659,7 @@ Component({
}
})
console.log("countcountcountcount: ",count)
if(count >= 10 && e.currentTarget.dataset.is_selected==0){
wx.showToast({
title: '最多10个专长',
@@ -661,6 +671,27 @@ Component({
let data = "zhuanchang_columns["+index+"].is_selected";
this.setData({[data]: is_selected==1?0:1})
}
this.checkZhuanchangNote()
},
checkZhuanchangNote(){
let count = 0
this.data.zhuanchang_columns.forEach(item => {
if(item.is_selected == 1){
count = count + 1;
}
})
if(count > 0){
this.setData({
zhuanchang_note: ""
})
}
if(count == 0){
this.setData({
zhuanchang_note: "请选择专长"
})
}
},
zhuanchangConfirm(e){
this.setData({ zhuanchang_show: false });
@@ -881,5 +912,8 @@ Component({
[file_name]: img_list
})
},
moveZhuanChang(){
}
}
})
+24 -10
View File
@@ -1,6 +1,6 @@
<view class="photo" style="border-bottom: {{avatar_reason==''?'1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));':'unset'}}">
<view class="title">头像 <text class="required"> *</text></view>
<van-uploader bind:after-read="doUploadPhoto" data-scene="1" data-field_name="avatar" data-file_multiple="false">
<van-uploader disabled="{{ indentity && iden_auth_disabled }}" bind:after-read="doUploadPhoto" data-scene="1" data-field_name="avatar" data-file_multiple="false">
<view class="right">
<view class="note">真人正脸</view>
<t-avatar image="{{ avatar }}" />
@@ -19,7 +19,7 @@
</view>
<!-- <t-cell title="头像" hover required arrow note="真人正脸" /> -->
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="onCityShow"/>
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onCityShow'}}"/>
<t-cascader
visible="{{ city_show }}"
@@ -31,7 +31,7 @@
bind:change="onChangeCity"
></t-cascader>
<t-cell title="医院" hover required arrow note="{{ yiyuan_note }}" bindtap="onYiYuanShow"/>
<t-cell title="医院" hover required arrow note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
<van-popup
show="{{ yiyuan_show }}"
position="bottom"
@@ -57,10 +57,14 @@
bind:search="hospitalSearch"
/>
</van-popup>
<t-cell title="科室" hover required arrow note="{{keshi_note}}" bindtap="onKeshiShow" bordered="{{ select_keshi_id == '' }}"/>
<t-cell title="科室" hover required arrow note="{{keshi_note}}"
bindtap="{{(indentity && iden_auth_disabled)?'':'onKeshiShow'}}" bordered="{{ select_keshi_id == '' }}"/>
<view class="custom_keshi" wx:if="{{ select_keshi_id != ''}}">
<van-field bind:change="onCustomKeshiChange" model:value="{{custom_keshi}}" label="" placeholder="请输入科室" border="{{department_custom_name_reason == ''}}" />
<van-field bind:change="onCustomKeshiChange"
disabled="{{(indentity && iden_auth_disabled)}}"
type="text" model:value="{{custom_keshi}}" label=""
placeholder="请输入科室" border="{{department_custom_name_reason == ''}}" />
</view>
<view class="has_error" wx:if="{{ department_custom_name_reason != '' }}" >
@@ -142,8 +146,10 @@
</view>
</van-popup>
<t-popup visible="{{zhuanchang_show}}" bind:visible-change="onZhuanChangVisibleChange" placement="bottom">
<view class="zhuanchang_block">
<t-popup visible="{{zhuanchang_show}}"
prevent-scroll-through
bind:visible-change="onZhuanChangVisibleChange" placement="bottom">
<view class="zhuanchang_block" catchtouchmove="moveZhuanChang">
<view class="zhuanchang_header">
<view class="zhuanchang_btn zhuanchang_btn--cancel" aria-role="button" bindtap="zhuanchangConcle">取消</view>
<view class="zhuanchang_title">选择专长</view>
@@ -169,7 +175,8 @@
</view>
</t-popup>
<t-cell title="职称" hover required arrow note="{{zhicheng_note}}" bindtap="onZhiChengShow" />
<t-cell title="职称" hover required arrow note="{{zhicheng_note}}"
bindtap="{{(indentity && iden_auth_disabled)?'':'onZhiChengShow'}}" />
<!-- <t-input
label="科室电话"
placeholder="请输入科室电话"
@@ -185,7 +192,9 @@
placeholder="请输入科室电话"
placeholder-style="font-size:25rpx;letter-spacing: 2rpx;color:rgba(0, 0, 0, 0.4);"
input-align="right"
type="number"
clearable
disabled="{{(indentity && iden_auth_disabled)}}"
border="{{ department_custom_mobile_reason == '' }}"
custom-style="font-size:30rpx;"
>
@@ -199,7 +208,7 @@
</view>
</view>
<view class="zhuanchang" bindtap="onZhuanChangShow">
<view class="zhuanchang" bindtap="{{(indentity && iden_auth_disabled)?'':'onZhuanChangShow'}}">
<view class="title">专长 <text class="required"> *</text></view>
<view class="content">
<view class="content_item" wx:key="expertise_name" wx:if="{{data.is_selected == 1}}" wx:for="{{ zhuanchang_columns }}" wx:for-item="data">
@@ -208,7 +217,7 @@
</view>
<view class="right">
<view class="note">请选择专长</view>
<view class="note">{{zhuanchang_note}}</view>
<view class="icon">
<t-icon name="chevron-right" size="48rpx" data-name="chevron-right" />
</view>
@@ -221,6 +230,7 @@
bind:showNote="onshowJianJieNote"
textarea_cell_content_placeholder="您的从业经历,职称,所获荣誉等信息(10~1000字)"
textarea_val="{{textarea_jianjie}}"
disabled="{{(indentity && iden_auth_disabled)}}"
has_error_content="{{ brief_introduction_reason }}"
data-textarea_name="textarea_jianjie" bindTextAreaBlur="getTextAreaVal" />
@@ -228,6 +238,7 @@
textarea_cell_name="擅长领域"
t_icon_name="view-module"
bind:showNote="onshowShanChangNote"
disabled="{{(indentity && iden_auth_disabled)}}"
textarea_val="{{textarea_shanchang}}"
has_error_content="{{ be_good_at_reason }}"
textarea_cell_content_placeholder="您的专业领域、擅长疾病、研究方法等信息(10~1000字)"
@@ -248,6 +259,7 @@
upload_cell_note="查看示例"
has_error_content="{{ license_cert_reason }}"
wx:if="{{indentity}}"
disabled="{{(indentity && iden_auth_disabled)}}"
is_multiple="true"
/>
@@ -266,6 +278,7 @@
upload_cell_note="查看示例"
has_error_content="{{ qualification_cert_reason }}"
wx:if="{{indentity}}"
disabled="{{(indentity && iden_auth_disabled)}}"
is_multiple="true"
/>
@@ -284,6 +297,7 @@
upload_cell_note="查看示例"
has_error_content="{{ work_cert_reason }}"
wx:if="{{indentity}}"
disabled="{{(indentity && iden_auth_disabled)}}"
is_multiple="true"
/>
+1 -1
View File
@@ -219,4 +219,4 @@
}
.custom_keshi_error{
display: none;
}
}