4 files modified
1 files added
| | |
| | | { |
| | | name: '我要办', |
| | | img: '/static/images/home/handle001.png', |
| | | url: '' |
| | | url: '../handle/handle' |
| | | } |
| | | ]; |
| | | resolute(list); |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/handle/handle", |
| | | "style": { |
| | | "navigationBarTitleText": "我要办" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/alarm_list/alarm_list", |
| | | "name": "alarm_list", |
| | | "style": { |
| | |
| | | <view class="btn1"> |
| | | <view class="btn0"> |
| | | <view class="btn"> |
| | | <view class="btn-title">打卡</view> |
| | | <view class="btn-title" @click="goClock()">打卡</view> |
| | | <view class="btn-time">{{nowTime}}</view> |
| | | </view> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | urls: '', |
| | | nowTime:'' |
| | | nowTime:'', |
| | | name:'', |
| | | jd:'', |
| | | wd:'', |
| | | address:'' |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, 1000); |
| | | }, |
| | | onLoad: function(options) { |
| | | //获取个人信息 |
| | | this.getOneselfInFo(); |
| | | //long 转换为字符串 |
| | | var code = JSON.stringify(this.$store.state.puserID.toString()); |
| | | this.urls = "http://s16s652780.51mypc.cn/xcxjingqingmap_clock_sign_in/xcxmap.html?snumber="+code; |
| | |
| | | methods: { |
| | | //获取当前位置信息 |
| | | getNowPosition(){ |
| | | var that = this; |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | geocode:'true', |
| | | success: function (res) { |
| | | debugger; |
| | | // debugger; |
| | | console.log('当前位置:' + res); |
| | | console.log('当前位置的经度:' + res.longitude); |
| | | console.log('当前位置的纬度:' + res.latitude); |
| | | that.jd = res.longitude; |
| | | that.wd = res.latitude; |
| | | } |
| | | }); |
| | | }, |
| | | //返回上一页 |
| | | goBack() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | |
| | | //获取个人信息 |
| | | getOneselfInFo() { |
| | | var that = this; |
| | | //保安信息查询 |
| | | uni.request({ |
| | | url:'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID, |
| | | method:'POST', |
| | | success(resdata) { |
| | | that.name = resdata.data.data.realName; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //去打卡 |
| | | goClock() { |
| | | var that = this; |
| | | axios({ |
| | | method: "POST", |
| | | url: this.$store.state.piAPI + `/attendance/AppSave`, |
| | | params: { |
| | | number: this.$store.state.puserID, |
| | | name: this.name, |
| | | clockTime: this.getNowTime(1), |
| | | jd: this.jd, |
| | | wd: this.wd, |
| | | address: this.address |
| | | }, |
| | | }).then((resdata) => { |
| | | //不在考勤范围内 |
| | | if (resdata.data.code == 400) { |
| | | layui.use('layer', function() { |
| | | var layer = layui.layer; |
| | | layer.msg('打卡失败,不在考勤范围', { |
| | | icon: 0 |
| | | }); |
| | | }); |
| | | } |
| | | //打卡成功 |
| | | if (resdata.data.code == 200) { |
| | | layui.use('layer', function() { |
| | | var layer = layui.layer; |
| | | layer.msg('打卡成功!', { |
| | | icon: 1 |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | //获取当前时间 |
| | |
| | | flex-direction: row; |
| | | align-items: center; |
| | | // background-color:#0078A8; |
| | | width: 100%; |
| | | width: 92%; |
| | | margin: 0 auto; |
| | | height: 50px; |
| | | margin-top: 20px; |
| | | |
| | |
| | | |
| | | image { |
| | | // background-color: #00BFFF; |
| | | margin-left: 1rem; |
| | | width: 1.6rem; |
| | | height: 1.6rem; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <view class="form-info"> |
| | | <u-form :model="form" ref="uForm"> |
| | | <u-form-item label="证件类型" :label-width="lableWidth"> |
| | | <picker @change="typeClassSelect" :range="typeClassArray" class="typeClass-select"> |
| | | <label :style="{color:typeClassArrayTypeColor}" v-model="form.type">{{ typeClassArrayType }}</label> |
| | | </picker> |
| | | </u-form-item> |
| | | <u-form-item label="姓名" :label-width="lableWidth"> |
| | | <u-input v-model="form.name" placeholder="请输入姓名"/> |
| | | </u-form-item> |
| | | <u-form-item label="身份证号码" :label-width="lableWidth"> |
| | | <u-input v-model="form.idCardNo" placeholder="请输入身份证号码"/> |
| | | </u-form-item> |
| | | <u-form-item label="手机号" :label-width="lableWidth"> |
| | | <u-input v-model="form.phone" placeholder="请输入手机号"/> |
| | | </u-form-item> |
| | | <u-form-item label="联系地址" :label-width="lableWidth"> |
| | | <u-input v-model="form.address" placeholder="请输入联系地址" /> |
| | | </u-form-item> |
| | | <u-form-item label="有效时间" :label-width="lableWidth"> |
| | | <!-- <u-input v-model="form.sex" type="select" placeholder="请选择有效时间"/> --> |
| | | <picker @change="timeClassSelect" :range="timeClassArray" class="timeClass-select"> |
| | | <label :style="{color:timeClassArrayTypeColor}" v-model="durationTime">{{ timeClassArrayType }}</label> |
| | | </picker> |
| | | </u-form-item> |
| | | <u-form-item label="备注" :label-width="lableWidth"> |
| | | <u-input v-model="form.remark" placeholder="请输入备注"/> |
| | | </u-form-item> |
| | | |
| | | <u-button class="btn" type="primary">提交</u-button> |
| | | </u-form> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | name: '', |
| | | idCardNo: '', |
| | | type: '', |
| | | phone:'', |
| | | address:'', |
| | | durationTime:'', |
| | | remark:'', |
| | | }, |
| | | lableWidth:160, |
| | | typeClassArrayTypeColor:"#C0C4CC", |
| | | typeClassArray:['通行证','寄养证'], |
| | | typeClassArrayIndex:0, |
| | | typeClassArrayType:'请选择证件类型', |
| | | timeClassArrayTypeColor:"#C0C4CC", |
| | | timeClassArray:["1个月","2个月","3个月","6个月","1年","2年"], |
| | | timeClassArrayIndex:0, |
| | | timeClassArrayType:'请选择有效时长', |
| | | } |
| | | }, |
| | | methods:{ |
| | | //证件类型下拉改变事件 |
| | | typeClassSelect(e){ |
| | | var that = this; |
| | | this.typeClassArrayIndex = e.target.value; |
| | | this.typeClassArrayType=this.typeClassArray[this.typeClassArrayIndex]; |
| | | //修改样式 |
| | | this.typeClassArrayTypeColor ="#000000"; |
| | | }, |
| | | //有效时长下拉改变事件 |
| | | timeClassSelect(e){ |
| | | var that = this; |
| | | this.timeClassArrayIndex = e.target.value; |
| | | this.timeClassArrayType=this.timeClassArray[this.timeClassArrayIndex]; |
| | | //修改样式 |
| | | this.timeClassArrayTypeColor ="#000000"; |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .form-info{ |
| | | width: 92%; |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | .btn{ |
| | | margin-top: 1.5rem; |
| | | } |
| | | </style> |
| | |
| | | iconPath: "/static/tabbar/index01.png", |
| | | selectedIconPath: "/static/tabbar/index02.png", |
| | | text: '首页', |
| | | |
| | | pagePath: "/pages/home/home" |
| | | }, |
| | | { |