Browse Source

照片展示优化

刘琳琳 1 month ago
parent
commit
345add2c4a

+ 1 - 1
src/views/audit_authority/index.vue

@@ -32,7 +32,7 @@
             :preview-src-list="[scope.row.userWhitelistLessVO.avatar]"
           >
             <div slot="error" class="image-slot">
-              {{ scope.row.userWhitelistLessVO.avatar ? "加载失败" : "暂无照片" }}
+              {{ scope.row.userWhitelistLessVO.avatar ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>

+ 3 - 3
src/views/enterprise_manage/index.vue

@@ -111,7 +111,7 @@
             :preview-src-list="[scope.row.adminDetail.buildingCode]"
           >
             <div slot="error" class="image-slot">
-              {{ scope.row.adminDetail.buildingCode ? "加载失败" : "暂无照片" }}
+              {{ scope.row.adminDetail.buildingCode ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>
@@ -129,7 +129,7 @@
           >
             <div slot="error" class="image-slot">
               {{
-                scope.row.adminDetail.zfbBuildingCode ? "加载失败" : "暂无照片"
+                scope.row.adminDetail.zfbBuildingCode ? '加载失败' : '暂无照片'
               }}
             </div>
           </el-image>
@@ -188,7 +188,7 @@
           :preview-src-list="[schoolCode]"
         >
           <div slot="error" class="image-slot">
-            {{ schoolCode ? "加载失败" : "暂无照片" }}
+            {{ schoolCode ? '加载失败' : '暂无照片' }}
           </div>
         </el-image>
       </el-table-column>

+ 197 - 201
src/views/exam_list/index.vue

@@ -1,65 +1,69 @@
 <template>
   <div class="app-container">
     <span v-if="checkRole([5, 99])">
-      <el-button type="primary" icon="el-icon-plus" @click="create"
-        >添加人员</el-button
-      >
+      <el-button
+        type="primary"
+        icon="el-icon-plus"
+        @click="create"
+      >添加人员</el-button>
       <el-button
         type="primary"
         icon="el-icon-download"
-        @click="batchDownloadMachineList"
         class="margin-left"
-        >下载模板</el-button
-      >
-      <a href="javascript:;" class="file"
-        >批量导入<input
-          type="file"
-          name="file"
-          ref="file"
-          @change="upload($event)"
-      /></a>
+        @click="batchDownloadMachineList"
+      >下载模板</el-button>
+      <a
+        href="javascript:;"
+        class="file"
+      >批量导入<input
+        ref="file"
+        type="file"
+        name="file"
+        @change="upload($event)"
+      ></a>
       <el-button
+        v-if="isOut === 1"
         type="primary"
         class="margin-left"
         @click="download"
-        v-if="isOut === 1"
-        >导出记录</el-button
-      >
-      <el-button type="danger" class="margin-left" @click="allDel"
-        >一键删除</el-button
-      >
+      >导出记录</el-button>
+      <el-button
+        type="danger"
+        class="margin-left"
+        @click="allDel"
+      >一键删除</el-button>
     </span>
     <!--操作区-->
     <el-input
       v-model="page.data.name"
       placeholder="请输入姓名"
       class="margin-left input"
-    ></el-input>
+    />
     <el-input
       v-model="page.data.phone"
       placeholder="请输入手机号"
       class="margin-left input"
-    ></el-input>
+    />
     <el-input
       v-model="page.data.idNumber"
       placeholder="请输入身份证号"
       class="margin-left input"
-    ></el-input>
+    />
     <el-input
       v-model="page.data.examSession"
       placeholder="请输入场次"
       class="margin-left input"
-    ></el-input>
+    />
     <el-input
       v-model="page.data.examCode"
       placeholder="请输入准考证号"
       class="margin-left input"
-    ></el-input>
+    />
     <el-input
       v-model="page.data.examType"
       placeholder="请输入报考类别"
       class="margin-left input"
-    ></el-input>
+    />
 
     <el-select
       v-if="checkRole([1, 2, 3, 4])"
@@ -74,8 +78,7 @@
         :key="item.id"
         :label="item.username"
         :value="item.username"
-      >
-      </el-option>
+      />
     </el-select>
     <!-- <el-select
       filterable
@@ -104,42 +107,38 @@
         :key="item.id"
         :label="item.name"
         :value="item.id"
-      >
-      </el-option>
+      />
     </el-select>
     <el-input
       v-model="page.data.remark"
       placeholder="请输入备注"
       class="margin-left input"
-    ></el-input>
+    />
     <el-date-picker
       v-model="page.data.startTime"
       type="datetime"
       placeholder="选择考试开始时间"
       value-format="yyyy-MM-dd HH:mm:ss"
       class="margin-left"
-    >
-    </el-date-picker>
+    />
     <el-date-picker
       v-model="page.data.endTime"
       type="datetime"
       placeholder="选择考试结束时间"
       value-format="yyyy-MM-dd HH:mm:ss"
       class="margin-left"
-    >
-    </el-date-picker>
+    />
     <el-button
       type="primary"
       icon="el-icon-search"
-      @click="fetchData"
       class="margin-left"
-      >搜索</el-button
-    >
+      @click="fetchData"
+    >搜索</el-button>
     <!--主表格-->
     <el-table
-      class="table"
       ref="table_form"
       v-loading="listLoading"
+      class="table"
       :data="list"
       element-loading-text="Loading"
       border
@@ -159,7 +158,7 @@
             :preview-src-list="[scope.row.photo]"
           >
             <div slot="error" class="image-slot">
-              {{ scope.row.photo ? "加载失败" : "暂无照片" }}
+              {{ scope.row.photo ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>
@@ -180,9 +179,9 @@
         </template>
       </el-table-column>
       <el-table-column
+        v-if="checkRole([1, 2, 3, 4])"
         label="所属账号"
         align="center"
-        v-if="checkRole([1, 2, 3, 4])"
       >
         <template slot-scope="scope">
           {{ scope.row.username | matchNull }}
@@ -230,20 +229,19 @@
         </template>
       </el-table-column>
       <el-table-column
+        v-if="checkRole([1, 2, 5, 99])"
         align="center"
         prop=""
         label="操作区"
         width="100"
-        v-if="checkRole([1, 2, 5, 99])"
       >
         <template slot-scope="scope">
           <el-button
+            v-if="checkRole([1, 2, 5, 99])"
             type="danger"
             size="small"
-            v-if="checkRole([1, 2, 5, 99])"
             @click="deleteUser(scope.row.examUserWhitelistId)"
-            >删除</el-button
-          >
+          >删除</el-button>
           <!-- <el-button type="primary" size="small" @click="create(scope.row)"
             >编辑</el-button
           > -->
@@ -259,9 +257,9 @@
     />
     <el-dialog :title="dialogTit" :visible.sync="dialogVisible" width="800px">
       <el-form
+        ref="form"
         :model="form"
         :rules="rules"
-        ref="form"
         label-width="90px"
         label-position="left"
       >
@@ -271,7 +269,7 @@
             prop="name"
             class="form-item-style item-margin-bottom"
           >
-            <el-input v-model="form.name" placeholder="请输入姓名"></el-input>
+            <el-input v-model="form.name" placeholder="请输入姓名" />
           </el-form-item>
           <el-form-item
             label="身份证号"
@@ -281,16 +279,16 @@
             <el-input
               v-model="form.idNumber"
               placeholder="请输入身份证号"
-            ></el-input>
+            />
           </el-form-item>
         </div>
         <div class="flex">
           <el-form-item label="手机号" class="form-item-style" prop="phone">
             <el-input
+              v-model.trim="form.phone"
               placeholder="请输入手机号"
               maxlength="11"
               show-word-limit
-              v-model.trim="form.phone"
             />
           </el-form-item>
           <el-form-item
@@ -301,7 +299,7 @@
             <el-input
               v-model="form.examSession"
               placeholder="请输入场次"
-            ></el-input>
+            />
           </el-form-item>
         </div>
         <div class="flex">
@@ -313,7 +311,7 @@
             <el-input
               v-model="form.examCode"
               placeholder="请输入准考证号"
-            ></el-input>
+            />
           </el-form-item>
           <el-form-item
             label="报考类别"
@@ -323,11 +321,11 @@
             <el-input
               v-model="form.examType"
               placeholder="请输入报考类别"
-            ></el-input>
+            />
           </el-form-item>
         </div>
         <el-form-item label="备注" prop="remark" class="form-item-style">
-          <el-input v-model="form.remark" placeholder="请输入备注"></el-input>
+          <el-input v-model="form.remark" placeholder="请输入备注" />
         </el-form-item>
         <div class="flex">
           <el-form-item
@@ -336,13 +334,12 @@
             class="form-item-style"
           >
             <el-date-picker
-              style="width: 100%"
               v-model="form.startTime"
+              style="width: 100%"
               type="datetime"
               placeholder="选择开始时间"
               value-format="yyyy-MM-dd HH:mm:ss"
-            >
-            </el-date-picker>
+            />
           </el-form-item>
           <el-form-item
             label="结束时间"
@@ -350,13 +347,12 @@
             class="form-item-style special"
           >
             <el-date-picker
-              style="width: 100%"
               v-model="form.endTime"
+              style="width: 100%"
               type="datetime"
               placeholder="选择结束时间"
               value-format="yyyy-MM-dd HH:mm:ss"
-            >
-            </el-date-picker>
+            />
           </el-form-item>
         </div>
       </el-form>
@@ -373,9 +369,9 @@
       destroy-on-close
     >
       <el-table
-        class="table"
         ref="table_form_result"
         v-loading="false"
+        class="table"
         :data="result_list"
         element-loading-text="Loading"
         border
@@ -410,22 +406,22 @@ import {
   examUserWhitelistInsert,
   uploadExcel,
   excelOut,
-  examUserWhitelistDeleteAll,
-} from "@/api/exam";
-import { checkRole } from "@/utils/checkRole";
-import Pagination from "@/components/Pagination";
-import { getUserListSearch } from "@/api/user_manage";
+  examUserWhitelistDeleteAll
+} from '@/api/exam'
+import { checkRole } from '@/utils/checkRole'
+import Pagination from '@/components/Pagination'
+import { getUserListSearch } from '@/api/user_manage'
 
 export default {
   components: { Pagination },
   filters: {
     matchNull(str) {
       if (!str) {
-        return "暂无";
+        return '暂无'
       } else {
-        return str;
+        return str
       }
-    },
+    }
   },
   data() {
     return {
@@ -436,250 +432,250 @@ export default {
       // 分页参数
       page: {
         data: {
-          name: "",
-          phone: "",
-          idNumber: "",
-          examSession: "",
-          examCode: "",
-          examType: "",
-          startTime: "",
-          endTime: "",
+          name: '',
+          phone: '',
+          idNumber: '',
+          examSession: '',
+          examCode: '',
+          examType: '',
+          startTime: '',
+          endTime: '',
           status: null,
           username: null,
-          status: null,
+          status: null
         },
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 10
       },
       total: 0,
       form: {
         idNumber: null,
-        name: "",
-        phone: "",
+        name: '',
+        phone: '',
         examSession: null,
         examCode: null,
         examType: null,
         remark: null,
         startTime: null,
-        endTime: null,
+        endTime: null
       },
       // 验证规则
       rules: {
         idNumber: [
-          { required: true, message: "请输入身份证号", trigger: "blur" },
+          { required: true, message: '请输入身份证号', trigger: 'blur' }
         ],
-        startTime: [{ required: true, message: "请选择", trigger: "blur" }],
-        endTime: [{ required: true, message: "请选择", trigger: "blur" }],
+        startTime: [{ required: true, message: '请选择', trigger: 'blur' }],
+        endTime: [{ required: true, message: '请选择', trigger: 'blur' }]
       },
       dialogVisible: false,
       form_copy: {},
-      dialogTit: "添加人员",
+      dialogTit: '添加人员',
       enter_list: [
-        { id: 1, name: "已入场" },
-        { id: 0, name: "未入场" },
-      ], //是否入场
+        { id: 1, name: '已入场' },
+        { id: 0, name: '未入场' }
+      ], // 是否入场
       // 账号列表_搜索
       user_list: [],
       // 是否认证_搜索
       status_list: [
-        { id: 1, name: "已认证" },
-        { id: 2, name: "未认证" },
+        { id: 1, name: '已认证' },
+        { id: 2, name: '未认证' }
       ],
       // 批量导入结果返回
       resultVisible: false,
-      result_list: [],
-    };
+      result_list: []
+    }
+  },
+  computed: {
+    // 批量注册人员-返回向下取整,减少渲染次数
+    makePercent() {
+      return Math.floor((this.hasDealNumber / this.allNumber) * 100)
+    }
   },
   created() {
-    this.fetchData();
-    this.getUserListSearch();
+    this.fetchData()
+    this.getUserListSearch()
   },
   methods: {
     // 查询权限
     checkRole,
     // 获取列表数据
     fetchData() {
-      this.listLoading = true;
+      this.listLoading = true
       examUserWhitelist(this.page).then((res) => {
-        this.list = res.data.list;
-        this.total = res.data.total;
-        this.listLoading = false;
-      });
+        this.list = res.data.list
+        this.total = res.data.total
+        this.listLoading = false
+      })
     },
     // 打开添加对话框
     create(row) {
       if (row) {
-        this.form = JSON.parse(JSON.stringify(row));
+        this.form = JSON.parse(JSON.stringify(row))
       } else {
-        this.form = JSON.parse(JSON.stringify(this.form_copy));
+        this.form = JSON.parse(JSON.stringify(this.form_copy))
       }
-      this.dialogVisible = true;
+      this.dialogVisible = true
       this.$nextTick(() => {
-        this.$refs["form"].clearValidate();
-      });
+        this.$refs['form'].clearValidate()
+      })
     },
     // 确定添加
     addOrupdate() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
           examUserWhitelistInsert(this.form).then((res) => {
-            this.dialogVisible = false;
-            this.fetchData();
+            this.dialogVisible = false
+            this.fetchData()
             this.$message({
-              type: "success",
-              message: "添加成功!",
-            });
-          });
+              type: 'success',
+              message: '添加成功!'
+            })
+          })
         }
