From aa0660420a79b8f1e07992eab5df664d571a47b5 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 04 九月 2024 01:40:11 +0800
Subject: [PATCH] 车辆、人脸mongo重构
---
src/views/system/work-order/index.vue | 93 +++++++++++++++++++++++++---------------------
1 files changed, 51 insertions(+), 42 deletions(-)
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index 9a3801c..b32aaaa 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -11,12 +11,13 @@
/>
</el-form-item>
<el-form-item label="鏁呴殰绫诲瀷" prop="errorTypeList">
- <el-select v-model="queryParams.errorTypeList" multiple placeholder="鏁呴殰绫诲瀷" clearable @clear="handleQuery">
+ <el-select v-model="queryParams.errorTypeList" multiple @change="handleQuery" placeholder="鏁呴殰绫诲瀷" clearable @clear="handleQuery">
<el-option v-for="dict in dict.type.error_type" :value="dict.value" :key="dict.value" :label="dict.label" />
</el-select>
</el-form-item>
<el-form-item label="宸ュ崟鐘舵��" prop="status">
<el-select v-model="queryParams.status" placeholder="宸ュ崟鐘舵��" @change="handleQuery">
+ <el-option label="鍏ㄩ儴" value=""></el-option>
<el-option label="寰呭鐞�" value="DISTRIBUTED"></el-option>
<el-option label="寰呭鏍�" value="YW_HANDLE"></el-option>
<el-option label="宸插畬鎴�" value="AUDITING_SUCCESS"></el-option>
@@ -63,10 +64,21 @@
<div class="card">
<div class="card-left">
<el-image
- :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']"
- fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357"
+ v-if="item.imgList && item.imgList.length > 0"
+ :preview-src-list="item.imgList"
+ fit="cover" :src="item.imgList[0]"
class="image"
- />
+ style="display: flex;justify-content: center;align-items: center;"
+ >
+ <div slot="error" class="image-slot">
+ <i class="el-icon-picture-outline">鍔犺浇澶辫触</i>
+ </div>
+ </el-image>
+ <el-image class="image" style="display: flex;justify-content: center;align-items: center;" v-else>
+ <div slot="error" class="image-slot">
+ <i class="el-icon-picture-outline" style="color: gray;font-size: 14px">鏈彇鍒板浘鐗�</i>
+ </div>
+ </el-image>
</div>
<div class="work-order">
<el-row class="work-order-item">
@@ -160,7 +172,7 @@
<el-form-item label="鎶ュ鍐呭" prop="reportContent">
<editor v-model="reportForm.reportContent" :min-height="192"/>
</el-form-item>
- <el-form-item label="涓婃姤鏉愭枡" prop="reportMaterials">
+ <el-form-item label="鎶ュ鏉愭枡" prop="reportMaterials">
<file-upload v-model="reportForm.reportMaterials"/>
</el-form-item>
</el-form>
@@ -235,7 +247,7 @@
</div>
</el-dialog>
- <el-dialog title="杩愮淮鎵归噺瀹℃牳" :visible.sync="batchAuditingVisible" width="500px" append-to-body>
+ <el-dialog title="宸ュ崟鎵归噺瀹℃牳" :visible.sync="batchAuditingVisible" width="500px" append-to-body>
<el-form ref="batchAuditingWorkOrder" :model="batchAuditingWorkOrder" label-width="80px"
:rules="batchAuditingRules"
>
@@ -289,7 +301,7 @@
<template slot="description">
<div style="max-height: 450px;overflow-y: scroll">
<div v-for="(item, index) in ywHandleList" :key="index">
- <div v-if="item.sysMsg" class="row flow-item-x">
+ <div v-if="item.sysMsg === true" class="row flow-item-x">
<div class="cflex1">绯荤粺娑堟伅锛�</div>
<div class="cflex2">{{item.ywCondition}}</div>
<div class="cflex3">{{item.createTime}}</div>
@@ -305,20 +317,24 @@
:visible.sync="drawer"
direction="rtl"
:modal="false"
- :before-close="drawerClose">
- <div style="padding: 20px">
+ >
+ <div style="padding: 20px;font-size: 14px">
<div class="row flow-item-x">
- <div class="flex1">涓婃姤鍐呭锛�</div>
- <div class="flex2" v-html="ywData.content"></div>
+ <div class="flex1"><p>涓婃姤鍐呭锛�</p></div>
+ <div class="flex2">
+ <div v-html="ywData.content"></div>
+ </div>
</div>
<div class="row flow-item-x">
- <div class="flex1">浣愯瘉鏉愭枡锛�</div>
+ <div class="flex1"><p>浣愯瘉鏉愭枡锛�</p></div>
<div class="flex2">
- <el-link type="primary"
- v-for="item in ywData.fileList != null ? ywData.fileList.split(',') : ywData.fileList"
- :underline="false" :key="item.id" @click="handleDownload(item)"
- >{{ item.substring(item.lastIndexOf('/') + 1) }}
- </el-link>
+ <p>
+ <el-link type="primary"
+ v-for="item in ywData.fileList != null ? ywData.fileList.split(',') : ywData.fileList"
+ :underline="false" :key="item.id" @click="handleDownload(item)"
+ >{{ item.substring(item.lastIndexOf('/') + 1) }}
+ </el-link>
+ </p>
</div>
</div>
@@ -422,8 +438,7 @@
batchAuditing,
ywCondition,
getYwCondition,
- getYwConditionList,
- getYwAuditingList
+ process
} from '@/api/platform/work-order'
import { addReport } from '@/api/platform/report'
@@ -450,7 +465,7 @@
{ required: true, message: '鎶ュ鍐呭涓嶈兘涓虹┖', trigger: 'blur' }
],
reportMaterials: [
- { required: true, message: '涓婃姤鏉愭枡涓嶈兘涓虹┖', trigger: 'blur' }
+ { required: true, message: '鎶ュ鏉愭枡涓嶈兘涓虹┖', trigger: 'blur' }
]
},
reportOpen: false,
@@ -542,7 +557,7 @@
// 杩愮淮鎯呭喌
ywData: {
content: '',
- fileList: ''
+ fileList: 'process.env.VUE_APP_BASE_API'
}
}
},
@@ -551,15 +566,13 @@
},
methods: {
openDrawer(item) {
- this.ywData.content = item.ywCondition
- this.ywData.fileList = item.ywProofMaterials
- this.drawer = true
- },
- drawerClose() {
this.ywData = {
content: '',
fileList: ''
}
+ this.ywData.content = item.ywCondition
+ this.ywData.fileList = item.ywProofMaterials
+ this.drawer = true
},
// 鎵归噺瀹℃牳
batchAuditing(result) {
@@ -625,16 +638,12 @@
// 杩囩▼鍥炬煡鐪�
handleFlow(row) {
this.flowForm = row
- getYwAuditingList(row.workOrderNo).then(response => {
+ process(row.workOrderNo).then(response => {
if (response.data) {
- this.ywAuditingList = response.data
+ this.ywAuditingList = response.data.auditingList
+ this.ywHandleList = response.data.ywList
+ this.flowOpen = true
}
- })
- getYwCondition(row.workOrderNo).then(response => {
- if (response.data) {
- this.ywHandleList = response.data
- }
- this.flowOpen = true
})
},
// 鎻愪氦瀹℃牳
@@ -719,15 +728,15 @@
this.queryParams.params = {}
this.queryParams['start'] = this.daterangeYwHandleTime ? this.daterangeYwHandleTime[0] : null
this.queryParams['end'] = this.daterangeYwHandleTime ? this.daterangeYwHandleTime[1] : null
- if (this.queryParams['status'] == '') {
- this.queryParams['status'] = 'DISTRIBUTED'
- }
+
listWorkOrder(this.queryParams).then(response => {
- // response.data.forEach(item => {
- // if (item.errorType) {
- // item.errorTypeList = item.errorTypeList.split(",")
- // }
- // })
+ response.data.forEach(item => {
+ if (item.imgList) {
+ item.imgList = item.imgList.map(img => {
+ return this.$img + img
+ })
+ }
+ })
this.workOrderList = response.data
this.total = response.total
this.loading = false
--
Gitblit v1.8.0