|
|
@@ -490,7 +490,9 @@ export default Vue.extend({
|
|
|
},
|
|
|
|
|
|
preventBlur(event: any) {
|
|
|
- event.preventDefault()
|
|
|
+ if (this.examInfo.antiCheating) {
|
|
|
+ event.preventDefault()
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
changeFlagTo1() {
|
|
|
@@ -510,19 +512,21 @@ export default Vue.extend({
|
|
|
},
|
|
|
|
|
|
focusAuto() {
|
|
|
- if ((InputFocus as any).cheatFlag == 1) {
|
|
|
- ;(InputFocus as any).cheatFlag = 0
|
|
|
- this.monitor()
|
|
|
- }
|
|
|
- const fo = this.$refs.focusOn
|
|
|
- this.focusAutoInterval = setInterval(function() {
|
|
|
- if (
|
|
|
- (InputFocus as any).InputFlag == 1 &&
|
|
|
- (InputFocus as any).codeFlag == 1
|
|
|
- ) {
|
|
|
- ;(fo as any).focus()
|
|
|
+ if (this.examInfo.antiCheating) {
|
|
|
+ if ((InputFocus as any).cheatFlag == 1) {
|
|
|
+ ;(InputFocus as any).cheatFlag = 0
|
|
|
+ this.monitor()
|
|
|
}
|
|
|
- }, 100)
|
|
|
+ const fo = this.$refs.focusOn
|
|
|
+ this.focusAutoInterval = setInterval(function() {
|
|
|
+ if (
|
|
|
+ (InputFocus as any).InputFlag == 1 &&
|
|
|
+ (InputFocus as any).codeFlag == 1
|
|
|
+ ) {
|
|
|
+ ;(fo as any).focus()
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
changeVisibleFalse() {
|
|
|
@@ -551,52 +555,56 @@ export default Vue.extend({
|
|
|
},
|
|
|
|
|
|
monitor() {
|
|
|
- let _this = this
|
|
|
- if (
|
|
|
- this.allowNum < 1 &&
|
|
|
- this.flag == 1 &&
|
|
|
- this.vCardFlag == 1 &&
|
|
|
- (InputFocus as any).InputFlag == 1
|
|
|
- ) {
|
|
|
- setTimeout(function() {
|
|
|
- if ((InputFocus as any).codeFlag == 1) {
|
|
|
- _this.flag = _this.flag - 1
|
|
|
- _this.visible1 = true
|
|
|
- }
|
|
|
- }, 100)
|
|
|
- } else if (
|
|
|
- this.flag == 1 &&
|
|
|
- this.vCardFlag == 1 &&
|
|
|
- (InputFocus as any).InputFlag == 1
|
|
|
- ) {
|
|
|
- setTimeout(function() {
|
|
|
- if ((InputFocus as any).codeFlag == 1) {
|
|
|
- _this.allowNum = _this.allowNum - 1
|
|
|
- //alert(y);
|
|
|
- _this.visible = true
|
|
|
- _this.changeFlagTo0()
|
|
|
- _this.timeCount()
|
|
|
- }
|
|
|
- }, 100)
|
|
|
+ if (this.examInfo.antiCheating) {
|
|
|
+ let _this = this
|
|
|
+ if (
|
|
|
+ this.allowNum < 1 &&
|
|
|
+ this.flag == 1 &&
|
|
|
+ this.vCardFlag == 1 &&
|
|
|
+ (InputFocus as any).InputFlag == 1
|
|
|
+ ) {
|
|
|
+ setTimeout(function() {
|
|
|
+ if ((InputFocus as any).codeFlag == 1) {
|
|
|
+ _this.flag = _this.flag - 1
|
|
|
+ _this.visible1 = true
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
+ } else if (
|
|
|
+ this.flag == 1 &&
|
|
|
+ this.vCardFlag == 1 &&
|
|
|
+ (InputFocus as any).InputFlag == 1
|
|
|
+ ) {
|
|
|
+ setTimeout(function() {
|
|
|
+ if ((InputFocus as any).codeFlag == 1) {
|
|
|
+ _this.allowNum = _this.allowNum - 1
|
|
|
+ //alert(y);
|
|
|
+ _this.visible = true
|
|
|
+ _this.changeFlagTo0()
|
|
|
+ _this.timeCount()
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
+ //document.getElementById("demo").innerHTML = y;
|
|
|
}
|
|
|
- //document.getElementById("demo").innerHTML = y;
|
|
|
},
|
|
|
|
|
|
isFullScreen() {
|
|
|
- if (window.outerHeight == screen.availHeight) {
|
|
|
- if (window.outerWidth == screen.availWidth) {
|
|
|
- this.stopTimeCount()
|
|
|
- this.visible = false
|
|
|
- this.flag = 1
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.flag = 0
|
|
|
- if (this.allowNum < 1) {
|
|
|
- this.visible1 = true
|
|
|
+ if (this.examInfo.antiCheating) {
|
|
|
+ if (window.outerHeight == screen.availHeight) {
|
|
|
+ if (window.outerWidth == screen.availWidth) {
|
|
|
+ this.stopTimeCount()
|
|
|
+ this.visible = false
|
|
|
+ this.flag = 1
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.allowNum = this.allowNum - 1
|
|
|
- this.visible = true
|
|
|
- this.timeCount()
|
|
|
+ this.flag = 0
|
|
|
+ if (this.allowNum < 1) {
|
|
|
+ this.visible1 = true
|
|
|
+ } else {
|
|
|
+ this.allowNum = this.allowNum - 1
|
|
|
+ this.visible = true
|
|
|
+ this.timeCount()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|