zcy 3 éve
szülő
commit
55c2742065

+ 16 - 0
src/views/security/stand/index.vue

@@ -100,6 +100,10 @@
       >
 
         <span slot="action" slot-scope="text, record">
+          <a-button size="small" type="primary" @click="perview(record)">
+            二维码
+          </a-button>
+          <a-divider type="vertical" />
           <a-button size="small" type="primary" @click="handleEdit(record)">
             编辑
           </a-button>
@@ -112,6 +116,9 @@
         </span>
       </a-table>
       <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
+      <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+        <img alt="example" style="width: 100%" :src="previewImage">
+      </a-modal>
     </div>
     <!-- table区域-end -->
     <!-- 表单区域 -->
@@ -131,6 +138,8 @@ export default {
   data() {
     return {
       // 查询条件
+      previewVisible: false,
+      previewImage: '',
       queryParam: {},
       // 表头
       columns: columns(this),
@@ -148,6 +157,13 @@ export default {
     this.loadTree()
   },
   methods: {
+    handleCancel() {
+      this.previewVisible = false
+    },
+    perview(record) {
+      this.previewImage = record.qcodeUrl
+      this.previewVisible = true
+    },
     loadTree() {
       this.treeData = []
       getAction(this.url.tree).then((res) => {

+ 1 - 1
src/views/security/stand/indexColumns.js

@@ -54,7 +54,7 @@ function columns(vm) {
     {
       title: '操作',
       dataIndex: 'action',
-      width: 200,
+      width: 250,
       align: 'center',
       slots: { title: 'actionName' },
       scopedSlots: { customRender: 'action' }