230320a303 há 1 ano atrás
pai
commit
cdf0475543

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/index.html


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/chunk-6ca808bc.7ac35520.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/chunk-a788965c.42711498.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.38af729f.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.4cc4475c.js


+ 0 - 0
dist/static/js/chunk-060a14dc.fd5bfdd4.js → dist/static/js/chunk-060a14dc.ecf61619.js


+ 0 - 0
dist/static/js/chunk-2e841d5e.4bb4f3bd.js → dist/static/js/chunk-2e841d5e.3ee100e7.js


+ 0 - 0
dist/static/js/chunk-36ddeec9.048b5c1d.js → dist/static/js/chunk-36ddeec9.9b2e85e2.js


+ 0 - 0
dist/static/js/chunk-67a054c9.59c230af.js → dist/static/js/chunk-67a054c9.d4739166.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-6ca808bc.6d6f6d0e.js


+ 0 - 0
dist/static/js/chunk-7441b538.989e4a1d.js → dist/static/js/chunk-7441b538.4b8db5f1.js


+ 0 - 0
dist/static/js/chunk-74687d12.44c42570.js → dist/static/js/chunk-74687d12.f302564b.js


+ 0 - 0
dist/static/js/chunk-77c90766.8a68f61c.js → dist/static/js/chunk-77c90766.75fa2822.js


+ 0 - 0
dist/static/js/chunk-7899c9a7.bf79eb82.js → dist/static/js/chunk-7899c9a7.f6adcc68.js


+ 0 - 0
dist/static/js/chunk-9fbf1e76.f0b2202e.js → dist/static/js/chunk-9fbf1e76.0afbd83d.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-a788965c.281d5fba.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-e1f5b440.1c8977ed.js


+ 0 - 0
dist/static/js/chunk-faf6ea92.9d1cbfe6.js → dist/static/js/chunk-faf6ea92.ae6af3cc.js


+ 0 - 0
dist/static/js/chunk-libs.d01175b0.js → dist/static/js/chunk-libs.73539fe1.js


+ 1 - 0
package.json

@@ -22,6 +22,7 @@
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
+    "qrcode": "^1.5.3",
     "vue": "2.6.10",
     "vue-amap": "^0.5.10",
     "vue-cropper": "^0.5.6",

+ 110 - 0
src/views/activity/components/popup/Qrcode.vue

@@ -0,0 +1,110 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="'活动二维码'"
+      :fullscreen="false"
+      width="400px"
+      custom-class="xl-dialog"
+      center
+    >
+      <img :src="curImgUrl" class="scoped-img">
+      <base-form ref="ruleForm" :data="formData" :is-inline="false" label-width="100px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">下载</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+var QRCode = require('qrcode')
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      curImgUrl: '',
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        const that = this
+        QRCode.toDataURL(that.curObj.code, function (err, url) {
+          that.curImgUrl = url
+        })
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      let params = { ...this.curObj }
+      this.formData = [
+      ]
+      this.setDefaultValue(params)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        const cObj = this.curObj
+        let Link = document.createElement("a")
+        Link.download = `${cObj.estate_name}${cObj.remark}-活动签到二维码`
+        Link.href = this.curImgUrl
+        Link.click()
+        Link.remove()
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+::v-deep .img-upload {
+  height: 40px;
+  overflow: hidden;
+  .el-upload {
+    height: 35px;
+  }
+  .icon {
+    width: 110px;
+    height: 35px;
+    line-height: 35px;
+    font-size: 20px;
+  }
+  .img {
+    width: 110px;
+    height: 35px;
+  }
+}
+
+
+
+.scoped-img {
+  width: 360px;
+  height: 360px;
+}
+
+</style>

+ 23 - 0
src/views/activity/index.vue

@@ -21,18 +21,25 @@
       :curObj="curObj"
       @close="closePopup"
     />
+    <cur-qrcode
+      :isShow="isQrcodeShow"
+      :curObj="curObj"
+      @close="closeQrcodePopup"
+    />
   </div>
 </template>
 <script>
 import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Index'
 import PopupEdit from './components/popup/IndexEdit'
+import CurQrcode from './components/popup/Qrcode'
 import baseTable from '_m/baseTable.js'
 export default {
   name: 'index',
   components: {
     SearchForm,
     PopupEdit,
+    CurQrcode,
   },
   provide() {
     return {
@@ -42,6 +49,7 @@ export default {
   mixins: [baseTable],
   data() {
     return {
+      isQrcodeShow: false,
       apiStr: 'other.admactivitylist',
       searchForm: null,
       isDtlShow: false,
@@ -67,6 +75,7 @@ export default {
           [
             { label: '统计', func: this.linkDtl, btnType: 'success' },
             { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '二维码', func: this.openQrcodePopup, btnType: 'info' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }
@@ -100,6 +109,20 @@ export default {
       if (obj) {
         this.fetchData() 
       }
+    },
+    openQrcodePopup(row) {
+      if (row && row.code) {
+        this.curObj = row
+        this.isQrcodeShow = true
+      } else {
+        this.$msg('未找到二维码')
+      }
+    },
+    closeQrcodePopup(obj) {
+      this.isQrcodeShow = false
+      if (obj) {
+        this.fetchData() 
+      }
     }
   }
 }

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff