From e10ea8191b0d2ad44ad9796d3644cbb0c343a4e6 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 31 May 2022 16:24:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=89=AA=E8=A3=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/saas/AppCountryAlbum/Clipping.vue | 185 ++++ src/saas/AppCountryAlbum/Watermark.vue | 19 +- .../components/ksp-cropper.vue | 952 ++++++++++++++++++ .../components/report/Daily.vue | 4 +- .../components/report/InspectLog.vue | 4 +- .../components/report/MeetingMminutes.vue | 4 +- .../components/report/RenderContent.vue | 21 +- .../components/report/WorkReport.vue | 4 +- .../images/clipping/clipping1.png | Bin 0 -> 288 bytes .../images/clipping/clipping2.png | Bin 0 -> 290 bytes .../images/clipping/clipping3.png | Bin 0 -> 288 bytes .../images/clipping/clipping4.png | Bin 0 -> 291 bytes .../images/clipping/clipping5.png | Bin 0 -> 543 bytes .../images/clipping/yuantu.png | Bin 0 -> 531 bytes 14 files changed, 1186 insertions(+), 7 deletions(-) create mode 100644 src/saas/AppCountryAlbum/Clipping.vue create mode 100644 src/saas/AppCountryAlbum/components/ksp-cropper.vue create mode 100644 src/saas/AppCountryAlbum/images/clipping/clipping1.png create mode 100644 src/saas/AppCountryAlbum/images/clipping/clipping2.png create mode 100644 src/saas/AppCountryAlbum/images/clipping/clipping3.png create mode 100644 src/saas/AppCountryAlbum/images/clipping/clipping4.png create mode 100644 src/saas/AppCountryAlbum/images/clipping/clipping5.png create mode 100644 src/saas/AppCountryAlbum/images/clipping/yuantu.png diff --git a/src/saas/AppCountryAlbum/Clipping.vue b/src/saas/AppCountryAlbum/Clipping.vue new file mode 100644 index 00000000..ffbe42ba --- /dev/null +++ b/src/saas/AppCountryAlbum/Clipping.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/src/saas/AppCountryAlbum/Watermark.vue b/src/saas/AppCountryAlbum/Watermark.vue index 65105ee6..6a1f5062 100644 --- a/src/saas/AppCountryAlbum/Watermark.vue +++ b/src/saas/AppCountryAlbum/Watermark.vue @@ -50,7 +50,7 @@ -
+

编辑图片

