@@ -19,6 +19,94 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="status" style="min-width:150px"></div> | <div id="status" style="min-width:150px"></div> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<div id="app"> | |||||
<a class="btn btn-default" v-on:click="nocludesVisible = true">时间段排除</a> | |||||
<el-dialog title="时间段排除" | |||||
:visible.sync="nocludesVisible" | |||||
width="500px" | |||||
append-to-body | |||||
:before-close="handleClose"> | |||||
<div v-for="(item,index) in searchNoIncludes" style="padding-bottom:18px;"> | |||||
<el-date-picker v-model="item.value" | |||||
size="small" | |||||
type="datetimerange" | |||||
value-format="yyyy-MM-dd HH:mm:ss" | |||||
:picker-options="pickerOptions" | |||||
range-separator="至" | |||||
start-placeholder="开始日期" | |||||
end-placeholder="结束日期" | |||||
align="right"> | |||||
</el-date-picker> | |||||
<el-button | |||||
size="small" | |||||
type="warning" | |||||
plain | |||||
class="el-icon-delete" | |||||
v-on:click="delNoIcludes(index)"> | |||||
</el-button> | |||||
</div> | |||||
<div> | |||||
<el-button size="small" type="primary" plain v-on:click="addNoCludes">新增</el-button> | |||||
</div> | |||||
<span slot="footer" class="dialog-footer"> | |||||
<el-button size="small" type="primary" v-on:click="nocludesVisible = false">确 定</el-button> | |||||
</span> | |||||
</el-dialog> | |||||
</div> | |||||
<script src="~/Content/vue/vue.js"></script> | |||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> | |||||
<script src="https://unpkg.com/element-ui/lib/index.js"></script> | |||||
<script> | |||||
new Vue({ | |||||
el: "#app", | |||||
data: { | |||||
searchNoIncludes: [{value:null}], | |||||
nocludesVisible: false, | |||||
pickerOptions: { | |||||
shortcuts: [{ | |||||
text: '最近一周', | |||||
onClick(picker) { | |||||
const end = new Date(); | |||||
const start = new Date(); | |||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | |||||
picker.$emit('pick', [start, end]); | |||||
} | |||||
}, { | |||||
text: '最近一个月', | |||||
onClick(picker) { | |||||
const end = new Date(); | |||||
const start = new Date(); | |||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | |||||
picker.$emit('pick', [start, end]); | |||||
} | |||||
}, { | |||||
text: '最近三个月', | |||||
onClick(picker) { | |||||
const end = new Date(); | |||||
const start = new Date(); | |||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | |||||
picker.$emit('pick', [start, end]); | |||||
} | |||||
}] | |||||
}, | |||||
}, | |||||
methods: { | |||||
handleClose() { | |||||
this.nocludesVisible = false | |||||
}, | |||||
addNoCludes() { | |||||
this.searchNoIncludes.push({ value: null }) | |||||
}, | |||||
delNoIcludes(index) { | |||||
this.searchNoIncludes.splice(index,1) | |||||
} | |||||
} | |||||
}) | |||||
</script> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | <a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | ||||
</div> | </div> | ||||
@@ -5,6 +5,13 @@ | |||||
// 考虑到用户刷新网页时会丢失全局数据、页面栈、页面数据等,因此直接跳回首页即可 | // 考虑到用户刷新网页时会丢失全局数据、页面栈、页面数据等,因此直接跳回首页即可 | ||||
async onLaunch(param) { | async onLaunch(param) { | ||||
// 版本更新 | |||||
var newVer = '1.0.1'; | |||||
var oldVer = localStorage.getItem('version'); | |||||
if (newVer != oldVer) { | |||||
localStorage.setItem('version', newVer); | |||||
this.JUMP_TO("/") | |||||
} | |||||
// 加载百度地图资源 | // 加载百度地图资源 | ||||
let ak = this.GET_AK() | let ak = this.GET_AK() | ||||
var script = document.createElement('script'); | var script = document.createElement('script'); | ||||
@@ -31,6 +31,9 @@ | |||||
<view style="color: #666;"> | <view style="color: #666;"> | ||||
{{postData.ClockPlace}} | {{postData.ClockPlace}} | ||||
</view> | </view> | ||||
<view class="wifiCard" v-if="info.AttendanceType != 5"> | |||||
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="footer"> | <view class="footer"> | ||||
@@ -314,6 +317,19 @@ | |||||
toAttendanceCardTeacher() { | toAttendanceCardTeacher() { | ||||
this.JUMP_TO('/pages/AttendanceCardTeacher/list', {},true) | this.JUMP_TO('/pages/AttendanceCardTeacher/list', {},true) | ||||
}, | }, | ||||
// 判断是否学校网络 | |||||
isInternalNetwork(){ | |||||
this.LOADING() | |||||
this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ | |||||
this.HIDE_LOADING() | |||||
if(res.data&&['1.190.222.35','1.190.222.34'].inlcudes(res.data.client_ip)){ | |||||
let postData = {AIsOut:0,ClockPlace:'已连接校园网'} | |||||
this.NAV_TO(`./single_zc`,postData,true) | |||||
}else{ | |||||
this.TOAST('未检测到校园网连接') | |||||
} | |||||
}) | |||||
}, | |||||
}, | }, | ||||
destroyed() { | destroyed() { | ||||
// let scirpt = document.getElementById('baiduScript') | // let scirpt = document.getElementById('baiduScript') | ||||
@@ -431,4 +447,13 @@ | |||||
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | ||||
filter: gray; | filter: gray; | ||||
} | } | ||||
.wifiCard{ | |||||
margin-top: 6px; | |||||
font-size: 14px; | |||||
text-align: center; | |||||
span{ | |||||
color: #0c86d8; | |||||
} | |||||
} | |||||
</style> | </style> |
@@ -40,6 +40,9 @@ | |||||
<view> | <view> | ||||
{{postData.ClockPlace}} | {{postData.ClockPlace}} | ||||
</view> | </view> | ||||
<view class="wifiCard" v-if="info.AttendanceType != 5"> | |||||
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -312,7 +315,20 @@ | |||||
}) | }) | ||||
}); | }); | ||||
} | |||||
}, | |||||
// 判断是否学校网络 | |||||
isInternalNetwork(){ | |||||
this.LOADING() | |||||
this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ | |||||
this.HIDE_LOADING() | |||||
if(res.data&&['1.190.222.35','1.190.222.34'].inlcudes(res.data.client_ip)){ | |||||
let postData = {AIsOut:0,ClockPlace:'已连接校园网'} | |||||
this.NAV_TO(`./single_zc`,postData,true) | |||||
}else{ | |||||
this.TOAST('未检测到校园网连接') | |||||
} | |||||
}) | |||||
}, | |||||
}, | }, | ||||
destroyed() { | destroyed() { | ||||
let scirpt = document.getElementById('baiduScript') | let scirpt = document.getElementById('baiduScript') | ||||
@@ -430,4 +446,13 @@ | |||||
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | ||||
filter: gray; | filter: gray; | ||||
} | } | ||||
.wifiCard{ | |||||
margin-top: 6px; | |||||
font-size: 14px; | |||||
text-align: center; | |||||
span{ | |||||
color: #0c86d8; | |||||
} | |||||
} | |||||
</style> | </style> |
@@ -14,7 +14,7 @@ module.exports = { | |||||
disableHostCheck: true | disableHostCheck: true | ||||
}, | }, | ||||
output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】 | output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】 | ||||
filename: `${filePath}[name]${Timestamp}.js`, | |||||
filename: `${filePath}[name]${Timestamp}.js?v=1.0.1`, | |||||
chunkFilename: `${filePath}[name]${Timestamp}.js` | chunkFilename: `${filePath}[name]${Timestamp}.js` | ||||
}, | }, | ||||
} | } | ||||