|
|
|
@ -121,7 +121,7 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="扫描文件上传" :visible.sync="smwj.open" width="1000px" append-to-body>
|
|
|
|
<el-dialog title="扫描文件上传" :visible.sync="smwj.open" width="1000px" append-to-body>
|
|
|
|
<div style="margin-bottom: 30px;display: flex;align-items:start;min-height: 250px" v-loading="smwj.loading">
|
|
|
|
<div style="margin-bottom: 30px;display: flex;align-items:start;min-height: 250px;" v-loading="smwj.loading">
|
|
|
|
<div style="width:250px;border: 1px solid #eee; padding: 10px;">
|
|
|
|
<div style="width:250px;border: 1px solid #eee; padding: 10px;">
|
|
|
|
<div style="margin-bottom: 5px;">物理书架:</div>
|
|
|
|
<div style="margin-bottom: 5px;">物理书架:</div>
|
|
|
|
<el-tree
|
|
|
|
<el-tree
|
|
|
|
@ -139,7 +139,8 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="smwj.shelfId && smwj.list.length===0" style="width: 650px;margin-left: 20px;">
|
|
|
|
<div v-if="smwj.shelfId && smwj.list.length===0" style="width: 650px;margin-left: 20px;" v-loading="smwj.smloading" element-loading-text="文件扫描中"
|
|
|
|
|
|
|
|
element-loading-spinner="el-icon-loading">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-row class="sm_row" :gutter="20">
|
|
|
|
<el-row class="sm_row" :gutter="20">
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
@ -253,6 +254,7 @@ export default {
|
|
|
|
// 扫描文件上传
|
|
|
|
// 扫描文件上传
|
|
|
|
smwj: {
|
|
|
|
smwj: {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
|
|
|
|
smloading: false,
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
shelfId: undefined,
|
|
|
|
shelfId: undefined,
|
|
|
|
@ -288,7 +290,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
_this.WebScan.initSef('',function (result){
|
|
|
|
_this.WebScan.initSef('',function (result){
|
|
|
|
if(result.code!=200){
|
|
|
|
if(result.code!=200){
|
|
|
|
this.$alert(`初始化失败,返回错误:${result.msg}`, `提示`, {
|
|
|
|
_this.$alert(`初始化失败,返回错误:${result.msg}`, `提示`, {
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
@ -302,14 +304,14 @@ export default {
|
|
|
|
let _this = this;
|
|
|
|
let _this = this;
|
|
|
|
_this.WebScan.getDevices(function (result){
|
|
|
|
_this.WebScan.getDevices(function (result){
|
|
|
|
if(result.code!=200){
|
|
|
|
if(result.code!=200){
|
|
|
|
this.$alert(`初始化失败,返回错误:${result.msg}`, `提示`, {
|
|
|
|
_this.$alert(`初始化失败,返回错误:${result.msg}`, `提示`, {
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
if(result.data.indexOf('M3230') !== -1){
|
|
|
|
if(result.data.indexOf('M3230') !== -1){
|
|
|
|
_this.WebScanSetParams()
|
|
|
|
_this.WebScanSetParams()
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.$alert(`未检测到设备`, `提示`, {
|
|
|
|
_this.$alert(`未检测到设备`, `提示`, {
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -368,11 +370,13 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
_this.WebScan.setParams(form,function(result){
|
|
|
|
_this.WebScan.setParams(form,function(result){
|
|
|
|
if(result.code!=200){
|
|
|
|
if(result.code!=200){
|
|
|
|
this.$alert(`${result.msg}`, `提示`, {
|
|
|
|
_this.$alert(`${result.msg}`, `提示`, {
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
|
|
|
|
_this.smwj.smloading = true;
|
|
|
|
_this.WebScan.startScan(function(result){
|
|
|
|
_this.WebScan.startScan(function(result){
|
|
|
|
|
|
|
|
_this.smwj.smloading = false;
|
|
|
|
if(result.code==201){
|
|
|
|
if(result.code==201){
|
|
|
|
_this.smwj.list.push({
|
|
|
|
_this.smwj.list.push({
|
|
|
|
base64Str: result.image,
|
|
|
|
base64Str: result.image,
|
|
|
|
@ -380,7 +384,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(result.code==500){
|
|
|
|
if(result.code==500){
|
|
|
|
this.$alert(`${result.msg}`, `提示`, {
|
|
|
|
_this.$alert(`${result.msg}`, `提示`, {
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|