From f5111b905177fc0fd8232e1a50ee3cc05f969662 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期一, 02 九月 2024 10:34:31 +0800 Subject: [PATCH] 报备功能优化 --- src/views/system/report/index.vue | 104 ++++++++++++++++++++++++++++++---------------------- 1 files changed, 60 insertions(+), 44 deletions(-) diff --git a/src/views/system/report/index.vue b/src/views/system/report/index.vue index 3f10afc..be4c425 100644 --- a/src/views/system/report/index.vue +++ b/src/views/system/report/index.vue @@ -163,35 +163,41 @@ <!-- 鏌ョ湅瀹℃牳璁板綍 --> <el-dialog title="鎶ュ瀹℃牳璁板綍" :visible.sync="recordOpen" :close-on-click-modal="false" width="900px"> <div slot="footer" class="dialog-footer" style="max-height: 500px;overflow-y: auto;"> - <el-timeline v-for="record in auditingRecordList" :key="record.id"> - <el-timeline-item :timestamp="record.auditingTime" placement="top"> - <el-card> - <el-descriptions title="鎻愪氦鏁版嵁" :column="3" border> - <el-descriptions-item label="鐐逛綅" label-class-name="my-label" content-class-name="my-content">{{ - record.pointName }}</el-descriptions-item> - <el-descriptions-item label="鎶ュ绫诲瀷">{{ record.reportType }}</el-descriptions-item> - <el-descriptions-item label="瀹℃牳缁撴灉"><el-tag :type="record.result ? 'success' : 'danger'">{{ record.result ? "閫氳繃" : "鏈�氳繃" }}</el-tag></el-descriptions-item> - <el-descriptions-item label="瀹℃牳鎰忚">{{ record.resultRemark ? record.resultRemark : "鏃�" }}</el-descriptions-item> - <el-descriptions-item label="鎶ュ鍐呭"> - <div class="content" v-html="getHtmlContent(record.reportContent)"></div> - </el-descriptions-item> - <el-descriptions-item label="鎶ュ鏉愭枡"> - <el-link - v-for="item in record.reportMaterials != null ? record.reportMaterials.split(',') : record.reportMaterials" - :underline="false" type="primary" :key="item" @click="handleDownload(item)"> - {{ item.substring(item.lastIndexOf("/") + 1) }} - </el-link> - </el-descriptions-item> - </el-descriptions> - </el-card> - </el-timeline-item> - </el-timeline> + <div v-if="auditingRecordList && auditingRecordList.length > 0"> + <el-timeline v-for="record in auditingRecordList" :key="record.id"> + <el-timeline-item :timestamp="record.auditingTime" placement="top"> + <el-card> + <el-descriptions title="鎻愪氦鏁版嵁" :column="3" border> + <el-descriptions-item label="鐐逛綅" label-class-name="my-label" content-class-name="my-content">{{ + record.pointName }}</el-descriptions-item> + <el-descriptions-item label="鎶ュ绫诲瀷">{{ record.reportType }}</el-descriptions-item> + <el-descriptions-item label="瀹℃牳缁撴灉"><el-tag :type="record.result ? 'success' : 'danger'">{{ record.result ? "閫氳繃" : "鏈�氳繃" }}</el-tag></el-descriptions-item> + <el-descriptions-item label="瀹℃牳鎰忚">{{ record.resultRemark ? record.resultRemark : "鏃�" }}</el-descriptions-item> + <el-descriptions-item label="鎶ュ鍐呭"> + <div class="content" v-html="getHtmlContent(record.reportContent)"></div> + </el-descriptions-item> + <el-descriptions-item label="鎶ュ鏉愭枡"> + <el-link + v-for="item in record.reportMaterials != null ? record.reportMaterials.split(',') : record.reportMaterials" + :underline="false" type="primary" :key="item" @click="handleDownload(item)"> + {{ item.substring(item.lastIndexOf("/") + 1) }} + </el-link> + </el-descriptions-item> + </el-descriptions> + </el-card> + </el-timeline-item> + </el-timeline> + </div> + <div v-else> + <el-empty description="鏃犲鏍歌褰�"></el-empty> + </div> + <el-button type="primary" @click="recordOpen = false">鍏抽棴</el-button> </div> </el-dialog> <!-- 瀹℃牳鎶ュ --> - <el-dialog title="鎶ュ瀹℃牳" :visible.sync="auditingOpen" :close-on-click-modal="false" width="800px" append-to-body> + <el-dialog title="鎶ュ瀹℃牳" :visible.sync="auditingOpen" :close-on-click-modal="false" width="1100px" append-to-body> <div style="display: flex;flex-direction: row"> <div style="flex: 6; border-right: 1px solid #d2d1d1; padding-right: 20px"> <el-form ref="form" :model="auditingForm" :rules="auditingRules" label-width="80px"> @@ -227,12 +233,13 @@ </el-form-item> </el-form> </div> - <div style="flex: 6; border-right: 1px solid #d2d1d1; padding-right: 20px"> - <div>鎵归噺瀹℃牳鍚屼竴鎵规鍙风殑鎶ュ</div> - <div> - <el-checkbox-group v-model="selectedTo"> + <div style="flex: 5; border-right: 1px solid #d2d1d1; padding-right: 20px; padding-left: 20px"> + <div>鍚屼竴鎵规鍙风殑鎶ュ</div> + <div style="margin-top: 20px"> + <el-checkbox-group v-if="togetherList && togetherList.length > 0" v-model="selectedTo"> <el-checkbox v-for="item in togetherList" :label="item.id">{{item.pointName}}</el-checkbox> </el-checkbox-group> + <span v-else>鏃�</span> </div> </div> <div style="flex: 5; padding-left: 20px"> @@ -252,7 +259,7 @@ <div slot="footer" class="dialog-footer"> <el-button @click="auditingCancel">鍙� 娑�</el-button> - <el-button type="primary" @click="auditingSubmit">纭� 瀹�</el-button> + <el-button type="primary" @click="auditingSubmit">瀹� 鏍�</el-button> </div> </el-dialog> @@ -394,7 +401,7 @@ this.togetherList = res.data; if (this.togetherList && this.togetherList.length > 0) { this.togetherList = this.togetherList.filter(item => item.id != row.id) - this.selectedTo = this.togetherList.map(item => item.pointId) + this.selectedTo = this.togetherList.map(item => item.id) } }) } @@ -432,13 +439,13 @@ /** 鏌ヨ鎶ュ鍒楄〃 */ getList() { this.loading = true; - if (this.form.daterangeCreateTime && this.form.daterangeCreateTime.length > 0) { - this.queryParams["beginCreateTime"] = this.form.daterangeCreateTime[0]; - this.queryParams["endCreateTime"] = this.form.daterangeCreateTime[1]; - } else { - this.queryParams["beginCreateTime"] = null; - this.queryParams["endCreateTime"] = null; - } + // if (this.form.daterangeCreateTime && this.form.daterangeCreateTime.length > 0) { + // this.queryParams["beginCreateTime"] = this.form.daterangeCreateTime[0]; + // this.queryParams["endCreateTime"] = this.form.daterangeCreateTime[1]; + // } else { + // this.queryParams["beginCreateTime"] = null; + // this.queryParams["endCreateTime"] = null; + // } listReport(this.queryParams).then(response => { this.reportList = response.data.records; this.total = response.total; @@ -521,17 +528,26 @@ /** 瀹℃牳鎸夐挳鎿嶄綔 */ auditingSubmit() { this.auditingForm.auditingTime = new Date(); - let data = { - id: this.auditingForm.id, - togetherList: this.selectedTo - auditOpinion: this.auditingForm.auditOpinion, - auditingResult: this.auditingForm.auditingResult - } + this.auditingForm.togetherList = this.selectedTo audit(this.auditingForm).then(response => { this.$modal.msgSuccess("瀹℃牳鎴愬姛"); this.auditingOpen = false this.getList(); - this.auditingForm = {} + this.auditingForm = { + id: null, + unitName: "", + pointName: "", + peopleName: "", + errorTypeList: [], + reportContent: "", + auditing: "", + auditOpinion: "", + reportType: "", + beginCreateTime: null, + endCreateTime: null, + auditingResult: false, + daterangeCreateTime: [] + } }); }, /** 鎻愪氦鎸夐挳 */ -- Gitblit v1.8.0