|
@@ -32,7 +32,20 @@
|
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
|
<el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
|
|
|
<el-table-column prop="maintainType" label="保养方案" sortable></el-table-column>
|
|
|
- <el-table-column prop="fileName" label="保养照片" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="fileName" label="保养照片" width="200" sortable>
|
|
|
+ <template slot-scope="scope" v-if="scope.row.fileUrl != null">
|
|
|
+ <a
|
|
|
+ style="color: #409EFF; cursor: pointer; text-decoration: none;"
|
|
|
+ :href="scope.row.fileUrl"
|
|
|
+ :download="scope.row.fileName"
|
|
|
+ >
|
|
|
+ <!-- 大图加载 -->
|
|
|
+ <div class="demo-image__preview">
|
|
|
+ <el-image style="width: 100px; height: 100px" :src="scope.row.fileUrl" :preview-src-list="scope.row.fileUrl"></el-image>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="indate" label="关闭时间" width="200" sortable></el-table-column>
|
|
|
</el-table>
|
|
|
|
|
@@ -192,6 +205,7 @@ export default {
|
|
|
backToDetection() {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
+ //暂未用到的上传格式和大小限制
|
|
|
beforeUpload(file) {
|
|
|
const isJPG = file.type === "image/png";
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
@@ -263,7 +277,6 @@ export default {
|
|
|
maintainConfirm() {
|
|
|
if (this.$refs.upload.uploadFiles.length == 1) {
|
|
|
this.$refs.upload.submit();
|
|
|
- this.$refs.upload.clearFiles();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: "必须上传照片",
|
|
@@ -292,6 +305,9 @@ export default {
|
|
|
message: "保养完成",
|
|
|
type: "success"
|
|
|
});
|
|
|
+ this.maintenanceFormVisible = false;
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ this.getList();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|