| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="运维人员" prop="peopleId"> |
| | | <el-input v-model="queryParams.peopleId" placeholder="运维人员姓名" clearable @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="点位" prop="pointId"> |
| | | <el-input v-model="queryParams.pointId" placeholder="点位" clearable @keyup.enter.native="handleQuery" /> |
| | | <el-form-item label="关键字" prop="peopleId"> |
| | | <el-input v-model="queryParams.keyword" placeholder="请输入关键字" clearable @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="报备类型" prop="reportType"> |
| | | <el-select v-model="queryParams.reportType" @change="handleQuery" placeholder="报备类型" clearable> |
| | |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['system:report:add']">新增</el-button> |
| | | </el-col> |
| | | <!-- <el-col :span="1.5">--> |
| | | <!-- <el-button--> |
| | | <!-- type="success"--> |
| | | <!-- plain--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- size="mini"--> |
| | | <!-- :disabled="single"--> |
| | | <!-- @click="handleUpdate"--> |
| | | <!-- >修改</el-button>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="1.5"> |
| | | <el-button type="success" plain icon="el-icon-upload" size="mini" @click="handleImport">导入</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" |
| | | v-hasPermi="['system:report:remove']">删除</el-button> |
| | |
| | | <el-table-column label="报备类型" align="center" prop="reportType" /> |
| | | <el-table-column label="上报时间" width="200" align="center" prop="createTime" /> |
| | | <el-table-column label="故障类型" align="center" prop="errorType" /> |
| | | <el-table-column label="审核结果" align="center" prop="status" :formatter="formatStatus"/> |
| | | <el-table-column label="审核结果" align="center" prop="status" :formatter="formatStatus" /> |
| | | <el-table-column label="操作" fixed="right" width="250" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:report:edit']" |
| | | v-if="scope.row.status === 2 || scope.row.status === 0" |
| | | >修改</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:report:edit']" v-if="scope.row.status === 2 || scope.row.status === 0">修改</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['system:report:edit']" v-if="scope.row.status === 0">审核</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-s-check" @click="handleAuditingRecord(scope.row.id)" |
| | | v-hasPermi="['system:report:record']">审核记录</el-button> |
| | | v-hasPermi="['system:report:record']">审核记录</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:report:remove']">删除</el-button> |
| | | </template> |
| | |
| | | <!-- 添加或修改报备对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="点位" prop="pointId"> |
| | | <el-form-item label="点位" prop="pointId" v-if="addOrImport === 'add'"> |
| | | <el-select v-model="form.pointId" filterable remote reserve-keyword placeholder="请选择点位" |
| | | :remote-method="remoteGetPoints" :loading="selectLoading"> |
| | | <el-option v-for="item in pointList" :key="item.id" :label="item.value" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="点位导入" v-if="addOrImport === 'import'"> |
| | | <el-upload accept=".xlsx, .xls" :limit="1" :action="url" drag :before-upload="beforeUpload" :file-list="fileList"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"> |
| | | 将文件拖到此处,或<em>点击上传</em> |
| | | </div> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">下载模板</el-link> |
| | | </div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="报备类型" prop="reportType"> |
| | | <el-select v-model="form.reportType"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="故障类型" prop="errorType"> |
| | | <el-select v-model="form.errorType"> |
| | | <el-option label="市政施工" value="市政施工" /> |
| | | <el-option label="设备故障" value="设备故障" /> |
| | | <el-option label="设备遗失" value="设备遗失" /> |
| | | <el-select v-model="form.errorType" multiple> |
| | | <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="报备时间"> |
| | |
| | | <el-timeline-item :timestamp="record.createTime" 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="故障类型">{{record.errorType}}</el-descriptions-item> |
| | | <el-descriptions-item label="审核结果">{{formatStatus(record)}}</el-descriptions-item> |
| | | <el-descriptions-item label="审核意见">{{record.auditOpinion}}</el-descriptions-item> |
| | | <el-descriptions-item label="审核时间">{{record.auditingTime}}</el-descriptions-item> |
| | | <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="故障类型">{{ record.errorType }}</el-descriptions-item> |
| | | <el-descriptions-item label="审核结果">{{ formatStatus(record) }}</el-descriptions-item> |
| | | <el-descriptions-item label="审核意见">{{ record.auditOpinion }}</el-descriptions-item> |
| | | <el-descriptions-item label="审核时间">{{ record.auditingTime }}</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> |
| | | :underline="false" type="primary" :key="item" @click="handleDownload(item)"> |
| | | {{ item.substring(item.lastIndexOf("/") + 1) }} |
| | | </el-link> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 审核报备 --> |
| | | <el-dialog title="报备审核" :visible.sync="auditingOpen" width="500px" append-to-body> |
| | | <el-dialog title="报备审核" :visible.sync="auditingOpen" width="900px" append-to-body> |
| | | <el-form ref="form" :model="auditingForm" :rules="auditingRules" label-width="80px"> |
| | | <el-form-item label="点位"> |
| | | <el-input v-model="auditingForm.pointName" disabled /> |
| | |
| | | <el-form-item label="上报材料"> |
| | | <el-link |
| | | v-for="item in auditingForm.reportMaterials != null ? auditingForm.reportMaterials.split(',') : auditingForm.reportMaterials" |
| | | :underline="false" type="primary" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) |
| | | }}</el-link> |
| | | :underline="false" type="primary" :key="item" @click="handleDownload(item)"> |
| | | {{ item.substring(item.lastIndexOf("/") + 1) }} |
| | | </el-link> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果"> |
| | | <el-radio-group v-model="auditingForm.auditingResult"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listReport, getReport, delReport, addReport, updateReport, auditing } from "@/api/platform/report"; |
| | | import { listReport, getReport, delReport, addReport, updateReport, auditing, importReport } from "@/api/platform/report"; |
| | | import { pointSelectData } from "@/api/platform/point"; |
| | | |
| | | export default { |
| | | dicts: ['error_type'], |
| | | name: "Report", |
| | | data() { |
| | | return { |
| | | fileList: [], |
| | | url: process.env.VUE_APP_BASE_API + '/report/import', |
| | | addOrImport: 'add', |
| | | fileType: ["doc", "xls", "xlsx", "ppt", "txt", "pdf", "png", "jpg"], |
| | | auditingRecordList: [], |
| | | // 点位list |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | unitId: null, |
| | | peopleId: null, |
| | | pointId: null, |
| | | createTime: null, |
| | | auditingTime: null, |
| | | keyword: null, |
| | | errorType: null, |
| | | status: 0 |
| | | status: 0, |
| | | reportType: null |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.addOrImport = 'add' |
| | | this.open = true; |
| | | this.title = "添加报备"; |
| | | }, |
| | | /** 导入按钮操作 */ |
| | | handleImport() { |
| | | this.reset(); |
| | | this.addOrImport = 'import' |
| | | this.open = true; |
| | | this.title = "导入报备"; |
| | | }, |
| | | beforeUpload(file) { |
| | | this.fileList = [file]; |
| | | return false; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | getReport(id).then(response => { |
| | | this.daterangeCreateTime = [response.data.beginCreateTime, response.data.endCreateTime] |
| | | this.form = response.data; |
| | | this.form.errorType = this.form.errorType.split(','); |
| | | this.open = true; |
| | | this.title = "修改报备"; |
| | | }); |
| | |
| | | if (valid) { |
| | | this.form.beginCreateTime = this.daterangeCreateTime[0] |
| | | this.form.endCreateTime = this.daterangeCreateTime[1] |
| | | if (this.form.id != null) { |
| | | updateReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | if (this.addOrImport === 'import') { |
| | | let formData = new FormData(); |
| | | formData.append("importPointId", this.fileList[0]); |
| | | formData.append("pointId", this.form.importPointId); |
| | | formData.append("reportType", this.form.reportType); |
| | | formData.append("errorType", this.form.errorType); |
| | | formData.append("reportContent", this.form.reportContent); |
| | | formData.append("reportMaterials", this.form.reportMaterials); |
| | | formData.append("expirTime", this.form.expirTime); |
| | | importReport(formData).then(() => { |
| | | this.$modal.msgSuccess("成功导入报备"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("成功提交报备"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | this.form.errorType = this.form.errorType.join(','); |
| | | if (this.form.id != null) { |
| | | updateReport(this.form).then(() => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addReport(this.form).then(() => { |
| | | this.$modal.msgSuccess("成功提交报备"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 下载模板操作 */ |
| | | importTemplate() { |
| | | this.download("report/importTemplate", {}, `报备-点位导入模板.xlsx`); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | |
| | | max-height: 300px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .info-container { |
| | | width: 100%; |
| | | max-height: 400px; |