perfectStoreSign.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div class="perfectStoreSign">
  3. <van-nav-bar class="navBar" title="AI 店招识别" left-arrow @click-left="onClickLeft" />
  4. <div class="content">
  5. <div class="contentBox">
  6. <div class="shopSign specialTask" v-if="shopSignDetail && shopSignDetail.qualifiedState">
  7. <div class="specialTaskLeft">
  8. <div class="SignText">识别结果:</div>
  9. <div class="signContent">
  10. <div class="icon">
  11. <van-icon
  12. name="checked"
  13. color="#07c160"
  14. v-if="shopSignDetail.qualifiedState == '1'" />
  15. <van-icon name="warning" color="#ee0a24" v-else />
  16. </div>
  17. <div
  18. v-if="shopSignDetail.qualifiedState != null"
  19. :style="{ color: shopSignDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
  20. {{
  21. shopSignDetail.qualifiedState == '1'
  22. ? '店招完整,授权号正确'
  23. : shopSignDetail.unqualifiedReason
  24. }}
  25. </div>
  26. </div>
  27. <div class="shopSignButton">
  28. <div class="" style="display: flex">
  29. <van-button round type="primary" v-if="shopSignDetail.qualifiedState == '1'"
  30. >通过</van-button
  31. >
  32. <van-button round type="danger" v-if="shopSignDetail.qualifiedState == '0'"
  33. >不通过</van-button
  34. >
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="shopSignImg">
  40. <div class="text">店招照片</div>
  41. <div class="imgBox">
  42. <img
  43. v-if="shopSignDetail && shopSignDetail.qualifiedState"
  44. :src="shopSignDetail.fileUrl"
  45. @click="previewsImg(shopSignDetail.fileUrl)" />
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </template>
  52. <script>
  53. import deleteUploadImg from '@/components/deleteUploadImg';
  54. import { getVisitsDetailPerfectStoreByTaskId } from '@/api/index';
  55. import { ImagePreview } from 'vant';
  56. export default {
  57. name: 'perfectStoreSign',
  58. components: { deleteUploadImg },
  59. data() {
  60. return {
  61. visitsId: '',
  62. detail: null,
  63. shopSignDetail: null,
  64. };
  65. },
  66. activated() {
  67. this.visitsId = this.$route.query.visitId || '';
  68. this.detail = null;
  69. this.getVisitsDetailFn();
  70. },
  71. methods: {
  72. getVisitsDetailFn() {
  73. this.shopSignDetail = null;
  74. getVisitsDetailPerfectStoreByTaskId({
  75. visitsId: this.visitsId,
  76. taskIdList: this.$route.query.taskId.split(','),
  77. })
  78. .then((res) => {
  79. this.toastLoading().clear();
  80. if (res.code == 200 && res.data && res.data.length > 0) {
  81. this.detail = res.data[0];
  82. let shopSignArr = this.detail;
  83. this.shopSignDetail = shopSignArr;
  84. } else {
  85. this.$dialog.alert({
  86. message: res.msg,
  87. });
  88. }
  89. })
  90. .catch((err) => {
  91. this.$dialog.alert({
  92. message: err.msg,
  93. });
  94. });
  95. },
  96. previewsImg(url) {
  97. ImagePreview([url]);
  98. },
  99. onClickLeft() {
  100. this.$router.go(-1);
  101. },
  102. },
  103. };
  104. </script>
  105. <style lang="scss" scoped>
  106. .perfectStoreSign {
  107. width: 100%;
  108. height: 100%;
  109. display: flex;
  110. flex-direction: column;
  111. overflow: hidden;
  112. .content {
  113. flex: 1;
  114. overflow-y: auto;
  115. padding: 10px 15px;
  116. .contentBox {
  117. width: 100%;
  118. height: 100%;
  119. background: #fff;
  120. // padding-top: 15px;
  121. }
  122. .specialTask {
  123. display: flex;
  124. flex-direction: row;
  125. padding: 10px;
  126. font-size: 16px;
  127. justify-content: space-between;
  128. background: #e5faff;
  129. .specialTaskLeft {
  130. display: flex;
  131. flex-direction: row;
  132. width: 100%;
  133. }
  134. .SignText {
  135. width: 80px;
  136. font-weight: 600;
  137. }
  138. .signContent {
  139. flex: 1;
  140. display: flex;
  141. flex-direction: row;
  142. margin: 0 8px;
  143. .icon {
  144. padding-top: 2px;
  145. margin-right: 5px;
  146. }
  147. }
  148. }
  149. .shopSignButton {
  150. width: 56px;
  151. button {
  152. width: 55px;
  153. height: 28px;
  154. padding: 0;
  155. font-size: 12px;
  156. }
  157. }
  158. .shopSignImg {
  159. .text {
  160. font-size: 16px;
  161. font-weight: 600;
  162. padding: 15px 10px;
  163. }
  164. .imgBox {
  165. width: 100%;
  166. text-align: center;
  167. img {
  168. width: 60%;
  169. }
  170. }
  171. }
  172. }
  173. }
  174. </style>
  175. <style lang="scss">
  176. .perfectStoreSign {
  177. .van-button--danger {
  178. background-color: #ee0a24 !important;
  179. border: 1px solid #ee0a24 !important;
  180. }
  181. }
  182. </style>