医废配置交接小程序源码
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan"><block slot="content">首页</block></cu-custom>
|
||||
<view class="photoView">
|
||||
<view class="photoImage">
|
||||
<open-data type="userAvatarUrl"></open-data>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding-top:20%;">
|
||||
<view class='text-center margin-bottom text-lg text-grey'>请扫描人员二维码进行配置</view>
|
||||
</view>
|
||||
<view class="padding flex flex-direction" style="padding-top: 40%;">
|
||||
<button class="cu-btn bg-cyan margin-tb-sm lg" @click="buttonClick">扫码配置</button>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created(){
|
||||
},
|
||||
methods: {
|
||||
buttonClick() {
|
||||
let that = this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
let code = res.result;
|
||||
uni.request({
|
||||
url: 'https://mwapi.opmonitor.com/?c=app_api&a=getNewConfigQrcodeType',
|
||||
data: {code: code},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
// console.info(res.data.data)
|
||||
if(res.data.data.type === "error"){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '不存在的医废二维码',
|
||||
success: function(res){
|
||||
if(res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}else if (res.cancal){
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else if(res.data.data.type === "user"){
|
||||
uni.navigateTo({
|
||||
url: "/pages/component/postByUser?qrcode="+res.data.data.qrcode
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名的正确性')
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
console.info('调用照相功能失败!!!')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100Vh;
|
||||
}
|
||||
|
||||
.photoView {
|
||||
padding-top: 150rpx;
|
||||
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);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-cyan"><block slot="content">医废列表</block></cu-custom>
|
||||
<view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
|
||||
<view class="cu-item arrow" v-for="(value,index) in DeptScaleList" :key="index">
|
||||
<navigator class="content" :url="'/pages/component/listDetails?dept_code='+index" hover-class="none">
|
||||
<text class="cuIcon-list text-cyan"></text>
|
||||
<text class="text-grey">{{ value.name }}</text>
|
||||
</navigator>
|
||||
<view class="action">
|
||||
<view class="cu-tag round bg-orange light">{{ value.last_handout_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
DeptScaleList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDeptScaleList()
|
||||
},
|
||||
methods: {
|
||||
getDeptScaleList(){
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: "https://mwapi.opmonitor.com/?c=app_api&a=dept_scale_list",
|
||||
data: {},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
that.DeptScaleList = res.data.data
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名的正确性')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,194 @@
|
||||
<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="cu-card dynamic" :class="isCard?'no-card':''">
|
||||
<view class="cu-item shadow" v-for="(value,index) in DeptMwList" :key="index">
|
||||
<view class="cu-list menu-avatar comment solids-bottom">
|
||||
<view class="cu-item" style="padding: 30rpx;30rpx;30rpx;30rpx;">
|
||||
<view class="content">
|
||||
<view class="flex">
|
||||
<view>医废袋标识:</view>
|
||||
<view class="flex-sub text-black">{{ value.ribbon_code }}</view>
|
||||
<view class="flex-sub text-red">{{ value.ribbon_code_right }}</view>
|
||||
</view>
|
||||
|
||||
<view v-if="value.waste_status == '误操作'" class="bg-grey padding-sm radius margin-top-sm" style="font-size:30rpx;">
|
||||
<view class="flex">
|
||||
<view>收集科室:</view>
|
||||
<view class="flex-sub">{{ value.dept_name }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>交接人员:</view>
|
||||
<view class="flex-sub">{{ value.hand_name }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>医废类型:</view>
|
||||
<view class="flex-sub">{{ value.waste_type }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>医废状态:</view>
|
||||
<view class="flex-sub">{{ value.waste_status }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>医废重量:</view>
|
||||
<view class="flex-sub">{{ value.weight }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="bg-white padding-sm radius margin-top-sm" style="font-size:30rpx;">
|
||||
<view class="flex">
|
||||
<view>收集科室:</view>
|
||||
<view class="flex-sub">{{ value.dept_name }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>交接人员:</view>
|
||||
<view class="flex-sub">{{ value.hand_name }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>医废类型:</view>
|
||||
<view class="flex-sub">{{ value.waste_type }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>医废状态:</view>
|
||||
<view class="flex-sub">{{ value.waste_status }}</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view>医废重量:</view>
|
||||
<view class="flex-sub">{{ value.weight }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-between">
|
||||
<view class="text-black" style="font-size: 30rpx;">{{ value.recl_time }}</view>
|
||||
<view>
|
||||
<button class="cu-btn sm bg-red" @click="buttonWcz(value.ribbon_code,value.ribbon_code_right)">标记误操作</button>
|
||||
<button class="cu-btn sm bg-blue" style="margin-left: 10rpx;" @click="buttonHf(value.ribbon_code,value.ribbon_code_right)">恢复</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids-bottom" style="padding-top: 20rpx;background-color: #F1F1F1;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isCard: false,
|
||||
dept_code: '',
|
||||
DeptMwList: []
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.dept_code = e.dept_code
|
||||
this.getDeptMwList(e.dept_code)
|
||||
},
|
||||
methods: {
|
||||
IsCard(e) {
|
||||
this.isCard = e.detail.value
|
||||
},
|
||||
getDeptMwList(){
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: "https://mwapi.opmonitor.com/?c=app_api&a=dept_mw_list",
|
||||
data: {dept_code: that.dept_code},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
that.DeptMwList = res.data.data
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名的正确性')
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonWcz(e,l) {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: "https://mwapi.opmonitor.com/?c=app_api&a=sign_wcz",
|
||||
data: {ribbon_code: e,ribbon_code_right: l},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
console.info(res.data.data)
|
||||
if(res.data.data === "success"){
|
||||
uni.navigateTo({
|
||||
url: '/pages/component/listDetails?dept_code='+that.dept_code
|
||||
})
|
||||
}else if(res.data.data === "false"){
|
||||
uni.navigateTo({
|
||||
url: '/pages/component/listDetails?dept_code='+that.dept_code
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名的正确性')
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonHf(e,l) {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: "https://mwapi.opmonitor.com/?c=app_api&a=sign_hf",
|
||||
data: {ribbon_code: e,ribbon_code_right: l},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res){
|
||||
console.info(res.data.data)
|
||||
if(res.data.data === "success"){
|
||||
uni.navigateTo({
|
||||
url: '/pages/component/listDetails?dept_code='+that.dept_code
|
||||
})
|
||||
}else if(res.data.data === "false"){
|
||||
uni.navigateTo({
|
||||
url: '/pages/component/listDetails?dept_code='+that.dept_code
|
||||
})
|
||||
}
|
||||
},
|
||||
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,206 @@
|
||||
<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">
|
||||
<view class="title">医院名称</view>
|
||||
<input name="hospital" :value="hospital" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">分院名称</view>
|
||||
<input name="sortHospital" :value="sortHospital" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">科室名称</view>
|
||||
<input name="department" :value="department" @input="getDepartment"></input>
|
||||
<!-- <picker @change="pickerDepartmentChange" :value="indexDepartment" :range="pickerDepartment">
|
||||
<view class="picker">
|
||||
{{indexDepartment>-1?pickerDepartment[indexDepartment]:'请选择科室名称'}}
|
||||
</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">职务名称</view>
|
||||
<input name="duty" :value="duty" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">身份证号码</view>
|
||||
<input placeholder="请输入身份证号码" name="idcard" :value="idcard" @input="getIdcard"></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="name" :value="name" @input="getName"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">联系电话</view>
|
||||
<input placeholder="请输入联系电话" name="phone" :value="phone" @input="getPhone"></input>
|
||||
</view>
|
||||
</form>
|
||||
<view class="padding flex flex-direction" style="padding-top: 100rpx;">
|
||||
<button class="cu-btn round bg-cyan margin-tb-sm lg" @click="buttonClick" style="background:-webkit-linear-gradient(right,#15D2BB,#2CC9E9);color:#ffffff;">配置</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hospital: '',
|
||||
sortHospital: '',
|
||||
department: '',
|
||||
duty: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
userCode: '',
|
||||
idcard: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.userCode = e.qrcode
|
||||
this.hospital = '新疆医科大学第五附属医院'
|
||||
this.sortHospital = '本院'
|
||||
this.department = ''
|
||||
this.duty = '交接人员'
|
||||
// 判断是否该人员是否配置
|
||||
this.isConfig();
|
||||
},
|
||||
methods: {
|
||||
isConfig() {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: 'https://mwapi.opmonitor.com/?c=app_api&a=getWfyIsConfig',
|
||||
data: {userCode: that.userCode},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.data.data === "false"){
|
||||
that.department = '',
|
||||
that.name = '',
|
||||
that.phone = '',
|
||||
that.idcard = ''
|
||||
} else {
|
||||
that.department = res.data.data.dept_name,
|
||||
that.name = res.data.data.name,
|
||||
that.phone = res.data.data.phone,
|
||||
that.idcard = res.data.data.id_card
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
});
|
||||
},
|
||||
// getDepartmentList() {
|
||||
// let that = this;
|
||||
// uni.request({
|
||||
// url: 'https://mwapi.opmonitor.com/?c=app_api&a=getWfyDepartmentList',
|
||||
// data: {hospital: that.hospital, sortHospital: that.sortHospital},
|
||||
// header: {
|
||||
// 'Content-type': 'application/json'
|
||||
// },
|
||||
// success: function(res) {
|
||||
// that.pickerDepartment = res.data.data
|
||||
// },
|
||||
// fail: () => {
|
||||
// console.info('小程序域名不正确,请检查域名正确性')
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// pickerDepartmentChange(e) {
|
||||
// this.indexDepartment = e.detail.value
|
||||
// this.department = this.pickerDepartment[this.indexDepartment]
|
||||
// },
|
||||
getDepartment: function(e){
|
||||
this.department = e.target.value
|
||||
},
|
||||
getName: function(e){
|
||||
this.name = e.target.value
|
||||
},
|
||||
getPhone: function(e){
|
||||
this.phone = e.target.value
|
||||
},
|
||||
getIdcard: function(e){
|
||||
this.idcard = e.target.value
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: 'https://mwapi.opmonitor.com/?c=app_api&a=WfyPostConfigUserInsert',
|
||||
data: {
|
||||
hospital: that.hospital,
|
||||
sortHospital: that.sortHospital,
|
||||
department: that.department,
|
||||
duty: that.duty,
|
||||
userCode: that.userCode,
|
||||
name: that.name,
|
||||
phone: that.phone,
|
||||
idcard: that.idcard
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: 'POST',
|
||||
success: function(res){
|
||||
if(res.data.data === 'success'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/component/success'
|
||||
})
|
||||
} else if(res.data.data === 'false'){
|
||||
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,178 @@
|
||||
<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">
|
||||
<view class="title">医院名称</view>
|
||||
<input name="hospital" :value="hospital" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">分院名称</view>
|
||||
<input name="sortHospital" :value="sortHospital" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">科室名称</view>
|
||||
<picker @change="pickerDepartmentChange" :value="indexDepartment" :range="pickerDepartment">
|
||||
<view class="picker">
|
||||
{{indexDepartment>-1?pickerDepartment[indexDepartment]:'请选择科室名称'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">职务名称</view>
|
||||
<input name="duty" :value="duty" disabled="true"></input>
|
||||
</view>
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">身份证号码</view>
|
||||
<input placeholder="请输入身份证号码" name="idcard" value="" @input="getIdcard"></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="name" value="" @input="getName"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">联系电话</view>
|
||||
<input placeholder="请输入联系电话" name="phone" value="" @input="getPhone"></input>
|
||||
</view>
|
||||
</form>
|
||||
<view class="padding flex flex-direction" style="padding-top: 100rpx;">
|
||||
<button class="cu-btn round bg-cyan margin-tb-sm lg" @click="buttonClick" style="background:-webkit-linear-gradient(right,#15D2BB,#2CC9E9);color:#ffffff;">配置</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hospital: '',
|
||||
sortHospital: '',
|
||||
indexDepartment: -1,
|
||||
department: '',
|
||||
duty: '',
|
||||
pickerDepartment: [],
|
||||
name: '',
|
||||
phone: '',
|
||||
userCode: '',
|
||||
idcard: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.userCode = e.qrcode
|
||||
this.hospital = '新疆医科大学第五附属医院'
|
||||
this.sortHospital = '本院'
|
||||
this.department = ''
|
||||
this.duty = '交接人员'
|
||||
this.getDepartmentList();
|
||||
},
|
||||
methods: {
|
||||
getDepartmentList() {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: 'https://mwapi.opmonitor.com/?c=app_api&a=getWfyDepartmentList',
|
||||
data: {hospital: that.hospital, sortHospital: that.sortHospital},
|
||||
header: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
success: function(res) {
|
||||
console.info(res.data.data)
|
||||
that.pickerDepartment = res.data.data
|
||||
},
|
||||
fail: () => {
|
||||
console.info('小程序域名不正确,请检查域名正确性')
|
||||
}
|
||||
});
|
||||
},
|
||||
pickerDepartmentChange(e) {
|
||||
this.indexDepartment = e.detail.value
|
||||
this.department = this.pickerDepartment[this.indexDepartment]
|
||||
},
|
||||
getName: function(e){
|
||||
this.name = e.target.value
|
||||
},
|
||||
getPhone: function(e){
|
||||
this.phone = e.target.value
|
||||
},
|
||||
getIdcard: function(e){
|
||||
this.idcard = e.target.value
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.request({
|
||||
url: 'https://mwapi.opmonitor.com/?c=app_api&a=WfyPostConfigUserInsert',
|
||||
data: {
|
||||
hospital: that.hospital,
|
||||
sortHospital: that.sortHospital,
|
||||
department: that.department,
|
||||
duty: that.duty,
|
||||
userCode: that.userCode,
|
||||
name: that.name,
|
||||
phone: that.phone,
|
||||
idcard: that.idcard
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: 'POST',
|
||||
success: function(res){
|
||||
if(res.data.data === 'success'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/component/success'
|
||||
})
|
||||
} else if(res.data.data === 'false'){
|
||||
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,43 @@
|
||||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-cyan" :isBack="true"><block slot="backText">返回</block><block slot="content">配置结果</block></cu-custom>
|
||||
<view class="padding-lr">
|
||||
<view class="padding-xs flex align-center" style="padding-top: 20%;">
|
||||
<view class="flex-sub text-center">
|
||||
<view class="text-xsl padding">
|
||||
<text class=" cuIcon-roundcheckfill text-green"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-xs flex align-center">
|
||||
<view class="flex-sub text-center">
|
||||
<view class="text-xl padding text-center">
|
||||
<text class="text-black text-bold" style="font-size: 20px;">配置成功!</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding flex flex-direction" style="padding-top: 40%;">
|
||||
<button class="cu-btn bg-cyan margin-tb-sm lg" @click="buttonClick">返回首页</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buttonClick() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<view>
|
||||
<basics v-if="PageCur=='basics'"></basics>
|
||||
<components v-if="PageCur=='component'"></components>
|
||||
<plugin v-if="PageCur=='plugin'"></plugin>
|
||||
<view class="cu-bar tabbar bg-white shadow foot">
|
||||
|
||||
<view class="action" @click="NavChange" v-for="(value,index) in footer_nav" :key="index" :data-cur="value.data_url">
|
||||
<view class='cuIcon-cu-image'>
|
||||
<image :src="value.src_1"></image>
|
||||
</view>
|
||||
<view :class="value.class_1">{{ value.name }}</view>
|
||||
</view>
|
||||
<!-- <view class="action" @click="NavChange" data-cur="component">
|
||||
<view class='cuIcon-cu-image'>
|
||||
<image :src="'/static/tabbar/component' + [PageCur == 'component'?'_cur':''] + '.png'"></image>
|
||||
</view>
|
||||
<view :class="PageCur=='component'?'text-cyan':'text-gray'">医废列表</view>
|
||||
</view>
|
||||
<view class="action" @click="NavChange" data-cur="plugin">
|
||||
<view class='cuIcon-cu-image'>
|
||||
<image :src="'/static/tabbar/about' + [PageCur == 'plugin'?'_cur':''] + '.png'"></image>
|
||||
</view>
|
||||
<view :class="PageCur=='plugin'?'text-cyan':'text-gray'">我的</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageCur: 'basics',
|
||||
footer_nav: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if(getApp().globalData.account == "xjwfy" && getApp().globalData.password == "xjwfy1126"){
|
||||
this.footer_nav = [
|
||||
{
|
||||
data_url: 'basics',
|
||||
src_1: '/static/tabbar/basics_cur.png',
|
||||
src_2: '/static/tabbar/basics.png',
|
||||
class_1: 'text-cyan',
|
||||
class_2: 'text-gray',
|
||||
name: '首页'
|
||||
},
|
||||
{
|
||||
data_url: 'plugin',
|
||||
src_1: '/static/tabbar/about_cur.png',
|
||||
src_2: '/static/tabbar/about.png',
|
||||
class_1: 'text-cyan',
|
||||
class_2: 'text-gray',
|
||||
name: '我的'
|
||||
}
|
||||
]
|
||||
}else{
|
||||
this.footer_nav = [
|
||||
{
|
||||
data_url: 'basics',
|
||||
src_1: '/static/tabbar/basics_cur.png',
|
||||
src_2: '/static/tabbar/basics.png',
|
||||
src_3: '/static/tabbar/component_cur.png',
|
||||
src_4: '/static/tabbar/component.png',
|
||||
src_5: '/static/tabbar/about_cur.png',
|
||||
src_6: '/static/tabbar/about.png',
|
||||
class_1: 'text-cyan',
|
||||
class_2: 'text-gray',
|
||||
name: '首页'
|
||||
},
|
||||
{
|
||||
data_url: 'component',
|
||||
src_1: '/static/tabbar/component_cur.png',
|
||||
src_2: '/static/tabbar/component.png',
|
||||
src_1: '/static/tabbar/basics_cur.png',
|
||||
src_2: '/static/tabbar/basics.png',
|
||||
src_3: '/static/tabbar/component_cur.png',
|
||||
src_4: '/static/tabbar/component.png',
|
||||
src_5: '/static/tabbar/about_cur.png',
|
||||
src_6: '/static/tabbar/about.png',
|
||||
class_1: 'text-cyan',
|
||||
class_2: 'text-gray',
|
||||
name: '医废列表'
|
||||
},
|
||||
{
|
||||
data_url: 'plugin',
|
||||
src_1: '/static/tabbar/about_cur.png',
|
||||
src_2: '/static/tabbar/about.png',
|
||||
src_1: '/static/tabbar/basics_cur.png',
|
||||
src_2: '/static/tabbar/basics.png',
|
||||
src_3: '/static/tabbar/component_cur.png',
|
||||
src_4: '/static/tabbar/component.png',
|
||||
src_5: '/static/tabbar/about_cur.png',
|
||||
src_6: '/static/tabbar/about.png',
|
||||
class_1: 'text-cyan',
|
||||
class_2: 'text-gray',
|
||||
name: '我的'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
NavChange: function(e) {
|
||||
this.PageCur = e.currentTarget.dataset.cur
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-cyan"><block slot="content">我的</block></cu-custom>
|
||||
<view class='margin-xl bg-white padding-xl radius shadow-lg'>
|
||||
<view class='text-center margin-bottom text-lg text-grey'>关于医废配置端</view>
|
||||
<view class='text-content'>
|
||||
<view>Hi!欢迎使用医废配置端小程序!</view>
|
||||
<view class='margin-top-sm'>该项目是我公司联合开发的一款高性能的微信小程序。</view>
|
||||
<view class='margin-top-sm'>利用成熟的物联网、信息化、人工智能技术,实现医疗场景内各类流程的严格、高标准管理。以便捷的安装、部署方式实现原有业务系统升级,全程可控,最终实现智能化精细管理。</view>
|
||||
<view class='margin-top-sm'>更多功能敬请期待!</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan"><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 placeholder="请输入登录账号" name="account" value="xjwfy" @input="getAccount"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">密码</view>
|
||||
<input placeholder="请输入登录密码" name="password" type="password" value="xjwfy1126" @input="getPassword"></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 {
|
||||
account: 'xjwfy',
|
||||
password: 'xjwfy1126'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
getAccount: function(e){
|
||||
this.account = e.target.value
|
||||
},
|
||||
getPassword: function(e){
|
||||
this.password = e.target.value
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.showLoading({
|
||||
title: '页面跳转中',
|
||||
mask: true,
|
||||
success: function(res) {
|
||||
let new_that = that;
|
||||
uni.request({
|
||||
url: 'https://mwapi.opmonitor.com/?c=app_api&a=getConfigLogin',
|
||||
data: {
|
||||
account: new_that.account,
|
||||
password: new_that.password
|
||||
},
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: 'POST',
|
||||
success: function(res){
|
||||
|
||||
if(res.data.data === 'false'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/plugin/loginError'
|
||||
})
|
||||
}else{
|
||||
if(res.data.data === 'success'){
|
||||
// 将这些变量放置globalData中
|
||||
getApp().globalData.account = new_that.account
|
||||
getApp().globalData.password = new_that.password
|
||||
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,43 @@
|
||||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-cyan" :isBack="true"><block slot="backText">返回</block><block slot="content">登录</block></cu-custom>
|
||||
<view class="padding-lr">
|
||||
<view class="padding-xs flex align-center" style="padding-top: 20%;">
|
||||
<view class="flex-sub text-center">
|
||||
<view class="text-xsl padding">
|
||||
<text class=" cuIcon-roundclosefill text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-xs flex align-center">
|
||||
<view class="flex-sub text-center">
|
||||
<view class="text-xl padding text-center">
|
||||
<text class="text-black text-bold" style="font-size: 20px;">账号/密码错误</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding flex flex-direction" style="padding-top: 40%;">
|
||||
<button class="cu-btn bg-cyan margin-tb-sm lg" @click="buttonClick">返回登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buttonClick() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/plugin/login"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user