Commit 51b34c9a authored by 罗超's avatar 罗超

新增销售6流程统计

parent 9953eb5c
...@@ -30,6 +30,7 @@ var sUserAgent = navigator.userAgent; ...@@ -30,6 +30,7 @@ var sUserAgent = navigator.userAgent;
} }
import chosenOpenMode from './components/commonPage/chosenOpenMode' import chosenOpenMode from './components/commonPage/chosenOpenMode'
import mycareer from './components/champion/mycareer' import mycareer from './components/champion/mycareer'
import { clearInterval } from 'timers';
export default { export default {
name: 'App', name: 'App',
components: { components: {
...@@ -62,18 +63,52 @@ export default { ...@@ -62,18 +63,52 @@ export default {
dataShow:false, dataShow:false,
haveOpenMode:false, haveOpenMode:false,
settingSys: false, settingSys: false,
timer:null,
useTime:0
// sessionStorage.getItem("mazip") ? sessionStorage.getItem("mazip") : true // sessionStorage.getItem("mazip") ? sessionStorage.getItem("mazip") : true
} }
}, },
methods: { methods: {
inited (viewer){ inited (viewer){
this.$viewer = viewer this.$viewer = viewer
}, },
show (data) { show (data) {
this.$set(this.images,data) this.$set(this.images,data)
this.$viewer.show() this.$viewer.show()
},
listeneruser(){
let that=this
window.onblur=function () {
that.plaus()
if (that.useTime) {
let params={
CreateBy:that.getLocalStorage().EmployeeId,
UsedTime:that.useTime
}
that.apipost("user_set_user_usederplog",params,r=>{
if(r.data.resultCode==1){
this.UsedTime=0
}
})
}
}
window.onfocus=function () {
that.timekeeper()
}
},
timekeeper(){
if(!this.timer){
this.timer=window.setInterval(() => {
this.useTime+=0.1
}, 1000*6);
}
},
plaus() {
if(this.timer){
window.clearInterval(this.timer);
this.timer=null
}
} }
}, },
mounted() { mounted() {
...@@ -81,6 +116,9 @@ export default { ...@@ -81,6 +116,9 @@ export default {
this.$router.push({ this.$router.push({
path: '/login' path: '/login'
}) })
}else{
this.timekeeper()
this.listeneruser()
} }
this.haveOpenMode=!localStorage.openMode this.haveOpenMode=!localStorage.openMode
this.MsgBus.$on('imgpreviewoverflow',content=>{ this.MsgBus.$on('imgpreviewoverflow',content=>{
...@@ -113,6 +151,7 @@ export default { ...@@ -113,6 +151,7 @@ export default {
this.MsgBus.$on('imgprevclear',content=>{ this.MsgBus.$on('imgprevclear',content=>{
this.images=[] this.images=[]
}) })
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment