| | |
| | | > |
| | | <div class="box" id="print-content"> |
| | | <div class="box_item" v-for="(item, index) in list" :key="index"> |
| | | <div class="box_item_title">微信</div> |
| | | <!-- <div class="box_item_title">微信</div>--> |
| | | <div class="box_item_qr"> |
| | | <img :src="item.imgfullurl" /> |
| | | <span>{{item.siteId}}/{{item.code}}</span> |
| | | <!-- <span>{{item.siteId}}/{{item.code}}</span>--> |
| | | </div> |
| | | <div class="box_item_footer">扫码取车</div> |
| | | <!-- <div class="box_item_footer">扫码取车</div>--> |
| | | </div> |
| | | </div> |
| | | <template v-slot:footer> |
| | | <el-button type="primary" v-print="'#print-content'">打印</el-button> |
| | | <!-- <el-button type="primary" v-print="'#print-content'">打印</el-button>--> |
| | | <el-button type="primary" :loading="isWorking.export" v-if="isLoading==false" @click="exportImages">打包下载</el-button> |
| | | <el-button @click="close">返回</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { qrcodeList } from '@/api/business/sites' |
| | | import { qrcodeList,exportImages } from '@/api/business/sites' |
| | | export default { |
| | | name: 'QRcode', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | siteId:'', |
| | | isLoading : true, |
| | | list: [] |
| | | } |
| | | }, |
| | |
| | | this.list = [] |
| | | this.title = title |
| | | this.visible = true |
| | | this.siteId = id |
| | | var that = this |
| | | qrcodeList(id) |
| | | .then(res => { |
| | | that.isLoading = false |
| | | this.list = res |
| | | }) |
| | | }, |
| | | close () { |
| | | this.visible = false |
| | | }, |
| | | exportImages () { |
| | | exportImages( this.siteId) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.export = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | flex-wrap: wrap; |
| | | .box_item { |
| | | width: 152px; |
| | | height: 228px; |
| | | height: auto; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | |
| | | justify-content: space-between; |
| | | img { |
| | | width: 126px; |
| | | height: 126px; |
| | | height: 146px; |
| | | } |
| | | span { |
| | | font-size: 13px; |