imageWhiteStore.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <div class="imageAIVerifyErr">
  3. <el-dialog
  4. title="图像识别结果"
  5. :visible.sync="vanPopup"
  6. width="80%"
  7. :append-to-body="true"
  8. :close-on-click-modal="false"
  9. @close="close"
  10. custom-class="AIVerifyErrdialog">
  11. <div class="AIVerifyErrMask">
  12. <div class="errorImg">
  13. <img
  14. v-if="imageWhiteStoreData.data.url"
  15. :src="imageWhiteStoreData.data.url"
  16. fit="contain"
  17. @click="previewsImg(imageWhiteStoreData.data.url)" />
  18. <img v-else :src="imageEmpty" width="100%" height="300px" />
  19. </div>
  20. <div class="AIVerify" v-html="imageWhiteStoreData.data.whiteMsg || ''"></div>
  21. <div class="uploadBtnAIVerify" :style="{ 'justify-content': 'center' }">
  22. <div class="confirmUploadAIVerify" @click="normalFlow">确认</div>
  23. </div>
  24. </div>
  25. </el-dialog>
  26. </div>
  27. </template>
  28. <script>
  29. import { ImagePreview } from 'vant';
  30. import imageEmpty from '@/assets/imageEmpty.png';
  31. export default {
  32. props: {
  33. imageWhiteStoreFlag: {
  34. type: Boolean,
  35. default: false,
  36. },
  37. imageWhiteStoreData: {
  38. type: Object,
  39. },
  40. },
  41. watch: {
  42. imageAIVerifyFlag: {
  43. handler(val) {
  44. console.log('imageAIVerifyFlag=' + val);
  45. if (val) this.initData();
  46. },
  47. immediate: true,
  48. },
  49. },
  50. data() {
  51. return {
  52. imageEmpty: imageEmpty,
  53. contentMessage: '', //提示内容
  54. vanPopup: true,
  55. url: '', // 本次图片路径
  56. };
  57. },
  58. methods: {
  59. initData() {},
  60. normalFlow() {
  61. this.$emit('close');
  62. this.$emit('normalFlow', this.imageWhiteStoreData);
  63. },
  64. close() {
  65. this.$emit('close');
  66. },
  67. previewsImg(url) {
  68. ImagePreview({
  69. images: [url],
  70. className: 'AIImageItem',
  71. getContainer: 'el-dialog__wrapper',
  72. });
  73. },
  74. },
  75. };
  76. </script>
  77. <style lang="scss">
  78. .el-dialog__wrapper {
  79. z-index: 3333 !important;
  80. display: flex;
  81. justify-content: center;
  82. align-items: center;
  83. background: rgba(0, 0, 0, 0.5) !important;
  84. .el-dialog__body {
  85. padding: 0px !important;
  86. }
  87. .el-dialog__header {
  88. text-align: center;
  89. }
  90. .AIVerifyErrdialog {
  91. width: vw(690) !important;
  92. margin-top: 1vh !important;
  93. border-radius: 8px !important;
  94. font-size: vw(32) !important;
  95. .el-dialog__headerbtn {
  96. width: vw(44);
  97. height: vw(44);
  98. background-color: #e1e1e1;
  99. border-radius: 50%;
  100. margin-top: -3px;
  101. }
  102. }
  103. .AIVerifyErrMask {
  104. width: 100%;
  105. padding: vw(30) vw(30) 0 vw(30);
  106. overflow: hidden;
  107. /* min-height: 180px; */
  108. .errorImg {
  109. width: 100%;
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. min-height: vw(303);
  114. img {
  115. width: vw(235);
  116. height: vw(303);
  117. border-radius: vw(10);
  118. }
  119. }
  120. .AIVerify {
  121. font-size: vw(32);
  122. margin-top: vw(45);
  123. // display: flex;
  124. justify-content: center;
  125. text-align: center;
  126. // span {
  127. color: #9e0202;
  128. display: block;
  129. // max-width: 70%;
  130. // }
  131. }
  132. }
  133. .van-popup {
  134. width: 90%;
  135. padding: 8px;
  136. border-radius: 8px;
  137. overflow: hidden;
  138. }
  139. .van-f-red-AIVerify {
  140. color: red;
  141. width: 8px;
  142. display: inline-block;
  143. line-height: 26px;
  144. }
  145. .photoAIVerify {
  146. /*margin-top: 9px;*/
  147. float: right;
  148. }
  149. .title {
  150. font-size: 16px;
  151. font-weight: 600;
  152. text-align: center;
  153. padding: 5px;
  154. }
  155. .uploadBtnAIVerify {
  156. display: flex;
  157. align-items: center;
  158. margin: vw(30) 0;
  159. div {
  160. display: flex;
  161. justify-content: center;
  162. align-items: center;
  163. font-size: vw(28);
  164. color: #fff;
  165. border-radius: 10px;
  166. /* margin: 0 6px; */
  167. width: vw(298);
  168. height: vw(68);
  169. background-blend-mode: normal, normal;
  170. }
  171. .confirmUploadAIVerify {
  172. background-image: linear-gradient(180deg, #ffa1a1 0%, #f6695f 35%, #ed301d 100%),
  173. linear-gradient(#aed0f9, #aed0f9);
  174. box-shadow: 0px 3px 6px 0px rgba(183, 30, 14, 0.35);
  175. margin-right: 6px;
  176. }
  177. .changeImageAIVerify {
  178. background-image: linear-gradient(180deg, #3b89e6 0%, #1e6acb 35%, #014baf 100%),
  179. linear-gradient(#0356b9, #0356b9);
  180. box-shadow: 0px 3px 6px 0px rgba(6, 60, 131, 0.35);
  181. margin-left: 6px;
  182. }
  183. .stillUploadAIVerify {
  184. background-image: linear-gradient(180deg, #3b89e6 0%, #1e6acb 35%, #014baf 100%),
  185. linear-gradient(#0356b9, #0356b9);
  186. box-shadow: 0px 3px 6px 0px rgba(6, 60, 131, 0.35);
  187. margin-left: 6px;
  188. }
  189. }
  190. }
  191. .van-overlay {
  192. /* z-index: 3334 !important; */
  193. }
  194. .van-image-preview {
  195. z-index: 3335 !important;
  196. background: rgba(0, 0, 0, 0.8) !important;
  197. }
  198. </style>