Compare commits
10 Commits
ad605be6e4
...
611dc20625
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
611dc20625 | ||
|
|
ef1a85e88e | ||
|
|
252e181057 | ||
|
|
c0318072e4 | ||
|
|
efc725c786 | ||
|
|
6c331a5293 | ||
|
|
44e7d2e4ae | ||
|
|
806c6d184d | ||
|
|
5316056a36 | ||
|
|
9022873a6f |
33
package.json
33
package.json
@ -1,20 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "yer",
|
"id": "qianziyu-select",
|
||||||
"version": "1.0.0",
|
"displayName": "基于uview2.x封装的下拉框",
|
||||||
"main": "main.js",
|
"version": "1.2",
|
||||||
"scripts": {
|
"description": "公共选择下拉框,基于uview2.x。支持下拉加载、列表搜索、单选|多选",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"keywords": [
|
||||||
|
"下拉",
|
||||||
|
"单选",
|
||||||
|
"多选",
|
||||||
|
"uview"
|
||||||
|
],
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uview-ui": "^1.8.4"
|
"uview-ui": "^2.0.31"
|
||||||
},
|
}
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "http://192.168.16.64:3000/jihan/KindergartenAppletUI.git"
|
|
||||||
},
|
|
||||||
"description": ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
47
pages.json
47
pages.json
@ -9,6 +9,21 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarBackgroundColor": "#D7EEE8"
|
"navigationBarBackgroundColor": "#D7EEE8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "pages/prescription/prescription",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "体质评估运动处方",
|
||||||
|
"navigationBarTextStyle": "white", // 标题的字体颜色
|
||||||
|
"navigationBarBackgroundColor": "#37A97B"
|
||||||
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "pages/index/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationBarBackgroundColor": "#D7EEE8"
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/Parentinformation/Parentinformation",
|
"path": "pages/Parentinformation/Parentinformation",
|
||||||
"style": {
|
"style": {
|
||||||
@ -17,28 +32,18 @@
|
|||||||
// "navigationStyle": "custom",
|
// "navigationStyle": "custom",
|
||||||
"navigationBarBackgroundColor": "#D7EEE8" //
|
"navigationBarBackgroundColor": "#D7EEE8" //
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/prescription/prescription",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "体质评估运动处方",
|
|
||||||
"navigationBarTextStyle": "white", // 标题的字体颜色
|
|
||||||
"navigationBarBackgroundColor": "#37A97B"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/index/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationBarBackgroundColor": "#D7EEE8"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/Personal/Personal",
|
"path": "pages/Personal/Personal",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
// "enablePullDownRefresh": false,
|
// "enablePullDownRefresh": false,
|
||||||
|
// "enablePullDownRefresh": false,
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarBackgroundColor": "#D7EEE8" //背景颜色
|
"navigationBarBackgroundColor": "#D7EEE8" //背景颜色
|
||||||
}
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/grade/grade",
|
"path": "pages/grade/grade",
|
||||||
"style": {
|
"style": {
|
||||||
@ -46,7 +51,9 @@
|
|||||||
// "enablePullDownRefresh": false,
|
// "enablePullDownRefresh": false,
|
||||||
// "navigationStyle": "custom",
|
// "navigationStyle": "custom",
|
||||||
"navigationBarBackgroundColor": "#D7EEE8" //背景颜色
|
"navigationBarBackgroundColor": "#D7EEE8" //背景颜色
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/home/home",
|
"path": "pages/home/home",
|
||||||
"style": {
|
"style": {
|
||||||
@ -56,14 +63,28 @@
|
|||||||
// "enablePullDownRefresh": false,
|
// "enablePullDownRefresh": false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/add/add",
|
||||||
|
"style": {
|
||||||
|
// "navigationBarTitleText": "新增学生信息",
|
||||||
|
// "navigationStyle": "custom",
|
||||||
|
"navigationBarBackgroundColor": "#37A97B",
|
||||||
|
"navigationBarTextStyle": "white" // 标题的字体颜色
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/Viewprescription/Viewprescription",
|
"path": "pages/Viewprescription/Viewprescription",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "体质评估运动处方",
|
"navigationBarTitleText": "体质评估运动处方",
|
||||||
"navigationBarBackgroundColor": "#37A97B",
|
"navigationBarBackgroundColor": "#37A97B",
|
||||||
"navigationBarTextStyle": "white" // 标题的字体颜色
|
"navigationBarTextStyle": "white" // 标题的字体颜色
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="btn1" @tap='maskshow=false'>取消</view>
|
<view class="btn1" @tap='cancellist'>取消</view>
|
||||||
<view class="btn2" @tap='checkeds'>阅读并同意</view>
|
<view class="btn2" @tap='checkeds'>阅读并同意</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -116,6 +116,10 @@
|
|||||||
this.data.openId = options.openId
|
this.data.openId = options.openId
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
cancellist(){
|
||||||
|
this.checked = false;
|
||||||
|
this.maskshow = false
|
||||||
|
},
|
||||||
//点击隐私保护的确定
|
//点击隐私保护的确定
|
||||||
checkeds() {
|
checkeds() {
|
||||||
this.checked = true;
|
this.checked = true;
|
||||||
@ -156,6 +160,7 @@
|
|||||||
},
|
},
|
||||||
//取消按钮
|
//取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
this.maskshow=false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
@ -165,6 +170,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.btns{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.text {
|
.text {
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
padding-bottom: 80rpx;
|
padding-bottom: 80rpx;
|
||||||
@ -172,12 +180,15 @@
|
|||||||
|
|
||||||
.btn1,
|
.btn1,
|
||||||
.btn2 {
|
.btn2 {
|
||||||
width: 50%;
|
width: 254rpx;
|
||||||
height: 80rpx;
|
margin-left: 5%;
|
||||||
line-height: 80rpx;
|
margin-bottom: 5%;
|
||||||
|
height: 69rpx;
|
||||||
|
background: #F4F5F9;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
line-height: 69rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
@ -224,6 +235,17 @@
|
|||||||
padding: 5% 0 0 0;
|
padding: 5% 0 0 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.cancel {
|
||||||
|
width: 254rpx;
|
||||||
|
margin-left: 5%;
|
||||||
|
height: 69rpx;
|
||||||
|
background: #F4F5F9;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
line-height: 69rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin: 0 auto 0;
|
margin: 0 auto 0;
|
||||||
@ -239,16 +261,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
left: 10%;
|
left: 10%;
|
||||||
|
|
||||||
.cancel {
|
|
||||||
width: 254rpx;
|
|
||||||
margin-left: 5%;
|
|
||||||
height: 69rpx;
|
|
||||||
background: #F4F5F9;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
line-height: 69rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit {
|
.submit {
|
||||||
width: 254rpx;
|
width: 254rpx;
|
||||||
|
|||||||
@ -26,9 +26,9 @@
|
|||||||
<view class="studentitem">
|
<view class="studentitem">
|
||||||
<image src="../../static/renshi.png" mode=""></image>
|
<image src="../../static/renshi.png" mode=""></image>
|
||||||
<span>学生信息</span>
|
<span>学生信息</span>
|
||||||
<view class="added" v-if="parentList" @tap="additem">
|
<!-- <view class="added" v-if="parentList" @tap="additem">
|
||||||
新增
|
新增
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="backgrounditem" v-if="!parentList">
|
<view class="backgrounditem" v-if="!parentList">
|
||||||
<view class="picitem">
|
<view class="picitem">
|
||||||
@ -52,9 +52,9 @@
|
|||||||
<view class="sex">所属幼儿园:
|
<view class="sex">所属幼儿园:
|
||||||
<span>{{item.kindergartenName}}</span>
|
<span>{{item.kindergartenName}}</span>
|
||||||
</view>
|
</view>
|
||||||
<span class="update" @tap="getStudent(item)">
|
<!-- <span class="update" @tap="getStudent(item)">
|
||||||
修改
|
修改
|
||||||
</span>
|
</span> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="school" v-if="!parentList">
|
<view class="school" v-if="!parentList">
|
||||||
@ -136,24 +136,24 @@
|
|||||||
} else {}
|
} else {}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStudent(item){
|
// getStudent(item){
|
||||||
console.log(item,'99')
|
// console.log(item,'99')
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: `/pages/add/add?studentId=${item.studentId}`
|
// url: `/pages/add/add?studentId=${item.studentId}`
|
||||||
})
|
// })
|
||||||
|
|
||||||
|
|
||||||
},
|
// },
|
||||||
goindex(){
|
goindex(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/index/index"
|
url: "/pages/index/index"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
additem(){
|
// additem(){
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: "/pages/add/add"
|
// url: "/pages/add/add"
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
getInfoByPhoneinfo() {
|
getInfoByPhoneinfo() {
|
||||||
var that = this
|
var that = this
|
||||||
getInfoByPhone(this.phone).then(res => {
|
getInfoByPhone(this.phone).then(res => {
|
||||||
|
|||||||
@ -441,7 +441,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bindtitle {
|
.bindtitle {
|
||||||
width: 500rpx;
|
width: 470rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|||||||
@ -37,7 +37,8 @@
|
|||||||
<u--input v-model="form.studentNumber" placeholder="请输入学生编号" border="none"></u--input>
|
<u--input v-model="form.studentNumber" placeholder="请输入学生编号" border="none"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="证件编号:" prop="cardNumber" borderBottom ref="item1">
|
<u-form-item label="证件编号:" prop="cardNumber" borderBottom ref="item1">
|
||||||
<u--input v-model="form.cardNumber" placeholder="请输入证件编号" border="none" maxlength="18"></u--input>
|
<u--input v-model="form.cardNumber" @input="TypeInput($event)" type="number" placeholder="请输入证件编号"
|
||||||
|
border="none" maxlength="18"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="曾用名:" prop="onceName" borderBottom ref="item1">
|
<u-form-item label="曾用名:" prop="onceName" borderBottom ref="item1">
|
||||||
<u--input v-model="form.onceName" placeholder="请输入曾用名" border="none"></u--input>
|
<u--input v-model="form.onceName" placeholder="请输入曾用名" border="none"></u--input>
|
||||||
@ -53,7 +54,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-form-item label="学生性别:" borderBottom>
|
<u-form-item label="学生性别:" borderBottom>
|
||||||
<u-radio-group v-model="studentSex" @change="groupChange">
|
<u-radio-group v-model="form.studentSex" @change="groupChange">
|
||||||
<u-radio :customStyle="{marginBottom: '4px'}" v-for="(item, index) in radiolist1" :key="index"
|
<u-radio :customStyle="{marginBottom: '4px'}" v-for="(item, index) in radiolist1" :key="index"
|
||||||
:label="item.name" :name="item.name" @change="radioChange">
|
:label="item.name" :name="item.name" @change="radioChange">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
@ -107,7 +108,6 @@
|
|||||||
studentSex: '',
|
studentSex: '',
|
||||||
className: '',
|
className: '',
|
||||||
},
|
},
|
||||||
studentSex: '',
|
|
||||||
rules: {
|
rules: {
|
||||||
'birthDate': {
|
'birthDate': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -148,12 +148,12 @@
|
|||||||
});
|
});
|
||||||
this.studentId = options.studentId
|
this.studentId = options.studentId
|
||||||
getStudent(this.studentId).then(res => {
|
getStudent(this.studentId).then(res => {
|
||||||
if (res.data.studentSex == 'MALE') {
|
|
||||||
this.studentSex = '男'
|
|
||||||
} else if (res.data.studentSex == 'FEMALE') {
|
|
||||||
this.studentSex = '女'
|
|
||||||
}
|
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
|
if (res.data.studentSex == 'MALE') {
|
||||||
|
this.form.studentSex = '男'
|
||||||
|
} else if (res.data.studentSex == 'FEMALE') {
|
||||||
|
this.form.studentSex = '女'
|
||||||
|
}
|
||||||
this.form.parentName = res.data.parentName
|
this.form.parentName = res.data.parentName
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -181,6 +181,15 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 身份证限制数字格式
|
||||||
|
TypeInput(e, val) {
|
||||||
|
// 只能输入数字的验证;
|
||||||
|
var inputType = /[\W]/g; //想限制什么类型在这里换换正则就可以了
|
||||||
|
this.$nextTick(function() {
|
||||||
|
this.form.cardNumber = e.replace(inputType, '');
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消
|
||||||
ontouchcancel() {
|
ontouchcancel() {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/Personal/Personal"
|
url: "/pages/Personal/Personal"
|
||||||
@ -194,7 +203,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 性别
|
||||||
groupChange(n) {
|
groupChange(n) {
|
||||||
if (n == '男') {
|
if (n == '男') {
|
||||||
this.form.studentSex = 'MALE'
|
this.form.studentSex = 'MALE'
|
||||||
@ -215,6 +224,11 @@
|
|||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submitend() {
|
submitend() {
|
||||||
|
if(this.form.studentSex=='男'){
|
||||||
|
this.$set(this.form,'studentSex','MALE')
|
||||||
|
}else if(this.form.studentSex=='女'){
|
||||||
|
this.$set(this.form,'studentSex','FEMALE')
|
||||||
|
}
|
||||||
if (!this.form.kindergartenName) {
|
if (!this.form.kindergartenName) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
message: "请选择所属幼儿园",
|
message: "请选择所属幼儿园",
|
||||||
@ -227,8 +241,7 @@
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '2000'
|
duration: '2000'
|
||||||
})
|
})
|
||||||
}
|
}else{
|
||||||
|
|
||||||
this.$refs.uForm.validate().then(res => {
|
this.$refs.uForm.validate().then(res => {
|
||||||
// uni.$u.toast('校验通过')
|
// uni.$u.toast('校验通过')
|
||||||
updateStudent(this.form).then(res => {
|
updateStudent(this.form).then(res => {
|
||||||
@ -245,24 +258,16 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
} else if (res.code == 500) {
|
} else if (res.code == 500) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
uni.showToast({
|
message: res.msg,
|
||||||
title: res.msg,
|
type: 'error',
|
||||||
duration: 2000,
|
duration: '2000'
|
||||||
mask: true,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
uni.showToast({
|
|
||||||
title: errors,
|
|
||||||
duration: 2000,
|
|
||||||
mask: true,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -392,8 +397,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 54%;
|
left: 54%;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #D7EEE8;
|
background-color: #35A97A;
|
||||||
// bottom: 5%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit {
|
.submit {
|
||||||
@ -406,7 +410,6 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 20%;
|
left: 20%;
|
||||||
color: white;
|
color: white;
|
||||||
// bottom: 5%;
|
|
||||||
background-color: #35A97A;
|
background-color: #35A97A;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,15 +422,6 @@
|
|||||||
margin-left: 10% !important;
|
margin-left: 10% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ::v-deep .bindtitle {
|
|
||||||
// ::v-deep .input-inner {
|
|
||||||
// // color: #fff!important;
|
|
||||||
// font-size: 5rpx !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::v-deep .u-input {
|
::v-deep .u-input {
|
||||||
font-size: 5rpx !important;
|
font-size: 5rpx !important;
|
||||||
}
|
}
|
||||||
@ -453,7 +447,6 @@
|
|||||||
::v-deep .uni-data-select {
|
::v-deep .uni-data-select {
|
||||||
z-index: 9999 !important;
|
z-index: 9999 !important;
|
||||||
height: 200rpx !important;
|
height: 200rpx !important;
|
||||||
/* background: red; */
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -515,7 +515,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bindtitle {
|
.bindtitle {
|
||||||
width: 500rpx;
|
width: 470rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user