-      });
+      })
     },
     // 删除
     deleteUser(id) {
-      this.$confirm("确定要删除此人员吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
+      this.$confirm('确定要删除此人员吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
       }).then(() => {
         examUserWhitelistDel(id).then((res) => {
-          this.fetchData();
+          this.fetchData()
           this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-        });
-      });
+            type: 'success',
+            message: '删除成功!'
+          })
+        })
+      })
     },
     // 批量导入
     upload(e) {
-      var files = e.currentTarget.files;
+      var files = e.currentTarget.files
       if (!files.length) {
-        return;
+        return
       }
       const loading = this.$loading({
         lock: true,
-        text: "拼命导入中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      var formData = new FormData(); // 必需声明一个FormData对象
-      formData.append("file", files[0]);
+        text: '拼命导入中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      var formData = new FormData() // 必需声明一个FormData对象
+      formData.append('file', files[0])
       uploadExcel(formData)
         .then((res) => {
-          loading.close();
-          this.fetchData();
+          loading.close()
+          this.fetchData()
           if (res.data.length > 0) {
-            this.resultVisible = true;
-            this.result_list = res.data;
+            this.resultVisible = true
+            this.result_list = res.data
           } else {
             this.$message({
-              type: "success",
-              message: "导入成功!",
-            });
+              type: 'success',
+              message: '导入成功!'
+            })
           }
         })
         .catch((err) => {
-          loading.close();
-          this.fetchData();
-        });
+          loading.close()
+          this.fetchData()
+        })
     },
-    //下载模板
+    // 下载模板
     batchDownloadMachineList() {
       window.location.href =
-        process.env.VUE_APP_BASE_API + "/excel/examUserWhitelistExcel.xlsx";
+        process.env.VUE_APP_BASE_API + '/excel/examUserWhitelistExcel.xlsx'
     },
     // 导出记录
     download() {
-      this.$prompt("请输入导出密码", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        closeOnClickModal: false,
+      this.$prompt('请输入导出密码', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal: false
       })
-        .then(async ({ value }) => {
-          if (value == "Nqj##361") {
+        .then(async({ value }) => {
+          if (value == 'Nqj##361') {
             this.$message({
-              type: "success",
-              message: "密码正确,正在下载...",
-            });
-            this.listLoading = true;
+              type: 'success',
+              message: '密码正确,正在下载...'
+            })
+            this.listLoading = true
             await excelOut(this.page).then((res) => {
-              var eleLink = document.createElement("a");
-              eleLink.style.display = "none";
+              var eleLink = document.createElement('a')
+              eleLink.style.display = 'none'
               // 字符内容转变成blob地址
-              var blob = new Blob([res]);
-              eleLink.href = URL.createObjectURL(blob);
-              eleLink.setAttribute("download", "考试列表.xlsx");
+              var blob = new Blob([res])
+              eleLink.href = URL.createObjectURL(blob)
+              eleLink.setAttribute('download', '考试列表.xlsx')
               // 自动触发点击
-              document.body.appendChild(eleLink);
-              eleLink.click();
+              document.body.appendChild(eleLink)
+              eleLink.click()
               // 然后移除
-              document.body.removeChild(eleLink);
-              this.listLoading = false;
-            });
+              document.body.removeChild(eleLink)
+              this.listLoading = false
+            })
           } else {
             this.$message({
-              type: "error",
-              message: "您输入的密码不正确",
-            });
+              type: 'error',
+              message: '您输入的密码不正确'
+            })
           }
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消导出",
-          });
-        });
+            type: 'info',
+            message: '取消导出'
+          })
+        })
     },
     // 一键删除
     allDel() {
-      this.$prompt("请输入删除密码", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        closeOnClickModal: false,
+      this.$prompt('请输入删除密码', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal: false
       })
-        .then(async ({ value }) => {
-          if (value == "Nqj##361") {
+        .then(async({ value }) => {
+          if (value == 'Nqj##361') {
             this.$message({
-              type: "success",
-              message: "密码正确,正在删除...",
-            });
-            this.listLoading = true;
+              type: 'success',
+              message: '密码正确,正在删除...'
+            })
+            this.listLoading = true
             await examUserWhitelistDeleteAll().then((res) => {
-              this.listLoading = false;
-              this.fetchData();
-            });
+              this.listLoading = false
+              this.fetchData()
+            })
           } else {
             this.$message({
-              type: "error",
-              message: "您输入的密码不正确",
-            });
+              type: 'error',
+              message: '您输入的密码不正确'
+            })
           }
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消删除",
-          });
-        });
+            type: 'info',
+            message: '取消删除'
+          })
+        })
     },
     // 获取账号列表数据_搜索
     getUserListSearch() {
       getUserListSearch().then((res) => {
-        this.user_list = res.data;
-      });
+        this.user_list = res.data
+      })
     },
     // 返回列表序号
     indexMethod(index) {
-      return (this.page.pageNum - 1) * this.page.pageSize + index + 1;
-    },
-  },
-  computed: {
-    //批量注册人员-返回向下取整,减少渲染次数
-    makePercent() {
-      return Math.floor((this.hasDealNumber / this.allNumber) * 100);
-    },
-  },
-};
+      return (this.page.pageNum - 1) * this.page.pageSize + index + 1
+    }
+  }
+}
 </script>
 
 <style scoped>

