优化
This commit is contained in:
@@ -46,24 +46,7 @@ Component({
|
||||
select_keshi_index: "",
|
||||
custom_keshi: "",
|
||||
zhicheng_note: "请选择职称",
|
||||
zhicheng_columns: [
|
||||
{
|
||||
text: "执业医师",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: "主治医师",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
text: "副主任医师",
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
text: "主任医师",
|
||||
value: 4
|
||||
}
|
||||
],
|
||||
zhicheng_columns: [],
|
||||
select_zhicheng_id: "",
|
||||
select_zhicheng_index: "",
|
||||
select_yiyuan_index: "",
|
||||
@@ -86,6 +69,7 @@ Component({
|
||||
doctorauthiden_data_ready: false,
|
||||
basicdepartment_data_ready: false,
|
||||
areaprovince_data_ready: false,
|
||||
basicdoctortitle_data_ready: false,
|
||||
iden_auth_status: 0,
|
||||
iden_auth_disabled: 0,
|
||||
iden_auth_status_txt: "未认证",
|
||||
@@ -140,7 +124,7 @@ Component({
|
||||
});
|
||||
let iden_auth_status = response.data.iden_auth_status;
|
||||
console.log("iden_auth_status: ",iden_auth_status)
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败':'未认证';
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败,修改后重新提交':'未认证';
|
||||
|
||||
let iden_auth_disabled = iden_auth_status == 0?false:iden_auth_status == 1?true: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
console.log("iden_auth_disabled: ",iden_auth_disabled)
|
||||
@@ -210,6 +194,16 @@ Component({
|
||||
})
|
||||
}).catch(errors => {console.error(errors); })
|
||||
|
||||
//加载职称列表
|
||||
api.getBasicDoctorTitle().then(response => {
|
||||
console.log(response);
|
||||
const list = _this.formatZhiCheng(response);
|
||||
_this.setData({
|
||||
basicdoctortitle_data_ready: true,
|
||||
zhicheng_columns: list
|
||||
})
|
||||
}).catch(errors => {console.error(errors); })
|
||||
|
||||
//加载专长列表
|
||||
api.getDoctorExpertise().then(response => {
|
||||
console.log(response);
|
||||
@@ -254,15 +248,18 @@ Component({
|
||||
}
|
||||
keshi_huixian = true;
|
||||
}
|
||||
|
||||
//回显职称
|
||||
if(_this.data.doctorauthiden_data_ready){
|
||||
if(_this.data.doctorauthiden_data_ready && _this.data.basicdoctortitle_data_ready){
|
||||
let index = _this.data.zhicheng_columns.findIndex(item => {
|
||||
return item.value == _this.data.select_zhicheng_id
|
||||
})
|
||||
_this.setData({
|
||||
select_zhicheng_index: index,
|
||||
zhicheng_note: _this.data.zhicheng_columns[index].text
|
||||
})
|
||||
if(index > -1){
|
||||
_this.setData({
|
||||
select_zhicheng_index: index,
|
||||
zhicheng_note: _this.data.zhicheng_columns[index].text
|
||||
})
|
||||
}
|
||||
zhicheng_huixian = true;
|
||||
}
|
||||
|
||||
@@ -485,6 +482,16 @@ Component({
|
||||
});
|
||||
return list;
|
||||
},
|
||||
formatZhiCheng(response){
|
||||
let list = [];
|
||||
response.data.forEach(item => {
|
||||
let data = {};
|
||||
data.text = item.doctor_title_name;
|
||||
data.value = item.doctor_title_id;
|
||||
list.push(data)
|
||||
});
|
||||
return list;
|
||||
},
|
||||
formatZhuanChang(response){
|
||||
let list = [];
|
||||
response.data.forEach(item => {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="right">
|
||||
<view class="note">真人正脸</view>
|
||||
<t-avatar image="{{ avatar }}" />
|
||||
<view class="icon">
|
||||
<view class="icon" wx:if="{{ !(indentity && iden_auth_disabled) }}">
|
||||
<t-icon name="chevron-right" size="48rpx" data-name="chevron-right" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -20,7 +20,7 @@
|
||||
</view>
|
||||
|
||||
<!-- <t-cell title="头像" hover required arrow note="真人正脸" /> -->
|
||||
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onCityShow'}}"/>
|
||||
<t-cell title="城市" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{ city_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onCityShow'}}"/>
|
||||
|
||||
<t-cascader
|
||||
visible="{{ city_show }}"
|
||||
@@ -33,7 +33,7 @@
|
||||
bind:close="onCloseCity"
|
||||
></t-cascader>
|
||||
|
||||
<t-cell title="医院" hover required arrow note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
|
||||
<t-cell title="医院" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
|
||||
<van-popup
|
||||
show="{{ yiyuan_show }}"
|
||||
position="bottom"
|
||||
@@ -63,7 +63,7 @@
|
||||
<van-empty description="暂无医院" wx:if="{{yiyuan_columns.length == 0}}"/>
|
||||
|
||||
</van-popup>
|
||||
<t-cell title="科室" hover required arrow note="{{keshi_note}}"
|
||||
<t-cell title="科室" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{keshi_note}}"
|
||||
bindtap="{{(indentity && iden_auth_disabled)?'':'onKeshiShow'}}" bordered="{{ select_keshi_id == '' }}"/>
|
||||
|
||||
<view class="custom_keshi" wx:if="{{ select_keshi_id != ''}}">
|
||||
@@ -219,7 +219,7 @@
|
||||
</view>
|
||||
</t-popup>
|
||||
|
||||
<t-cell title="职称" hover required arrow note="{{zhicheng_note}}"
|
||||
<t-cell title="职称" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{zhicheng_note}}"
|
||||
bindtap="{{(indentity && iden_auth_disabled)?'':'onZhiChengShow'}}" />
|
||||
<!-- <t-input
|
||||
label="科室电话"
|
||||
@@ -262,7 +262,7 @@
|
||||
|
||||
<view class="right">
|
||||
<view class="note">{{zhuanchang_note}}</view>
|
||||
<view class="icon">
|
||||
<view class="icon" wx:if="{{ !(indentity && iden_auth_disabled) }}">
|
||||
<t-icon name="chevron-right" size="48rpx" data-name="chevron-right" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -272,16 +272,19 @@
|
||||
textarea_cell_name="个人简介"
|
||||
t_icon_name="view-module"
|
||||
bind:showNote="onshowJianJieNote"
|
||||
textarea_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
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" />
|
||||
data-textarea_name="textarea_jianjie"
|
||||
bindTextAreaBlur="getTextAreaVal" />
|
||||
|
||||
<m-textarea-cell
|
||||
textarea_cell_name="擅长领域"
|
||||
t_icon_name="view-module"
|
||||
bind:showNote="onshowShanChangNote"
|
||||
textarea_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
textarea_val="{{textarea_shanchang}}"
|
||||
has_error_content="{{ be_good_at_reason }}"
|
||||
@@ -297,6 +300,8 @@
|
||||
data-field_name="zhiye_file_list"
|
||||
data-file_multiple="true"
|
||||
bind:showNote="onshowZhiYeNote"
|
||||
upload_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
deletable="{{!(indentity && iden_auth_disabled)}}"
|
||||
bindUploadFile="doUploadFile"
|
||||
bindDeleteFile="doDeleteFile"
|
||||
upload_cell_desc="请提供清晰的执业证书原件照片,照片需包含证书编号、加盖钢印的证书照片及姓名、执业范围、执业医院等信息,最少上传2张。"
|
||||
@@ -320,6 +325,8 @@
|
||||
bind:showNote="onshowZiGeNote"
|
||||
upload_cell_desc="请提供清晰的资格证书原件照片,照片需包含证书编号、加盖钢印的证书照片、姓名等信息,最少上传1张。"
|
||||
upload_cell_note="查看示例"
|
||||
upload_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
deletable="{{!(indentity && iden_auth_disabled)}}"
|
||||
has_error_content="{{ qualification_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
@@ -339,6 +346,8 @@
|
||||
bindDeleteFile="doDeleteFile"
|
||||
upload_cell_desc="请提供清晰的职称证书原件照片,照片需包含编号、加盖钢印的证书照片、姓名及职称等信息,最少上传1张。"
|
||||
upload_cell_note="查看示例"
|
||||
upload_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
deletable="{{!(indentity && iden_auth_disabled)}}"
|
||||
has_error_content="{{ work_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
|
||||
@@ -228,4 +228,39 @@
|
||||
}
|
||||
.jianjie_popup{
|
||||
margin: 100rpx 20rpx;
|
||||
}
|
||||
.has_error{
|
||||
margin-left: 32rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #e7e7e7;
|
||||
}
|
||||
.error_box{
|
||||
position: relative;
|
||||
display: flex;
|
||||
background-color: #FEF1F1;
|
||||
width: calc(95vw - 64rpx);
|
||||
height: 100rpx;
|
||||
margin: 30rpx auto 0 auto;
|
||||
align-items: center;
|
||||
padding-left: 32rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.error_box::after{
|
||||
border-radius: 5rpx;
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
border-width: 16rpx;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent #FEF1F1 transparent;
|
||||
content: ' ';
|
||||
left: 50rpx;
|
||||
top: -30rpx;
|
||||
}
|
||||
.error_msg{
|
||||
position: relative;
|
||||
margin-left: 10rpx;
|
||||
color: #FF0000;
|
||||
letter-spacing: 3rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -20,6 +20,10 @@ Component({
|
||||
type: String,
|
||||
value: '查看示例',
|
||||
},
|
||||
textarea_cell_note_show:{
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
textarea_cell_content_placeholder: {
|
||||
type: String,
|
||||
value: '请输入文字',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<view class="textarea-cell">
|
||||
<view class="textarea-cell-top">
|
||||
<view class="textarea-cell-name">{{ textarea_cell_name }}<text wx:if="{{ required }}" class="required"> *</text></view>
|
||||
<view class="textarea-cell-note t-cell__note" bindtap="onshowNote">
|
||||
<view class="textarea-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{textarea_cell_note_show}}">
|
||||
<view><t-icon name="{{ t_icon_name }}" size="{{ t_icon_size}}" data-name="{{ t_icon_name }}" /></view>
|
||||
<text style="font-size: 28rpx;">{{ textarea_cell_note }}</text>
|
||||
</view>
|
||||
|
||||
@@ -20,6 +20,14 @@ Component({
|
||||
type: String,
|
||||
value: '示例备注',
|
||||
},
|
||||
upload_cell_note_show:{
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
deletable:{
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
upload_cell_desc: {
|
||||
type: String,
|
||||
value: '示例描述',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<view class="upload-cell">
|
||||
<view class="upload-cell-top">
|
||||
<view class="upload-cell-name">{{ upload_cell_name }}<text wx:if="{{ required }}" class="required"> *</text></view>
|
||||
<view class="upload-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{upload_cell_note != ''}}">
|
||||
<view class="upload-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{upload_cell_note_show}}">
|
||||
<view><t-icon name="{{ t_icon_name }}" size="{{ t_icon_size}}" data-name="{{ t_icon_name }}" /></view>
|
||||
<text style="font-size: 28rpx;">{{ upload_cell_note }}</text>
|
||||
</view>
|
||||
@@ -10,12 +10,12 @@
|
||||
<text>{{ upload_cell_desc }}</text>
|
||||
</view>
|
||||
<view class="upload-cell-input">
|
||||
<van-uploader disabled="{{disabled}}" multiple="{{is_multiple}}" preview-full-image="{{false}}" file-list="{{ fileList }}" max-count="{{max_count}}" deletable="{{ true }}" bind:after-read="afterRead" bind:delete="delete" >
|
||||
<van-uploader disabled="{{disabled}}" multiple="{{is_multiple}}" preview-full-image="{{true}}" file-list="{{ fileList }}" max-count="{{max_count}}" deletable="{{ deletable }}" bind:after-read="afterRead" bind:delete="delete" >
|
||||
<van-image width="100" height="100" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/upload_button.png" />
|
||||
</van-uploader>
|
||||
</view>
|
||||
<view class="error_box" wx:if="{{ has_error_content != '' }}" >
|
||||
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
|
||||
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
|
||||
<text class="error_msg">{{ has_error_content }}</text>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user