@@ -61,7 +61,7 @@
水印
-
+
剪裁
@@ -187,11 +187,26 @@ this.$nextTick(() => { this.getWatermarkList() }) + uni.$on('cropper', e => { + this.img = e + this.x = 32 + this.y = 200 + }) + }, + + onUnload () { + uni.$off('cropper') }, methods: { ...mapActions(['injectJWeixin']), + toClipping () { + uni.navigateTo({ + url: `./Clipping?url=${encodeURIComponent(this.img)}` + }) + }, + onImgLoad () { const img = document.querySelector('.waterMarker-img') diff --git a/src/saas/AppCountryAlbum/components/ksp-cropper.vue b/src/saas/AppCountryAlbum/components/ksp-cropper.vue new file mode 100644 index 00000000..cc63f9ab --- /dev/null +++ b/src/saas/AppCountryAlbum/components/ksp-cropper.vue @@ -0,0 +1,952 @@ + + + + + + diff --git a/src/saas/AppCountryAlbum/components/report/Daily.vue b/src/saas/AppCountryAlbum/components/report/Daily.vue index 8782bb62..c36d3943 100644 --- a/src/saas/AppCountryAlbum/components/report/Daily.vue +++ b/src/saas/AppCountryAlbum/components/report/Daily.vue @@ -139,11 +139,13 @@ onLongpress (e) { if (e.action === 'remove') { this.richList.splice(e.index, 1) - } else { + } else if (e.action === 'edit') { this.currIndex = e.index this.content = e.value this.isShowText = true + } else { + this.richList[e.index].value = e.value } }, diff --git a/src/saas/AppCountryAlbum/components/report/InspectLog.vue b/src/saas/AppCountryAlbum/components/report/InspectLog.vue index 95e07bf1..cfb9071d 100644 --- a/src/saas/AppCountryAlbum/components/report/InspectLog.vue +++ b/src/saas/AppCountryAlbum/components/report/InspectLog.vue @@ -148,11 +148,13 @@ onLongpress (e) { if (e.action === 'remove') { this.richList.splice(e.index, 1) - } else { + } else if (e.action === 'edit') { this.currIndex = e.index this.content = e.value this.isShowText = true + } else { + this.richList[e.index].value = e.value } }, diff --git a/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue b/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue index 4fb3dd8e..c7611517 100644 --- a/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue +++ b/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue @@ -169,11 +169,13 @@ onLongpress (e) { if (e.action === 'remove') { this.richList.splice(e.index, 1) - } else { + } else if (e.action === 'edit') { this.currIndex = e.index this.content = e.value this.isShowText = true + } else { + this.richList[e.index].value = e.value } }, diff --git a/src/saas/AppCountryAlbum/components/report/RenderContent.vue b/src/saas/AppCountryAlbum/components/report/RenderContent.vue index e49ad338..b935822b 100644 --- a/src/saas/AppCountryAlbum/components/report/RenderContent.vue +++ b/src/saas/AppCountryAlbum/components/report/RenderContent.vue @@ -24,7 +24,7 @@ 修改
-
+
剪裁
@@ -48,6 +48,19 @@ } }, + mounted () { + uni.$on('cropper', e => { + this.$emit('onLongpress', { + type: this.type, + value: e, + index: this.currIndex, + action: 'cropper' + }) + + this.isShow = false + }) + }, + methods: { toEditText () { this.$emit('onLongpress', { @@ -73,6 +86,12 @@ this.isShow = false }, + toClipping () { + uni.navigateTo({ + url: `./Clipping?url=${encodeURIComponent(this.value)}` + }) + }, + onLongpress (item, index) { this.currIndex = index this.type = item.type diff --git a/src/saas/AppCountryAlbum/components/report/WorkReport.vue b/src/saas/AppCountryAlbum/components/report/WorkReport.vue index bc2a5643..0f9fce9e 100644 --- a/src/saas/AppCountryAlbum/components/report/WorkReport.vue +++ b/src/saas/AppCountryAlbum/components/report/WorkReport.vue @@ -138,11 +138,13 @@ onLongpress (e) { if (e.action === 'remove') { this.richList.splice(e.index, 1) - } else { + } else if (e.action === 'edit') { this.currIndex = e.index this.content = e.value this.isShowText = true + } else { + this.richList[e.index].value = e.value } }, diff --git a/src/saas/AppCountryAlbum/images/clipping/clipping1.png b/src/saas/AppCountryAlbum/images/clipping/clipping1.png new file mode 100644 index 0000000000000000000000000000000000000000..74de453f852bcb7c3e063f953468bee650a39473 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r63?ysp-_HY5jKx9jP7LeL$-D$|v;urWT!FN< zwzjpkwSj?wzP`SZk&%gs34}C81v_r#r~_5=mIV0)GqCXrXb1LB-gD)~r$7HMPC5gW z==OAR4DmRgoFKuvIN<`*_M7Dk6VkctN*|@aKXh=e)16lm)$f%WrI{>5H{Ew-WVI0e zb!V?AOY-VQv3^d?k6JuZyv3vUb>NIzt Qs~8wOUHx3vIVCg!0Ha)Ei~s-t literal 0 HcmV?d00001 diff --git a/src/saas/AppCountryAlbum/images/clipping/clipping2.png b/src/saas/AppCountryAlbum/images/clipping/clipping2.png new file mode 100644 index 0000000000000000000000000000000000000000..b0370a582a69a0f1ce4935aff4259dae903eddfe GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r63?ysp-_HY5jKx9jP7LeL$-D$|v;urWT!FN< zwzjpkwSj?wzP`SZk&%gs34}C81v_r#r~_5=mIV0)GqCXrXb1LB-gD)~r$7HMPC5gW z==F4Q4DmRgoFKuvI6;Ib`GMJQJ*gWrn|$Z~xVc;6fuG_st7G?eM;zc~Ug_%b;HUDFW=?zY}{SG zu~ky+VqoiHu9piYylC+*2~)5t7MvT~smIWv7u2D*q(lFk+d&Np*2Am}3>)l>OaoTm>3m zc2;Y191M=F{?5VIy0ctdxp?inxWfwz-rZ$L(R+P&wuQ*My{j9}r0%MgZa=iU{NrbL z(LODiP>WRsOSDvWDX8wsP}{XZeb+CAT~127x|DZaQrRaZ2ei9^kzvx0&)X;FZ@UF_ O7K5j&pUXO@geCy=tYlDw3e_ zWoNZEN32ij+q=pVT*dG8j+OLZy_+qORQ#STK`Ui%wXk!}`&d?=R-f|xN5b}^C*rUYJtK_0jNuqzrSI3f8ml9F;lBJ$CrZ!w|2M;ha@Vm&Gy^Hss Q4s;oVr>mdKI;Vst0F~-vJpcdz literal 0 HcmV?d00001 diff --git a/src/saas/AppCountryAlbum/images/clipping/clipping5.png b/src/saas/AppCountryAlbum/images/clipping/clipping5.png new file mode 100644 index 0000000000000000000000000000000000000000..3dd6466b0e4015c046d76b7580eabd297a6ab0de GIT binary patch literal 543 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVB7>k44ofy`glX(f`)CKs2xB_X0 zh6dxbGY(n%9U87$mmRSwKWSBZ%ChX3Magl?(qk6I$1Tc_Tb7-)EIDRbanh>n1W2&t zxK-(KkVqL2ovNlTV2y>avQokx!zJ%0S@^N)Xz!rH}vUXk*2 zaSVw#{C4`?ye0<$H%8GVVH2k*X?d|0TE73^wD)DaPs4i6@^d@q_D{|!yE*rx&0zzc z#q$$(>qj@7zFhlqCtJqpzh)O|UmM5oxqp4u`%9I&ul}rY7QD3g*Cd1AKU;RCpPZl4 zm4BIWU5B{yLf06J1-ChV2QpsIu#t#u{QTqGl7{XnOI`Rp+>_ZCTqs-5z_)m%P={$E z&y>Y0#b#t5vb@l@jNyvB!zsH38``2oy>5oat`B(_zo{)zg8%#z@i$NW8}^?5f8Ot& zj_0gO@w17$KpoE!&YEQ5y`;NOsW+Jn6%lTdirE30MfAX1;&5u2q zizCk44ofy`glX(f`#0L0;xB_Wy zZEb67YXbuVJv}`jsjshZYHDg^WMph?3?zZT#KZ(hLbz}?kO36I3LuJsQu~zufGn3Q z3GxeOVB-}KQ`PqH4G0X6OfB#1pS*g{nJYIQef;$M&)>h{=1b&(&a?7#aSVw#{Py}? zp(X_Z)(4yFPhL5tqjCSgVX-eaZ~NgbmwT(%sg&kL&oqho@8aisk4#*z*QNjE%0IibC%O~v>3E#klj<5Pn!H*3 z`qI|zUDv!@8U@$N<%@2Wid`SDwt>lyG3FhA``<~tF|zMX_Q{9aJot7icgb~K_7z{! zv#-4>|L}C~wzv5t hpRX#^nKG%8NmnLA_M(%BDlohmJYD@<);T3K0RWHj&Vv8| literal 0 HcmV?d00001