| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <template>
- <div class="perfectStoreSign">
- <van-nav-bar class="navBar" title="AI 店招识别" left-arrow @click-left="onClickLeft" />
- <div class="content">
- <div class="contentBox">
- <div class="shopSign specialTask" v-if="shopSignDetail && shopSignDetail.qualifiedState">
- <div class="specialTaskLeft">
- <div class="SignText">识别结果:</div>
- <div class="signContent">
- <div class="icon">
- <van-icon
- name="checked"
- color="#07c160"
- v-if="shopSignDetail.qualifiedState == '1'" />
- <van-icon name="warning" color="#ee0a24" v-else />
- </div>
- <div
- v-if="shopSignDetail.qualifiedState != null"
- :style="{ color: shopSignDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
- {{
- shopSignDetail.qualifiedState == '1'
- ? '店招完整,授权号正确'
- : shopSignDetail.unqualifiedReason
- }}
- </div>
- </div>
- <div class="shopSignButton">
- <div class="" style="display: flex">
- <van-button round type="primary" v-if="shopSignDetail.qualifiedState == '1'"
- >通过</van-button
- >
- <van-button round type="danger" v-if="shopSignDetail.qualifiedState == '0'"
- >不通过</van-button
- >
- </div>
- </div>
- </div>
- </div>
- <div class="shopSignImg">
- <div class="text">店招照片</div>
- <div class="imgBox">
- <img
- v-if="shopSignDetail && shopSignDetail.qualifiedState"
- :src="shopSignDetail.fileUrl"
- @click="previewsImg(shopSignDetail.fileUrl)" />
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import deleteUploadImg from '@/components/deleteUploadImg';
- import { getVisitsDetailPerfectStore } from '@/api/index';
- import { ImagePreview } from 'vant';
- export default {
- name: 'perfectStoreSign',
- components: { deleteUploadImg },
- data() {
- return {
- visitsId: '',
- detail: null,
- shopSignDetail: null,
- };
- },
- activated() {
- this.visitsId = this.$route.query.visitId || '';
- this.detail = null;
- this.getVisitsDetailFn();
- },
- methods: {
- getVisitsDetailFn() {
- this.shopSignDetail = null;
- getVisitsDetailPerfectStore({ visitsId: this.visitsId })
- .then((res) => {
- this.toastLoading().clear();
- if (res.code == 200) {
- this.detail = res.data;
- let shopSignArr = this.detail.sfaTaskList.filter((val) => val.photoIdentifyType == '1');
- if (shopSignArr.length) this.shopSignDetail = shopSignArr[0];
- } else {
- this.$dialog.alert({
- message: res.msg,
- });
- }
- })
- .catch((err) => {
- this.$dialog.alert({
- message: err.msg,
- });
- });
- },
- previewsImg(url) {
- ImagePreview([url]);
- },
- onClickLeft() {
- this.$router.go(-1);
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .perfectStoreSign {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .content {
- flex: 1;
- overflow-y: auto;
- padding: 10px 15px;
- .contentBox {
- width: 100%;
- height: 100%;
- background: #fff;
- // padding-top: 15px;
- }
- .specialTask {
- display: flex;
- flex-direction: row;
- padding: 10px;
- font-size: 16px;
- justify-content: space-between;
- background: #e5faff;
- .specialTaskLeft {
- display: flex;
- flex-direction: row;
- width: 100%;
- }
- .SignText {
- width: 80px;
- font-weight: 600;
- }
- .signContent {
- flex: 1;
- display: flex;
- flex-direction: row;
- margin: 0 8px;
- .icon {
- padding-top: 2px;
- margin-right: 5px;
- }
- }
- }
- .shopSignButton {
- width: 56px;
- button {
- width: 55px;
- height: 28px;
- padding: 0;
- font-size: 12px;
- }
- }
- .shopSignImg {
- .text {
- font-size: 16px;
- font-weight: 600;
- padding: 15px 10px;
- }
- .imgBox {
- width: 100%;
- text-align: center;
- img {
- width: 60%;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .perfectStoreSign {
- .van-button--danger {
- background-color: #ee0a24 !important;
- border: 1px solid #ee0a24 !important;
- }
- }
- </style>
|