1.新增书籍排序功能 2.新增图片两两互换功能
This commit is contained in:
parent
d95455e512
commit
920b9943a8
|
@ -164,3 +164,14 @@ ul{
|
||||||
.canvas-container{
|
.canvas-container{
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.el-dropdown-link {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409EFF;
|
||||||
|
}
|
||||||
|
.el-icon-arrow-down {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 605 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -189,7 +189,7 @@
|
||||||
},
|
},
|
||||||
majorPDFFile: function (callback) {
|
majorPDFFile: function (callback) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', this.url + "/majorPdfFile?pid="+this.clientId, true);
|
xhr.open('GET', this.url + "/majorPdfFile?pid=" + this.clientId, true);
|
||||||
xhr.responseType = "blob"; // 返回类型blob
|
xhr.responseType = "blob"; // 返回类型blob
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
callback(this);
|
callback(this);
|
||||||
|
@ -203,24 +203,24 @@
|
||||||
},
|
},
|
||||||
majorTiff: function (callback) {
|
majorTiff: function (callback) {
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type:'post',
|
type: 'post',
|
||||||
url:this.url+"/majorTiff",
|
url: this.url + "/majorTiff",
|
||||||
cache:false,
|
cache: false,
|
||||||
data:{
|
data: {
|
||||||
"pid":this.clientId
|
"pid": this.clientId
|
||||||
},
|
},
|
||||||
success:function(data){
|
success: function (data) {
|
||||||
callback(data);
|
callback(data);
|
||||||
},
|
},
|
||||||
error:function(){
|
error: function () {
|
||||||
result = new Result(500,"网络错误",null);
|
result = new Result(500, "网络错误", null);
|
||||||
callback(result);
|
callback(result);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
majorTiffFile: function (callback) {
|
majorTiffFile: function (callback) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', this.url + "/majorTiffFile?pid="+this.clientId, true);
|
xhr.open('GET', this.url + "/majorTiffFile?pid=" + this.clientId, true);
|
||||||
xhr.responseType = "blob"; // 返回类型blob
|
xhr.responseType = "blob"; // 返回类型blob
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
callback(this);
|
callback(this);
|
||||||
|
@ -251,7 +251,7 @@
|
||||||
},
|
},
|
||||||
majorZipFile: function (callback) {
|
majorZipFile: function (callback) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', this.url + "/downLoadZipFile?pid="+this.clientId, true);
|
xhr.open('GET', this.url + "/downLoadZipFile?pid=" + this.clientId, true);
|
||||||
xhr.responseType = "blob"; // 返回类型blob
|
xhr.responseType = "blob"; // 返回类型blob
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
callback(this);
|
callback(this);
|
||||||
|
@ -498,6 +498,41 @@
|
||||||
callback(result);
|
callback(result);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
exchangeImage: function (indexs, callback) {
|
||||||
|
jQuery.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: this.url + "/image/exchangeImage",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
"pid": this.clientId,
|
||||||
|
"indexs": indexs
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
callback(data);
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
let result = new Result(500, "网络错误", null);
|
||||||
|
callback(result);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bookSort: function (callback) {
|
||||||
|
jQuery.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: this.url + "/image/bookSort",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
"pid": this.clientId
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
callback(data);
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
let result = new Result(500, "网络错误", null);
|
||||||
|
callback(result);
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.WebScan = WebScan;
|
window.WebScan = WebScan;
|
||||||
|
|
|
@ -1543,6 +1543,61 @@ new Vue({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
exchangeImage: function () {
|
||||||
|
if (this.selectManyImages == null || this.selectManyImages == undefined ||
|
||||||
|
this.selectManyImages.length <= 0) {
|
||||||
|
this.eleMessage("请选择要交换的图像!", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.selectManyImages.length != 2) {
|
||||||
|
this.eleMessage("请选择两张图像进行交换!", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
var loading = that.eleLoadding();
|
||||||
|
that.WebScan.exchangeImage(that.selectManyImages, function (result) {
|
||||||
|
loading.close();
|
||||||
|
if (result.code == 200) {
|
||||||
|
|
||||||
|
var sortList = that.selectManyImages.sort();
|
||||||
|
|
||||||
|
let first = that.urls[sortList[0]];
|
||||||
|
let last = that.urls[sortList[1]];
|
||||||
|
|
||||||
|
that.urls.splice(sortList[0], 1, last)
|
||||||
|
that.urls.splice(sortList[1], 1, first)
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
that.eleMessage(result.msg, "warning");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
bookSort: function () {//是否是按照书籍类型来排序
|
||||||
|
if (this.urls == null || this.urls.length <= 0) {
|
||||||
|
this.eleMessage("该批次不包含图像", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let that = this;
|
||||||
|
let loading = that.eleLoadding();
|
||||||
|
|
||||||
|
that.WebScan.bookSort(function (result) {
|
||||||
|
loading.close();
|
||||||
|
if (result.code == 200) {
|
||||||
|
|
||||||
|
if (result.data != null && result.data.length > 0) {
|
||||||
|
that.urls = result.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
that.eleMessage(result.msg, "warning");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -42,6 +42,31 @@
|
||||||
<el-header height="70px">
|
<el-header height="70px">
|
||||||
<div class="menuContainer">
|
<div class="menuContainer">
|
||||||
<ul>
|
<ul>
|
||||||
|
<!-- <li>
|
||||||
|
<el-dropdown>
|
||||||
|
<div>
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<img src="images/icons/setup.png"/>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
>
|
||||||
|
书籍拆分排序<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item>
|
||||||
|
<div>
|
||||||
|
<div class="iconContainer">
|
||||||
|
<img src="images/icons/setup.png"/>
|
||||||
|
</div>
|
||||||
|
<div class="menus">扫描设定</div>
|
||||||
|
</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</li>-->
|
||||||
<li @click="setup()">
|
<li @click="setup()">
|
||||||
<div class="iconContainer">
|
<div class="iconContainer">
|
||||||
<img src="images/icons/setup.png"/>
|
<img src="images/icons/setup.png"/>
|
||||||
|
@ -96,6 +121,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">垂直合并</div>
|
<div class="menu">垂直合并</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li @click="bookSort()">
|
||||||
|
<div class="iconContainer">
|
||||||
|
<img src="images/icons/book_sort.png" style="height:31px"/>
|
||||||
|
</div>
|
||||||
|
<div class="menu">书籍自动排序</div>
|
||||||
|
</li>
|
||||||
|
<li @click="exchangeImage()">
|
||||||
|
<div class="iconContainer">
|
||||||
|
<img src="images/icons/exchange.png" style="height:31px"/>
|
||||||
|
</div>
|
||||||
|
<div class="menu">图片互换</div>
|
||||||
|
</li>
|
||||||
<li @click="upload()">
|
<li @click="upload()">
|
||||||
<div class="iconContainer">
|
<div class="iconContainer">
|
||||||
<img src="images/icons/upload.png"/>
|
<img src="images/icons/upload.png"/>
|
||||||
|
|
Loading…
Reference in New Issue