Commit 7b121ea3 authored by wuqinghua's avatar wuqinghua

2022-3-25 吴卿华

parent 1b2c9635
...@@ -5,7 +5,6 @@ import java.util.List; ...@@ -5,7 +5,6 @@ import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig; import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.core.domain.entity.SysUser; import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
ref="upload" ref="upload"
> >
<!-- 上传按钮 --> <!-- 上传按钮 -->
<el-button plain type="primary">选取文件</el-button> <el-button plain type="primary" @click="deleteFile()">选取文件</el-button>
<!--<i class="el-icon-plus"></i>--> <!--<i class="el-icon-plus"></i>-->
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
...@@ -109,6 +109,11 @@ ...@@ -109,6 +109,11 @@
}; };
}, },
computed: { computed: {
deleteFile(){
this.fileList=[]
this.addShow = false;
this.$emit("remove", 1);
},
// 是否显示提示 // 是否显示提示
showTip() { showTip() {
return this.isShowTip && (this.fileType || this.fileSize); return this.isShowTip && (this.fileType || this.fileSize);
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
:on-error="handleUploadError" :on-error="handleUploadError"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:on-success="handleUploadSuccess" :on-success="handleUploadSuccess"
:on-remove="handleRemove"
:on-preview="handleFileClick" :on-preview="handleFileClick"
:on-change="fileChange" :on-change="fileChange"
:show-file-list="true" :show-file-list="true"
:on-remove="handleRemove"
:headers="headers" :headers="headers"
class="upload-file-uploader" class="upload-file-uploader"
:class="{ hide: fileArr.length>0 ||addShow }" :class="{ hide: fileArr.length>0 ||addShow }"
ref="upload" ref="upload"
> >
<!-- 上传按钮 --> <!-- 上传按钮 -->
<el-button plain type="primary">选取文件</el-button> <el-button plain type="primary" @click="deleteFile()">选取文件</el-button>
<!--<i class="el-icon-plus"></i>--> <!--<i class="el-icon-plus"></i>-->
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
...@@ -109,6 +109,11 @@ ...@@ -109,6 +109,11 @@
}; };
}, },
computed: { computed: {
deleteFile(){
this.fileList=[]
this.addShow = false;
this.$emit("remove", 1);
},
// 是否显示提示 // 是否显示提示
showTip() { showTip() {
return this.isShowTip && (this.fileType || this.fileSize); return this.isShowTip && (this.fileType || this.fileSize);
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<!-- <el-table-column label="设备id" align="center" prop="deviceId" />--> <!-- <el-table-column label="设备id" align="center" prop="deviceId" />-->
<el-table-column label="照片" align="center" > <el-table-column label="照片" align="center" >
<template scope="List"> <template scope="List">
<img :src="List.row.iconUrl" width="100px"> <img :src="List.row.iconUrl" width="100px">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" /> <el-table-column label="设备名称" align="center" prop="deviceName" />
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<span <span
class="dbtn" class="dbtn"
@click="checkFile(List.row.iconUrl)" @click="checkFile(List.row.iconUrl)"
v-if="List.row.iconUrl != ''" v-if="List.row.iconUrl"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<span <span
class="dbtn" class="dbtn"
@click="checkFile(List.row.doDusiness)" @click="checkFile(List.row.doDusiness)"
v-if="List.row.doDusiness != ''" v-if="List.row.doDusiness"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<span <span
class="dbtn" class="dbtn"
@click="checkFile(List.row.pictureAddress)" @click="checkFile(List.row.pictureAddress)"
v-if="List.row.pictureAddress != ''" v-if="List.row.pictureAddress"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<span <span
class="dbtn" class="dbtn"
@click="checkFile(List.row.avatarAddress)" @click="checkFile(List.row.avatarAddress)"
v-if="List.row.avatarAddress != ''" v-if="List.row.avatarAddress"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment