| | |
| | | <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" |
| | | size="small" show-total show-elevator show-sizer></Page> |
| | | </Row> |
| | | |
| | | <Modal |
| | | v-model="showGeneralQrCode" |
| | | title="二维码" |
| | | width="800" |
| | | :mask-closable="false" |
| | | :loading="codeLoading" |
| | | > |
| | | <vue-qr |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | | :size="150" |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | </Modal> |
| | | |
| | | </Card> |
| | | </div> |
| | | </template> |
| | |
| | | enableBrand, |
| | | shopAudit, |
| | | } from "@/api/shops"; |
| | | import vueQr from "vue-qr"; |
| | | export default { |
| | | components:{ |
| | | "vue-qr": vueQr, |
| | | }, |
| | | name: "shop", |
| | | data() { |
| | | return { |
| | | QRCodeUrl:"", |
| | | showGeneralQrCode:false, |
| | | codeLoading:false, |
| | | |
| | | codeUrl: this.QRcodeBaseUrl+ '/scanpage/my', |
| | | |
| | | loading: true, // 表单加载状态 |
| | | searchForm: { |
| | | // 搜索框初始化对象 |
| | |
| | | fixed: "right", |
| | | render: (h, params) => { |
| | | let enableOrDisable = ""; |
| | | let qrCodeButton = ""; |
| | | if (params.row.storeDisable == "OPEN") { |
| | | enableOrDisable = h( |
| | | "Button", |
| | |
| | | }, |
| | | }, |
| | | }, |
| | | "关闭" |
| | | "关闭", |
| | | ); |
| | | qrCodeButton = h( |
| | | "Button", |
| | | { |
| | | props: { |
| | | type: "warning", |
| | | size: "small", |
| | | ghost: true |
| | | }, |
| | | style: { |
| | | marginRight: "5px", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.generalQrCode(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "二维码" |
| | | ); |
| | | |
| | | } else if (params.row.storeDisable == "CLOSED") { |
| | | enableOrDisable = h( |
| | | "Button", |
| | |
| | | }, |
| | | "修改" |
| | | ), |
| | | |
| | | ]); |
| | | } |
| | | |
| | |
| | | }, |
| | | "修改" |
| | | ), |
| | | |
| | | enableOrDisable, |
| | | qrCodeButton, |
| | | ]); |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | this.QRCodeUrl = ''; |
| | | }, |
| | | generalQrCode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true |
| | | this.codeLoading = true; |
| | | |
| | | this.QRCodeUrl = this.codeUrl + "?shareStoreId="+ row.id; |
| | | |
| | | }, |
| | | // 回调给父级 |
| | | callback(val) { |
| | | this.$emit("callback", val); |