+ 1 - 1
src/views/exception_model/components/details_list.vue

@@ -52,7 +52,7 @@
             :preview-src-list="[scope.row.photo]"
           >
             <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
-              {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+              {{ scope.row.photo ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>

+ 1 - 1
src/views/exception_model/index.vue

@@ -59,7 +59,7 @@
               :preview-src-list="[scope.row.avatar]"
             >
               <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
-                {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+                {{ scope.row.avatar ? '加载失败' : '暂无照片' }}
               </div>
             </el-image>
           </template>

+ 1 - 1
src/views/issue_list/detailPage.vue

@@ -207,7 +207,7 @@
             :preview-src-list="[scope.row.photo]"
           >
             <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
-              {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+              {{ scope.row.photo ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>

+ 1 - 1
src/views/make_appointment/appointment_list.vue

@@ -109,7 +109,7 @@
             :preview-src-list="[scope.row.avatar]"
           >
             <div slot="error" class="image-slot">
-              {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+              {{ scope.row.avatar ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>

+ 6 - 2
src/views/pass_records/components/DetailModule.vue

@@ -16,7 +16,9 @@
                 :src="row.photo"
                 :preview-src-list="[row.photo]"
               >
-                <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                  {{ row.photo ? '加载失败' : '暂无照片' }}
+                </div>
               </el-image>
               <span>现场照片</span>
             </div>
@@ -31,7 +33,9 @@
                 :src="row.originPhoto"
                 :preview-src-list="[row.originPhoto]"
               >
-                <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                  {{ row.originPhoto ? '加载失败' : '暂无照片' }}
+                </div>
               </el-image>
               <span>比对源照片</span>
             </div>

+ 3 - 1
src/views/pass_records/components/ysgz_pass_records.vue

@@ -171,7 +171,9 @@
                 :src="scope.row[aItem.field]"
                 :preview-src-list="[scope.row[aItem.field]]"
               >
-                <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                  {{ scope.row[aItem.field] ? '加载失败' : '暂无照片' }}
+                </div>
               </el-image>
             </template>
             <template v-else-if="['outType'].indexOf(aItem.field) > -1">

+ 1 - 1
src/views/private_area/table.vue

@@ -37,7 +37,7 @@
               :preview-src-list="[scope.row.avatar]"
             >
               <div slot="error" class="image-slot">
-                {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+                {{ scope.row.avatar ? '加载失败' : '暂无照片' }}
               </div>
             </el-image>
           </template>

+ 1 - 1
src/views/task_list/index.vue

@@ -160,7 +160,7 @@
               :preview-src-list="[scope.row.avatar]"
             >
               <div slot="error" class="image-slot">
-                {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+                {{ scope.row.avatar ? '加载失败' : '暂无照片' }}
               </div>
             </el-image>
           </template>

+ 6 - 2
src/views/visitors_list/component/DetailModule.vue

@@ -23,7 +23,9 @@
                       :src="visitToJetList.userVisitorListDetailVisitor[fItem.field]"
                       :preview-src-list="[visitToJetList.userVisitorListDetailVisitor[fItem.field]]"
                     >
-                      <div slot="error" style="width: 200px; height: 300px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                      <div slot="error" style="width: 200px; height: 300px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                        {{ visitToJetList.userVisitorListDetailVisitor[fItem.field] ? '加载失败' : '暂无照片' }}
+                      </div>
                     </el-image>
                   </template>
                   <template v-else-if="['avatar'].indexOf(fItem.field) > -1">
@@ -33,7 +35,9 @@
                       :src="row[fItem.field]"
                       :preview-src-list="[row[fItem.field]]"
                     >
-                      <div slot="error" style="width: 200px; height: 300px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                      <div slot="error" style="width: 200px; height: 300px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                        {{ row[fItem.field] ? '加载失败' : '暂无照片' }}
+                      </div>
                     </el-image>
                   </template>
                   <template v-else>

+ 8 - 4
src/views/visitors_record/compoment/DetailModule.vue

@@ -16,7 +16,9 @@
               :src="row.photo"
               :preview-src-list="[row.photo]"
             >
-              <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+              <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                {{ row.photo ? '加载失败' : '暂无照片' }}
+              </div>
             </el-image>
             <span>现场照片</span>
           </div>
@@ -31,7 +33,9 @@
               :src="row.originPhoto"
               :preview-src-list="[row.originPhoto]"
             >
-              <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+              <div slot="error" style="width: 200px;height: 320px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                {{ row.originPhoto ? '加载失败' : '暂无照片' }}
+              </div>
             </el-image>
             <span>比对源照片</span>
           </div>
@@ -82,12 +86,12 @@
                   type="primary"
                   plain
                 >
-                  {{ getReasonName(row.verifyType) }}
+                  {{ getVisitTypeName(row.verifyType) }}
                 </el-tag>
                 <el-tag v-else>其它</el-tag>
               </template>
               <template v-else-if="fItem['field'] == 'reasonType'">
-                {{ getVisitTypeName(row.reasonType) }}
+                {{ getReasonName(row.reasonType) }}
               </template>
               <template v-else>
                 {{ row[fItem['field']] || '-' }}

+ 3 - 1
src/views/visitors_record/index.vue

@@ -130,7 +130,9 @@
                     :src="scope.row[aItem.field]"
                     :preview-src-list="[scope.row[aItem.field]]"
                   >
-                    <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                    <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                      {{ scope.row[aItem.field] ? '加载失败' : '暂无照片' }}
+                    </div>
                   </el-image>
                 </template>
                 <template v-else-if="['outType'].indexOf(aItem.field) > -1">

+ 1 - 1
src/views/warning_record/index.vue

@@ -101,7 +101,7 @@
             :preview-src-list="[scope.row.photo]"
           >
             <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
-              {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+              {{ scope.row.photo ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>

+ 3 - 1
src/views/white_list/component/DetailModal.vue

@@ -19,7 +19,9 @@
                     :src="row[fItem.field]"
                     :preview-src-list="[row[fItem.field]]"
                   >
-                    <div slot="error" style="width: 160px; height: 250px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">加载失败</div>
+                    <div slot="error" style="width: 160px; height: 250px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
+                      {{ row[fItem.field] ? '加载失败' : '暂无照片' }}
+                    </div>
                   </el-image>
                 </template>
                 <template v-else-if="['provinceName'].indexOf(fItem.field) > -1">

+ 1 - 1
src/views/white_list/index.vue

@@ -397,7 +397,7 @@
             :preview-src-list="[scope.row.avatar]"
           >
             <div slot="error" style="width: 70px;height: 70px;display: flex;justify-content: center;align-items: center;color:#C0C4CC;background-color: #F5F7FA;">
-              {{ scope.row.avatar ? "加载失败" : "暂无照片" }}
+              {{ scope.row.avatar ? '加载失败' : '暂无照片' }}
             </div>
           </el-image>
         </template>