websdk demo:退出时清理全局目录,删除绑定目录相关功能

This commit is contained in:
luoliangyi 2024-03-28 14:59:31 +08:00
parent 5167491bca
commit 41808c3dd9
2 changed files with 18 additions and 13 deletions

View File

@ -537,6 +537,7 @@ new Vue({
this.getBatchList(function () {
that.changeBatch(that.batchIdList.slice(-1)[0])
})
this.stopBindFolder()
},
//界面销毁
onCloseScreen: function () {
@ -550,6 +551,10 @@ new Vue({
console.log('releaseService')
this.deinitDevices()
// this.stopBindFolder()
console.log('网页关闭,清理全局文件')
this.WebScanController.clearGlobalFileSavePath(function (info) {
console.log('网页关闭,清理文件成功')
})
if (this.WebScanController) {
this.WebScanController.disconnect()
}
@ -561,13 +566,13 @@ new Vue({
this.WebScanController.getGlobalConfig(function (info) {
console.log('getGlobalConfig :' + info)
that.globalConfig = info
var pre = info.file_save_path
if (pre.endsWith("\\")) {
that.bindFolderPath = pre + 'auto'
} else {
that.bindFolderPath = pre + '\\auto'
}
that.bindFolder()
// var pre = info.file_save_path
// if (pre.endsWith("\\")) {
// that.bindFolderPath = pre + 'auto'
// } else {
// that.bindFolderPath = pre + '\\auto'
// }
// that.bindFolder()
})
},
//设置全局参数
@ -826,7 +831,7 @@ new Vue({
this.isSetup = false
this.setGlobalConfig()
this.setScanParams()
this.bindFolder()
// this.bindFolder()
},
onDeviceChanged: function (deviceName) {
this.closeDevice()

View File

@ -374,7 +374,7 @@
@contextmenu.prevent>
<div v-show="showWaterMark" ref="water-mark-opt"
style="background-color: white;width: 300px;height: 300px;z-index:20;position: absolute;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);left: 80px;top: 450px;padding: 8px">
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);left: 80px;top: 200px;padding: 8px">
<div>
<span>输入文字</span>
<el-input v-model="waterMarkText" style="width: 220px" placeholder="请输入要添加的文字"></el-input>
@ -577,10 +577,10 @@
<el-input v-model="globalConfig.file_save_path"
placeholder="请输入文件保存目录"></el-input>
</el-form-item>
<el-form-item label="文件绑定目录">
<el-input v-model="bindFolderPath"
placeholder="请输入文件绑定目录"></el-input>
</el-form-item>
<!-- <el-form-item label="文件绑定目录">-->
<!-- <el-input v-model="bindFolderPath"-->
<!-- placeholder="请输入文件绑定目录"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="文件名前缀">
<el-input v-model="globalConfig.file_name_prefix"