Browse Source

二维码

DESKTOP-B78GIPM\admin 2 years ago
parent
commit
3b04f87425
1 changed files with 18 additions and 0 deletions
  1. 18 0
      src/views/settings/components/pos/posTable.vue

+ 18 - 0
src/views/settings/components/pos/posTable.vue

@@ -37,6 +37,8 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button :disabled="selectedRowKeys.length == 0" type="primary">下载二维码</a-button>
+      <a-button @click="batchDel" :disabled="selectedRowKeys.length == 0" icon="stop" type="danger" >批量删除</a-button>
     </div>
 
     <!-- table区域-begin -->
@@ -104,6 +106,9 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
+
+          <a @click="QRcode(record)">二维码</a>
+          <a-divider type="vertical" />
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
@@ -117,6 +122,12 @@
       </a-table>
     </div>
 
+    <a-modal title="二维码" :visible="QRcodeVisible" @cancel="QRcodeVisible = false" @ok="QRcodeVisible = false">
+      <div style="text-align:center;">
+        <a-avatar :size="264" shape="square" :src="selectQRcode" alt="暂无二维码" />
+      </div>
+    </a-modal>
+
     <pos-table-modal ref="modalForm" @ok="modalFormOk"></pos-table-modal>
   </a-card>
 </template>
@@ -134,6 +145,8 @@ export default {
   },
   data() {
     return {
+      QRcodeVisible: false,
+      selectQRcode: "",
       queryParam: {},
       // 分页参数
       ipagination: {
@@ -238,6 +251,11 @@ export default {
     //   param.pageSize = this.ipagination.pageSize;
     //   return filterObj(param);
     // },
+    QRcode(record){
+      console.log(record.qrCode);
+      this.selectQRcode = record.qrCode;
+      this.QRcodeVisible = true;
+    },
     getAvatarView: function (avatar) {
       return getFileAccessHttpUrl(avatar);
     },