From 920b9943a8868039ccf1d808362a717fd7c29fb9 Mon Sep 17 00:00:00 2001 From: xjiangyan Date: Mon, 6 Dec 2021 15:53:03 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E4=B9=A6=E7=B1=8D=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=8A=9F=E8=83=BD=202.=E6=96=B0=E5=A2=9E=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=A4=E4=B8=A4=E4=BA=92=E6=8D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/static/css/scan.css | 17 +++++-- config/static/images/icons/book_sort.png | Bin 0 -> 605 bytes config/static/images/icons/exchange.png | Bin 0 -> 1450 bytes config/static/js/WebScan.js | 57 ++++++++++++++++++----- config/static/js/scanWeb.js | 55 ++++++++++++++++++++++ config/static/webScan.html | 37 +++++++++++++++ 6 files changed, 152 insertions(+), 14 deletions(-) create mode 100644 config/static/images/icons/book_sort.png create mode 100644 config/static/images/icons/exchange.png 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 0000000000000000000000000000000000000000..8f3500d786e6ac2ee981b4c9921ef8725651f520 GIT binary patch literal 605 zcmV-j0;2tiP)xkE$T&Yt44l@oT&p5a@09`y2C9xImQE+bnZeNZGc%BO;LcC~f1o4y| zDD|q)jS?e!gNErd*Ovn#yyn?~bf#g?s65)zgYiW&1kq*zfO%wZn5{+PV4R1ZVO6m| zn^xJuc*+(M)h(Pe#bEn`>VR>ScRnx1JPJLtRaQ5DUkb3Okn1O1BKpKYs!w{6Wo|$v z2mS?UzvB*AeMz5Z>a*{>7&E_#JabUnfp{X10iGxOZ$aZ^`=hc_>u(ZJOc4qGP9%mb zaUOYeb{ou%BZx2L7<7HLW<^fyb>nTe@fa2><$%~B##$Ow{U#JeIS6~^)*_Jq%D|#R z?Y?9^kotTX_!0FC=gt6JpDiL4>jGLne*S(WtlYuVj2AKU9m}Z-i@j3F0;LA%6V2z>i00000NkvXXu0mjf;cyi| literal 0 HcmV?d00001 diff --git a/config/static/images/icons/exchange.png b/config/static/images/icons/exchange.png new file mode 100644 index 0000000000000000000000000000000000000000..bd6643496f45eae2891786fabef2d511aa8e10a8 GIT binary patch literal 1450 zcmV;b1y%ZqP)mlAjm@yk%~gtq=4GkYErS5v`HU=NsTcnV)ctDjWuae`bF9gU9GLP zX;N*A5wuFNq1ZM)(3UQ=DYn{x*j-?YbX$|U=mLxEy2?JLnTz*&FLxK$YT_gWX6DS9 z-~8vCGZ%t~+{i=TANK@MVS2BSBD4-bAt(|+P{<#Eq6-9WN{NLdSQ>03nPJXWL@;)=!T}L{Zlw7AvFiBTkG!zq5x>|k6A#lZ1O?@V3T1c zPW;-hfXK`of!^SUy)Q+&)Ix%EeO+(0BN9kNfV5*wMFLM=Dm-~=c$mYs zKAc&73y1=+)1XC_(%Z$PzZxw zHwdT*(NkQHIMoc9!eIc|yrtf{O(dF7M$%q3nJY?aR~<-wEFDsS;iWmq-24U9*1tvT zE2Rt2`PQ?1zoDoS$=o9{2zGj=NXIYPGB6S%WpzDUj|qb^fbx8^5 zxj77ta=5tf1V3yf)1f5>T%R5T1uI+a^+p0Jn=w=Ze}gFaYf}541yG z(SgtDLg4DC*dNGB$MMlw;Q|{&{rxCd5C=MN9k+J2Dr}?yDFT$|@7O~KHVXi;y-u(n zp#?8F!8r!Se)pn$G|nuV5}=@H8h&s33xSAfKCR8g$@3n5Xvsn^x_e^axuJqo0R~{yNC5m}BCy9F!oKrP5y05cy#G|+ z=NknB#dBP4nkY!j;H5R4cw&hIj>|^)sSk5!kHhIwqsp8HUwXb61JPcAZe%#vw*48k z)LsElk!PMmRfJWGcxJew#16gQk8yefOPBtGL6;geAEo>+04=BPYOgGkJs@E}%PaEC z#Z*Puo6SQAZPvU$(QX^zyIguEVypP~MA0GzVN6287EAfOJyR+mOy154_8}>Qkftbu zP(Qjr0WhAJERGRMfW#CV;$q)vez>Zk&M`<8UcA-2u@}<6@-dvf-&5*I%%}u7l8CyLNr(kf?@(vI2Lrpvx>=1 zO2FMx6MdJ8YWE67Ceo%+UqLhu?$_p?{yDwh&BCq!53{J4KjfzFhX4Qo07*qoM6N<$ Ef(y~A2LJ#7 literal 0 HcmV?d00001 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 @@