|
@@ -6,6 +6,8 @@
|
|
<span class="d-inline-block fs-18 text-white font-bold">个人档案</span>
|
|
<span class="d-inline-block fs-18 text-white font-bold">个人档案</span>
|
|
<span v-if="ipArr.find((item)=>item.ip==prodIp)&&ipArr.find((item)=>item.ip==prodIp).name!=='兰溪'"
|
|
<span v-if="ipArr.find((item)=>item.ip==prodIp)&&ipArr.find((item)=>item.ip==prodIp).name!=='兰溪'"
|
|
class="d-inline-block py-1 d-inline-block ml-auto text-white1" @click="closet">[ 退出 ]</span>
|
|
class="d-inline-block py-1 d-inline-block ml-auto text-white1" @click="closet">[ 退出 ]</span>
|
|
|
|
+ <span v-if="ipArr.find((item)=>item.ip==prodIp)&&ipArr.find((item)=>item.ip==prodIp).name=='兰溪'"
|
|
|
|
+ class="d-inline-block py-1 d-inline-block ml-auto text-white1" @click="operation">[ 切换 ]</span>
|
|
</view>
|
|
</view>
|
|
<view class="centerY mt-2" @click="$mf.clickNavto('/pages/userinfo/userinfo')">
|
|
<view class="centerY mt-2" @click="$mf.clickNavto('/pages/userinfo/userinfo')">
|
|
<view class="w-15 userhead">
|
|
<view class="w-15 userhead">
|
|
@@ -114,32 +116,30 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="">
|
|
<view class="">
|
|
- <uni-popup ref="popup1" type="center" :mask-click="false">
|
|
|
|
|
|
+ <uni-popup ref="popup1" type="center" :mask-click="false" class="w-100">
|
|
<view class="bg-white p-3 w-100" style="border-radius: 16rpx;">
|
|
<view class="bg-white p-3 w-100" style="border-radius: 16rpx;">
|
|
<view class="text-center mb-3 fs-14 font-bold py-2">
|
|
<view class="text-center mb-3 fs-14 font-bold py-2">
|
|
查询
|
|
查询
|
|
</view>
|
|
</view>
|
|
<view class=" centerY mb-3"
|
|
<view class=" centerY mb-3"
|
|
style="border-radius: 14rpx;border: 1px solid #007aff;overflow: hidden;">
|
|
style="border-radius: 14rpx;border: 1px solid #007aff;overflow: hidden;">
|
|
- <input type="text" v-model="valueId" class="px-2 fs-12" placeholder="请输入身份证号码"
|
|
|
|
|
|
+ <input type="text" v-model="valueId" class="px-2 fs-12 w-70" placeholder="请输入身份证号码"
|
|
placeholder-class="fs-12">
|
|
placeholder-class="fs-12">
|
|
- <button type="primary" class="d-inline-block fs-12 px-3 ml-auto mr-0" style="padding: 4rpx ;"
|
|
|
|
|
|
+ <button type="primary" class="d-inline-block fs-12 px-2 ml-auto w-30" style="padding: 4rpx ;"
|
|
@click="search">搜索</button>
|
|
@click="search">搜索</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
-
|
|
|
|
- <uni-popup ref="popup2" type="center" :mask-click="false">
|
|
|
|
- <view class="bg-white p-3 w-100" style="border-radius: 16rpx;">
|
|
|
|
|
|
+
|
|
|
|
+ <uni-popup ref="popup2" type="center" :mask-click="false" class="w-100">
|
|
|
|
+ <view class="bg-white p-3 w-80 text-center" style="border-radius: 16rpx;min-width: 400rpx;">
|
|
<view class="text-center mb-3 fs-14 font-bold py-2">
|
|
<view class="text-center mb-3 fs-14 font-bold py-2">
|
|
- 查询
|
|
|
|
|
|
+ 患者列表
|
|
</view>
|
|
</view>
|
|
- <view class=" centerY mb-3"
|
|
|
|
- style="border-radius: 14rpx;border: 1px solid #007aff;overflow: hidden;">
|
|
|
|
- <input type="text" v-model="valueId" class="px-2 fs-12" placeholder="请输入身份证号码"
|
|
|
|
- placeholder-class="fs-12">
|
|
|
|
- <button type="primary" class="d-inline-block fs-12 px-3 ml-auto mr-0" style="padding: 4rpx ;"
|
|
|
|
- @click="search">搜索</button>
|
|
|
|
|
|
+ <view class="text-left centerY mb-3" style="border-radius: 14rpx;border: 1px solid #007aff;">
|
|
|
|
+ <uni-data-select v-model="userIndex" :localdata="userArr" @change="bindPickerChange"
|
|
|
|
+ placeholder="请选择身份">
|
|
|
|
+ </uni-data-select>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
@@ -173,15 +173,29 @@
|
|
physical: {},
|
|
physical: {},
|
|
valueId: '',
|
|
valueId: '',
|
|
prodIp: '',
|
|
prodIp: '',
|
|
- ipArr
|
|
|
|
|
|
+ ipArr,
|
|
|
|
+ userArr: [],
|
|
|
|
+ userIndex: null,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
- // console.log(this.$mf)
|
|
|
|
- // console.log(this.$httpApi)
|
|
|
|
this.decrypt()
|
|
this.decrypt()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //切换
|
|
|
|
+ operation() {
|
|
|
|
+ uni.clearStorage('idCard')
|
|
|
|
+ uni.clearStorage('userData')
|
|
|
|
+ this.valueId = '';
|
|
|
|
+ this.userData = {};
|
|
|
|
+ this.physical = {};
|
|
|
|
+ this.$refs.popup2.open()
|
|
|
|
+ },
|
|
|
|
+ bindPickerChange(e) {
|
|
|
|
+ if (this.userArr[e] && this.userArr[e].text) {
|
|
|
|
+ this.getuserinfo(this.userArr[e].text)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
decrypt() {
|
|
decrypt() {
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
@@ -201,14 +215,36 @@
|
|
}
|
|
}
|
|
if (item.ip == globalData.configData.prodIp) {
|
|
if (item.ip == globalData.configData.prodIp) {
|
|
//兰溪
|
|
//兰溪
|
|
- if (item.name == '兰溪') {
|
|
|
|
|
|
+ if (item.name == '开发') {
|
|
if (!res.data.length > 10) return
|
|
if (!res.data.length > 10) return
|
|
console.log(res)
|
|
console.log(res)
|
|
let res2 = await t.$api.decrypt({
|
|
let res2 = await t.$api.decrypt({
|
|
toKen: res.data
|
|
toKen: res.data
|
|
});
|
|
});
|
|
- uni.setStorageSync('idCard', res2.idCard)
|
|
|
|
- t.getuserinfo(res2.idCard)
|
|
|
|
|
|
+ if (res2.code !== -1) {
|
|
|
|
+ if (res2.data.users && res2.data.users.length >
|
|
|
|
+ 0) {
|
|
|
|
+ t.$refs.popup2.open()
|
|
|
|
+ t.userArr = []
|
|
|
|
+ res2.data.users.map((item, index) => {
|
|
|
|
+ t.userArr.push({
|
|
|
|
+ value: index,
|
|
|
|
+ text: item.idcard
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ console.log(t.userArr)
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ console.log(1)
|
|
|
|
+ if (!uni.getStorageSync('idCard')) {
|
|
|
|
+ t.$refs.popup1.open()
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ } else {
|
|
|
|
+ t.getuserinfo(uni.getStorageSync('idCard'))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, 300)
|
|
}, 300)
|
|
@@ -220,7 +256,8 @@
|
|
t.prodIp = globalData.configData.prodIp
|
|
t.prodIp = globalData.configData.prodIp
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
}
|
|
}
|
|
- let i = ipArr.find((item) => item.ip == globalData.configData.prodIp).name=='兰溪'
|
|
|
|
|
|
+ let i = ipArr.find((item) => item.ip == globalData.configData.prodIp)
|
|
|
|
+ .name == '兰溪'
|
|
if (!i) {
|
|
if (!i) {
|
|
if (!uni.getStorageSync('idCard')) {
|
|
if (!uni.getStorageSync('idCard')) {
|
|
t.$refs.popup1.open()
|
|
t.$refs.popup1.open()
|
|
@@ -240,7 +277,8 @@
|
|
t.prodIp = globalData.configData.prodIp
|
|
t.prodIp = globalData.configData.prodIp
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
}
|
|
}
|
|
- let i = ipArr.find((item) => item.ip == globalData.configData.prodIp).name=='兰溪'
|
|
|
|
|
|
+ let i = ipArr.find((item) => item.ip == globalData.configData.prodIp)
|
|
|
|
+ .name == '兰溪'
|
|
if (!i) {
|
|
if (!i) {
|
|
if (!uni.getStorageSync('idCard')) {
|
|
if (!uni.getStorageSync('idCard')) {
|
|
t.$refs.popup1.open()
|
|
t.$refs.popup1.open()
|
|
@@ -303,14 +341,13 @@
|
|
if (data && data.id) {
|
|
if (data && data.id) {
|
|
this.$refs.popup1.close();
|
|
this.$refs.popup1.close();
|
|
this.find_physical()
|
|
this.find_physical()
|
|
-
|
|
|
|
|
|
+ this.$refs.popup2.close();
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '未查询到患者',
|
|
title: '未查询到患者',
|
|
icon: 'error'
|
|
icon: 'error'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
} else {
|
|
} else {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|