医废工具端小程序源码
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan"><block slot="content">科室列表</block></cu-custom>
|
||||
<view class="cu-bar bg-white solid-bottom">
|
||||
<view class="action">
|
||||
<text class="cuIcon-title text-green" style="color:#2CC9EA;"></text>
|
||||
<text style="color:#B4B4C3;">科室列表</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-list menu-avatar" style="margin-top:5px;">
|
||||
<view class="cu-item" v-for="(value,index) in toolDepartmentList" :key="index">
|
||||
<view class="cu-avatar round lg" style="background-image:url(https://lekapi.opmonitor.com/static/image/avatar.png);"></view>
|
||||
<view class="content">
|
||||
<view class="text-grey text-sm flex" style="">
|
||||
<text style="width:100px;">{{value.departmentCode}}</text>
|
||||
<text style='margin-left:5%;width:150px;font-family:Montserrat-Regular;font-weight:bold;color:red'>{{value.type}}</text>
|
||||
</view>
|
||||
<view class="text-grey text-sm flex">
|
||||
<text class="cuIcon-locationfill text-red margin-right-xs"></text>
|
||||
<text style="width:90px;">{{value.department}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="text-grey text-xs">{{value.time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hospital: '',
|
||||
sortHospital: '',
|
||||
toolDepartmentList: []
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
if(getApp().globalData.openid == '' || getApp().globalData.openid == 'undefined'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/plugin/register'
|
||||
})
|
||||
}
|
||||
// 获取全局变量中的数据
|
||||
this.hospital = getApp().globalData.hospital
|
||||
this.sortHospital = getApp().globalData.sortHospital
|
||||
this.getToolDepartmentList();
|
||||
},
|
||||
methods: {
|
||||
getToolDepartmentList(){
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: "https://lekapi.opmonitor.com/?c=app_api&a=getToolDepartmentList",
|
||||
data: {hospital: that.hospital, sortHospital: that.sortHospital},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
that.toolDepartmentList = res.data.data
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名的正确性')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.bg-gradual-pink{
|
||||
vertical-align: middle;
|
||||
font-size:18px;
|
||||
background:linear-gradient(135deg,rgba(45,201,235,1) 0%,rgba(20,210,184,1) 100%);
|
||||
}
|
||||
|
||||
.cu{
|
||||
height:89px;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 500Vh;
|
||||
}
|
||||
|
||||
.page.show {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cuIcon-locationfill{
|
||||
color:#2CC9EA;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan" :isBack="true"><block slot="backText">返回</block><block slot="content">科室填报</block></cu-custom>
|
||||
<view class="photoView">
|
||||
<view class="photoImage">
|
||||
<open-data type="userAvatarUrl"></open-data>
|
||||
</view>
|
||||
</view>
|
||||
<form action="">
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">医院名称</view>
|
||||
<input name="hospital" v-model="hospital"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">分院名称</view>
|
||||
<input name="sortHospital" v-model="sortHospital"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">科室编码</view>
|
||||
<input name="departmentCode" :value="departmentCode" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">科室名称</view>
|
||||
<input placeholder="请输入科室名称" v-model="department" @input="getDepartment"></input>
|
||||
</view>
|
||||
</form>
|
||||
<view class="padding flex flex-direction" style="padding-top: 40%;">
|
||||
<button class="cu-btn round bg-cyan margin-tb-sm lg" @click="buttonClick">科室配置</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
departmentCode: '',
|
||||
department: '',
|
||||
hospital: '',
|
||||
sortHospital: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.departmentCode = e.qrcode
|
||||
this.getDepartmentIsExist()
|
||||
},
|
||||
methods: {
|
||||
getDepartment: function(e){
|
||||
this.department = e.target.value
|
||||
},
|
||||
getDepartmentIsExist() {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: 'https://lekapi.opmonitor.com/?c=app_api&a=getDepartmentIsExist',
|
||||
data: {
|
||||
departmentCode: this.departmentCode
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
if(res.data.data.hospital === null || res.data.data.hospital === '') {
|
||||
that.hospital = getApp().globalData.hospital
|
||||
} else {
|
||||
that.hospital = res.data.data.hospital
|
||||
}
|
||||
if(res.data.data.sortHospital === null || res.data.data.sortHospital === ''){
|
||||
that.sortHospital = getApp().globalData.sortHospital
|
||||
} else {
|
||||
that.sortHospital = res.data.data.sortHospital
|
||||
}
|
||||
that.department = res.data.data.department
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.showLoading({
|
||||
title: '页面跳转中',
|
||||
mask: true,
|
||||
success: function(res) {
|
||||
let new_that = that;
|
||||
// console.info(new_that.hospital,new_that.sortHospital,new_that.department,new_that.departmentCode)
|
||||
uni.request({
|
||||
url: 'https://lekapi.opmonitor.com/?c=app_api&a=postByDepartment',
|
||||
data: {
|
||||
hospital: new_that.hospital,
|
||||
sortHospital: new_that.sortHospital,
|
||||
department: new_that.department,
|
||||
departmentCode: new_that.departmentCode
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: 'POST',
|
||||
success: function(res){
|
||||
if(res.data.data === 'success'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 120Vh;
|
||||
}
|
||||
.photoView {
|
||||
padding-top: 50rpx;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.photoImage {
|
||||
overflow:hidden;
|
||||
display: block;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.cu-form-group .title{
|
||||
min-width: calc(4em + 15px);
|
||||
font-weight: 600;
|
||||
}
|
||||
.picker {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan" :isBack="true"><block slot="backText">返回</block><block slot="content">设备填报</block></cu-custom>
|
||||
<view class="photoView">
|
||||
<view class="photoImage">
|
||||
<open-data type="userAvatarUrl"></open-data>
|
||||
</view>
|
||||
</view>
|
||||
<form action="">
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">医院名称</view>
|
||||
<input name="hospital" v-model="hospital"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">分院名称</view>
|
||||
<input name="sortHospital" v-model="sortHospital"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">单片机编码</view>
|
||||
<input name="machineCode" :value="machineCode" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">设备编码</view>
|
||||
<input name="deviceCode" :value="deviceCode" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">设备名称</view>
|
||||
<input placeholder="请输入设备名称" name="device" v-model="device" @input="getDevice"></input>
|
||||
</view>
|
||||
</form>
|
||||
<view class="padding flex flex-direction" style="padding-top: 40%;">
|
||||
<button class="cu-btn round bg-cyan margin-tb-sm lg" @click="buttonClick">设备配置</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineCode: '',
|
||||
deviceCode: '',
|
||||
device: '',
|
||||
hospital: '',
|
||||
sortHospital: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.machineCode = e.qrcode
|
||||
this.getDeviceIsExist()
|
||||
},
|
||||
methods: {
|
||||
getDevice: function(e){
|
||||
this.device = e.target.value
|
||||
},
|
||||
getDeviceIsExist() {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: 'https://lekapi.opmonitor.com/?c=app_api&a=getDeviceIsExist',
|
||||
data: {
|
||||
machineCode: that.machineCode
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
if(res.data.data.hospital === null || res.data.data.hospital === '') {
|
||||
that.hospital = getApp().globalData.hospital
|
||||
} else {
|
||||
that.hospital = res.data.data.hospital
|
||||
}
|
||||
if(res.data.data.sortHospital === null || res.data.data.sortHospital === ''){
|
||||
that.sortHospital = getApp().globalData.sortHospital
|
||||
} else {
|
||||
that.sortHospital = res.data.data.sortHospital
|
||||
}
|
||||
that.deviceCode = res.data.data.deviceCode
|
||||
that.device = res.data.data.deviceName
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.showLoading({
|
||||
title: '页面跳转中',
|
||||
mask: true,
|
||||
success: function(res) {
|
||||
let new_that = that;
|
||||
// console.info(new_that.hospital,new_that.sortHospital,new_that.machineCode,new_that.device,new_that.deviceCode)
|
||||
uni.request({
|
||||
url: 'https://lekapi.opmonitor.com/?c=app_api&a=postByDevice',
|
||||
data: {
|
||||
hospital: new_that.hospital,
|
||||
sortHospital: new_that.sortHospital,
|
||||
machineCode: new_that.machineCode,
|
||||
device: new_that.device,
|
||||
deviceCode: new_that.deviceCode
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: 'POST',
|
||||
success: function(res){
|
||||
if(res.data.data === 'success'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100Vh;
|
||||
}
|
||||
.photoView {
|
||||
padding-top: 50rpx;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.photoImage {
|
||||
overflow:hidden;
|
||||
display: block;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.cu-form-group .title{
|
||||
min-width: calc(4em + 15px);
|
||||
font-weight: 600;
|
||||
}
|
||||
.picker {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan" :isBack="true"><block slot="backText">返回</block><block slot="content">人员填报</block></cu-custom>
|
||||
<view class="photoView">
|
||||
<view class="photoImage">
|
||||
<open-data type="userAvatarUrl"></open-data>
|
||||
</view>
|
||||
</view>
|
||||
<form action="">
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">医院名称</view>
|
||||
<input name="hospital" v-model="hospital"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">分院名称</view>
|
||||
<input name="sortHospital" v-model="sortHospital"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">科室名称</view>
|
||||
<input placeholder="请输入科室名称" name="department" v-model="department"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">职务名称</view>
|
||||
<input name="duty" :value="duty" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">二维码编码</view>
|
||||
<input name="userCode" :value="userCode" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">身份证号码</view>
|
||||
<input placeholder="请输入身份证号码" name="idcard" v-model="idcard" @input="getIdcard"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">人员名称</view>
|
||||
<input placeholder="请输入人员名称" name="name" v-model="name"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号码</view>
|
||||
<input placeholder="请输入手机号码" name="phone" v-model="phone"></input>
|
||||
</view>
|
||||
</form>
|
||||
<view class="padding flex flex-direction" style="padding-top: 20%;">
|
||||
<button class="cu-btn round bg-cyan margin-tb-sm lg" @click="buttonClick">人员配置</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hospital: '',
|
||||
sortHospital: '',
|
||||
department: '',
|
||||
duty: '',
|
||||
idcard: '',
|
||||
userCode: '',
|
||||
name: '',
|
||||
phone: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.userCode = e.qrcode
|
||||
var str = e.qrcode.substr(0,3)
|
||||
if (str === "r06") {
|
||||
this.duty = '交接人员'
|
||||
} else if (str === 'r07') {
|
||||
this.duty = '收集人员'
|
||||
} else if (str === 'r17') {
|
||||
this.duty = '收集人员'
|
||||
} else if (str === 'r08') {
|
||||
this.duty = '转运人员'
|
||||
} else if (str === 'r09') {
|
||||
this.duty = '保洁人员'
|
||||
} else if (str === 'r16') {
|
||||
this.duty = '交接人员'
|
||||
} else if (str === 'r18') {
|
||||
this.duty = '转运人员'
|
||||
} else if (str === 'r36') {
|
||||
this.duty = '交接人员'
|
||||
}
|
||||
this.getUserIsExist();
|
||||
},
|
||||
methods: {
|
||||
getIdcard: function(e){
|
||||
this.idcard = e.target.value
|
||||
},
|
||||
getName: function(e){
|
||||
this.name = e.target.value
|
||||
},
|
||||
getPhone: function(e){
|
||||
this.phone = e.target.value
|
||||
},
|
||||
getUserIsExist() {
|
||||
let that = this
|
||||
uni.request({
|
||||
url: 'https://lekapi.opmonitor.com/?c=app_api&a=getUserIsExist',
|
||||
data: {
|
||||
userCode: that.userCode
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res) {
|
||||
if(res.data.data.hospital === '' || res.data.data.hospital === null) {
|
||||
that.hospital = getApp().globalData.hospital
|
||||
} else {
|
||||
that.hospital = res.data.data.hospital
|
||||
}
|
||||
if(res.data.data.sortHospital === '' || res.data.data.sortHospital === null){
|
||||
that.sortHospital = getApp().globalData.sortHospital
|
||||
} else {
|
||||
that.sortHospital = res.data.data.sortHospital
|
||||
}
|
||||
that.department = res.data.data.dept_name
|
||||
that.idcard = res.data.data.id_card
|
||||
that.name = res.data.data.name
|
||||
that.phone = res.data.data.phone
|
||||
that.userCode = res.data.data.user_qrcode
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.showLoading({
|
||||
title: '页面跳转中',
|
||||
mask: true,
|
||||
success: function(res) {
|
||||
let new_that = that;
|
||||
// console.info(new_that.hospital,new_that.sortHospital,new_that.department,new_that.duty,new_that.name,new_that.idcard,new_that.userCode,new_that.phone)
|
||||
uni.request({
|
||||
url: 'https://lekapi.opmonitor.com/?c=app_api&a=PostUserInfo',
|
||||
data: {
|
||||
hospital: new_that.hospital,
|
||||
sortHospital: new_that.sortHospital,
|
||||
department: new_that.department,
|
||||
duty: new_that.duty,
|
||||
name: new_that.name,
|
||||
id_card: new_that.idcard,
|
||||
user_qrcode: new_that.userCode,
|
||||
phone: new_that.phone
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: 'POST',
|
||||
success: function(res){
|
||||
console.info(res.data.data)
|
||||
if(res.data.data === 'success'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 120Vh;
|
||||
}
|
||||
.photoView {
|
||||
padding-top: 50rpx;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.photoImage {
|
||||
overflow:hidden;
|
||||
display: block;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.cu-form-group .title{
|
||||
min-width: calc(4em + 15px);
|
||||
font-weight: 600;
|
||||
}
|
||||
.picker {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user