diff --git a/config/static/css/scan.css b/config/static/css/scan.css index bf37ae2..cc62e3f 100644 --- a/config/static/css/scan.css +++ b/config/static/css/scan.css @@ -59,7 +59,7 @@ ul{ } .el-container .el-header{ border-bottom: 1px solid #eee; -} +} .el-container .el-header .iconContainer{ width:100%; text-align: center; @@ -136,7 +136,7 @@ ul{ left: 0; top: 0; width: 100%; - height: 100%; + height: 100%; } .mask .messageBox { width: 500px; @@ -163,4 +163,15 @@ ul{ } .canvas-container{ margin:0 auto; -} \ No newline at end of file +} + + +.el-dropdown-link { + cursor: pointer; + color: #409EFF; +} +.el-icon-arrow-down { + font-size: 12px; +} + + diff --git a/config/static/images/icons/book_sort.png b/config/static/images/icons/book_sort.png new file mode 100644 index 0000000..8f3500d Binary files /dev/null and b/config/static/images/icons/book_sort.png differ diff --git a/config/static/images/icons/exchange.png b/config/static/images/icons/exchange.png new file mode 100644 index 0000000..bd66434 Binary files /dev/null and b/config/static/images/icons/exchange.png differ diff --git a/config/static/js/WebScan.js b/config/static/js/WebScan.js index c34ec71..f85be73 100644 --- a/config/static/js/WebScan.js +++ b/config/static/js/WebScan.js @@ -189,7 +189,7 @@ }, majorPDFFile: function (callback) { 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.onload = function () { callback(this); @@ -203,24 +203,24 @@ }, majorTiff: function (callback) { jQuery.ajax({ - type:'post', - url:this.url+"/majorTiff", - cache:false, - data:{ - "pid":this.clientId + type: 'post', + url: this.url + "/majorTiff", + cache: false, + data: { + "pid": this.clientId }, - success:function(data){ + success: function (data) { callback(data); }, - error:function(){ - result = new Result(500,"网络错误",null); + error: function () { + result = new Result(500, "网络错误", null); callback(result); } }) }, majorTiffFile: function (callback) { 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.onload = function () { callback(this); @@ -251,7 +251,7 @@ }, majorZipFile: function (callback) { 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.onload = function () { callback(this); @@ -498,6 +498,41 @@ 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; diff --git a/config/static/js/scanWeb.js b/config/static/js/scanWeb.js index 48d211f..3a58f79 100644 --- a/config/static/js/scanWeb.js +++ b/config/static/js/scanWeb.js @@ -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"); + } + }) + }, } }) diff --git a/config/static/webScan.html b/config/static/webScan.html index 076df10..dd6285a 100644 --- a/config/static/webScan.html +++ b/config/static/webScan.html @@ -42,6 +42,31 @@