no message
							parent
							
								
									31e1990fc5
								
							
						
					
					
						commit
						bc06ef3de2
					
				| 
						 | 
				
			
			@ -78,6 +78,12 @@
 | 
			
		|||
              width="200"
 | 
			
		||||
              trigger="hover"
 | 
			
		||||
            >
 | 
			
		||||
              <vue-qrcode
 | 
			
		||||
                :value="getQrContent(baseApi + scope.row.downloadUrl)"
 | 
			
		||||
                :options="qrOptions"
 | 
			
		||||
                tag="img"
 | 
			
		||||
                class="qr-code"
 | 
			
		||||
              />
 | 
			
		||||
              <a
 | 
			
		||||
                slot="reference"
 | 
			
		||||
                :href="baseApi + scope.row.downloadUrl "
 | 
			
		||||
| 
						 | 
				
			
			@ -120,10 +126,11 @@ import udOperation from '@crud/UD.operation'
 | 
			
		|||
import pagination from '@crud/Pagination'
 | 
			
		||||
import { mapGetters } from 'vuex'
 | 
			
		||||
import { getToken } from '@/utils/auth'
 | 
			
		||||
import VueQrcode from '@chenfengyuan/vue-qrcode'
 | 
			
		||||
const defaultForm = { id: null, name: '', versionCode: '', versionName: '', modifyContent: '' }
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'AppUpdate',
 | 
			
		||||
  components: { pagination, crudOperation, udOperation },
 | 
			
		||||
  components: { VueQrcode, pagination, crudOperation, udOperation },
 | 
			
		||||
  mixins: [presenter(), header(), form(defaultForm), crud()],
 | 
			
		||||
  cruds() {
 | 
			
		||||
    return CRUD({ title: 'app_update', url: 'api/sysAppUpdate', idField: 'id', sort: 'id,desc', crudMethod: { ...crudSysAppUpdate }})
 | 
			
		||||
| 
						 | 
				
			
			@ -131,6 +138,11 @@ export default {
 | 
			
		|||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      headers: { 'Authorization': getToken() },
 | 
			
		||||
      qrOptions: {
 | 
			
		||||
        width: 160,          // 二维码宽度
 | 
			
		||||
        margin: 0,          // 边距
 | 
			
		||||
        errorCorrectionLevel: 'H' // 容错级别(高)
 | 
			
		||||
      },
 | 
			
		||||
      permission: {
 | 
			
		||||
        edit: ['admin', 'sysAppUpdate:edit'],
 | 
			
		||||
        del: ['admin', 'sysAppUpdate:del']
 | 
			
		||||
| 
						 | 
				
			
			@ -159,6 +171,13 @@ export default {
 | 
			
		|||
    [CRUD.HOOK.beforeRefresh]() {
 | 
			
		||||
      return true
 | 
			
		||||
    },
 | 
			
		||||
    getQrContent(location) {
 | 
			
		||||
      // 自定义二维码内容,这里用箱种和品番组合
 | 
			
		||||
      return `${location}`
 | 
			
		||||
 | 
			
		||||
      // 如果只需要箱种,可以直接用:
 | 
			
		||||
      // return location.boxType;
 | 
			
		||||
    },
 | 
			
		||||
    upload() {
 | 
			
		||||
      this.$refs.upload.submit()
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue