AIImageDetail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="AIImageDetail">
  3. <van-nav-bar class="navBar" title="异常反馈" left-arrow @click-left="onClickLeft">
  4. </van-nav-bar>
  5. <div class="message" v-if="data">
  6. <div class="storeTitle">
  7. <div class="storeName">{{ data.storeName }}</div>
  8. <div class="storeCode">
  9. (<span style="color: #0057ba">{{ data.storeCode }}</span
  10. >)
  11. </div>
  12. </div>
  13. <div class="item">
  14. <div class="label">门店类型:</div>
  15. <div class="value">{{ data.storeCategoryName }}</div>
  16. </div>
  17. <div class="item">
  18. <div class="label">地址:</div>
  19. <div class="value">{{ data.addressLine }}</div>
  20. </div>
  21. <div class="item">
  22. <div class="label">拜访人:</div>
  23. <div class="value">{{ data.visitUserNickName }}</div>
  24. </div>
  25. <div class="item">
  26. <div class="label">拜访时间:</div>
  27. <div class="value">{{ data.approveTime }}</div>
  28. </div>
  29. <div class="item">
  30. <div class="label">拍摄类型:</div>
  31. <div class="value">{{ data.identifyType | filterType }}</div>
  32. </div>
  33. <div class="item">
  34. <div class="label">识别结果:</div>
  35. <div class="value">{{ data.cheatType }}</div>
  36. </div>
  37. <p>业务员反馈AI识别不正确:</p>
  38. <div class="item">
  39. <van-image
  40. width="100%"
  41. height="360"
  42. :src="data.fileUrl"
  43. @click="previewImgs(data.fileUrl)" />
  44. </div>
  45. </div>
  46. <p class="titleText">请主管了解情况后回复原因及解决方案</p>
  47. <div class="feedbackReason">
  48. <div class="result">
  49. <div class="title">
  50. <span style="color: red">*</span>
  51. <span>AI识别是否正确</span>
  52. </div>
  53. <van-radio-group v-model="AIResult">
  54. <van-radio name="1">正确</van-radio>
  55. <van-radio name="0">不正确</van-radio>
  56. </van-radio-group>
  57. </div>
  58. <div class="cause">
  59. <div class="title">
  60. <span style="color: red">*</span>
  61. <span>{{ causeTitle }}</span>
  62. </div>
  63. <van-field
  64. v-model="causeMessage"
  65. rows="1"
  66. autosize
  67. type="textarea"
  68. :placeholder="'请输入' + causeTitle" />
  69. </div>
  70. </div>
  71. <div class="confirmBtn"><van-button type="info" @click="confirm">提交</van-button></div>
  72. </div>
  73. </template>
  74. <script>
  75. import { ImagePreview } from 'vant';
  76. import { getPhotoApproveDetail, savePhotoApprove } from '@/api/AIImage';
  77. export default {
  78. name: 'AIImageDetail',
  79. data() {
  80. return {
  81. data: null,
  82. photoApproveId: null,
  83. AIResult: '1',
  84. causeTitle: '',
  85. causeMessage: '',
  86. };
  87. },
  88. watch: {
  89. AIResult: {
  90. handler(val) {
  91. if (val == 1) {
  92. this.causeTitle = '原因及解决方案';
  93. } else {
  94. this.causeTitle = '反馈不准确原因';
  95. }
  96. this.causeMessage = '';
  97. },
  98. immediate: true,
  99. },
  100. },
  101. filters: {
  102. filterType(val) {
  103. if (val == 1) {
  104. return '店招内容识别';
  105. } else if (val == 2) {
  106. return '门店代码识别';
  107. } else if (val == 3) {
  108. return '调色机识别';
  109. } else if (val == 4) {
  110. return '更换店招';
  111. }
  112. },
  113. },
  114. activated() {
  115. this.photoApproveId = this.$route.query.photoApproveId;
  116. this.getDeytail();
  117. },
  118. mounted() {},
  119. methods: {
  120. getDeytail() {
  121. this.toastLoading(0, '加载中...', true);
  122. getPhotoApproveDetail({ photoApproveId: this.photoApproveId }).then((res) => {
  123. this.toastLoading().clear();
  124. if (res.code == 200) {
  125. this.data = res.data;
  126. this.$dialog
  127. .confirm({
  128. title: '系统提示',
  129. message:
  130. res.data.approveTime +
  131. '时间已反馈该店拜访照异常原因及解决方案,此次拜访照仍异常,请及时跟进',
  132. confirmButtonText: '确定',
  133. showCancelButton: false,
  134. })
  135. .then(() => {});
  136. }
  137. });
  138. },
  139. previewImgs(val) {
  140. ImagePreview([val]);
  141. },
  142. confirm() {
  143. if (!this.causeMessage) {
  144. this.$toast('请输入' + this.causeTitle);
  145. return;
  146. }
  147. savePhotoApprove({
  148. photoApproveId: this.photoApproveId, // long 主键
  149. resultCorrect: this.AIResult, // string AI识别是否正确: 1 正确 0不正确
  150. reasonsSolutions: this.AIResult == '1' ? this.causeMessage : '', // string 原因及解决方案
  151. feedbackError: this.AIResult == '2' ? this.causeMessage : '', // string 反馈AI识别不正确
  152. }).then((res) => {
  153. if (res.code == 200) {
  154. this.$toast('提交成功');
  155. } else {
  156. this.$toast('提交失败');
  157. }
  158. });
  159. },
  160. onClickLeft() {
  161. this.$router.go(-1);
  162. },
  163. },
  164. };
  165. </script>
  166. <style lang="scss" scoped>
  167. .AIImageDetail {
  168. .message {
  169. padding: 10px;
  170. background: #fff;
  171. .storeTitle {
  172. display: flex;
  173. font-size: 16px;
  174. font-weight: 600;
  175. padding: 5px 0;
  176. }
  177. .item {
  178. display: flex;
  179. font-size: 14px;
  180. padding: 3px 0;
  181. .label {
  182. width: 80px;
  183. text-align: right;
  184. }
  185. .value {
  186. flex: 1;
  187. }
  188. }
  189. }
  190. .titleText {
  191. padding: 10px;
  192. font-size: 16px;
  193. font-weight: 600;
  194. margin: 0;
  195. }
  196. .feedbackReason {
  197. padding: 10px;
  198. background: #fff;
  199. font-size: 16px;
  200. .title {
  201. padding: 8px 0;
  202. }
  203. .van-radio {
  204. padding: 5px 0 5px 10px;
  205. }
  206. }
  207. .confirmBtn {
  208. position: sticky;
  209. bottom: 0;
  210. padding-top: 20px;
  211. button {
  212. width: 100%;
  213. }
  214. }
  215. }
  216. </style>