perfectStoreSign.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 { getVisitsDetailPerfectStore } 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. getVisitsDetailPerfectStore({ visitsId: this.visitsId })
  75. .then((res) => {
  76. this.toastLoading().clear();
  77. if (res.code == 200) {
  78. this.detail = res.data;
  79. let shopSignArr = this.detail.sfaTaskList.filter((val) => val.photoIdentifyType == '1');
  80. if (shopSignArr.length) this.shopSignDetail = shopSignArr[0];
  81. } else {
  82. this.$dialog.alert({
  83. message: res.msg,
  84. });
  85. }
  86. })
  87. .catch((err) => {
  88. this.$dialog.alert({
  89. message: err.msg,
  90. });
  91. });
  92. },
  93. previewsImg(url) {
  94. ImagePreview([url]);
  95. },
  96. onClickLeft() {
  97. this.$router.go(-1);
  98. },
  99. },
  100. };
  101. </script>
  102. <style lang="scss" scoped>
  103. .perfectStoreSign {
  104. width: 100%;
  105. height: 100%;
  106. display: flex;
  107. flex-direction: column;
  108. overflow: hidden;
  109. .content {
  110. flex: 1;
  111. overflow-y: auto;
  112. padding: 10px 15px;
  113. .contentBox {
  114. width: 100%;
  115. height: 100%;
  116. background: #fff;
  117. // padding-top: 15px;
  118. }
  119. .specialTask {
  120. display: flex;
  121. flex-direction: row;
  122. padding: 10px;
  123. font-size: 16px;
  124. justify-content: space-between;
  125. background: #e5faff;
  126. .specialTaskLeft {
  127. display: flex;
  128. flex-direction: row;
  129. width: 100%;
  130. }
  131. .SignText {
  132. width: 80px;
  133. font-weight: 600;
  134. }
  135. .signContent {
  136. flex: 1;
  137. display: flex;
  138. flex-direction: row;
  139. margin: 0 8px;
  140. .icon {
  141. padding-top: 2px;
  142. margin-right: 5px;
  143. }
  144. }
  145. }
  146. .shopSignButton {
  147. width: 56px;
  148. button {
  149. width: 55px;
  150. height: 28px;
  151. padding: 0;
  152. font-size: 12px;
  153. }
  154. }
  155. .shopSignImg {
  156. .text {
  157. font-size: 16px;
  158. font-weight: 600;
  159. padding: 15px 10px;
  160. }
  161. .imgBox {
  162. width: 100%;
  163. text-align: center;
  164. img {
  165. width: 60%;
  166. }
  167. }
  168. }
  169. }
  170. }
  171. </style>
  172. <style lang="scss">
  173. .perfectStoreSign {
  174. .van-button--danger {
  175. background-color: #ee0a24 !important;
  176. border: 1px solid #ee0a24 !important;
  177. }
  178. }
  179. </style>