南昌市物联网技防平台-前端
shuishen
2021-04-02 b62d491b5cde9253d59dd229e8bb658c9b76e45f
src/views/parcel/parcel.vue
@@ -12,6 +12,7 @@
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @row-click="rowClick"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
@@ -20,7 +21,7 @@
               @refresh-change="refreshChange"
               @on-load="onLoad">
        
      <template slot-scope="{ type, size, row }" slot="menu">
      <!-- <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          v-if="row.imgUrl != null || row.imgUrl != ''"
@@ -30,7 +31,7 @@
          @click.stop="handleParcelPic(row)"
          >查看包裹图片
        </el-button>
      </template>
      </template> -->
      
    </avue-crud>
    <template>
@@ -68,6 +69,7 @@
        },
        selectionList: [],
        option: {
          menu:false,
          height:'auto',
          calcHeight: 30,
          tip: false,
@@ -230,6 +232,13 @@
        this.onLoad(this.page, params);
        done();
      },
      rowClick(row){
        var that=this;
        getParcelPic(row.imgUrl).then(res => {
            that.imgUrl = res.data.data.imgBase64;
            this.showViewer = true
          });
      },
      selectionChange(list) {
        this.selectionList = list;
      },
@@ -323,14 +332,6 @@
          this.loading = false;
          this.selectionClear();
        });
      },
      handleParcelPic(row) {
        var that=this;
        getParcelPic(row.imgUrl).then(res => {
            that.imgUrl = res.data.data.imgBase64;
            //that.$refs.preview.clickHandler();
            this.showViewer = true
          });
      },
      // 关闭查看器
      closeViewer() {