panhui 4 лет назад
Родитель
Сommit
0a18f1cfa4

+ 1 - 0
src/main/vue/package.json

@@ -23,6 +23,7 @@
     "element-ui": "^2.15.2",
     "ezuikit-js": "^0.2.4",
     "normalize.css": "^8.0.1",
+    "qrcode.vue": "^1",
     "qs": "^6.10.1",
     "resolve-url": "^0.2.1",
     "tinymce": "^5.2.2",

+ 13 - 3
src/main/vue/src/views/PerformanceApplyList.vue

@@ -47,7 +47,7 @@
                     <el-button @click="editRow(row)" type="primary" size="mini" plain v-if="row.status != 'PASS'">
                         编辑
                     </el-button>
-                    <el-button @click="dialogCode = true" type="primary" size="mini" plain v-if="row.status == 'PASS'">
+                    <el-button @click="showCode(row)" type="primary" size="mini" plain v-if="row.status == 'PASS'">
                         二维码
                     </el-button>
                 </template>
@@ -119,7 +119,7 @@
         </el-dialog>
         <el-dialog title="二维码" :visible.sync="dialogCode" width="400px" center>
             <div style="margin-left: 70px;">
-                <img style="width: 200px; heght: 200px;" src="@/assets/code.png" />
+                <qrcode-vue :value="dialogUrl" :size="200" level="H" />
             </div>
         </el-dialog>
         <el-dialog title="自动编排" :visible.sync="dialogArrangement" width="400px" center>
@@ -132,6 +132,7 @@
 <script>
 import { mapState } from 'vuex';
 import pageableTable from '@/mixins/pageableTable';
+import QrcodeVue from 'qrcode.vue';
 
 export default {
     name: 'PerformanceApplyList',
@@ -158,7 +159,8 @@ export default {
             dialogCode: false,
             canSign: false,
             applyId: '',
-            dialogArrangement: false
+            dialogArrangement: false,
+            dialogUrl: ''
         };
     },
     created() {
@@ -166,12 +168,20 @@ export default {
             this.canSign = true;
         }
     },
+    components: {
+        QrcodeVue
+    },
     computed: {
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         }
     },
     methods: {
+        showCode(row) {
+            this.dialogCode = true;
+            this.dialogUrl =
+                'http://wlj.izouma.com/home?performanceId=' + row.performanceId + '&performanceApplyId=' + row.id;
+        },
         statusFormatter(row, column, cellValue, index) {
             let selectedOption = this.statusOptions.find(i => i.value === cellValue);
             if (selectedOption) {

+ 5 - 0
src/main/vue/yarn.lock

@@ -6786,6 +6786,11 @@ q@^1.1.2:
   resolved "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
   integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
 
+qrcode.vue@^1:
+  version "1.7.0"
+  resolved "https://registry.yarnpkg.com/qrcode.vue/-/qrcode.vue-1.7.0.tgz#c54b2934f0650c10d92785d08aaad36c55e0fc56"
+  integrity sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g==
+
 qs@6.7.0:
   version "6.7.0"
   resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"