南昌市物联网技防平台-前端
zengh
2021-03-26 ed9f239c21cf3e4b5f68b0c6ca0cdb6a8a3ec41a
src/views/parcel/parcel.vue
@@ -33,17 +33,14 @@
      
    </avue-crud>
      <el-dialog
      height="30%"
      top="10%"
      :visible.sync="dialogTableVisible"
      :append-to-body="true"
      :close-on-click-modal="false"
      @opened="parcelConversation = true"
      @close="(parcelConversation = false), (oldParcelSatart = false)" >
      <div>
        <el-image  style="width: 60%;height:40%" :src="'data:image/png;base64,'+imgUrl"  :preview-src-list="'data:image/png;base64,'+imgUrl">
        <el-image  :src="'data:image/png;base64,'+imgUrl"  :preview-src-list="'data:image/png;base64,'+imgUrl">
        </el-image>
        <!-- <img v-image-preview src="'data:image/png;base64,'+imgUrl"/> -->
      </div>
    </el-dialog>
    
@@ -53,10 +50,6 @@
<script>
  import {getList, getDetail, getParcelPic} from "@/api/parcel/parcel";
  import {mapGetters} from "vuex";
//   import VueDirectiveImagePreviewer from 'vue-directive-image-previewer';
//   import 'vue-directive-image-previewer/dist/assets/style.css';
// import Vue from 'vue';
//   Vue.use(VueDirectiveImagePreviewer);
  export default {
    data() {
@@ -116,6 +109,21 @@
              prop: "imgUrl",
              hide:true
            },
            // {
            //   label: '包裹图片',
            //   prop: 'imgUrl',
            //   type: 'upload',
            //   width: 300,
            //   listType: 'data:image/png;base64',
            //   span: 24,
            //   propsHttp: {
            //     res: 'data'
            //   },
            //   canvasOption: {
            //     text: 'avue',
            //     ratio: 0.1
            //   }
            // },
            {
              label: "安检时间",
              prop: "samplingTime",
@@ -238,7 +246,6 @@
        this.onLoad(this.page, this.query);
      },
      onLoad(page, params = {}) {
        debugger;
        const { dateTime } = this.query;
        let values = {
          ...params,
@@ -294,11 +301,10 @@
        });
      },
      handleParcelPic(row) {
        console.log(row.imgUrl);
        getParcelPic(row.imgUrl).then(res => {
            this.imgUrl = res.data.data.imgBase64;
          });
        this.dialogTableVisible = true;
          this.dialogTableVisible=true;
      }
    }
  };