From 222a623191c8dbd934a45c5da32c6c6883c8587f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 06 九月 2024 00:18:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/system/work-order/index.vue | 272 +++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 186 insertions(+), 86 deletions(-)
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index 125e50e..88584ac 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,14 +64,25 @@
<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">
- <el-col :span="24" class="time">宸ュ崟缂栧彿锛歿{ item.workOrderNo }}</el-col>
+ <el-col :span="24" class="time">宸ュ崟鍙凤細{{ item.workOrderNo }}</el-col>
</el-row>
<el-row class="work-order-item">
<el-col :span="24" class="time">鏁呴殰鏃堕棿锛歿{ item.createTime }}</el-col>
@@ -92,6 +104,8 @@
class="my-button"
size="mini"
type="text"
+ v-hasPermi="['work:order:condition:add']"
+ v-show="item.status !== 'AUDITING_SUCCESS'"
@click="handleYwCondition(item)"
>杩愮淮鎯呭喌
</el-button>
@@ -108,6 +122,7 @@
type="text"
@click="handleReport(item)"
v-hasPermi="['system:report:add']"
+ v-show="item.status !== 'AUDITING_SUCCESS'"
>浜嬪悗鎶ュ
</el-button>
</el-row>
@@ -147,23 +162,26 @@
<el-form-item label="鎶ュ绫诲瀷">
<el-input v-model="reportForm.reportType" disabled/>
</el-form-item>
- <el-form-item label="鏁呴殰绫诲瀷" prop="errorType">
- <el-select v-model="reportForm.errorType">
- <el-option label="甯傛斂鏂藉伐" value="甯傛斂鏂藉伐"/>
- <el-option label="璁惧鏁呴殰" value="璁惧鏁呴殰"/>
- <el-option label="璁惧閬楀け" value="璁惧閬楀け"/>
+ <el-form-item label="鏁呴殰绫诲瀷" prop="errorTypeList">
+ <el-select v-model="reportForm.errorTypeList" multiple>
+ <el-option v-for="dict in dict.type.report_error_type" :value="dict.value" :key="dict.value" :label="dict.label" />
</el-select>
+ </el-form-item>
+ <el-form-item label="鎶ュ鏃堕棿" prop="daterangeCreateTime">
+ <el-date-picker v-model="reportForm.daterangeCreateTime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
+ range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
</el-form-item>
<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>
<div slot="footer" class="dialog-footer">
<el-button @click="reportOpen = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="submitReportForm">鎻� 浜�</el-button>
+ <el-button type="primary" @click="submitReportForm">鎻愪氦瀹℃牳</el-button>
</div>
</el-dialog>
@@ -232,7 +250,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"
>
@@ -256,52 +274,80 @@
<el-dialog title="杩囩▼鍥�" :visible.sync="flowOpen" width="1200px" append-to-body>
<div>
<el-steps :active="ywAuditingList.length != 0 ? 3 : ywHandleList.length != 0 ? 2 : 1" :space="500">
- <el-step title="浜х敓宸ュ崟">
+ <el-step :title="getTitle1()">
<template slot="description">
<div>
- <div class="flow-item-x">
- 宸ュ崟鏉ユ簮锛�
- <el-tag type="danger" size="small">{{ flowForm.source }}</el-tag>
+ <div class="row flow-item-x">
+ <div class="flex1">鏁呴殰鐐逛綅锛�</div>
+ <div class="flex2"><el-tag type="danger" size="small">{{ flowForm.source }}</el-tag></div>
</div>
- <div class="flow-item-x">
- 鏁呴殰绫诲瀷锛歿{ flowForm.errorType }}
+ <div class="row flow-item-x">
+ <div class="flex1">鏁呴殰绫诲瀷锛�</div>
+ <div class="flex2">{{ flowForm.errorType }}</div>
</div>
- <div class="flow-item-x">
- 杩愮淮鍗曚綅锛歿{ flowForm.unitName }}
+ <div class="row flow-item-x">
+ <div class="flex1">杩愮淮鍗曚綅锛�</div>
+ <div class="flex2">{{ flowForm.unitName }}</div>
</div>
- <div class="flow-item-x">
- 鍒涘缓鏃堕棿锛歿{ flowForm.createTime }}
+ <div class="row flow-item-x">
+ <div class="flex1">鍒涘缓鏃堕棿锛�</div>
+ <div class="flex2">{{ flowForm.createTime }}</div>
</div>
- <div class="flow-item-x" v-if="flowForm.processingPeriod">
- 澶勭悊鏈熼檺锛�
- <el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag>
+ <div class="row flow-item-x" v-if="flowForm.processingPeriod">
+ <div class="flex1">澶勭悊鏈熼檺锛�</div>
+ <div class="flex2"><el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag></div>
</div>
</div>
</template>
</el-step>
- <el-step title="杩愮淮澶勭悊">
+ <el-step :title="getTitle2()">
<template slot="description">
<div style="max-height: 450px;overflow-y: scroll">
- <div class="y-item" v-for="(item, index) in ywHandleList" :key="index">
- <div class="y-item-1">
- <div class="flow-item-x">
- 鐜板満鎯呭喌锛�
- <!-- <el-tooltip class="item" effect="dark" :content="item.ywCondition" placement="top"> -->
- <span v-html="item.ywCondition"></span>
- <!-- </el-tooltip> -->
- </div>
- <!-- <div class="flow-item-x">
- <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag>
- </div> -->
+ <div v-for="(item, index) in ywHandleList" :key="index">
+ <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>
</div>
- <div class="y-item-2">
- <div>
- {{ parseTime(item.createTime) }}
+ <div v-else style="width: 100%">
+ <div style="display: flex; flex-direction: row;width: 100%;position: relative">
+ <div class="cflex1">杩愮淮鎯呭喌锛�</div>
+ <div class="cflex2"><el-link style="font-size: 14px" type="danger" @click="openDrawer(item)">鐐瑰嚮鏌ョ湅</el-link></div>
+ <div class="cflex3">{{item.createTime}}</div>
</div>
- <div>
- 绗瑊{ index + 1 }}娆�
- </div>
+ <el-drawer
+ title="杩愮淮鎯呭喌"
+ :visible.sync="drawer"
+ direction="rtl"
+ :modal="false"
+ >
+ <div style="padding: 20px;font-size: 14px">
+ <div class="row flow-item-x">
+ <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"><p>浣愯瘉鏉愭枡锛�</p></div>
+ <div class="flex2">
+ <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>
+ </div>
+ </el-drawer>
+ <!-- <div class="flow-item-x">
+ <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag>
+ </div> -->
</div>
+
</div>
</div>
</template>
@@ -309,25 +355,26 @@
<el-step title="瀹℃牳缁撴灉">
<template slot="description">
<div style="max-height: 450px;overflow-y: scroll">
- <div class="y-item" v-for="(item, index) in ywAuditingList" :key="index">
- <div class="y-item-1">
- <div class="flow-item-x">
+ <div v-for="(item, index) in ywAuditingList" :key="index">
+ <div class="row flow-item-x">
+ <div class="cflex1">
瀹℃牳缁撴灉锛�
+ </div>
+ <div class="cflex2">
<el-tag :type="item.result == '瀹℃牳閫氳繃' ? 'success' : 'danger'" size="small">{{
item.result
}}
</el-tag>
</div>
- <div class="flow-item-x">
- 瀹℃牳璇存槑锛�<span v-html="item.remark"></span>
+ <div class="cflex3">
+ {{ item.createTime }}
</div>
</div>
- <div class="y-item-2">
- <div>
- {{ parseTime(item.createTime) }}
- </div>
- <div>
- 绗瑊{ index + 1 }}娆�
+ <div class="row flow-item-x">
+ <div class="flex1">瀹℃牳璇存槑锛�</div>
+ <div class="flex2">
+ <span v-if="item.remark" v-html="item.remark"></span>
+ <span v-else>鏃�</span>
</div>
</div>
</div>
@@ -341,6 +388,26 @@
</div>
</template>
<style scoped>
+.flex1 {
+ flex: 2;
+}
+.flex2 {
+ flex: 9;
+}
+.cflex1 {
+ flex: 2;
+}
+.cflex2 {
+ flex: 5;
+ flex-wrap: wrap;
+}
+.cflex3 {
+ flex: 4;
+}
+.row {
+ display: flex;
+ flex-direction: row;
+}
.flow-item-x {
margin: 5px 0;
}
@@ -351,7 +418,8 @@
background-color: #d9d9d9;
display: flex;
flex-direction: row;
- align-items: center
+ align-items: center;
+ width: 100%;
}
.y-item-2 {
@@ -373,17 +441,17 @@
batchAuditing,
ywCondition,
getYwCondition,
- getYwConditionList,
- getYwAuditingList
+ process
} from '@/api/platform/work-order'
import { addReport } from '@/api/platform/report'
export default {
name: 'Work-order',
- dicts: ['error_type'],
+ dicts: ['error_type', 'report_error_type'],
components: {},
data() {
return {
+ drawer: false,
empty: false,
openShowCurrent: null,
ywConditions: [],
@@ -395,21 +463,32 @@
},
ywHandleList: [],
ywAuditingList: [],
+ beforeReportMsg: '',
+ afterReportMsg: '',
reportFormRules: {
reportContent: [
{ required: true, message: '鎶ュ鍐呭涓嶈兘涓虹┖', trigger: 'blur' }
],
reportMaterials: [
- { required: true, message: '涓婃姤鏉愭枡涓嶈兘涓虹┖', trigger: 'blur' }
- ]
+ { required: true, message: '鎶ュ鏉愭枡涓嶈兘涓虹┖', trigger: 'blur' }
+ ],
+ errorTypeList: [
+ { required: true, message: '璇烽�夋嫨鏁呴殰绫诲瀷', trigger: 'change' }
+ ],
+ daterangeCreateTime: [
+ { required: true, message: '璇烽�夋嫨鎶ュ鏃堕棿', trigger: 'change' }
+ ],
},
reportOpen: false,
reportForm: {
reportType: '浜嬪悗鎶ュ',
pointId: '',
- errorType: '',
+ errorTypeList: [],
reportContent: '',
- reportMaterials: ''
+ reportMaterials: '',
+ daterangeCreateTime: [],
+ beginCreateTime: null,
+ endCreateTime: null
},
// 杩囩▼鍥�
flowOpen: false,
@@ -441,12 +520,8 @@
errorTypeList: [],
pageNum: 1,
pageSize: 10,
- workOrderNo: null,
unitId: null,
- ywPeopleId: null,
- ywHandleTime: null,
- ywResult: null,
- ywCondition: null,
+ keyword: null,
status: ''
},
// 琛ㄥ崟鍙傛暟
@@ -492,6 +567,11 @@
errorTypes: [
{ required: true, message: '璇烽�夋嫨鏁呴殰绫诲瀷', trigger: 'change' }
]
+ },
+ // 杩愮淮鎯呭喌
+ ywData: {
+ content: '',
+ fileList: 'process.env.VUE_APP_BASE_API'
}
}
},
@@ -499,6 +579,21 @@
this.getList()
},
methods: {
+ getTitle1() {
+ return '浜х敓宸ュ崟' + (this.beforeReportMsg ? '(' + this.beforeReportMsg + ')' : '')
+ },
+ getTitle2() {
+ return '杩愮淮澶勭悊' + (this.afterReportMsg ? '(' + this.afterReportMsg + ')' : '')
+ },
+ openDrawer(item) {
+ this.ywData = {
+ content: '',
+ fileList: ''
+ }
+ this.ywData.content = item.ywCondition
+ this.ywData.fileList = item.ywProofMaterials
+ this.drawer = true
+ },
// 鎵归噺瀹℃牳
batchAuditing(result) {
this.batchAuditingWorkOrder.auditingResult = result
@@ -521,6 +616,10 @@
submitReportForm() {
this.$refs['reportForm'].validate(valid => {
if (valid) {
+ if (this.reportForm.daterangeCreateTime && this.reportForm.daterangeCreateTime.length > 0) {
+ this.reportForm.beginCreateTime = this.reportForm.daterangeCreateTime[0]
+ this.reportForm.endCreateTime = this.reportForm.daterangeCreateTime[1]
+ }
addReport(this.reportForm).then(response => {
this.$modal.msgSuccess('鎴愬姛鎻愪氦鎶ュ')
this.reportOpen = false
@@ -531,14 +630,14 @@
},
// 浜嬪悗鎶ュ鎸夐挳
handleReport(row) {
- this.reportForm.pointId = row.pointId
+ this.reportForm.pointId = row.serialNumber
this.reportForm.source = row.source
this.reportOpen = true
},
// 瀹℃牳鎸夐挳
handleAuditing(row) {
this.auditingForm = row
- getYwCondition(row.id).then(response => {
+ getYwCondition(row.workOrderNo).then(response => {
this.ywConditions = response.data
this.auditingOpen = true
})
@@ -563,16 +662,14 @@
// 杩囩▼鍥炬煡鐪�
handleFlow(row) {
this.flowForm = row
- getYwAuditingList(row.id).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.afterReportMsg = response.data.afterReportMsg
+ this.beforeReportMsg = response.data.beforeReportMsg
+ this.flowOpen = true
}
- })
- getYwCondition(row.id).then(response => {
- if (response.data) {
- this.ywHandleList = response.data
- }
- this.flowOpen = true
})
},
// 鎻愪氦瀹℃牳
@@ -657,15 +754,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
@@ -844,4 +941,7 @@
.my-col {
margin-bottom: 20px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; position: relative;
}
+::v-deep el-step__description.is-finish {
+ color: gray;
+}
</style>
--
Gitblit v1.8.0