|
|
|
@ -49,7 +49,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="pictureRecard.length>0">
|
|
|
|
<div v-if="pictureRecard.length>0">
|
|
|
|
|
|
|
|
|
|
|
|
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
|
|
|
|
|
<span style="margin-left: 40px;">共计:</span>
|
|
|
|
|
|
|
|
<span style="color: #1c84c6">{{ pictureRecard.length }} 张</span>
|
|
|
|
|
|
|
|
<span style="margin-left: 40px;">已选:</span>
|
|
|
|
|
|
|
|
<span style="color: #1c84c6">{{ yxPictureRecardNum }}</span>
|
|
|
|
|
|
|
|
<span style="margin-left: 40px;">未选:</span>
|
|
|
|
|
|
|
|
<span style="color: #1c84c6">{{ wxPictureRecardNum }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
<el-checkbox v-for="item in pictureRecard" :label="item.picName" :key="item.id" v-model="item.checked" @change="handleCheckChange(item)">
|
|
|
|
<el-checkbox v-for="item in pictureRecard" :label="item.picName" :key="item.id" v-model="item.checked" @change="handleCheckChange(item)">
|
|
|
|
<div style="width: 150px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
|
<div style="width: 150px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
|
@ -89,6 +98,10 @@
|
|
|
|
<div class="el-upload__tip" slot="tip">只能上传图片,且不超过{{ upload.fileSize }}MB</div>
|
|
|
|
<div class="el-upload__tip" slot="tip">只能上传图片,且不超过{{ upload.fileSize }}MB</div>
|
|
|
|
</el-upload>
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style="font-size: 14px;margin-top: 10px;">
|
|
|
|
|
|
|
|
<span>共计:</span>
|
|
|
|
|
|
|
|
<span style="color:#2083d7;">{{fileList.length}} 张</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<ul class="el-upload-list el-upload-list--text" style="max-height:200px;overflow-y:auto;padding: 15px;">
|
|
|
|
<ul class="el-upload-list el-upload-list--text" style="max-height:200px;overflow-y:auto;padding: 15px;">
|
|
|
|
<li tabindex="0" class="el-upload-list__item is-success" v-for="(item,index) in fileList" :key="item.uid">
|
|
|
|
<li tabindex="0" class="el-upload-list__item is-success" v-for="(item,index) in fileList" :key="item.uid">
|
|
|
|
<a class="el-upload-list__item-name">
|
|
|
|
<a class="el-upload-list__item-name">
|
|
|
|
@ -113,61 +126,72 @@
|
|
|
|
<el-dialog title="扫描文件上传" :visible.sync="smwj.open" width="750px" append-to-body>
|
|
|
|
<el-dialog title="扫描文件上传" :visible.sync="smwj.open" width="750px" append-to-body>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-loading="smwj.loading">
|
|
|
|
<div v-loading="smwj.loading">
|
|
|
|
<div style="margin-bottom: 30px;display: flex;align-items:start;min-height: 300px;">
|
|
|
|
<div v-loading="smwj.smloading" element-loading-text="文件扫描中"
|
|
|
|
|
|
|
|
element-loading-spinner="el-icon-loading">
|
|
|
|
|
|
|
|
<div style="margin-bottom: 30px;min-height: 300px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style="width: 700px;margin-left: 20px;">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-row class="sm_row" :gutter="20">
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
|
|
|
|
<label style="width: 100px;">颜色模式</label>
|
|
|
|
|
|
|
|
<el-select v-model="pixel" placeholder="请选择颜色模式">
|
|
|
|
|
|
|
|
<el-option label="黑白" :value="0"></el-option>
|
|
|
|
|
|
|
|
<el-option label="灰色" :value="1"></el-option>
|
|
|
|
|
|
|
|
<el-option label="彩色" :value="2"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
|
|
|
|
<label style="width: 100px;">去白页</label>
|
|
|
|
|
|
|
|
<el-select v-model="white" placeholder="请选择去白页">
|
|
|
|
|
|
|
|
<el-option label="是" :value="true"></el-option>
|
|
|
|
|
|
|
|
<el-option label="否" :value="false"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
|
|
|
|
<label style="width: 100px;">分辨率</label>
|
|
|
|
|
|
|
|
<el-select v-model="resolution" placeholder="请选择分辨率">
|
|
|
|
|
|
|
|
<el-option label="100" :value="100"></el-option>
|
|
|
|
|
|
|
|
<el-option label="150" :value="150"></el-option>
|
|
|
|
|
|
|
|
<el-option label="200" :value="200"></el-option>
|
|
|
|
|
|
|
|
<el-option label="300" :value="300"></el-option>
|
|
|
|
|
|
|
|
<el-option label="600" :value="600"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="12">
|
|
|
|
|
|
|
|
<el-button icon="el-icon-upload2" type="primary" @click="WebScanInit">开始扫描</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="10" style="text-align: right; font-size: 14px" v-if="smwj.list.length>0">
|
|
|
|
|
|
|
|
<span>共计:</span>
|
|
|
|
|
|
|
|
<span style="color:#2083d7;">{{smwj.list.length}} 张</span>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="width: 700px;margin-left: 20px;" v-loading="smwj.smloading" element-loading-text="文件扫描中"
|
|
|
|
|
|
|
|
element-loading-spinner="el-icon-loading">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-row class="sm_row" :gutter="20">
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
|
|
|
|
<label style="width: 100px;">颜色模式</label>
|
|
|
|
|
|
|
|
<el-select v-model="pixel" placeholder="请选择颜色模式">
|
|
|
|
|
|
|
|
<el-option label="黑白" :value="0"></el-option>
|
|
|
|
|
|
|
|
<el-option label="灰色" :value="1"></el-option>
|
|
|
|
|
|
|
|
<el-option label="彩色" :value="2"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
|
|
|
|
<label style="width: 100px;">去白页</label>
|
|
|
|
|
|
|
|
<el-select v-model="white" placeholder="请选择去白页">
|
|
|
|
|
|
|
|
<el-option label="是" :value="true"></el-option>
|
|
|
|
|
|
|
|
<el-option label="否" :value="false"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col class="sm_col" :span="8">
|
|
|
|
|
|
|
|
<label style="width: 100px;">分辨率</label>
|
|
|
|
|
|
|
|
<el-select v-model="resolution" placeholder="请选择分辨率">
|
|
|
|
|
|
|
|
<el-option label="100" :value="100"></el-option>
|
|
|
|
|
|
|
|
<el-option label="150" :value="150"></el-option>
|
|
|
|
|
|
|
|
<el-option label="200" :value="200"></el-option>
|
|
|
|
|
|
|
|
<el-option label="300" :value="300"></el-option>
|
|
|
|
|
|
|
|
<el-option label="600" :value="600"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-button icon="el-icon-upload2" type="primary" @click="WebScanInit">开始扫描</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div v-if="smwj.list.length>0" style="margin-left: 20px;display: flex;flex-wrap: wrap">
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="smwj.list.length>0" style="width: 560px;margin-left: 20px;display: flex;flex-wrap: wrap">
|
|
|
|
<div v-for="(item,index) in smwj.list" class="smwjList">
|
|
|
|
|
|
|
|
<el-image
|
|
|
|
|
|
|
|
style="width: 70px; height: 70px"
|
|
|
|
|
|
|
|
:src="item.base64Str"
|
|
|
|
|
|
|
|
:preview-src-list="[item.base64Str]">
|
|
|
|
|
|
|
|
</el-image>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-for="(item,index) in smwj.list" class="smwjList">
|
|
|
|
<i class="el-icon-close" style="font-size:18px" @click="deleteFile1(index)"></i>
|
|
|
|
<el-image
|
|
|
|
</div>
|
|
|
|
style="width: 70px; height: 70px"
|
|
|
|
|
|
|
|
:src="item.base64Str"
|
|
|
|
|
|
|
|
:preview-src-list="[item.base64Str]">
|
|
|
|
|
|
|
|
</el-image>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<i class="el-icon-close" style="font-size:18px" @click="deleteFile1(index)"></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div style="text-align: center">
|
|
|
|
|
|
|
|
<el-button style="width:300px;" type="primary" @click="submitFiles(1)">确定上传</el-button>
|
|
|
|
<div style="text-align: center">
|
|
|
|
</div>
|
|
|
|
<el-button style="width:300px;" type="primary" @click="submitFiles(1)">确定上传</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@ -345,6 +369,8 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 上传图片记录
|
|
|
|
// 上传图片记录
|
|
|
|
pictureRecard: [],
|
|
|
|
pictureRecard: [],
|
|
|
|
|
|
|
|
yxPictureRecardNum: 0,
|
|
|
|
|
|
|
|
wxPictureRecardNum: 0,
|
|
|
|
// 已识别图片
|
|
|
|
// 已识别图片
|
|
|
|
yPictureRecard: [],
|
|
|
|
yPictureRecard: [],
|
|
|
|
// 未识别图片
|
|
|
|
// 未识别图片
|
|
|
|
@ -566,10 +592,11 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 确认上传文件提交
|
|
|
|
// 确认上传文件提交
|
|
|
|
submitFiles(type) {
|
|
|
|
submitFiles(type) {
|
|
|
|
|
|
|
|
|
|
|
|
this.checkAll = false;
|
|
|
|
this.checkAll = false;
|
|
|
|
if (type === 1) {
|
|
|
|
if (type === 1) {
|
|
|
|
|
|
|
|
this.smwj.loading = true;
|
|
|
|
if (this.smwj.list.length === 0) {
|
|
|
|
if (this.smwj.list.length === 0) {
|
|
|
|
|
|
|
|
this.smwj.loading = false;
|
|
|
|
this.$alert(`请先开始扫描!`, `提示`, {
|
|
|
|
this.$alert(`请先开始扫描!`, `提示`, {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -591,23 +618,27 @@ export default {
|
|
|
|
DaPicturesRecard.muPath = this.getAllLabels(this.dangAnNode);
|
|
|
|
DaPicturesRecard.muPath = this.getAllLabels(this.dangAnNode);
|
|
|
|
DaPicturesRecard.ywType = this.dangAnNode.data.ywType;
|
|
|
|
DaPicturesRecard.ywType = this.dangAnNode.data.ywType;
|
|
|
|
formData.append('picRecard', new Blob([JSON.stringify(DaPicturesRecard)], {type: 'application/json',}));
|
|
|
|
formData.append('picRecard', new Blob([JSON.stringify(DaPicturesRecard)], {type: 'application/json',}));
|
|
|
|
this.smwj.loading = true;
|
|
|
|
|
|
|
|
collectSaves(formData).then(response => {
|
|
|
|
collectSaves(formData).then(response => {
|
|
|
|
this.pictureRecard = response.data;
|
|
|
|
this.pictureRecard = response.data;
|
|
|
|
|
|
|
|
this.yxPictureRecardNum = 0;
|
|
|
|
|
|
|
|
this.wxPictureRecardNum = this.pictureRecard.length;
|
|
|
|
this.smwj.open = false;
|
|
|
|
this.smwj.open = false;
|
|
|
|
this.smwj.loading = false;
|
|
|
|
this.smwj.loading = false;
|
|
|
|
}).catch(err => {
|
|
|
|
}).catch(err => {
|
|
|
|
this.smwj.loading = false;
|
|
|
|
this.smwj.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.smwj.loading = false;
|
|
|
|
this.$alert(`上传文件大小不能超过 ${this.upload.fileSize} MB!`, `提示`, {
|
|
|
|
this.$alert(`上传文件大小不能超过 ${this.upload.fileSize} MB!`, `提示`, {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.upload.loading = true;
|
|
|
|
if (this.fileList.length === 0) {
|
|
|
|
if (this.fileList.length === 0) {
|
|
|
|
|
|
|
|
this.upload.loading = false;
|
|
|
|
this.$alert(`请先上传图片!`, `提示`, {
|
|
|
|
this.$alert(`请先上传图片!`, `提示`, {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -629,10 +660,12 @@ export default {
|
|
|
|
DaPicturesRecard.muPath = this.getAllLabels(this.dangAnNode);
|
|
|
|
DaPicturesRecard.muPath = this.getAllLabels(this.dangAnNode);
|
|
|
|
DaPicturesRecard.ywType = this.dangAnNode.data.ywType;
|
|
|
|
DaPicturesRecard.ywType = this.dangAnNode.data.ywType;
|
|
|
|
formData.append('picRecard', new Blob([JSON.stringify(DaPicturesRecard)], {type: 'application/json',}));
|
|
|
|
formData.append('picRecard', new Blob([JSON.stringify(DaPicturesRecard)], {type: 'application/json',}));
|
|
|
|
this.upload.loading = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collectSaves(formData).then(response => {
|
|
|
|
collectSaves(formData).then(response => {
|
|
|
|
this.pictureRecard = response.data;
|
|
|
|
this.pictureRecard = response.data;
|
|
|
|
|
|
|
|
this.yxPictureRecardNum = 0;
|
|
|
|
|
|
|
|
this.wxPictureRecardNum = this.pictureRecard.length;
|
|
|
|
this.upload.open = false;
|
|
|
|
this.upload.open = false;
|
|
|
|
this.upload.loading = false;
|
|
|
|
this.upload.loading = false;
|
|
|
|
}).catch(err => {
|
|
|
|
}).catch(err => {
|
|
|
|
@ -640,6 +673,7 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.upload.loading = false;
|
|
|
|
this.$alert(`上传文件大小不能超过 ${this.upload.fileSize} MB!`, `提示`, {
|
|
|
|
this.$alert(`上传文件大小不能超过 ${this.upload.fileSize} MB!`, `提示`, {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -666,7 +700,17 @@ export default {
|
|
|
|
this.pictureRecard.forEach(item =>{
|
|
|
|
this.pictureRecard.forEach(item =>{
|
|
|
|
item['checked']= val
|
|
|
|
item['checked']= val
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.pictureRecard = [...this.pictureRecard]
|
|
|
|
this.pictureRecard = [...this.pictureRecard];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let yxP = 0
|
|
|
|
|
|
|
|
this.pictureRecard.forEach( item => {
|
|
|
|
|
|
|
|
if(item.checked){
|
|
|
|
|
|
|
|
yxP+=1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.yxPictureRecardNum = yxP;
|
|
|
|
|
|
|
|
this.wxPictureRecardNum = Number(this.pictureRecard.length - yxP);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleCheckChange(val) {
|
|
|
|
handleCheckChange(val) {
|
|
|
|
let checkAll = true
|
|
|
|
let checkAll = true
|
|
|
|
@ -676,7 +720,17 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.pictureRecard = [...this.pictureRecard]
|
|
|
|
this.pictureRecard = [...this.pictureRecard]
|
|
|
|
this.checkAll = checkAll
|
|
|
|
this.checkAll = checkAll;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let yxP = 0
|
|
|
|
|
|
|
|
this.pictureRecard.forEach( item => {
|
|
|
|
|
|
|
|
if(item.checked){
|
|
|
|
|
|
|
|
yxP+=1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.yxPictureRecardNum = yxP;
|
|
|
|
|
|
|
|
this.wxPictureRecardNum = Number(this.pictureRecard.length - yxP);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 创建识别任务
|
|
|
|
// 创建识别任务
|
|
|
|
cjsbrw(){
|
|
|
|
cjsbrw(){
|
|
|
|
@ -761,6 +815,8 @@ export default {
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
this.pictureRecard = [...this.wPictureRecard];
|
|
|
|
this.pictureRecard = [...this.wPictureRecard];
|
|
|
|
this.checkAll = false;
|
|
|
|
this.checkAll = false;
|
|
|
|
|
|
|
|
this.yxPictureRecardNum = 0;
|
|
|
|
|
|
|
|
this.wxPictureRecardNum = this.pictureRecard.length;
|
|
|
|
this.$modal.msgSuccess(response.msg);
|
|
|
|
this.$modal.msgSuccess(response.msg);
|
|
|
|
loading.close();
|
|
|
|
loading.close();
|
|
|
|
}).catch((err)=>{
|
|
|
|
}).catch((err)=>{
|
|
|
|
|