| xqd
@@ -119,11 +119,13 @@
|
|
|
<!-- 标题 -->
|
|
|
<text>{{item.title}}</text>
|
|
|
<!-- 删除按钮 -->
|
|
|
- <u-icon name="close" size="30" @click="closemechanism" style="margin-right:20rpx;" v-if="index != 0&&item.Submit==-1"></u-icon>
|
|
|
+ <u-icon name="close" size="30" @click="closemechanism" style="margin-right:20rpx;" v-if="index != 0&&item.Submit==4"></u-icon>
|
|
|
<!-- 状态 1审核中 2审核通过 3审核不通过 -->
|
|
|
<view v-else-if="item.Submit==0" style="color:#EA970E;font-size: 28rpx;">状态:审核中</view>
|
|
|
- <view v-else-if="item.Submit==1" style="color:#4CAD84;font-size: 28rpx;">状态:审核通过</view>
|
|
|
- <view v-else="item.Submit==2" style="color:#4CAD84;font-size: 28rpx;">状态:审核拒绝</view>
|
|
|
+ <view v-else-if="item.Submit==1" style="color:#00aa7f;font-size: 28rpx;">状态:已认证</view>
|
|
|
+ <view v-else-if="item.Submit==2" style="color:#ff0000;font-size: 28rpx;">状态:审核拒绝</view>
|
|
|
+ <view v-else-if="item.Submit==3" style="color:#55aaff;font-size: 28rpx;">状态:审核通过</view>
|
|
|
+ <view v-else="item.Submit==4"></view>
|
|
|
</view>
|
|
|
<!-- 地区 -->
|
|
|
<view style="padding: 25rpx 10rpx;" class="flex align-center justify-around" @click="regionClick(index)">
|
| xqd
@@ -251,6 +253,7 @@
|
|
|
let oqflist = res.data.oqf;
|
|
|
this.mechanismList.length = 0;
|
|
|
this.form.works.length = 0;
|
|
|
+ console.log('orglist', orglist)
|
|
|
for (let i = 0; i < orglist.length; i++) {
|
|
|
// 获取到修改中数据
|
|
|
this.form.works.push({
|
| xqd
@@ -267,6 +270,7 @@
|
|
|
hospitalText: orglist[i].name + '-' + oqflist[i].office.name + '-' + oqflist[i].qualification.name, //机构信息文字
|
|
|
preservation: true, //是否已经保存
|
|
|
Submit: orglist[i].state, // 0=审核中,1=审核通过,2=审核拒绝 信息状态 0未提交 1审核中 2审核通过 3审核不通过
|
|
|
+ hospitalID: orglist[i].organization.id,
|
|
|
})
|
|
|
console.log(this.mechanismList)
|
|
|
}
|
| xqd
@@ -297,6 +301,7 @@
|
|
|
//机构选择器打开
|
|
|
hospitalClick(index) {
|
|
|
console.log(index);
|
|
|
+
|
|
|
if (this.mechanismList[index].Submit == 0 || this.mechanismList[index].Submit == 1) {
|
|
|
uni.showToast({
|
|
|
title: '无法修改',
|
| xqd
@@ -304,31 +309,49 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- if (this.mechanismList.length - 1 == index) {
|
|
|
- if (this.mechanismList[index].regionText != '') {
|
|
|
- this.hospitalShow = true
|
|
|
- this.hosindex = index //保存点击的地方
|
|
|
+ if (this.hospitallist.length != 0) {
|
|
|
+ if (this.mechanismList.length - 1 == index) {
|
|
|
+ if (this.mechanismList[index].regionText != '') {
|
|
|
+ this.hospitalShow = true
|
|
|
+ this.hosindex = index //保存点击的地方
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请先填写地区数据',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
- title: '请先填写地区数据',
|
|
|
+ title: '无法修改',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
- title: '无法修改',
|
|
|
+ title: '此地区暂无医院',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
//省市区选择器确认
|
|
|
regionChoice(e) {
|
|
|
- this.mechanismList[this.hosindex].hospitalText = '';
|
|
|
+ console.log(e)
|
|
|
+ console.log('hosindex', this.hosindex)
|
|
|
+ console.log('regindex', this.regindex)
|
|
|
+ this.hospitallist.splice(0, this.hospitallist.length);
|
|
|
+ this.$forceUpdate()
|
|
|
+ // this.mechanismList[this.hosindex].hospitalText = '';
|
|
|
this.hospitalconfirm(e[0].value, e[1].value, e[2].value);
|
|
|
this.mechanismList[this.regindex].regionText = e[0].label + '-' + e[1].label + '-' + e[2].label //利用保存的地方赋值
|
|
|
},
|
|
|
//机构选择
|
|
|
hospitalChoice(e) {
|
|
|
+ // this.mechanismList.map(val => {
|
|
|
+ // if (val.hospitalText == e[0].label + '-' + e[1].label + '-' + e[2].label) {
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
if (typeof this.form.works[this.hosindex] == undefined || typeof this.form.works[this.hosindex] == 'undefined') {
|
|
|
this.form.works.push({
|
|
|
hospital: e[0].value, //医院id
|
| xqd
@@ -342,9 +365,8 @@
|
|
|
this.form.works[this.hosindex].qualifications = e[2].value;
|
|
|
this.form.works[this.hosindex].state = 0;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
this.mechanismList[this.hosindex].hospitalText = e[0].label + '-' + e[1].label + '-' + e[2].label
|
|
|
+ this.mechanismList[this.hosindex].hospitalID = e[0].value
|
|
|
},
|
|
|
//数字转文字
|
|
|
convertToChinese(num) {
|
| xqd
@@ -366,8 +388,10 @@
|
|
|
regionText: '', //地区信息文字
|
|
|
hospitalText: '', //机构信息文字
|
|
|
preservation: false, //是否已经保存
|
|
|
- Submit: -1, // 信息状态 0未提交 1审核中 2审核通过 3审核不通过
|
|
|
+ Submit: 4, // 信息状态
|
|
|
+ hospitalID:0//医院id
|
|
|
})
|
|
|
+ console.log(this.mechanismList)
|
|
|
},
|
|
|
//保存机构
|
|
|
bcmechanism() {
|
| xqd
@@ -439,6 +463,7 @@
|
|
|
//医院
|
|
|
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,
|
| xqd
@@ -448,32 +473,53 @@
|
|
|
});
|
|
|
if (res.status == 0) {
|
|
|
this.hospitallist = res.data
|
|
|
+ /**
|
|
|
+ * 新需求,已经选择过的医院不再出现
|
|
|
+ * 循环已经认证的机构,在里面找
|
|
|
+ * */
|
|
|
+ for(let i=0;i<this.mechanismList.length;i++){
|
|
|
+ console.log('hospitalID',this.mechanismList[i].hospitalID)
|
|
|
+ for(let j=0;j<this.hospitallist.length;j++){
|
|
|
+ if(this.mechanismList[i].hospitalID == this.hospitallist[j].value){
|
|
|
+ this.hospitallist.splice(j,1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // console.log('第'+i+'个数据',this.mechanismList[i].hospitalText)
|
|
|
+ // let a = this.mechanismList[i].hospitalText.indexOf('-')
|
|
|
+ // console.log('a',a)
|
|
|
+ // if(a>0){
|
|
|
+
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ console.log('hospitallist', this.hospitallist)
|
|
|
+ console.log('mechanismList',this.mechanismList)
|
|
|
}
|
|
|
},
|
|
|
- //科室
|
|
|
- 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
|
|
|
- });
|
|
|
- if (this.department == 1) {
|
|
|
- this.qualificationslist = res.data
|
|
|
- console.log('资质列表', this.qualificationslist)
|
|
|
- } else if (this.department == 2) {
|
|
|
- this.qualificationslist2 = res.data
|
|
|
- }
|
|
|
- },
|
|
|
+ // //科室
|
|
|
+ // 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
|
|
|
+ // });
|
|
|
+ // if (this.department == 1) {
|
|
|
+ // this.qualificationslist = res.data
|
|
|
+ // console.log('资质列表', this.qualificationslist)
|
|
|
+ // } else if (this.department == 2) {
|
|
|
+ // this.qualificationslist2 = res.data
|
|
|
+ // }
|
|
|
+ // },
|
|
|
// 保存
|
|
|
bc: async function() {
|
|
|
|
| xqd
@@ -550,6 +596,11 @@
|
|
|
uni.switchTab({
|
|
|
url: '../index/index'
|
|
|
})
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:res.message
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
},
|