zhangzengfei
2022-10-14 c868f26356ee88f88a316c72e5aa17ef8060822e
src/views/search/components/imgDown.vue
@@ -2,8 +2,8 @@
  <div class="imgBox">
    <img :src="'/httpImage/' + url" class="cursor-pointer" v-if="isPreview" preview />
    <img :src="'/httpImage/' + url" v-if="!isPreview" />
    <el-button class="btn" @click="downloadIamge('/httpImage/' + url)">
      <i class="iconfont iconxiazai"></i>
    <el-button class="btn" @click="downloadIamge('/httpImage/' + url)" v-show="isAdmin">
      <i class="iconfont icon-xiazai_10"></i>
    </el-button>
  </div>
</template>
@@ -20,6 +20,12 @@
      type: Boolean
    }
  },
  computed: {
    isAdmin() {
      let userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
      return userInfo.username == "Administrator"
    }
  },
  methods: {
    downloadIamge(url) {
      this.$notify.info({